Class Extend<ObjectType>
Extension storage
public class Extend<ObjectType>
Type Parameters
ObjectType
- Inheritance
-
objectExtend<ObjectType>
- Extension Methods
Methods
WithMetadata<MetadataType>()
Extends the object with the given static extension
public static void WithMetadata<MetadataType>() where MetadataType : IMetadata
Type Parameters
MetadataType
WithProperty<PropertyType>(string)
Extends the type with a new generic property
public static GenericExtension<PropertyType> WithProperty<PropertyType>(string propertyName) where PropertyType : new()
Parameters
propertyName
stringProperty name
Returns
- GenericExtension<PropertyType>
Type Parameters
PropertyType
WithStaticProperty<PropertyType>(string)
Extends the type with a new generic static property
public static GenericProperty<PropertyType> WithStaticProperty<PropertyType>(string propertyName)
Parameters
propertyName
stringProperty name
Returns
- GenericProperty<PropertyType>
Type Parameters
PropertyType
WithStaticProperty<PropertyType>(string, Func<PropertyType>, Action<PropertyType>)
Extends the type with a new generic static property
public static GenericProperty<PropertyType> WithStaticProperty<PropertyType>(string propertyName, Func<PropertyType> getter, Action<PropertyType> setter = null)
Parameters
propertyName
stringProperty name
getter
Func<PropertyType>Getter function
setter
Action<PropertyType>Setter function
Returns
- GenericProperty<PropertyType>
Type Parameters
PropertyType
With<ExtensionType>()
Extends the object with the given static extension
public static ExtensionType With<ExtensionType>() where ExtensionType : new()
Returns
- ExtensionType
Type Parameters
ExtensionType