Share via


Control.CommonExtensions Module (F#)

A module of extension members providing asynchronous operations for some basic CLI types related to concurrency and I/O.

Namespace/Module Path: Microsoft.FSharp.Control

Assembly: FSharp.Core (in FSharp.Core.dll)

[<AutoOpen>]
module CommonExtensions

Extension Members

Extension Member

Description

Add : ('T -> unit) -> unit

Permanently connects a listener function to the observable. The listener will be invoked for each observation.

Subscribe : ('T -> unit) -> IDisposable

Connects a listener function to the observable. The listener will be invoked for each observation. You can remove the listener by calling Dispose on the returned IDisposable object.

AsyncRead : byte [] * ?int * ?int -> Async<int>

Returns an asynchronous computation that will read from the stream into the given buffer.

AsyncWrite : byte[] * ?int * ?int -> Async<unit>

Returns an asynchronous computation that will write the given bytes to the stream.

Platforms

Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2

Version Information

F# Core Library Versions

Supported in: 2.0, 4.0, Portable

See Also

Reference

Microsoft.FSharp.Control Namespace (F#)