RuntimeHelpers Module
A group of functions used as part of the compiled representation of F# sequence expressions.
Functions and values
Function or value |
Description
|
Full Usage:
RuntimeHelpers.CreateEvent addHandler removeHandler createHandler
Parameters:
'Delegate -> unit
-
A function to handle adding a delegate for the event to trigger.
removeHandler : 'Delegate -> unit
-
A function to handle removing a delegate that the event triggers.
createHandler : (objnull -> 'Args -> unit) -> 'Delegate
-
A function to produce the delegate type the event can trigger.
Returns: IEvent<'Delegate, 'Args>
The initialized event.
|
Creates an anonymous event with the given handlers.
|
Full Usage:
RuntimeHelpers.EnumerateFromFunctions create moveNext current
Parameters:
unit -> 'T
-
An initializer function.
moveNext : 'T -> bool
-
A function to iterate and test if end of sequence is reached.
current : 'T -> 'U
-
A function to retrieve the current element.
Returns: 'U seq
The resulting typed sequence.
|
The F# compiler emits calls to this function to implement the compiler-intrinsic conversions from untyped IEnumerable sequences to typed sequences.
|
|
|
Full Usage:
RuntimeHelpers.EnumerateTryWith source exceptionFilter exceptionHandler
Parameters:
'T seq
-
The input sequence.
exceptionFilter : exn -> int
-
Pattern matches after 'when' converted to return 1
exceptionHandler : exn -> 'T seq
-
Pattern matches after 'when' with their actual execution code
Returns: 'T seq
The result sequence.
|
The F# compiler emits calls to this function to
implement the
|
Full Usage:
RuntimeHelpers.EnumerateUsing resource source
Parameters:
'T
-
The resource to be used and disposed.
source : 'T -> 'Collection
-
The input sequence.
Returns: 'U seq
The result sequence.
|
The F# compiler emits calls to this function to implement the
|
|