F# Compiler Services


コンパイラサービス: ファイルシステム仮想化

FSharp.Compiler.Service にはファイルシステムを表すグローバル変数があります。 この変数を設定するこにより、ファイルシステムが利用できない状況でも コンパイラをホストすることができるようになります。

注意: 以下で使用しているAPIは実験的なもので、 新しいnugetパッケージの公開に伴って変更される可能性があります。

FileSystemの設定

以下の例ではディスクからの読み取りを行うような実装をファイルシステムに設定しています:

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
19: 
20: 
21: 
22: 
23: 
24: 
25: 
26: 
27: 
28: 
29: 
30: 
31: 
32: 
33: 
34: 
35: 
36: 
37: 
38: 
39: 
40: 
41: 
42: 
43: 
44: 
45: 
46: 
47: 
48: 
49: 
50: 
51: 
52: 
53: 
54: 
55: 
56: 
57: 
58: 
59: 
60: 
61: 
62: 
63: 
64: 
65: 
66: 
67: 
#r "FSharp.Compiler.Service.dll"
open System
open System.IO
open System.Collections.Generic
open System.Text
open Microsoft.FSharp.Compiler.AbstractIL.Internal.Library

let defaultFileSystem = Shim.FileSystem

let fileName1 = @"c:\mycode\test1.fs" // 注意: 実際には存在しないファイルのパス
let fileName2 = @"c:\mycode\test2.fs" // 注意: 実際には存在しないファイルのパス

type MyFileSystem() = 
    let file1 = """
module File1

let A = 1"""
    let file2 = """
module File2
let B = File1.A + File1.A"""
    let files = dict [(fileName1, file1); (fileName2, file2)]

    interface IFileSystem with
        // 読み取りおよび書き込み用にファイルをオープンする機能を実装
        member __.FileStreamReadShim(fileName) = 
            match files.TryGetValue(fileName) with
            | true, text -> new MemoryStream(Encoding.UTF8.GetBytes(text)) :> Stream
            | _ -> defaultFileSystem.FileStreamReadShim(fileName)

        member __.FileStreamCreateShim(fileName) = 
            defaultFileSystem.FileStreamCreateShim(fileName)

        member __.FileStreamWriteExistingShim(fileName) = 
            defaultFileSystem.FileStreamWriteExistingShim(fileName)

        member __.ReadAllBytesShim(fileName) = 
            match files.TryGetValue(fileName) with
            | true, text -> Encoding.UTF8.GetBytes(text)
            | _ -> defaultFileSystem.ReadAllBytesShim(fileName)

        // 一時パスおよびファイルのタイムスタンプに関連する機能を実装
        member __.GetTempPathShim() = 
            defaultFileSystem.GetTempPathShim()
        member __.GetLastWriteTimeShim(fileName) = 
            defaultFileSystem.GetLastWriteTimeShim(fileName)
        member __.GetFullPathShim(fileName) = 
            defaultFileSystem.GetFullPathShim(fileName)
        member __.IsInvalidPathShim(fileName) = 
            defaultFileSystem.IsInvalidPathShim(fileName)
        member __.IsPathRootedShim(fileName) = 
            defaultFileSystem.IsPathRootedShim(fileName)

        // ファイルの存在確認および削除に関連する機能を実装
        member __.SafeExists(fileName) = 
            files.ContainsKey(fileName) || defaultFileSystem.SafeExists(fileName)
        member __.FileDelete(fileName) = 
            defaultFileSystem.FileDelete(fileName)

        // アセンブリのロードに関連する機能を実装。
        // 型プロバイダやF# Interactiveで使用される。
        member __.AssemblyLoadFrom(fileName) = 
            defaultFileSystem.AssemblyLoadFrom fileName
        member __.AssemblyLoad(assemblyName) = 
            defaultFileSystem.AssemblyLoad assemblyName 

let myFileSystem = MyFileSystem()
Shim.FileSystem <- MyFileSystem() 

FileSystemによるコンパイルの実行

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
19: 
20: 
21: 
22: 
23: 
24: 
25: 
26: 
27: 
28: 
29: 
30: 
31: 
32: 
33: 
34: 
35: 
36: 
37: 
38: 
open Microsoft.FSharp.Compiler.SourceCodeServices

let checker = FSharpChecker.Create()
let projectOptions = 
    let allFlags = 
        [| yield "--simpleresolution"; 
           yield "--noframework"; 
           yield "--debug:full"; 
           yield "--define:DEBUG"; 
           yield "--optimize-"; 
           yield "--doc:test.xml"; 
           yield "--warn:3"; 
           yield "--fullpaths"; 
           yield "--flaterrors"; 
           yield "--target:library"; 
           let references =
             [ @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll"; 
               @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll"; 
               @"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll"; 
               @"C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.0.0\FSharp.Core.dll"]
           for r in references do 
                 yield "-r:" + r |]
 
    { ProjectFileName = @"c:\mycode\compilation.fsproj" // 現在のディレクトリで一意な名前を指定
      ProjectFileNames = [| fileName1; fileName2 |]
      OtherOptions = allFlags 
      ReferencedProjects=[| |]
      IsIncompleteTypeCheckEnvironment = false
      UseScriptResolutionRules = true 
      LoadTime = System.DateTime.Now // 'Now' を指定して強制的に再読込させている点に注意
      UnresolvedReferences = None }

let results = checker.ParseAndCheckProject(projectOptions) |> Async.RunSynchronously

results.Errors
results.AssemblySignature.Entities.Count //2
results.AssemblySignature.Entities.[0].MembersFunctionsAndValues.Count //1
results.AssemblySignature.Entities.[0].MembersFunctionsAndValues.[0].DisplayName // "B"

まとめ

このチュートリアルでは FSharp.Compiler.Service コンポーネントで使用される ファイルシステムに注目して、グローバルな設定を変更する方法について紹介しました。

このチュートリアルの執筆時点では、以下に列挙したSystem.IOの操作に対しては 仮想化されたファイルシステムAPIが用意されない予定になっています。 将来のバージョンのコンパイラサービスではこれらのAPIが追加されるかもしれません。

  • Path.Combine
  • Path.DirectorySeparatorChar
  • Path.GetDirectoryName
  • Path.GetFileName
  • Path.GetFileNameWithoutExtension
  • Path.HasExtension
  • Path.GetRandomFileName (アセンブリ内にコンパイル済みwin32リソースを生成する場合にのみ使用される)

注意: SourceCodeServices API内の一部の操作では、 引数にファイルの内容だけでなくファイル名を指定する必要があります。 これらのAPIにおいて、ファイル名はエラーの報告のためだけに使用されます。

注意: 型プロバイダーコンポーネントは仮想化されたファイルシステムを使用しません。

注意: コンパイラサービスは --simpleresolution が指定されていない場合、 MSBuildを使ってアセンブリの解決を試みることがあります。 FileSystem APIを使用する場合、通常はコンパイラへのフラグとして --simpleresolution を指定することになります。 それと同時に --noframework を指定します。 .NETアセンブリに対するすべての参照を明示的に指定する必要があるでしょう。

namespace System
namespace System.IO
namespace System.Collections
namespace System.Collections.Generic
namespace System.Text
namespace Microsoft
namespace Microsoft.FSharp
namespace Microsoft.FSharp.Compiler
namespace Microsoft.FSharp.Compiler.AbstractIL
namespace Microsoft.FSharp.Compiler.AbstractIL.Internal
module Library

from Microsoft.FSharp.Compiler.AbstractIL.Internal
val defaultFileSystem : IFileSystem

Full name: Filesystem.defaultFileSystem
module Shim

from Microsoft.FSharp.Compiler.AbstractIL.Internal.Library
val mutable FileSystem : IFileSystem

Full name: Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.Shim.FileSystem
val fileName1 : string

Full name: Filesystem.fileName1
val fileName2 : string

Full name: Filesystem.fileName2
Multiple items
type MyFileSystem =
  interface IFileSystem
  new : unit -> MyFileSystem

Full name: Filesystem.MyFileSystem

--------------------
new : unit -> MyFileSystem
val file1 : string
val file2 : string
val files : IDictionary<string,string>
val dict : keyValuePairs:seq<'Key * 'Value> -> IDictionary<'Key,'Value> (requires equality)

Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.dict
type IFileSystem =
  interface
    abstract member AssemblyLoad : assemblyName:AssemblyName -> Assembly
    abstract member AssemblyLoadFrom : fileName:string -> Assembly
    abstract member FileDelete : fileName:string -> unit
    abstract member FileStreamCreateShim : fileName:string -> Stream
    abstract member FileStreamReadShim : fileName:string -> Stream
    abstract member FileStreamWriteExistingShim : fileName:string -> Stream
    abstract member GetFullPathShim : fileName:string -> string
    abstract member GetLastWriteTimeShim : fileName:string -> DateTime
    abstract member GetTempPathShim : unit -> string
    abstract member IsInvalidPathShim : filename:string -> bool
    ...
  end

Full name: Microsoft.FSharp.Compiler.AbstractIL.Internal.Library.Shim.IFileSystem
override MyFileSystem.FileStreamReadShim : fileName:string -> Stream

Full name: Filesystem.MyFileSystem.FileStreamReadShim
val fileName : string
IDictionary.TryGetValue(key: string, value: byref<string>) : bool
val text : string
Multiple items
type MemoryStream =
  inherit Stream
  new : unit -> MemoryStream + 6 overloads
  member CanRead : bool
  member CanSeek : bool
  member CanWrite : bool
  member Capacity : int with get, set
  member Flush : unit -> unit
  member GetBuffer : unit -> byte[]
  member Length : int64
  member Position : int64 with get, set
  member Read : buffer:byte[] * offset:int * count:int -> int
  ...

Full name: System.IO.MemoryStream

--------------------
MemoryStream() : unit
MemoryStream(capacity: int) : unit
MemoryStream(buffer: byte []) : unit
MemoryStream(buffer: byte [], writable: bool) : unit
MemoryStream(buffer: byte [], index: int, count: int) : unit
MemoryStream(buffer: byte [], index: int, count: int, writable: bool) : unit
MemoryStream(buffer: byte [], index: int, count: int, writable: bool, publiclyVisible: bool) : unit
type Encoding =
  member BodyName : string
  member Clone : unit -> obj
  member CodePage : int
  member DecoderFallback : DecoderFallback with get, set
  member EncoderFallback : EncoderFallback with get, set
  member EncodingName : string
  member Equals : value:obj -> bool
  member GetByteCount : chars:char[] -> int + 3 overloads
  member GetBytes : chars:char[] -> byte[] + 5 overloads
  member GetCharCount : bytes:byte[] -> int + 2 overloads
  ...

Full name: System.Text.Encoding
property Encoding.UTF8: Encoding
Encoding.GetBytes(s: string) : byte []
Encoding.GetBytes(chars: char []) : byte []
Encoding.GetBytes(chars: char [], index: int, count: int) : byte []
Encoding.GetBytes(chars: nativeptr<char>, charCount: int, bytes: nativeptr<byte>, byteCount: int) : int
Encoding.GetBytes(s: string, charIndex: int, charCount: int, bytes: byte [], byteIndex: int) : int
Encoding.GetBytes(chars: char [], charIndex: int, charCount: int, bytes: byte [], byteIndex: int) : int
type Stream =
  inherit MarshalByRefObject
  member BeginRead : buffer:byte[] * offset:int * count:int * callback:AsyncCallback * state:obj -> IAsyncResult
  member BeginWrite : buffer:byte[] * offset:int * count:int * callback:AsyncCallback * state:obj -> IAsyncResult
  member CanRead : bool
  member CanSeek : bool
  member CanTimeout : bool
  member CanWrite : bool
  member Close : unit -> unit
  member CopyTo : destination:Stream -> unit + 1 overload
  member Dispose : unit -> unit
  member EndRead : asyncResult:IAsyncResult -> int
  ...

Full name: System.IO.Stream
abstract member IFileSystem.FileStreamReadShim : fileName:string -> Stream
val __ : MyFileSystem
override MyFileSystem.FileStreamCreateShim : fileName:string -> Stream

Full name: Filesystem.MyFileSystem.FileStreamCreateShim
abstract member IFileSystem.FileStreamCreateShim : fileName:string -> Stream
override MyFileSystem.FileStreamWriteExistingShim : fileName:string -> Stream

Full name: Filesystem.MyFileSystem.FileStreamWriteExistingShim
abstract member IFileSystem.FileStreamWriteExistingShim : fileName:string -> Stream
override MyFileSystem.ReadAllBytesShim : fileName:string -> byte []

Full name: Filesystem.MyFileSystem.ReadAllBytesShim
abstract member IFileSystem.ReadAllBytesShim : fileName:string -> byte []
override MyFileSystem.GetTempPathShim : unit -> string

Full name: Filesystem.MyFileSystem.GetTempPathShim
abstract member IFileSystem.GetTempPathShim : unit -> string
override MyFileSystem.GetLastWriteTimeShim : fileName:string -> DateTime

Full name: Filesystem.MyFileSystem.GetLastWriteTimeShim
abstract member IFileSystem.GetLastWriteTimeShim : fileName:string -> DateTime
override MyFileSystem.GetFullPathShim : fileName:string -> string

Full name: Filesystem.MyFileSystem.GetFullPathShim
abstract member IFileSystem.GetFullPathShim : fileName:string -> string
override MyFileSystem.IsInvalidPathShim : fileName:string -> bool

Full name: Filesystem.MyFileSystem.IsInvalidPathShim
abstract member IFileSystem.IsInvalidPathShim : filename:string -> bool
override MyFileSystem.IsPathRootedShim : fileName:string -> bool

Full name: Filesystem.MyFileSystem.IsPathRootedShim
abstract member IFileSystem.IsPathRootedShim : path:string -> bool
override MyFileSystem.SafeExists : fileName:string -> bool

Full name: Filesystem.MyFileSystem.SafeExists
IDictionary.ContainsKey(key: string) : bool
abstract member IFileSystem.SafeExists : fileName:string -> bool
override MyFileSystem.FileDelete : fileName:string -> unit

Full name: Filesystem.MyFileSystem.FileDelete
abstract member IFileSystem.FileDelete : fileName:string -> unit
override MyFileSystem.AssemblyLoadFrom : fileName:string -> Reflection.Assembly

Full name: Filesystem.MyFileSystem.AssemblyLoadFrom
abstract member IFileSystem.AssemblyLoadFrom : fileName:string -> Reflection.Assembly
override MyFileSystem.AssemblyLoad : assemblyName:Reflection.AssemblyName -> Reflection.Assembly

Full name: Filesystem.MyFileSystem.AssemblyLoad
val assemblyName : Reflection.AssemblyName
abstract member IFileSystem.AssemblyLoad : assemblyName:Reflection.AssemblyName -> Reflection.Assembly
val myFileSystem : MyFileSystem

Full name: Filesystem.myFileSystem
namespace Microsoft.FSharp.Compiler.SourceCodeServices
val checker : FSharpChecker

Full name: Filesystem.checker
type FSharpChecker
member CheckFileInProject : parsed:FSharpParseFileResults * filename:string * fileversion:int * source:string * options:FSharpProjectOptions * ?isResultObsolete:IsResultObsolete * ?textSnapshotInfo:obj -> Async<FSharpCheckFileAnswer>
member CheckFileInProjectIfReady : parsed:FSharpParseFileResults * filename:string * fileversion:int * source:string * options:FSharpProjectOptions * ?isResultObsolete:IsResultObsolete * ?textSnapshotInfo:obj -> Async<FSharpCheckFileAnswer option>
member CheckProjectInBackground : options:FSharpProjectOptions -> unit
member ClearLanguageServiceRootCachesAndCollectAndFinalizeAllTransients : unit -> unit
member Compile : argv:string [] -> FSharpErrorInfo [] * int
member Compile : ast:ParsedInput list * assemblyName:string * outFile:string * dependencies:string list * ?pdbFile:string * ?executable:bool * ?noframework:bool -> FSharpErrorInfo [] * int
member CompileToDynamicAssembly : otherFlags:string [] * execute:(TextWriter * TextWriter) option -> FSharpErrorInfo [] * int * Assembly option
member CompileToDynamicAssembly : ast:ParsedInput list * assemblyName:string * dependencies:string list * execute:(TextWriter * TextWriter) option * ?debug:bool * ?noframework:bool -> FSharpErrorInfo [] * int * Assembly option
member GetBackgroundCheckResultsForFileInProject : filename:string * options:FSharpProjectOptions -> Async<FSharpParseFileResults * FSharpCheckFileResults>
member GetBackgroundParseResultsForFileInProject : filename:string * options:FSharpProjectOptions -> Async<FSharpParseFileResults>
member GetProjectOptionsFromCommandLineArgs : projectFileName:string * argv:string [] * ?loadedTimeStamp:DateTime -> FSharpProjectOptions
member GetProjectOptionsFromScript : filename:string * source:string * ?loadedTimeStamp:DateTime * ?otherFlags:string [] * ?useFsiAuxLib:bool -> Async<FSharpProjectOptions>
member InvalidateAll : unit -> unit
member InvalidateConfiguration : options:FSharpProjectOptions -> unit
member KeepProjectAlive : options:FSharpProjectOptions -> Async<IDisposable>
member MatchBracesAlternate : filename:string * source:string * options:FSharpProjectOptions -> Async<(range * range) []>
member NotifyProjectCleaned : options:FSharpProjectOptions -> unit
member ParseAndCheckFileInProject : filename:string * fileversion:int * source:string * options:FSharpProjectOptions * ?isResultObsolete:IsResultObsolete * ?textSnapshotInfo:obj -> Async<FSharpParseFileResults * FSharpCheckFileAnswer>
member ParseAndCheckProject : options:FSharpProjectOptions -> Async<FSharpCheckProjectResults>
member ParseFileInProject : filename:string * source:string * options:FSharpProjectOptions -> Async<FSharpParseFileResults>
member TryGetRecentCheckResultsForFile : filename:string * options:FSharpProjectOptions * ?source:string -> (FSharpParseFileResults * FSharpCheckFileResults * int) option
member BeforeBackgroundFileCheck : IEvent<string>
member CurrentQueueLength : int
member FileChecked : IEvent<string>
member FileParsed : IEvent<string>
member private FrameworkImportsCache : FrameworkImportsCache
member ImplicitlyStartBackgroundWork : bool
member MaxMemory : int
member MaxMemoryReached : IEvent<unit>
member PauseBeforeBackgroundWork : int
member ProjectChecked : IEvent<string>
member private ReactorOps : IReactorOperations
member private ReferenceResolver : Resolver
member ImplicitlyStartBackgroundWork : bool with set
member MaxMemory : int with set
member PauseBeforeBackgroundWork : int with set
static member Create : ?projectCacheSize:int * ?keepAssemblyContents:bool * ?keepAllBackgroundResolutions:bool * ?msbuildEnabled:bool -> FSharpChecker
static member GlobalForegroundParseCountStatistic : int
static member GlobalForegroundTypeCheckCountStatistic : int

Full name: Microsoft.FSharp.Compiler.SourceCodeServices.FSharpChecker
static member FSharpChecker.Create : ?projectCacheSize:int * ?keepAssemblyContents:bool * ?keepAllBackgroundResolutions:bool * ?msbuildEnabled:bool -> FSharpChecker
val projectOptions : FSharpProjectOptions

Full name: Filesystem.projectOptions
val allFlags : string []
val references : string list
val r : string
Multiple items
type DateTime =
  struct
    new : ticks:int64 -> DateTime + 10 overloads
    member Add : value:TimeSpan -> DateTime
    member AddDays : value:float -> DateTime
    member AddHours : value:float -> DateTime
    member AddMilliseconds : value:float -> DateTime
    member AddMinutes : value:float -> DateTime
    member AddMonths : months:int -> DateTime
    member AddSeconds : value:float -> DateTime
    member AddTicks : value:int64 -> DateTime
    member AddYears : value:int -> DateTime
    ...
  end

Full name: System.DateTime

--------------------
DateTime()
   (+0 other overloads)
DateTime(ticks: int64) : unit
   (+0 other overloads)
DateTime(ticks: int64, kind: DateTimeKind) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int, calendar: Globalization.Calendar) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, kind: DateTimeKind) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, calendar: Globalization.Calendar) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int) : unit
   (+0 other overloads)
DateTime(year: int, month: int, day: int, hour: int, minute: int, second: int, millisecond: int, kind: DateTimeKind) : unit
   (+0 other overloads)
property DateTime.Now: DateTime
union case Option.None: Option<'T>
val results : FSharpCheckProjectResults

Full name: Filesystem.results
member FSharpChecker.ParseAndCheckProject : options:FSharpProjectOptions -> Async<FSharpCheckProjectResults>
Multiple items
type Async
static member AsBeginEnd : computation:('Arg -> Async<'T>) -> ('Arg * AsyncCallback * obj -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit)
static member AwaitEvent : event:IEvent<'Del,'T> * ?cancelAction:(unit -> unit) -> Async<'T> (requires delegate and 'Del :> Delegate)
static member AwaitIAsyncResult : iar:IAsyncResult * ?millisecondsTimeout:int -> Async<bool>
static member AwaitTask : task:Task -> Async<unit>
static member AwaitTask : task:Task<'T> -> Async<'T>
static member AwaitWaitHandle : waitHandle:WaitHandle * ?millisecondsTimeout:int -> Async<bool>
static member CancelDefaultToken : unit -> unit
static member Catch : computation:Async<'T> -> Async<Choice<'T,exn>>
static member FromBeginEnd : beginAction:(AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T>
static member FromBeginEnd : arg:'Arg1 * beginAction:('Arg1 * AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T>
static member FromBeginEnd : arg1:'Arg1 * arg2:'Arg2 * beginAction:('Arg1 * 'Arg2 * AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T>
static member FromBeginEnd : arg1:'Arg1 * arg2:'Arg2 * arg3:'Arg3 * beginAction:('Arg1 * 'Arg2 * 'Arg3 * AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T>
static member FromContinuations : callback:(('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T>
static member Ignore : computation:Async<'T> -> Async<unit>
static member OnCancel : interruption:(unit -> unit) -> Async<IDisposable>
static member Parallel : computations:seq<Async<'T>> -> Async<'T []>
static member RunSynchronously : computation:Async<'T> * ?timeout:int * ?cancellationToken:CancellationToken -> 'T
static member Sleep : millisecondsDueTime:int -> Async<unit>
static member Start : computation:Async<unit> * ?cancellationToken:CancellationToken -> unit
static member StartAsTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions * ?cancellationToken:CancellationToken -> Task<'T>
static member StartChild : computation:Async<'T> * ?millisecondsTimeout:int -> Async<Async<'T>>
static member StartChildAsTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions -> Async<Task<'T>>
static member StartImmediate : computation:Async<unit> * ?cancellationToken:CancellationToken -> unit
static member StartWithContinuations : computation:Async<'T> * continuation:('T -> unit) * exceptionContinuation:(exn -> unit) * cancellationContinuation:(OperationCanceledException -> unit) * ?cancellationToken:CancellationToken -> unit
static member SwitchToContext : syncContext:SynchronizationContext -> Async<unit>
static member SwitchToNewThread : unit -> Async<unit>
static member SwitchToThreadPool : unit -> Async<unit>
static member TryCancelled : computation:Async<'T> * compensation:(OperationCanceledException -> unit) -> Async<'T>
static member CancellationToken : Async<CancellationToken>
static member DefaultCancellationToken : CancellationToken

Full name: Microsoft.FSharp.Control.Async

--------------------
type Async<'T>

Full name: Microsoft.FSharp.Control.Async<_>
static member Async.RunSynchronously : computation:Async<'T> * ?timeout:int * ?cancellationToken:Threading.CancellationToken -> 'T
property FSharpCheckProjectResults.Errors: Compiler.FSharpErrorInfo []
property FSharpCheckProjectResults.AssemblySignature: FSharpAssemblySignature
property FSharpAssemblySignature.Entities: IList<FSharpEntity>
property ICollection.Count: int
Fork me on GitHub