Show / Hide Table of Contents

Class StandardEnumUserDataDescriptor

Standard descriptor for Enum values

Inheritance
System.Object
StandardEnumUserDataDescriptor
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class StandardEnumUserDataDescriptor : DispatchingUserDataDescriptor

Constructors

StandardEnumUserDataDescriptor(Type, String, String[], Object[], Type)

Initializes a new instance of the StandardEnumUserDataDescriptor class.

Declaration
public StandardEnumUserDataDescriptor(Type enumType, string friendlyName = null, string[] names = null, object[] values = null, Type underlyingType = null)
Parameters
Type enumType

Type of the enum.

System.String friendlyName

Name of the friendly.

System.String[] names

System.Object[] values

Type underlyingType

Exceptions
System.ArgumentException

enumType must be an enum!

Properties

IsFlags

Gets a value indicating whether this instance describes a flags enumeration.

Declaration
public bool IsFlags { get; }
Property Value
System.Boolean

IsUnsigned

Gets a value indicating whether underlying type of the enum is unsigned.

Declaration
public bool IsUnsigned { get; }
Property Value
System.Boolean

UnderlyingType

Gets the underlying type of the enum.

Declaration
public Type UnderlyingType { get; }
Property Value
Type

Methods

IsTypeCompatible(Type, Object)

Determines whether the specified object is compatible with the specified type.

Declaration
public override bool IsTypeCompatible(Type type, object obj)
Parameters
Type type

The type.

System.Object obj

The object.

Returns
System.Boolean

MetaIndex(Script, Object, String)

Gets a "meta" operation on this userdata. In this specific case, only the concat operator is supported, only on flags enums and it implements the 'or' operator.

Declaration
public override DynValue MetaIndex(Script script, object obj, string metaname)
Parameters
Script script

System.Object obj

System.String metaname

Returns
DynValue

Back to top Built by Itinero, MIT licensed.