C# Class 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.
Afficher le fichier Open project: jschementi/iron Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

DynamicDelegateCreator() public méthode

public DynamicDelegateCreator ( LanguageContext languageContext ) : System
languageContext LanguageContext
Résultat System

GetDelegate() public méthode

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
Résultat System.Delegate