C# Класс Microsoft.Scripting.Runtime.DynamicDelegateCreator

Provides support for converting objects to delegates using the DLR binders available by the provided language context. Primarily this supports converting objects implementing IDynamicMetaObjectProvider to the appropriate delegate type. If the provided object is already a delegate of the appropriate type then the delegate will simply be returned.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
DynamicDelegateCreator ( LanguageContext languageContext ) : System
GetDelegate ( object callableObject, Type delegateType ) : Delegate

Creates a delegate with a given signature that could be used to invoke this object from non-dynamic code (w/o code context). A stub is created that makes appropriate conversions/boxing and calls the object. The stub should be executed within a context of this object's language.

Описание методов

DynamicDelegateCreator() публичный Метод

public DynamicDelegateCreator ( LanguageContext languageContext ) : System
languageContext LanguageContext
Результат System

GetDelegate() публичный Метод

Creates a delegate with a given signature that could be used to invoke this object from non-dynamic code (w/o code context). A stub is created that makes appropriate conversions/boxing and calls the object. The stub should be executed within a context of this object's language.
The object is either a subclass of Delegate but not the requested type or does not implement IDynamicMetaObjectProvider.
public GetDelegate ( object callableObject, Type delegateType ) : Delegate
callableObject object
delegateType System.Type
Результат System.Delegate