diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index 3130050f9..ffdc29735 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -21,6 +21,8 @@ jobs: run: dotnet paket restore - name: Build and test run: dotnet fake build -t All + - name: Build docs + run: dotnet fsdocs build --properties Configuration=Release --clean --strict --eval build-ubuntu: @@ -37,3 +39,5 @@ jobs: run: dotnet paket restore - name: Build and test run: dotnet fake build -t RunTests + - name: Build docs + run: dotnet fsdocs build --properties Configuration=Release --clean --strict --eval diff --git a/.github/workflows/push-master.yml b/.github/workflows/push-master.yml index 90009a2b6..792d2f633 100644 --- a/.github/workflows/push-master.yml +++ b/.github/workflows/push-master.yml @@ -23,7 +23,7 @@ jobs: - name: Build and test run: dotnet fake build -t All - name: Build docs - run: dotnet fsdocs build --properties Configuration=Release --clean + run: dotnet fsdocs build --properties Configuration=Release --clean --strict --eval - name: Deploy documentation from master uses: peaceiris/actions-gh-pages@v3 with: diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 4262531d9..e5fde6c5a 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -39,7 +39,7 @@ Several other fixes: * [HTML parsing for attributes not separated by a space](https://github.com/fsprojects/FSharp.Data/pull/1327) * [Update JsonProvider.fsx](https://github.com/fsprojects/FSharp.Data/pull/1334) * [Pluralizer - Add "slices" to special cases](https://github.com/fsprojects/FSharp.Data/pull/1335) -* [add ResolutionFolder=__SOURCE_DIRECTORY__ to docs](https://github.com/fsprojects/FSharp.Data/pull/1344) +* [add ResolutionFolder=ResolutionFolder to docs](https://github.com/fsprojects/FSharp.Data/pull/1344) * [fix links in docs/tools/generate.fsx](https://github.com/fsprojects/FSharp.Data/pull/1348) * [Revamp docs generation and move to .NET Standard 2.0 only](https://github.com/fsprojects/FSharp.Data/pull/1350) diff --git a/docs/ja/contributing.md b/docs/ja/contributing.md deleted file mode 100644 index d5b9b7a77..000000000 --- a/docs/ja/contributing.md +++ /dev/null @@ -1,254 +0,0 @@ -FSharp.Data に貢献する -================== - -このページには、F# Dataパッケージに貢献しようとするあなたにとって必要な -基本的な情報が揃えられています。 -たとえばライブラリの構造に関する簡単な説明や、型プロバイダの作成方法、 -F# Dataにおける複数のターゲットに対する処理方法 -(デスクトップやSilverlight、ポータブルライブラリで型プロバイダを -利用できるようにする方法)があります。 - - * このページはGitHub上のF# Dataプロジェクトに対して - pullリクエストを送信することで編集できます。 - そのため、F# Dataで遊んでいる間に何かしら学んだことがあれば、是非それを - [こちら](https://github.com/fsharp/FSharp.Data/blob/master/docs/content/ja/contributing.md) - に記録として残してください! - - * 機能(あるいはすばらしいアイディア!)に関する議論、 - あるいは貢献方法に関する提案がある場合には、GitHub上の - [Issue list](https://github.com/fsharp/FSharp.Data/issues) をチェックするか、 - [F# オープンソースメーリングリスト](http://groups.google.com/group/fsharp-opensource) - 宛にメールをください。 - -## ソリューションファイル - -ルートディレクトリには複数のVisual Studioソリューションファイル -(`*.sln`)があり、それぞれ論理的なグループ毎に分けられています。 - - * **FSharp.Data.sln** にはF# Dataの機能 - (たとえば実行時あるいはデザイン時の型プロバイダライブラリ)を - 実装する主要なプロジェクトが含まれています。 - 未完成だけれども興味深いコードを追加したい場合には試験的プロジェクトの方に - 追加するようにしてください。 - - * **FSharp.Data.ExtraPlatforms.sln** には `FSharp.Data.sln` と同じプロジェクトが - 含まれていますが、対象となるプラットフォームとして - Silverlightやポータブルクラスライブラリなどが追加されています。 - - * **FSharp.Data.Tests.sln** にはF# Dataをテストするためのライブラリがあります。 - また、Webサイト用のファイル ( `*.fsx` および `*.md`) も含まれています。 - ドキュメントを編集したい場合はこのソリューションをチェックしてください! - -## プロジェクトおよびマルチターゲット - -型プロバイダを開発する上で問題となることの1つとして、 -複数バージョンの.NETプラットフォームサポートがあります。 -型プロバイダは2つのコンポーネントから構成されます: - - * **実行時** コンポーネントは型プロバイダを使用するコンパイル済みのF#コードを - 実行した時に実際に使用される型プロバイダの一部のことです。 - このアセンブリにはJSONやCSVパーサー、HTTPユーティリティなど、 - FSharp.Dataの型プロバイダではないコンポーネントも含まれます。 - - * **デザイン時** コンポーネントは型プロバイダを使用するF#コードを - 任意のエディタで記述している間、あるいはコードをコンパイルしている間に - 使用される型プロバイダの一部のことです。 - たとえばCSVプロバイダの場合、このコンポーネントは型推論および型の生成を行います - (生成された型はコンパイラによって実行時コンポーネントと結びつけられます)。 - -複数ターゲットをサポートするためには、ターゲット(Silverlight、.NET 4.0、 -ポータブルプロファイル)それぞれに **実行時コンポーネント** が必要です。 -しかし **デザイン時** コンポーネントはVisual StudioあるいはMonoDevelopを使用して、 -デスクトップ用の.NET上でしか実行されないため、1つしか作成する必要がありません。 -(本当のことを言うと、 [tryfsharp.org](http://tryfsharp.org) のWebサイトを -サポートするために、Silverlight用の **デザイン時** コンポーネントを -作成する必要があります...) - -というわけで、4つの **実行時** コンポーネントと2つの **デザイン時** -コンポーネントがあります。 -今のところはコンポーネント毎にそれぞれ別のプロジェクトファイルが用意されていますが、 -プロジェクト間で共有されているファイルもあります。 -プロジェクトでは単にシンボルがいくつか定義されているだけで、 -特定のプラットフォームに対してはそれらのシンボルに対する `#if` で -コードを組み込んだり除外したりするようになっています。 -試験的プロジェクトには2つの **実行時** コンポーネントと2つの **デザイン時** -コンポーネントがあります。 - -`FSharp.Data.sln` を開くと、以下のような **実行時コンポーネント** が -含まれていることが確認できるでしょう: - - * **FSharp.Data** - デスクトップ.NET 4.0 バージョン - * **FSharp.Data.Portable** - F# ポータブルライブラリバージョン - (デスクトップの.NET 4.0、Windows Phone 8、 Windows 8を対象とする) - ポータブルライブラリバージョン - -ポータブルライブラリをSilverlight上で使用することは可能ですが、 -その場合にはLINQクエリ演算が定義されているSystem.Coreアセンブリへの参照が -正しいバージョンに設定できないという問題があるためにFreebaseプロバイダが -機能しなくなるという点に注意してください。 -同様に、ポータブルバージョンあるいはSilverlightバージョンを使用する場合には -XmlProviderもSilverlight上では機能しません。 - -**デザイン時** コンポーネントとしては以下のプロジェクトがあります: - - * **FSharp.Data.DesignTime** - デスクトップエディタ用のメインバージョン - * **FSharp.Data.DesignTime.Silverlight** - Try F#用のメインバージョン - -Silverlight 5のプロジェクトをコンパイルするためには、 -[Silverlight 5.0 開発者用ランタイム](http://go.microsoft.com/fwlink/?LinkId=229324) -をインストールしておく必要があります。 - -### 型プロバイダの構成 - -F# Dataの型プロバイダのうち、いくつかのものは同じような構造になっています。 -CSVやJSON、XMLプロバイダはいずれもサンプルとして入力されたファイル構造から -型を構成します。 -さらに、いずれにも実行時コンポーネントがあります(CSVパーサーやJSONパーサー、 -あるいは.NETの `XDocument` です)。 - -では一般的な型プロバイダはどのように実装すればいいのでしょうか? -まず、プロジェクト間で共有されるファイルについてはプロジェクトの -`Common` や `Library` サブディレクトリに配置します。 -これらのファイルは(パーサーやHTTPヘルパなど)汎用の **実行時** コンポーネントが -含まれることになります。 - -次に、いくつかの **デザイン時** コンポーネントがあります。 -これらは(DesignTimeプロジェクト内の) `Providers` フォルダ内にあるもので、 -F#チームによって作成された `ProvidedTypes` ヘルパや、 -`StructureInference.fs`(構造化データに対する型推論機能の実装)、 -およびその他いくつかのヘルパ機能を実装したコードがあります。 - -JSONプロバイダのような型プロバイダの場合、1つのフォルダ内に複数のファイルが置かれます。 -一般的には以下のようになります: - - * `JsonRuntime.fs` - 唯一の **実行時** コンポーネントです。 - 実行時における型の定義や、生成されたコードから呼び出されるメソッドの - 定義などがあります。 - - * `JsonInference.fs` - `StructureInference.fs` にある一般的なAPIを使用して - 構造を推測するような **デザイン時** コンポーネントです。 - - * `JsonGenerator.fs` - 公開される型を生成したり、公開される型にプロパティや - メソッドなどを追加するためのコードがあります。 - このコードでは推論によって得られた情報を使用して、実行時コンポーネントを - 呼び出すコードが生成されます。 - - * `JsonProvider.fs` - 型プロバイダのstaticプロパティを定義したり、 - 公開される型を登録する処理を行うようなエントリポイントです。 - -WorldBank、Freebaseの型プロバイダの場合は異なります。 -これらには推論が必要ありませんが、やはり **実行時** と **デザイン時** -コンポーネントの区別があります。 -したがってこれらの型プロバイダの場合、少なくとも2つのファイル -(およびいくつかのヘルパ用ファイル)がディレクトリ内にあります。 - -## ソースコード - -### Assembly replacer - -型プロバイダ内でのコード生成はややトリッキーです -(たとえば `JsonGenerator.fs` を参照してください)。 -というのも、生成されたコードでは特定の実行時アセンブリ -(Silverlightやデスクトッププロファイル、ポータブルプロファイル) -への参照が必要になるからです。 -特に、F#のクォート式を使用してコードを生成するような場合には顕著です。 -ソースコード中に `<@@ foo.Bar @@>` というコードがあると、 -このクォート式は現在のアセンブリにある `foo` という型を -直接参照していることになります。 - -この問題はAssembly replacer -(アセンブリ置換機。`Providers` 内の `AssemblyReplacer.fs` ファイルを参照) -によって処理されます。 -Assemlby replacerはクォート式を変換して、正しいバージョンを参照するように -コードを置き換えます。 -Assembly replacerの動作の詳細については -[GitHub上での議論](https://github.com/fsharp/FSharp.Data/pull/5) -を参照してください。 - -`AssemblyReplacer` 型には以下のようなドキュメントがあります: - -> 型プロバイダを実行時アセンブリとデザイン時アセンブリに分離することによって、 -> クォート式が間違った型を参照するようになってしまったため、 -> クォート式を直接使用することができなくなってしまいました。 -> `AssemblyReplacer` を使用すると、 -> クォート式によって生成された式が変形されて、適切な型を参照するようになるため -> この問題を回避できるようになります。 -> -> `ProvidedMethod` や `ProvidedConstructor` 、 -> `ProvidedProperty` の `InvokeCode` や `GetterCode` -> に指定する式は `(fun args -> <@@ doSomethingWith(%%args) @@>)` ではなく、 -> `(fun args -> let args = replacer.ToDesignTime args in replacer.ToRuntime <@@ doSomethingWith(%%args) @@>)` -> という式にする必要があります。 -> -> たとえば `ProvidedXYZ` という型を作成する場合は -> 必ず実行時型を指定する必要があります。 -> -> また、この型に対して `InvokeCode` や `GetterCode` で指定された機能が呼び出されると -> 引数として指定された式をまずデザイン時の型に変換する必要があります。 -> そして変換後の式をクォート式と連結した後、最終的に -> 実行時型へと変換し直す必要があるわけです。 -> -> もう1つ面倒なことがあります。 -> `Expr.Var` には参照同値性があるため、同じ名前で型が異なる新しい `Expr.Var` を -> 単純に新しく作成することはできません。 -> これらを実行時からデザイン時の型へと変換する場合、 -> 元々のインスタンスと完全に同じインスタンスへと戻すことができるように -> それぞれをディクショナリとして保持しています。 -> -> また、F#の関数をパラメータや返り値として使用するような式を -> 使用することができないため 、 -> 代わりに常にデリゲートを使うようにしなければならないという制限もあります -> (この制限は今回のメソッドだけではなく、型プロバイダのメンバいずれにも該当します)。 - - [hide] - open System - open System.Reflection - open FSharp.Quotations - -標準的な型プロバイダはいずれも生成時に `AssemblyReplacer` のインスタンスを -取得して、それをコードジェネレータに渡し、適切なコードが -生成されるようにすることになります: - - type AssemblyReplacer = - - /// Gets the equivalent runtime type - abstract member ToRuntime : designTimeType:Type -> Type - - /// Gets an equivalent expression with all the types - /// replaced with runtime equivalents - abstract member ToRuntime : designTimeTypeExpr:Expr -> Expr - - /// Gets an equivalent expression with all the types - /// replaced with designTime equivalents - abstract member ToDesignTime: runtimeExpr:Expr -> Expr - -## ドキュメント - -F# Dataライブラリのドキュメントは -[F# Formatting](https://github.com/tpetricek/FSharp.Formatting) -を使用して自動生成されています。 -このライブラリを使用すると `*.md` (コードスニペットが埋め込まれた -マークダウンファイル) や `*.fsx` (マークダウンドキュメントが埋め込まれた -F#スクリプトファイル) ファイルを素敵なHTMLドキュメントに変換してくれます。 - - * すべてのドキュメントに関連するコードは - [GitHub上の](https://github.com/fsharp/FSharp.Data/tree/master/samples) - `samples` ディレクトリにあります。 - バグや新機能を追加した場合には、必ずドキュメントが残るようにしてください! - - *

それぞれの型に直接関連したドキュメントだけでなく、 - ([GitHub上の](https://github.com/fsharp/FSharp.Data/tree/master/samples/tutorials)) - `tutorials` フォルダにもドキュメントがあります。 - ここにはF# Dataの機能を紹介するためのサンプルやチュートリアルを追加できます。 - - * ドキュメントをビルドしたい場合には単に `build.fsx` スクリプト - ([GitHubへのリンク](https://github.com/fsharp/FSharp.Data/blob/master/tools/build.fsx)) - を実行するだけでビルドできます。 - -## 関連する記事 - -一般的な型プロバイダを作成する方法が知りたい場合には、以下のリソースが役に立つことでしょう: - - * [Writing F# Type Providers with the F# 3.0 Developer Preview - An Introductory Guide and Samples](http://blogs.msdn.com/b/fsharpteam/archive/2011/09/24/developing-f-type-providers-with-the-f-3-0-developer-preview-an-introductory-guide-and-samples.aspx) - - * [Tutorial: Creating a Type Provider (F#)](http://msdn.microsoft.com/en-gb/library/hh361034.aspx) diff --git a/docs/ja/index.md b/docs/ja/index.md deleted file mode 100644 index 6b630b3ad..000000000 --- a/docs/ja/index.md +++ /dev/null @@ -1,104 +0,0 @@ -データアクセス用ライブラリ -=================================== - -FSharp.Data ライブラリ (`FSharp.Data.dll`) にはF#アプリケーションやスクリプトから -データにアクセスする際に必要となるすべての機能が揃えられています。 -このライブラリには構造的な形式を持ったファイル(CSVやJSON、XML)を -操作するためのF#型プロバイダや、WorldBankやFreebaseのデータにアクセスするための -型プロバイダがあります。 -また、JSONやCSVファイルを解析する機能や、 -HTTPリクエストを送信するための機能もあります。 - -

-
-
-
-
WorldBank
-
JSON
-
CSV
- -
-
-
-
- - -FSharp.Data Libraryは NuGetの -FSharp.Dataパッケージとして公開されています。 -ライブラリをインストールするには、 - -パッケージ マネージャー コンソール上から以下のコマンドを実行します: -`Install-Package FSharp.Data`. -あるいは [ソースコードをZIPファイルとしてダウンロード][source] したり、 -[コンパイル済みバイナリ][compiled] をZIPファイルとして -ダウンロードすることもできます。 - -ドキュメント ------------- - -このライブラリの重要な利点の1つとしては、包括的なドキュメントが -揃えられているということです。 -ドキュメントはいずれも [samples フォルダ][samples] 内にある `*.fsx` -ファイルから自動生成されています。 -もしも誤字脱字など見つけた場合には是非pullリクエストを投げてください! - - * [FSharp.Data](fsharpdata.html) はドキュメントのホームページで、 - それぞれの型プロバイダ(CSVやXML、JSON、WorldBank、Freebase)に関する - ドキュメントへのリンクが揃っています。 - また、 `FSharp.Data.dll` 内のpublic型に関するドキュメントへのリンクもあります。 - -貢献方法 ------------- - -プロジェクトは [GitHub][gh] 上でホストされており、 -[Issue(問題)を報告][issues] したり、プロジェクトをフォークして -pullリクエストを投げたりすることができます。 -公開APIを独自に追加した場合、是非 [samples][samples] にもそれを反映して、 -ドキュメント化されるようにしてください。 - - * 不具合あるいはライブラリに追加する機能に関する議論がある場合には - GitHub上で [不具合または新機能][issues] に関するNew Issueを投稿するか、 - [F# オープンソース][fsharp-oss] (英語)のメーリングリストに - メールを投げてください。 - - * ライブラリのアーキテクチャや構成、その他の話題 - (たとえばWindows PhoneやSilverlightなどのためのポータブルライブラリサポート) - など、より詳しい話題については [FSharp.Data に貢献する](contributing.html) - のページを参照してください。 - -### ライブラリの方針 - -このライブラリは構造的なドキュメントやその他のデータソースに対して、 -単純かつ読み取り専用のアクセスをサポートすることに重点を置いています。 -F#型プロバイダに関する包括的なコレクションとなることを意図しているわけではありません -(一般的にはF#型プロバイダには様々な用途があります)。 -さらに、このライブラリでは(現時点では)ドキュメントを作成したり、 -変更したりするようなAPIは公開されていません。 - -### ライブラリのライセンス - -ライブラリは Apache 2.0ライセンスの元に公開されています。 -詳細についてはGitHubレポジトリ内の [ライセンスファイル][license] を参照してください。 -要約すると、このライブラリは自由に商用利用したり、 -派生のライブラリを作成したり、変更したりすることができるということです。 - - - - [source]: https://github.com/fsharp/FSharp.Data/zipball/master - [compiled]: https://github.com/fsharp/FSharp.Data/zipball/release - [samples]: https://github.com/fsharp/FSharp.Data/tree/master/samples - [gh]: https://github.com/fsharp/FSharp.Data - [issues]: https://github.com/fsharp/FSharp.Data/issues - [license]: https://github.com/fsharp/FSharp.Data/blob/master/LICENSE.md - [fsharp-oss]: http://groups.google.com/group/fsharp-opensource diff --git a/docs/ja/library/CsvFile.fsx b/docs/ja/library/CsvFile.fsx deleted file mode 100644 index 74ddc92f1..000000000 --- a/docs/ja/library/CsvFile.fsx +++ /dev/null @@ -1,118 +0,0 @@ -(*** condition: prepare ***) -#r "../../../src/FSharp.Data/bin/Release/netstandard2.0/FSharp.Data.dll" -(*** condition: fsx ***) -#if FSX -#r "nuget: FSharp.Data,{{fsdocs-package-version}}" -#endif // FSX -(*** condition: ipynb ***) -#if IPYNB -#r "nuget: FSharp.Data,{{fsdocs-package-version}}" - -Formatter.SetPreferredMimeTypesFor(typeof, "text/plain") -Formatter.Register(fun (x:obj) (writer: TextWriter) -> fprintfn writer "%120A" x ) -#endif // IPYNB -(** -# CSV パーサーおよびリーダー - -F#の [CSV 型プロバイダー](CsvProvider.html) はF#で作成された -効率の良いCSVパーサーを元にしています。 -また、動的に値にアクセスできるような単純なAPIも備えられています。 - -厳密に定義されたCSV形式のドキュメントを扱う場合には、 -[型プロバイダー](CsvProvider.html) を使用したほうが簡単です。 -しかし動的アクセスが必要になるシナリオや、 -単純なスクリプトを手軽に作成したい場合には -パーサーを直接使ったほうがおそらくは簡単でしょう。 - -## CSVドキュメントの読み取り - -サンプルとなるCSVドキュメントを読み込むには、まず -(F# Interactiveを使用している場合は) `FSharp.Data.dll` への参照を追加するか、 -プロジェクトで参照を追加する必要があります。 -*) - -open FSharp.Data - -(** -`FSharp.Data` 名前空間には `CsvFile` 型が含まれていて、 -この型ではデータの読み取り用に2つのstaticメソッドが公開されています。 -`Parse` メソッドはデータを `string` 型の値として指定できます。 -`Load` メソッドはデータをファイルあるいはWeb上のリソースから読み取ることができます -(また、非同期バージョンの `LoadAsync` もあります)。 -以下の例ではYahoo financeのウェブサイトにある実際のCSVファイルのURLを指定して -`Load` メソッドを呼び出しています: -*) - -// 株価データをダウンロード -let msft = CsvFile.Load(__SOURCE_DIRECTORY__ + "/../../data/MSFT.csv") - -// HLOC形式で株価を表示 -for row in msft.Rows do - printfn "HLOC: (%s, %s, %s)" (row.GetColumn "High") (row.GetColumn "Low") (row.GetColumn "Date") - -(** - -`CsvProvider` とは異なり、 `CsvFile` はパフォーマンスを上げるために -ストリーミングモードで動作します。 -つまり `Rows` は1度だけしか走査できません。 -複数回走査する必要がある場合には `Cache` メソッドを使用することになります。 -ただしこのメソッドはメモリを多く使用するため、 -巨大なデータセットを処理する場合には使用すべきではありません。 - -## CSV の拡張機能を使用する - -ここでは `FSharp.Data.CsvExtensions` 名前空間をオープンすることで -使用できるようになる拡張機能について説明します。 -この名前空間をオープンすると以下のような記述ができるようになります: - - * `row?column` という動的演算子を使うと `column` 列の値を取得できます。 - あるいは `row.[column]` というインデクサ形式でも取得できます。 - * `value.AsBoolean()` は値が `true` または `false` であれば - それをブール値として返します。 - * `value.AsInteger()` は値が数値型であり、整数として変換可能であれば - それを整数値として返します。 - 同じように `value.AsInteger64()` 、 `value.AsDecimal()` 、 - `value.AsFloat()` といったメソッドもあります。 - * `value.AsDateTime()` は [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) - 形式か、あるいは1970/1/1からのミリ秒を含んだ `\/Date(...)\/` JSON 形式の値を - `DateTime` として返します。 - * `value.AsGuid()` は値を `Guid` として返します。 - -数値あるいは日付の値をパースする必要があるメソッドには -省略可能なパラメータとしてカルチャを指定できます。 - -以下の例では先ほどのCSVをサンプルにして -これらの拡張メソッドを呼び出しています: -*) - -open FSharp.Data.CsvExtensions - -for row in msft.Rows do - printfn "HLOC: (%f, %M, %O)" (row.["High"].AsFloat()) (row?Low.AsDecimal()) (row?Date.AsDateTime()) - -(** - -## CSVファイルを変形する - -`CsvFiles` は読み取りだけではなく、CSVファイルの変形もサポートしています。 -`Filter` `Take` `TakeWhile` `Skip` `SkipWhile` `Truncate` といった操作が可能です。 -変形後は `Save` メソッドのオーバーロードのいずれかを使って結果を保存できます。 -保存時には別の区切り文字やクォート文字を指定できます。 -*) - -// 終値が始値よりも高いもののうち、上位10位の株価をTSV(タブ区切り)形式で保存します: -msft.Filter(fun row -> row?Close.AsFloat() > row?Open.AsFloat()) - .Truncate(10) - .SaveToString('\t') - -(** - -## 関連する記事 - - * [CSV 型プロバイダー](CsvProvider.html) - - 型セーフな方法でCSVデータにアクセスできるような - F# 型プロバイダーについて説明しています。 - * [API リファレンス: CsvFile クラス](../../reference/fsharp-data-csvfile.html) - * [API リファレンス: CsvRow クラス](../../reference/fsharp-data-csvrow.html) - * [API リファレンス: CsvExtensions モジュール](../../reference/fsharp-data-csvextensions.html) -*) diff --git a/docs/ja/library/CsvProvider.fsx b/docs/ja/library/CsvProvider.fsx deleted file mode 100644 index 4af53686e..000000000 --- a/docs/ja/library/CsvProvider.fsx +++ /dev/null @@ -1,389 +0,0 @@ -(*** condition: prepare ***) -#r "../../../src/FSharp.Data/bin/Release/netstandard2.0/FSharp.Data.dll" -(*** condition: fsx ***) -#if FSX -#r "nuget: FSharp.Data,{{fsdocs-package-version}}" -#endif // FSX -(*** condition: ipynb ***) -#if IPYNB -#r "nuget: FSharp.Data,{{fsdocs-package-version}}" - -Formatter.SetPreferredMimeTypesFor(typeof, "text/plain") -Formatter.Register(fun (x:obj) (writer: TextWriter) -> fprintfn writer "%120A" x ) -#endif // IPYNB -(** -# CSV 型プロバイダー - -この記事ではCSV 型プロバイダーを使って -静的に型付けされた方法でCSVファイルを扱う方法を紹介します。 - -CSV 型プロバイダーは入力としてサンプルとなるCSVを受け取り、 -このサンプル内の列データを元にした型を生成します。 -列の名前は1行目(ヘッダ行)が元になり、各列の型は2行目以降にあるデータから -推測されます。 - -## プロバイダーの基本 - -この型プロバイダーは `FSharp.Data.Dll` アセンブリに含まれています。 -このアセンブリが `../../../../bin` にあるとすると、 -F# Interactiveでアセンブリを読み込むには以下のようにします: -*) - -open FSharp.Data - -(** - -### 株価をパースする - -Yahoo FinanceのWebサイトでは以下のような構造のCSV形式で -日単位の株価が公開されています -(より大きな例としては [`data/MSFT.csv`](../../data/MSFT.csv) ファイルを -参照してください): - - [lang=text] - Date,Open,High,Low,Close,Volume,Adj Close - 2012-01-27,29.45,29.53,29.17,29.23,44187700,29.23 - 2012-01-26,29.61,29.70,29.40,29.50,49102800,29.50 - 2012-01-25,29.07,29.65,29.07,29.56,59231700,29.56 - 2012-01-24,29.47,29.57,29.18,29.34,51703300,29.34 - -一般的なCSVファイルと同じく、1行目にはヘッダ(各列の名前)があり、 -2行目以降にデータがあります。 -このファイルを `CsvProvider` に指定すると、 -静的に型付けされた方法でファイルの内容を参照できるようになります: -*) - -type Stocks = CsvProvider<"../../data/MSFT.csv", ResolutionFolder=__SOURCE_DIRECTORY__> - -(** -生成された型にはデータをロードするための2つのstaticメソッドがあります。 -データが文字列の場合には `Parse` メソッドを使用します。 -データがファイルやWeb上のリソースの場合には `Load` メソッドを使用します -(非同期バージョンの `AsyncLoad` メソッドもあります)。 -型プロバイダーに指定するサンプル用の引数には -ローカルのパスだけではなく、Web上のURLを指定することもできます。 -以下の例ではYahoo FinanceのWebサイトで実際に公開されているCSVファイルの -URLを使って `Load` メソッドを呼び出しています: -*) - -// 株価データをダウンロード -let msft = Stocks.Load(__SOURCE_DIRECTORY__ + "/../../data/MSFT.csv") - -// 最新の行をチェックする。なお 'Date' プロパティは -// 'DateTime' 型で、 'Open' プロパティは 'decimal' 型であることに注意 -let firstRow = msft.Rows |> Seq.head -let lastDate = firstRow.Date -let lastOpen = firstRow.Open - -// 株価を四本値形式で表示 -for row in msft.Rows do - printfn "HLOC: (%A, %A, %A, %A)" row.High row.Low row.Open row.Close - -(** - -> 訳注:四本値とは高値、安値、始値、終値の4種の値段のこと - -生成された型にはCSVファイルのデータを行コレクションとして返す -`Rows` プロパティがあります。 -ここでは `for` ループを使って各行を走査しています。 -見て分かるように、行のための(生成された)型には `High` や `Low` 、 -`Close` など、CSVファイルの各列に対応するプロパティがあります。 - -また、型プロバイダーが各列の型を推測していることも確認できます。 -`Date` プロパティは(サンプルファイル中のデータが日付としてパースできるため) -`DateTime` 型として推測されていますが、一方で四本値はそれぞれ -`decimal` として推測されています。 - -*) - -(** -## 測定単位を使用する - -もう1つ興味深い機能として、CSV 型プロバイダーは測定単位をサポートしています。 -標準SI単位の名前あるいは記号がヘッダに含まれている場合、 -生成された型では特定の単位が付加された値が返されるようになります。 - -このセクションでは以下のような単純なデータが含まれた -[`data/SmallTest.csv`](../../data/SmallTest.csv) を使います: - - [lang=text] - Name, Distance (metre), Time (s) - First, 50.0, 3.7 - -見ての通り、2列目と3列目にはそれぞれ `metre` と `s` という単位があります。 -コード側で測定単位を使う場合、 -標準単位名を含んだ名前空間をオープンする必要があります。 -その後、型プロバイダーのstatic引数に `SmallTest.csv` を指定します。 -なお今回は同じデータを実行時にも使用するため、 -同じ引数を再度指定して `Load` を呼び出すのではなく、 -`GetSample` メソッドを使っていることに注意してください。 -*) - -let small = CsvProvider<"../../data/SmallTest.csv", ResolutionFolder=__SOURCE_DIRECTORY__>.GetSample() - -(** -先ほどの例と同じく、行データは値 `small` の `Rows` プロパティで取得できます。 -今回は生成されたプロパティ `Distance` と `Time` に単位が付加されています。 -以下の単純な計算をみてください: -*) - -open FSharp.Data.UnitSystems.SI.UnitNames - -for row in small.Rows do - let speed = row.Distance / row.Time - if speed > 15.0M then - printfn "%s (%A m/s)" row.Name speed - -(** -`Distance` と `Time` の数値的な値はいずれも(かなり小さな値なので) -`decimal` として推測されています。 -したがって `speed` の型は `decimal` になります。 -そうするとコンパイラは互換性のない値を比較していないかどうか、 -つまりたとえばメートル毎秒とキロメートル毎時を比較していたりはしないか -チェックするようになります。 - -## 独自の区切り文字とタブ区切りファイル - -CSV 型プロバイダーはデフォルトではカンマ( `,` )を区切り文字とします。 -しかし場合によっては `,` ではない区切り文字が -CSVファイルで使われていることがあります。 -ヨーロッパの一部の国では `,` が10進数の区切り文字として使われているため、 -CSVの列区切り文字には代わりにセミコロン( `;` )が使われます。 -`CsvProvider` は省略可能なstatic引数 `Separator` に -代わりとなる区切り文字を指定できます。 -つまりこれを使えばタブ区切り形式のテキストも処理できるわけです。 -以下では区切り文字として `;` を使っています: -*) - -let airQuality = CsvProvider<"../../data/AirQuality.csv", ";", ResolutionFolder=__SOURCE_DIRECTORY__>.GetSample() - -for row in airQuality.Rows do - if row.Month > 6 then - printfn "Temp: %i Ozone: %f " row.Temp row.Ozone - -(** -空気質のデータセット([`data/AirQuality.csv`](../../data/AirQuality.csv))は -統計解析向け言語 R の多くのサンプルで使われているものです。 -このデータセットの簡単な説明については -[R の言語マニュアル](http://stat.ethz.ch/R-manual/R-devel/library/datasets/html/airquality.html) -を参照してください。 - -`\t` を区切り文字とするようなタブ区切りファイルを処理する場合には -やはり区切り文字を明示的に指定してもよいでしょう。 -ですが、URLまたはファイルの末尾にある拡張子が `.tsv` になっていると -型プロバイダーはデフォルトで `\t` を区切り文字とするようになります。 -以下の例ではstatic引数 `IgnoreErrors` を `true` にして、 -要素数が異なる行を自動的に無視するようにもしています -(サンプルファイル [`data/MortalityNY.csv`](../../data/MortalityNY.tsv) には -末尾に構造化されていないデータが追加されています): -*) - -let mortalityNy = CsvProvider<"../../data/MortalityNY.tsv", IgnoreErrors=true, ResolutionFolder=__SOURCE_DIRECTORY__>.GetSample() - -// 原因名をコードで検索 -// (事故で負傷した自転車走者) -let cause = mortalityNy.Rows |> Seq.find (fun r -> - r.``Cause of death Code`` = "V13.4") - -// 負傷した走者数を出力 -printfn "原因: %s" cause.``Cause of death`` -for r in mortalityNy.Rows do - if r.``Cause of death Code`` = "V13.4" then - printfn "%s (%d 件)" r.County r.Count - -(** - -最後に、 `CsvProvider` には複数種類の区切り文字を指定することもできます。 -これはたとえばファイルが不正で、セミコロンかコロンのどちらかで -行が区切られているような場合に有効です。 -具体的には -`CsvProvider<"../../data/AirQuality.csv", Separator=";,", ResolutionFolder=__SOURCE_DIRECTORY__>` -というようにします。 - -## 値無し - -統計的データセットでは一部の値が無しになっているということがよくあります。 -[`data/AirQuality.csv`](../../data/AirQuality.csv) ファイルを開くと、 -一部のオゾンの観測値が `#N/A` と記録されていることが確認できます。 -このような値はfloatとしてパースされ、F#であれば `Double.NaN` という値とみなされます。 -デフォルトでは `#N/A` `NA` `:` が値無しを表す値と認識されますが、 -`CsvProvider` のstatic引数 `MissingValues` を指定して -カスタマイズすることもできます。 - -以下のコードでは `Double.NaN` になっている値を除いて、 -オゾンの観測値の平均を計算しています。 -まず各行の `Ozone` プロパティを取得して値無しを除去した後、 -標準の `Seq.average` 関数を使って平均を計算しています: -*) - -let mean = - airQuality.Rows - |> Seq.map (fun row -> row.Ozone) - |> Seq.filter (fun elem -> not (System.Double.IsNaN elem)) - |> Seq.average - -(** - -サンプルとして指定するデータにはどの列にも値無しのデータが含まれていないものの、 -実行時にはどこかで値無しが現れる可能性があるという場合には -`AssumeMissingValues` を `true` に設定すれば、 -`CsvProvider` がどこかの列には値無しが現れるだろうと想定するようになります。 - -## 列の型を制御する - -デフォルトではCSV 型プロバイダーは最初の1000行を使って型を推測します。 -しかし `CsvProvider` のstatic引数 `InferRows` を使うと -この動作をカスタマイズできます。 -0を指定するとファイル全体が使われるようになります。 - -`0` `1` `Yes` `No` `True` `False` しか含まない列は `bool` になります。 -数値を含む列はそれぞれ精度に応じて `int` `int64` `decimal` `float` の -いずれかになります。 - -いずれかの行で値無しになっている場合、CSV 型プロバイダーは -その行を(`int` および `int64` に対しては)null許容型、 -あるいは(`bool` `DateTime` `Guid` に対しては)オプション型とみなします。 -`decimal` と推測できる列に値無しが含まれる場合、代わりに `float` とみなされ、 -値無しが `Double.NaN` として表現されます。 -`string` 型はそれ自体が既にnullを許容するため、 -デフォルトでは `string option` と推測されることはありません。 -すべての場合においてオプション型になるようにしたい場合には、 -static引数 `PreferOptionals` を `true` にします。 -この設定を行うと、空の文字列や `Double.NaN` ではなく、 -代わりに `None` が返されるようになります。 - -他にもたとえば `decimal` ではなく `float` として行を扱いたいというような、 -別の設定を使いたい場合には、ヘッダ行で列の型を丸括弧で囲んで記述することで -デフォルトの動作を上書きできます。 -これは測定単位を指定する方法と同じです。 -ヘッダ行による指定方法は `AssumeMissingValues` や `PreferOptionals` の動作を上書きします。 -指定可能な型は以下の通りです: - -* `int` -* `int?` -* `int option` -* `int64` -* `int64?` -* `int64 option` -* `bool` -* `bool?` -* `bool option` -* `float` -* `float?` -* `float option` -* `decimal` -* `decimal?` -* `decimal option` -* `date` -* `date?` -* `date option` -* `guid` -* `guid?` -* `guid option` -* `string` -* `string option`. - -型と測定単位の両方を( `float` のようにして)指定することもできます。 -たとえば以下の通りです: - - [lang=text] - Name, Distance (decimal?), Time (float) - First, 50, 3 - -さらに、 `CsvProvider` のstatic引数 `Schema` で一部またはすべての型を -指定することもできます。 -指定可能な形式は以下の通りです: - -* `型` -* `型<測定単位>` -* `名前 (型)` -* `名前 (型<測定単位>)` - -`Schema` 引数で指定された値はヘッダ行で指定されたものよりも常に優先されます。 - -ファイルの1行目がヘッダ行ではない場合、static引数 `HasHeaders` を `false` に -すると1行目もデータ行とみなされるようになります。 -この場合、それぞれの行は `Schema` 引数で指定されていなければ -`Column1` `Column2` という名前になります。 -なお `Schema` 引数で名前だけを上書きしつつ、 -型プロバイダーに列の型を推測させることもできます。 -たとえば以下のようにします: -*) - -let csv = CsvProvider<"1,2,3", HasHeaders = false, Schema = "Duration (float),foo,float option">.GetSample() -for row in csv.Rows do - printfn "%f %d %f" (row.Duration/1.0) row.Foo (defaultArg row.Column3 1.0) - -(** - -必ずしもすべての列を上書きしなければいけないわけではなく、 -一部をデフォルトのままにしておくこともできます。 -たとえばKaggleから取得したタイタニックの乗船者データ -([`data/Titanic.csv`](../../data/Titanic.csv)) -を対象にしている時に、3列目( `PClass` 列)を `Passenger Class` 、 -6列目( `Fare` 列)を `decimal` ではなく `float` にしたい場合、 -これらだけを定義しておいて、その他の行が空になっているようなスキーマを -指定します(末尾で連続するカンマは省略できます)。 - -*) - -let titanic1 = CsvProvider<"../../data/Titanic.csv", Schema=",,Passenger Class,,,float", ResolutionFolder=__SOURCE_DIRECTORY__>.GetSample() -for row in titanic1.Rows do - printfn "%s Class = %d Fare = %g" row.Name row.``Passenger Class`` row.Fare - -(** - -あるいは位置で指定する代わりに列の名前を使って上書きすることもできます: - -*) - -let titanic2 = CsvProvider<"../../data/Titanic.csv", Schema="Fare=float,PClass->Passenger Class", ResolutionFolder=__SOURCE_DIRECTORY__>.GetSample() -for row in titanic2.Rows do - printfn "%s Class = %d Fare = %g" row.Name row.``Passenger Class`` row.Fare - -(** - -これら2つのシンタックスを組み合わせて -`Schema="int64,DidSurvive,PClass->Passenger Class=string"` -とすることもできます。 - -## CSVファイルの変形 - -`CsvProvider` はファイルの読み取りだけでなく、データの変形もサポートしています。 -`Filter` `Take` `TakeWhile` `Skip` `SkipWhile` `Truncate` という操作が可能です。 -これらはいずれもスキーマを維持するようになっているため、 -変形後は `Save` メソッドのいずれかのオーバーロードを使って結果を保存できます。 -結果をCSV形式で保存したくない場合、あるいはデータの形式を変更したい場合には、 -`Rows` プロパティで取得できる行のシーケンスに対して直接 -`Seq` モジュールの機能を使うこともできます。 - -*) - -// 値無しのデータを含まない先頭10行を新しいCSVファイルに保存する -airQuality.Filter(fun row -> not (System.Double.IsNaN row.Ozone) && - not (System.Double.IsNaN row.``Solar.R``)) - .Truncate(10) - .SaveToString() - -(** - -## ビッグデータの処理 - -デフォルトでは行がキャッシュされるため、 `Rows` プロパティを複数回走査しても -特に問題はありません。 -しかし1回しか走査しないのであれば、 `CsvProvider` のstatic引数 -`CacheRows` を `false` にすればキャッシュを無効化できます。 -行数が非常に多い場合、キャッシュを無効化しなければ -メモリを消費し尽くしてしまうことになるでしょう。 -`Cache` メソッドを使えば任意のタイミングでデータをキャッシュできますが、 -データセットを小さなサイズに変形した後に限定すべきです: -*) - -(** -## 関連する記事 - - * [CSV パーサーおよびリーダー](CsvFile.html) - - CSVドキュメントを動的に処理するための詳しい説明があります。 - * [API リファレンス: CsvProvider 型プロバイダー](../../reference/fsharp-data-csvprovider.html) - -*) diff --git a/docs/ja/library/Http.fsx b/docs/ja/library/Http.fsx deleted file mode 100644 index 3a51d09a8..000000000 --- a/docs/ja/library/Http.fsx +++ /dev/null @@ -1,290 +0,0 @@ -(*** condition: prepare ***) -#r "../../../src/FSharp.Data/bin/Release/netstandard2.0/FSharp.Data.dll" -(*** condition: fsx ***) -#if FSX -#r "nuget: FSharp.Data,{{fsdocs-package-version}}" -#endif // FSX -(*** condition: ipynb ***) -#if IPYNB -#r "nuget: FSharp.Data,{{fsdocs-package-version}}" - -Formatter.SetPreferredMimeTypesFor(typeof, "text/plain") -Formatter.Register(fun (x:obj) (writer: TextWriter) -> fprintfn writer "%120A" x ) -#endif // IPYNB -(** -# HTTP ユーティリティ - -.NETライブラリにはHTTP Webリクエストを作成して送信するための -強力なAPIが用意されています。 -具体的には単純な `WebClient` 型([MSDN][1] を参照)や、 -より柔軟な機能を持った `HttpWebRequest` ([MSDN][2] を参照)があります。 -しかしこれらはいずれも、HTTP POSTデータや追加のヘッダなど、 -特定の引数を指定した単純なHTTPリクエストを手軽に実行することには向いていません。 - -F# Dataライブラリにはオーバーロードを持った4つのメソッドを含む、 -単純な `Http` 型があります。 -`RequestString` と `AsyncRequestString` メソッドは単純なリクエストを作成して、 -同期的あるいは非同期的にリクエストを送信できます。 -また `Request` とその非同期バージョン `AsyncRequest` を使うと -バイナリファイルを送信したり、ステータスコードや応答URL、 -受信ヘッダやクッキーなど、レスポンスの詳細情報を知ることができます。 - - [1]: http://msdn.microsoft.com/en-us/library/system.net.webclient.aspx - [2]: http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx - -この型を使うには、まず(F# Interactiveの場合は) `#r` あるいはプロジェクトで -参照の追加を行ってライブラリを参照する必要があります。 -この型は `FSharp.Data` 名前空間にあります: -*) - -open FSharp.Data - -(** -## 単純なリクエストの送信 - -特定のWebページをダウンロードするような単純なHTTP (GET) リクエストを送信するには、 -`Http.RequestString` あるいは `Http.AsyncRequestString` にたった1つの引数を -指定するだけです: -*) - -// Webサイトのコンテンツをダウンロード -Http.RequestString("http://tomasp.net") - -// Webサイトから非同期的にダウンロード -async { let! html = Http.AsyncRequestString("http://tomasp.net") - printfn "%d" html.Length } -|> Async.Start - -(** -`AsyncRequestString` は `RequestString` と全く同じ方法で使うことができるため、 -以降では `RequestString` だけを使います。 - -## クエリ引数とヘッダ - -クエリ引数は引数を含んだURLを用意するか、 -`query` という省略可能な引数を使って指定できます。 -以下では明示的にGETメソッドであることを指定していますが、 -省略した場合には自動的にGETになります: -*) - -Http.RequestString("http://httpbin.org/get", query=["test", "foo"], httpMethod="Get") - -(** -同じように、省略可能な引数 `headers` を使うと追加のヘッダを指定できます。 -このコレクションには独自のヘッダを追加できますが、 -Acceptヘッダのような標準的なヘッダも含まれています -( `HttpWebRequest` の場合には特定のプロパティに設定する必要があります)。 - -以下では [The Movie Database](http://www.themoviedb.org) APIを使って -「batman」という単語を検索しています。 -サンプルを実行するためには登録をしてAPIキーを取得する必要があります: -*) - -(*** do-not-eval ***) - -// http://www.themoviedb.org 用のAPIキー -let apiKey = "<登録してキーを取得してください>" - -// HTTP Webリクエストを実行 -Http.RequestString - ( "http://api.themoviedb.org/3/search/movie", httpMethod = "GET", - query = [ "api_key", apiKey; "query", "batman" ], - headers = [ "Accept", "application/json" ]) - -(** -このライブラリでは(先の例のように)単純かつチェックのない文字列ベースのAPIがサポートされていますが、 -スペルミスを防ぐことができるよう、あらかじめ定義されたヘッダ名を使うこともできます。 -名前付きヘッダは `HttpRequestHeaders` (および `HttpResponseHeaders`) モジュールで定義されているため、 -`HttpRequestHeaders.Accept` のようにフルネームを指定するか、 -以下の例のようにモジュールをオープンしておいてから `Accept` のような短い名前で指定することになります。 -同様に、 `HttpContentTypes` 列挙体には既知のコンテンツタイプ名が定義されています: -*) - -open FSharp.Data.HttpRequestHeaders - -(*** do-not-eval ***) - -// HTTP Webリクエストを実行 -Http.RequestString - ( "http://api.themoviedb.org/3/search/movie", - query = [ "api_key", apiKey; "query", "batman" ], - headers = [ Accept HttpContentTypes.Json ]) - -(** -## 特別な情報の取得 - -先のコードスニペットでは、正しいAPIキーを指定しなかった場合には(401)認証エラーが返され、 -例外が発生することに注意してください。 -ただし `WebRequest` を直接使用した場合とは異なり、例外メッセージには返されたコンテンツの情報も含まれるため、 -サーバーが特別な情報を返すような場合であってもF# Interactiveで簡単にデバッグできます。 - -また `silentHttpErrors` 引数を設定することによって例外を無効化することもできます: -*) - -(*** define-output:request ***) - -Http.RequestString("http://api.themoviedb.org/3/search/movie", silentHttpErrors = true) - -(** この結果は以下のようになります: *) -(*** include-it:request ***) - -(** この場合にはHTTPステータスコードを確認すればよいため、実際にレスポンスとして返されたデータと -エラーメッセージとを混同することもないでしょう。 -ステータスコードやレスポンスヘッダー、返されたクッキー、レスポンスURL -(リダイレクトされた場合にはリクエストを投げたURLとは別の値が返されることがあります)など、 -レスポンスの詳細を確認したい場合には `RequestString` の代わりに `Request` メソッドを使用します: - -*) - -(*** do-not-eval ***) - -let response = Http.Request("http://api.themoviedb.org/3/search/movie", silentHttpErrors = true) - -// レスポンスの詳細を確認する -response.Headers -response.Cookies -response.ResponseUrl -response.StatusCode - -(** -## リクエストデータの送信 - -HTTP POSTデータを含んだPOSTリクエストを作成したい場合は、 -オプション引数 `body` に追加データを指定するだけです。 -この引数は3つのケースを持った判別共用体 `HttpRequestBody` 型です: - -* `TextRequest` はリクエストの本体で文字列を送信するために使用します -* `BinaryUpload` はリクエストにバイナリデータを含めて送信する場合に使用します -* `FormValues` は特定のフォームの値を名前と値のペアとして - 送信するために使用します - -bodyを指定した場合、引数 `httpMethod` には自動的に `Post` が設定されるようになるため、 -明示的に指定する必要はありません。 - -以下ではリクエストの詳細を返すサービス -[httpbin.org](http://httpbin.org) -を使っています: -*) - -Http.RequestString("http://httpbin.org/post", body = FormValues ["test", "foo"]) - -(** -デフォルトでは `Content-Type` ヘッダには `HttpRequestBody` に指定した値に応じて -`text/plain` `application/x-www-form-urlencoded` `application/octet-stream` -のいずれかが設定されます。 -ただしオプション引数 `headers` を使ってヘッダのリストに `content-type` を -追加することでこの動作を変更できます: -*) - -Http.RequestString - ( "http://httpbin.org/post", - headers = [ ContentType HttpContentTypes.Json ], - body = TextRequest """ {"test": 42} """) - -(** -## リクエスト間でクッキーを管理する - -リクエスト間でクッキーを管理したい場合には、 -引数 `cookieContainer` を指定します。 -以下では `HttpRequest` クラスに関するMSDNドキュメントをリクエストしています。 -そうするとF#ではなくC#のコードスニペットが表示されます: - -(NOTE: This is an old sample and typechecks, but does not execute) -*) - -(*** do-not-eval ***) - -// 特定のクラスに関するドキュメント用のURLを用意する -let msdnUrl className = - let root = "http://msdn.microsoft.com" - sprintf "%s/en-gb/library/%s.aspx" root className - -// ページを取得してF#コードを検索する -let docInCSharp = Http.RequestString(msdnUrl "system.web.httprequest") -docInCSharp.Contains "F#" - -(** - -別のMSDNのページに移動してF#のコード例をクリックしてから -`HttpRequest` クラスのドキュメントに戻ってくると、 -同じ `cookieContainer` を保持し続けている限りはF#のコードが -表示されるようになります: -*) - -(*** do-not-eval ***) -open System.Net -let cc = CookieContainer() - -// 言語を切り替えるためのリクエストを送信 -Http.RequestString - ( msdnUrl "system.datetime", - query = ["cs-save-lang", "1"; "cs-lang","fsharp"], - cookieContainer = cc) |> ignore - -// 再度ドキュメントをリクエストしてF#のコードを検索 -let docInFSharp = - Http.RequestString - ( msdnUrl "system.web.httprequest", - cookieContainer = cc ) -docInFSharp.Contains "F#" - -(** -## バイナリデータの送信 - - -`RequestString` メソッドでは常に `string` としてレスポンスが返されます。 -しかし `Request` メソッドの場合にはレスポンスの `content-type` ヘッダに応じて -`HttpResponseBody.Text` または `HttpResponseBody.Binary` が返されます: -*) - -let logoUrl = "https://raw.github.com/fsharp/FSharp.Data/master/misc/logo.png" -match Http.Request(logoUrl).Body with -| Text text -> - printfn "Got text content: %s" text -| Binary bytes -> - printfn "Got %d bytes of binary content" bytes.Length - -(** -## HTTPリクエストのカスタマイズ - -ライブラリに元々備えられていないような機能を使用したい場合には、 -`customizeHttpRequest` 引数を設定することになります。 -この引数には `HttpWebRequest` を変更するための関数を指定します。 - -たとえばリクエストにクライアント証明書を追加したいとします。 -そのためにはまず `System.Security.Cryptography` 以下の -`X509Certificates` 名前空間をオープンして、 -`X509ClientCertificate2` の値を用意し、 -この値をリクエストの `ClientCertificates` リストに追加します。 - -証明書が `myCertificate.pfx` に格納されているとすると、 -以下のようなコードになります: -*) - -(*** do-not-eval ***) - -open System.Security.Cryptography.X509Certificates - -// ローカルファイルから証明書を読み取り -let clientCert = - new X509Certificate2(".\myCertificate.pfx", "password") - -// 証明書付きでリクエストを送信 -Http.Request - ( "http://yourprotectedresouce.com/data", - customizeHttpRequest = fun req -> req.ClientCertificates.Add(clientCert) |> ignore; req) - -(** -## 関連する記事 - - * [API リファレンス: HTTP クラス](../../reference/fsharp-data-http.html) - * [API リファレンス: HttpMethod モジュール](../../reference/fsharp-data-httpmethod.html) - * [API リファレンス: HttpRequestHeaders モジュール](../../reference/fsharp-data-httprequestheaders.html) - * [API リファレンス: HttpResponseHeaders モジュール](../../reference/fsharp-data-httpresponseheaders.html) - * [API リファレンス: HttpContentTypes モジュール](../../reference/fsharp-data-httpcontenttypes.html) - * [API リファレンス: HttpRequestBody 判別共用体](../../reference/fsharp-data-httprequestbody.html) - * [API リファレンス: HttpResponse レコード](../../reference/fsharp-data-httpresponse.html) - * [API リファレンス: HttpResponseBody 判別共用体](../../reference/fsharp-data-httpresponsebody.html) - * [API リファレンス: HttpResponseWithStream レコード](../../reference/fsharp-data-httpresponsewithstream.html) - -*) diff --git a/docs/ja/library/JsonProvider.fsx b/docs/ja/library/JsonProvider.fsx deleted file mode 100644 index 049b217ee..000000000 --- a/docs/ja/library/JsonProvider.fsx +++ /dev/null @@ -1,328 +0,0 @@ -(*** condition: prepare ***) -#r "../../../src/FSharp.Data/bin/Release/netstandard2.0/FSharp.Data.dll" -(*** condition: fsx ***) -#if FSX -#r "nuget: FSharp.Data,{{fsdocs-package-version}}" -#endif // FSX -(*** condition: ipynb ***) -#if IPYNB -#r "nuget: FSharp.Data,{{fsdocs-package-version}}" - -Formatter.SetPreferredMimeTypesFor(typeof, "text/plain") -Formatter.Register(fun (x:obj) (writer: TextWriter) -> fprintfn writer "%120A" x ) -#endif // IPYNB -(** -# JSON 型プロバイダー - -このドキュメントではJSON 型プロバイダーを使って -静的に型付けされた方法でJSONファイルを扱う方法について説明します。 -まず型が推測される方法について説明した後、 -このプロバイダーを使って世界銀行やTwitterから受け取ったデータをパースするデモを -紹介します。 - -JSON 型プロバイダーにはJSONドキュメントを静的に型付けされた方法で -アクセスするための機能があります。 -このプロバイダーはサンプルとなるドキュメント -(あるいは複数のサンプルをJSON配列として含むようなドキュメント)を -入力として受け取ります -生成された型を使うと、同じ構造のファイルを読み取ることができます。 -読み取ったファイルがサンプルとは異なる構造になっている場合には -実行時エラーが発生します(ただし存在しない要素などにアクセスした場合に限ります)。 - -## プロバイダーの基本 - -型プロバイダーは `FSharp.Data.dll` アセンブリ内にあります。 -このアセンブリが `../../../../bin` ディレクトリにあるとすると、 -以下のようにするとF# Interactive上でアセンブリをロードできます: -*) - -open FSharp.Data - -(** -### サンプルからの型の推測 - -`JsonProvider<...>` は `string` 型のstatic引数を1つとります。 -この引数にはサンプルとなる文字列あるいはファイル -(カレントディレクトリからの相対パスか、 `http` `https` で -アクセスできるオンライン上のファイル)の **どちらか一方** を指定します。 -この引数の値があいまいになることはほとんどありえないでしょう。 - -以下のコードでは小さなJSON文字列をプロバイダーに渡しています: -*) - -type Simple = JsonProvider<""" { "name":"John", "age":94 } """> -let simple = Simple.Parse(""" { "name":"Tomas", "age":4 } """) -simple.Age -simple.Name - -(** -生成された型には `Age` という `int` 型のプロパティと、 -`Name` という `string` 型のプロパティがあることがわかります。 -つまり型プロバイダーがサンプルから適切な型を推測して、 -それらを(標準の命名規則に従ってパスカル記法の名前の)プロパティとして -公開しているというわけです。 - -### 数値型に対する推測 - -先ほどの例では、サンプルファイルには単なる整数が含まれていたので、 -プロバイダーも `int` 型と推測しました。 -しかし場合によってはサンプルのドキュメント(あるいはサンプルのリスト)にある型とは -厳密に一致しないことがあります。 -たとえば以下のように integer と float が混ざったリストがあるとします: -*) - -type Numbers = JsonProvider<""" [1, 2, 3, 3.14] """> -let nums = Numbers.Parse(""" [1.2, 45.1, 98.2, 5] """) -let total = nums |> Seq.sum - -(** -サンプルがコレクションの場合、型プロバイダーはサンプル内のすべての値を -格納できるような型を生成します。 -今回の場合は一部の値が integer ではないため、最終的に `decimal` 型になります。 -型プロバイダーで一般的にサポートされている型は -`int` `int64` `decimal` `float` です -(また、この順序で推測されます)。 - -その他のプリミティブ型の組み合わせになっている場合には型を1つに限定できません。 -たとえばリストに数値と文字列があるような場合です。 -この場合、プロバイダーはいずれか一方の型に一致するような値を取得できるように -2種類のメソッドを生成します: -*) - -type Mixed = JsonProvider<""" [1, 2, "hello", "world"] """> -let mixed = Mixed.Parse(""" [4, 5, "hello", "world" ] """) - -mixed.Numbers |> Seq.sum -mixed.Strings |> String.concat ", " - -(** -このように、 `Mixed` 型には `Numbers` と `Strings` という、 -それぞれコレクション内の `int` か `string` の値しか返さないメソッドが -定義されていることがわかります。 -つまり型セーフな状態でアクセスできるものの、 -元の順序通りには値を取得することはできません -(値の順序が重要であれば、 `mixed.JsonValue` プロパティで `JsonValue` を取得した後、 -[`JsonValue` のドキュメント](JsonValue.html) で説明している方法で -処理するとよいでしょう)。 - -### レコード型の推測 - -次はレコード型を含むJSONドキュメントをサンプルにしてみましょう。 -以下では2つのレコードを使っています。 -1つには `name` と `age` 、もう1つには `name` だけがあります。 -もしもプロパティが値無しになる場合、型プロバイダーはオプション型として推測します。 - -また、スキーマと同じテキストを実行時にも使いたい場合には -`GetSamples` メソッドを使います: -*) - -type People = JsonProvider<""" [{ "name":"John", "age":94 }, { "name":"Tomas" }] """> - -for item in People.GetSamples() do - printf "%s " item.Name - item.Age |> Option.iter (printf "(%d)") - printfn "" - -(** -`items` 用に推測された型は(無名の)JSONエンティティのコレクションで、 -それぞれには `Name` と `Age` というプロパティがあります。 -`Age` はサンプルデータ内のすべてのレコードで使われているわけでは無いため、 -`option` 型と推測されています。 -また、上のコードでは値が利用できる場合に限って表示できるように -`Option.iter` を使っています。 - -前回の例では各プロパティの値の型は共通していました。 -`Name` プロパティは `string` で、 `Age` プロパティは数値でした。 -しかしレコードのプロパティに複数の異なる型が使われていた場合にはどうなるでしょう? -この場合、型プロバイダーは以下のように動作します: -*) - -type Values = JsonProvider<""" [{"value":94 }, {"value":"Tomas" }] """> - -for item in Values.GetSamples() do - match item.Value.Number, item.Value.String with - | Some num, _ -> printfn "数値: %d" num - | _, Some str -> printfn "テキスト: %s" str - | _ -> printfn "何かその他の値です!" - -(** -このように、 `Value` プロパティは数値か文字列になります。 -型プロバイダーは取り得る型それぞれをオプション型のプロパティとして定義します。 -そのため、 `option` と `option` の値に対する -単純なパターンマッチを使ってそれぞれの値を取得できます。 -この方法は多種多様なデータを含む配列を処理する方法に似ています。 - -ここではサンプルがJSONのリストになっているために `GetSamples` を使っている -という点に注意してください。 -もしもサンプルがJSONオブジェクトの場合には `GetSample` を使います。 - -## 世界銀行のデータの読み取り - -では型プロバイダーを使って実際のデータを処理してみましょう。 -[世界銀行](http://data.worldbank.org) (World Bank)から -受信したデータセットを使います。 -このデータは以下のような構造になっています: - - [lang=js] - [ { "page": 1, "pages": 1, "total": 53 }, - [ { "indicator": {"value": "Central government debt, total (% of GDP)"}, - "country": {"id":"CZ","value":"Czech Republic"}, - "value":null,"decimal":"1","date":"2000"}, - { "indicator": {"value": "Central government debt, total (% of GDP)"}, - "country": {"id":"CZ","value":"Czech Republic"}, - "value":"16.6567773464055","decimal":"1","date":"2010"} ] ] - -2つの要素を含んだ1つの配列がレスポンスとして返されます。 -1つめの要素にはレスポンスに関する一般的な情報(ページ数、総ページ数など)があり、 -2つめの要素には実際のデータ点を表すような別の配列があります。 -それぞれのデータ点について何らかの情報や実際の `value` (値)を取得できます。 -なお `value` は(何らかの理由により)文字列として返されていることに注意してください。 -引用符で囲われているため、型プロバイダーはこの型を `string` と推測します -(そして手動で変換する必要があります)。 - -以下では [`data/WorldBank.json`](../../data/WorldBank.json) をサンプルファイルにして -型を生成した後、同じファイルを読み込んでいます: -*) - -type WorldBank = JsonProvider<"../../data/WorldBank.json", ResolutionFolder=__SOURCE_DIRECTORY__> -let doc = WorldBank.GetSample() - -(** -型プロバイダーのサンプル用の引数と、 `Load` メソッドの引数にはいずれも -Web上のURLを指定して直接データを読み取ることができることに注意してください。 -また、非同期バージョンの `AsyncLoad` メソッドもあります: -*) - -let docAsync = WorldBank.AsyncLoad("http://api.worldbank.org/country/cz/indicator/GC.DOD.TOTL.GD.ZS?format=json") - -(** -`doc` は多種多様な型を含んだ配列なので、 -それぞれレコードや配列を取得できるようなプロパティを持った型が生成されます。 -なお型プロバイダーは1つのレコードと1つの配列だけが含まれているものとして -型を推測していることに注意してください(以前の例では -複数の数値と複数の文字列が配列中にありました)。 -この場合はメソッドは生成されず、 -単に `Record` や `Array` というプロパティが生成されます。 -したがって以下のようにすればデータセットを表示できます: -*) - -// 一般的な情報を表示 -let info = doc.Record -printfn "%d ページ中 %d ページ目を表示中。総レコード数 %d" - info.Pages info.Page info.Total - -// すべてのデータ点を表示 -for record in doc.Array do - record.Value |> Option.iter (fun value -> - printfn "%d: %f" record.Date value) - -(** -データ点を表示する場合、一部で値無しになっていることがあります -(入力データでは適切な値の代わりに `null` という値になっています)。 -ここでもまた多種多様な型になっています。 -つまり型は `Number` か、あるいは( `null` を表すような)別の型のどちらかです。 -したがって `record.Value` には(値が数値であれば) `Number` プロパティがあり、 -このプロパティを使えばデータ点が有効である場合に限り結果を表示できます。 - -## Twitterのストリームをパースする - -次の例として、 [Twitter API](http://dev.twitter.com/) から返される -ツイートをパースする例を紹介しましょう。 -ツイートには非常に多種多様なデータが含まれているため、 -単に文字列を1つ指定するのではなく、入力 **リスト** を使って -型を推測させることにします。 -そのため、 `SampleIsList=true` という、サンプルが **サンプルのリスト** -になっていることを明示するオプションを指定した状態で -[`data/TwitterStream.json`](../../data/TwitterStream.json) -ファイルを使います: - -*) - -type Tweet = JsonProvider<"../../data/TwitterStream.json", SampleIsList=true, ResolutionFolder=__SOURCE_DIRECTORY__> -let text = (*[omit:(omitted)]*)""" {"in_reply_to_status_id_str":null,"text":"\u5927\u91d1\u6255\u3063\u3066\u904a\u3070\u3057\u3066\u3082\u3089\u3046\u3002\u3082\u3046\u3053\u306e\u4e0a\u306a\u3044\u8d05\u6ca2\u3002\u3067\u3082\uff0c\u5b9f\u969b\u306b\u306f\u305d\u306e\u8d05\u6ca2\u306e\u672c\u8cea\u3092\u6e80\u55ab\u3067\u304d\u308b\u4eba\u306f\u9650\u3089\u308c\u3066\u308b\u3002\u305d\u3053\u306b\u76ee\u306b\u898b\u3048\u306a\u3044\u968e\u5c64\u304c\u3042\u308b\u3068\u304a\u3082\u3046\u3002","in_reply_to_user_id_str":null,"retweet_count":0,"geo":null,"source":"web","retweeted":false,"truncated":false,"id_str":"263290764686155776","entities":{"user_mentions":[],"hashtags":[],"urls":[]},"in_reply_to_user_id":null,"in_reply_to_status_id":null,"place":null,"coordinates":null,"in_reply_to_screen_name":null,"created_at":"Tue Oct 30 14:46:24 +0000 2012","user":{"notifications":null,"contributors_enabled":false,"time_zone":"Tokyo","profile_background_color":"FFFFFF","location":"Kodaira Tokyo Japan","profile_background_tile":false,"profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1172376796\/70768_100000537851636_3599485_q_normal.jpg","default_profile_image":false,"follow_request_sent":null,"profile_sidebar_fill_color":"17451B","description":"KS(Green62)\/WasedaUniv.(Schl Adv Sci\/Eng)\/SynBio\/ChronoBio\/iGEM2010-2012\/Travel\/Airplane\/ \u5bfa\u30fb\u5ead\u3081\u3050\u308a","favourites_count":17,"screen_name":"Merlin_wand","profile_sidebar_border_color":"000000","id_str":"94788486","verified":false,"lang":"ja","statuses_count":8641,"profile_use_background_image":true,"protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1172376796\/70768_100000537851636_3599485_q_normal.jpg","listed_count":31,"geo_enabled":true,"created_at":"Sat Dec 05 13:07:32 +0000 2009","profile_text_color":"000000","name":"Marin","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/612807391\/twitter_free1.br.jpg","friends_count":629,"url":null,"id":94788486,"is_translator":false,"default_profile":false,"following":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/612807391\/twitter_free1.br.jpg","utc_offset":32400,"profile_link_color":"ADADAD","followers_count":426},"id":263290764686155776,"contributors":null,"favorited":false} """(*[/omit]*) -let tweet = Tweet.Parse(text) - -printfn "%s (%d 回リツイートされました)\n:%s" - tweet.User.Value.Name tweet.RetweetCount.Value tweet.Text.Value - -(** -`Tweet` 型を作成した後に、サンプルのツイートを1つパースした後、 -ツイートに関する詳細を表示しています。 -実際に試してみるとわかりますが、 `tweet.User` プロパティは -オプション型として推測されているため -(つまり作者のいないツイートもあり得るということ?)、 -常に `Value` プロパティから値が取得できるとは限りません。 -同じように `RetweetCount` と `Text` プロパティも値無しになることがあるため、 -上のコードは安全ではないことに注意してください。 - -## GitHubのIssuesを取得および作成する - -この例ではJSONを作成するだけでなく、それを実際に使用する方法を紹介します。 -まず FSharp.Data リポジトリのオープンされているIssuesのうちで -直近の5つを取得してみましょう。 - -*) - -// GitHub.json downloaded from https://api.github.com/repos/fsharp/FSharp.Data/issues to prevent rate limit when generating these docs -type GitHub = JsonProvider<"../../data/GitHub.json", ResolutionFolder=__SOURCE_DIRECTORY__> - -let topRecentlyUpdatedIssues = - GitHub.GetSamples() - |> Seq.filter (fun issue -> issue.State = "open") - |> Seq.sortBy (fun issue -> System.DateTimeOffset.Now - issue.UpdatedAt) - |> Seq.truncate 5 - -for issue in topRecentlyUpdatedIssues do - printfn "#%d %s" issue.Number issue.Title - -(** - -次に新しいIssueを作成してみます。 -GitHubのドキュメント http://developer.github.com/v3/issues/#create-an-issue -を見てみると、以下のようなJSON値をポストすればいいことがわかります: - -*) - -[] -let issueSample = """ -{ - "title": "Found a bug", - "body": "I'm having a problem with this.", - "assignee": "octocat", - "milestone": 1, - "labels": [ - "Label1", - "Label2" - ] -} -""" - -(** - -このJSONデータは先ほどAPIを呼び出して取得した -Issueそれぞれに対応するものとは異なります。 -そのため、このサンプルデータを元にして新しい型を定義し、 -そのインスタンスを作成してリクエストをPOSTします: - -*) - -(*** do-not-eval ***) - -type GitHubIssue = JsonProvider - -let newIssue = GitHubIssue.Issue("Test issue", - "This is a test issue created in FSharp.Data documentation", - assignee = "", - labels = [| |], - milestone = 0) -newIssue.JsonValue.Request "https://api.github.com/repos/fsharp/FSharp.Data/issues" - -(** -## 関連する記事 - - * [JSON パーサーおよびリーダー](JsonValue.html) - - JSONの値を動的に処理する方法についての説明があります。 - * [API リファレンス: JsonProvider 型プロバイダー](../../reference/fsharp-data-jsonprovider.html) - * [API リファレンス: JsonValue 判別共用体](../../reference/fsharp-data-jsonvalue.html) - -*) diff --git a/docs/ja/library/JsonValue.fsx b/docs/ja/library/JsonValue.fsx deleted file mode 100644 index 2079f43ff..000000000 --- a/docs/ja/library/JsonValue.fsx +++ /dev/null @@ -1,182 +0,0 @@ -(*** condition: prepare ***) -#r "../../../src/FSharp.Data/bin/Release/netstandard2.0/FSharp.Data.dll" -(*** condition: fsx ***) -#if FSX -#r "nuget: FSharp.Data,{{fsdocs-package-version}}" -#endif // FSX -(*** condition: ipynb ***) -#if IPYNB -#r "nuget: FSharp.Data,{{fsdocs-package-version}}" - -Formatter.SetPreferredMimeTypesFor(typeof, "text/plain") -Formatter.Register(fun (x:obj) (writer: TextWriter) -> fprintfn writer "%120A" x ) -#endif // IPYNB -(** -# JSON パーサーおよびリーダー - -F#の [JSON 型プロバイダー](JsonProvider.html) はF#で作成された -効率の良いJSONパーサーを元にしています。 - -厳密に定義されたJSONドキュメントを処理する場合、 -[型プロバイダー](JsonProvider.html) を使うと簡単なのですが、 -動的に処理するようなシナリオであったり、 -単純なスクリプトを手軽に用意したいような場合には -パーサーを使ったほうが簡単でしょう。 - -## JSONドキュメントの読み取り - -サンプルとなるJSONドキュメントを読み取るには -(F# Interactiveの場合)`FSharp.Data.dll` ライブラリへの参照を追加するか、 -プロジェクトで参照を追加します。 -*) - -open FSharp.Data - -(** -`FSharp.Data` 名前空間にある `JsonValue` 型を使うと、 -以下のようにしてJSON形式の文字列をパースできます: -*) - -let info = - JsonValue.Parse(""" - { "name": "Tomas", "born": 1985, - "siblings": [ "Jan", "Alexander" ] } """) - -(** -`JsonValue` 型は `Record` や `Collection` などのケースを持った判別共用体なので -パターンマッチを使ってパース後の値の構造を調査することができます。 - -## JSON用拡張機能を使用する - -ここではすべての機能を紹介しません。 -その代わり、 `FSharp.Data.JsonExtensions` 名前空間をオープンすることで -利用できるようになるいくつかの拡張機能について説明します。 -この名前空間をオープンすると、以下のような記述ができるようになります: - - * `value.AsBoolean()` は値が `true` または `false` の場合にブール値を返します。 - * `value.AsInteger()` は値が数値型で、整数として変換可能であれば整数値を返します。 - 同様に `value.AsInteger64()` `value.AsDecimal()` `value.AsFloat()` - といったものもあります。 - * `value.AsString()` は値を文字列として返します。 - * `value.AsDateTime()` は値を [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) か、 - 1970/1/1からのミリ秒を含んだJSON形式の `\/Date(...)\/` でパースして - `DateTime` を返します。 - * `value.AsGuid()` は値を `Guid` としてパースします。 - * `value?child` は `child` という名前のレコードメンバーを - 取得するための動的演算子です。 - あるいは `value.GetProperty(child)` やインデクサ `value.[child]` - を使うこともできます。 - * `value.TryGetProperty(child)` はレコードメンバーを安全に取得できます - (もしメンバーが値無しあるいはレコードではなかった場合、 `TryGetProperty` は - `None` を返します)。 - * `[ for v in value -> v ]` とすると `value` をコレクションとして扱い、 - 含まれている要素を走査します。 - また、 `value.AsArray()` とすると、すべての要素を配列として取得できます。 - * `value.Properties()` はレコードノードの全プロパティのリストを返します。 - * `value.InnerText()` はすべてのテキストあるいは配列内のテキスト - (たとえば複数行文字列を表すデータ)を連結します - -数値または日付データとしてパースする( `AsFloat` や `AsDateTime` などの)メソッドには -省略可能な引数としてカルチャを指定出来ます。 - -以下のコードはサンプルで指定したJSONの値を処理する方法の一例です: -*) - -open FSharp.Data.JsonExtensions - -// 名前と誕生日を表示 -let n = info?name -printfn "%s (%d)" (info?name.AsString()) (info?born.AsInteger()) - -// 兄弟姉妹全員の名前を表示 -for sib in info?siblings do - printfn "%s" (sib.AsString()) - -(** -`JsonValue` 型は実際には `IEnumerable<'T>` インターフェイスを -実装しているわけではありません(つまり `Seq.xyz` 関数に渡す事はできません)。 -`GetEnumerator` だけが定義されているため、シーケンス式内や -`for` ループで使うことができるというわけです。 -*) - -(** -## WorldBankからのレスポンスをパースする - -もう少し複雑な例として、WorldBankへのリクエストに対する -レスポンスデータ [`data/WorldBank.json`](../../data/WorldBank.json) を -サンプルドキュメントにしてみます。 -(より便利な方法としては [型プロバイダー](WorldBank.html) を使って -WorldBankにアクセスすることもできます)。 -このドキュメントは以下のようになっています: - - [lang=js] - [ { "page": 1, "pages": 1, "total": 53 }, - [ { "indicator": {"value": "Central government debt, total (% of GDP)"}, - "country": {"id":"CZ","value":"Czech Republic"}, - "value":null,"decimal":"1","date":"2000"}, - { "indicator": {"value": "Central government debt, total (% of GDP)"}, - "country": {"id":"CZ","value":"Czech Republic"}, - "value":"16.6567773464055","decimal":"1","date":"2010"} ] ] - -このように、全体としては配列になっていて、 -1番目の要素にはレコード、2番目の要素にはデータ点のコレクションが -含まれた形式になっています。 -このドキュメントは以下のようにして読み取りおよびパースできます: -*) - -let value = JsonValue.Load(__SOURCE_DIRECTORY__ + "../../../data/WorldBank.json") - -(** -なおWeb上から直接データを読み取ることもできます。 -また、読み取りを非同期的に実行するバージョンもあります: -**) - -let valueAsync = JsonValue.AsyncLoad("http://api.worldbank.org/country/cz/indicator/GC.DOD.TOTL.GD.ZS?format=json") - -(** -最上位の配列を1番目の(概要を含んだ)レコードとデータ点のコレクションに分けるためには -`value` に対してパターンマッチを使って -`Jsonvalue.Array` のコンストラクタとマッチするかどうか調べます: -*) - -match value with -| JsonValue.Array [| info; data |] -> - // 概要を表示 - let page, pages, total = info?page, info?pages, info?total - printfn - "%d ページ中の %d ページ目を表示中。 全体のレコード数は %d" - (pages.AsInteger()) (page.AsInteger()) (total.AsInteger()) - - // 非nullのデータ点をそれぞれ表示 - for record in data do - if record?value <> JsonValue.Null then - printfn "%d: %f" (record?date.AsInteger()) - (record?value.AsFloat()) -| _ -> printfn "失敗しました" - -(** -データ点の `value` プロパティは常に使用できるわけではありません。 -直前で説明してある通り、この値は `null` になることがあります。 -その場合にはデータ点をスキップします。 -プロパティが `null` かどうか調べる場合は単に `JsonValue.Null` と -比較するだけです。 - -また `date` と `value` のプロパティは元のファイルでは( `1990` のような)数値ではなく、 -( `"1990"` のような)文字列形式になっている点に注意してください。 -この値を int または float として取得しようとすると、 -`JsonValue` は自動的に文字列を特定の形式になるようにパースします。 -一般的にはこのAPIがファイルをパースする場合、 -できるだけ寛容に値を受け入れるようになっています。 - -## 関連する記事 - - * [JSON 型プロバイダー](JsonProvider.html) - - 型安全な方法でJSONデータにアクセスする機能を持った - F# 型プロバイダーについて説明しています。 - * [WorldBank プロバイダー](WorldBank.html) - - WorldBank 型プロバイダーを使うとWorldBankから受け取ったデータを - 簡単に処理出来るようになります。 - * [API リファレンス: JsonValue 判別共用体](../../reference/fsharp-data-jsonvalue.html) - * [API リファレンス: JsonExtensions モジュール](../../reference/fsharp-data-jsonextensions.html) - -*) diff --git a/docs/ja/library/WorldBank.fsx b/docs/ja/library/WorldBank.fsx deleted file mode 100644 index f43290150..000000000 --- a/docs/ja/library/WorldBank.fsx +++ /dev/null @@ -1,133 +0,0 @@ -(*** condition: prepare ***) -#r "../../../src/FSharp.Data/bin/Release/netstandard2.0/FSharp.Data.dll" -(*** condition: fsx ***) -#if FSX -#r "nuget: FSharp.Data,{{fsdocs-package-version}}" -#endif // FSX -(*** condition: ipynb ***) -#if IPYNB -#r "nuget: FSharp.Data,{{fsdocs-package-version}}" - -Formatter.SetPreferredMimeTypesFor(typeof, "text/plain") -Formatter.Register(fun (x:obj) (writer: TextWriter) -> fprintfn writer "%120A" x ) -#endif // IPYNB -(** -# WorldBank プロバイダー - -[世界銀行](http://www.worldbank.org) (World Bank)は世界中の発展途上国に対して、 -経済的かつ技術的な支援を行っている国際組織です。 -また、世界銀行は活動の一環として世界中の各国における発展指標や -その他のデータを収集しています。 -[data catalog](http://data.worldbank.org/) のページではプログラムからも -アクセスできる8000以上の指標が公開されています。 - -WorldBank 型プロバイダーを使うと、F#プログラムやスクリプトから型安全かつ -簡単な方法でWorldBankのデータにアクセスできるようになります。 -このドキュメントはこの型プロバイダーの基本的な部分のみ説明しています。 - -## 型プロバイダーの基本 - -以下の例では(F# Interactive上で) `FSharp.Data.dll` ライブラリを読み込んだ後、 -`GetDataContext` メソッドを使ってWorldBankへの接続を初期化し、 -イギリスで大学に進学した人口の割合を受信しています; -*) - -open FSharp.Data - -let data = WorldBankData.GetDataContext() - -data - .Countries.``United Kingdom`` - .Indicators.``Gross capital formation (% of GDP)`` -|> Seq.maxBy fst - -(** -データコンテキストが生成されると、WorldBank 型プロバイダーは -世界銀行で把握されているすべての国のリスト、および -利用可能なすべての指針のリストを受信します。 -それぞれはプロパティとして参照できるようになっているため、 -自動コンプリートの候補から様々なデータソースが利用できることが確認できるでしょう。 -多くの指標には長い名前がつけられているため、 -名前を `\`\`` で囲む必要があります。 - -`Gross capital formation (% of GDP)` プロパティの結果は -異なる年毎の値のシーケンスです。 -`Seq.maxBy fst` とすることで直近で利用可能な最新のデータを取得できます。 - -### 世界銀行のデータをチャート表示する - - -*) - - -(** -## 世界銀行のデータを非同期的に使う - -非常に大量のデータをダウンロードする必要がある場合、 -あるいは呼び出し元をブロックせずに処理を実行した場合には、 -F#の非同期ワークフローを使って操作ができればいいなと思うのではないでしょうか。 -F# Dataライブラリには様々なstatic引数を受け取るような -`WorldBankDataProvider` 型があります。 -引数 `Asyncronous` を `true` にすると、 -すべての操作を非同期的に実行するような型が -型プロバイダーによって生成されます: -*) - -type WorldBank = WorldBankDataProvider<"World Development Indicators", Asynchronous=true> -WorldBank.GetDataContext() - -(** -上のコードではデータソース(一般的に利用可能な指標のコレクション)の名前として -"World Development Indicators" を指定して、オプション引数 `Asynchronous` に -`true` を設定しています。 -そうするとたとえば `Gross capital formation (% of GDP)` などのプロパティが -`Async<(int * int)[]>` になります。 -これはつまり非同期的に処理を始めることができ、最終的にデータを生成するような -操作であることを示しています。 - -### データを並列にダウンロードする - -非同期バージョンの型プロバイダーのデモとして、 -多数の国における大学進学率を並列にダウンロートしてみます。 -まずデータコンテキストを作成した後に、 -対象とする国を配列として定義します: -*) - -let wb = WorldBank.GetDataContext() - -// 対象とする国のリストを作成 -let countries = - [| wb.Countries.``Arab World`` - wb.Countries.``European Union`` - wb.Countries.Australia - wb.Countries.Brazil - wb.Countries.Canada - wb.Countries.Chile - wb.Countries.``Czech Republic`` - wb.Countries.Denmark - wb.Countries.France - wb.Countries.Greece - wb.Countries.``Low income`` - wb.Countries.``High income`` - wb.Countries.``United Kingdom`` - wb.Countries.``United States`` |] - -(** -データを並列にダウンロードするには、非同期計算のリストを作成した後、 -それらを `Async.Parallel` で組み合わせ、 -(1つになった)計算を実行してすべてのダウンロード処理を行います: -*) - -[ for c in countries -> - c.Indicators.``Gross capital formation (% of GDP)`` ] -|> Async.Parallel -|> Async.RunSynchronously - - - -(** -## 関連する記事 - - * [API リファレンス: WorldBankDataProvider 型プロバイダー](../../reference/fsharp-data-worldbankdataprovider.html) - -*) diff --git a/docs/ja/library/XmlProvider.fsx b/docs/ja/library/XmlProvider.fsx deleted file mode 100644 index eb0e1db27..000000000 --- a/docs/ja/library/XmlProvider.fsx +++ /dev/null @@ -1,276 +0,0 @@ -(*** condition: prepare ***) -#r "../../../src/FSharp.Data/bin/Release/netstandard2.0/FSharp.Data.dll" -(*** condition: fsx ***) -#if FSX -#r "nuget: FSharp.Data,{{fsdocs-package-version}}" -#endif // FSX -(*** condition: ipynb ***) -#if IPYNB -#r "nuget: FSharp.Data,{{fsdocs-package-version}}" - -Formatter.SetPreferredMimeTypesFor(typeof, "text/plain") -Formatter.Register(fun (x:obj) (writer: TextWriter) -> fprintfn writer "%120A" x ) -#endif // IPYNB -(** -# XML 型プロバイダー - -このドキュメントではXML型プロバイダーを使用して、静的に型付けされた -方法でXMLドキュメントにアクセスする方法について説明します。 -まず、XMLドキュメントの構造が推測される方法について説明した後に、 -XML型プロバイダーを使用してRSSフィードを解析するデモを紹介します。 - -ML型プロバイダーを使用すると、静的に型付けされた方法でXMLドキュメントに -アクセスできます。 -このプロバイダーはサンプルとなるドキュメントを入力として受け取ります -(あるいはサンプルとして使用されるような複数の子ノードを持った -ルートXMLノードを含むドキュメントを受け取ります)。 -そして生成された型を使用すると、サンプルドキュメントと同じ構造のファイルを -読み取ることができるようになります。 -ファイルの構造がサンプルと異なる場合には実行時エラーが発生します -(ただし存在しない要素にアクセスしようとした場合に限られます)。 - -## プロバイダーの基本 - -型プロバイダーは `FSharp.Data.dll` アセンブリ内にあります。 -このアセンブリが `../../../../bin` ディレクトリにあると仮定すると、 -F# Interactive内で読み込むためには以下のようにします -(なおこの型プロバイダーは内部で `XDocument` を使用しているため、 -`System.Xml.Linq` への参照も必要になる点に注意してください): -*) - -#r "System.Xml.Linq.dll" -open FSharp.Data - -(** -### サンプルからの型の推論 - -`XmlProvider<...>` には `string` 型の静的パラメータを1つ指定します。 -このパラメータには **サンプルとなるXML文字列** または -**サンプルファイル** のいずれかを指定します -(カレントディレクトリからの相対パスか、 **http** または **https** 経由で -アクセス可能なファイル名を指定します)。 -パラメータの値があいまいで認識できないようなケースはほとんど無いでしょう。 - -以下のサンプルではルートノードに2つの属性を持ったXMLドキュメントを -読み取ることができるような型を生成しています: -*) - -type Author = XmlProvider<""""""> -let sample = Author.Parse("""""") - -printfn "%s (%d)" sample.Name sample.Born - -(** -型プロバイダーによって生成された型 `Author` には、XMLドキュメントの -ルート要素にある2つの属性と同じ名前のプロパティがあります。 -プロパティの型はサンプルとして指定したドキュメントの値から推測されます。 -今回の場合、 `Name` プロパティは `string` 型で -`Born` プロパティは `int` 型です。 - -XMLは非常に柔軟な形式なので、同じドキュメントを異なる形式で表現できます。 -具体的には属性を使用する代わりに、値を直接含むようなネストされたノードとして -表現できます( `` 以下に `` および `` をネストさせます) -*) - -type AuthorAlt = XmlProvider<"Karl Popper1902"> -let doc = "Paul Feyerabend1924" -let sampleAlt = AuthorAlt.Parse(doc) - -printfn "%s (%d)" sampleAlt.Name sampleAlt.Born - -(** -生成された型を使用すると、同じ形式のドキュメントを読み取る場合には完全に同じAPIで -アクセスできるようになります(ただし1番目の形式を使用するサンプルを `AuthorAlt` -で解析することはできません。両者は単にpublic APIの形式が同じだけであって、 -型の実装としてはそれぞれ別のものだからです)。 - -この型プロバイダーはノードにプリミティブな値だけが含まれていて、子ノードも属性も -持たないような場合に限って、ノードを単純に型付けされたプロパティへと変換します。 - -### さらに複雑な構造を持つドキュメントに対する型 - -もう少し興味深い構造を持った例をいくつか見ていくことにしましょう。 -まず、ノードが同じ値を持つものの、属性の値が異なる場合にはどうなるでしょうか? -*) - -type Detailed = XmlProvider<"""Karl Popper"""> -let info = Detailed.Parse("""Thomas Kuhn""") - -printfn "%s (full=%b)" info.Name.Value info.Name.Full - -(** -ノードが( `string` のような)単純型として表現できない場合、 -この型プロバイダーは複数のプロパティを持つような型を新しく作成します。 -今回の場合、(属性の名前を元にして) `Full` というbool型のプロパティが生成されます。 -次に要素のコンテンツを返すような、`Value` という(特別な)名前のプロパティが -追加されます。 - -### 単純な要素を複数持つドキュメントに対する型 - -もう1つ興味深い例として、プリミティブ値しか持たないような複数のノードが存在する -場合を考えてみましょう。 -以下の例ではルートノード以下に複数の `` ノードがあるドキュメントを -サンプルとして指定しています( `Parse` メソッドにパラメータを指定しなかった場合、 -スキーマ用に指定したものと同じテキストが実行時の値に反映されます)。 -*) - -type Test = XmlProvider<"13"> - -Test.GetSample().Values -|> Seq.iter (printfn "%d") - -(** -型パラメータは複数の値を配列として返すような `Values` メソッドを生成します。 -`` ノードは任意個の属性や子ノードを持つわけではないため、 -それぞれ `int` 値となり、 `Values` メソッドも単に `int[]` を返すようになります! - -## 哲学者たちをもてなす - -このセクションでは特定の話題に関する著者のリストを含んだ、単純なドキュメントを -型プロバイダーで処理する方法についてのデモを紹介します。 -サンプルとなるドキュメント [`data/Writers.xml`](../../data/Writers.xml) は -以下のようになっています: - - [lang=xml] - - - - - -実行時には型プロバイダーから生成された型を使用して、以下のような文字列を -解析します(構造としてはサンプルのドキュメントと同じですが、 -`author` ノードに `died` 属性が含まれているという違いがあります): -*) - -let authors = """ - - - - - """ - -(** -`XmlProvider` の初期化時にはファイル名またはWebのURLを指定できます。 -`Load` や `AsyncLoad` メソッドを使用すると、 -ファイルあるいはWeb上のリソースを読み取ることができます。 -`Parse` メソッドの場合はデータとして文字列を指定できるため、以下のようにすると -データ内の情報を表示することができます: -*) - -type Authors = XmlProvider<"../../data/Writers.xml", ResolutionFolder=__SOURCE_DIRECTORY__> -let topic = Authors.Parse(authors) - -printfn "%s" topic.Topic -for author in topic.Authors do - printf " - %s" author.Name - author.Born |> Option.iter (printf " (%d)") - printfn "" - -(** -値 `topic` には( `string` 型の) `Topic` プロパティがあります。 -このプロパティは同名の属性の値を返します。 -また、すべての著者名をコレクションとして返すような `Authors` メソッドもあります。 -`Born` プロパティはいくつかの著者では指定されていないため、 -`option` 型として定義されています。 -そのため、 `Option.iter` を使用して表示する必要があります。 - -`died` 属性はサンプルからの推論時には存在しないため、 -静的に型付けられた方法でこの値を取得することはできません -(ただし `author.XElement.Attribute(XName.Get("died"))` というコードを使用して -動的に取得することは可能です)。 - -## グローバル推測モード - -これまでの例では、同じ名前の要素を(再帰的に)含むような要素は -出てきませんでした(つまりたとえば `` 以下に `` ノードは -決して現れないということです)。 -しかしXHTMLファイルのようなドキュメントを扱う場合、こういった状況はよくあることです。 -例として以下のようなサンプルドキュメントがあるとしましょう -(単純化したバージョンが [`data/HtmlBody.xml`](../../data/HtmlBody.xml) にあります): - - [lang=xml] -
- Main text -
-
Second text
-
-
- -この例では `
` 要素内に `
` 要素がありますが、いずれも同じ型として -扱われるべきであることは明らかです。 -`
` 要素を処理する再帰関数を作成できるようになっていてもらいたいはずです。 -このような場合には引数 `Global` に `true` を指定します: -*) - -type Html = XmlProvider<"../../data/HtmlBody.xml", Global=true, ResolutionFolder=__SOURCE_DIRECTORY__> -let html = Html.GetSample() - -(** -引数 `Global` を `true` にすると、型プロバイダーは同名の要素すべてを **一元化** します。 -つまりすべての `
` 要素が同じ型として扱われることになります -( `
` に指定されたすべての属性をプロパティとして持ち、 -サンプルドキュメント内で見つけられるすべての子要素の組み合わせが考慮されます)。 - -型は `Html` 以下に定義されます。 -したがって、`Html.Div` を引数にとり、 -各 `
` 要素を処理するような `printDiv` 関数を以下のようにして作成できます: -*) - -//
要素のコンテンツを表示します -let rec printDiv (div:Html.Div) = - div.Spans |> Seq.iter (printfn "%s") - div.Divs |> Seq.iter printDiv - if div.Spans.Length = 0 && div.Divs.Length = 0 then - div.Value |> Option.iter (printfn "%s") - -// すべての子要素と共にルートの
要素を表示します -printDiv html - -(** - -この関数はまず `` 内のすべてのテキストを表示します -(今回の例の場合、属性が全く指定されていないため、 -`string` 型として推論されます)。 -次に、すべての `
` 要素を再帰的に表示します。 -ネストされた要素が見つからない場合は `Value` (インナーテキスト)を表示します。 - -## RSSフィードの読み取り - -今回の総まとめとして、もう少し実用的な例としてRSSフィードを解析してみましょう。 -既に説明した通り、型プロバイダーには相対パスあるいはWebページのアドレスを指定できます: -*) - -type Rss = XmlProvider<"http://tomasp.net/rss.xml"> - -(** -このコードではRSSフィード(および `http://tomasp.net` で使用されている機能) -を表す `Rss` 型を生成しています。 -`Rss` 型にはこの型のインスタンスを生成するための機能として、staticメソッド -`Parse` 、 `Load` 、 `AsyncLoad` が定義されています。 -今回の場合、スキーマとして指定したものと同じURIを再利用したいので、 -staticメソッド `GetSample` を使用します: -*) - -let blog = Rss.GetSample() - -(** -ここまで来ればRSSフィードのタイトルと直近の投稿一覧を表示することは簡単です。 -単に `blog` に続けて `.` と入力すれば、自動補完の候補一覧が確認できるでしょう。 -コードとしては以下のようにします: -*) - -// Title は文字列を返すプロパティです -printfn "%s" blog.Channel.Title - -// すべてのitemノードを取得して、それぞれのタイトルとリンクを表示します -for item in blog.Channel.Items do - printfn " - %s (%s)" item.Title item.Link - -(** - -## 関連する記事 - - * [API リファレンス: XmlProvider 型プロバイダー](../..reference/fsharp-data-xmlprovider.html) - * [API リファレンス: XElementExtensions モジュール](../../reference/fsharp-data-xelementextensions.html) - -*) diff --git a/docs/ja/tutorials/JsonAnonymizer.fsx b/docs/ja/tutorials/JsonAnonymizer.fsx deleted file mode 100644 index 01e1d2d9d..000000000 --- a/docs/ja/tutorials/JsonAnonymizer.fsx +++ /dev/null @@ -1,104 +0,0 @@ -(** -# JSONの匿名化 - -このチュートリアルではJSONドキュメント -( [JSONパーサーの記事](../library/JsonValue.html) で説明した -`JsonValue` 型で表現されるドキュメント) -の匿名化機能を実装する方法を紹介します。 -この機能はF# Dataライブラリに備わっている機能ではありませんが、 -JSONドキュメントを再帰的に処理するだけで非常に簡単に実装できます。 - -JSON匿名化機能をコード内で利用したい場合には、 -[GitHubにあるソースコード][jsonanonymizer] をコピーして -プロジェクトに加えるだけです。 -この機能を頻繁に利用するようになり、F# Dataライブラリに取り込んでもらいたい -ということであれば [機能のリクエスト][issues] を送信してください。 - - [jsonanonymizer]: https://github.com/fsharp/FSharp.Data/blob/master/docs/content/tutorials/JsonAnonymizer.fsx - [issues]: https://github.com/fsharp/FSharp.Data/issues - -**警告**: この機能は単なるサンプルであるため、重要なデータを処理させないでください。 - -*) - -#r "../../../src/FSharp.Data/bin/Release/netstandard2.0/FSharp.Data.dll" -open System -open System.Globalization -open FSharp.Data - -type JsonAnonymizer(?propertiesToSkip, ?valuesToSkip) = - - let propertiesToSkip = Set.ofList (defaultArg propertiesToSkip []) - let valuesToSkip = Set.ofList (defaultArg valuesToSkip []) - - let rng = Random() - - let digits = [| '0' .. '9' |] - let lowerLetters = [| 'a' .. 'z' |] - let upperLetters = [| 'A' .. 'Z' |] - - let getRandomChar (c:char) = - if Char.IsDigit c then digits.[rng.Next(10)] - elif Char.IsLetter c then - if Char.IsLower c - then lowerLetters.[rng.Next(26)] - else upperLetters.[rng.Next(26)] - else c - - let randomize (str:string) = - String(str.ToCharArray() |> Array.map getRandomChar) - - let rec anonymize json = - match json with - | JsonValue.String s when valuesToSkip.Contains s -> json - | JsonValue.String s -> - let typ = Runtime.StructuralInference.inferPrimitiveType CultureInfo.InvariantCulture s - if typ = typeof then Guid.NewGuid().ToString() - elif typ = typeof || typ = typeof then s - elif typ = typeof then s - else - let prefix, s = - if s.StartsWith "http://" then "http://", s.Substring("http://".Length) - elif s.StartsWith "https://" then "https://", s.Substring("https://".Length) - else "", s - prefix + randomize s - |> JsonValue.String - | JsonValue.Number d -> - let typ = Runtime.StructuralInference.inferPrimitiveType CultureInfo.InvariantCulture (d.ToString()) - if typ = typeof || typ = typeof - then json - else d.ToString() |> randomize |> Decimal.Parse |> JsonValue.Number - | JsonValue.Float f -> - f.ToString() - |> randomize - |> Double.Parse - |> JsonValue.Float - | JsonValue.Boolean _ | JsonValue.Null -> json - | JsonValue.Record props -> - props - |> Array.map (fun (key, value) -> key, if propertiesToSkip.Contains key then value else anonymize value) - |> JsonValue.Record - | JsonValue.Array array -> - array - |> Array.map anonymize - |> JsonValue.Array - - member __.Anonymize json = anonymize json - -let json = JsonValue.Load (__SOURCE_DIRECTORY__ + "../../data/TwitterStream.json") -printfn "%O" json - -let anonymizedJson = (JsonAnonymizer ["lang"]).Anonymize json -printfn "%O" anonymizedJson - -(** - -## 関連する記事 - - * [JSON パーサーおよびリーダー](../library/JsonValue.html) - - JSONの値を動的に処理する方法についての説明があります。 - * [JSON 型プロバイダー](../library/JsonProvider.html) - - 型安全な方法でJSONデータにアクセスする機能を持った - F# 型プロバイダーについて説明しています。 - -*) \ No newline at end of file diff --git a/docs/ja/tutorials/JsonToXml.fsx b/docs/ja/tutorials/JsonToXml.fsx deleted file mode 100644 index 1ca16ddee..000000000 --- a/docs/ja/tutorials/JsonToXml.fsx +++ /dev/null @@ -1,198 +0,0 @@ -(** -# JSON と XML の相互変換 - -このチュートリアルではJSONドキュメント( [JSON パーサーの記事](JsonValue.html) -で説明している `JsonValue` 型で表されるドキュメント)と -XMLドキュメント( `XElement` で表されるドキュメント)を -相互に変換する機能を実装する方法を紹介します。 -この機能はF# Dataライブラリから直接使用できるものではありませんが、 -JSON(あるいはXML)ドキュメントを再帰的に処理するだけで -非常に簡単に実装できます。 - -JSONとXML間の変換を自身のコードで使いたい場合には -[GitHubにあるソース][jsontoxml] をコピーしてプロジェクトに追加するだけです。 -この機能を頻繁に利用することがあり、F# Dataライブラリの機能としてほしい場合には -是非 [機能リクエスト][issues] を投稿してください。 - - [jsontoxml]: https://github.com/fsharp/FSharp.Data/blob/master/docs/content/ja/tutorials/JsonToXml.fsx - [issues]: https://github.com/fsharp/FSharp.Data/issues - -初期化 ------- - -ここでは( `System.Xml.Linq.dll` 内にある)LINQ to XMLのAPIと、 -`FSharp.Data` 名前空間にある `JsonValue` を使います: -*) - -#r "System.Xml.Linq.dll" -#r "../../../src/FSharp.Data/bin/Release/netstandard2.0/FSharp.Data.dll" -open System.Xml.Linq -open FSharp.Data - -(** - -このスクリプト内では簡単に処理できる値を返すような変換機能を実装しますが、 -リバーシブルな変換ではないことに注意してください -(つまりJSONからXMLに変換した後、JSONに戻したとしても -元と同じ値になるとは限らないということです)。 - -XMLからJSONへの変換 -------------------- - -XMLとJSONはかなり似た形式ではありますが、 -細かい部分ではそれなりに違いがあります。 -たとえばXMLでは **属性** と **子要素** が区別されます。 -さらにすべてのXML要素には名前がありますが、 -JSONの配列やレコードは無名です(ただしレコードには -名前のつけられたフィールドがあります)。 -たとえば以下のようなXMLがあるとします: - - [lang=xml] - - - <item value="First" /> - <item value="Second" /> - </channel> - -これに対して生成するJSONではトップレベルの要素名( `channel` )が無視されます。 -生成されるJSONデータはレコード型で、 -各属性および子要素に対してユニークなフィールドが含まれます。 -ある要素が繰り返し現れる場合には配列へと変換されます: - - [lang=js] - { "version": "1.0", - "title": { "text": "Sample input" }, - "items": [ { "value": "First" }, - { "value": "Second" } ] } - -このように、 `item` 要素は自動的に `items` という複数形に変換されて、 -`value` 属性の値に関連づけられた2つのレコード値が -配列の要素として含まれるようになります。 - -変換関数は `XElement` を引数にとり、 `JsonValue` を返すような再帰関数です。 -この関数は( `JsonValue.Record` と `JsonValue.Array` を使って)JSONのレコードと -配列を組み立てます。 -すべての属性は `JsonValue.String` に変換されます。 -ただし今回の例では数値型を適切なJSON型に変換するような機能は実装しません: -*) - -/// XML要素に対応するJSON表現を作成する -let rec fromXml (xml:XElement) = - - // すべての属性に対してキー値ペアのコレクションを作成する - let attrs = - [ for attr in xml.Attributes() -> - (attr.Name.LocalName, JsonValue.String attr.Value) ] - - // XElementのコレクションを(fromXmlを再帰的に使って) - // JsonValueの配列に変換する関数 - let createArray xelems = - [| for xelem in xelems -> fromXml xelem |] - |> JsonValue.Array - - // 子要素を名前でグループ化した後、 - // 単一要素のグループを(再帰的に)レコードへと変換し、 - // 複数要素のグループをcreateArrayでJSON配列に変換する - let children = - xml.Elements() - |> Seq.groupBy (fun x -> x.Name.LocalName) - |> Seq.map (fun (key, childs) -> - match Seq.toList childs with - | [child] -> key, fromXml child - | children -> key + "s", createArray children ) - - // 子要素および属性用に生成された要素を連結する - Array.append (Array.ofList attrs) (Array.ofSeq children) - |> JsonValue.Record - -(** - -JSONからXMLへの変換 -------------------- - -JSONからXMLへ変換する場合、同じようなミスマッチが起こります。 -たとえば以下のようなJSONデータがあるとします: - - [lang=js] - { "title" : "Sample input", - "paging" : { "current": 1 }, - "items" : [ "First", "Second" ] } - -トップレベルのレコードには名前がないため、 -今回の変換機能では(ルート名を指定することになる)ユーザー側で -`XElement` としてラップできるような -`XObject` のリストを生成することにします。 -レコード内にあるプリミティブな値のフィールドは属性になり、 -(配列やレコードのような)複雑な値はオブジェクトになります: - - [lang=xml] - <root title="Sample input"> - <items> - <item>First</item> - <item>Second</item> - </items> - <paging current="1" /> - </root> - -変換関数はやはり再帰関数になります。 -今回はパターンマッチを使って `JsonValue` のそれぞれ取り得るケースを区別します。 -プリミティブ値を表すケースでは単に値を `obj` として返し、 -配列やレコードに対してはネストされた(複数の)要素や属性を返します: - -*) - -/// JSONの値に対するXML表現を作成する -/// (ただしトップレベルの値がオブジェクトまたは配列の場合のみ機能する) -let toXml(x:JsonValue) = - // XML属性やXML要素を作成するためのヘルパ関数 - let attr name value = - XAttribute(XName.Get name, value) :> XObject - let elem name (value:obj) = - XElement(XName.Get name, value) :> XObject - - // 変換機能を実装している内部用再帰関数 - let rec toXml = function - // Primitive values are returned as objects - | JsonValue.Null -> null - | JsonValue.Boolean b -> b :> obj - | JsonValue.Number number -> number :> obj - | JsonValue.Float number -> number :> obj - | JsonValue.String s -> s :> obj - - // JSONオブジェクトは(プリミティブであれば)XML属性か、 - // あるいは子要素になる - // attributes (for primitives) or child elements - | JsonValue.Record properties -> - properties - |> Array.map (fun (key, value) -> - match value with - | JsonValue.String s -> attr key s - | JsonValue.Boolean b -> attr key b - | JsonValue.Number n -> attr key n - | JsonValue.Float n -> attr key n - | _ -> elem key (toXml value)) :> obj - - // JSON配列は <item> 要素のシーケンスになる - | JsonValue.Array elements -> - elements |> Array.map (fun item -> - elem "item" (toXml item)) :> obj - - // 変換を実行して、結果をオブジェクトのシーケンスにキャストする - // (意図しない入力に対しては失敗する可能性あり!) - (toXml x) :?> XObject seq - -(** - - -## 関連する記事 - - * [JSON パーサーおよびリーダー](../library/JsonValue.html) - - JSONの値を動的に処理する方法についての説明があります。 - * [JSON 型プロバイダー](../library/JsonProvider.html) - - 型安全な方法でJSONデータにアクセスする機能を持った - F# 型プロバイダーについて説明しています。 - * [XML 型プロバイダー](../library/XmlProvider.html) - - 型安全な方法でXMLデータにアクセスする機能を持った - F# 型プロバイダーについて説明しています。 - -*) \ No newline at end of file diff --git a/docs/library/CsvFile.fsx b/docs/library/CsvFile.fsx index 34795070a..701113042 100644 --- a/docs/library/CsvFile.fsx +++ b/docs/library/CsvFile.fsx @@ -55,6 +55,7 @@ for row in msft.Rows do printfn "HLOC: (%s, %s, %s)" (row.GetColumn "High") (row.GetColumn "Low") (row.GetColumn "Date") +(*** include-fsi-merged-output ***) (** Note that unlike `CsvProvider`, `cref:T:FSharp.Data.CsvFile` works in streaming mode for performance reasons, which means @@ -94,6 +95,8 @@ for row in msft.Rows do printfn "HLOC: (%f, %M, %O)" (row.["High"].AsFloat()) (row?Low.AsDecimal()) (row?Date.AsDateTime()) +(*** include-fsi-merged-output ***) + (** ## Transforming CSV files @@ -109,6 +112,7 @@ msft.Filter(fun row -> row?Close.AsFloat() > row?Open.AsFloat()) .Truncate(10) .SaveToString('\t') +(*** include-fsi-merged-output ***) (** ## Related articles diff --git a/docs/library/CsvProvider.fsx b/docs/library/CsvProvider.fsx index 44b9ffcad..e13ca12f3 100644 --- a/docs/library/CsvProvider.fsx +++ b/docs/library/CsvProvider.fsx @@ -70,7 +70,10 @@ and the next rows define the data. We can pass reference to the file to `cref:T: get a strongly typed view of the file: *) -type Stocks = CsvProvider<"../data/MSFT.csv", ResolutionFolder=__SOURCE_DIRECTORY__> +[<Literal>] +let ResolutionFolder = __SOURCE_DIRECTORY__ + +type Stocks = CsvProvider<"../data/MSFT.csv", ResolutionFolder=ResolutionFolder> (** The generated type provides two static methods for loading data. The `Parse` method can be @@ -93,6 +96,8 @@ let lastOpen = firstRow.Open for row in msft.Rows do printfn "HLOC: (%A, %A, %A, %A)" row.High row.Low row.Open row.Close +(*** include-fsi-merged-output ***) + (** The generated type has a property `Rows` that returns the data from the CSV file as a collection of rows. We iterate over the rows using a `for` loop. As you can see the @@ -103,48 +108,9 @@ As you can see, the type provider also infers types of individual rows. The `Dat property is inferred to be a `DateTime` (because the values in the sample file can all be parsed as dates) while HLOC prices are inferred as `decimal`. -### Charting stock prices - -We can use the [XPlot.Plotly](https://fslab.org/XPlot/) library to draw a simple line chart showing how the price -of MSFT stocks changes: -*) - -// Load the XPlot.Plotly library -#r "nuget: XPlot.Plotly, Version=3.0.1" -open XPlot.Plotly -open System - -(*** define-output:chart1 ***) - -// Visualize the stock prices -[ for row in msft.Rows -> row.Date, row.Open ] -|> Chart.Line - -(*** include-it:chart1 ***) - -(** -As one more example, we use the `Candlestick` chart to get a more detailed look at the -data over the last month: -*) - -// Get last months' prices in HLOC format -let recent = - [ for row in msft.Rows do - if row.Date > DateTime.Parse("9 Sep 2017") then - yield row.Date, row.High, row.Low, row.Open, row.Close ] - -(*** define-output:chart2 ***) - -// Visualize prices using Candlestick chart -Chart.Candlestick(recent) - -(*** include-it:chart2 ***) - -(** ## Using units of measure -Another interesting feature of the CSV type provider is that it supports F# units of measure. -If the header includes the name or symbol of one of the standard SI units, then the generated type +The CSV type provider supports F# units of measure: if the header includes the name or symbol of one of the standard SI units, then the generated type returns values annotated with the appropriate unit. In this section, we use a simple file [`data/SmallTest.csv`](../data/SmallTest.csv) which @@ -161,13 +127,17 @@ a static argument. Also note that in this case we're using the same data at runt so we use the `GetSample` method instead of calling `Load` and passing the same parameter again. *) -let small = CsvProvider<"../data/SmallTest.csv", ResolutionFolder=__SOURCE_DIRECTORY__>.GetSample() +let small = CsvProvider<"../data/SmallTest.csv", ResolutionFolder=ResolutionFolder>.GetSample() + +(*** include-fsi-merged-output ***) (** We can also use the default constructor instead of the `GetSample` static method: *) -let small2 = new CsvProvider<"../data/SmallTest.csv", ResolutionFolder=__SOURCE_DIRECTORY__>() +let small2 = new CsvProvider<"../data/SmallTest.csv", ResolutionFolder=ResolutionFolder>() + +(*** include-fsi-merged-output ***) (** but the VisualStudio IntelliSense for the type provider parameters doesn't work when we use a default @@ -185,6 +155,8 @@ for row in small.Rows do if speed > 15.0M<metre/second> then printfn "%s (%A m/s)" row.Name speed +(*** include-fsi-merged-output ***) + (** The numerical values of `Distance` and `Time` are both inferred as `decimal` (because they are small enough). Thus the type of `speed` becomes `decimal<metre/second>`. The compiler @@ -201,7 +173,7 @@ where you can specify what to use as separator. This means that you can consume any textual tabular format. Here is an example using `;` as a separator: *) -type AirQuality = CsvProvider<"../data/AirQuality.csv", ";", ResolutionFolder=__SOURCE_DIRECTORY__> +type AirQuality = CsvProvider<"../data/AirQuality.csv", ";", ResolutionFolder=ResolutionFolder> let airQuality = new AirQuality() @@ -209,6 +181,8 @@ for row in airQuality.Rows do if row.Month > 6 then printfn "Temp: %i Ozone: %f " row.Temp row.Ozone +(*** include-fsi-merged-output ***) + (** The air quality dataset ([`data/AirQuality.csv`](../data/AirQuality.csv)) is used in many samples for the Statistical Computing language R. A short description of the dataset can be found @@ -221,7 +195,7 @@ we also set `IgnoreErrors` static parameter to `true` so that lines with incorre are automatically skipped (the sample file ([`data/MortalityNY.csv`](../data/MortalityNY.tsv)) contains additional unstructured data at the end): *) -let mortalityNy = CsvProvider<"../data/MortalityNY.tsv", IgnoreErrors=true, ResolutionFolder=__SOURCE_DIRECTORY__>.GetSample() +let mortalityNy = CsvProvider<"../data/MortalityNY.tsv", IgnoreErrors=true, ResolutionFolder=ResolutionFolder>.GetSample() // Find the name of a cause based on code // (Pedal cyclist injured in an accident) @@ -234,12 +208,14 @@ for r in mortalityNy.Rows do if r.``Cause of death Code`` = "V13.4" then printfn "%s (%d cases)" r.County r.Count +(*** include-fsi-merged-output ***) + (** Finally, note that it is also possible to specify multiple different separators for the `CsvProvider`. This might be useful if a file is irregular and contains rows separated by either semicolon or a colon. You can use: -`CsvProvider<"../data/AirQuality.csv", Separator=";,", ResolutionFolder=__SOURCE_DIRECTORY__>`. +`CsvProvider<"../data/AirQuality.csv", Separator=";,", ResolutionFolder=ResolutionFolder>`. ## Missing values @@ -255,14 +231,14 @@ For example, to ignore `this` and `that` we could do: CsvProvider<"X,Y,Z\nthis,that,1.0", MissingValues="this,that">.GetSample().Rows -(*** include-it ***) - +(*** include-fsi-merged-output ***) (** The following snippet calculates the mean of the ozone observations excluding the `Double.NaN` values. We first obtain the `Ozone` property for each row, then remove missing values and then use the standard `Seq.average` function: *) +open System let mean = airQuality.Rows @@ -271,6 +247,8 @@ let mean = |> Array.filter (fun elem -> not (Double.IsNaN elem)) |> Array.average +(*** include-fsi-merged-output ***) + (** If the sample doesn't have missing values on all columns, but at runtime missing values could @@ -351,6 +329,9 @@ for row in csv.Rows do (row.Duration/1.0<second>) row.Foo (defaultArg row.Column3 1.0) + +(*** include-fsi-merged-output ***) + (** You don't need to override all the columns, you can skip the ones to leave as default. @@ -363,13 +344,15 @@ the other columns blank in the schema (you also don't need to add all the traili type Titanic1 = CsvProvider<"../data/Titanic.csv", Schema=",,Passenger Class,,,float", - ResolutionFolder=__SOURCE_DIRECTORY__> + ResolutionFolder=ResolutionFolder> let titanic1 = Titanic1.GetSample() for row in titanic1.Rows do printfn "%s Class = %d Fare = %g" row.Name row.``Passenger Class`` row.Fare +(*** include-fsi-merged-output ***) + (** Alternatively, you can rename and override the type of any column by name instead of by position: @@ -378,12 +361,15 @@ Alternatively, you can rename and override the type of any column by name instea type Titanic2 = CsvProvider<"../data/Titanic.csv", Schema="Fare=float,PClass->Passenger Class", - ResolutionFolder=__SOURCE_DIRECTORY__> + ResolutionFolder=ResolutionFolder> let titanic2 = Titanic2.GetSample() for row in titanic2.Rows do printfn "%s Class = %d Fare = %g" row.Name row.``Passenger Class`` row.Fare + +(*** include-fsi-merged-output ***) + (** You can even mix and match the two syntaxes like this `Schema="int64,DidSurvive,PClass->Passenger Class=string"` @@ -405,6 +391,8 @@ airQuality .Truncate(10) .SaveToString() +(*** include-fsi-merged-output ***) + (** It's also possible to transform the columns themselves by using `Map` and the constructor for the `Row` type. @@ -417,6 +405,8 @@ let doubleOzone = ( row.Ozone * 2.0, row.``Solar.R``, row.Wind, row.Temp, row.Month, row.Day)) +(*** include-fsi-merged-output ***) + (** You can also append new rows, either by creating them directly as in the previous example, or by parsing them from a string. @@ -431,6 +421,8 @@ let newRows = let airQualityWithExtraRows = airQuality.Append newRows +(*** include-fsi-merged-output ***) + (** It's even possible to create csv files without parsing at all: @@ -443,11 +435,13 @@ type MyCsvType = let myRows = [ MyCsvType.Row(1, "a", None) - MyCsvType.Row(2, "B", Some DateTime.Now) ] + MyCsvType.Row(2, "B", Some System.DateTime.Now) ] let myCsv = new MyCsvType(myRows) myCsv.SaveToString() +(*** include-fsi-merged-output ***) + (** ## Handling big datasets diff --git a/docs/library/HtmlCssSelectors.fsx b/docs/library/HtmlCssSelectors.fsx index 52d45d227..06c68177e 100644 --- a/docs/library/HtmlCssSelectors.fsx +++ b/docs/library/HtmlCssSelectors.fsx @@ -45,6 +45,7 @@ We will parse links of a Google to search for `FSharp.Data` like in the [HTML Pa let googleUrl = "http://www.google.co.uk/search?q=FSharp.Data" let doc = HtmlDocument.Load(googleUrl) +(*** include-fsi-merged-output ***) (** To make sure we extract search results only, we will parse links in the `<div>` with id `search`. Then we can , for example, use the direct descendants selector to select another `<div>` with the @@ -57,6 +58,8 @@ let links = | t when (t.StartsWith("https://") || t.StartsWith("http://"))-> t | t -> "http://" + t ) +(*** include-fsi-merged-output ***) + (** The rest of the selector (written as `li.g > div.s`) skips the first 4 sub-results targeting GitHub pages, so we only extract proper links. @@ -69,6 +72,8 @@ let searchResults = |> List.map (fun n -> n.InnerText()) |> List.zip (links) +(*** include-fsi-merged-output ***) + (** ## Practice 2: Search F# books on Google Books @@ -85,6 +90,8 @@ let books = |> List.map(fun a -> a.InnerText().Trim(), a.AttributeValue("href")) |> List.filter(fun (title, href) -> title.Contains("F#")) +(*** include-fsi-merged-output ***) + (** ## JQuery selectors @@ -108,6 +115,8 @@ let englishDoc = HtmlDocument.Parse(""" let englishLinks = englishDoc.CssSelect("a[hreflang|=en]") + +(*** include-fsi-merged-output ***) (** ### Attribute Contains Selector @@ -129,6 +138,8 @@ let manDoc = HtmlDocument.Parse(""" let manElems = manDoc.CssSelect("input[name*='man']") + +(*** include-fsi-merged-output ***) (** ### Attribute Contains Word Selector @@ -137,6 +148,8 @@ Finds all inputs with a name containing the word "man". This requires a whitespa let manWordElems = manDoc.CssSelect("input[name~='man']") +(*** include-fsi-merged-output ***) + (** ### Attribute Ends With Selector @@ -145,6 +158,8 @@ Finds all inputs with a name ending with "man". let manEndElemes = manDoc.CssSelect("input[name$='man']") +(*** include-fsi-merged-output ***) + (** ### Attribute Equals Selector @@ -154,6 +169,8 @@ Finds all inputs with a name equal to "man". let manEqElemes = manDoc.CssSelect("input[name='man']") +(*** include-fsi-merged-output ***) + (** ### Attribute Not Equal Selector @@ -162,6 +179,8 @@ Finds all inputs with a name different to "man". let notManElems = manDoc.CssSelect("input[name!='man']") +(*** include-fsi-merged-output ***) + (** ### Attribute Starts With Selector @@ -171,6 +190,8 @@ Finds all inputs with a name starting with "man". let manStartElems = manDoc.CssSelect("input[name^='man']") +(*** include-fsi-merged-output ***) + (** ### Forms helpers @@ -232,6 +253,8 @@ let password = htmlForm.CssSelect(":password") // Find all files uploaders. let file = htmlForm.CssSelect(":file") +(*** include-fsi-merged-output ***) + (** ## Implemented and missing features diff --git a/docs/library/HtmlParser.fsx b/docs/library/HtmlParser.fsx index d08c65ad8..b909b8b37 100644 --- a/docs/library/HtmlParser.fsx +++ b/docs/library/HtmlParser.fsx @@ -46,6 +46,8 @@ to extract the data from the page. Note: an asynchronous variant `cref:M:FSharp. *) let results = HtmlDocument.Load("http://www.google.co.uk/search?q=FSharp.Data") +(*** include-fsi-merged-output ***) + (** Now that we have a loaded HTML document we can begin to extract data from it. Firstly we want to extract all of the anchor tags `a` out of the document, then @@ -62,6 +64,8 @@ let links = ) |> Seq.toList +(*** include-fsi-merged-output ***) + (** Now that we have extracted our search results you will notice that there are lots of other links to various Google services and cached/similar results. Ideally we would @@ -76,8 +80,5 @@ let searchResults = name <> "Cached" && name <> "Similar" && url.StartsWith("/url?")) |> List.map (fun (name, url) -> name, url.Substring(0, url.IndexOf("&sa=")).Replace("/url?q=", "")) -(** -Putting this all together yields the following: -*) +(*** include-fsi-merged-output ***) -(*** include-value:searchResults ***) diff --git a/docs/library/HtmlProvider.fsx b/docs/library/HtmlProvider.fsx index d797f36af..880350dbe 100644 --- a/docs/library/HtmlProvider.fsx +++ b/docs/library/HtmlProvider.fsx @@ -57,7 +57,10 @@ Usually with HTML files headers are demarked by using the <th> tag, however in t first row is headers. (This behaviour is likely to get smarter in later releases). But it highlights a general problem about HTML's strictness. *) -type F1_2017 = HtmlProvider<"../data/2017_F1.htm", ResolutionFolder=__SOURCE_DIRECTORY__> +[<Literal>] +let ResolutionFolder = __SOURCE_DIRECTORY__ + +type F1_2017 = HtmlProvider<"../data/2017_F1.htm", ResolutionFolder=ResolutionFolder> (** The generated type provides a type space of tables that it has managed to parse out of the given HTML Document. @@ -114,7 +117,7 @@ type NugetStats = HtmlProvider<"https://www.nuget.org/packages/FSharp.Data"> // load the live package stats for FSharp.Data -let rawStats = NugetStats().Tables.``Version History`` +let rawStats = NugetStats().Tables.Table3 // helper function to analyze version numbers from nuget let getMinorVersion (v:string) = diff --git a/docs/library/Http.fsx b/docs/library/Http.fsx index b96bc4dcb..31f92da29 100644 --- a/docs/library/Http.fsx +++ b/docs/library/Http.fsx @@ -60,6 +60,8 @@ async { let! html = Http.AsyncRequestString("http://tomasp.net") printfn "%d" html.Length } |> Async.Start +(*** include-fsi-merged-output ***) + (** In the rest of the documentation, we focus on the `RequestString` method, because the use of `AsyncRequestString` is exactly the same. @@ -76,6 +78,8 @@ Http.RequestString ( "http://httpbin.org/get", query=["test", "foo"], httpMethod="GET" ) +(*** include-fsi-merged-output ***) + (** Additional headers are specified similarly - using an optional parameter `headers`. The collection can contain custom headers, but also standard headers such as the @@ -126,12 +130,10 @@ the response content, so it's easier to debug in F# interactive when the server You can also opt out of the exception by specifying the `silentHttpErrors` parameter: *) -(*** define-output:request ***) Http.RequestString("http://api.themoviedb.org/3/search/movie", silentHttpErrors = true) -(** This returns the following: *) -(*** include-it:request ***) +(*** include-fsi-merged-output ***) (** In this case, you might want to look at the HTTP status code so you don't confuse an error message for an actual response. If you want to see more information about the response, including the status code, the response @@ -168,6 +170,8 @@ returns the request details: Http.RequestString("http://httpbin.org/post", body = FormValues ["test", "foo"]) +(*** include-fsi-merged-output ***) + (** By default, the `Content-Type` header is set to `text/plain`, `application/x-www-form-urlencoded`, or `application/octet-stream`, depending on which kind of `HttpRequestBody` you specify, but you can change @@ -179,6 +183,8 @@ Http.RequestString headers = [ ContentType HttpContentTypes.Json ], body = TextRequest """ {"test": 42} """) +(*** include-fsi-merged-output ***) + (** ## Maintaining cookies across requests diff --git a/docs/library/JsonProvider.fsx b/docs/library/JsonProvider.fsx index 740fe5957..f27793dec 100644 --- a/docs/library/JsonProvider.fsx +++ b/docs/library/JsonProvider.fsx @@ -67,6 +67,8 @@ let simple = Simple.Parse(""" { "name":"Tomas", "age":4 } """) simple.Age simple.Name +(*** include-fsi-merged-output ***) + (** You can see that the generated type has two properties - `Age` of type `int` and `Name` of type `string`. The provider successfully infers the types from the sample and exposes the @@ -84,6 +86,8 @@ type Numbers = JsonProvider<""" [1, 2, 3, 3.14] """> let nums = Numbers.Parse(""" [1.2, 45.1, 98.2, 5] """) let total = nums |> Seq.sum +(*** include-fsi-merged-output ***) + (** When the sample is a collection, the type provider generates a type that can be used to store all values in the sample. In this case, the resulting type is `decimal`, because one @@ -101,6 +105,8 @@ let mixed = Mixed.Parse(""" [4, 5, "hello", "world" ] """) mixed.Numbers |> Seq.sum mixed.Strings |> String.concat ", " +(*** include-fsi-merged-output ***) + (** As you can see, the `Mixed` type has properties `Numbers` and `Strings` that return only `int` and `string` values from the collection. This means that we get @@ -126,6 +132,8 @@ for item in People.GetSamples() do item.Age |> Option.iter (printf "(%d)") printfn "" +(*** include-fsi-merged-output ***) + (** The inferred type for `items` is a collection of (anonymous) JSON entities - each entity has properties `Name` and `Age`. As `Age` is not available for all records in the sample @@ -146,6 +154,8 @@ for item in Values.GetSamples() do | _, Some str -> printfn "Text: %s" str | _ -> printfn "Some other value!" +(*** include-fsi-merged-output ***) + (** Here, the `Value` property is either a number or a string, The type provider generates a type that has an optional property for each possible option, so we can use @@ -169,6 +179,8 @@ type People2 = JsonProvider<""" let person = People2.Parse("""{ "name":"Gustavo" }""") +(*** include-fsi-merged-output ***) + (** ## Loading WorldBank data @@ -196,7 +208,10 @@ The following sample generates type based on the [`data/WorldBank.json`](../data file and loads it: *) -type WorldBank = JsonProvider<"../data/WorldBank.json", ResolutionFolder=__SOURCE_DIRECTORY__> +[<Literal>] +let ResolutionFolder = __SOURCE_DIRECTORY__ + +type WorldBank = JsonProvider<"../data/WorldBank.json", ResolutionFolder=ResolutionFolder> let doc = WorldBank.GetSample() (** Note that we can also load the data directly from the web both in the `Load` method and in @@ -208,6 +223,8 @@ let wbReq = let docAsync = WorldBank.AsyncLoad(wbReq) +(*** include-fsi-merged-output ***) + (** The `doc` is an array of heterogeneous types, so the provider generates a type that can be used to get the record and the array, respectively. Note that the @@ -224,6 +241,8 @@ for record in doc.Array do record.Value |> Option.iter (fun value -> printfn "%d: %f" record.Date value) +(*** include-fsi-merged-output ***) + (** When printing the data points, some of the values might be missing (in the input, the value is `null` instead of a valid number). This is another example of a heterogeneous type - @@ -241,13 +260,15 @@ provider that the sample is actually a _list of samples_: *) -type Tweet = JsonProvider<"../data/TwitterStream.json", SampleIsList=true, ResolutionFolder=__SOURCE_DIRECTORY__> +type Tweet = JsonProvider<"../data/TwitterStream.json", SampleIsList=true, ResolutionFolder=ResolutionFolder> let text = (*[omit:(omitted)]*)""" {"in_reply_to_status_id_str":null,"text":"\u5927\u91d1\u6255\u3063\u3066\u904a\u3070\u3057\u3066\u3082\u3089\u3046\u3002\u3082\u3046\u3053\u306e\u4e0a\u306a\u3044\u8d05\u6ca2\u3002\u3067\u3082\uff0c\u5b9f\u969b\u306b\u306f\u305d\u306e\u8d05\u6ca2\u306e\u672c\u8cea\u3092\u6e80\u55ab\u3067\u304d\u308b\u4eba\u306f\u9650\u3089\u308c\u3066\u308b\u3002\u305d\u3053\u306b\u76ee\u306b\u898b\u3048\u306a\u3044\u968e\u5c64\u304c\u3042\u308b\u3068\u304a\u3082\u3046\u3002","in_reply_to_user_id_str":null,"retweet_count":0,"geo":null,"source":"web","retweeted":false,"truncated":false,"id_str":"263290764686155776","entities":{"user_mentions":[],"hashtags":[],"urls":[]},"in_reply_to_user_id":null,"in_reply_to_status_id":null,"place":null,"coordinates":null,"in_reply_to_screen_name":null,"created_at":"Tue Oct 30 14:46:24 +0000 2012","user":{"notifications":null,"contributors_enabled":false,"time_zone":"Tokyo","profile_background_color":"FFFFFF","location":"Kodaira Tokyo Japan","profile_background_tile":false,"profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/1172376796\/70768_100000537851636_3599485_q_normal.jpg","default_profile_image":false,"follow_request_sent":null,"profile_sidebar_fill_color":"17451B","description":"KS(Green62)\/WasedaUniv.(Schl Adv Sci\/Eng)\/SynBio\/ChronoBio\/iGEM2010-2012\/Travel\/Airplane\/ \u5bfa\u30fb\u5ead\u3081\u3050\u308a","favourites_count":17,"screen_name":"Merlin_wand","profile_sidebar_border_color":"000000","id_str":"94788486","verified":false,"lang":"ja","statuses_count":8641,"profile_use_background_image":true,"protected":false,"profile_image_url":"http:\/\/a0.twimg.com\/profile_images\/1172376796\/70768_100000537851636_3599485_q_normal.jpg","listed_count":31,"geo_enabled":true,"created_at":"Sat Dec 05 13:07:32 +0000 2009","profile_text_color":"000000","name":"Marin","profile_background_image_url":"http:\/\/a0.twimg.com\/profile_background_images\/612807391\/twitter_free1.br.jpg","friends_count":629,"url":null,"id":94788486,"is_translator":false,"default_profile":false,"following":null,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/profile_background_images\/612807391\/twitter_free1.br.jpg","utc_offset":32400,"profile_link_color":"ADADAD","followers_count":426},"id":263290764686155776,"contributors":null,"favorited":false} """(*[/omit]*) let tweet = Tweet.Parse(text) printfn "%s (retweeted %d times)\n:%s" tweet.User.Value.Name tweet.RetweetCount.Value tweet.Text.Value +(*** include-fsi-merged-output ***) + (** After creating the `Tweet` type, we parse a single sample tweet and print some details about the tweet. As you can see, the `tweet.User` property has been inferred as optional (meaning that a @@ -264,7 +285,7 @@ Let's start by listing the 5 most recently updated open issues in the FSharp.Dat // GitHub.json downloaded from // https://api.github.com/repos/fsharp/FSharp.Data/issues // to prevent rate limit when generating these docs -type GitHub = JsonProvider<"../data/GitHub.json", ResolutionFolder=__SOURCE_DIRECTORY__> +type GitHub = JsonProvider<"../data/GitHub.json", ResolutionFolder=ResolutionFolder> let topRecentlyUpdatedIssues = GitHub.GetSamples() @@ -275,6 +296,8 @@ let topRecentlyUpdatedIssues = for issue in topRecentlyUpdatedIssues do printfn "#%d %s" issue.Number issue.Title +(*** include-fsi-merged-output ***) + (** And now let's create a new issue. We look into the documentation at http://developer.github.com/v3/issues/#create-an-issue and we see that @@ -334,7 +357,7 @@ project file). If you are building a library `MyLib.dll`, you can write: *) type WB = JsonProvider<"../data/WorldBank.json", EmbeddedResource="MyLib, MyLib.data.worldbank.json", - ResolutionFolder=__SOURCE_DIRECTORY__> + ResolutionFolder=ResolutionFolder> (** You still need to specify the local path, but this is only used when compiling `MyLib.dll`. diff --git a/docs/library/JsonValue.fsx b/docs/library/JsonValue.fsx index d73559cb0..7a0451a29 100644 --- a/docs/library/JsonValue.fsx +++ b/docs/library/JsonValue.fsx @@ -49,6 +49,8 @@ let info = { "name": "Tomas", "born": 1985, "siblings": [ "Jan", "Alexander" ] } """) +(*** include-fsi-merged-output ***) + (** The parsed value can be processed using pattern matching - the `cref:T:FSharp.Data.JsonValue` type is a discriminated union with cases such as `Record`, `Collection` and others that @@ -103,6 +105,8 @@ printfn "%s (%d)" (info?name.AsString()) (info?born.AsInteger()) for sib in info?siblings do printfn "%s" (sib.AsString()) +(*** include-fsi-merged-output ***) + (** Note that the `cref:T:FSharp.Data.JsonValue` type does not actually implement the `IEnumerable<'T>` interface (meaning that it cannot be passed to `Seq.xyz` functions). It only has @@ -144,6 +148,8 @@ let wbReq = let valueAsync = JsonValue.AsyncLoad(wbReq) +(*** include-fsi-merged-output ***) + (** To split the top-level array into the first record (with overall information) and the collection of data points, we use pattern matching and match the `value` against the `JsonValue.Array` constructor: @@ -164,6 +170,8 @@ match value with (record?value.AsFloat()) | _ -> printfn "failed" +(*** include-fsi-merged-output ***) + (** The `value` property of a data point is not always available - as demonstrated above, the value may be `null`. In that case, we want to skip the data point. diff --git a/docs/library/WorldBank.fsx b/docs/library/WorldBank.fsx index 5f4a4ab6d..fa2afe250 100644 --- a/docs/library/WorldBank.fsx +++ b/docs/library/WorldBank.fsx @@ -59,6 +59,8 @@ data .Indicators.``Gross capital formation (% of GDP)`` |> Seq.maxBy fst +(*** include-fsi-merged-output ***) + (** When generating the data context, the WorldBank Type Provider retrieves the list of all countries known to the WorldBank and the list of all supported indicators. Both of these @@ -122,13 +124,12 @@ computations, compose them using `Async.Parallel` and then run the (single) obta computation to perform all the downloads: *) -(*** define-output:chart2 ***) - [ for c in countries -> c.Indicators.``Gross capital formation (% of GDP)`` ] |> Async.Parallel |> Async.RunSynchronously +(*** include-fsi-merged-output ***) (** ## Related articles diff --git a/docs/library/XmlProvider.fsx b/docs/library/XmlProvider.fsx index 3e56ff242..884e419d9 100644 --- a/docs/library/XmlProvider.fsx +++ b/docs/library/XmlProvider.fsx @@ -79,6 +79,8 @@ let sampleAlt = AuthorAlt.Parse(doc) printfn "%s (%d)" sampleAlt.Name sampleAlt.Born +(*** include-fsi-merged-output ***) + (** The generated type provides exactly the same API for reading documents following this convention (Note that you cannot use `AuthorAlt` to parse samples that use the @@ -98,6 +100,8 @@ let info = Detailed.Parse("""<author><name full="false">Thomas Kuhn</name></auth printfn "%s (full=%b)" info.Name.Value info.Name.Full +(*** include-fsi-merged-output ***) + (** If the node cannot be represented as a simple type (like `string`) then the provider builds a new type with multiple properties. Here, it generates a property `Full` @@ -114,8 +118,8 @@ contains multiple `<value>` nodes (note that if we leave out the parameter to th type Test = XmlProvider<"<root><value>1</value><value>3</value></root>"> -Test.GetSample().Values -|> Seq.iter (printfn "%d") +for v in Test.GetSample().Values do + printfn "%d" v (** The type provider generates a property `Values` that returns an array with the @@ -152,14 +156,19 @@ The `Load` and `AsyncLoad` methods allows reading the data from a file or from a `Parse` method takes the data as a string, so we can now print the information as follows: *) -type Authors = XmlProvider<"../data/Writers.xml", ResolutionFolder=__SOURCE_DIRECTORY__> +[<Literal>] +let ResolutionFolder = __SOURCE_DIRECTORY__ + +type Authors = XmlProvider<"../data/Writers.xml", ResolutionFolder=ResolutionFolder> let topic = Authors.Parse(authors) printfn "%s" topic.Topic for author in topic.Authors do - printf " - %s" author.Name - author.Born |> Option.iter (printf " (%d)") - printfn "" + printf " - %s" author.Name + author.Born |> Option.iter (printf " (%d)") + printfn "" + +(*** include-fsi-merged-output ***) (** The value `topic` has a property `Topic` (of type `string`) which returns the value @@ -193,7 +202,7 @@ that processes `<div>` elements. To make this possible, you need to set an optio parameter `Global` to `true`: *) -type Html = XmlProvider<"../data/HtmlBody.xml", Global=true, ResolutionFolder=__SOURCE_DIRECTORY__> +type Html = XmlProvider<"../data/HtmlBody.xml", Global=true, ResolutionFolder=ResolutionFolder> let html = Html.GetSample() (** @@ -215,6 +224,8 @@ let rec printDiv (div:Html.Div) = // Print the root <div> element with all children printDiv html +(*** include-fsi-merged-output ***) + (** The function first prints all text included as `<span>` (the element never has any @@ -256,13 +267,15 @@ to infer the schema correctly. For example, the first level `<dct:dataset>` elem least twice for the provider to infer the `Datasets` array rather than a single `Dataset` object. *) -type Census = XmlProvider<"../data/Census.xml", ResolutionFolder=__SOURCE_DIRECTORY__> +type Census = XmlProvider<"../data/Census.xml", ResolutionFolder=ResolutionFolder> let data = Census.Load("https://api.census.gov/data.xml") let apiLinks = data.Datasets |> Array.map (fun ds -> ds.Title,ds.Distribution.AccessUrl) +(*** include-fsi-merged-output ***) + (** This US Census data is an interesting dataset with this top level API returning hundreds of other datasets each with their own API. Here we use the Census data to get a list of titles and URLs for @@ -290,6 +303,8 @@ let cacheJanitor() = async { |> Array.iter enqueue } +(*** include-fsi-merged-output ***) + (** ## Reading RSS feeds @@ -322,6 +337,8 @@ printfn "%s" blog.Channel.Title for item in blog.Channel.Items do printfn " - %s (%s)" item.Title item.Link +(*** include-fsi-merged-output ***) + (** ## Transforming XML @@ -380,6 +397,8 @@ let orderLines = line.Item, line.Quantity ) |] +(*** include-fsi-merged-output ***) + (** ## Using a schema (XSD) @@ -468,6 +487,8 @@ match e2.Root1, e2.Root2 with printfn "Bar = %s and Baz = %O" x.Bar x.Baz | _ -> failwith "Unexpected" +(*** include-fsi-merged-output ***) + (** @@ -541,6 +562,8 @@ match fooChoice.Baz with | Some date -> printfn "%d" date.Year // 1957 | None -> () +(*** include-fsi-merged-output ***) + (** Another xsd construct to model the content of an element is `all`, which is used less often and it's like a sequence where the order of elements does not matter. The corresponding provided type @@ -580,6 +603,8 @@ printfn "%s" formula.Props.[0] // p1 printfn "%s" formula.Ands.[0].Props.[0] // p2 printfn "%s" formula.Ands.[0].Props.[1] // p3 +(*** include-fsi-merged-output ***) + (** Substitution groups are like choices, and the type provider produces an optional property for each alternative. diff --git a/paket.dependencies b/paket.dependencies index 0621935cb..e4989f3e4 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -11,32 +11,47 @@ github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fsi github fsprojects/FSharp.TypeProviders.SDK src/ProvidedTypes.fs github fsprojects/FSharp.TypeProviders.SDK tests/ProvidedTypesTesting.fs -nuget FSharp.Core >= 4.7.2 -nuget Microsoft.SourceLink.GitHub copy_local: true +nuget FSharp.Core >= 5.0.1 lowest_matching: true +nuget Microsoft.SourceLink.GitHub 1.0 copy_local: true +nuget Microsoft.SourceLink.Common 1.0 copy_local: true +nuget Microsoft.Build.Tasks.Git 1.0 copy_local: true group Fake source https://api.nuget.org/v3/index.json storage: none - nuget Fake.Core.Target ~> 5.20.0 - nuget Fake.Core.ReleaseNotes ~> 5.20.0 - nuget Fake.DotNet.AssemblyInfoFile ~> 5.20.0 - nuget Fake.DotNet.Cli ~> 5.20.0 - nuget Fake.DotNet.Testing.NUnit ~> 5.20.0 - nuget Fake.DotNet.NuGet ~> 5.20.0 - nuget Fake.DotNet.MsBuild ~> 5.20.0 - nuget Fake.Tools.Git ~> 5.20.0 - nuget Fake.DotNet.Paket ~> 5.20.0 + nuget Fake.Testing.Common 5.20.3 + nuget Fake.Net.Http 5.20.3 + nuget Fake.IO.FileSystem 5.20.3 + nuget Fake.Core.CommandLineParsing 5.20.3 + nuget Fake.Core.Environment 5.20.3 + nuget Fake.Core.FakeVar 5.20.3 + nuget Fake.Core.SemVer 5.20.3 + nuget Fake.Core.String 5.20.3 + nuget Fake.Core.Context 5.20.3 + nuget Fake.Core.Trace 5.20.3 + nuget Fake.Core.Tasks 5.20.3 + nuget Fake.Core.Target 5.20.3 + nuget Fake.Core.ReleaseNotes 5.20.3 + nuget Fake.DotNet.AssemblyInfoFile 5.20.3 + nuget Fake.DotNet.Cli 5.20.3 + nuget Fake.DotNet.Testing.NUnit 5.20.3 + nuget Fake.DotNet.NuGet 5.20.3 + nuget Fake.DotNet.MsBuild 5.20.3 + nuget Fake.Tools.Git 5.20.3 + nuget Fake.DotNet.Paket 5.20.3 + nuget Microsoft.Build 16.9 + nuget Microsoft.Build.Framework 16.9 + nuget Microsoft.Build.Tasks.Core 16.9 + nuget Microsoft.Build.Utilities.Core 16.9 -# NOTE: These are needed because ProvidedTypesTesting requires paket to install packages. group Test frameworks: net5.0 source https://api.nuget.org/v3/index.json + nuget FSharp.Core 5.0.1 nuget Microsoft.NET.Test.Sdk - nuget NUnit + nuget NUnit 3.13.1 nuget NUnit3TestAdapter - nuget FsUnit - nuget FsCheck - nuget FSharp.Formatting = 8.0.1 - nuget FSharp.Compiler.Service + nuget FsUnit 4.0.4 + nuget FsCheck 2.15.1 diff --git a/paket.lock b/paket.lock index 5225a6eab..94acfd7fc 100644 --- a/paket.lock +++ b/paket.lock @@ -8,12 +8,12 @@ NUGET Microsoft.NETCore.Platforms (>= 2.2.4) - restriction: || (== net50) (&& (== netstandard2.0) (>= netcoreapp2.2)) Microsoft.NETCore.Targets (>= 2.0) - restriction: || (== net50) (&& (== netstandard2.0) (>= netcoreapp2.2)) NETStandard.Library (>= 2.0.3) - restriction: || (== net50) (&& (== netstandard2.0) (>= netcoreapp2.2)) - Microsoft.NETCore.DotNetAppHost (5.0.3) - restriction: || (== net50) (&& (== netstandard2.0) (>= netcoreapp2.2)) - Microsoft.NETCore.DotNetHostPolicy (5.0.3) - restriction: || (== net50) (&& (== netstandard2.0) (>= netcoreapp2.2)) - Microsoft.NETCore.DotNetHostResolver (>= 5.0.3) - Microsoft.NETCore.DotNetHostResolver (5.0.3) - restriction: || (== net50) (&& (== netstandard2.0) (>= netcoreapp2.2)) - Microsoft.NETCore.DotNetAppHost (>= 5.0.3) - Microsoft.NETCore.Platforms (5.0.1) - restriction: || (== net50) (&& (== netstandard2.0) (>= netcoreapp2.2)) + Microsoft.NETCore.DotNetAppHost (6.0) - restriction: || (== net50) (&& (== netstandard2.0) (>= netcoreapp2.2)) + Microsoft.NETCore.DotNetHostPolicy (6.0) - restriction: || (== net50) (&& (== netstandard2.0) (>= netcoreapp2.2)) + Microsoft.NETCore.DotNetHostResolver (>= 6.0) + Microsoft.NETCore.DotNetHostResolver (6.0) - restriction: || (== net50) (&& (== netstandard2.0) (>= netcoreapp2.2)) + Microsoft.NETCore.DotNetAppHost (>= 6.0) + Microsoft.NETCore.Platforms (6.0) - restriction: || (== net50) (&& (== netstandard2.0) (>= netcoreapp2.2)) Microsoft.NETCore.Targets (5.0) - restriction: || (== net50) (&& (== netstandard2.0) (>= netcoreapp2.2)) Microsoft.SourceLink.Common (1.0) - copy_local: true Microsoft.SourceLink.GitHub (1.0) - copy_local: true @@ -21,12 +21,12 @@ NUGET Microsoft.SourceLink.Common (>= 1.0) NETStandard.Library (2.0.3) - restriction: || (== net50) (&& (== netstandard2.0) (>= netcoreapp2.2)) Microsoft.NETCore.Platforms (>= 1.1) - NetStandard.Library.NetFramework (2.0.0-preview2-25405-01) + NETStandard.Library.NETFramework (2.0.0-preview2-25405-01) GITHUB remote: fsprojects/FSharp.TypeProviders.SDK - src/ProvidedTypes.fs (377d56321ad062985ed5aa19f205c1c4f04ef328) - src/ProvidedTypes.fsi (377d56321ad062985ed5aa19f205c1c4f04ef328) - tests/ProvidedTypesTesting.fs (377d56321ad062985ed5aa19f205c1c4f04ef328) + src/ProvidedTypes.fs (9012971ed6d3c35c8980918ed0ceacd0222e3054) + src/ProvidedTypes.fsi (9012971ed6d3c35c8980918ed0ceacd0222e3054) + tests/ProvidedTypesTesting.fs (9012971ed6d3c35c8980918ed0ceacd0222e3054) GROUP Fake STORAGE: NONE NUGET @@ -35,14 +35,14 @@ NUGET FSharp.Core (>= 4.0.0.1) - restriction: >= net45 FSharp.Core (>= 4.2.3) - restriction: && (< net45) (>= netstandard2.0) Microsoft.Win32.Registry (>= 4.7) - restriction: && (< net45) (>= netstandard2.0) - Fake.Core.CommandLineParsing (5.20.3) - restriction: >= netstandard2.0 + Fake.Core.CommandLineParsing (5.20.3) FParsec (>= 1.1.1) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Core.Context (5.20.3) - restriction: >= netstandard2.0 + Fake.Core.Context (5.20.3) FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Core.Environment (5.20.3) - restriction: >= netstandard2.0 + Fake.Core.Environment (5.20.3) FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Core.FakeVar (5.20.3) - restriction: >= netstandard2.0 + Fake.Core.FakeVar (5.20.3) Fake.Core.Context (>= 5.20.3) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 Fake.Core.Process (5.20.3) - restriction: >= netstandard2.0 @@ -57,9 +57,9 @@ NUGET Fake.Core.SemVer (>= 5.20.3) - restriction: >= netstandard2.0 Fake.Core.String (>= 5.20.3) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Core.SemVer (5.20.3) - restriction: >= netstandard2.0 + Fake.Core.SemVer (5.20.3) FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Core.String (5.20.3) - restriction: >= netstandard2.0 + Fake.Core.String (5.20.3) FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 Fake.Core.Target (5.20.3) Fake.Core.CommandLineParsing (>= 5.20.3) - restriction: >= netstandard2.0 @@ -71,10 +71,10 @@ NUGET Fake.Core.Trace (>= 5.20.3) - restriction: >= netstandard2.0 FSharp.Control.Reactive (>= 4.4.2) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Core.Tasks (5.20.3) - restriction: >= netstandard2.0 + Fake.Core.Tasks (5.20.3) Fake.Core.Trace (>= 5.20.3) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Core.Trace (5.20.3) - restriction: >= netstandard2.0 + Fake.Core.Trace (5.20.3) Fake.Core.Environment (>= 5.20.3) - restriction: >= netstandard2.0 Fake.Core.FakeVar (>= 5.20.3) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 @@ -135,13 +135,13 @@ NUGET Fake.IO.FileSystem (>= 5.20.3) - restriction: >= netstandard2.0 Fake.Testing.Common (>= 5.20.3) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (5.20.3) - restriction: >= netstandard2.0 + Fake.IO.FileSystem (5.20.3) Fake.Core.String (>= 5.20.3) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Net.Http (5.20.3) - restriction: >= netstandard2.0 + Fake.Net.Http (5.20.3) Fake.Core.Trace (>= 5.20.3) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - Fake.Testing.Common (5.20.3) - restriction: >= netstandard2.0 + Fake.Testing.Common (5.20.3) Fake.Core.Trace (>= 5.20.3) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 Fake.Tools.Git (5.20.3) @@ -158,10 +158,10 @@ NUGET FSharp.Control.Reactive (5.0.2) - restriction: >= netstandard2.0 FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 System.Reactive (>= 5.0) - restriction: >= netstandard2.0 - FSharp.Core (5.0.1) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (< monoandroid) (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (< monoandroid) (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= net461) (>= netcoreapp2.1)) (>= net472) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (>= netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.1) (>= xamarinwatchos)) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net461) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Build (16.9) - restriction: >= netstandard2.0 + FSharp.Core (6.0.1) - restriction: >= netstandard2.0 + Microsoft.Bcl.AsyncInterfaces (6.0) - restriction: || (&& (>= net461) (>= netcoreapp2.1)) (>= net472) (&& (>= netcoreapp2.1) (< netcoreapp3.1)) + System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net461) (&& (>= netstandard2.0) (< netstandard2.1)) + Microsoft.Build (16.9) Microsoft.Build.Framework (>= 16.9) - restriction: || (>= net472) (>= netcoreapp2.1) Microsoft.VisualStudio.Setup.Configuration.Interop (>= 1.16.30) - restriction: >= net472 Microsoft.Win32.Registry (>= 4.3) - restriction: >= netcoreapp2.1 @@ -172,9 +172,9 @@ NUGET System.Text.Encoding.CodePages (>= 4.0.1) - restriction: >= netcoreapp2.1 System.Text.Json (>= 4.7) - restriction: || (>= net472) (>= netcoreapp2.1) System.Threading.Tasks.Dataflow (>= 4.9) - restriction: || (>= net472) (>= netcoreapp2.1) - Microsoft.Build.Framework (16.9) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (16.9) System.Security.Permissions (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) - Microsoft.Build.Tasks.Core (16.9) - restriction: >= netstandard2.0 + Microsoft.Build.Tasks.Core (16.9) Microsoft.Build.Framework (>= 16.9) - restriction: >= netstandard2.0 Microsoft.Build.Utilities.Core (>= 16.9) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 1.16.30) - restriction: >= net472 @@ -189,63 +189,64 @@ NUGET System.Security.Cryptography.Xml (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) System.Security.Permissions (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) System.Threading.Tasks.Dataflow (>= 4.9) - restriction: >= netstandard2.0 - Microsoft.Build.Utilities.Core (16.9) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (16.9) Microsoft.Build.Framework (>= 16.9) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 1.16.30) - restriction: >= net472 Microsoft.Win32.Registry (>= 4.3) - restriction: && (< net472) (>= netstandard2.0) System.Collections.Immutable (>= 5.0) - restriction: >= netstandard2.0 System.Security.Permissions (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) System.Text.Encoding.CodePages (>= 4.0.1) - restriction: && (< net472) (>= netstandard2.0) - Microsoft.NETCore.Platforms (5.0.1) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp1.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net50) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.2) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.5) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (< net45) (>= net462) (>= netstandard2.0)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= netcoreapp1.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (>= netcoreapp2.0) (>= xamarinios)) (&& (>= netcoreapp2.0) (>= xamarinmac)) (&& (>= netcoreapp2.0) (>= xamarintvos)) (&& (>= netcoreapp2.0) (>= xamarinwatchos)) (>= netcoreapp2.1) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + Microsoft.NETCore.Platforms (6.0) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp1.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.2) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.5) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= net462) (>= netstandard2.0)) (&& (>= netcoreapp1.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp1.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.2) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.5) (>= netstandard2.0)) (&& (< net45) (>= net462) (>= netstandard2.0)) (&& (>= netcoreapp1.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - Microsoft.VisualStudio.Setup.Configuration.Interop (1.16.30) - restriction: >= net472 + Microsoft.VisualStudio.Setup.Configuration.Interop (3.0.4492) - restriction: >= net472 Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= monotouch) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) System.Security.AccessControl (>= 5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - Microsoft.Win32.SystemEvents (5.0) - restriction: && (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - Microsoft.NETCore.Platforms (>= 5.0) - restriction: >= netcoreapp2.0 + Microsoft.Win32.SystemEvents (6.0) - restriction: >= netcoreapp3.1 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.1.303) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.1.507) - restriction: >= netstandard2.0 Microsoft.Build (>= 16.4) - restriction: >= netstandard2.0 Microsoft.Build.Framework (>= 16.4) - restriction: >= netstandard2.0 Microsoft.Build.Tasks.Core (>= 16.4) - restriction: >= netstandard2.0 Microsoft.Build.Utilities.Core (>= 16.4) - restriction: >= netstandard2.0 - Newtonsoft.Json (12.0.3) - restriction: >= netstandard2.0 - NuGet.Common (5.9) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 5.9) - restriction: || (>= net45) (>= netstandard2.0) - NuGet.Configuration (5.9) - restriction: >= netstandard2.0 - NuGet.Common (>= 5.9) - restriction: || (>= net45) (>= netstandard2.0) + Newtonsoft.Json (13.0.1) - restriction: >= netstandard2.0 + NuGet.Common (6.0) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 6.0) - restriction: || (>= net45) (>= netstandard2.0) + NuGet.Configuration (6.0) - restriction: >= netstandard2.0 + NuGet.Common (>= 6.0) - restriction: || (>= net45) (>= netstandard2.0) System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net45) (>= netstandard2.0) - NuGet.Frameworks (5.9) - restriction: >= netstandard2.0 - NuGet.Packaging (5.9) - restriction: >= netstandard2.0 - Newtonsoft.Json (>= 9.0.1) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 5.9) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 5.9) - restriction: >= netstandard2.0 + NuGet.Frameworks (6.0) - restriction: >= netstandard2.0 + NuGet.Packaging (6.0) - restriction: >= netstandard2.0 + Newtonsoft.Json (>= 13.0.1) - restriction: >= netstandard2.0 + NuGet.Configuration (>= 6.0) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 6.0) - restriction: >= netstandard2.0 System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net50) System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net50) - NuGet.Protocol (5.9) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 5.9) - restriction: >= netstandard2.0 - NuGet.Versioning (5.9) - restriction: >= netstandard2.0 - System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= monoandroid) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= net50) (< netcoreapp2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= monotouch) (>= netstandard2.0)) (&& (>= net461) (>= netcoreapp2.1)) (>= net472) (&& (>= netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.1) (>= xamarinwatchos)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) - System.CodeDom (5.0) - restriction: && (< net472) (>= netstandard2.0) - System.Collections.Immutable (5.0) - restriction: || (&& (>= net461) (>= netcoreapp2.1)) (&& (< net50) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netstandard1.1)) (>= netstandard2.0) - System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (< netstandard2.0)) (>= net461) (>= uap10.1) - System.Drawing.Common (5.0.1) - restriction: >= netcoreapp3.0 - Microsoft.Win32.SystemEvents (>= 5.0) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - System.Formats.Asn1 (5.0) - restriction: || (&& (>= monoandroid) (>= net50) (< netcoreapp2.0) (< netstandard2.1)) (&& (>= monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (&& (< monoandroid) (>= net50) (< netcoreapp2.0)) (&& (< monoandroid) (>= net50) (< netcoreapp2.1) (< netstandard2.1)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.1)) (&& (>= monotouch) (>= net50)) (&& (>= monotouch) (>= netstandard2.0)) (&& (>= net50) (>= uap10.1)) (&& (>= net50) (>= xamarintvos)) (&& (>= net50) (< xamarintvos) (< xamarinwatchos)) (&& (>= net50) (>= xamarinwatchos)) (>= netcoreapp3.0) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) - System.IO (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp1.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net50) (< netstandard1.4)) (&& (< monoandroid) (>= net50) (< netstandard1.6)) (&& (< monoandroid) (>= net50) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.5) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp1.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net50) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net50) (< netstandard1.4)) (&& (>= net461) (>= net50) (< netstandard1.6)) (&& (>= net462) (>= net50) (< netstandard1.4)) (&& (>= net462) (>= net50) (< netstandard1.6)) (&& (>= net463) (>= net50) (< netstandard1.4)) (&& (>= net463) (>= net50) (< netstandard1.6)) (&& (>= net463) (>= net50) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net50)) + NuGet.Protocol (6.0) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 6.0) - restriction: >= netstandard2.0 + NuGet.Versioning (6.0) - restriction: >= netstandard2.0 + System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (< monoandroid) (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (< monoandroid) (>= netcoreapp2.1) (< netstandard1.1)) (&& (< monoandroid) (>= netcoreapp2.1) (< netstandard2.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= net45) (>= netcoreapp2.1) (< netstandard2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (< net461) (>= netstandard2.0)) (>= net472) (&& (>= netcoreapp2.1) (< netcoreapp3.1)) (&& (>= netcoreapp2.1) (< netstandard1.1) (>= win8)) (&& (>= netcoreapp2.1) (< netstandard2.0) (>= wpa81)) (&& (>= netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.1) (>= xamarinwatchos)) (>= netstandard2.1) + System.CodeDom (6.0) - restriction: && (< net472) (>= netstandard2.0) + System.Collections.Immutable (6.0) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.4) - restriction: || (>= net461) (>= netstandard2.0) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net461) (>= netstandard2.0) + System.Drawing.Common (6.0) - restriction: >= netcoreapp3.1 + Microsoft.Win32.SystemEvents (>= 6.0) - restriction: >= netcoreapp3.1 + System.Formats.Asn1 (6.0) - restriction: || (&& (< net461) (>= netstandard2.0)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) + System.Buffers (>= 4.5.1) - restriction: || (>= net461) (>= netstandard2.0) + System.Memory (>= 4.5.4) - restriction: || (>= net461) (>= netstandard2.0) + System.IO (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp1.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.5) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp1.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) System.Text.Encoding (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) System.Threading.Tasks (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) - System.Memory (4.5.4) - restriction: || (&& (< monoandroid) (>= net50) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (>= net472) (&& (>= net50) (>= uap10.1)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) + System.Memory (4.5.4) - restriction: || (&& (>= net461) (>= netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.1)) (>= netstandard2.0) System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Numerics.Vectors (>= 4.5) - restriction: >= net461 System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Numerics.Vectors (4.5) - restriction: || (&& (< monoandroid) (< netcoreapp2.0) (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netcoreapp2.1)) (>= net472) + System.Numerics.Vectors (4.5) - restriction: || (&& (>= net461) (>= netcoreapp2.1)) (>= net472) (&& (>= netcoreapp2.1) (< netcoreapp3.1)) System.Reactive (5.0) - restriction: >= netstandard2.0 System.Runtime.InteropServices.WindowsRuntime (>= 4.3) - restriction: && (< net472) (< netcoreapp3.1) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net472) (&& (< netcoreapp3.1) (>= netstandard2.0)) (>= uap10.1) @@ -255,19 +256,19 @@ NUGET System.IO (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) System.Reflection.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) - System.Reflection.Metadata (5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) - System.Collections.Immutable (>= 5.0) - restriction: || (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< net50) (>= netstandard2.0)) (&& (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (>= net461) (&& (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) + System.Reflection.Metadata (6.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) + System.Collections.Immutable (>= 6.0) - restriction: || (>= net461) (>= netstandard2.0) System.Reflection.Primitives (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp1.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.5) (>= netstandard2.0)) (&& (>= netcoreapp1.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Reflection.TypeExtensions (4.7) - restriction: && (< net472) (>= netstandard2.0) - System.Resources.Extensions (5.0) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) - System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp1.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net50) (< netstandard1.4)) (&& (< monoandroid) (>= net50) (< netstandard1.6)) (&& (< monoandroid) (>= net50) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.5) (>= netstandard2.0)) (&& (>= net46) (>= net50) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net50) (< netstandard1.4)) (&& (>= net461) (>= net50) (< netstandard1.6)) (&& (>= net462) (< net472) (>= netstandard2.0)) (&& (>= net462) (>= net50) (< netstandard1.4)) (&& (>= net462) (>= net50) (< netstandard1.6)) (&& (>= net463) (>= net50) (< netstandard1.4)) (&& (>= net463) (>= net50) (< netstandard1.6)) (&& (>= net463) (>= net50) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net50)) (&& (>= netcoreapp1.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + System.Resources.Extensions (6.0) - restriction: >= netstandard2.0 + System.Memory (>= 4.5.4) - restriction: || (>= net461) (>= netstandard2.0) + System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp1.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.5) (>= netstandard2.0)) (&& (>= net462) (< net472) (>= netstandard2.0)) (&& (>= netcoreapp1.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.2) (< win8) (< wp8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.2) (< win8) (< wp8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) - System.Runtime.CompilerServices.Unsafe (5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (< monoandroid) (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net50) (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (< monoandroid) (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (< monoandroid) (>= netcoreapp2.1) (< netstandard1.1)) (&& (< monoandroid) (>= netcoreapp2.1) (< netstandard2.0)) (&& (< monoandroid) (< netstandard1.0) (>= netstandard2.0) (< win8)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= net45) (>= netcoreapp2.1) (< netstandard2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= net461) (>= netstandard2.0)) (>= net472) (&& (>= netcoreapp2.1) (< netstandard1.1) (>= win8)) (&& (>= netcoreapp2.1) (< netstandard2.0) (>= wpa81)) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (>= netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.1) (>= xamarinwatchos)) (&& (< netstandard1.0) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= wp8)) + System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (>= net472) (>= netcoreapp2.1) System.Runtime.Handles (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp1.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (>= netcoreapp1.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) @@ -281,64 +282,57 @@ NUGET System.Runtime.Handles (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (< netcoreapp1.1) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (>= netcoreapp1.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Runtime.InteropServices.WindowsRuntime (4.3) - restriction: && (< net472) (< netcoreapp3.1) (>= netstandard2.0) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.AccessControl (5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) - Microsoft.NETCore.Platforms (>= 5.0) - restriction: >= netcoreapp2.0 - System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= net46) (< netstandard2.0)) (&& (< net46) (>= netstandard1.3) (< netstandard2.0) (< uap10.1)) (&& (< net46) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.0) - System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net50) (< netstandard1.4)) (&& (< monoandroid) (>= net50) (< netstandard1.6)) (&& (< monoandroid) (>= net50) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net50) (< netstandard1.4)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net461) (>= net50) (< netstandard1.6)) (&& (>= net462) (>= net50) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net50)) - System.IO (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (>= net463) - System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (>= net463) - System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) - System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< netstandard1.6)) (>= net463) - System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net472) (>= netstandard2.0)) (>= net50) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + System.Security.AccessControl (6.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) + System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net461) (>= netstandard2.0) + System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< net461) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= netstandard2.1) Microsoft.NETCore.Platforms (>= 5.0) - restriction: && (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Formats.Asn1 (>= 5.0) - restriction: && (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.Algorithms (>= 4.3.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6) (< uap10.1)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< net462) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6)) (>= net47) - System.Security.Cryptography.Encoding (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net50) (< netstandard1.4)) (&& (< monoandroid) (>= net50) (< netstandard1.6)) (&& (< monoandroid) (>= net50) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net50) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net50) (< netstandard1.6)) (&& (>= net462) (>= net50) (< netstandard1.6)) (&& (>= net463) (>= net50) (< netstandard1.4)) (&& (>= net463) (>= net50) (< netstandard1.6)) (&& (>= net463) (>= net50) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net50)) - System.Security.Cryptography.Pkcs (5.0.1) - restriction: || (&& (>= monoandroid) (>= netstandard2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net461) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) - System.Buffers (>= 4.5.1) - restriction: && (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Formats.Asn1 (>= 5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0) (< netstandard2.1)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.1)) (>= monotouch) (>= netcoreapp3.0) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) - System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - System.Security.Cryptography.Primitives (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net50) (< netstandard1.4)) (&& (< monoandroid) (>= net50) (< netstandard1.6)) (&& (< monoandroid) (>= net50) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net50) (< netstandard1.4)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net461) (>= net50) (< netstandard1.4)) (&& (>= net461) (>= net50) (< netstandard1.6)) (&& (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net462) (>= net50) (< netstandard1.4)) (&& (>= net462) (>= net50) (< netstandard1.6)) (&& (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net463) (>= net50) (< netstandard1.4)) (&& (>= net463) (>= net50) (< netstandard1.6)) (&& (>= net463) (>= net50) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net50)) (&& (>= net47) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net47) (< netstandard1.6) (>= netstandard2.0)) - System.Security.Cryptography.ProtectedData (5.0) - restriction: && (< net45) (>= netstandard2.0) - System.Memory (>= 4.5.4) - restriction: && (< monoandroid) (< net46) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.Xml (5.0) - restriction: && (< net472) (>= netstandard2.0) - System.Memory (>= 4.5.4) - restriction: && (< monoandroid) (< net461) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (>= monoandroid) (>= monotouch) (&& (< net461) (>= netstandard2.0)) (>= netcoreapp2.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Security.Permissions (>= 5.0) - restriction: || (>= monoandroid) (>= monotouch) (>= net461) (>= netstandard2.0) (>= xamarintvos) (>= xamarinwatchos) - System.Security.Permissions (5.0) - restriction: || (&& (>= monoandroid) (>= netstandard2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) - System.Security.AccessControl (>= 5.0) - restriction: || (>= net461) (>= netstandard2.0) - System.Windows.Extensions (>= 5.0) - restriction: >= netcoreapp3.0 - System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.Security.Cryptography.Pkcs (6.0) - restriction: || (&& (< net461) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= net50) + System.Buffers (>= 4.5.1) - restriction: && (< net461) (>= netstandard2.0) (< netstandard2.1) + System.Formats.Asn1 (>= 6.0) - restriction: || (&& (< net461) (>= netstandard2.0)) (>= netstandard2.1) + System.Memory (>= 4.5.4) - restriction: && (< net461) (>= netstandard2.0) (< netstandard2.1) + System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net461) (>= netstandard2.0)) (>= netstandard2.1) + System.Security.Cryptography.ProtectedData (6.0) - restriction: && (< net45) (>= netstandard2.0) + System.Memory (>= 4.5.4) - restriction: && (< net461) (>= netstandard2.0) + System.Security.Cryptography.Xml (6.0) - restriction: && (< net472) (>= netstandard2.0) + System.Memory (>= 4.5.4) - restriction: && (< net461) (>= netstandard2.0) + System.Security.AccessControl (>= 6.0) - restriction: || (>= net461) (>= netstandard2.0) + System.Security.Cryptography.Pkcs (>= 6.0) - restriction: && (< net461) (>= netstandard2.0) + System.Security.Permissions (6.0) - restriction: && (< net472) (>= netstandard2.0) + System.Security.AccessControl (>= 6.0) - restriction: || (>= net461) (>= netstandard2.0) + System.Windows.Extensions (>= 6.0) - restriction: >= netcoreapp3.1 + System.Security.Principal.Windows (5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) System.Text.Encoding (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp1.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.5) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp1.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Text.Encoding.CodePages (5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) - Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net50) - System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net50) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) - System.Text.Encodings.Web (5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (< monoandroid) (< netcoreapp2.0) (>= netcoreapp2.1)) (&& (< monoandroid) (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= monotouch) (>= netcoreapp2.1)) (&& (>= net461) (>= netcoreapp2.1)) (>= net472) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (>= netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.1) (>= xamarinwatchos)) - System.Memory (>= 4.5.4) - restriction: || (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) (>= net461) (>= uap10.1) - System.Text.Json (5.0.1) - restriction: || (>= net472) (>= netcoreapp2.1) - Microsoft.Bcl.AsyncInterfaces (>= 5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.1) (< netcoreapp3.0)) (>= monotouch) (>= net461) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0)) (>= monotouch) (>= net461) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (>= uap10.1) - System.Numerics.Vectors (>= 4.5) - restriction: || (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) - System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.1) (< netcoreapp3.0)) (>= monotouch) (>= net461) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Text.Encodings.Web (>= 5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.1) (< netcoreapp3.0)) (>= monotouch) (>= net461) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (>= uap10.1) + System.Text.Encoding.CodePages (6.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) + System.Memory (>= 4.5.4) - restriction: || (>= net461) (&& (< netcoreapp3.1) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net461) (>= netstandard2.0) + System.Text.Encodings.Web (6.0) - restriction: || (>= net472) (>= netcoreapp2.1) + System.Buffers (>= 4.5.1) - restriction: || (>= net461) (&& (< netcoreapp3.1) (>= netstandard2.0)) + System.Memory (>= 4.5.4) - restriction: || (>= net461) (&& (< netcoreapp3.1) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net461) (>= netstandard2.0) + System.Text.Json (6.0) - restriction: || (>= net472) (>= netcoreapp2.1) + Microsoft.Bcl.AsyncInterfaces (>= 6.0) - restriction: || (>= net461) (&& (< netcoreapp3.1) (>= netstandard2.0)) + System.Buffers (>= 4.5.1) - restriction: || (>= net461) (&& (< netcoreapp3.1) (>= netstandard2.0)) + System.Memory (>= 4.5.4) - restriction: || (>= net461) (&& (< netcoreapp3.1) (>= netstandard2.0)) + System.Numerics.Vectors (>= 4.5) - restriction: || (>= net461) (&& (< netcoreapp3.1) (>= netstandard2.0)) + System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net461) (>= netstandard2.0) + System.Text.Encodings.Web (>= 6.0) - restriction: || (>= net461) (>= netstandard2.0) + System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net461) (&& (< netcoreapp3.1) (>= netstandard2.0)) System.ValueTuple (>= 4.5) - restriction: >= net461 System.Threading.Tasks (4.3) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp1.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp1.1) (< netstandard1.5) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp1.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.3) (< win8) (< wp8) (< wpa81)) - System.Threading.Tasks.Dataflow (5.0) - restriction: >= netstandard2.0 - System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (< monoandroid) (< netcoreapp2.0) (>= netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netcoreapp2.1)) (>= net472) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (< netcoreapp3.1) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Threading.Tasks.Dataflow (6.0) - restriction: >= netstandard2.0 + System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (>= net461) (>= netcoreapp2.1)) (>= net472) (&& (>= netcoreapp2.1) (< netcoreapp3.1)) (&& (>= netcoreapp2.1) (< netstandard2.1)) (&& (< netcoreapp3.1) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= uap10.1)) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< win8)) (&& (>= net45) (< netstandard2.0)) (>= net461) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= wp8) System.ValueTuple (4.5) - restriction: || (&& (>= net45) (>= netstandard2.0)) (&& (>= net461) (>= netcoreapp2.1)) (>= net472) - System.Windows.Extensions (5.0) - restriction: >= netcoreapp3.0 - System.Drawing.Common (>= 5.0) - restriction: >= netcoreapp3.0 + System.Windows.Extensions (6.0) - restriction: >= netcoreapp3.1 + System.Drawing.Common (>= 6.0) - restriction: >= netcoreapp3.1 GROUP Test RESTRICTION: == net50 @@ -346,657 +340,33 @@ NUGET remote: https://api.nuget.org/v3/index.json FsCheck (2.15.1) FSharp.Core (>= 4.2.3) - FSharp.Compiler.Service (39.0) - FSharp.Core (5.0.1) - Microsoft.Build.Framework (>= 16.6) - Microsoft.Build.Tasks.Core (>= 16.6) - Microsoft.Build.Utilities.Core (>= 16.6) - System.Buffers (>= 4.5.1) - System.Collections.Immutable (>= 5.0) - System.Diagnostics.Process (>= 4.3) - System.Diagnostics.TraceSource (>= 4.3) - System.Linq.Expressions (>= 4.3) - System.Linq.Queryable (>= 4.3) - System.Memory (>= 4.5.4) - System.Net.Requests (>= 4.3) - System.Net.Security (>= 4.3) - System.Reflection.Emit (>= 4.3) - System.Reflection.Metadata (>= 5.0) - System.Reflection.TypeExtensions (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Runtime.Loader (>= 4.3) - System.Security.Claims (>= 4.3) - System.Security.Cryptography.Algorithms (>= 4.3) - System.Security.Principal (>= 4.3) - System.Threading.Tasks.Parallel (>= 4.3) - System.Threading.Thread (>= 4.3) - System.Threading.ThreadPool (>= 4.3) FSharp.Core (5.0.1) - FSharp.Formatting (8.0.1) - FSharp.Compiler.Service (>= 38.0.2) FsUnit (4.0.4) FSharp.Core (>= 4.3.4) NETStandard.Library (>= 2.0.3) NUnit (>= 3.13 < 4.0) - Microsoft.Build.Framework (16.9) - System.Security.Permissions (>= 4.7) - Microsoft.Build.Tasks.Core (16.9) - Microsoft.Build.Framework (>= 16.9) - Microsoft.Build.Utilities.Core (>= 16.9) - Microsoft.Win32.Registry (>= 4.3) - System.CodeDom (>= 4.4) - System.Collections.Immutable (>= 5.0) - System.Reflection.Metadata (>= 1.6) - System.Reflection.TypeExtensions (>= 4.1) - System.Resources.Extensions (>= 4.6) - System.Runtime.InteropServices (>= 4.3) - System.Security.Cryptography.Pkcs (>= 4.7) - System.Security.Cryptography.Xml (>= 4.7) - System.Security.Permissions (>= 4.7) - System.Threading.Tasks.Dataflow (>= 4.9) - Microsoft.Build.Utilities.Core (16.9) - Microsoft.Build.Framework (>= 16.9) - Microsoft.Win32.Registry (>= 4.3) - System.Collections.Immutable (>= 5.0) - System.Security.Permissions (>= 4.7) - System.Text.Encoding.CodePages (>= 4.0.1) - Microsoft.CodeCoverage (16.9.1) - Microsoft.DotNet.InternalAbstractions (1.0) - System.AppContext (>= 4.1) - System.Collections (>= 4.0.11) - System.IO (>= 4.1) - System.IO.FileSystem (>= 4.0.1) - System.Reflection.TypeExtensions (>= 4.1) - System.Runtime.Extensions (>= 4.1) - System.Runtime.InteropServices (>= 4.1) - System.Runtime.InteropServices.RuntimeInformation (>= 4.0) - Microsoft.NET.Test.Sdk (16.9.1) - Microsoft.CodeCoverage (>= 16.9.1) - Microsoft.TestPlatform.TestHost (>= 16.9.1) - Microsoft.NETCore.Platforms (5.0.1) - Microsoft.NETCore.Targets (5.0) - Microsoft.TestPlatform.ObjectModel (16.9.1) + Microsoft.CodeCoverage (17.0) + Microsoft.NET.Test.Sdk (17.0) + Microsoft.CodeCoverage (>= 17.0) + Microsoft.TestPlatform.TestHost (>= 17.0) + Microsoft.NETCore.Platforms (6.0) + Microsoft.TestPlatform.ObjectModel (17.0) NuGet.Frameworks (>= 5.0) System.Reflection.Metadata (>= 1.6) - Microsoft.TestPlatform.TestHost (16.9.1) - Microsoft.TestPlatform.ObjectModel (>= 16.9.1) + Microsoft.TestPlatform.TestHost (17.0) + Microsoft.TestPlatform.ObjectModel (>= 17.0) Newtonsoft.Json (>= 9.0.1) - Microsoft.Win32.Primitives (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - Microsoft.Win32.Registry (5.0) - System.Security.AccessControl (>= 5.0) - System.Security.Principal.Windows (>= 5.0) - Microsoft.Win32.SystemEvents (5.0) - Microsoft.NETCore.Platforms (>= 5.0) NETStandard.Library (2.0.3) Microsoft.NETCore.Platforms (>= 1.1) - Newtonsoft.Json (12.0.3) - NuGet.Frameworks (5.9) + Newtonsoft.Json (13.0.1) + NuGet.Frameworks (6.0) NUnit (3.13.1) NETStandard.Library (>= 2.0) - NUnit3TestAdapter (3.17) - Microsoft.DotNet.InternalAbstractions (>= 1.0) - System.ComponentModel.EventBasedAsync (>= 4.3) - System.ComponentModel.TypeConverter (>= 4.3) - System.Diagnostics.Process (>= 4.3) - System.Reflection (>= 4.3) - System.Runtime.InteropServices.RuntimeInformation (>= 4.3) - System.Threading.Thread (>= 4.3) - System.Xml.XmlDocument (>= 4.3) - System.Xml.XPath.XmlDocument (>= 4.3) - runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.native.System (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) - runtime.native.System.Net.Http (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) - runtime.native.System.Net.Security (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) - runtime.native.System.Security.Cryptography.Apple (4.3.1) - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) - runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.debian.9-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.fedora.27-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.fedora.28-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.opensuse.42.3-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.3) - runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.opensuse.42.3-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (4.3.1) - runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) - System.AppContext (4.3) - System.Runtime (>= 4.3) - System.Buffers (4.5.1) - System.CodeDom (5.0) - System.Collections (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Collections.Concurrent (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Diagnostics.Tracing (>= 4.3) - System.Globalization (>= 4.3) - System.Reflection (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Collections.Immutable (5.0) - System.Collections.NonGeneric (4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Collections.Specialized (4.3) - System.Collections.NonGeneric (>= 4.3) - System.Globalization (>= 4.3) - System.Globalization.Extensions (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.ComponentModel (4.3) - System.Runtime (>= 4.3) - System.ComponentModel.EventBasedAsync (4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.ComponentModel.Primitives (4.3) - System.ComponentModel (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.ComponentModel.TypeConverter (4.3) - System.Collections (>= 4.3) - System.Collections.NonGeneric (>= 4.3) - System.Collections.Specialized (>= 4.3) - System.ComponentModel (>= 4.3) - System.ComponentModel.Primitives (>= 4.3) - System.Globalization (>= 4.3) - System.Linq (>= 4.3) - System.Reflection (>= 4.3) - System.Reflection.Extensions (>= 4.3) - System.Reflection.Primitives (>= 4.3) - System.Reflection.TypeExtensions (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Diagnostics.Debug (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Diagnostics.DiagnosticSource (5.0.1) - System.Diagnostics.Process (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.Win32.Primitives (>= 4.3) - Microsoft.Win32.Registry (>= 4.3) - runtime.native.System (>= 4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.IO.FileSystem (>= 4.3) - System.IO.FileSystem.Primitives (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Text.Encoding.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Threading.Thread (>= 4.3) - System.Threading.ThreadPool (>= 4.3) - System.Diagnostics.TraceSource (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - runtime.native.System (>= 4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Diagnostics.Tracing (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Drawing.Common (5.0.1) - Microsoft.Win32.SystemEvents (>= 5.0) - System.Formats.Asn1 (5.0) - System.Globalization (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Globalization.Calendars (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Globalization (>= 4.3) - System.Runtime (>= 4.3) - System.Globalization.Extensions (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - System.Globalization (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.IO (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.IO.FileSystem (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.IO (>= 4.3) - System.IO.FileSystem.Primitives (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.IO.FileSystem.Primitives (4.3) - System.Runtime (>= 4.3) - System.Linq (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Linq.Expressions (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.Linq (>= 4.3) - System.ObjectModel (>= 4.3) - System.Reflection (>= 4.3) - System.Reflection.Emit (>= 4.3) - System.Reflection.Emit.ILGeneration (>= 4.3) - System.Reflection.Emit.Lightweight (>= 4.3) - System.Reflection.Extensions (>= 4.3) - System.Reflection.Primitives (>= 4.3) - System.Reflection.TypeExtensions (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Linq.Queryable (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Linq (>= 4.3) - System.Linq.Expressions (>= 4.3) - System.Reflection (>= 4.3) - System.Reflection.Extensions (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) + NUnit3TestAdapter (4.1) + System.Collections.Immutable (6.0) + System.Memory (>= 4.5.4) + System.Runtime.CompilerServices.Unsafe (>= 6.0) System.Memory (4.5.4) - System.Net.Http (4.3.4) - Microsoft.NETCore.Platforms (>= 1.1.1) - runtime.native.System (>= 4.3) - runtime.native.System.Net.Http (>= 4.3) - runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Diagnostics.DiagnosticSource (>= 4.3) - System.Diagnostics.Tracing (>= 4.3) - System.Globalization (>= 4.3) - System.Globalization.Extensions (>= 4.3) - System.IO (>= 4.3) - System.IO.FileSystem (>= 4.3) - System.Net.Primitives (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Security.Cryptography.Algorithms (>= 4.3) - System.Security.Cryptography.Encoding (>= 4.3) - System.Security.Cryptography.OpenSsl (>= 4.3) - System.Security.Cryptography.Primitives (>= 4.3) - System.Security.Cryptography.X509Certificates (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Net.Primitives (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) - System.Runtime (>= 4.3.1) - System.Runtime.Handles (>= 4.3) - System.Net.Requests (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Diagnostics.Tracing (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.Net.Http (>= 4.3) - System.Net.Primitives (>= 4.3) - System.Net.WebHeaderCollection (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Net.Security (4.3.2) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.Win32.Primitives (>= 4.3) - runtime.native.System (>= 4.3) - runtime.native.System.Net.Security (>= 4.3) - runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - System.Collections (>= 4.3) - System.Collections.Concurrent (>= 4.3) - System.Diagnostics.Tracing (>= 4.3) - System.Globalization (>= 4.3) - System.Globalization.Extensions (>= 4.3) - System.IO (>= 4.3) - System.Net.Primitives (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Security.Claims (>= 4.3) - System.Security.Cryptography.Algorithms (>= 4.3) - System.Security.Cryptography.Encoding (>= 4.3) - System.Security.Cryptography.OpenSsl (>= 4.3) - System.Security.Cryptography.Primitives (>= 4.3) - System.Security.Cryptography.X509Certificates (>= 4.3) - System.Security.Principal (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Threading.ThreadPool (>= 4.3) - System.Net.WebHeaderCollection (4.3) - System.Collections (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.ObjectModel (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Threading (>= 4.3) - System.Reflection (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.IO (>= 4.3) - System.Reflection.Primitives (>= 4.3) - System.Runtime (>= 4.3) - System.Reflection.Emit (4.7) - System.Reflection.Emit.ILGeneration (4.7) - System.Reflection.Emit.Lightweight (4.7) - System.Reflection.Extensions (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Reflection (>= 4.3) - System.Runtime (>= 4.3) - System.Reflection.Metadata (5.0) - System.Reflection.Primitives (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Reflection.TypeExtensions (4.7) - System.Resources.Extensions (5.0) - System.Resources.ResourceManager (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Globalization (>= 4.3) - System.Reflection (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) - System.Runtime.Extensions (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1.1) - Microsoft.NETCore.Targets (>= 1.1.3) - System.Runtime (>= 4.3.1) - System.Runtime.Handles (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Runtime.InteropServices (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Reflection (>= 4.3) - System.Reflection.Primitives (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices.RuntimeInformation (4.3) - runtime.native.System (>= 4.3) - System.Reflection (>= 4.3) - System.Reflection.Extensions (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Threading (>= 4.3) - System.Runtime.Loader (4.3) - System.IO (>= 4.3) - System.Reflection (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Numerics (4.3) - System.Globalization (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Security.AccessControl (5.0) - Microsoft.NETCore.Platforms (>= 5.0) - System.Security.Principal.Windows (>= 5.0) - System.Security.Claims (4.3) - System.Collections (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Security.Principal (>= 4.3) - System.Security.Cryptography.Algorithms (4.3.1) - Microsoft.NETCore.Platforms (>= 1.1) - runtime.native.System.Security.Cryptography.Apple (>= 4.3.1) - runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - System.Collections (>= 4.3) - System.IO (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Runtime.Numerics (>= 4.3) - System.Security.Cryptography.Encoding (>= 4.3) - System.Security.Cryptography.Primitives (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Security.Cryptography.Cng (5.0) - System.Formats.Asn1 (>= 5.0) - System.Security.Cryptography.Csp (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - System.IO (>= 4.3) - System.Reflection (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Security.Cryptography.Algorithms (>= 4.3) - System.Security.Cryptography.Encoding (>= 4.3) - System.Security.Cryptography.Primitives (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (>= 4.3) - System.Security.Cryptography.Encoding (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - System.Collections (>= 4.3) - System.Collections.Concurrent (>= 4.3) - System.Linq (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Security.Cryptography.Primitives (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Security.Cryptography.OpenSsl (5.0) - System.Formats.Asn1 (>= 5.0) - System.Security.Cryptography.Pkcs (5.0.1) - System.Formats.Asn1 (>= 5.0) - System.Security.Cryptography.Cng (>= 5.0) - System.Security.Cryptography.Primitives (4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Security.Cryptography.X509Certificates (4.3.2) - Microsoft.NETCore.Platforms (>= 1.1) - runtime.native.System (>= 4.3) - runtime.native.System.Net.Http (>= 4.3) - runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.2) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.Globalization.Calendars (>= 4.3) - System.IO (>= 4.3) - System.IO.FileSystem (>= 4.3) - System.IO.FileSystem.Primitives (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Runtime.Numerics (>= 4.3) - System.Security.Cryptography.Algorithms (>= 4.3) - System.Security.Cryptography.Cng (>= 4.3) - System.Security.Cryptography.Csp (>= 4.3) - System.Security.Cryptography.Encoding (>= 4.3) - System.Security.Cryptography.OpenSsl (>= 4.3) - System.Security.Cryptography.Primitives (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (>= 4.3) - System.Security.Cryptography.Xml (5.0) - System.Security.Cryptography.Pkcs (>= 5.0) - System.Security.Permissions (>= 5.0) - System.Security.Permissions (5.0) - System.Security.AccessControl (>= 5.0) - System.Windows.Extensions (>= 5.0) - System.Security.Principal (4.3) - System.Runtime (>= 4.3) - System.Security.Principal.Windows (5.0) - System.Text.Encoding (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Text.Encoding.CodePages (5.0) - Microsoft.NETCore.Platforms (>= 5.0) - System.Text.Encoding.Extensions (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Text.RegularExpressions (4.3.1) - System.Runtime (>= 4.3.1) - System.Threading (4.3) - System.Runtime (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Threading.Tasks (4.3) - Microsoft.NETCore.Platforms (>= 1.1) - Microsoft.NETCore.Targets (>= 1.1) - System.Runtime (>= 4.3) - System.Threading.Tasks.Dataflow (5.0) - System.Threading.Tasks.Extensions (4.5.4) - System.Threading.Tasks.Parallel (4.3) - System.Collections.Concurrent (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Diagnostics.Tracing (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Threading.Thread (4.3) - System.Runtime (>= 4.3) - System.Threading.ThreadPool (4.3) - System.Runtime (>= 4.3) - System.Runtime.Handles (>= 4.3) - System.Windows.Extensions (5.0) - System.Drawing.Common (>= 5.0) - System.Xml.ReaderWriter (4.3.1) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.IO.FileSystem (>= 4.3) - System.IO.FileSystem.Primitives (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Runtime.InteropServices (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Text.Encoding.Extensions (>= 4.3) - System.Text.RegularExpressions (>= 4.3) - System.Threading.Tasks (>= 4.3) - System.Threading.Tasks.Extensions (>= 4.3) - System.Xml.XmlDocument (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Text.Encoding (>= 4.3) - System.Threading (>= 4.3) - System.Xml.ReaderWriter (>= 4.3) - System.Xml.XPath (4.3) - System.Collections (>= 4.3) - System.Diagnostics.Debug (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Xml.ReaderWriter (>= 4.3) - System.Xml.XPath.XmlDocument (4.3) - System.Collections (>= 4.3) - System.Globalization (>= 4.3) - System.IO (>= 4.3) - System.Resources.ResourceManager (>= 4.3) - System.Runtime (>= 4.3) - System.Runtime.Extensions (>= 4.3) - System.Threading (>= 4.3) - System.Xml.ReaderWriter (>= 4.3) - System.Xml.XmlDocument (>= 4.3) - System.Xml.XPath (>= 4.3) + System.Reflection.Metadata (6.0) + System.Collections.Immutable (>= 6.0) + System.Runtime.CompilerServices.Unsafe (6.0) diff --git a/src/FSharp.Data.DesignTime/paket.references b/src/FSharp.Data.DesignTime/paket.references index 68f80c0e3..202e6f980 100644 --- a/src/FSharp.Data.DesignTime/paket.references +++ b/src/FSharp.Data.DesignTime/paket.references @@ -1 +1,2 @@ Microsoft.SourceLink.GitHub +FSharp.Core \ No newline at end of file diff --git a/src/FSharp.Data/paket.references b/src/FSharp.Data/paket.references index 68f80c0e3..c89b441a0 100644 --- a/src/FSharp.Data/paket.references +++ b/src/FSharp.Data/paket.references @@ -1 +1,2 @@ Microsoft.SourceLink.GitHub +FSharp.Core diff --git a/tests/FSharp.Data.DesignTime.Tests/DocumentationTests.fs b/tests/FSharp.Data.DesignTime.Tests/DocumentationTests.fs deleted file mode 100644 index f21ec25cc..000000000 --- a/tests/FSharp.Data.DesignTime.Tests/DocumentationTests.fs +++ /dev/null @@ -1,54 +0,0 @@ -module FSharp.Data.DesignTime.Tests.DocumentationTests - -open NUnit.Framework -open System.IO -open FSharp.Formatting.Literate -open FSharp.Formatting.CodeFormat - -// Initialization of the test - lookup the documentation files, -// create temp folder for the output and load the F# compiler DLL - -let (@@) a b = Path.Combine(a, b) - -let sources = __SOURCE_DIRECTORY__ @@ "../../docs" -let runningOnMono = try System.Type.GetType("Mono.Runtime") <> null with e -> false - -let output = Path.GetTempPath() @@ "FSharp.Data.Docs" - -if Directory.Exists(output) then Directory.Delete(output, true) -Directory.CreateDirectory(output) |> ignore - -/// Process a specified file in the documentation folder and return -/// the total number of unexpected errors found (print them to the output too) -let processFile file = - printfn "Processing '%s'" file - - let dir = Path.GetDirectoryName(Path.Combine(output, file)) - if not (Directory.Exists(dir)) then Directory.CreateDirectory(dir) |> ignore - - let evaluationErrors = ResizeArray() - let literateDoc = Literate.ParseAndCheckScriptFile(Path.Combine(sources, file)) - [| for (SourceError(startl, endl, kind, msg)) in literateDoc.Diagnostics do - if msg <> "Multiple references to 'mscorlib.dll' are not permitted" && - not (msg.Contains("Possible incorrect indentation: this token is offside of context started at position")) then - yield sprintf "%A %s (%s)" (startl, endl) msg file - for x in evaluationErrors do - yield x.ToString() - |] |> String.concat "\n" - -// ------------------------------------------------------------------------------------ -// Core API documentation - -let docFiles = - seq { for sub in [ "library"; "tutorials"; "ja/library"; "ja/tutorials"; ] do - for file in Directory.EnumerateFiles(Path.Combine(sources, sub), "*.fsx") do - yield sub + "/" + Path.GetFileName(file) } - -[<Test>] -[<TestCaseSource "docFiles">] -let ``Documentation generated correctly `` file = - if runningOnMono then - let errors = processFile file - if errors <> "" then - Assert.Fail("Found errors when processing file '" + file + "':\n" + errors) - diff --git a/tests/FSharp.Data.DesignTime.Tests/FSharp.Data.DesignTime.Tests.fsproj b/tests/FSharp.Data.DesignTime.Tests/FSharp.Data.DesignTime.Tests.fsproj index 9481cb66c..007724413 100644 --- a/tests/FSharp.Data.DesignTime.Tests/FSharp.Data.DesignTime.Tests.fsproj +++ b/tests/FSharp.Data.DesignTime.Tests/FSharp.Data.DesignTime.Tests.fsproj @@ -16,7 +16,6 @@ <Compile Include="InferenceTests.fs" /> <None Include="SignatureTestCases.config" /> <Compile Include="SignatureTests.fs" /> - <Compile Include="DocumentationTests.fs" /> <Compile Include="Program.fs" /> </ItemGroup> <ItemGroup> diff --git a/tests/FSharp.Data.DesignTime.Tests/paket.references b/tests/FSharp.Data.DesignTime.Tests/paket.references index 0639f5464..16064003a 100644 --- a/tests/FSharp.Data.DesignTime.Tests/paket.references +++ b/tests/FSharp.Data.DesignTime.Tests/paket.references @@ -4,4 +4,4 @@ group Test NUnit NUnit3TestAdapter FsUnit - FSharp.Formatting \ No newline at end of file + \ No newline at end of file