Show / Hide Table of Contents

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
Implements
INamedValued<System.Object>
INamed
IValued<System.Object>
Namespace: GCore.Attributes
Assembly: GCore.dll
Syntax
public class DAttribute : Attribute, INamedValued<object>, INamed, IValued<object>

Constructors

| Improve this Doc View Source

DAttribute(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.

| Improve this Doc View Source

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 Source

Name

The name of this attribute

Declaration
public string Name { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Value

The value of the attribute.

Declaration
public object Value { get; }
Property Value
Type Description
System.Object

Methods

| Improve this Doc View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String

Implements

INamedValued<TVal>
INamed
IValued<T>

Extension Methods

ClassExtensions.ThrowIfArgumentIsNull<T>(T, String)
EnumExtensions.Flag<T>(T, T)
ObjectExtensions.IsNumber(Object)
SerializingExtensions.Serialize<T>(T, SerializingExtensions.Serializer)
SerializingExtensions.SerializeBinary<T>(T)
SerializingExtensions.SerializeSoap<T>(T)
SerializingExtensions.SerializeXML<T>(T, Boolean)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX