Show / Hide Table of Contents

Class FieldMemberDescriptor

Class providing easier marshalling of CLR fields

Inheritance
System.Object
FieldMemberDescriptor
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class FieldMemberDescriptor : IMemberDescriptor, IOptimizableDescriptor, IWireableDescriptor

Constructors

FieldMemberDescriptor(FieldInfo, InteropAccessMode)

Initializes a new instance of the PropertyMemberDescriptor class.

Declaration
public FieldMemberDescriptor(FieldInfo fi, InteropAccessMode accessMode)
Parameters
FieldInfo fi

The FieldInfo.

InteropAccessMode accessMode

The InteropAccessMode

Properties

AccessMode

Gets the InteropAccessMode

Declaration
public InteropAccessMode AccessMode { get; }
Property Value
InteropAccessMode

FieldInfo

Gets the FieldInfo got by reflection

Declaration
public FieldInfo FieldInfo { get; }
Property Value
FieldInfo

IsConst

Gets a value indicating whether this instance is a constant

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

IsReadonly

Gets a value indicating whether this instance is readonly

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

IsStatic

Gets a value indicating whether the described property is static.

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

MemberAccess

Gets the types of access supported by this member

Declaration
public MemberDescriptorAccess MemberAccess { get; }
Property Value
MemberDescriptorAccess

Name

Gets the name of the property

Declaration
public string Name { get; }
Property Value
System.String

Methods

GetValue(Script, Object)

Gets the value of the property

Declaration
public DynValue GetValue(Script script, object obj)
Parameters
Script script

The script.

System.Object obj

The object.

Returns
DynValue

PrepareForWiring(Table)

Prepares the descriptor for hard-wiring. The descriptor fills the passed table with all the needed data for hardwire generators to generate the appropriate code.

Declaration
public void PrepareForWiring(Table t)
Parameters
Table t

The table to be filled

SetValue(Script, Object, DynValue)

Sets the value of the property

Declaration
public void SetValue(Script script, object obj, DynValue v)
Parameters
Script script

The script.

System.Object obj

The object.

DynValue v

The value to set.

TryCreateIfVisible(FieldInfo, InteropAccessMode)

Tries to create a new StandardUserDataFieldDescriptor, returning null in case the field is not visible to script code.

Declaration
public static FieldMemberDescriptor TryCreateIfVisible(FieldInfo fi, InteropAccessMode accessMode)
Parameters
FieldInfo fi

The FieldInfo.

InteropAccessMode accessMode

The InteropAccessMode

Returns
FieldMemberDescriptor

A new StandardUserDataFieldDescriptor or null.

Back to top Built by Itinero, MIT licensed.