C# 클래스 Monobjc.Block

Managed implementation of the blocks as defined in the Language Specification for Blocks[1]. Even if the implementation strictly follows the Block Implementation Specification[2], it is restricted to global block for the moment.

The block bridging allow a delegate function or action to be marshalled as a native block. Its implementation points to a proxy invoker that will forward the native block invocation to the delegate function or action.

Currently, any delegate can be passed to create a block. For example:

Delegate Equivalent block signature Action void (^)() Action{T1,T2,T3} void (^)(T1, T2, T3) Func{TResult} TResult (^)() Func{T1,T2,TResult} TResult (^)(T1, T2)

[1] Language Specification for Blocks (http://clang.llvm.org/docs/BlockLanguageSpec.html)

[2] Block Implementation Specification (http://clang.llvm.org/docs/Block-ABI-Apple.html)

상속: IDisposable
파일 보기 프로젝트 열기: Monobjc/monobjc

공개 메소드들

메소드 설명
Create ( Delegate @delegate ) : Block

Create a block around the specified delegate.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

ToString ( ) : string

Returns a String that represents this instance.

보호된 메소드들

메소드 설명
Block ( Delegate invoker ) : System

Initializes a new instance of the Block class.

Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

비공개 메소드들

메소드 설명
CreateBlock ( Object thunk, Object invoker, IntPtr function ) : IntPtr
DestroyBlock ( IntPtr layout ) : void

메소드 상세

Block() 보호된 메소드

Initializes a new instance of the Block class.
protected Block ( Delegate invoker ) : System
invoker System.Delegate The invoker.
리턴 System

Create() 공개 정적인 메소드

Create a block around the specified delegate.
public static Create ( Delegate @delegate ) : Block
@delegate System.Delegate
리턴 Block

Dispose() 공개 메소드

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Releases unmanaged and - optionally - managed resources
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
리턴 void

ToString() 공개 메소드

Returns a String that represents this instance.
public ToString ( ) : string
리턴 string