Class ViewSerializedParamAttribute
An attribute that can be placed against a view controller to indicate the type of parameter (inheriting from ViewSerializedParam) the view itself uses
Typically this can be indicated using the ViewDescriptorAttribute against the IModelView itself using the ViewDescriptorEnumerator option
However for views that are generic, although the view maybe the same there maybe many different parameter types depending on the generic typeFor instance the BaseGridController<T> works with the IBaseGrid<T> view. Any implementation of the controller can be marked with this attribute so the ViewDescriptorEnumerator can retrieve the correct parameter type for that grid controller
You can use this in your own ViewDescriptorEnumerator, or against any grid controller which already looks for this attribute. i.e. the SQLWrapperResultsController uses this to specify it uses the SQLWrapperResultsViewParamsInherited Members
Namespace: LemonEdge.Client.Core.Views.Core
Assembly: LemonEdge.ClientCore.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public class ViewSerializedParamAttribute : Attribute
Constructors
ViewSerializedParamAttribute(Type)
The type of parameter to use for the view of this controller. Must inherit from ViewSerializedParam
Declaration
public ViewSerializedParamAttribute(Type defaultSerializedParamType)
Parameters
Type | Name | Description |
---|---|---|
Type | defaultSerializedParamType | The parameter type that inherits from ViewSerializedParam to be used against the view for this controller |
Properties
Default
The type of parameter to use for the view of this controller. Must inherit from ViewSerializedParam
Declaration
public Type Default { get; }
Property Value
Type | Description |
---|---|
Type |
Methods
Create()
Creates a new default instance of the Default parameter type (inheriting from ViewSerializedParam) for this controller
Declaration
public ViewSerializedParam Create()
Returns
Type | Description |
---|---|
ViewSerializedParam | A new default instance of the Default parameter type (inheriting from ViewSerializedParam) for this controller |