NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Delegates

The runtime provides support for delegates, which are type-safe, object-oriented function pointers. Delegates are used for event handling and callbacks in the NGWS Frameworks.

All delegates are derived from the System.Delegate class. All delegates have a constructor and an Invoke method.They can also have two optional methods, BeginInvoke and EndInvoke, which are used for asynchronous calls.

Each instance of a delegate forwards calls to its Invoke method to a method on a particular object. The object and method are chosen when the delegate instance is created. Therefore, the definition of a delegate is simply the signature of the method to which it forwards its calls. The implementations of the methods on a delegate are provided by the runtime, not by user code. Developers cannot specify additional members on a delegate.