Snippets tagged event

  • Creating objects with events

    This snippet shows how to create objects with events in F#. It shows both simple event (to be used from F#) and a .NET compatible event with specific delegate type.

    75 people like this

    Posted: 6 years ago by Tomas Petricek

  • Creating observable using Async.StartDisposable

    Implements a simple Async.StartDisposable extension that can be used to easily create IObservable values from F# asynchronous workflows. The method starts an asynchronous workflow and returns IDisposable that cancels the workflow when disposed.

    4 people like this

    Posted: 5 years ago by Tomas Petricek

  • AsyncBuilder extension for maniplating other containers by using keyword

    AsyncBuilder extension for maniplating some other containers directory in asynchronous workflow. Bind methods in the extension enables you to retrieve inner values of 'a IObservable and 'a IEvent by using let! or do! keyword without Async.AwaitEvent or AsyncAwaitObservable. For method in the extension omits let! binding. Yield method in the extension enables you to yield value in for expression in asynchronous workflow.

    3 people like this

    Posted: 3 years ago by nagat01

  • Resource cleanup event combinator

    Declares an event combinator 'Event.using' that automatically releases resources allocated by a previous event occurence. Each event occurence creates a value using a function specified by the user and automatically calls 'Dispose' when generating a new value.

    2 people like this

    Posted: 5 years ago by Tomas Petricek

  • Reporting events from agents

    This snippet shows different options for reporting events from an F# agent. The options include triggering the event directly, using a thread pool or using a specified synchronization context.

    0 people like this

    Posted: 4 years ago by Tomas Petricek