Class PropertyExtensions
Extension methods used in properties.
Inheritance
System.Object
PropertyExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CCMS.BL.Services.EditorConfig.Properties.Helpers
Assembly: CCMS.BL.dll
Syntax
public static class PropertyExtensions
Methods
ToAllowedValue(Type)
Converts enum type into string of values.
Declaration
public static string ToAllowedValue(this Type enumType)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | enumType |
Returns
| Type | Description |
|---|---|
| System.String |
ToName<T>(T)
Changes property type name to snake-case, discarding suffix "property".
Declaration
public static string ToName<T>(this T property)
where T : class, IProperty
Parameters
| Type | Name | Description |
|---|---|---|
| T | property |
Returns
| Type | Description |
|---|---|
| System.String |
Type Parameters
| Name | Description |
|---|---|
| T |
ToStringArray(Type)
Converts enum type into list of values in string.
Declaration
public static IEnumerable<string> ToStringArray(this Type enumType)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | enumType |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<System.String> |