Class BindingContextForAttribute
Describes a binding context that is created to work for a specified entity type. This attribute is used to specify for which entity the binding context is created.
Inherited Members
Namespace: SpiceSharp.Attributes
Assembly: SpiceSharp.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
public class BindingContextForAttribute : Attribute
Constructors
BindingContextForAttribute(Type)
Initializes a new instance of the BehaviorForAttribute class.
Declaration
public BindingContextForAttribute(Type entityType)
Parameters
Type | Name | Description |
---|---|---|
Type | entityType | Type of the entity that the behavior is meant for. |
BindingContextForAttribute(Type, Type[])
Initializes a new instance of the BehaviorForAttribute class.
Declaration
public BindingContextForAttribute(Type entityType, Type[] genericTypeArguments)
Parameters
Type | Name | Description |
---|---|---|
Type | entityType | Type of the entity that the behavior is meant for. |
Type[] | genericTypeArguments | The generic type arguments if needed. |
Properties
EntityType
Gets the entity type that the behavior implementation is targeting.
Declaration
public Type EntityType { get; }
Property Value
Type | Description |
---|---|
Type | The type of the entity. |
GenericTypeArguments
Gets the generic type arguments that should apply for this behavior when used for the specified entity.
Declaration
public Type[] GenericTypeArguments { get; }
Property Value
Type | Description |
---|---|
Type[] | The generic type arguments. |