Show / Hide Table of Contents

Class OverloadedMethodMemberDescriptor

Class providing easier marshalling of overloaded CLR functions

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

Constructors

OverloadedMethodMemberDescriptor(String, Type)

Initializes a new instance of the OverloadedMethodMemberDescriptor class.

Declaration
public OverloadedMethodMemberDescriptor(string name, Type declaringType)
Parameters
System.String name

Type declaringType

OverloadedMethodMemberDescriptor(String, Type, IEnumerable<IOverloadableMemberDescriptor>)

Initializes a new instance of the OverloadedMethodMemberDescriptor class.

Declaration
public OverloadedMethodMemberDescriptor(string name, Type declaringType, IEnumerable<IOverloadableMemberDescriptor> descriptors)
Parameters
System.String name

The name.

Type declaringType

The declaring type.

IEnumerable<IOverloadableMemberDescriptor> descriptors

The descriptors of the overloaded methods.

OverloadedMethodMemberDescriptor(String, Type, IOverloadableMemberDescriptor)

Initializes a new instance of the OverloadedMethodMemberDescriptor class.

Declaration
public OverloadedMethodMemberDescriptor(string name, Type declaringType, IOverloadableMemberDescriptor descriptor)
Parameters
System.String name

The name.

Type declaringType

The declaring type.

IOverloadableMemberDescriptor descriptor

The descriptor of the first overloaded method.

Properties

DeclaringType

Gets the name of the first described overload

Declaration
public Type DeclaringType { get; }
Property Value
Type

IgnoreExtensionMethods

Gets or sets a value indicating whether this instance ignores extension methods.

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

IsStatic

Gets a value indicating whether there is at least one static method in the resolution list

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

Exceptions
System.NotImplementedException

MemberAccess

Gets the types of access supported by this member

Declaration
public MemberDescriptorAccess MemberAccess { get; }
Property Value
MemberDescriptorAccess

Name

Gets the name of the first described overload

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

OverloadCount

Gets the number of overloaded methods contained in this collection

Declaration
public int OverloadCount { get; }
Property Value
System.Int32

The overload count.

Methods

AddOverload(IOverloadableMemberDescriptor)

Adds an overload.

Declaration
public void AddOverload(IOverloadableMemberDescriptor overload)
Parameters
IOverloadableMemberDescriptor overload

The overload.

GetCallback(Script, Object)

Gets a callback function as a delegate

Declaration
public Func<ScriptExecutionContext, CallbackArguments, DynValue> GetCallback(Script script, object obj)
Parameters
Script script

The script for which the callback must be generated.

System.Object obj

The object (null for static).

Returns
Func<ScriptExecutionContext, CallbackArguments, DynValue>

GetCallbackFunction(Script, Object)

Gets the callback function.

Declaration
public CallbackFunction GetCallbackFunction(Script script, object obj = null)
Parameters
Script script

The script for which the callback must be generated.

System.Object obj

The object (null for static).

Returns
CallbackFunction

GetValue(Script, Object)

Gets the value of this member as a DynValue to be exposed to scripts.

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

The script.

System.Object obj

The object owning this member, or null if static.

Returns
DynValue

The value of this member as a 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 this member from a DynValue.

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

The script.

System.Object obj

The object owning this member, or null if static.

DynValue value

The value to be set.

Exceptions
System.NotImplementedException

Back to top Built by Itinero, MIT licensed.