Nasdack
Nasdack
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
But you did not update that
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
That was in reply to the code I sent you, which registers the class
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
.
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
Of course the error is popping up
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
Why are you fetching the class when you have registered the interface?
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
and the agreement being methods, properties, etc...
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
The parties being classes, or other interfaces
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
That's the dictionary's definition and it fits here
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
An agreement between two or more parties
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
Well I wouldn't use an interface for every single view model I make. An interface is like a common contract for multiple classes to adhere to... so something like IViewModelBase with common methods and functions that a group of view models must have, will make more sense
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
you will see them
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
then yes
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
If your interface has the required properties and methods for that
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
You instead need to register the class itself as a service
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
So when you fetch a service called AboutViewModel, it is not found
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
The service is registered as IAboutViewModel, and its concrete implementation is specified as AboutViewModel
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
you here are fetching the implementation (concrete type) of the service, not the service itself
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
services.AddSingleton<AboutViewModel>();
services.AddSingleton<AboutViewModel>();
Then:
var view = _serviceProvider.GetRequiredService<AboutViewModel>();
var view = _serviceProvider.GetRequiredService<AboutViewModel>();
168 replies
CC#
Created by Temporal Nightmare on 3/26/2025 in #help
AboutView not registered?
That's not what interfaces are for
168 replies