MonobjcMonobjc Documented Class Library
Block Class
NamespacesMonobjcBlock

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:

DelegateEquivalent 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.txt)

[2] Block Implementation Specification (http://clang.llvm.org/docs/BlockImplementation.txt)

Declaration Syntax
C#Visual BasicVisual C++
public abstract class Block : IDisposable
Public MustInherit Class Block _
	Implements IDisposable
public ref class Block abstract : IDisposable
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
Block(Delegate)
Initializes a new instance of the Block class.

BlockInvoker
Gets the block invoker.

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

Dispose(Boolean)
Releases unmanaged and - optionally - managed resources

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Releases unmanaged resources and performs other cleanup operations before the Block is reclaimed by garbage collection.
(Overrides Object.Finalize()()()().)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
Invoker
Gets the invoked delegate.

MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
NativePointer
Gets the native pointer representing this block instance.

ToString()()()()
Returns a String that represents this instance.
(Overrides Object.ToString()()()().)
Inheritance Hierarchy
Object
Block
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later)

Assembly: Monobjc (Module: Monobjc)