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.
파일 보기 프로젝트 열기: jschementi/iron 1 사용 예제들

공개 메소드들

메소드 설명
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