Class DAttribute
Dynamic attribute to create generic attributes.
Example:
[D(typeof(List<int>), new int[] {1, 2, 3})]
[D("AttributeName", typeof(List<int>), new int[] {1, 2, 3})]
Inheritance
System.Object
DAttribute
Namespace: GCore.Attributes
Assembly: GCore.dll
Syntax
public class DAttribute : Attribute, INamedValued<object>, INamed, IValued<object>
Constructors
| Improve this Doc View SourceDAttribute(String, Type, Object[])
Create a new named attribute.
Declaration
public DAttribute(string name, Type type, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of this attribute. |
Type | type | The type of Value. |
System.Object[] | args | The arguments to pass to the constructor. |
DAttribute(Type, Object[])
Create a new attribute.
Declaration
public DAttribute(Type type, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type of Value. |
System.Object[] | args | The arguments to pass to the constructor. |
Properties
| Improve this Doc View SourceName
The name of this attribute
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Value
The value of the attribute.
Declaration
public object Value { get; }
Property Value
Type | Description |
---|---|
System.Object |
Methods
| Improve this Doc View SourceToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |