Class ViewModelInjection<T>
This object is used to inject common host application services into view models as parameters.
Inheritance
Implements
Inherited Members
Namespace: Gorgon.Editor.UI.ViewModels
Assembly: Gorgon.Editor.API.dll
Syntax
public class ViewModelInjection<T> : IViewModelInjection<T> where T : IHostServices
Type Parameters
Name | Description |
---|---|
T | The type of host services. Must implement IHostServices. |
Remarks
When creating view models, developers should pass custom data used for initialization by inheriting this type. For content, settings, etc... or other built in view model types, there are other base classes for the parameters that should be used.
Constructors
| Edit this page View SourceViewModelInjection(IViewModelInjection<T>)
Initializes a new instance of the ViewModelInjection<T> class.
Declaration
protected ViewModelInjection(IViewModelInjection<T> copy)
Parameters
Type | Name | Description |
---|---|---|
IViewModelInjection<T> | copy | The injection parameter object to copy. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
See Also
| Edit this page View SourceViewModelInjection(T)
Initializes a new instance of the ViewModelInjection<T> class.
Declaration
public ViewModelInjection(T hostServices)
Parameters
Type | Name | Description |
---|---|---|
T | hostServices | The services from the host application. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
See Also
Properties
| Edit this page View SourceHostServices
Property to return the common services passed from host application.
Declaration
public T HostServices { get; }
Property Value
Type | Description |
---|---|
T |