diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json deleted file mode 100644 index aeb9256..0000000 --- a/.config/dotnet-tools.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "version": 1, - "isRoot": true, - "tools": { - "paket": { - "version": "9.0.2", - "commands": [ - "paket" - ] - }, - "fake-cli": { - "version": "6.1.3", - "commands": [ - "fake" - ] - } - } -} \ No newline at end of file diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 5913d8b..0000000 --- a/.gitattributes +++ /dev/null @@ -1,7 +0,0 @@ -* text=auto -*.cs text eol=lf diff=csharp -*.fs text eol=lf -*.sln text eol=crlf merge=union -*.csproj text merge=union -*.fsproj text merge=union -*.sh text eol=lf \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 86eed43..0000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,30 +0,0 @@ -### Description - -Please provide a succinct description of your issue. - -### Repro steps - -Please provide the steps required to reproduce the problem - -1. Step A - -2. Step B - -### Expected behavior - -Please provide a description of the behavior you expect. - -### Actual behavior - -Please provide a description of the actual behavior you observe. - -### Known workarounds - -Please provide a description of any known workarounds. - -### Related information - -* Operating system -* Branch -* .NET Runtime, CoreCLR or Mono Version -* Performance information, links to performance testing scripts diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 3802ae5..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: CI Build - -env: - # Stop wasting time caching packages - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - # Disable sending usage data to Microsoft - DOTNET_CLI_TELEMETRY_OPTOUT: true - -on: - push: - tags: - - v[0-9]+.[0-9]+.[0-9]+* - branches: [master] - pull_request: - branches: [master] - -jobs: - build: - runs-on: windows-latest - permissions: - packages: write - contents: read - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup .NET Core - uses: actions/setup-dotnet@v4 - with: - dotnet-version: | - 8.0.x - - name: Set env - if: startsWith( github.ref, 'refs/tags/v' ) - run: | - chcp 65001 #set code page to utf-8 - $RELEASE_VERSION=$env:GITHUB_REF.Replace('refs/tags/', '') - echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $env:GITHUB_ENV - echo ("Version=" + $RELEASE_VERSION.Substring(1)) >> $env:GITHUB_ENV - - - name: Restore - run: dotnet tool restore - - name: Build - run: dotnet build -c Release - - name: Test - run: dotnet test --no-build -c Release tests - - name: Pack - run: dotnet pack --no-restore -c Release --include-symbols -o bin - - - name: Upload Test Results - if: failure() - uses: actions/upload-artifact@v4 - with: - name: verify-test-results - path: | - **/*.received.* - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - name: nupkg-${{ matrix.runs-on }} - path: ./bin/*nupkg - - name: Push - if: startsWith( github.ref, 'refs/tags/v' ) - run: dotnet nuget push bin\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_KEY }} diff --git a/.github/workflows/private-publish.yml b/.github/workflows/private-publish.yml deleted file mode 100644 index 9f92674..0000000 --- a/.github/workflows/private-publish.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Private Publish - -env: - # Stop wasting time caching packages - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - # Disable sending usage data to Microsoft - DOTNET_CLI_TELEMETRY_OPTOUT: true - -on: - workflow_dispatch: - -jobs: - build: - runs-on: windows-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup .NET Core - uses: actions/setup-dotnet@v4 - with: - dotnet-version: | - 8.0.x - - name: Restore - run: dotnet tool restore - - name: Build - run: dotnet build -c Release - - name: Test - run: dotnet test --no-build -c Release tests - - name: Pack - run: dotnet pack --no-restore -c Release --include-symbols -o bin - - name: Push Package to Local Feed - run: dotnet nuget push bin\*.nupkg -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json -k ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 3125d17..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: NuGet Publish - -env: - # Stop wasting time caching packages - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - # Disable sending usage data to Microsoft - DOTNET_CLI_TELEMETRY_OPTOUT: true - -on: - workflow_dispatch: - -jobs: - build: - runs-on: windows-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Setup .NET Core - uses: actions/setup-dotnet@v4 - with: - dotnet-version: | - 8.0.x - - name: Set env - if: startsWith( github.ref, 'refs/tags/v' ) - run: | - chcp 65001 #set code page to utf-8 - $RELEASE_VERSION=$env:GITHUB_REF.Replace('refs/tags/', '') - echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $env:GITHUB_ENV - echo ("Version=" + $RELEASE_VERSION.Substring(1)) >> $env:GITHUB_ENV - - name: Restore - run: dotnet tool restore - - name: Build - run: dotnet build -c Release - - name: Test - run: dotnet test --no-build -c Release tests - - name: Pack - run: dotnet pack --no-restore -c Release --include-symbols -o bin - - name: Push - if: startsWith( github.ref, 'refs/tags/v' ) - run: dotnet nuget push bin\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_KEY }} diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 8592eca..0000000 --- a/.gitignore +++ /dev/null @@ -1,43 +0,0 @@ -#ignore thumbnails created by windows -Thumbs.db -#Ignore files build by Visual Studio -*.obj -*.pdb -*.user -*.aps -*.pch -*.vspscc -*_i.c -*_p.c -*.ncb -*.suo -*.tlb -*.tlh -*.bak -*.cache -*.ilk -*.log -*_Spliced.*proj -[Bb]in -[Dd]ebug*/ -*.lib -*.sbr -obj/ -[Rr]elease*/ -_ReSharper*/ -[Tt]est[Rr]esult* -build/ -deploy/ -docs/output -packages/ -temp/ -test/ -tools/ -*.nupkg -AssemblyInfo.fs -.fake/ -.ionide/ -.paket/ -.vs/ -.vscode/ -paket-files/ diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets deleted file mode 100644 index 17aeb63..0000000 --- a/.paket/Paket.Restore.targets +++ /dev/null @@ -1,565 +0,0 @@ - - - - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - $(MSBuildVersion) - 15.0.0 - false - true - - true - $(MSBuildThisFileDirectory) - $(MSBuildThisFileDirectory)..\ - $(PaketRootPath)paket-files\paket.restore.cached - $(PaketRootPath)paket.lock - classic - proj - assembly - native - /Library/Frameworks/Mono.framework/Commands/mono - mono - - - $(PaketRootPath)paket.bootstrapper.exe - $(PaketToolsPath)paket.bootstrapper.exe - $([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\ - - "$(PaketBootStrapperExePath)" - $(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)" - - - - - true - true - - - True - - - False - - $(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/')) - - - - - - - - - $(PaketRootPath)paket - $(PaketToolsPath)paket - - - - - - $(PaketRootPath)paket.exe - $(PaketToolsPath)paket.exe - - - - - - <_DotnetToolsJson Condition="Exists('$(PaketRootPath)/.config/dotnet-tools.json')">$([System.IO.File]::ReadAllText("$(PaketRootPath)/.config/dotnet-tools.json")) - <_ConfigContainsPaket Condition=" '$(_DotnetToolsJson)' != ''">$(_DotnetToolsJson.Contains('"paket"')) - <_ConfigContainsPaket Condition=" '$(_ConfigContainsPaket)' == ''">false - - - - - - - - - - - <_PaketCommand>dotnet paket - - - - - - $(PaketToolsPath)paket - $(PaketBootStrapperExeDir)paket - - - paket - - - - - <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)")) - <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)" - <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(OS)' != 'Windows_NT' AND '$(_PaketExeExtension)' == '.exe' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)" - <_PaketCommand Condition=" '$(_PaketCommand)' == '' ">"$(PaketExePath)" - - - - - - - - - - - - - - - - - - - - - true - $(NoWarn);NU1603;NU1604;NU1605;NU1608 - false - true - - - - - - - - - $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) - - - - - - - $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[0].Replace(`"`, ``).Replace(` `, ``)) - $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[1].Replace(`"`, ``).Replace(` `, ``)) - - - - - %(PaketRestoreCachedKeyValue.Value) - %(PaketRestoreCachedKeyValue.Value) - - - - - true - false - true - - - - - true - - - - - - - - - - - - - - - - - - - $(PaketIntermediateOutputPath)\$(MSBuildProjectFile).paket.references.cached - - $(MSBuildProjectFullPath).paket.references - - $(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references - - $(MSBuildProjectDirectory)\paket.references - - false - true - true - references-file-or-cache-not-found - - - - - $([System.IO.File]::ReadAllText('$(PaketReferencesCachedFilePath)')) - $([System.IO.File]::ReadAllText('$(PaketOriginalReferencesFilePath)')) - references-file - false - - - - - false - - - - - true - target-framework '$(TargetFramework)' or '$(TargetFrameworks)' files @(PaketResolvedFilePaths) - - - - - - - - - - - false - true - - - - - - - - - - - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',').Length) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[2]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[8]) - - - %(PaketReferencesFileLinesInfo.PackageVersion) - All - runtime - $(ExcludeAssets);contentFiles - $(ExcludeAssets);build;buildMultitargeting;buildTransitive - %(PaketReferencesFileLinesInfo.Aliases) - true - true - - - - - %(PaketReferencesFileLinesInfo.PackageVersion) - - - - - $(PaketIntermediateOutputPath)/$(MSBuildProjectFile).paket.clitools - - - - - - - - - $([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[0]) - $([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[1]) - - - %(PaketCliToolFileLinesInfo.PackageVersion) - - - - - - - - - - false - - - - - - <_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/> - - - - - - $(MSBuildProjectDirectory)/$(MSBuildProjectFile) - true - false - true - false - true - false - true - false - true - false - true - $(PaketIntermediateOutputPath)\$(Configuration) - $(PaketIntermediateOutputPath) - - - - <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.$(PackageVersion.Split(`+`)[0]).nuspec"/> - - - - - - - - - - - - - - - - - - - - - - - diff --git a/FSharp.Control.Reactive.ncrunchsolution b/FSharp.Control.Reactive.ncrunchsolution deleted file mode 100644 index 05adb09..0000000 --- a/FSharp.Control.Reactive.ncrunchsolution +++ /dev/null @@ -1,13 +0,0 @@ - - 1 - True - false - true - UseDynamicAnalysis - UseStaticAnalysis - UseStaticAnalysis - UseStaticAnalysis - Run all tests automatically:BFRydWU=;Run all tests manually:BUZhbHNl;Run impacted tests automatically, others manually (experimental!):CklzSW1wYWN0ZWQ=;Run pinned tests automatically, others manually:CElzUGlubmVk - - - \ No newline at end of file diff --git a/FSharp.Control.Reactive.sln b/FSharp.Control.Reactive.sln deleted file mode 100644 index 313bb30..0000000 --- a/FSharp.Control.Reactive.sln +++ /dev/null @@ -1,83 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.11.35303.130 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Control.Reactive.Tests", "tests\FSharp.Control.Reactive.Tests.fsproj", "{A8EBB4A5-80ED-43D5-8D7D-6A0F4E228C2F}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{8961FBE9-1BE3-4A44-9610-5B4386DC5848}" - ProjectSection(SolutionItems) = preProject - .gitignore = .gitignore - build.cmd = build.cmd - build.fsx = build.fsx - build.sh = build.sh - LICENSE.txt = LICENSE.txt - paket.dependencies = paket.dependencies - README.md = README.md - RELEASE_NOTES.md = RELEASE_NOTES.md - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{E14EBCFE-FE32-46B2-876D-66D38AB53B1E}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{5D1A5D8E-0DA2-47C6-B604-F059B740ABD4}" - ProjectSection(SolutionItems) = preProject - docs\content\index.fsx = docs\content\index.fsx - docs\content\tutorial.fsx = docs\content\tutorial.fsx - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{A10EE113-56C8-45E7-8970-B03F17AC3F8E}" - ProjectSection(SolutionItems) = preProject - docs\tools\generate.fsx = docs\tools\generate.fsx - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "templates", "templates", "{AB2D0E6D-7335-44A6-9A7B-55C58C858279}" - ProjectSection(SolutionItems) = preProject - docs\tools\templates\template.cshtml = docs\tools\templates\template.cshtml - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "files", "files", "{57CF7CB9-B2E3-406A-994D-1C85AD11A524}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "img", "img", "{5EB1DFE0-EC60-4031-87E9-771F3848A728}" - ProjectSection(SolutionItems) = preProject - docs\files\img\logo.png = docs\files\img\logo.png - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1C8DDC6C-C9CC-4349-AB08-B202F9D36065}" -EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Control.Reactive", "src\FSharp.Control.Reactive\FSharp.Control.Reactive.fsproj", "{ED23F688-C0D0-4102-93D5-0D832633F66D}" -EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Control.Reactive.Testing", "src\FSharp.Control.Reactive.Testing\FSharp.Control.Reactive.Testing.fsproj", "{BE128B51-FAD4-4431-A6C7-0FD08361A6BB}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A8EBB4A5-80ED-43D5-8D7D-6A0F4E228C2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A8EBB4A5-80ED-43D5-8D7D-6A0F4E228C2F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A8EBB4A5-80ED-43D5-8D7D-6A0F4E228C2F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A8EBB4A5-80ED-43D5-8D7D-6A0F4E228C2F}.Release|Any CPU.Build.0 = Release|Any CPU - {ED23F688-C0D0-4102-93D5-0D832633F66D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ED23F688-C0D0-4102-93D5-0D832633F66D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ED23F688-C0D0-4102-93D5-0D832633F66D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ED23F688-C0D0-4102-93D5-0D832633F66D}.Release|Any CPU.Build.0 = Release|Any CPU - {BE128B51-FAD4-4431-A6C7-0FD08361A6BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BE128B51-FAD4-4431-A6C7-0FD08361A6BB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BE128B51-FAD4-4431-A6C7-0FD08361A6BB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BE128B51-FAD4-4431-A6C7-0FD08361A6BB}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {A8EBB4A5-80ED-43D5-8D7D-6A0F4E228C2F} = {1C8DDC6C-C9CC-4349-AB08-B202F9D36065} - {5D1A5D8E-0DA2-47C6-B604-F059B740ABD4} = {E14EBCFE-FE32-46B2-876D-66D38AB53B1E} - {A10EE113-56C8-45E7-8970-B03F17AC3F8E} = {E14EBCFE-FE32-46B2-876D-66D38AB53B1E} - {AB2D0E6D-7335-44A6-9A7B-55C58C858279} = {A10EE113-56C8-45E7-8970-B03F17AC3F8E} - {57CF7CB9-B2E3-406A-994D-1C85AD11A524} = {E14EBCFE-FE32-46B2-876D-66D38AB53B1E} - {5EB1DFE0-EC60-4031-87E9-771F3848A728} = {57CF7CB9-B2E3-406A-994D-1C85AD11A524} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {34B67138-7771-4384-9084-81C2A45131F1} - EndGlobalSection -EndGlobal diff --git a/FSharp.Control.Reactive.v2.ncrunchsolution b/FSharp.Control.Reactive.v2.ncrunchsolution deleted file mode 100644 index 05adb09..0000000 --- a/FSharp.Control.Reactive.v2.ncrunchsolution +++ /dev/null @@ -1,13 +0,0 @@ - - 1 - True - false - true - UseDynamicAnalysis - UseStaticAnalysis - UseStaticAnalysis - UseStaticAnalysis - Run all tests automatically:BFRydWU=;Run all tests manually:BUZhbHNl;Run impacted tests automatically, others manually (experimental!):CklzSW1wYWN0ZWQ=;Run pinned tests automatically, others manually:CElzUGlubmVk - - - \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index d1f20e8..0000000 --- a/LICENSE.txt +++ /dev/null @@ -1,55 +0,0 @@ -Copyright (c) 2022 FSharp.Control.Reactive Project -Portions Copyright (c) 2022 Ryan Riley, Steffen Forkmann - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -***************************** -Some parts licensed under MS-PL -***************************** - -This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. - -1. Definitions - -The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. - -A "contribution" is the original software, or any additions or changes to the software. - -A "contributor" is any person that distributes its contribution under this license. - -"Licensed patents" are a contributor's patent claims that read directly on its contribution. - -2. Grant of Rights - -(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. - -(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. - -3. Conditions and Limitations - -(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. - -(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. - -(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. - -(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. - -(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. - diff --git a/README.md b/README.md deleted file mode 100644 index 7115031..0000000 --- a/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# FSharp.Control.Reactive - -F# wrappers for the [Reactive Extensions (Rx)](http://msdn.microsoft.com/en-us/data/gg577609.aspx) - -[![NuGet Status](http://img.shields.io/nuget/v/FSharp.Control.Reactive.svg?style=flat)](https://www.nuget.org/packages/FSharp.Control.Reactive/) -[![CI Build](https://github.com/fsprojects/FSharp.Control.Reactive/actions/workflows/build.yml/badge.svg)](https://github.com/fsprojects/FSharp.Control.Reactive/actions/workflows/build.yml) - -## Maintainer(s) - -- [@cloudRoutine](https://github.com/cloudRoutine) -- [@deviousasti](https://github.com/deviousasti) -- [@panesofglass](https://github.com/panesofglass) - -The default maintainer account for projects under "fsprojects" is [@fsprojectsgit](https://github.com/fsprojectsgit) - F# Community Project Incubation Space (repo management) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md deleted file mode 100644 index 1ac1f5f..0000000 --- a/RELEASE_NOTES.md +++ /dev/null @@ -1,200 +0,0 @@ -### New in 6.1.1 - (Released 2025/3/16) - -- Fixed permission in NuGet to allow publishing FSharp.Control.Reactive.Testing - -### New in 6.1.0 - (Released 2025/3/16) - -- Relaxed restriction for `System.Reactive` package to allow versions higher than 5.0 by @xperiandri in -- Updated tools by @xperiandri in -- Make the repo build properly in Appveyor by @marklam in -- Update Versions to 6.x by @deviousasti in -- Create a github build with updated tools. by @marklam in -- Removed trailing whitespaces by @xperiandri in - -**Full Changelog**: - -### New in 6.0.1 - (Released 2024/9/22) - -- Updated build system - -### New in 6.0.0 - (Released 2024/4/3) - -- Release with relaxed support for System.Reactive 6.0 and above - -### New in 5.0.5 - (Released 2022/5/4) - -- No upward bounds on FSharp.Core - -### New in 5.0.4 - (Released 2022/5/4) - -- Adds support for IL Trimming [#166](https://github.com/fsprojects/FSharp.Control.Reactive/pull/166) - -### New in 5.0.3 - (Released 2022/5/3) - -- Adds support for .NET 6.0 [#165](https://github.com/fsprojects/FSharp.Control.Reactive/pull/165) - -### New in 5.0.2 - (Released 2021/3/6) - -- Downgrade FSharp.Core requirement 4.7.2 upwards - -### New in 5.0.1 - (Released 2021/3/5) - -- Update TFMs to align with System.Reactive [#161](https://github.com/fsprojects/FSharp.Control.Reactive/pull/161) -- Now targets .NET Framework 4.7.2, .NET Standard 2.0, .NET Core 3.1 and .NET 5.0 - -### New in 5.0.0 - (Released 2021/2/24) - -- Update [System.Reactive to 5.0](https://github.com/dotnet/reactive/releases/tag/rxnet-v5.0.0) -- Support for .Net Framework 4.6 has been removed, as it is no longer support by Rx 5.0 -- Exceptions rethrown inside Rx now are guaranteed to preserve the original stack trace by using ExceptionDispatchInfo consistently across the board. - -### New in 4.5.0 - (Released 2020/12/12) - -- Add Observable.replayBufferOn [#157](https://github.com/fsprojects/FSharp.Control.Reactive/pull/157) -- Add additional package targets for netstandard2.1 and net5.0 - -### New in 4.4.2 - (Released 2020/07/03) - -- Replace custom IObservable implementations with Rx native [#152](https://github.com/fsprojects/FSharp.Control.Reactive/pull/152) - -### New in 4.4.1 - (Released 2020/06/27) - -- Update to System.Reactive 4.4.1 [#151](https://github.com/fsprojects/FSharp.Control.Reactive/pull/151) - -### New in 4.4.0 - (Released 2020/06/10) - -- Add `Disposable.disposeWith` [#145](https://github.com/fsprojects/FSharp.Control.Reactive/pull/146) -- Add `Observable.ignoreElements` [#148](https://github.com/fsprojects/FSharp.Control.Reactive/pull/148) - -### New in 4.3.3 - (Released 2020/06/05) - -- Fix try ... with in observe CE [#122](https://github.com/fsprojects/FSharp.Control.Reactive/pull/144) -- Refine fix for Observable.choose [#143](https://github.com/fsprojects/FSharp.Control.Reactive/pull/143) - -### New in 4.3.2 - (Released 2020/06/05) - -- Fix disposable composition [#139 and #140](https://github.com/fsprojects/FSharp.Control.Reactive/pull/141) - -### New in 4.3.1 - (Released 2020/06/05) - -- Fix issue with Observable.choose [#131](https://github.com/fsprojects/FSharp.Control.Reactive/pull/128) - -### New in 4.3.0 - (Released 2020/05/21) - -- Fix issue [#115](https://github.com/fsprojects/FSharp.Control.Reactive/pull/128) -- Fix issue [#126](https://github.com/fsprojects/FSharp.Control.Reactive/pull/127) -- Fix issue [#129](https://github.com/fsprojects/FSharp.Control.Reactive/pull/130) -- Add tests using Xunit [#118](https://github.com/fsprojects/FSharp.Control.Reactive/pull/118) - -### New in 4.2.0 - (Released 2019/03/06) - -- Extensions to F# API - -### New in 4.1.0 - (Released 2018/06/06) - -- Update to System.Reactive 4.0. - -### New in 4.0.0 - (Released 2018/02/21) - -- Support for netstandard-2.0 -- Added Subjects to the core library. -- New FSharp.Control.Reactive.Testing library for a more idiomatic F# API over the Rx Testing library. - -### New in 3.5.0 - (Released 2016/12/05) - -- Update to Rx 3.0 - -### New in 3.4.1 - (Released 2016/04/26) - -- Restore .NET 4.0 build instead of .NET 4.5. - -### New in 3.4.0 - (Released 2016/04/24) - -- .NET 4.5 and Profile259 builds available. - -### New in 3.3.0 - (Released 2016/03/05) - -- Added `Disposables` module with a `compose` function that will creates a new `IDisposable` that will dispose the sequence of provided `IDisposable`s. -- Fix `groupByCompare` to actually use the provided `comparer`. - -### New in 3.2.0 - (Released 2015/05/16) - -- Bug fix: `subscribeOn` should take an `IScheduler` - - Renamed `subscribeOn` to `subscribeOnContext` to maintain consistency with other, similar functions - - Added `subscribeOn` that takes an `IScheduler` - - Added test for `subscribeOn` -- Added ofAsync, liftAsync, and flatmapAsync - -### New in 3.1.2 - (Released 2015/04/03) - -- Remove unnecessary signatures for Observable.Create and add test to demonstrate use. - -### New in 3.1.1 - (Released 2015/02/12) - -- Additional signature fixes to accept F# functions rather than `Func` #51 - -### New in 3.1.0 - (Released 2015/02/12) - -- Fixed signature of `Observable.create` to better fit F#. #56 -- Marked `ObservableBuilder.Return` and `ObservableBuilder.ReturnFrom` as `Obsolete` as users should use `Yield` and `YieldFrom`, which allow for multiple results. #53 -- Changed signatures of `RxQueryBuilder` functions `ExactlyOne`, `ExactlyOneOrDefault`, `Find`, `Head`, `HeadOrDefault`, `Last`, and `LastOrDefault` to their Async equivalents. #57 - -### New in 3.0.1 - (Released 2014/12/07) - -- #48 Some of the Observable functions aren't very composable -- NOTE: Includes breaking changes due to updated function names and signatures -- #47 Replay overloads don't use the window or bufferSize parameters -- Use consistent function types in ObservableBuilder. -- Now using FSharp.Core from NuGet - -### New in 2.4.0 - (Released 2014/10/14) - -Updates courtesty of marklam: - -- Changed the distinct functions to take F# functions -- Added a version of ofSeq which uses a scheduler (ofSeqOn) -- Reordered the parameters to scanInit to be more composable -- Corrected some spellings and added some tests - -### New in 2.3.7 - (Released 2014/10/14) - -- Updated to Rx 2.2.5 -- Updated Paket bootstrapper - -### New in 2.3.6 - (Released 2014/10/13) - -- Now generating docs! - -### New in 2.3.0 - (Released 2014/09/26) - -- Add QueryBuilder -- Add many more wrappers to Rx from F#, thanks to Jared Hester! - -**Breaking changes** - -- New namespace is `FSharp.Control.Reactive` -- `Observable` module is no longer auto-opened with the namespace -- `Observable.zip` now takes parameters in the "correct" order of `obs1` then `obs2` -- `Observable.subscribe` has moved to `Observable.subscribeWithCallbacks` -- `Observable.subscribe` now takes the `onNext` callback only - -**TODO** - -- Add tests -- Add docs - -### New in 2.2.131002 - (Released 2013/10/02) - -- Restructure modules and namespaces to comply with F# coding guidelines - -### New in 2.1.131002 - (Released 2013/10/02) - -- Release of F# wrappers for Rx - -### New in 2.0.121121-rc - (Released 2012/11/21) - -- Release candidate for F# wrappers for Rx based on Rx 2.0-rtm - -### New in 2.0.6-rc - (Released 2012/07/26) - -- Initial NuGet release of F# wrappers for Rx 2.0-rc diff --git a/build.fsx b/build.fsx deleted file mode 100644 index 0ead999..0000000 --- a/build.fsx +++ /dev/null @@ -1,160 +0,0 @@ - -// -------------------------------------------------------------------------------------- -// FAKE build script -// -------------------------------------------------------------------------------------- - -#load ".fake/build.fsx/intellisense.fsx" -#if !FAKE - #r "netstandard" -#endif - -open Fake.Tools -open Fake.Core -open Fake.DotNet -open Fake.IO -open Fake.IO.FileSystemOperators -open Fake.IO.Globbing.Operators -open System.IO -open Microsoft.AspNetCore.Builder -open Microsoft.AspNetCore.Hosting -open System.Threading -// -------------------------------------------------------------------------------------- -// Provide project-specific details below -// -------------------------------------------------------------------------------------- - -// Git configuration (used for publishing documentation in gh-pages branch) -// The profile where the project is posted -let gitHome = "https://github.com/fsprojects" -// The name of the project on GitHub -let gitName = "FSharp.Control.Reactive" - -let docsDir = Path.GetFullPath "docs" - -// -------------------------------------------------------------------------------------- -// The rest of the file includes standard build steps -// -------------------------------------------------------------------------------------- - -// Read additional information from the release notes document - -let release = ReleaseNotes.load "RELEASE_NOTES.md" - -// -------------------------------------------------------------------------------------- -// Clean build results & restore NuGet packages - -Target.create "CleanDocs" (fun _ -> - Shell.cleanDir "docs/output" -) - -// -------------------------------------------------------------------------------------- -// Generate the documentation - -Target.create "GenerateDocs" (fun _ -> - - let githubLink = "https://github.com/fsprojects/FSharp.Control.Reactive" - let root = "/FSharp.Control.Reactive" - // Paths with template/source/output locations - - let content = docsDir @@ "content" - let output = docsDir @@ "output" - let outputContent = output @@ "content" - let outputReference = output @@ "reference" - let files = docsDir @@ "files" - let templates = docsDir @@ "tools/templates" - let formatting = Path.GetFullPath "packages/build/FSharp.Formatting.CommandTool" - let docTemplate = formatting @@ "templates/docpage.cshtml" - - // Where to look for *.csproj templates (in this order) - let layoutRoots = [ templates; formatting @@ "templates" - formatting @@ "templates/reference" ] - let info = - [ "root", root - "project-name", "FSharp.Control.Reactive" - "project-author", "Ryan Riley, Steffen Forkmann, and Jared Hester" - "project-summary", "A F#-friendly wrapper for the Reactive Extensions." - "project-github", "https://github.com/fsprojects/FSharp.Control.Reactive" - "project-nuget", "https://www.nuget.org/packages/FSharp.Control.Reactive" ] - - Shell.copyDir output files FileFilter.allFiles - Directory.ensure outputContent - Shell.copyDir outputContent (formatting @@ "styles") FileFilter.allFiles - FSFormatting.createDocs (fun s -> - { s with - Source = content - OutputDirectory = output - Template = docTemplate - ProjectParameters = info - LayoutRoots = layoutRoots }) - - Directory.ensure outputReference - let dlls = - !! "src/FSharp.Control.*/bin/Release/**/FSharp.Control.Reactive*.dll" - |> Seq.distinctBy Path.GetFileName - |> List.ofSeq - let libDirs = - dlls - |> Seq.map Path.GetDirectoryName - |> Seq.distinct - |> List.ofSeq - - dlls - |> FSFormatting.createDocsForDlls (fun s -> - { s with - OutputDirectory = outputReference - LayoutRoots = layoutRoots - LibDirs = libDirs - ProjectParameters = info - SourceRepository = githubLink @@ "tree/master" }) -) - -Target.create "HostDocs" (fun _ -> - let configureApp (app:IApplicationBuilder) = - app.UseFileServer(FileServerOptions(EnableDefaultFiles = true)) - |> ignore - let port = 8081 - let directory = docsDir @@ "output" - let host = - WebHostBuilder() - .UseWebRoot(directory) - .UseContentRoot(directory) - .PreferHostingUrls(false) - .UseKestrel(fun o -> o.ListenLocalhost(port)) - .Configure(System.Action configureApp) - .Build() - use cts = new CancellationTokenSource() - host.RunAsync(cts.Token) |> ignore - let psi = System.Diagnostics.ProcessStartInfo(sprintf "http://localhost:%d/index.html" port) - psi.UseShellExecute <- true - System.Diagnostics.Process.Start (psi) |> ignore - Trace.traceImportant "Press any key to stop." - System.Console.ReadKey() |> ignore - cts.Cancel() -) - -// -------------------------------------------------------------------------------------- -// Release Scripts - -Target.create "ReleaseDocs" (fun _ -> - let tempDocsDir = "temp/gh-pages" - Shell.cleanDir tempDocsDir - Git.Repository.cloneSingleBranch "" (gitHome + "/" + gitName + ".git") "gh-pages" tempDocsDir - - Shell.copyRecursive "docs/output" tempDocsDir true |> Trace.tracefn "%A" - Git.Staging.stageAll tempDocsDir - Git.Commit.exec tempDocsDir (sprintf "Update generated documentation for version %s" release.NugetVersion) - Git.Branches.push tempDocsDir -) - -// -------------------------------------------------------------------------------------- -// Run all targets by default. Invoke 'build ' to override - -Target.create "All" (fun _ -> - Target.listAvailable() -) - -open Fake.Core.TargetOperators - -"CleanDocs" - ==> "GenerateDocs" - ==> "ReleaseDocs" - -Target.runOrDefault "All" diff --git a/build.ps1 b/build.ps1 deleted file mode 100644 index 95f3955..0000000 --- a/build.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -dotnet tool restore -dotnet build -c Release -dotnet test --no-build -c Release tests -dotnet pack --no-restore -c Release --include-symbols -o $psscriptroot/bin \ No newline at end of file diff --git a/content/img/github-blue.png b/content/img/github-blue.png new file mode 100644 index 0000000..57432a0 Binary files /dev/null and b/content/img/github-blue.png differ diff --git a/content/img/github.png b/content/img/github.png new file mode 100644 index 0000000..5d48d83 Binary files /dev/null and b/content/img/github.png differ diff --git a/content/style.css b/content/style.css new file mode 100644 index 0000000..1dbbd0c --- /dev/null +++ b/content/style.css @@ -0,0 +1,243 @@ +@import url(https://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono|Open+Sans:400,600,700); + +/*-------------------------------------------------------------------------- + Formatting for F# code snippets +/*--------------------------------------------------------------------------*/ + +/* strings --- and stlyes for other string related formats */ +span.s { color:#E0E268; } +/* printf formatters */ +span.pf { color:#E0C57F; } +/* escaped chars */ +span.e { color:#EA8675; } + +/* identifiers --- and styles for more specific identifier types */ +span.id { color:#d1d1d1; } +/* module */ +span.m { color:#43AEC6; } +/* reference type */ +span.rt { color:#43AEC6; } +/* value type */ +span.vt { color:#43AEC6; } +/* interface */ +span.if{ color:#43AEC6; } +/* type argument */ +span.ta { color:#43AEC6; } +/* disposable */ +span.d { color:#43AEC6; } +/* property */ +span.prop { color:#43AEC6; } +/* punctuation */ +span.p { color:#43AEC6; } +/* function */ +span.f { color:#e1e1e1; } +/* active pattern */ +span.pat { color:#4ec9b0; } +/* union case */ +span.u { color:#4ec9b0; } +/* enumeration */ +span.e { color:#4ec9b0; } +/* keywords */ +span.k { color:#FAB11D; } +/* comment */ +span.c { color:#808080; } +/* operators */ +span.o { color:#af75c1; } +/* numbers */ +span.n { color:#96C71D; } +/* line number */ +span.l { color:#80b0b0; } +/* mutable var or ref cell */ +span.v { color:#d1d1d1; font-weight: bold; } +/* inactive code */ +span.inactive { color:#808080; } +/* preprocessor */ +span.prep { color:#af75c1; } +/* fsi output */ +span.fsi { color:#808080; } + +/* omitted */ +span.omitted { + background:#3c4e52; + border-radius:5px; + color:#808080; + padding:0px 0px 1px 0px; +} +/* tool tip */ +div.tip { + background:#475b5f; + border-radius:4px; + font:11pt 'Droid Sans', arial, sans-serif; + padding:6px 8px 6px 8px; + display:none; + color:#d1d1d1; + pointer-events:none; +} +table.pre pre { + padding:0px; + margin:0px; + border:none; +} +table.pre, pre.fssnip, pre { + line-height:13pt; + border:1px solid #d8d8d8; + border-collapse:separate; + white-space:pre; + font: 9pt 'Droid Sans Mono',consolas,monospace; + width:90%; + margin:10px 20px 20px 20px; + background-color:#212d30; + padding:10px; + border-radius:5px; + color:#d1d1d1; + max-width: none; +} +pre.fssnip code { + font: 9pt 'Droid Sans Mono',consolas,monospace; +} +table.pre pre { + padding:0px; + margin:0px; + border-radius:0px; + width: 100%; +} +table.pre td { + padding:0px; + white-space:normal; + margin:0px; +} +table.pre td.lines { + width:30px; +} + +/*-------------------------------------------------------------------------- + Formatting for page & standard document content +/*--------------------------------------------------------------------------*/ + +body { + font-family: 'Open Sans', serif; + padding-top: 0px; + padding-bottom: 40px; +} + +pre { + word-wrap: inherit; +} + +/* Format the heading - nicer spacing etc. */ +.masthead { + overflow: hidden; +} +.masthead .muted a { + text-decoration:none; + color:#999999; +} +.masthead ul, .masthead li { + margin-bottom:0px; +} +.masthead .nav li { + margin-top: 15px; + font-size:110%; +} +.masthead h3 { + margin-bottom:5px; + font-size:170%; +} +hr { + margin:0px 0px 20px 0px; +} + +/* Make table headings and td.title bold */ +td.title, thead { + font-weight:bold; +} + +/* Format the right-side menu */ +#menu { + margin-top:50px; + font-size:11pt; + padding-left:20px; +} + +#menu .nav-header { + font-size:12pt; + color:#606060; + margin-top:20px; +} + +#menu li { + line-height:25px; +} + +/* Change font sizes for headings etc. */ +#main h1 { font-size: 26pt; margin:10px 0px 15px 0px; font-weight:400; } +#main h2 { font-size: 20pt; margin:20px 0px 0px 0px; font-weight:400; } +#main h3 { font-size: 14pt; margin:15px 0px 0px 0px; font-weight:600; } +#main p { font-size: 11pt; margin:5px 0px 15px 0px; } +#main ul { font-size: 11pt; margin-top:10px; } +#main li { font-size: 11pt; margin: 5px 0px 5px 0px; } +#main strong { font-weight:700; } + +/*-------------------------------------------------------------------------- + Formatting for API reference +/*--------------------------------------------------------------------------*/ + +.type-list .type-name, .module-list .module-name { + width:25%; + font-weight:bold; +} +.member-list .member-name { + width:35%; +} +#main .xmldoc h2 { + font-size:14pt; + margin:10px 0px 0px 0px; +} +#main .xmldoc h3 { + font-size:12pt; + margin:10px 0px 0px 0px; +} +.github-link { + float:right; + text-decoration:none; +} +.github-link img { + border-style:none; + margin-left:10px; +} +.github-link .hover { display:none; } +.github-link:hover .hover { display:block; } +.github-link .normal { display: block; } +.github-link:hover .normal { display: none; } + +/*-------------------------------------------------------------------------- + Links +/*--------------------------------------------------------------------------*/ + +h1 a, h1 a:hover, h1 a:focus, +h2 a, h2 a:hover, h2 a:focus, +h3 a, h3 a:hover, h3 a:focus, +h4 a, h4 a:hover, h4 a:focus, +h5 a, h5 a:hover, h5 a:focus, +h6 a, h6 a:hover, h6 a:focus { color : inherit; text-decoration : inherit; outline:none } + +/*-------------------------------------------------------------------------- + Additional formatting for the homepage +/*--------------------------------------------------------------------------*/ + +#nuget { + margin-top:20px; + font-size: 11pt; + padding:20px; +} + +#nuget pre { + font-size:11pt; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + background: #404040; + border-style:none; + color: #e0e0e0; + margin-top:15px; +} diff --git a/content/style.css.bak b/content/style.css.bak new file mode 100644 index 0000000..397eddc --- /dev/null +++ b/content/style.css.bak @@ -0,0 +1,193 @@ +@import url(http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono|Open+Sans:400,600,700); + +/*-------------------------------------------------------------------------- + Formatting for F# code snippets +/*--------------------------------------------------------------------------*/ + +/* identifier */ +span.i { color:#d1d1d1; } +/* string */ +span.s { color:#d4b43c; } +/* keywords */ +span.k { color:#4e98dc; } +/* comment */ +span.c { color:#96C71D; } +/* operators */ +span.o { color:#af75c1; } +/* numbers */ +span.n { color:#96C71D; } +/* line number */ +span.l { color:#80b0b0; } + +/* inactive code */ +span.inactive { color:#808080; } +/* preprocessor */ +span.prep { color:#af75c1; } +/* fsi output */ +span.fsi { color:#808080; } + +/* omitted */ +span.omitted { + background:#3c4e52; + border-radius:5px; + color:#808080; + padding:0px 0px 1px 0px; +} +/* tool tip */ +div.tip { + background:#475b5f; + border-radius:4px; + font:11pt 'Droid Sans', arial, sans-serif; + padding:6px 8px 6px 8px; + display:none; + color:#d1d1d1; +} +table.pre pre { + padding:0px; + margin:0px; + border:none; +} +table.pre, pre.fssnip, pre { + line-height:13pt; + border:1px solid #d8d8d8; + border-collapse:separate; + white-space:pre; + font: 9pt 'Droid Sans Mono',consolas,monospace; + width:90%; + margin:10px 20px 20px 20px; + background-color:#212d30; + padding:10px; + border-radius:5px; + color:#d1d1d1; +} +table.pre pre { + padding:0px; + margin:0px; + border-radius:0px; + width: 100%; +} +table.pre td { + padding:0px; + white-space:normal; + margin:0px; +} +table.pre td.lines { + width:30px; +} + +/*-------------------------------------------------------------------------- + Formatting for page & standard document content +/*--------------------------------------------------------------------------*/ + +body { + font-family: 'Open Sans', serif; + padding-top: 0px; + padding-bottom: 40px; +} + +pre { + word-wrap: inherit; +} + +/* Format the heading - nicer spacing etc. */ +.masthead { + overflow: hidden; +} +.masthead ul, .masthead li { + margin-bottom:0px; +} +.masthead .nav li { + margin-top: 15px; + font-size:110%; +} +.masthead h3 { + margin-bottom:5px; + font-size:170%; +} +hr { + margin:0px 0px 20px 0px; +} + +/* Make table headings and td.title bold */ +td.title, thead { + font-weight:bold; +} + +/* Format the right-side menu */ +#menu { + margin-top:50px; + font-size:11pt; + padding-left:20px; +} + +#menu .nav-header { + font-size:12pt; + color:#606060; + margin-top:20px; +} + +#menu li { + line-height:25px; +} + +/* Change font sizes for headings etc. */ +#main h1 { font-size: 26pt; margin:10px 0px 15px 0px; font-weight:400; } +#main h2 { font-size: 20pt; margin:20px 0px 0px 0px; font-weight:400; } +#main h3 { font-size: 14pt; margin:15px 0px 0px 0px; font-weight:600; } +#main p { font-size: 11pt; margin:5px 0px 15px 0px; } +#main ul { font-size: 11pt; margin-top:10px; } +#main li { font-size: 11pt; margin: 5px 0px 5px 0px; } +#main strong { font-weight:700; } + +/*-------------------------------------------------------------------------- + Formatting for API reference +/*--------------------------------------------------------------------------*/ + +.type-list .type-name, .module-list .module-name { + width:25%; + font-weight:bold; +} +.member-list .member-name { + width:35%; +} +#main .xmldoc h2 { + font-size:14pt; + margin:10px 0px 0px 0px; +} +#main .xmldoc h3 { + font-size:12pt; + margin:10px 0px 0px 0px; +} +.github-link { + float:right; + text-decoration:none; +} +.github-link img { + border-style:none; + margin-left:10px; +} +.github-link .hover { display:none; } +.github-link:hover .hover { display:block; } +.github-link .normal { display: block; } +.github-link:hover .normal { display: none; } + +/*-------------------------------------------------------------------------- + Additional formatting for the homepage +/*--------------------------------------------------------------------------*/ + +#nuget { + margin-top:20px; + font-size: 11pt; + padding:20px; +} + +#nuget pre { + font-size:11pt; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + background: #404040; + border-style:none; + color: #e0e0e0; + margin-top:15px; +} \ No newline at end of file diff --git a/content/style_light.css b/content/style_light.css new file mode 100644 index 0000000..0685b48 --- /dev/null +++ b/content/style_light.css @@ -0,0 +1,227 @@ +@import url(https://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono|Open+Sans:400,600,700); + +/*-------------------------------------------------------------------------- + Formatting for F# code snippets +/*--------------------------------------------------------------------------*/ + +/* identifier */ +span.i { color:#000000; } +/* string */ +span.s { color:#a31515; } +/* keywords */ +span.k { color:#0000ff; } +/* comment */ +span.c { color:#008000; } +/* operators */ +span.o { color:#000000; } +/* numbers */ +span.n { color:#000000; } +/* line number */ +span.l { color:#96c2cd; } +/* type or module */ +span.t { color:#2b91af; } +/* function */ +span.f { color:#0000a0; } +/* DU case or active pattern */ +span.p { color:#800080; } +/* mutable var or ref cell */ +span.v { color:#000000; font-weight: bold; } +/* printf formatters */ +span.pf { color:#2b91af; } +/* escaped chars */ +span.e { color:#ff0080; } +/* mutable var or ref cell */ + + +/* inactive code */ +span.inactive { color:#808080; } +/* preprocessor */ +span.prep { color:#0000ff; } +/* fsi output */ +span.fsi { color:#808080; } + +/* omitted */ +span.omitted { + background:#3c4e52; + border-radius:5px; + color:#808080; + padding:0px 0px 1px 0px; +} +/* tool tip */ +div.tip { + background:#e5e5e5; + border-radius:4px; + font:9pt 'Droid Sans', arial, sans-serif; + padding:6px 8px 6px 8px; + display:none; + color:#000000; + pointer-events:none; +} +table.pre pre { + padding:0px; + margin:0px; + border:none; +} +table.pre, pre.fssnip, pre { + line-height:13pt; + border:1px solid #d8d8d8; + border-collapse:separate; + white-space:pre; + font: 10pt consolas,monospace; + width:90%; + margin:10px 20px 20px 20px; + background-color:#fdfdfd; + padding:10px; + border-radius:5px; + color:#000000; + max-width: none; +} +pre.fssnip code { + font: 9pt 'Droid Sans Mono',consolas,monospace; +} +table.pre pre { + padding:0px; + margin:0px; + border-radius:0px; + width: 100%; +} +table.pre td { + padding:0px; + white-space:normal; + margin:0px; +} +table.pre td.lines { + width:30px; +} + +/*-------------------------------------------------------------------------- + Formatting for page & standard document content +/*--------------------------------------------------------------------------*/ + +body { + font-family: 'Open Sans', serif; + padding-top: 0px; + padding-bottom: 40px; +} + +pre { + word-wrap: inherit; +} + +/* Format the heading - nicer spacing etc. */ +.masthead { + overflow: hidden; +} +.masthead .muted a { + text-decoration:none; + color:#999999; +} +.masthead ul, .masthead li { + margin-bottom:0px; +} +.masthead .nav li { + margin-top: 15px; + font-size:110%; +} +.masthead h3 { + margin-bottom:5px; + font-size:170%; +} +hr { + margin:0px 0px 20px 0px; +} + +/* Make table headings and td.title bold */ +td.title, thead { + font-weight:bold; +} + +/* Format the right-side menu */ +#menu { + margin-top:50px; + font-size:11pt; + padding-left:20px; +} + +#menu .nav-header { + font-size:12pt; + color:#606060; + margin-top:20px; +} + +#menu li { + line-height:25px; +} + +/* Change font sizes for headings etc. */ +#main h1 { font-size: 26pt; margin:10px 0px 15px 0px; font-weight:400; } +#main h2 { font-size: 20pt; margin:20px 0px 0px 0px; font-weight:400; } +#main h3 { font-size: 14pt; margin:15px 0px 0px 0px; font-weight:600; } +#main p { font-size: 11pt; margin:5px 0px 15px 0px; } +#main ul { font-size: 11pt; margin-top:10px; } +#main li { font-size: 11pt; margin: 5px 0px 5px 0px; } +#main strong { font-weight:700; } + +/*-------------------------------------------------------------------------- + Formatting for API reference +/*--------------------------------------------------------------------------*/ + +.type-list .type-name, .module-list .module-name { + width:25%; + font-weight:bold; +} +.member-list .member-name { + width:35%; +} +#main .xmldoc h2 { + font-size:14pt; + margin:10px 0px 0px 0px; +} +#main .xmldoc h3 { + font-size:12pt; + margin:10px 0px 0px 0px; +} +.github-link { + float:right; + text-decoration:none; +} +.github-link img { + border-style:none; + margin-left:10px; +} +.github-link .hover { display:none; } +.github-link:hover .hover { display:block; } +.github-link .normal { display: block; } +.github-link:hover .normal { display: none; } + +/*-------------------------------------------------------------------------- + Links +/*--------------------------------------------------------------------------*/ + +h1 a, h1 a:hover, h1 a:focus, +h2 a, h2 a:hover, h2 a:focus, +h3 a, h3 a:hover, h3 a:focus, +h4 a, h4 a:hover, h4 a:focus, +h5 a, h5 a:hover, h5 a:focus, +h6 a, h6 a:hover, h6 a:focus { color : inherit; text-decoration : inherit; outline:none } + +/*-------------------------------------------------------------------------- + Additional formatting for the homepage +/*--------------------------------------------------------------------------*/ + +#nuget { + margin-top:20px; + font-size: 11pt; + padding:20px; +} + +#nuget pre { + font-size:11pt; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + background: #404040; + border-style:none; + color: #e0e0e0; + margin-top:15px; +} diff --git a/content/tips.js b/content/tips.js new file mode 100644 index 0000000..2b125ba --- /dev/null +++ b/content/tips.js @@ -0,0 +1,46 @@ +var currentTip = null; +var currentTipElement = null; + +function hideTip(evt, name, unique) { + var el = document.getElementById(name); + el.style.display = "none"; + currentTip = null; +} + +function findPos(obj) { + // no idea why, but it behaves differently in webbrowser component + if (window.location.search == "?inapp") + return [obj.offsetLeft + 10, obj.offsetTop + 30]; + + var curleft = 0; + var curtop = obj.offsetHeight; + while (obj) { + curleft += obj.offsetLeft; + curtop += obj.offsetTop; + obj = obj.offsetParent; + }; + return [curleft, curtop]; +} + +function hideUsingEsc(e) { + if (!e) { e = event; } + hideTip(e, currentTipElement, currentTip); +} + +function showTip(evt, name, unique, owner) { + document.onkeydown = hideUsingEsc; + if (currentTip == unique) return; + currentTip = unique; + currentTipElement = name; + + var pos = findPos(owner ? owner : (evt.srcElement ? evt.srcElement : evt.target)); + var posx = pos[0]; + var posy = pos[1]; + + var el = document.getElementById(name); + var parent = (document.documentElement == null) ? document.body : document.documentElement; + el.style.position = "absolute"; + el.style.left = posx + "px"; + el.style.top = posy + "px"; + el.style.display = "block"; +} \ No newline at end of file diff --git a/docs/content/index.fsx b/docs/content/index.fsx deleted file mode 100644 index 7bb3a95..0000000 --- a/docs/content/index.fsx +++ /dev/null @@ -1,41 +0,0 @@ -(** -FSharp.Control.Reactive -=================== - -FSharp.Control.Reactive provides F#-style modules for working with the [Reactive Extensions (Rx)](https://github.com/dotnet/reactive) as a set of extensions to the built-in `Observable` module. The library includes `observe` and `rxquery` computation expressions, as well. - -
-
-
-
- The FSharp.Control.Reactive library can be installed from NuGet: -
PM> Install-Package FSharp.Control.Reactive
-
-
-
-
- -Samples & documentation ------------------------ - -The library comes will soon come with comprehensive documentation and -includes a [Getting Started tutorial](tutorial.html), as well as an [API reference](reference/index.html). - -Contributing and copyright --------------------------- - -The project is hosted on [GitHub][gh] where you can [report issues][issues], fork -the project and submit pull requests. If you're adding new public API, please also -consider adding [samples][content] that can be turned into documentation. You might -also want to read [library design notes][readme] to understand how it works. - -The library is available under the Apache 2.0 license, which allows modification and -redistribution for both commercial and non-commercial purposes. For more information see the -[License file][license] in the GitHub repository. - - [content]: https://github.com/fsprojects/FSharp.Control.Reactive/tree/master/docs/content - [gh]: https://github.com/fsprojects/FSharp.Control.Reactive - [issues]: https://github.com/fsprojects/FSharp.Control.Reactive/issues - [readme]: https://github.com/fsprojects/FSharp.Control.Reactive/blob/master/README.md - [license]: https://github.com/fsprojects/FSharp.Control.Reactive/blob/master/LICENSE.txt -*) diff --git a/docs/content/introduction.fsx b/docs/content/introduction.fsx deleted file mode 100644 index 4e43fb2..0000000 --- a/docs/content/introduction.fsx +++ /dev/null @@ -1,94 +0,0 @@ - -(*** hide ***) -#I "../../src/FSharp.Control.Reactive/bin/Release/net46" -#r "System.Reactive.dll" -#r "FSharp.Control.Reactive.dll" - -(** -# Introduction to Observables - -## Prerequisits - -This page contains some basic examples of how to use `Observable`'s. -This is by no means a complete stable example and should only be used for demonstration purposes. - -## Subscribing on Observable - -The following example show how the Enabling/Disabling of a button can be controled by looking at the input of another input field (TextBox). - -![Enable Disable Button](img/enable-disable.gif) - -*) - -open System -open FSharp.Control.Reactive -open System.Windows.Forms - - -let buttonForm = new Form () -let btn = new Button() -let txb = new TextBox() - -txb.TextChanged -|> Observable.startWith [EventArgs.Empty] -|> Observable.subscribe (fun _ -> btn.Enabled <- not (String.IsNullOrEmpty txb.Text)) - -btn.Text <- "OK" -btn.Top <- 20 - -buttonForm.Controls.Add txb -buttonForm.Controls.Add btn -buttonForm.Show () - -(** -## Transforming Observable - -Incoming emits can be transformed using the mapping functionality. -Following example show how the input of a textbox can be transformed into the reversed value. - -![Reversed](img/reversed.gif) -*) - -module String = - let rev (s : string) = new String (s.ToCharArray () |> Array.rev) - -let input = new TextBox() -let reversed = new Label() - -input.TextChanged -|> Observable.map (fun _ -> input.Text |> String.rev) -|> Observable.subscribe (fun x -> reversed.Text <- x) - -reversed.Top <- 20 -let reverseForm = new Form () -reverseForm.Controls.Add input -reverseForm.Controls.Add reversed -reverseForm.Show () - -(** -## Merging Two emits into one -Merging multiple events into one can be done with the `Observable.merge` primitive. -Following example shows how we change the value of a label with the buttons ("Red" and "Green"). - -![Red-Green](img/red-green.gif) - -*) -let redBtn = new Button() -let greenBtn = new Button() -let result = new Label() - -let red = redBtn.Click |> Observable.mapTo "Red" -let green = greenBtn.Click |> Observable.mapTo "Green" - -Observable.merge red green -|> Observable.subscribe (fun x -> result.Text <- x) - -redBtn.Text <- "Red" -greenBtn.Text <- "Green" -greenBtn.Top <- 20 -result.Left <- 100 -let colorForm = new Form () -colorForm.Controls.Add redBtn -colorForm.Controls.Add greenBtn -colorForm.Controls.Add result -colorForm.Show () diff --git a/docs/content/tutorial.fsx b/docs/content/tutorial.fsx deleted file mode 100644 index 6eec3d3..0000000 --- a/docs/content/tutorial.fsx +++ /dev/null @@ -1,117 +0,0 @@ -(*** hide ***) -// This block of code is omitted in the generated HTML documentation. Use -// it to define helpers that you do not want to show in the documentation. -#I "../../src/FSharp.Control.Reactive/bin/Release/net46" -#I "../../src/FSharp.Control.Reactive.Testing/bin/Release/net46" -#I "../../packages/build/NUnit/lib/net45/" -#I "../../packages/build/FsCheck" -#r "nunit.framework.dll" -#r "FsCheck.dll" -#r "System.Reactive.dll" -#r "FSharp.Control.Reactive.dll" -#r "FSharp.Control.Reactive.Testing.dll" -#r "Microsoft.Reactive.Testing.dll" - - - -(** -Getting Started -=================== - -The easiest way to get started using FSharp.Control.Reactive is to take a look at the [tests](https://github.com/fsprojects/FSharp.Control.Reactive/blob/master/tests/ObservableSpecs.fs). In general, you can consider the `Observable` module as providing a set of extensions to the built-in `Observable` module. - -Observable Module -------------------- - -As a first, simple example, the built-in module does not include a `zip` operator, but FSharp.Control.Reactive fills in this gap: -*) -open FSharp.Control.Reactive - -let obs1 = Observable.single 1 -let obs2 = Observable.single "A" - -Observable.zip obs1 obs2 -|> Observable.subscribe (printfn "%A") -|> ignore - -(** -Computation Expressions -------------------- - -The provided computation expressions open new approaches for constructing and combining `Observable` computations. The `observe` computation expression provides a simple workflow using the essential LINQ operators: -*) -open FSharp.Control.Reactive.Builders - -let rec generate x = - observe { - yield x - if x < 100000 then - yield! generate (x + 1) } -generate 5 -|> Observable.subscribeWithCallbacks ignore ignore ignore -|> ignore - -(** -You can find a few additional examples of both the `observe` and `rxquery` computation expressions [on the source blog post](http://mnajder.blogspot.com/2011/09/when-reactive-framework-meets-f-30.html). - -Reactive Extensions -------------------- - -For more information on Rx, check out the [Rx Workshop on Channel 9](http://channel9.msdn.com/series/Rx-Workshop). The examples provided in the workshop should be easy to port to FSharp.Control.Reactive. The [Beginner's Guide to the Reactive Extensions](http://msdn.microsoft.com/en-us/data/gg577611.aspx) includes many other links to excellent content. - - *) - -(** -Reactive Testing -------------------- - -The Rx.NET has several OOP-minded objects to test Reactive Applications. This package contains some wrappers to make your Reactive Tests more functional. - -Following test shows how the Broadcast Subject can be tested: -*) -open NUnit.Framework -open FsCheck -open FSharp.Control.Reactive.Testing - -[] -let ``Broadcast Subject broadcast to all observers`` () = - Check.QuickThrowOnFailure <| fun (xs : int list) -> - TestSchedule.usage <| fun sch -> - use s = Subject.broadcast - let observer = TestSchedule.subscribeTestObserver sch s - - Subject.onNexts xs s - |> Subject.onCompleted - |> ignore - - TestObserver.nexts observer = xs - -(** -- The `TestSchedule.usage` call wil make sure we have a virtual time scheduler that we can use to sync our different observables and observers. -- The `subscribeTestObserver` call will subscribe the given `observable` to a `TestObserver`. -- This `TestObserver` can be used to assert on the emits that the SUT sends to it by using the `TesteObserver` module. (`TestObserver.nexts`, `TestObserver.all`, `TestObserver.errors`) - -The testing package also contains generated `TestNotifications` which we can use to simulate a stream of emits. -This values has to be registered first before using. - -Following example shows how the Functor Law can be testsd by creating a Hot Observable of simulated emits. *) - -[] -member __.Setup () = - Arb.register () |> ignore - -[] -member __.``Functor Law of Observables`` () = - Check.QuickThrowOnFailure <| - fun (TestNotifications ms : TestNotifications) (f : int -> int) (g : int -> int) -> - TestSchedule.usage <| fun sch -> - TestSchedule.hotObservable sch ms - |> Observable.retry - |> Observable.map f - |> Observable.map g - |> TestSchedule.subscribeTestObserverStart sch - |> TestObserver.nexts = TestNotification.mapNexts (f >> g) ms - -(** -NOTE: the previous test contains a `Observable.retry` call because the simulated emits will possible contain 'OnError' emits as well. -See: https://github.com/fsprojects/FSharp.Control.Reactive/blob/master/src/FSharp.Control.Reactive.Testing/TestNotifications.fs for more info on how the simulated emits are generated.*) \ No newline at end of file diff --git a/docs/tools/templates/template.cshtml b/docs/tools/templates/template.cshtml deleted file mode 100644 index 500dcaf..0000000 --- a/docs/tools/templates/template.cshtml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - @Title - - - - - - - - - - - - - - - -
- -
-
-
- @RenderBody() -
-
- F# Project - -
-
-
- Fork me on GitHub - - - diff --git a/global.json b/global.json deleted file mode 100644 index 2134ed9..0000000 --- a/global.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "sdk": { - "version": "8.0.400", - "rollForward": "latestFeature" - } -} \ No newline at end of file diff --git a/docs/files/img/Thumbs.db b/img/Thumbs.db similarity index 100% rename from docs/files/img/Thumbs.db rename to img/Thumbs.db diff --git a/docs/files/img/enable-disable.gif b/img/enable-disable.gif similarity index 100% rename from docs/files/img/enable-disable.gif rename to img/enable-disable.gif diff --git a/docs/files/img/logo.pdn b/img/logo.pdn similarity index 100% rename from docs/files/img/logo.pdn rename to img/logo.pdn diff --git a/docs/files/img/logo.png b/img/logo.png similarity index 100% rename from docs/files/img/logo.png rename to img/logo.png diff --git a/docs/files/img/red-green.gif b/img/red-green.gif similarity index 100% rename from docs/files/img/red-green.gif rename to img/red-green.gif diff --git a/docs/files/img/reversed.gif b/img/reversed.gif similarity index 100% rename from docs/files/img/reversed.gif rename to img/reversed.gif diff --git a/index.html b/index.html new file mode 100644 index 0000000..187b5e7 --- /dev/null +++ b/index.html @@ -0,0 +1,85 @@ + + + + + FSharp.Control.Reactive + + + + + + + + + + + + + + + + +
+ +
+
+
+

FSharp.Control.Reactive

+

FSharp.Control.Reactive provides F#-style modules for working with the Reactive Extensions (Rx) as a set of extensions to the built-in Observable module. The library includes observe and rxquery computation expressions, as well.

+
+
+
+
+ The FSharp.Control.Reactive library can be installed from NuGet: +
PM> Install-Package FSharp.Control.Reactive
+
+
+
+
+

Samples & documentation

+

The library comes will soon come with comprehensive documentation and +includes a Getting Started tutorial, as well as an API reference.

+

Contributing and copyright

+

The project is hosted on GitHub where you can report issues, fork +the project and submit pull requests. If you're adding new public API, please also +consider adding samples that can be turned into documentation. You might +also want to read library design notes to understand how it works.

+

The library is available under the Apache 2.0 license, which allows modification and +redistribution for both commercial and non-commercial purposes. For more information see the +License file in the GitHub repository.

+ + +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/introduction.html b/introduction.html new file mode 100644 index 0000000..787f287 --- /dev/null +++ b/introduction.html @@ -0,0 +1,231 @@ + + + + + Introduction to Observables + + + + + + + + + + + + + + + + +
+ +
+
+
+

Introduction to Observables

+

Prerequisits

+

This page contains some basic examples of how to use Observable's. +This is by no means a complete stable example and should only be used for demonstration purposes.

+

Subscribing on Observable

+

The following example show how the Enabling/Disabling of a button can be controled by looking at the input of another input field (TextBox).

+

Enable Disable Button

+ + + +
 1: 
+ 2: 
+ 3: 
+ 4: 
+ 5: 
+ 6: 
+ 7: 
+ 8: 
+ 9: 
+10: 
+11: 
+12: 
+13: 
+14: 
+15: 
+16: 
+17: 
+18: 
+19: 
+
open System
+open FSharp.Control.Reactive
+open System.Windows.Forms
+
+
+let buttonForm = new Form ()
+let btn = new Button()
+let txb = new TextBox()
+
+txb.TextChanged
+|> Observable.startWith [EventArgs.Empty]
+|> Observable.subscribe (fun _ -> btn.Enabled <- not (String.IsNullOrEmpty txb.Text))
+
+btn.Text <- "OK"
+btn.Top <- 20
+
+buttonForm.Controls.Add txb
+buttonForm.Controls.Add btn
+buttonForm.Show ()
+
+

Transforming Observable

+

Incoming emits can be transformed using the mapping functionality. +Following example show how the input of a textbox can be transformed into the reversed value.

+

Reversed

+ + + +
 1: 
+ 2: 
+ 3: 
+ 4: 
+ 5: 
+ 6: 
+ 7: 
+ 8: 
+ 9: 
+10: 
+11: 
+12: 
+13: 
+14: 
+15: 
+
module String = 
+    let rev (s : string) = new String (s.ToCharArray () |> Array.rev)
+
+let input = new TextBox()
+let reversed = new Label()
+
+input.TextChanged
+|> Observable.map (fun _ -> input.Text |> String.rev)
+|> Observable.subscribe (fun x -> reversed.Text <- x)
+
+reversed.Top <- 20
+let reverseForm = new Form ()
+reverseForm.Controls.Add input
+reverseForm.Controls.Add reversed
+reverseForm.Show ()
+
+

Merging Two emits into one

+

Merging multiple events into one can be done with the Observable.merge primitive. +Following example shows how we change the value of a label with the buttons ("Red" and "Green").

+

Red-Green

+ + + +
 1: 
+ 2: 
+ 3: 
+ 4: 
+ 5: 
+ 6: 
+ 7: 
+ 8: 
+ 9: 
+10: 
+11: 
+12: 
+13: 
+14: 
+15: 
+16: 
+17: 
+18: 
+19: 
+
let redBtn = new Button()
+let greenBtn = new Button()
+let result = new Label()
+
+let red = redBtn.Click |> Observable.mapTo "Red"
+let green = greenBtn.Click |> Observable.mapTo "Green"
+
+Observable.merge red green
+|> Observable.subscribe (fun x -> result.Text <- x)
+
+redBtn.Text <- "Red"
+greenBtn.Text <- "Green"
+greenBtn.Top <- 20
+result.Left <- 100
+let colorForm = new Form ()
+colorForm.Controls.Add redBtn
+colorForm.Controls.Add greenBtn
+colorForm.Controls.Add result
+colorForm.Show ()
+
+ +
namespace System
+
Multiple items
namespace FSharp

--------------------
namespace Microsoft.FSharp
+
Multiple items
namespace FSharp.Control

--------------------
namespace Microsoft.FSharp.Control
+
namespace FSharp.Control.Reactive
+
namespace System.Windows
+
val buttonForm : obj
+
val btn : obj
+
val txb : obj
+
+
Multiple items
module Observable

from FSharp.Control.Reactive

--------------------
module Observable

from Microsoft.FSharp.Control
+
val startWith : values:#seq<'T> -> source:IObservable<'T> -> IObservable<'T>
+
Multiple items
type EventArgs =
  new : unit -> EventArgs
  static val Empty : EventArgs

--------------------
EventArgs() : EventArgs
+
field EventArgs.Empty: EventArgs
+
Multiple items
val subscribe : onNext:('T -> unit) -> observable:IObservable<'T> -> IDisposable

--------------------
val subscribe : callback:('T -> unit) -> source:IObservable<'T> -> IDisposable
+
val not : value:bool -> bool
+
Multiple items
type String =
  new : value:char[] -> string + 8 overloads
  member Chars : int -> char
  member Clone : unit -> obj
  member CompareTo : value:obj -> int + 1 overload
  member Contains : value:string -> bool + 3 overloads
  member CopyTo : sourceIndex:int * destination:char[] * destinationIndex:int * count:int -> unit
  member EndsWith : value:string -> bool + 3 overloads
  member EnumerateRunes : unit -> StringRuneEnumerator
  member Equals : obj:obj -> bool + 2 overloads
  member GetEnumerator : unit -> CharEnumerator
  ...

--------------------
String(value: char []) : String
String(value: nativeptr<char>) : String
String(value: nativeptr<sbyte>) : String
String(value: ReadOnlySpan<char>) : String
String(c: char, count: int) : String
String(value: char [], startIndex: int, length: int) : String
String(value: nativeptr<char>, startIndex: int, length: int) : String
String(value: nativeptr<sbyte>, startIndex: int, length: int) : String
String(value: nativeptr<sbyte>, startIndex: int, length: int, enc: Text.Encoding) : String
+
String.IsNullOrEmpty(value: string) : bool
+
val rev : s:string -> String
+
val s : string
+
Multiple items
val string : value:'T -> string

--------------------
type string = String
+
type Array =
  member Clone : unit -> obj
  member CopyTo : array:Array * index:int -> unit + 1 overload
  member GetEnumerator : unit -> IEnumerator
  member GetLength : dimension:int -> int
  member GetLongLength : dimension:int -> int64
  member GetLowerBound : dimension:int -> int
  member GetUpperBound : dimension:int -> int
  member GetValue : [<ParamArray>] indices:int[] -> obj + 7 overloads
  member Initialize : unit -> unit
  member IsFixedSize : bool
  ...
+
val rev : array:'T [] -> 'T []
+
val input : obj
+
val reversed : obj
+
Multiple items
val map : f:('a -> 'b) -> source:IObservable<'a> -> IObservable<'b>

--------------------
val map : mapping:('T -> 'U) -> source:IObservable<'T> -> IObservable<'U>
+
val x : String
+
val reverseForm : obj
+
val redBtn : obj
+
val greenBtn : obj
+
val result : obj
+
val red : IObservable<string>
+
val mapTo : x:'a -> source:IObservable<'T> -> IObservable<'a>
+
val green : IObservable<string>
+
Multiple items
val merge : second:IObservable<'T> -> first:IObservable<'T> -> IObservable<'T>

--------------------
val merge : source1:IObservable<'T> -> source2:IObservable<'T> -> IObservable<'T>
+
val x : string
+
val colorForm : obj
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/paket.dependencies b/paket.dependencies deleted file mode 100644 index 5b0efc0..0000000 --- a/paket.dependencies +++ /dev/null @@ -1,38 +0,0 @@ -version 8.1.0 -source http://api.nuget.org/v3/index.json -redirects: on -storage: none -framework: auto-detect - -nuget fparsec -nuget FSharp.Core >= 4.7.2 -nuget System.Reactive >= 5.0 -nuget Microsoft.Reactive.Testing >= 5.0 -nuget Microsoft.NET.Test.Sdk -nuget NUnit < 4 -nuget NUnit.Runners -nuget NUnit3TestAdapter -nuget FsCheck -nuget Unquote -nuget GitVersion.MsBuild copy_local:true -nuget Microsoft.SourceLink.GitHub copy_local: true - -// [ FAKE GROUP ] -group Build - source https://api.nuget.org/v3/index.json - source https://ci.appveyor.com/nuget/fsharp-formatting - nuget Fake.Core.ReleaseNotes - nuget Fake.DotNet.Cli - nuget Fake.Tools.Git - nuget Fake.IO.FileSystem - nuget Fake.Core.Target - nuget Fake.DotNet.FSFormatting - nuget FSharp.Formatting >= 3 prerelease - nuget FSharp.Formatting.CommandTool >= 3 prerelease - nuget Fake.BuildServer.AppVeyor - nuget Fake.DotNet.Paket - nuget NUnit - nuget FsCheck - nuget Microsoft.AspNetCore - nuget Microsoft.AspNetCore.Hosting - nuget Microsoft.AspNetCore.StaticFiles \ No newline at end of file diff --git a/paket.lock b/paket.lock deleted file mode 100644 index b49382f..0000000 --- a/paket.lock +++ /dev/null @@ -1,620 +0,0 @@ -REDIRECTS: ON -STORAGE: NONE -RESTRICTION: || (== net472) (== net6.0) (== netstandard2.0) -NUGET - remote: http://api.nuget.org/v3/index.json - FParsec (1.1.1) - FSharp.Core (>= 4.3.4) - System.ValueTuple (>= 4.4) - restriction: || (== net472) (&& (== net6.0) (>= net45)) (&& (== netstandard2.0) (>= net45)) - FsCheck (2.16.6) - FSharp.Core (>= 4.2.3) - FSharp.Core (6.0.7) - GitVersion.MsBuild (6.1) - copy_local: true - Microsoft.Build.Tasks.Git (8.0) - copy_local: true - Microsoft.CodeCoverage (17.11.1) - restriction: || (== net472) (== net6.0) (&& (== netstandard2.0) (>= net462)) (&& (== netstandard2.0) (>= netcoreapp3.1)) - Microsoft.NET.Test.Sdk (17.11.1) - Microsoft.CodeCoverage (>= 17.11.1) - restriction: || (== net472) (== net6.0) (&& (== netstandard2.0) (>= net462)) (&& (== netstandard2.0) (>= netcoreapp3.1)) - Microsoft.TestPlatform.TestHost (>= 17.11.1) - restriction: || (&& (== net472) (>= netcoreapp3.1)) (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (== net472) (< net35)) (&& (== net472) (>= netcoreapp2.0)) (&& (== net472) (< netstandard1.0) (>= win8)) (&& (== net472) (< netstandard1.3) (>= wpa81)) (&& (== net472) (< netstandard1.5) (>= uap10.0)) (&& (== net472) (>= uap10.1)) (&& (== net472) (>= wp8)) (== net6.0) (== netstandard2.0) - Microsoft.Reactive.Testing (6.0.1) - System.Reactive (>= 6.0.1) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (== net472) (&& (== net6.0) (>= net472)) (&& (== net6.0) (>= uap10.1)) (== netstandard2.0) - Microsoft.SourceLink.Common (8.0) - copy_local: true - Microsoft.SourceLink.GitHub (8.0) - copy_local: true - Microsoft.Build.Tasks.Git (>= 8.0) - Microsoft.SourceLink.Common (>= 8.0) - Microsoft.TestPlatform.ObjectModel (17.11.1) - restriction: || (&& (== net472) (>= netcoreapp3.1)) (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - System.Reflection.Metadata (>= 1.6) - Microsoft.TestPlatform.TestHost (17.11.1) - restriction: || (&& (== net472) (>= netcoreapp3.1)) (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - Microsoft.TestPlatform.ObjectModel (>= 17.11.1) - restriction: || (&& (== net472) (>= netcoreapp3.1)) (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - Newtonsoft.Json (>= 13.0.1) - restriction: || (&& (== net472) (>= netcoreapp3.1)) (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - NETStandard.Library (2.0.3) - restriction: || (&& (== net472) (< net35)) (== net6.0) (== netstandard2.0) - Microsoft.NETCore.Platforms (>= 1.1) - Newtonsoft.Json (13.0.3) - restriction: || (&& (== net472) (>= netcoreapp3.1)) (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - NUnit (3.14) - NETStandard.Library (>= 2.0) - restriction: || (&& (== net472) (< net35)) (== net6.0) (== netstandard2.0) - NUnit.Console (3.18.2) - NUnit.ConsoleRunner (>= 3.18.2) - NUnit.Extension.NUnitProjectLoader (>= 3.6) - NUnit.Extension.NUnitV2Driver (>= 3.8) - NUnit.Extension.NUnitV2ResultWriter (>= 3.6) - NUnit.Extension.TeamCityEventListener (>= 1.0.7) - NUnit.Extension.VSProjectLoader (>= 3.8) - NUnit.ConsoleRunner (3.18.2) - NUnit.Extension.NUnitProjectLoader (3.8) - NUnit.Extension.NUnitV2Driver (3.9) - NUnit.Extension.NUnitV2ResultWriter (3.8) - NUnit.Extension.TeamCityEventListener (1.0.9) - NUnit.Extension.VSProjectLoader (3.9) - NUnit.Runners (3.12) - NUnit.Console (>= 3.12) - NUnit3TestAdapter (4.6) - System.Collections.Immutable (8.0) - restriction: || (&& (== net472) (>= netcoreapp3.1)) (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - System.Reactive (6.0.1) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (== net472) (&& (== net6.0) (>= net472)) (&& (== net6.0) (>= uap10.1)) (== netstandard2.0) - System.Reflection.Metadata (8.0) - restriction: || (&& (== net472) (>= netcoreapp3.1)) (== net6.0) (&& (== netstandard2.0) (>= netcoreapp3.1)) - System.Collections.Immutable (>= 8.0) - System.Runtime.CompilerServices.Unsafe (6.0) - System.Threading.Tasks.Extensions (4.5.4) - restriction: || (== net472) (&& (== net6.0) (>= net472)) (&& (== net6.0) (>= uap10.1)) (== netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (== net472) (&& (== net6.0) (>= net461)) (&& (== net6.0) (< netcoreapp2.1)) (&& (== net6.0) (< netstandard1.0)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (>= wp8)) (== netstandard2.0) - System.ValueTuple (4.5) - restriction: || (== net472) (&& (== net6.0) (>= net45)) (&& (== netstandard2.0) (>= net45)) - Unquote (7.0.1) - FSharp.Core (>= 6.0) - -GROUP Build -NUGET - remote: https://api.nuget.org/v3/index.json - BlackFox.VsWhere (1.1) - restriction: >= netstandard2.0 - 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.BuildServer.AppVeyor (6.1.1) - Fake.Core.Environment (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Process (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.String (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Net.Http (>= 6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Fake.Core.CommandLineParsing (6.1.1) - restriction: >= netstandard2.0 - FParsec (>= 1.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Fake.Core.Context (6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Fake.Core.Environment (6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Fake.Core.FakeVar (6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Context (>= 6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Fake.Core.Process (6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Environment (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.FakeVar (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.String (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (>= 6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 8.0) - restriction: >= netstandard2.0 - Fake.Core.ReleaseNotes (6.1.1) - Fake.Core.SemVer (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.String (>= 6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Fake.Core.SemVer (6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Fake.Core.String (6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Fake.Core.Target (6.1.1) - Fake.Core.CommandLineParsing (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Context (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Environment (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.FakeVar (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Process (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.String (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 6.1.1) - restriction: >= netstandard2.0 - FSharp.Control.Reactive (>= 5.0.2) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Fake.Core.Tasks (6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Fake.Core.Trace (6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Environment (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.FakeVar (>= 6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Fake.Core.Xml (6.1.1) - restriction: >= netstandard2.0 - Fake.Core.String (>= 6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Fake.DotNet.Cli (6.1.1) - Fake.Core.Environment (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Process (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.String (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.DotNet.MSBuild (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.DotNet.NuGet (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (>= 6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Mono.Posix.NETStandard (>= 1.0) - restriction: >= netstandard2.0 - Newtonsoft.Json (>= 13.0.3) - restriction: >= netstandard2.0 - Fake.DotNet.FSFormatting (6.1.1) - Fake.Core.Process (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.DotNet.Cli (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (>= 6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Fake.DotNet.MSBuild (6.1.1) - restriction: >= netstandard2.0 - BlackFox.VsWhere (>= 1.1) - restriction: >= netstandard2.0 - Fake.Core.Environment (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Process (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.String (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (>= 6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (>= 2.1.815) - restriction: >= netstandard2.0 - Fake.DotNet.NuGet (6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Environment (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Process (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.SemVer (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.String (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Tasks (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Xml (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Net.Http (>= 6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Newtonsoft.Json (>= 13.0.3) - restriction: >= netstandard2.0 - NuGet.Protocol (>= 6.10.1) - restriction: >= netstandard2.0 - Fake.DotNet.Paket (6.1.1) - Fake.Core.Process (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.String (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.DotNet.Cli (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (>= 6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (6.1.1) - Fake.Core.String (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Fake.Net.Http (6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - Fake.Tools.Git (6.1.1) - Fake.Core.Environment (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Process (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.SemVer (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.String (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.Core.Trace (>= 6.1.1) - restriction: >= netstandard2.0 - Fake.IO.FileSystem (>= 6.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 8.0.301) - restriction: >= netstandard2.0 - FParsec (1.1.1) - restriction: >= netstandard2.0 - FSharp.Core (>= 4.3.4) - restriction: || (>= net45) (>= netstandard2.0) - System.ValueTuple (>= 4.4) - restriction: >= net45 - FsCheck (2.16.6) - FSharp.Core (>= 4.0.0.1) - restriction: && (< net452) (>= netstandard1.0) (< netstandard1.6) - FSharp.Core (>= 4.2.3) - restriction: || (>= net452) (>= netstandard1.6) - FSharp.Compiler.Service (43.8.301) - restriction: >= netstandard2.1 - FSharp.Core (8.0.301) - restriction: >= netstandard2.0 - System.Buffers (>= 4.5.1) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 7.0) - restriction: >= netstandard2.0 - System.Diagnostics.DiagnosticSource (>= 7.0.2) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: >= netstandard2.0 - System.Reflection.Emit (>= 4.7) - restriction: >= netstandard2.0 - System.Reflection.Metadata (>= 7.0) - restriction: >= netstandard2.0 - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: >= netstandard2.0 - FSharp.Control.Reactive (5.0.5) - restriction: >= netstandard2.0 - FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 - System.Reactive (>= 5.0 < 6.0) - restriction: >= netstandard2.0 - FSharp.Core (8.0.301) - restriction: >= netstandard1.0 - FSharp.Formatting (21.0.0-beta-003) - FSharp.Compiler.Service (43.8.301) - restriction: >= netstandard2.1 - FSharp.Core (8.0.301) - restriction: >= netstandard2.1 - FSharp.Formatting.CommandTool (11.5.1) - Microsoft.AspNetCore (2.2) - Microsoft.AspNetCore.Diagnostics (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.HostFiltering (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Hosting (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Routing (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Server.IIS (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Server.IISIntegration (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Server.Kestrel (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Server.Kestrel.Https (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration.CommandLine (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration.EnvironmentVariables (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration.FileExtensions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration.Json (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration.UserSecrets (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Logging (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Logging.Configuration (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Logging.Console (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Logging.Debug (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Logging.EventSource (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Authentication.Abstractions (2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Logging.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Options (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Authentication.Core (2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Authentication.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Extensions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Connections.Abstractions (8.0.8) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Extensions.Features (>= 8.0.8) - restriction: || (>= net462) (>= netstandard2.0) - System.IO.Pipelines (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.AspNetCore.Diagnostics (2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Diagnostics.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Hosting.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Extensions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.WebUtilities (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.FileProviders.Physical (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Logging.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Options (>= 2.2) - restriction: >= netstandard2.0 - System.Diagnostics.DiagnosticSource (>= 4.5) - restriction: >= netstandard2.0 - System.Reflection.Metadata (>= 1.6) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Diagnostics.Abstractions (2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.HostFiltering (2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Hosting.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Extensions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Options (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Hosting (2.2.7) - Microsoft.AspNetCore.Hosting.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Extensions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration.EnvironmentVariables (>= 2.2.4) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration.FileExtensions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.DependencyInjection (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.FileProviders.Physical (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Hosting.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Logging (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Options (>= 2.2) - restriction: >= netstandard2.0 - System.Diagnostics.DiagnosticSource (>= 4.5.1) - restriction: >= netstandard2.0 - System.Reflection.Metadata (>= 1.6) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Hosting.Abstractions (2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Hosting.Server.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Hosting.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Hosting.Server.Abstractions (2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Features (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http (2.2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.WebUtilities (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.ObjectPool (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Options (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Net.Http.Headers (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Abstractions (2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Features (>= 2.2) - restriction: >= netstandard2.0 - System.Text.Encodings.Web (>= 4.5) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Extensions (2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.FileProviders.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Net.Http.Headers (>= 2.2) - restriction: >= netstandard2.0 - System.Buffers (>= 4.5) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Features (5.0.17) - restriction: >= netstandard2.0 - Microsoft.Extensions.Primitives (>= 5.0.1) - restriction: || (>= net461) (>= netstandard2.0) - System.IO.Pipelines (>= 5.0.2) - restriction: || (>= net461) (>= netstandard2.0) - Microsoft.AspNetCore.HttpOverrides (2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Extensions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Logging.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Options (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Routing (2.2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Extensions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Routing.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Logging.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.ObjectPool (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Options (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Routing.Abstractions (2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Server.IIS (2.2.6) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Authentication.Core (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Connections.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Hosting.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - System.IO.Pipelines (>= 4.5.3) - restriction: >= netstandard2.0 - System.Security.Principal.Windows (>= 4.5) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Server.IISIntegration (2.2.1) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Authentication.Core (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Hosting.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Extensions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.HttpOverrides (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Logging.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Options (>= 2.2) - restriction: >= netstandard2.0 - System.Buffers (>= 4.5) - restriction: >= netstandard2.0 - System.IO.Pipelines (>= 4.5.2) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.1) - restriction: >= netstandard2.0 - System.Numerics.Vectors (>= 4.5) - restriction: >= netstandard2.0 - System.Runtime.CompilerServices.Unsafe (>= 4.5.1) - restriction: >= netstandard2.0 - System.Security.Principal.Windows (>= 4.5) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Server.Kestrel (2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Hosting (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Server.Kestrel.Core (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Server.Kestrel.Https (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Server.Kestrel.Core (2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Hosting.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.WebUtilities (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration.Binder (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Logging.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Options (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Net.Http.Headers (>= 2.2) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.1) - restriction: >= netstandard2.0 - System.Numerics.Vectors (>= 4.5) - restriction: >= netstandard2.0 - System.Runtime.CompilerServices.Unsafe (>= 4.5.1) - restriction: >= netstandard2.0 - System.Security.Cryptography.Cng (>= 4.5) - restriction: >= netstandard2.0 - System.Threading.Tasks.Extensions (>= 4.5.1) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Server.Kestrel.Https (2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Server.Kestrel.Core (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions (2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Connections.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (2.2.1) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Hosting.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Options (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.StaticFiles (2.2) - Microsoft.AspNetCore.Hosting.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.Http.Extensions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.FileProviders.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Logging.Abstractions (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.WebEncoders (>= 2.2) - restriction: >= netstandard2.0 - Microsoft.AspNetCore.WebUtilities (8.0.8) - restriction: >= netstandard2.0 - Microsoft.Net.Http.Headers (>= 8.0.8) - restriction: >= net8.0 - System.IO.Pipelines (>= 8.0) - restriction: >= net8.0 - Microsoft.Bcl.AsyncInterfaces (8.0) - restriction: || (&& (>= net462) (>= netstandard2.0)) (&& (< net6.0) (>= netstandard2.0)) (&& (< net8.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1)) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Build.Framework (17.11.4) - restriction: >= netstandard2.0 - Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net8.0) (>= netstandard2.0) - System.Memory (>= 4.5.5) - restriction: && (< net472) (< net8.0) (>= netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net8.0) (>= netstandard2.0)) - System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net8.0) (>= netstandard2.0) - Microsoft.Build.Utilities.Core (17.11.4) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 17.11.4) - restriction: >= netstandard2.0 - Microsoft.IO.Redist (>= 6.0) - restriction: >= net472 - Microsoft.NET.StringTools (>= 17.11.4) - restriction: >= netstandard2.0 - Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net8.0) (>= netstandard2.0) - System.Collections.Immutable (>= 8.0) - restriction: >= netstandard2.0 - System.Configuration.ConfigurationManager (>= 8.0) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net8.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net8.0) (>= netstandard2.0)) - System.Security.Principal.Windows (>= 5.0) - restriction: && (< net472) (< net8.0) (>= netstandard2.0) - System.Text.Encoding.CodePages (>= 7.0) - restriction: && (< net472) (< net8.0) (>= netstandard2.0) - Microsoft.Extensions.Configuration (8.0) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Primitives (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Configuration.Abstractions (8.0) - restriction: >= netstandard2.0 - Microsoft.Extensions.Primitives (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - System.ValueTuple (>= 4.5) - restriction: >= net462 - Microsoft.Extensions.Configuration.Binder (8.0.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Configuration.CommandLine (8.0) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Configuration.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Configuration.EnvironmentVariables (8.0) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Configuration.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Configuration.FileExtensions (8.0.1) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Configuration.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.FileProviders.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.FileProviders.Physical (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Primitives (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Configuration.Json (8.0) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Configuration.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Configuration.FileExtensions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.FileProviders.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Text.Json (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Configuration.UserSecrets (8.0) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Configuration.Json (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.FileProviders.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.FileProviders.Physical (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.DependencyInjection (8.0) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Extensions.DependencyInjection.Abstractions (8.0.1) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Extensions.Diagnostics.Abstractions (8.0) - restriction: >= netstandard2.0 - Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Options (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Diagnostics.DiagnosticSource (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - Microsoft.Extensions.Features (8.0.8) - restriction: >= netstandard2.0 - Microsoft.Extensions.FileProviders.Abstractions (8.0) - restriction: >= netstandard2.0 - Microsoft.Extensions.Primitives (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.FileProviders.Physical (8.0) - restriction: >= netstandard2.0 - Microsoft.Extensions.FileProviders.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.FileSystemGlobbing (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Primitives (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.FileSystemGlobbing (8.0) - restriction: >= netstandard2.0 - Microsoft.Extensions.Hosting.Abstractions (8.0) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Extensions.Configuration.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Diagnostics.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.FileProviders.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Logging.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Extensions.Logging (8.0) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Extensions.DependencyInjection (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Logging.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Options (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Diagnostics.DiagnosticSource (>= 8.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.1)) (&& (>= netstandard2.0) (< netstandard2.1)) - System.ValueTuple (>= 4.5) - restriction: >= net462 - Microsoft.Extensions.Logging.Abstractions (8.0.1) - restriction: >= netstandard2.0 - Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.1) - restriction: || (>= net462) (>= netstandard2.0) - System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - Microsoft.Extensions.Logging.Configuration (8.0) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Configuration.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Configuration.Binder (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Logging (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Logging.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Options (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Logging.Console (8.0) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Logging (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Logging.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Logging.Configuration (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Options (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: && (>= net6.0) (< net7.0) - System.Text.Json (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Logging.Debug (8.0) - restriction: >= netstandard2.0 - Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Logging (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Logging.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Logging.EventSource (8.0) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Logging (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Logging.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Options (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Primitives (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Text.Json (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.ObjectPool (8.0.8) - restriction: >= netstandard2.0 - Microsoft.Extensions.Options (8.0.2) - restriction: >= netstandard2.0 - Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Primitives (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - System.ComponentModel.Annotations (>= 5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) - System.ValueTuple (>= 4.5) - restriction: >= net462 - Microsoft.Extensions.Options.ConfigurationExtensions (8.0) - restriction: >= netstandard2.0 - Microsoft.Extensions.Configuration.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Configuration.Binder (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Options (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Primitives (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Primitives (8.0) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - Microsoft.Extensions.WebEncoders (8.0.8) - restriction: >= netstandard2.0 - Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.1) - restriction: || (>= net462) (>= netstandard2.0) - Microsoft.Extensions.Options (>= 8.0.2) - restriction: || (>= net462) (>= netstandard2.0) - System.Text.Encodings.Web (>= 8.0) - restriction: || (>= net462) (&& (< net8.0) (>= netstandard2.0)) - Microsoft.IO.Redist (6.0.1) - restriction: >= net472 - System.Buffers (>= 4.5.1) - restriction: >= net472 - System.Memory (>= 4.5.4) - restriction: >= net472 - Microsoft.Net.Http.Headers (8.0.8) - restriction: >= netstandard2.0 - Microsoft.Extensions.Primitives (>= 8.0) - restriction: >= net8.0 - Microsoft.NET.StringTools (17.11.4) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: || (>= net472) (&& (< net8.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net472) (&& (< net8.0) (>= netstandard2.0)) - Microsoft.NETCore.Platforms (7.0.4) - restriction: || (&& (< 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)) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) - Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< 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)) - Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net472) (< net8.0) (>= netstandard2.0)) - System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) - System.Security.AccessControl (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.2.350) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 17.5) - restriction: >= netstandard2.0 - Microsoft.Build.Utilities.Core (>= 17.5) - restriction: >= netstandard2.0 - Newtonsoft.Json (13.0.3) - restriction: >= netstandard2.0 - NuGet.Common (6.11) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 6.11) - restriction: >= netstandard2.0 - NuGet.Configuration (6.11) - restriction: >= netstandard2.0 - NuGet.Common (>= 6.11) - restriction: >= netstandard2.0 - System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Frameworks (6.11) - restriction: >= netstandard2.0 - NuGet.Packaging (6.11) - restriction: >= netstandard2.0 - Newtonsoft.Json (>= 13.0.3) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 6.11) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 6.11) - restriction: >= netstandard2.0 - System.Security.Cryptography.Pkcs (>= 6.0.4) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - NuGet.Protocol (6.11) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 6.11) - restriction: >= netstandard2.0 - System.Text.Json (>= 7.0.3) - restriction: || (>= net472) (&& (< net5.0) (>= netstandard2.0)) - NuGet.Versioning (6.11) - restriction: >= netstandard2.0 - NUnit (4.2.2) - System.Memory (>= 4.5.5) - restriction: >= net462 - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: >= net462 - System.ValueTuple (>= 4.5) - restriction: >= net462 - System.Buffers (4.5.1) - restriction: || (>= net462) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.0) - System.Collections.Immutable (8.0) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.ComponentModel.Annotations (5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) - System.Configuration.ConfigurationManager (8.0) - restriction: >= netstandard2.0 - System.Diagnostics.EventLog (>= 8.0) - restriction: >= net7.0 - System.Security.Cryptography.ProtectedData (>= 8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= net6.0) - System.Diagnostics.DiagnosticSource (8.0.1) - restriction: || (&& (< net6.0) (>= netstandard2.1)) (>= netstandard2.0) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Diagnostics.EventLog (8.0) - restriction: >= net7.0 - System.Formats.Asn1 (8.0.1) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.1) - System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.IO (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (>= netstandard2.0)) - System.IO.Pipelines (8.0) - restriction: >= netstandard2.0 - System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (4.5.5) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net462) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= netstandard2.0) - System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= 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) (< netstandard1.1)) (&& (< 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)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Numerics.Vectors (4.5) - restriction: || (>= net462) (>= netstandard2.0) - 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) - System.Reflection.Emit (4.7) - restriction: >= netstandard2.1 - System.Reflection.Metadata (8.0) - restriction: >= netstandard2.0 - System.Collections.Immutable (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (>= netstandard2.0)) - Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.2) (< win8) (< wp8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.2) (< win8) (< wp8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - System.Runtime.CompilerServices.Unsafe (6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (>= netstandard2.0) - 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 (6.0.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) - System.Security.Principal.Windows (>= 5.0) - restriction: || (>= net461) (&& (< net6.0) (>= netstandard2.0)) - System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (>= netstandard2.0)) - System.IO (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) - System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) - System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) - System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< netstandard1.6)) (>= net463) - System.Security.Cryptography.Cng (5.0) - restriction: || (&& (>= net5.0) (< net6.0)) (&& (>= net5.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) (>= netstandard2.0) - Microsoft.NETCore.Platforms (>= 5.0) - restriction: && (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< 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)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (>= netstandard2.0)) - System.Security.Cryptography.Pkcs (8.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) - System.Buffers (>= 4.5.1) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) - System.Formats.Asn1 (>= 8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (>= netstandard2.1) - System.Memory (>= 4.5.5) - restriction: && (< net462) (>= netstandard2.0) (< netstandard2.1) - System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net462) (>= netstandard2.0) (< netstandard2.1)) (&& (< net6.0) (>= netstandard2.1)) - System.Security.Cryptography.Primitives (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (>= netstandard2.0)) - System.Security.Cryptography.ProtectedData (8.0) - restriction: || (&& (< net462) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= net6.0) - System.Memory (>= 4.5.5) - restriction: && (< net462) (< net6.0) (>= netstandard2.0) - System.Security.Principal.Windows (5.0) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.1)) (&& (>= net461) (>= xamarinios)) (&& (>= net461) (>= xamarinmac)) (&& (< net6.0) (>= netcoreapp2.1)) (&& (< net6.0) (>= xamarinios)) (&& (< net6.0) (>= xamarinmac)) (>= netstandard2.0) - Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) - System.Text.Encoding.CodePages (8.0) - restriction: && (< net472) (< net8.0) (>= netstandard2.0) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Text.Encodings.Web (8.0) - restriction: >= netstandard2.0 - System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Text.Json (8.0.4) - restriction: >= netstandard2.0 - Microsoft.Bcl.AsyncInterfaces (>= 8.0) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Buffers (>= 4.5.1) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Memory (>= 4.5.5) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.Runtime.CompilerServices.Unsafe (>= 6.0) - restriction: || (>= net462) (&& (>= net6.0) (< net7.0)) (&& (< net6.0) (>= netstandard2.0)) - System.Text.Encodings.Web (>= 8.0) - restriction: || (>= net462) (>= netstandard2.0) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net462) (&& (< net6.0) (>= netstandard2.0)) - System.ValueTuple (>= 4.5) - restriction: >= net462 - System.Threading.Tasks.Extensions (4.5.4) - restriction: || (>= net462) (>= netstandard2.0) - System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< win8)) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= wp8) - System.ValueTuple (4.5) - restriction: >= net462 diff --git a/reference/fsharp-control-reactive-buildersmodule-observablebuilder.html b/reference/fsharp-control-reactive-buildersmodule-observablebuilder.html new file mode 100644 index 0000000..a1b3012 --- /dev/null +++ b/reference/fsharp-control-reactive-buildersmodule-observablebuilder.html @@ -0,0 +1,343 @@ + + + + + ObservableBuilder - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

ObservableBuilder

+

+ + Namespace: FSharp.Control.Reactive
+ Parent Module: Builders
+

+
+

An Observable computation builder.

+ +
+

Constructors

+ + + + + + + + + + +
ConstructorDescription
+ + new() + +
+ Signature: unit -> ObservableBuilder
+
+
+ + + + + +

CompiledName: .ctor

+
+

Instance members

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Instance memberDescription
+ + x.Bind(m, f) + +
+ Signature: (m:IObservable<'?7863> * f:('?7863 -> IObservable<'?7864>)) -> IObservable<'?7864>
+ Type parameters: '?7863, '?7864
+
+ + + + + +
+ + x.Combine(comp1, comp2) + +
+ Signature: (comp1:IObservable<'?7866> * comp2:IObservable<'?7866>) -> IObservable<'?7866>
+ Type parameters: '?7866
+
+ + + + + +
+ + x.Delay(f) + +
+ Signature: (f:(unit -> IObservable<'?7868>)) -> IObservable<'?7868>
+ Type parameters: '?7868
+
+ + + + + +
+ + x.For(sequence, body) + +
+ Signature: (sequence:IEnumerable<'?7872> * body:('?7872 -> IObservable<'?7873>)) -> IObservable<'?7873>
+ Type parameters: '?7872, '?7873
+
+ + + + + +
+ + x.Return(x) + +
+ Signature: x:'?7888 -> IObservable<'?7888>
+ Type parameters: '?7888 + Attributes:
+[<Obsolete("Use Yield. Return will be removed in an upcoming version of FSharp.Control.Reactive.")>]
+
+
+
+
+ WARNING: This API is obsolete +

Use Yield. Return will be removed in an upcoming version of FSharp.Control.Reactive.

+
+ + + + + +
+ + x.ReturnFrom(m) + +
+ Signature: m:IObservable<'?7890> -> IObservable<'?7890>
+ Type parameters: '?7890 + Attributes:
+[<Obsolete("Use Yield. Return will be removed in an upcoming version of FSharp.Control.Reactive.")>]
+
+
+
+
+ WARNING: This API is obsolete +

Use Yield. Return will be removed in an upcoming version of FSharp.Control.Reactive.

+
+ + + + + +
+ + x.TryFinally(m, compensation) + +
+ Signature: (m:IObservable<'?7877> * compensation:(unit -> unit)) -> IObservable<'?7877>
+ Type parameters: '?7877
+
+ + + + + +
+ + x.TryWith(m, h) + +
+ Signature: (m:IObservable<'?7875> * h:(Exception -> IObservable<'?7875>)) -> IObservable<'?7875>
+ Type parameters: '?7875
+
+ + + + + +
+ + x.Using(res, body) + +
+ Signature: (res:'?7879 * body:('?7879 -> IObservable<'?7880>)) -> IObservable<'?7880>
+ Type parameters: '?7879, '?7880
+
+ + + + + +
+ + x.While(guard, m) + +
+ Signature: (guard:(unit -> bool) * m:IObservable<'?7882>) -> IObservable<'?7882>
+ Type parameters: '?7882
+
+ + + + + +
+ + x.Yield(x) + +
+ Signature: x:'?7884 -> IObservable<'?7884>
+ Type parameters: '?7884
+
+ + + + + +
+ + x.YieldFrom(m) + +
+ Signature: m:IObservable<'?7886> -> IObservable<'?7886>
+ Type parameters: '?7886
+
+ + + + + +
+ + x.Zero() + +
+ Signature: unit -> IObservable<'?7870>
+ Type parameters: '?7870
+
+ + + + + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-buildersmodule-rxquerybuilder.html b/reference/fsharp-control-reactive-buildersmodule-rxquerybuilder.html new file mode 100644 index 0000000..e43ffa5 --- /dev/null +++ b/reference/fsharp-control-reactive-buildersmodule-rxquerybuilder.html @@ -0,0 +1,725 @@ + + + + + RxQueryBuilder - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

RxQueryBuilder

+

+ + Namespace: FSharp.Control.Reactive
+ Parent Module: Builders
+

+ +

Constructors

+ + + + + + + + + + +
ConstructorDescription
+ + new() + +
+ Signature: unit -> RxQueryBuilder
+
+
+ + + + + +

CompiledName: .ctor

+
+

Instance members

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Instance memberDescription
+ + x.All(s, predicate) + +
+ Signature: (s:IObservable<'?7916> * predicate:('?7916 -> bool)) -> IObservable<bool>
+ Type parameters: '?7916 + Attributes:
+[<CustomOperation("all")>]
+
+
+
+ + + + + +
+ + x.Contains(s, key) + +
+ Signature: (s:IObservable<'?7918> * key:'?7918) -> IObservable<bool>
+ Type parameters: '?7918 + Attributes:
+[<CustomOperation("contains")>]
+
+
+
+ + + + + +
+ + x.Count(s) + +
+ Signature: s:IObservable<'?7914> -> IObservable<int>
+ Type parameters: '?7914 + Attributes:
+[<CustomOperation("count")>]
+
+
+
+ + + + + +
+ + x.Distinct(s) + +
+ Signature: s:IObservable<'?7920> -> IObservable<'?7920>
+ Type parameters: '?7920 + Attributes:
+[<CustomOperation("distinct", MaintainsVariableSpace = true, AllowIntoPattern = true)>]
+
+
+
+ + + + + +
+ + x.ExactlyOne(s) + +
+ Signature: s:IObservable<'?7922> -> IObservable<'?7922>
+ Type parameters: '?7922 + Attributes:
+[<CustomOperation("exactlyOne")>]
+
+
+
+ + + + + +
+ + x.ExactlyOneOrDefault(s) + +
+ Signature: s:IObservable<'?7924> -> IObservable<'?7924>
+ Type parameters: '?7924 + Attributes:
+[<CustomOperation("exactlyOneOrDefault")>]
+
+
+
+ + + + + +
+ + x.Find(s, predicate) + +
+ Signature: (s:IObservable<'?7926> * predicate:('?7926 -> bool)) -> IObservable<'?7926>
+ Type parameters: '?7926 + Attributes:
+[<CustomOperation("find")>]
+
+
+
+ + + + + +
+ + x.For(s, body) + +
+ Signature: (s:IObservable<'?7894> * body:('?7894 -> IObservable<'?7895>)) -> IObservable<'?7895>
+ Type parameters: '?7894, '?7895
+
+ + + + + +
+ + x.GroupBy(s, keySelector) + +
+ Signature: (s:IObservable<'?7948> * keySelector:('?7948 -> '?7949)) -> IObservable<IGroupedObservable<'?7949,'?7948>>
+ Type parameters: '?7948, '?7949 + Attributes:
+[<CustomOperation("groupBy", AllowIntoPattern = true)>]
+
+
+
+ + + + + +
+ + x.GroupJoin(...) + +
+ Signature: (s1:IObservable<'?7961> * s2:IObservable<'?7962> * s1KeySelector:('?7961 -> IObservable<'?7963>) * s2KeySelector:('?7962 -> IObservable<'?7964>) * resultSelector:('?7961 -> IObservable<'?7962> -> '?7965)) -> IObservable<'?7965>
+ Type parameters: '?7961, '?7962, '?7963, '?7964, '?7965 + Attributes:
+[<CustomOperation("groupJoin", AllowIntoPattern = true)>]
+
+
+
+ + + + + +
+ + x.GroupValBy(...) + +
+ Signature: (s:IObservable<'?7951> * resultSelector:('?7951 -> '?7952) * keySelector:('?7951 -> '?7953)) -> IObservable<IGroupedObservable<'?7953,'?7952>>
+ Type parameters: '?7951, '?7952, '?7953 + Attributes:
+[<CustomOperation("groupValBy", AllowIntoPattern = true)>]
+
+
+
+ + + + + +
+ + x.Head(s) + +
+ Signature: s:IObservable<'?7928> -> IObservable<'?7928>
+ Type parameters: '?7928 + Attributes:
+[<CustomOperation("head")>]
+
+
+
+ + + + + +
+ + x.HeadOrDefault(s) + +
+ Signature: s:IObservable<'?7930> -> IObservable<'?7930>
+ Type parameters: '?7930 + Attributes:
+[<CustomOperation("headOrDefault")>]
+
+
+
+ + + + + +
+ + x.Iter(s, selector) + +
+ Signature: (s:IObservable<'?7971> * selector:('?7971 -> unit)) -> IObservable<'?7971>
+ Type parameters: '?7971 + Attributes:
+[<CustomOperation("iter")>]
+
+
+
+ + + + + +
+ + x.Join(...) + +
+ Signature: (s1:IObservable<'?7955> * s2:IObservable<'?7956> * s1KeySelector:('?7955 -> IObservable<'?7957>) * s2KeySelector:('?7956 -> IObservable<'?7958>) * resultSelector:('?7955 -> '?7956 -> '?7959)) -> IObservable<'?7959>
+ Type parameters: '?7955, '?7956, '?7957, '?7958, '?7959 + Attributes:
+[<CustomOperation("join", IsLikeJoin = true)>]
+
+
+
+ + + + + +
+ + x.Last(s) + +
+ Signature: s:IObservable<'?7932> -> IObservable<'?7932>
+ Type parameters: '?7932 + Attributes:
+[<CustomOperation("last")>]
+
+
+
+ + + + + +
+ + x.LastOrDefault(s) + +
+ Signature: s:IObservable<'?7934> -> IObservable<'?7934>
+ Type parameters: '?7934 + Attributes:
+[<CustomOperation("lastOrDefault")>]
+
+
+
+ + + + + +
+ + x.MaxBy(s, valueSelector) + +
+ Signature: (s:IObservable<'a> * valueSelector:('a -> 'b)) -> IObservable<IList<'a>>
+ Type parameters: 'a, 'b + Attributes:
+[<CustomOperation("maxBy")>]
+
+
+
+ + + + + +
+ + x.MinBy(s, valueSelector) + +
+ Signature: (s:IObservable<'a> * valueSelector:('a -> 'b)) -> IObservable<IList<'a>>
+ Type parameters: 'a, 'b + Attributes:
+[<CustomOperation("minBy")>]
+
+
+
+ + + + + +
+ + x.Nth(s, index) + +
+ Signature: (s:IObservable<'a> * index:int) -> IObservable<'a>
+ Type parameters: 'a + Attributes:
+[<CustomOperation("nth")>]
+
+
+
+ + + + + +
+ + x.Select(s, selector) + +
+ Signature: (s:IObservable<'?7897> * selector:('?7897 -> '?7898)) -> IObservable<'?7898>
+ Type parameters: '?7897, '?7898 + Attributes:
+[<CustomOperation("select", AllowIntoPattern = true)>]
+
+
+
+ + + + + +
+ + x.Skip(s, count) + +
+ Signature: (s:IObservable<'?7908> * count:int) -> IObservable<'?7908>
+ Type parameters: '?7908 + Attributes:
+[<CustomOperation("skip", MaintainsVariableSpace = true, AllowIntoPattern = true)>]
+
+
+
+ + + + + +
+ + x.SkipWhile(s, predicate) + +
+ Signature: (s:IObservable<'?7906> * predicate:('?7906 -> bool)) -> IObservable<'?7906>
+ Type parameters: '?7906 + Attributes:
+[<CustomOperation("skipWhile", MaintainsVariableSpace = true, AllowIntoPattern = true)>]
+
+
+
+ + + + + +
+ + x.SumBy(s, valueSelector) + +
+ Signature: (s:IObservable<'?7944> * valueSelector:('?7944 -> ^?7945)) -> IObservable<^?7946>
+ Type parameters: '?7944, ^?7945, ^?7946 + Attributes:
+[<CustomOperation("sumBy")>]
+
+
+
+ + + + + +
+ + x.Take(s, count) + +
+ Signature: (s:IObservable<'?7904> * count:int) -> IObservable<'?7904>
+ Type parameters: '?7904 + Attributes:
+[<CustomOperation("take", MaintainsVariableSpace = true, AllowIntoPattern = true)>]
+
+
+
+ + + + + +
+ + x.TakeWhile(s, predicate) + +
+ Signature: (s:IObservable<'?7902> * predicate:('?7902 -> bool)) -> IObservable<'?7902>
+ Type parameters: '?7902 + Attributes:
+[<CustomOperation("takeWhile", MaintainsVariableSpace = true, AllowIntoPattern = true)>]
+
+
+
+ + + + + +
+ + x.Where(s, predicate) + +
+ Signature: (s:IObservable<'?7900> * predicate:('?7900 -> bool)) -> IObservable<'?7900>
+ Type parameters: '?7900 + Attributes:
+[<CustomOperation("where", MaintainsVariableSpace = true, AllowIntoPattern = true)>]
+
+
+
+ + + + + +
+ + x.Yield(value) + +
+ Signature: value:'?7912 -> IObservable<'?7912>
+ Type parameters: '?7912
+
+ + + + + +
+ + x.Zero() + +
+ Signature: unit -> IObservable<'?7910>
+ Type parameters: '?7910
+
+ + + + + +
+ + x.Zip(s1, s2, resultSelector) + +
+ Signature: (s1:IObservable<'?7967> * s2:IObservable<'?7968> * resultSelector:('?7967 -> '?7968 -> '?7969)) -> IObservable<'?7969>
+ Type parameters: '?7967, '?7968, '?7969 + Attributes:
+[<CustomOperation("zip", IsLikeZip = true)>]
+
+
+
+ + + + + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-buildersmodule.html b/reference/fsharp-control-reactive-buildersmodule.html new file mode 100644 index 0000000..983cac5 --- /dev/null +++ b/reference/fsharp-control-reactive-buildersmodule.html @@ -0,0 +1,150 @@ + + + + + Builders - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

Builders

+

+ Namespace: FSharp.Control.Reactive
+ + Attributes:
+[<CompilationRepresentation(4)>]
+ +
+

+
+
+ + +

Nested types and modules

+
+ + + + + + + + + + + + + + +
TypeDescription
+ ObservableBuilder + +

An Observable computation builder.

+ + +
+ RxQueryBuilder + +

A reactive query builder. +See http://mnajder.blogspot.com/2011/09/when-reactive-framework-meets-f-30.html

+ + +
+ +
+ +

Functions and values

+ + + + + + + + + + + + + + +
Function or valueDescription
+ + observe + +
+ Signature: ObservableBuilder
+
+
+ + + + + +
+ + rxquery + +
+ Signature: RxQueryBuilder
+
+
+ + + + + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-disposable.html b/reference/fsharp-control-reactive-disposable.html new file mode 100644 index 0000000..c987395 --- /dev/null +++ b/reference/fsharp-control-reactive-disposable.html @@ -0,0 +1,144 @@ + + + + + Disposable - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

Disposable

+

+ + Namespace: FSharp.Control.Reactive
+

+
+
+

Constructors

+ + + + + + + + + + +
ConstructorDescription
+ + new() + +
+ Signature: unit -> Disposable
+
+
+ + + + + +

CompiledName: .ctor

+
+

Static members

+ + + + + + + + + + + + + + +
Static memberDescription
+ + Disposable.Composite + +
+ Signature: CompositeDisposable
+
+
+ + + + +

Creates a new composite disposable with no disposables contained initially.

+ + +

CompiledName: get_Composite

+
+ + Disposable.Serial + +
+ Signature: SerialDisposable
+
+
+ + + + +

Represents a disposable resource whose underlying disposable resource can be replaced by another disposable resource, +causing automatic disposal of the previous underlying disposable resource.

+ + +

CompiledName: get_Serial

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-disposablemodule.html b/reference/fsharp-control-reactive-disposablemodule.html new file mode 100644 index 0000000..8386943 --- /dev/null +++ b/reference/fsharp-control-reactive-disposablemodule.html @@ -0,0 +1,241 @@ + + + + + Disposable - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

Disposable

+

+ Namespace: FSharp.Control.Reactive
+ + Attributes:
+[<CompilationRepresentation(4)>]
+ +
+

+
+

Operators to work on disposable types

+ +
+ + + +

Functions and values

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Function or valueDescription
+ + compose disposable2 disposable1 + +
+ Signature: disposable2:'?8988 -> disposable1:'?8989 -> IDisposable
+ Type parameters: '?8988, '?8989
+
+ + + + +

Compose two disposables together so they are both disposed when disposed is called on the 'composite' disposable. +The expected usage is disposable1 |> compose disposable2,

+ + +
+ + create(f) + +
+ Signature: f:(unit -> unit) -> IDisposable
+
+
+ + + + +

Creates an disposable object that invokes the specified function when disposed.

+ + +
+ + dispose(x) + +
+ Signature: x:IDisposable -> unit
+
+
+ + + + +

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

+ + +
+ + disposeWith d x + +
+ Signature: d:CompositeDisposable -> x:IDisposable -> unit
+
+
+ + + + +

Registers a disposable object into a composite disposable object +ensuring it's disposition when composite disposable object is disposed.

+ + +
+ + ignoring f d + +
+ Signature: f:(unit -> '?8982) -> d:IDisposable -> unit
+ Type parameters: '?8982
+
+ + + + +

Execute and action without the resource while the disposable is still 'active'. +The used resource will be disposed afterwards.

+ + +
+ + setIndirectly disposableFactory d + +
+ Signature: disposableFactory:(unit -> 'b) -> d:SerialDisposable -> unit
+ Type parameters: 'b
+
+ + + + +

Uses the double-indirection pattern to assign the disposable returned by the specified disposableFactory +to the 'Disposable' property of the specified serial disposable.

+ + +
+ + setInnerDisposalOf d x + +
+ Signature: d:SerialDisposable -> x:IDisposable -> unit
+
+
+ + + + + +
+ + using f d + +
+ Signature: f:('?8984 -> '?8985) -> d:'?8984 -> '?8985
+ Type parameters: '?8984, '?8985
+
+ + + + +

Execute and action with the resource while the disposable is still 'active'. +The used resource will be disposed afterwards.

+ + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-disposables.html b/reference/fsharp-control-reactive-disposables.html new file mode 100644 index 0000000..d620a8e --- /dev/null +++ b/reference/fsharp-control-reactive-disposables.html @@ -0,0 +1,98 @@ + + + + + Disposables - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

Disposables

+

+ Namespace: FSharp.Control.Reactive
+

+
+
+ + + +

Functions and values

+ + + + + + + + + + +
Function or valueDescription
+ + compose(disposables) + +
+ Signature: disposables:'a -> IDisposable
+ Type parameters: 'a
+
+ + + + +

Returns an IDisposable that disposes all the underlying disposables

+ + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-observablemodule.html b/reference/fsharp-control-reactive-observablemodule.html new file mode 100644 index 0000000..9ace4bd --- /dev/null +++ b/reference/fsharp-control-reactive-observablemodule.html @@ -0,0 +1,7360 @@ + + + + + Observable - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

Observable

+

+ Namespace: FSharp.Control.Reactive
+ + Attributes:
+[<CompilationRepresentation(4)>]
+ +
+

+
+

The Reactive module provides operators for working with IObservable<_> in F#.

+ +
+ + + +

Functions and values

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Function or valueDescription
+ + aggregate accumulator source + +
+ Signature: accumulator:('?8063 -> '?8063 -> '?8063) -> source:IObservable<'?8063> -> IObservable<'?8063>
+ Type parameters: '?8063
+
+ + + + +

Applies an accumulator function over an observable sequence, returning the +result of the aggregation as a single element in the result sequence

+ + +
+ + all pred source + +
+ Signature: pred:('?8065 -> bool) -> source:IObservable<'?8065> -> IObservable<bool>
+ Type parameters: '?8065
+
+ + + + +

Determines whether all elements of an observable satisfy a predicate

+ + +
+ + amb second first + +
+ Signature: second:IObservable<'?8067> -> first:IObservable<'?8067> -> IObservable<'?8067>
+ Type parameters: '?8067
+
+ + + + +

Returns the observable sequence that reacts first

+ + +
+ + ambArray(source) + +
+ Signature: source:IObservable<'T> [] -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Propagates the observable sequence that reacts first

+ + +
+ + ambSeq(source) + +
+ Signature: source:seq<IObservable<'T>> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Propagates the observable sequence that reacts first

+ + +
+ + any(source) + +
+ Signature: source:IObservable<'Source> -> IObservable<bool>
+ Type parameters: 'Source
+
+ + + + +

Determines whether an observable sequence contains any elements

+ + +
+ + apply f m + +
+ Signature: f:IObservable<('?8080 -> '?8081)> -> m:IObservable<'?8080> -> IObservable<'?8081>
+ Type parameters: '?8080, '?8081
+
+ + + + +

Lifts the values of f and m and applies f to m, returning an IObservable of the result.

+ + +
+ + asObservable(source) + +
+ Signature: source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Hides the identy of an observable sequence

+ + +
+ + bind f m + +
+ Signature: f:('T -> IObservable<'TNext>) -> m:IObservable<'T> -> IObservable<'TNext>
+ Type parameters: 'T, 'TNext
+
+ + + + +

Binds an observable to generate a subsequent observable.

+ + +
+ + both second first + +
+ Signature: second:IObservable<'?8083> -> first:IObservable<'?8084> -> Pattern<'?8084,'?8083>
+ Type parameters: '?8083, '?8084
+
+ + + + +

Matches when both observable sequences have an available value

+ + +
+ + buffer bufferClosingSelector source + +
+ Signature: bufferClosingSelector:IObservable<'BufferClosing> -> source:IObservable<'?8087> -> IObservable<IList<'?8087>>
+ Type parameters: 'BufferClosing, '?8087
+
+ + + + + +
+ + bufferBounded boundaries source + +
+ Signature: boundaries:IObservable<'BufferClosing> -> source:IObservable<'T> -> IObservable<IList<'T>>
+ Type parameters: 'BufferClosing, 'T
+
+ + + + +

Projects each element of an observable sequence into +consequtive non-overlapping buffers based on a sequence of boundary markers

+ + +
+ + bufferCount count source + +
+ Signature: count:int -> source:IObservable<'?8092> -> IObservable<IList<'?8092>>
+ Type parameters: '?8092
+
+ + + + +

Projects each element of an observable sequence into +consequtive non-overlapping buffers produced based on count information

+ + +
+ + bufferCountSkip count skip source + +
+ Signature: count:int -> skip:int -> source:IObservable<'?8094> -> IObservable<IList<'?8094>>
+ Type parameters: '?8094
+
+ + + + +

Projects each element of an observable sequence into zero or more buffers +which are produced based on element count information

+ + +
+ + bufferFork(...) + +
+ Signature: bufferOpenings:IObservable<'BufferOpening> -> bufferClosingSelector:('BufferOpening -> IObservable<'T>) -> source:IObservable<'?8106> -> IObservable<IList<'?8106>>
+ Type parameters: 'BufferOpening, 'T, '?8106
+
+ + + + +

Projects each element of an observable sequence into zero of more buffers. +bufferOpenings - observable sequence whose elements denote the opening of each produced buffer +bufferClosing - observable sequence whose elements denote the closing of each produced buffer

+ + +
+ + bufferSpan timeSpan source + +
+ Signature: timeSpan:TimeSpan -> source:IObservable<'?8096> -> IObservable<IList<'?8096>>
+ Type parameters: '?8096
+
+ + + + +

Projects each element of an observable sequence into +consequtive non-overlapping buffers produced based on timing information

+ + +
+ + bufferSpanCount timeSpan count source + +
+ Signature: timeSpan:TimeSpan -> count:int -> source:IObservable<'?8100> -> IObservable<IList<'?8100>>
+ Type parameters: '?8100
+
+ + + + +

Projects each element of an observable sequence into a buffer that goes +sent out when either it's full or a specific amount of time has elapsed +Analogy - A boat that departs when it's full or at its scheduled time to leave

+ + +
+ + bufferSpanCountOn(...) + +
+ Signature: scheduler:IScheduler -> timeSpan:TimeSpan -> count:int -> source:IObservable<'?8102> -> IObservable<IList<'?8102>>
+ Type parameters: '?8102
+
+ + + + +

Projects each element of an observable sequence into a buffer that's sent out +when either it's full or a given amount of time has elapsed, using the specified scheduler to run timers. +Analogy - A ferry leaves the dock when all the seats are taken, or at the scheduled time or departure, +whichever event occurs first.

+ + +
+ + bufferSpanOn scheduler timeSpan source + +
+ Signature: scheduler:IScheduler -> timeSpan:TimeSpan -> source:IObservable<'?8098> -> IObservable<IList<'?8098>>
+ Type parameters: '?8098
+
+ + + + +

Projects each element of an observable sequence into consecutive non-overlapping buffers +which are produced based on timing information, using the specified scheduler to run timers.

+ + +
+ + bufferSpanShift(...) + +
+ Signature: timeSpan:TimeSpan -> timeShift:TimeSpan -> source:IObservable<'?8108> -> IObservable<IList<'?8108>>
+ Type parameters: '?8108
+
+ + + + +

Projects each element of an observable sequence into +zero or more buffers produced based on timing information

+ + +
+ + bufferSpanShiftOn(...) + +
+ Signature: scheduler:IScheduler -> timeSpan:TimeSpan -> timeShift:TimeSpan -> source:IObservable<'?8110> -> IObservable<IList<'?8110>>
+ Type parameters: '?8110
+
+ + + + +

Projects each element of an observable sequence into +zero or more buffers which are produced based on timing information, +using the specified scheduler to run timers.

+ + +
+ + case selector sources + +
+ Signature: selector:(unit -> '?8114) -> sources:IDictionary<'?8114,IObservable<'?8115>> -> IObservable<'?8115>
+ Type parameters: '?8114, '?8115
+
+ + + + +

Uses selector to determine which source in sources to return, +choosing an empty sequence if no match is found

+ + +
+ + caseDefault(...) + +
+ Signature: selector:(unit -> 'Value) -> defaulSource:IObservable<'Result> -> sources:IDictionary<'Value,IObservable<'Result>> -> IObservable<'Result>
+ Type parameters: 'Value, 'Result
+
+ + + + +

Uses selector to determine which source in sources to return, +choosing defaulSource if no match is found

+ + +
+ + caseOn scheduler selector sources + +
+ Signature: scheduler:IScheduler -> selector:Func<'?8120> -> sources:IDictionary<'?8120,IObservable<'?8121>> -> IObservable<'?8121>
+ Type parameters: '?8120, '?8121
+
+ + + + +

Uses selector to determine which source in sources to return, +choosing an empty sequence on the specified scheduler if no match is found.

+ + +
+ + cast(source) + +
+ Signature: source:IObservable<obj> -> IObservable<'CastType>
+ Type parameters: 'CastType
+
+ + + + +

Converts the elements of the sequence to the specified type

+ + +
+ + catch second first + +
+ Signature: second:IObservable<'T> -> first:IObservable<'T> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Continues an observable sequence that is terminated +by an exception with the next observable sequence.

+ + +
+ + catchArray(sources) + +
+ Signature: sources:IObservable<'T> [] -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Continues an observable sequence that is terminated by an exception with the next observable sequence.

+ + +
+ + catchOption(source) + +
+ Signature: source:IObservable<'?8125> -> IObservable<'?8125 option>
+ Type parameters: '?8125
+
+ + + + +

Continues an observable sequence that is terminated by an exception +with an optional as result type.

+ + +
+ + catchResult handler source + +
+ Signature: handler:('?8127 -> IObservable<'?8128>) -> source:IObservable<'?8129> -> IObservable<Result<'?8129,'?8128>>
+ Type parameters: '?8127, '?8128, '?8129
+
+ + + + +

Continues an observable sequence that is terminated by an exception of +the specified type with the observable sequence produced by the handler, +wrapped in a 'Result' type.

+ + +
+ + catchSeq(sources) + +
+ Signature: sources:seq<IObservable<'T>> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Continues an observable sequence that is terminated by an exception with the next observable sequence.

+ + +
+ + catchWith handler source + +
+ Signature: handler:('?8131 -> IObservable<'?8132>) -> source:IObservable<'?8132> -> IObservable<'?8132>
+ Type parameters: '?8131, '?8132
+
+ + + + +

Continues an observable sequence that is terminated by an exception of +the specified type with the observable sequence produced by the handler.

+ + +
+ + choose f source + +
+ Signature: f:('?8850 -> '?8851 option) -> source:IObservable<'?8850> -> IObservable<'?8851>
+ Type parameters: '?8850, '?8851
+
+ + + + +

Description +Applies the given function to each value of the given source Observable +comprimised of the results x for each element for which the function returns Some(x).

+

Parameters +- f - Accepts a chooser function to only pick a subset of emits. +- source - The source observable to take a subset from.

+ + +
+ + chunkify(source) + +
+ Signature: source:IObservable<'Source> -> seq<IList<'Source>>
+ Type parameters: 'Source
+
+ + + + +

Produces an enumerable sequence of consequtive (possibly empty) chunks of the source observable

+ + +
+ + collect map source + +
+ Signature: map:('Source -> IObservable<'Result>) -> source:seq<'Source> -> IObservable<'Result>
+ Type parameters: 'Source, 'Result
+
+ + + + +

Concatenates the observable sequences obtained by applying the map for each element in the given enumerable

+ + +
+ + collectMerge newCollector merge source + +
+ Signature: newCollector:(unit -> '?8143) -> merge:('?8143 -> '?8144 -> '?8143) -> source:IObservable<'?8144> -> IEnumerable<'?8143>
+ Type parameters: '?8143, '?8144
+
+ + + + +

Produces an enumerable sequence that returns elements collected/aggregated from the source sequence between consecutive iterations. +merge - Merges a sequence element with the current collector +newCollector - Factory to create a new collector object.

+ + +
+ + collectMergeInit(...) + +
+ Signature: getInitialCollector:(unit -> '?8146) -> merge:('?8146 -> '?8147 -> '?8146) -> getNewCollector:('?8146 -> '?8146) -> source:IObservable<'?8147> -> IEnumerable<'?8146>
+ Type parameters: '?8146, '?8147
+
+ + + + +

Produces an enumerable sequence that returns elements collected/aggregated from the source sequence between consecutive iterations. +merge - Merges a sequence element with the current collector +getNewCollector - Factory to replace the current collector by a new collector +getInitialCollector - Factory to create the initial collector object.

+ + +
+ + combineLatest source1 source2 + +
+ Signature: source1:IObservable<'T1> -> source2:IObservable<'T2> -> IObservable<'T1 * 'T2>
+ Type parameters: 'T1, 'T2
+
+ + + + +

Merges the specified observable sequences into one observable sequence +whenever either of the observable sequences produces an element.

+ + +
+ + combineLatestArray(source) + +
+ Signature: source:IObservable<'T> [] -> IObservable<IList<'T>>
+ Type parameters: 'T
+
+ + + + +

Merges the specified observable sequences into one observable sequence by applying the map +whenever any of the observable sequences produces an element.

+ + +
+ + combineLatestSeq(source) + +
+ Signature: source:seq<IObservable<'T>> -> IObservable<IList<'T>>
+ Type parameters: 'T
+
+ + + + +

Merges the specified observable sequences into one observable sequence by +emmiting a list with the latest source elements of whenever any of the +observable sequences produces an element.

+ + +
+ + combineLatestSeqMap map source + +
+ Signature: map:(IList<'T> -> 'Result) -> source:seq<IObservable<'T>> -> IObservable<'Result>
+ Type parameters: 'T, 'Result
+
+ + + + +

Merges the specified observable sequences into one observable sequence by applying the map +whenever any of the observable sequences produces an element.

+ + +
+ + concat second first + +
+ Signature: second:IObservable<'T> -> first:IObservable<'T> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Concatenates the second observable sequence to the first observable sequence +upn the successful termination of the first

+ + +
+ + concatArray(sources) + +
+ Signature: sources:IObservable<'T> [] -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Concatenates all of the specified observable sequences as long as +the previous observable sequence terminated successfully

+ + +
+ + concatInner(sources) + +
+ Signature: sources:IObservable<IObservable<'T>> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Concatenates all of the inner observable sequences as long as +the previous observable sequence terminated successfully

+ + +
+ + concatSeq(sources) + +
+ Signature: sources:seq<IObservable<'T>> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Concatenates all observable sequences within the sequence as long as +the previous observable sequence terminated successfully

+ + +
+ + concatTasks(sources) + +
+ Signature: sources:IObservable<Task<'T>> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Concatenates all task results as long as +the previous taskterminated successfully

+ + +
+ + connect(source) + +
+ Signature: source:IConnectableObservable<'?8169> -> IDisposable
+ Type parameters: '?8169
+
+ + + + +

Connects the observable wrapper to its source. All subscribed +observers will recieve values from the underlying observable +sequence as long as the connection is established.
+( publish an Observable to get a ConnectableObservable )

+ + +
+ + consume consumer source + +
+ Signature: consumer:IObservable<'?8879> -> source:IObservable<'?8880> -> IObservable<'?8879>
+ Type parameters: '?8879, '?8880
+
+ + + + +

Generates a sequence using the producer/consumer pattern. +The purpose of the source sequence is simply to notify the consumer when out-of-band data becomes available. +The data in the source sequence provides additional information to the function, +but it does not have to be the actual data being produced.

+

The function is not necessarily called for every value in the source sequence. +It is only called if the previous consumer's observable has completed; otherwise, the current notification is ignored. This ensures +that only one consumer is active at any given time, but it also means that the function is not guaranteed +to receive every value in the source sequence; therefore, the function must read +data from out-of-band storage instead; e.g., from a shared stream or queue.

+

The function may also be called when data is not available. For example, if the current consuming +observable completes and additional notifications from the source were received, then the function +is called again to check whether new data was missed. This avoids a race condition between the source sequence +and the consuming observable's completion notification. If no data is available when function is called, then +an empty sequence should be returned and the function will not be called again until another notification is observed +from the source.

+

Producers and the single active consumer are intended to access shared objects concurrently, yet it remains their responsibility +to ensure thread-safety. The consume operator cannot do so without breaking concurrency. For example, +a producer/consumer implementation that uses an in-memory queue must manually ensure that reads and writes to the queue are thread-safe.

+

Multiple producers are supported. Simply create an observable sequence for each producer that notifies when data is generated, +merge them together using the merge operator, and use the merged observable as the source argument in the consume operator. +Multiple consumers are supported by calling consume once and then calling subscribe multiple times on the cold observable that is returned.
+Just be sure that the source sequence is hot so that each subscription will consume based on the same producers' notifications.

+

Parameters

+
    +
  • f - A function that generates an observable sequence from out-of-band data.
  • +
  • source - Indicates when data becomes available from one or more producers.
  • +
+

Returns

+

An observable sequence that is the concatenation of all subscriptions to the consumer observable.

+ + +
+ + consumeMap f source + +
+ Signature: f:('a -> IObservable<'b>) -> source:IObservable<'a> -> IObservable<'b>
+ Type parameters: 'a, 'b
+
+ + + + +

Generates a sequence using the producer/consumer pattern. +The purpose of the source sequence is simply to notify the consumer when out-of-band data becomes available. +The data in the source sequence provides additional information to the function, +but it does not have to be the actual data being produced.

+

The function is not necessarily called for every value in the source sequence. +It is only called if the previous consumer's observable has completed; otherwise, the current notification is ignored. This ensures +that only one consumer is active at any given time, but it also means that the function is not guaranteed +to receive every value in the source sequence; therefore, the function must read +data from out-of-band storage instead; e.g., from a shared stream or queue.

+

The function may also be called when data is not available. For example, if the current consuming +observable completes and additional notifications from the source were received, then the function +is called again to check whether new data was missed. This avoids a race condition between the source sequence +and the consuming observable's completion notification. If no data is available when function is called, then +an empty sequence should be returned and the function will not be called again until another notification is observed +from the source.

+

Producers and the single active consumer are intended to access shared objects concurrently, yet it remains their responsibility +to ensure thread-safety. The consume operator cannot do so without breaking concurrency. For example, +a producer/consumer implementation that uses an in-memory queue must manually ensure that reads and writes to the queue are thread-safe.

+

Multiple producers are supported. Simply create an observable sequence for each producer that notifies when data is generated, +merge them together using the merge operator, and use the merged observable as the source argument in the consume operator. +Multiple consumers are supported by calling consume once and then calling subscribe multiple times on the cold observable that is returned.
+Just be sure that the source sequence is hot so that each subscription will consume based on the same producers' notifications.

+

Parameters

+
    +
  • f - A function that generates an observable sequence from out-of-band data.
  • +
  • source - Indicates when data becomes available from one or more producers.
  • +
+

Returns

+

An observable sequence that is the concatenation of all subscriptions to the consumer observable.

+ + +
+ + consumeNext f source + +
+ Signature: f:('?8885 -> '?8886 option) -> source:IObservable<'?8885> -> IObservable<'?8886>
+ Type parameters: '?8885, '?8886
+
+ + + + +

Generates a sequence using the producer/consumer pattern. +The purpose of the source sequence is simply to notify the consumer when out-of-band data becomes available. +The data in the source sequence provides additional information to the function, +but it does not have to be the actual data being produced.

+

The function is not necessarily called for every value in the source sequence. +It is only called if the previous consumer's observable has completed; otherwise, the current notification is ignored. This ensures +that only one consumer is active at any given time, but it also means that the function is not guaranteed +to receive every value in the source sequence; therefore, the function must read +data from out-of-band storage instead; e.g., from a shared stream or queue.

+

The function may also be called when data is not available. For example, if the current consuming +observable completes and additional notifications from the source were received, then the function +is called again to check whether new data was missed. This avoids a race condition between the source sequence +and the consuming observable's completion notification. If no data is available when function is called, then +an empty sequence should be returned and the function will not be called again until another notification is observed +from the source.

+

Producers and the single active consumer are intended to access shared objects concurrently, yet it remains their responsibility +to ensure thread-safety. The consume operator cannot do so without breaking concurrency. For example, +a producer/consumer implementation that uses an in-memory queue must manually ensure that reads and writes to the queue are thread-safe.

+

Multiple producers are supported. Simply create an observable sequence for each producer that notifies when data is generated, +merge them together using the merge operator, and use the merged observable as the source argument in the consume operator. +Multiple consumers are supported by calling consume once and then calling subscribe multiple times on the cold observable that is returned.
+Just be sure that the source sequence is hot so that each subscription will consume based on the same producers' notifications.

+

Parameters

+
    +
  • f - A function that is called iteratively to generate values from out-of-band data.
  • +
  • source - Indicates when data becomes available from one or more producers.
  • +
+

Returns

+

An observable sequence that is the concatenation of the values returned by the consumeNext function.

+ + +
+ + consumeNextOn sch f source + +
+ Signature: sch:IScheduler -> f:('?8882 -> '?8883 option) -> source:IObservable<'?8882> -> IObservable<'?8883>
+ Type parameters: '?8882, '?8883
+
+ + + + +

Generates a sequence using the producer/consumer pattern. +The purpose of the source sequence is simply to notify the consumer when out-of-band data becomes available. +The data in the source sequence provides additional information to the function, +but it does not have to be the actual data being produced.

+

The function is not necessarily called for every value in the source sequence. +It is only called if the previous consumer's observable has completed; otherwise, the current notification is ignored. This ensures +that only one consumer is active at any given time, but it also means that the function is not guaranteed +to receive every value in the source sequence; therefore, the function must read +data from out-of-band storage instead; e.g., from a shared stream or queue.

+

The function may also be called when data is not available. For example, if the current consuming +observable completes and additional notifications from the source were received, then the function +is called again to check whether new data was missed. This avoids a race condition between the source sequence +and the consuming observable's completion notification. If no data is available when function is called, then +an empty sequence should be returned and the function will not be called again until another notification is observed +from the source.

+

Producers and the single active consumer are intended to access shared objects concurrently, yet it remains their responsibility +to ensure thread-safety. The consume operator cannot do so without breaking concurrency. For example, +a producer/consumer implementation that uses an in-memory queue must manually ensure that reads and writes to the queue are thread-safe.

+

Multiple producers are supported. Simply create an observable sequence for each producer that notifies when data is generated, +merge them together using the merge operator, and use the merged observable as the source argument in the consume operator. +Multiple consumers are supported by calling consume once and then calling subscribe multiple times on the cold observable that is returned.
+Just be sure that the source sequence is hot so that each subscription will consume based on the same producers' notifications.

+

Parameters

+
    +
  • f - A function that is called iteratively to generate values from out-of-band data.
  • +
  • source - Indicates when data becomes available from one or more producers.
  • +
+

Returns

+

An observable sequence that is the concatenation of the values returned by the consumeNext function.

+ + +
+ + contains value source + +
+ Signature: value:'?8171 -> source:IObservable<'?8171> -> IObservable<bool>
+ Type parameters: '?8171
+
+ + + + +

Determines whether an observable sequence contains a specified +element by using the default equality comparer.

+ + +
+ + containsCompare comparer value source + +
+ Signature: comparer:IEqualityComparer<'?8173> -> value:'?8173 -> source:IObservable<'?8173> -> IObservable<bool>
+ Type parameters: '?8173
+
+ + + + +

Determines whether an observable sequence contains a +specified element by using a specified EqualityComparer

+ + +
+ + count(source) + +
+ Signature: source:IObservable<'?8175> -> IObservable<int>
+ Type parameters: '?8175
+
+ + + + +

Counts the elements

+ + +
+ + countSatisfy predicate source + +
+ Signature: predicate:('?8177 -> bool) -> source:IObservable<'?8177> -> IObservable<int>
+ Type parameters: '?8177
+
+ + + + +

Returns an observable sequence containing an int that represents how many elements +in the specified observable sequence satisfy a condition.

+ + +
+ + defaultIfEmpty(source) + +
+ Signature: source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns the elements of the specified sequence or the type parameter's default value +in a singleton sequence if the sequence is empty.

+ + +
+ + defaultIfEmptyIs defaultValue source + +
+ Signature: defaultValue:'Source -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns the elements of the specified sequence or the specified value in a singleton sequence if the sequence is empty.

+ + +
+ + defer(observableFactory) + +
+ Signature: observableFactory:(unit -> IObservable<'Result>) -> IObservable<'Result>
+ Type parameters: 'Result
+
+ + + + +

Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes.

+ + +
+ + delay dueTime source + +
+ Signature: dueTime:TimeSpan -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Time shifts the observable sequence by the specified relative time duration. +The relative time intervals between the values are preserved.

+ + +
+ + delayMap delayDurationSelector source + +
+ Signature: delayDurationSelector:('Source -> IObservable<'TDelay>) -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source, 'TDelay
+
+ + + + +

Time shifts the observable sequence based on a delay selector function for each element.

+ + +
+ + delayMapFilter(...) + +
+ Signature: delayDurationSelector:('Source -> IObservable<'TDelay>) -> subscriptionDelay:IObservable<'TDelay> -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source, 'TDelay
+
+ + + + +

Time shifts the observable sequence based on a subscription delay and a delay selector function for each element.

+ + +
+ + delayOn scheduler dueTime source + +
+ Signature: scheduler:IScheduler -> dueTime:TimeSpan -> source:IObservable<'?8187> -> IObservable<'?8187>
+ Type parameters: '?8187
+
+ + + + +

Time shifts the observable sequence by the specified relative time duration, +using the specified scheduler to run timers. +The relative time intervals between the values are preserved.

+ + +
+ + delaySubscription dueTime source + +
+ Signature: dueTime:TimeSpan -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Time shifts the observable sequence by delaying the subscription with the specified relative time duration.

+ + +
+ + delaySubscriptionOn(...) + +
+ Signature: scheduler:IScheduler -> dueTime:TimeSpan -> source:IObservable<'?8201> -> IObservable<'?8201>
+ Type parameters: '?8201
+
+ + + + +

Time shifts the observable sequence by delaying the subscription with the specified relative time duration, +using the specified scheduler to run timers.

+ + +
+ + delaySubscriptionUntil dueTime source + +
+ Signature: dueTime:DateTimeOffset -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Time shifts the observable sequence by delaying the subscription to the specified absolute time.

+ + +
+ + delaySubscriptionUntilOn(...) + +
+ Signature: scheduler:IScheduler -> dueTime:DateTimeOffset -> source:IObservable<'?8205> -> IObservable<'?8205>
+ Type parameters: '?8205
+
+ + + + +

Time shifts the observable sequence by delaying the subscription to the specified absolute time, +using the specified scheduler to run timers.

+ + +
+ + delayUntil source dueTime + +
+ Signature: source:IObservable<'Source> -> dueTime:DateTimeOffset -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Time shifts the observable sequence to start propagating notifications at the specified absolute time. +The relative time intervals between the values are preserved.

+ + +
+ + delayUntilOn scheduler dueTime source + +
+ Signature: scheduler:IScheduler -> dueTime:DateTimeOffset -> source:IObservable<'?8191> -> IObservable<'?8191>
+ Type parameters: '?8191
+
+ + + + +

Time shifts the observable sequence to start propagating notifications at the specified absolute time, +using the specified scheduler to run timers. +The relative time intervals between the values are preserved.

+ + +
+ + dematerialize(source) + +
+ Signature: source:IObservable<Notification<'?8207>> -> IObservable<'?8207>
+ Type parameters: '?8207
+
+ + + + +

Dematerializes the explicit notification values of an observable sequence as implicit notifications.

+ + +
+ + distinct(source) + +
+ Signature: source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns an observable sequence that only contains distinct elements

+ + +
+ + distinctCompare comparer source + +
+ Signature: comparer:IEqualityComparer<'Source> -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns an observable sequence that contains only distinct elements according to the comparer.

+ + +
+ + distinctKey keySelector source + +
+ Signature: keySelector:('Source -> 'Key) -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source, 'Key
+
+ + + + +

Returns an observable sequence that contains only distinct elements according to the keySelector.

+ + +
+ + distinctKeyCompare(...) + +
+ Signature: keySelector:('Source -> 'Key) -> comparer:IEqualityComparer<'Key> -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source, 'Key
+
+ + + + +

Returns an observable sequence that contains only distinct elements according to the keySelector and the comparer.

+ + +
+ + distinctUntilChanged(source) + +
+ Signature: source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns an observable sequence that only contains distinct contiguous elements

+ + +
+ + distinctUntilChangedCompare(...) + +
+ Signature: comparer:IEqualityComparer<'Source> -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns an observable sequence that contains only distinct contiguous elements according to the comparer.

+ + +
+ + distinctUntilChangedKey(...) + +
+ Signature: keySelector:('Source -> 'Key) -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source, 'Key
+
+ + + + +

Returns an observable sequence that contains only distinct contiguous elements according to the keySelector.

+ + +
+ + distinctUntilChangedKeyCompare(...) + +
+ Signature: keySelector:('Source -> 'Key) -> comparer:IEqualityComparer<'Key> -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source, 'Key
+
+ + + + +

Returns an observable sequence that contains only distinct contiguous elements according to the keySelector and the comparer.

+ + +
+ + elementAt index source + +
+ Signature: index:int -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns the element at a specified index in a sequence.

+ + +
+ + elementAtOrDefault index source + +
+ Signature: index:int -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns the element at a specified index in a sequence or a default value if the index is out of range

+ + +
+ + empty + +
+ Signature: IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Returns an empty observable

+ + +
+ + emptyCompleted(scheduler) + +
+ Signature: scheduler:IScheduler -> IObservable<'?8239>
+ Type parameters: '?8239
+
+ + + + +

Returns an empty sequence, using the specified scheduler to send out the single OnCompleted message.

+ + +
+ + emptyCompletedWitness scheduler witness + +
+ Signature: scheduler:IScheduler -> witness:'?8241 -> IObservable<'?8241>
+ Type parameters: '?8241
+
+ + + + +

Returns an empty sequence, using the specified scheduler to send out the single OnCompleted message.

+ + +
+ + emptyWitness(witness) + +
+ Signature: witness:'T -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Returns an empty Observable sequence

+ + +
+ + equals first second + +
+ Signature: first:IObservable<'Source> -> second:IObservable<'Source> -> IObservable<bool>
+ Type parameters: 'Source
+
+ + + + +

Determines whether two sequences are equal by comparing the elements pairwise.

+ + +
+ + equalsComparer comparer first second + +
+ Signature: comparer:IEqualityComparer<'Source> -> first:IObservable<'Source> -> second:IObservable<'Source> -> IObservable<bool>
+ Type parameters: 'Source
+
+ + + + +

Determines whether two sequences are equal by comparing the elements pairwise using a specified equality comparer.

+ + +
+ + equalsSeq first second + +
+ Signature: first:IObservable<'Source> -> second:seq<'Source> -> IObservable<bool>
+ Type parameters: 'Source
+
+ + + + +

Determines whether an observable and enumerable sequence are equal by comparing the elements pairwise.

+ + +
+ + equalsSeqComparer comparer first second + +
+ Signature: comparer:IEqualityComparer<'Source> -> first:IObservable<'Source> -> second:seq<'Source> -> IObservable<bool>
+ Type parameters: 'Source
+
+ + + + +

Determines whether an observable and enumerable sequence are equal by comparing the elements pairwise using a specified equality comparer.

+ + +
+ + error(e) + +
+ Signature: e:exn -> IObservable<'?8251>
+ Type parameters: '?8251
+
+ + + + + +
+ + exhaustMap f source + +
+ Signature: f:('?8856 -> '?8857) -> source:IObservable<'?8856> -> IObservable<'?8858>
+ Type parameters: '?8856, '?8857, '?8858
+
+ + + + +

Returns +Returns an Observable that emits items based on applying a function that you +supply to each item emitted by the source Observable, where that function +returns an (so-called "inner") Observable. When it projects a source value to +an Observable, the output Observable begins emitting the items emitted by +that projected Observable. However, exhaustMap ignores every new projected +Observable if the previous projected Observable has not yet completed. Once +that one completes, it will accept and flatten the next projected Observable +and repeat this process.

+ + +
+ + exists predicate source + +
+ Signature: predicate:('?8253 -> bool) -> source:IObservable<'?8253> -> IObservable<bool>
+ Type parameters: '?8253
+
+ + + + +

Determines whether an observable sequence contains a specified value +which satisfies the given predicate

+ + +
+ + filter predicate source + +
+ Signature: predicate:('T -> bool) -> source:IObservable<'T> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Filters the observable elements of a sequence based on a predicate

+ + +
+ + filteri predicate source + +
+ Signature: predicate:(int -> 'T -> bool) -> source:IObservable<'T> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Filters the observable elements of a sequence based on a predicate by +incorporating the element's index

+ + +
+ + finallyDo finallyAction source + +
+ Signature: finallyAction:(unit -> unit) -> source:IObservable<'?8259> -> IObservable<'?8259>
+ Type parameters: '?8259
+
+ + + + +

Invokes a specified action after the source observable sequence +terminates gracefully or exceptionally

+ + +
+ + first(source) + +
+ Signature: source:IObservable<'T> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Returns the first element of an observable sequence

+ + +
+ + firstIf predicate source + +
+ Signature: predicate:('T -> bool) -> source:IObservable<'T> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Returns the first element of an observable sequence +if it satisfies the predicate

+ + +
+ + flatmap map source + +
+ Signature: map:('S -> IObservable<'R>) -> source:IObservable<'S> -> IObservable<'R>
+ Type parameters: 'S, 'R
+
+ + + + +

Projects each element of an observable sequence to an observable sequence +and merges the resulting observable sequences into one observable sequenc

+ + +
+ + flatmapAsync asyncOperation source + +
+ Signature: asyncOperation:('Source -> Async<'?8283>) -> source:IObservable<'Source> -> IObservable<'?8283>
+ Type parameters: 'Source, '?8283
+
+ + + + +

Projects each element of an observable sequence to a async workflow and merges all of the async worksflow results into one observable sequence.

+ + +
+ + flatmapOther other source + +
+ Signature: other:IObservable<'Other> -> source:IObservable<'Source> -> IObservable<'Other>
+ Type parameters: 'Other, 'Source
+
+ + + + +

Projects each element of the source observable sequence to the other observable sequence +and merges the resulting observable sequences into one observable sequence.

+ + +
+ + flatmapSeq map source + +
+ Signature: map:('Source -> seq<'Result>) -> source:IObservable<'Source> -> IObservable<'Result>
+ Type parameters: 'Source, 'Result
+
+ + + + +

Projects each element of an observable sequence to an enumerable sequence and concatenates +the resulting enumerable sequences into one observable sequence.

+ + +
+ + flatmapTask map source + +
+ Signature: map:('Source -> Task<'Result>) -> source:IObservable<'Source> -> IObservable<'Result>
+ Type parameters: 'Source, 'Result
+
+ + + + +

Projects each element of an observable sequence to a task and merges all of the task results into one observable sequence.

+ + +
+ + fold accumulator init source + +
+ Signature: accumulator:('?8285 -> '?8286 -> '?8285) -> init:'?8285 -> source:IObservable<'?8286> -> IObservable<'?8285>
+ Type parameters: '?8285, '?8286
+
+ + + + +

Applies an accumulator function over an observable sequence, returning the +result of the fold as a single element in the result sequence +init is the initial accumulator value

+ + +
+ + foldMap accumulator init map source + +
+ Signature: accumulator:('?8288 -> '?8289 -> '?8288) -> init:'?8288 -> map:('?8288 -> '?8290) -> source:IObservable<'?8289> -> IObservable<'?8290>
+ Type parameters: '?8288, '?8289, '?8290
+
+ + + + +

Applies an accumulator function over an observable sequence, returning the +result of the fold as a single element in the result sequence +init is the initial accumulator value, map is performed after the fold

+ + +
+ + fromEvent addHandler removeHandler + +
+ Signature: addHandler:('Delegate -> unit) -> removeHandler:('Delegate -> unit) -> IObservable<unit>
+ Type parameters: 'Delegate
+
+ + + + +

Converts an Action-based .NET event to an observable sequence. Each event invocation is surfaced through an OnNext message in the resulting sequence. +For conversion of events conforming to the standard .NET event pattern, use any of the FromEventPattern overloads instead.

+ + +
+ + fromEventConversion(...) + +
+ Signature: conversion:(('EventArgs -> unit) -> 'Delegate) -> addHandler:('Delegate -> unit) -> removeHandler:('Delegate -> unit) -> IObservable<'EventArgs>
+ Type parameters: 'EventArgs, 'Delegate
+
+ + + + +

Converts a .NET event to an observable sequence, using a conversion function to obtain the event delegate. +Each event invocation is surfaced through an OnNext message in the resulting sequence. +For conversion of events conforming to the standard .NET event pattern, use any of the FromEventPattern functions instead.

+ + +
+ + fromEventConversionOn(...) + +
+ Signature: scheduler:IScheduler -> conversion:(EventHandler<'TEventArgs> -> 'TDelegate) -> addHandler:('TDelegate -> unit) -> removeHandler:('TDelegate -> unit) -> IObservable<EventPattern<'TEventArgs>>
+ Type parameters: 'TEventArgs, 'TDelegate
+
+ + + + +

Converts a .NET event to an observable sequence, using a conversion function to obtain the event delegate, using a specified scheduler to run timers. +Each event invocation is surfaced through an OnNext message in the resulting sequence. +For conversion of events conforming to the standard .NET event pattern, use any of the FromEventPattern functions instead.

+ + +
+ + fromEventGeneric(...) + +
+ Signature: addHandler:(('TEventArgs -> unit) -> unit) -> removeHandler:(('TEventArgs -> unit) -> unit) -> IObservable<'TEventArgs>
+ Type parameters: 'TEventArgs
+
+ + + + +

Converts an generic Action-based .NET event to an observable sequence. Each event invocation is surfaced through an OnNext message in the resulting sequence. +For conversion of events conforming to the standard .NET event pattern, use any of the FromEventPattern overloads instead.

+ + +
+ + fromEventGenericOn(...) + +
+ Signature: scheduler:IScheduler -> addHandler:(('TEventArgs -> unit) -> unit) -> removeHandler:(('TEventArgs -> unit) -> unit) -> IObservable<'?8298>
+ Type parameters: 'TEventArgs, '?8298
+
+ + + + +

Converts an generic Action-based .NET event to an observable sequence. Each event invocation is surfaced through an OnNext message in the resulting sequence. +For conversion of events conforming to the standard .NET event pattern, use any of the FromEventPattern overloads instead.

+ + +
+ + fromEventHandler(...) + +
+ Signature: addHandler:(EventHandler<'EventArgs> -> unit) -> removeHandler:(EventHandler<'EventArgs> -> unit) -> IObservable<'EventArgs>
+ Type parameters: 'EventArgs
+
+ + + + +

Converts a .NET event to an observable sequence, using a supplied event delegate type. +Each event invocation is surfaced through an OnNext message in the resulting sequence.

+ + +
+ + fromEventHandlerOn(...) + +
+ Signature: scheduler:IScheduler -> addHandler:(EventHandler<'EventArgs> -> unit) -> removeHandler:(EventHandler<'EventArgs> -> unit) -> IObservable<EventPattern<'EventArgs>>
+ Type parameters: 'EventArgs
+
+ + + + +

Converts a .NET event to an observable sequence, using a supplied event delegate type on a specified scheduler. +Each event invocation is surfaced through an OnNext message in the resulting sequence.

+ + +
+ + fromEventOn(...) + +
+ Signature: scheduler:IScheduler -> addHandler:(Action -> unit) -> removeHandler:(Action -> unit) -> IObservable<Unit>
+
+
+ + + + +

Converts an Action-based .NET event to an observable sequence. Each event invocation is surfaced through an OnNext message in the resulting sequence. +For conversion of events conforming to the standard .NET event pattern, use any of the FromEventPattern overloads instead.

+ + +
+ + fromEventPattern eventName target + +
+ Signature: eventName:string -> target:obj -> IObservable<EventPattern<obj>>
+
+
+ + + + +

Generates an observable from an IEvent<_> as an EventPattern.

+ + +
+ + generate(...) + +
+ Signature: initialState:'State -> condition:('State -> bool) -> iterator:('State -> 'State) -> resultMap:('State -> 'Result) -> IObservable<'Result>
+ Type parameters: 'State, 'Result
+
+ + + + +

Generates an observable sequence by running a state-driven loop producing the sequence's elements.

+ + +
+ + generateOn(...) + +
+ Signature: scheduler:IScheduler -> initialState:'State -> condition:('State -> bool) -> iterator:('State -> 'State) -> resultMap:('State -> 'TResult) -> IObservable<'TResult>
+ Type parameters: 'State, 'TResult
+
+ + + + +

Generates an observable sequence by running a state-driven loop producing the sequence's elements.

+ + +
+ + generateTimed(...) + +
+ Signature: initialState:'State -> condition:('State -> bool) -> iterate:('State -> 'State) -> resultMap:('State -> 'Result) -> timeSelector:('State -> DateTimeOffset) -> IObservable<'Result>
+ Type parameters: 'State, 'Result
+
+ + + + +

Generates an observable sequence by running a state-driven and temporal loop producing the sequence's elements.

+ + +
+ + generateTimedOn(...) + +
+ Signature: scheduler:IScheduler -> initialState:'State -> condition:('State -> bool) -> iterate:('State -> 'State) -> resultMap:('State -> 'Result) -> timeSelector:('State -> DateTimeOffset) -> IObservable<'Result>
+ Type parameters: 'State, 'Result
+
+ + + + +

Generates an observable sequence by running a state-driven and temporal loop producing the sequence's elements, +using a specified scheduler to run timers and to send out observer messages.

+ + +
+ + generateTimeSpan(...) + +
+ Signature: initialState:'State -> condition:('State -> bool) -> iterate:('State -> 'State) -> resultMap:('State -> 'Result) -> genTime:('State -> TimeSpan) -> IObservable<'Result>
+ Type parameters: 'State, 'Result
+
+ + + + +

Generates an observable sequence by running a state-driven and temporal loop producing the sequence's elements.

+ + +
+ + generateTimeSpanOn(...) + +
+ Signature: scheduler:IScheduler -> initialState:'State -> condition:('State -> bool) -> iterate:('State -> 'State) -> resultMap:('State -> 'Result) -> genTime:('State -> TimeSpan) -> IObservable<'Result>
+ Type parameters: 'State, 'Result
+
+ + + + +

Generates an observable sequence by running a state-driven and temporal loop producing the sequence's elements, +using a specified scheduler to run timers and to send out observer messages.

+ + +
+ + getEnumerator(source) + +
+ Signature: source:IObservable<'?8329> -> IEnumerator<'?8329>
+ Type parameters: '?8329
+
+ + + + +

Returns an enumerator that enumerates all values of the observable sequence.

+ + +
+ + groupBy keySelector source + +
+ Signature: keySelector:('Source -> 'Key) -> source:IObservable<'Source> -> IObservable<IGroupedObservable<'Key,'Source>>
+ Type parameters: 'Source, 'Key
+
+ + + + +

Groups the elements of an observable sequence according to a specified key selector function.

+ + +
+ + groupByCapacityElement(...) + +
+ Signature: keySelector:('Source -> 'Key) -> capacity:int -> elementSelector:('Source -> 'Element) -> source:IObservable<'Source> -> IObservable<IGroupedObservable<'Key,'Element>>
+ Type parameters: 'Source, 'Key, 'Element
+
+ + + + +

Groups the elements of an observable sequence with the specified initial capacity +and selects the resulting elements by using a specified function.

+ + +
+ + groupByCompare(...) + +
+ Signature: keySelector:('?8334 -> '?8335) -> comparer:IEqualityComparer<'?8335> -> source:IObservable<'?8334> -> IObservable<IGroupedObservable<'?8335,'?8334>>
+ Type parameters: '?8334, '?8335
+
+ + + + +

Groups the elements of an observable sequence according to a specified key selector function and comparer.

+ + +
+ + groupByCompareElement(...) + +
+ Signature: keySelector:('Source -> 'Key) -> comparer:IEqualityComparer<'Key> -> elementSelector:('Source -> 'Element) -> source:IObservable<'Source> -> IObservable<IGroupedObservable<'Key,'Element>>
+ Type parameters: 'Source, 'Key, 'Element
+
+ + + + +

Groups the elements of an observable sequence according to a specified key selector function +and comparer and selects the resulting elements by using a specified function.

+ + +
+ + groupByComparerElementUntil(...) + +
+ Signature: keySelector:('Source -> 'Key) -> comparer:IEqualityComparer<'Key> -> elementSelector:('Source -> 'Element) -> durationSelector:(IGroupedObservable<'Key,'Element> -> IObservable<'TDuration>) -> source:IObservable<'Source> -> IObservable<IGroupedObservable<'Key,'Element>>
+ Type parameters: 'Source, 'Key, 'Element, 'TDuration
+
+ + + + +

Groups the elements of an observable sequence according to a specified key selector function and +comparer and selects the resulting elements by using a specified function. +A duration selector function is used to control the lifetime of groups. When a group expires, +it receives an OnCompleted notification. When a new element with the same +key value as a reclaimed group occurs, the group will be reborn with a new lifetime request.

+ + +
+ + groupByComparerUntil(...) + +
+ Signature: keySelector:('Source -> 'Key) -> comparer:IEqualityComparer<'Key> -> durationSelector:(IGroupedObservable<'Key,'Source> -> IObservable<'TDuration>) -> source:IObservable<'Source> -> IObservable<IGroupedObservable<'Key,'Source>>
+ Type parameters: 'Source, 'Key, 'TDuration
+
+ + + + +

Groups the elements of an observable sequence according to a specified key selector function and comparer. +A duration selector function is used to control the lifetime of groups. When a group expires, +it receives an OnCompleted notification. When a new element with the same +key value as a reclaimed group occurs, the group will be reborn with a new lifetime request.

+ + +
+ + groupByElement(...) + +
+ Signature: keySelector:('Source -> 'Key) -> elementSelector:('Source -> 'Element) -> source:IObservable<'Source> -> IObservable<IGroupedObservable<'Key,'Element>>
+ Type parameters: 'Source, 'Key, 'Element
+
+ + + + +

Groups the elements of an observable sequence and selects the resulting elements by using a specified function.

+ + +
+ + groupByElementUntil(...) + +
+ Signature: keySelector:('Source -> 'Key) -> elementSelector:('Source -> 'Element) -> durationSelector:(IGroupedObservable<'Key,'Element> -> IObservable<'TDuration>) -> source:IObservable<'Source> -> IObservable<IGroupedObservable<'Key,'Element>>
+ Type parameters: 'Source, 'Key, 'Element, 'TDuration
+
+ + + + +

Groups the elements of an observable sequence according to a specified key selector function +and selects the resulting elements by using a specified function. +A duration selector function is used to control the lifetime of groups. When a group expires, +it receives an OnCompleted notification. When a new element with the same +key value as a reclaimed group occurs, the group will be reborn with a new lifetime request.

+ + +
+ + groupByUntil(...) + +
+ Signature: keySelector:('Source -> 'Key) -> durationSelector:(IGroupedObservable<'Key,'Source> -> IObservable<'TDuration>) -> source:IObservable<'Source> -> IObservable<IGroupedObservable<'Key,'Source>>
+ Type parameters: 'Source, 'Key, 'TDuration
+
+ + + + +

Groups the elements of an observable sequence according to a specified key selector function. +A duration selector function is used to control the lifetime of groups. When a group expires, +it receives an OnCompleted notification. When a new element with the same +key value as a reclaimed group occurs, the group will be reborn with a new lifetime request.

+ + +
+ + groupJoin(...) + +
+ Signature: left:IObservable<'Left> -> right:IObservable<'Right> -> leftselect:('Left -> IObservable<'a>) -> rightselect:('Right -> IObservable<'b>) -> resultselect:('Left -> IObservable<'Right> -> 'Result) -> IObservable<'Result>
+ Type parameters: 'Left, 'Right, 'a, 'b, 'Result
+
+ + + + +

Correlates the elements of two sequences based on overlapping +durations and groups the results

+ + +
+ + guard f source + +
+ Signature: f:(unit -> unit) -> source:IObservable<'Args> -> IObservable<'Args>
+ Type parameters: 'Args
+
+ + + + +

Creates an observable that calls the specified function (each time) +after an observer is attached to the observable. This is useful to +make sure that events triggered by the function are handled.

+ + +
+ + head(obs) + +
+ Signature: obs:IObservable<'?8375> -> IObservable<'?8375>
+ Type parameters: '?8375
+
+ + + + +

Takes the first element of the observable sequence

+ + +
+ + ignoreElements(source) + +
+ Signature: source:IObservable<'?8233> -> IObservable<'?8233>
+ Type parameters: '?8233
+
+ + + + +

Ignores all elements in an observable sequence leaving only the completed/error notifications

+ + +
+ + infinite() + +
+ Signature: unit -> IObservable<'?8467>
+ Type parameters: '?8467
+
+ + + + +

Returns a non-terminating observable sequence, which can +be used to denote an infinite duration (e.g. when using reactive joins).

+ + +
+ + interval(period) + +
+ Signature: period:TimeSpan -> IObservable<int64>
+
+
+ + + + +

Returns an observable sequence that produces a value after each period

+ + +
+ + intervalOn scheduler period + +
+ Signature: scheduler:IScheduler -> period:TimeSpan -> IObservable<int64>
+
+
+ + + + +

Returns an observable sequence that produces a value on the specified scheduler after each period

+ + +
+ + isEmpty(source) + +
+ Signature: source:IObservable<'?8379> -> IObservable<bool>
+ Type parameters: '?8379
+
+ + + + +

IsEmpty returns an Observable that emits true if and only if the +source Observable completes without emitting any items.

+ + +
+ + iter onNext source + +
+ Signature: onNext:('Source -> unit) -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Invokes an action for each element in the observable sequence, and propagates all observer +messages through the result sequence. This method can be used for debugging, logging, etc. of query +behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline.

+ + +
+ + iterEnd onNext onCompleted source + +
+ Signature: onNext:('Source -> unit) -> onCompleted:(unit -> unit) -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Invokes an action for each element in the observable sequence and invokes an action +upon graceful termination of the observable sequence. This method can be used for debugging, +logging, etc. of query behavior by intercepting the message stream to run arbitrary +actions for messages on the pipeline.

+ + +
+ + iterError onNext onError source + +
+ Signature: onNext:('Source -> unit) -> onError:(exn -> unit) -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Invokes an action for each element in the observable sequence and invokes an action upon +exceptional termination of the observable sequence. This method can be used for debugging, +logging, etc. of query behavior by intercepting the message stream to run arbitrary +actions for messages on the pipeline.

+ + +
+ + iterErrorEnd(...) + +
+ Signature: onNext:('Source -> unit) -> onError:(exn -> unit) -> onCompleted:(unit -> unit) -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Invokes an action for each element in the observable sequence and invokes an action +upon graceful or exceptional termination of the observable sequence. +This method can be used for debugging, logging, etc. of query behavior by intercepting +the message stream to run arbitrary actions for messages on the pipeline.

+ + +
+ + iterObserver observer source + +
+ Signature: observer:IObserver<'Source> -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Invokes the observer's methods for each message in the source sequence. +This method can be used for debugging, logging, etc. of query behavior by intercepting +the message stream to run arbitrary actions for messages on the pipeline.

+ + +
+ + join right f left + +
+ Signature: right:IObservable<'?8391> -> f:('?8392 -> '?8391 -> '?8393) -> left:IObservable<'?8392> -> IObservable<'?8393>
+ Type parameters: '?8391, '?8392, '?8393
+
+ + + + +

Correlates the elements of two sequences based on overlapping durations.

+ + +
+ + joinMap right fLeft fRight fResult left + +
+ Signature: right:IObservable<'?8395> -> fLeft:('?8396 -> IObservable<'?8397>) -> fRight:('?8395 -> IObservable<'?8398>) -> fResult:('?8396 -> '?8395 -> '?8399) -> left:IObservable<'?8396> -> IObservable<'?8399>
+ Type parameters: '?8395, '?8396, '?8397, '?8398, '?8399
+
+ + + + +

Correlates the elements of two sequences based on overlapping durations.

+ + +
+ + joinWhen(plans) + +
+ Signature: plans:seq<Plan<'T>> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Joins together the results from several patterns

+ + +
+ + last(source) + +
+ Signature: source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns the last element of an observable sequence.

+ + +
+ + lastIf predicate source + +
+ Signature: predicate:('Source -> bool) -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns the last element of an observable sequence that satisfies the condition in the predicate

+ + +
+ + latest(source) + +
+ Signature: source:IObservable<'?8407> -> IEnumerable<'?8407>
+ Type parameters: '?8407
+
+ + + + +

Returns an enumerable sequence whose enumeration returns the latest observed element in the source observable sequence. +Enumerators on the resulting sequence will never produce the same element repeatedly, +and will block until the next element becomes available.

+ + +
+ + liftAsync(asyncOperation) + +
+ Signature: asyncOperation:('?8279 -> Async<'?8280>) -> '?8279 -> IObservable<'?8280>
+ Type parameters: '?8279, '?8280
+
+ + + + +

Helper function for turning async workflows into observables

+ + +
+ + log prefix source + +
+ Signature: prefix:string -> source:IObservable<'?8493> -> IObservable<'?8493>
+ Type parameters: '?8493
+
+ + + + +

Logs the incoming emits with a given prefix to the console.

+ + +
+ + logTo prefix f source + +
+ Signature: prefix:string -> f:(string -> unit) -> source:IObservable<'?8491> -> IObservable<'?8491>
+ Type parameters: '?8491
+
+ + + + +

Logs the incoming emits with a given prefix to a specified target.

+ + +
+ + longCount(source) + +
+ Signature: source:IObservable<'?8409> -> IObservable<int64>
+ Type parameters: '?8409
+
+ + + + +

Returns an observable sequence containing a int64 that represents +the total number of elements in an observable sequence

+ + +
+ + longCountSatisfy predicate source + +
+ Signature: predicate:('?8411 -> bool) -> source:IObservable<'?8411> -> IObservable<int64>
+ Type parameters: '?8411
+
+ + + + +

Returns an observable sequence containing an int that represents how many elements +in the specified observable sequence satisfy a condition.

+ + +
+ + map f source + +
+ Signature: f:('?8413 -> '?8414) -> source:IObservable<'?8413> -> IObservable<'?8414>
+ Type parameters: '?8413, '?8414
+
+ + + + +

Maps the given observable with the given function

+ + +
+ + map2 f a b + +
+ Signature: f:IObservable<('?8419 -> '?8420 -> '?8421)> -> a:IObservable<'?8419> -> b:IObservable<'?8420> -> IObservable<'?8421>
+ Type parameters: '?8419, '?8420, '?8421
+
+ + + + +

Maps two observables to the specified function.

+ + +
+ + mapFold f init source + +
+ Signature: f:('TState -> 'T -> 'TResult * 'TState) -> init:'TState -> source:IObservable<'T> -> IObservable<'TResult list * 'TState>
+ Type parameters: 'TState, 'T, 'TResult
+
+ + + + +

Combines 'map' and 'fold'. Builds an observable whose emits are the result of applying the given function to each of the emits of the source observable. +The function is also used to accumulate a final value.

+ + +
+ + mapi f source + +
+ Signature: f:(int -> 'Source -> 'Result) -> source:IObservable<'Source> -> IObservable<'Result>
+ Type parameters: 'Source, 'Result
+
+ + + + +

Maps the given observable with the given function and the +index of the element

+ + +
+ + mapTo x source + +
+ Signature: x:'?8427 -> source:IObservable<'T> -> IObservable<'?8427>
+ Type parameters: '?8427, 'T
+
+ + + + +

Maps every emission to a constant value.

+ + +
+ + mapToLazy xLazy source + +
+ Signature: xLazy:Lazy<'T> -> source:IObservable<'T> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Maps every emission to a constant lazy value.

+ + +
+ + materialize(source) + +
+ Signature: source:IObservable<'?8432> -> IObservable<Notification<'?8432>>
+ Type parameters: '?8432
+
+ + + + +

Materializes the implicit notifications of an observable sequence as +explicit notification values

+ + +
+ + maxOf(source) + +
+ Signature: source:IObservable<'T> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Returns the maximum element in an observable sequence.

+ + +
+ + merge second first + +
+ Signature: second:IObservable<'T> -> first:IObservable<'T> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Merges the two observables

+ + +
+ + mergeArray(sources) + +
+ Signature: sources:IObservable<'T> [] -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Merges all the observable sequences into a single observable sequence.

+ + +
+ + mergeArrayOn scheduler sources + +
+ Signature: scheduler:IScheduler -> sources:IObservable<'T> [] -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Merges all the observable sequences into a single observable sequence, +using a specified scheduler for enumeration of and subscription to the sources.

+ + +
+ + mergeInner(sources) + +
+ Signature: sources:IObservable<IObservable<'T>> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Merges elements from all inner observable sequences +into a single observable sequence.

+ + +
+ + mergeInnerMax maxConcurrent sources + +
+ Signature: maxConcurrent:int -> sources:IObservable<IObservable<'T>> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Merges elements from all inner observable sequences +into a single observable sequence limiting the number of concurrent +subscriptions to inner sequences

+ + +
+ + mergeOn scheduler second first + +
+ Signature: scheduler:IScheduler -> second:IObservable<'T> -> first:IObservable<'T> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Merges the two observables, using a specified scheduler for enumeration of and subscription to the sources.

+ + +
+ + mergeSeq(sources) + +
+ Signature: sources:seq<IObservable<'T>> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Merges an enumerable sequence of observable sequences into a single observable sequence.

+ + +
+ + mergeSeqMax maxConcurrent sources + +
+ Signature: maxConcurrent:int -> sources:seq<IObservable<'T>> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Merges an enumerable sequence of observable sequences into an observable sequence, +limiting the number of concurrent subscriptions to inner sequences.

+ + +
+ + mergeSeqMaxOn(...) + +
+ Signature: scheduler:IScheduler -> maxConcurrent:int -> sources:seq<IObservable<'T>> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Merges an enumerable sequence of observable sequences into an observable sequence, +limiting the number of concurrent subscriptions to inner sequences, +using a specified scheduler for enumeration of and subscription to the sources.

+ + +
+ + mergeSeqOn scheduler sources + +
+ Signature: scheduler:IScheduler -> sources:seq<IObservable<'T>> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Merges an enumerable sequence of observable sequences into a single observable sequence, +using a specified scheduler for enumeration of and subscription to the sources.

+ + +
+ + mergeTasks(sources) + +
+ Signature: sources:IObservable<Task<'T>> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Merge results from all source tasks into a single observable sequence

+ + +
+ + mostRecent initialVal source + +
+ Signature: initialVal:'?8458 -> source:IObservable<'?8458> -> IEnumerable<'?8458>
+ Type parameters: '?8458
+
+ + + + +

Returns an enumerable sequence whose sequence whose enumeration returns the +most recently observed element in the source observable sequence, using +the specified

+ + +
+ + multicast subject source + +
+ Signature: subject:ISubject<'?8460,'?8461> -> source:IObservable<'?8460> -> IConnectableObservable<'?8461>
+ Type parameters: '?8460, '?8461
+
+ + + + +

Multicasts the source sequence notifications through the specified subject to +the resulting connectable observable. Upon connection of the connectable +observable, the subject is subscribed to the source exactly one, and messages +are forwarded to the observers registered with the connectable observable. +For specializations with fixed subject types, see Publish, PublishLast, and Replay.

+ + +
+ + multicastMap(...) + +
+ Signature: subjectSelector:(unit -> ISubject<'?8463,'?8464>) -> selector:(IObservable<'?8464> -> IObservable<'?8465>) -> source:IObservable<'?8463> -> IObservable<'?8465>
+ Type parameters: '?8463, '?8464, '?8465
+
+ + + + +

Multicasts the source sequence notifications through an instantiated subject into +all uses of the sequence within a selector function. Each subscription to the +resulting sequence causes a separate multicast invocation, exposing the sequence +resulting from the selector function's invocation. For specializations with fixed +subject types, see Publish, PublishLast, and Replay.

+ + +
+ + neverWitness(witness) + +
+ Signature: witness:'?8469 -> IObservable<'?8469>
+ Type parameters: '?8469
+
+ + + + +

Returns a non-terminating observable sequence, which can be +used to denote an infinite duration (e.g. when using reactive joins).

+ + +
+ + next(source) + +
+ Signature: source:IObservable<'?8471> -> IEnumerable<'?8471>
+ Type parameters: '?8471
+
+ + + + +

Returns an observable sequence whose enumeration blocks until the next +element in the source observable sequence becomes available. +Enumerators on the resulting sequence will block until the next +element becomes available.

+ + +
+ + observeOn scheduler source + +
+ Signature: scheduler:IScheduler -> source:IObservable<'?8477> -> IObservable<'?8477>
+ Type parameters: '?8477
+
+ + + + +

Wraps the source sequence in order to run its observer callbacks on the specified scheduler.

+ + +
+ + observeOnContext context source + +
+ Signature: context:SynchronizationContext -> source:IObservable<'?8479> -> IObservable<'?8479>
+ Type parameters: '?8479
+
+ + + + +

Wraps the source sequence in order to run its observer callbacks +on the specified synchronization context.

+ + +
+ + ofAsync(asyncOperation) + +
+ Signature: asyncOperation:Async<'?8277> -> IObservable<'?8277>
+ Type parameters: '?8277
+
+ + + + +

Turns an F# async workflow into an observable

+ + +
+ + ofSeq(items) + +
+ Signature: items:seq<'Item> -> IObservable<'Item>
+ Type parameters: 'Item
+
+ + + + +

Returns the sequence as an observable

+ + +
+ + ofSeqOn scheduler items + +
+ Signature: scheduler:IScheduler -> items:seq<'Item> -> IObservable<'Item>
+ Type parameters: 'Item
+
+ + + + +

Returns the sequence as an observable, using the specified scheduler to run the enumeration loop

+ + +
+ + ofType(source) + +
+ Signature: source:IObservable<obj> -> IObservable<'?8481>
+ Type parameters: '?8481
+
+ + + + +

Filters the elements of an observable sequence based on the specified type

+ + +
+ + onErrorConcat second first + +
+ Signature: second:IObservable<'Source> -> first:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Concatenates the second observable sequence to the first observable sequence +upon successful or exceptional termination of the first.

+ + +
+ + onErrorConcatArray(sources) + +
+ Signature: sources:IObservable<'Source> [] -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Concatenates all of the specified observable sequences, even if the previous observable sequence terminated exceptionally.

+ + +
+ + onErrorConcatSeq(sources) + +
+ Signature: sources:seq<IObservable<'Source>> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Concatenates all observable sequences in the given enumerable sequence, even if the +previous observable sequence terminated exceptionally.

+ + +
+ + perform f source + +
+ Signature: f:('?8489 -> unit) -> source:IObservable<'?8489> -> IObservable<'?8489>
+ Type parameters: '?8489
+
+ + + + +

Iterates through the observable and performs the given side-effect

+ + +
+ + performFinally f source + +
+ Signature: f:(unit -> unit) -> source:IObservable<'?8495> -> IObservable<'?8495>
+ Type parameters: '?8495
+
+ + + + +

Invokes the finally action after source observable sequence terminates normally or by an exception.

+ + +
+ + poll period source + +
+ Signature: period:DateTimeOffset -> source:IObservable<Result<'?8847,'?8848>> -> IObservable<Result<'?8847,'?8848>>
+ Type parameters: '?8847, '?8848
+
+ + + + +

Description +Periodically repeats the observable sequence exposing a responses or failures. +Using the Scheduler.Default on which the polling period should run.

+

Parameters +- period - Accepts the period in which the polling should happen. +- source - The source observable on which the polling happen.

+ + +
+ + pollOn sch period source + +
+ Signature: sch:IScheduler -> period:DateTimeOffset -> source:IObservable<Result<'?8844,'?8845>> -> IObservable<Result<'?8844,'?8845>>
+ Type parameters: '?8844, '?8845
+
+ + + + +

Description +Periodically repeats the observable sequence exposing a responses or failures.

+

Parameters +- sch - Accepts the scheduler on which the polling period should be run. +- period - Accepts the period in which the polling should happen. +- source - The source observable on which the polling happen.

+ + +
+ + publish(source) + +
+ Signature: source:IObservable<'?8497> -> IConnectableObservable<'?8497>
+ Type parameters: '?8497
+
+ + + + +

Returns a connectable observable sequence (IConnectableObsevable) that shares +a single subscription to the underlying sequence. This operator is a +specialization of Multicast using a regular Subject

+ + +
+ + publishInitial initial source + +
+ Signature: initial:'Source -> source:IObservable<'Source> -> IConnectableObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns a connectable observable sequence (IConnectableObsevable) that shares +a single subscription to the underlying sequence and starts with the value +initial. This operator is a specialization of Multicast using a regular Subject

+ + +
+ + publishInitialMap initial map source + +
+ Signature: initial:'Source -> map:(IObservable<'Source> -> IObservable<'Result>) -> source:IObservable<'Source> -> IObservable<'Result>
+ Type parameters: 'Source, 'Result
+
+ + + + +

Returns an observable sequence that is the result of +the map on a connectable observable sequence that shares a +a single subscription to the underlying sequence. This operator is a +specialization of Multicast using a regular Subject

+ + +
+ + publishLast(source) + +
+ Signature: source:IObservable<'?8507> -> IConnectableObservable<'?8507>
+ Type parameters: '?8507
+
+ + + + +

Returns an observable sequence that is the result of invoking +the selector on a connectable observable sequence containing +only the last notification This operator is a +specialization of Multicast using a regular Subject

+ + +
+ + publishLastMap map source + +
+ Signature: map:(IObservable<'Source> -> IObservable<'Result>) -> source:IObservable<'Source> -> IObservable<'Result>
+ Type parameters: 'Source, 'Result
+
+ + + + +

Returns an observable sequence that is the result of invoking +the selector on a connectable observable sequence that shares a +a single subscription to the underlying sequence. This operator is a +specialization of Multicast using a regular Subject

+ + +
+ + publishMap map source + +
+ Signature: map:(IObservable<'Source> -> IObservable<'Result>) -> source:IObservable<'Source> -> IObservable<'Result>
+ Type parameters: 'Source, 'Result
+
+ + + + +

Returns an observable sequence that is the result of invoking +the selector on a connectable observable sequence that shares a +a single subscription to the underlying sequence. This operator is a +specialization of Multicast using a regular Subject

+ + +
+ + range start count + +
+ Signature: start:int -> count:int -> IObservable<int>
+
+
+ + + + +

Creates a range as an observable

+ + +
+ + rangeOn scheduler start count + +
+ Signature: scheduler:IScheduler -> start:int -> count:int -> IObservable<int>
+
+
+ + + + +

Creates a range as an observable, using the specified scheduler to send out observer messages.

+ + +
+ + reduce f source + +
+ Signature: f:('?8514 -> '?8514 -> '?8514) -> source:IObservable<'?8514> -> IObservable<'?8514>
+ Type parameters: '?8514
+
+ + + + +

Reduces the observable

+ + +
+ + refCount(source) + +
+ Signature: source:IConnectableObservable<'?8516> -> IObservable<'?8516>
+ Type parameters: '?8516
+
+ + + + +

Returns an observable that remains connected to the source as long +as there is at least one subscription to the observable sequence +( publish an Observable to get a ConnectableObservable )

+ + +
+ + repeat(source) + +
+ Signature: source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Repeats the observable sequence indefinitely.

+ + +
+ + repeatCount repeatCount value + +
+ Signature: repeatCount:int -> value:'Result -> IObservable<'Result>
+ Type parameters: 'Result
+
+ + + + +

Repeats the observable sequence a specified number of times.

+ + +
+ + repeatValue(value) + +
+ Signature: value:'Result -> IObservable<'Result>
+ Type parameters: 'Result
+
+ + + + +

Generates an observable sequence that repeats the given element infinitely.

+ + +
+ + repeatWhile condition source + +
+ Signature: condition:(unit -> bool) -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Repeats the given observable sequence as long as the specified condition holds, where the +condition is evaluated after each repeated source is completed.

+ + +
+ + replay(source) + +
+ Signature: source:IObservable<'Source> -> IConnectableObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns a connectable observable sequence that shares a single subscription to the +underlying sequence replaying all notifications.

+ + +
+ + replayBuffer bufferSize source + +
+ Signature: bufferSize:int -> source:IObservable<'Source> -> IConnectableObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns a connectable observable sequence that shares a single subscription to the underlying sequence +replaying notifications subject to a maximum element count for the replay buffer.

+ + +
+ + replayBufferWindow(...) + +
+ Signature: bufferSize:int -> window:TimeSpan -> source:IObservable<'Source> -> IConnectableObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns a connectable observable sequence that shares a single subscription to the underlying sequence

+ + +
+ + replayBufferWindowOn(...) + +
+ Signature: scheduler:IScheduler -> bufferSize:int -> window:TimeSpan -> source:IObservable<'Source> -> IConnectableObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns a connectable observable sequence that shares a single subscription to the underlying sequence

+ + +
+ + replayMap map source + +
+ Signature: map:(IObservable<'Source> -> IObservable<'Result>) -> source:IObservable<'Source> -> IObservable<'Result>
+ Type parameters: 'Source, 'Result
+
+ + + + +

Returns an observable sequence that is the result of invoking the selector on a connectable observable +sequence that shares a single subscription to the underlying sequence replaying all notifications.

+ + +
+ + replayMapBuffer map bufferSize source + +
+ Signature: map:(IObservable<'Source> -> IObservable<'Result>) -> bufferSize:int -> source:IObservable<'Source> -> IObservable<'Result>
+ Type parameters: 'Source, 'Result
+
+ + + + +

Returns an observable sequence that is the result of apply a map to a connectable observable sequence that +shares a single subscription to the underlying sequence replaying notifications subject to +a maximum element count for the replay buffer.

+ + +
+ + replayMapBufferWindow(...) + +
+ Signature: map:(IObservable<'Source> -> IObservable<'Result>) -> bufferSize:int -> window:TimeSpan -> source:IObservable<'Source> -> IObservable<'Result>
+ Type parameters: 'Source, 'Result
+
+ + + + +

Returns an observable sequence that is the result of apply a map to a connectable observable sequence that +shares a single subscription to the underlying sequence replaying notifications subject to +a maximum time length and element count for the replay buffer.

+ + +
+ + replayMapBufferWindowOn(...) + +
+ Signature: scheduler:IScheduler -> map:(IObservable<'Source> -> IObservable<'Result>) -> bufferSize:int -> window:TimeSpan -> source:IObservable<'Source> -> IObservable<'Result>
+ Type parameters: 'Source, 'Result
+
+ + + + +

Returns an observable sequence that is the result of apply a map to a connectable observable sequence that +shares a single subscription to the underlying sequence replaying notifications subject to +a maximum time length and element count for the replay buffer.

+ + +
+ + replayMapWindow map window source + +
+ Signature: map:(IObservable<'Source> -> IObservable<'Result>) -> window:TimeSpan -> source:IObservable<'Source> -> IObservable<'Result>
+ Type parameters: 'Source, 'Result
+
+ + + + +

Returns an observable sequence that is the result of apply a map to a connectable observable sequence that +shares a single subscription to the underlying sequence replaying notifications subject to +a maximum time length.

+ + +
+ + replayMapWindowOn(...) + +
+ Signature: scheduler:IScheduler -> map:(IObservable<'Source> -> IObservable<'Result>) -> window:TimeSpan -> source:IObservable<'Source> -> IObservable<'Result>
+ Type parameters: 'Source, 'Result
+
+ + + + +

Returns an observable sequence that is the result of apply a map to a connectable observable sequence that +shares a single subscription to the underlying sequence replaying notifications subject to +a maximum time length.

+ + +
+ + replayOn sch source + +
+ Signature: sch:IScheduler -> source:IObservable<'?8528> -> IConnectableObservable<'?8528>
+ Type parameters: '?8528
+
+ + + + +

Returns a connectable observable sequence that shares a single subscription to the +underlying sequence replaying all notifications.

+ + +
+ + replayWindow window source + +
+ Signature: window:TimeSpan -> source:IObservable<'Source> -> IConnectableObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns a connectable observable sequence that shares a single subscription to the underlying sequence +replaying notifications subject to a maximum time length for the replay buffer.

+ + +
+ + replayWindowOn scheduler window source + +
+ Signature: scheduler:IScheduler -> window:TimeSpan -> source:IObservable<'Source> -> IConnectableObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns a connectable observable sequence that shares a single subscription to the underlying sequence +replaying notifications subject to a maximum time length for the replay buffer.

+ + +
+ + result(x) + +
+ Signature: x:'?8562 -> IObservable<'?8562>
+ Type parameters: '?8562
+
+ + + + + +
+ + retry(source) + +
+ Signature: source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Repeats the source observable sequence until it successfully terminates.

+ + +
+ + retryCount count source + +
+ Signature: count:int -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Repeats the source observable sequence the specified number of times or until it successfully terminates.

+ + +
+ + sample interval source + +
+ Signature: interval:TimeSpan -> source:IObservable<'?8564> -> IObservable<'?8564>
+ Type parameters: '?8564
+
+ + + + +

Samples the observable at the given interval

+ + +
+ + sampleOn scheduler interval source + +
+ Signature: scheduler:IScheduler -> interval:TimeSpan -> source:IObservable<'?8566> -> IObservable<'?8566>
+ Type parameters: '?8566
+
+ + + + +

Samples the observable sequence at each interval, using the specified scheduler to run sampling timers. +Upon each sampling tick, the latest element (if any) in the source sequence during the +last sampling interval is sent to the resulting sequence.

+ + +
+ + sampleWith sampler source + +
+ Signature: sampler:IObservable<'Sample> -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Sample, 'Source
+
+ + + + +

Samples the source observable sequence using a samper observable sequence producing sampling ticks. +Upon each sampling tick, the latest element (if any) in the source sequence during the +last sampling interval is sent to the resulting sequence.

+ + +
+ + scan accumulator source + +
+ Signature: accumulator:('a -> 'a -> 'a) -> source:IObservable<'a> -> IObservable<'a>
+ Type parameters: 'a
+
+ + + + +

Applies an accumulator function over an observable sequence and returns each intermediate result.

+ + +
+ + scanInit init accumulator source + +
+ Signature: init:'TAccumulate -> accumulator:('TAccumulate -> 'Source -> 'TAccumulate) -> source:IObservable<'Source> -> IObservable<'TAccumulate>
+ Type parameters: 'TAccumulate, 'Source
+
+ + + + +

Applies an accumulator function over an observable sequence and returns each intermediate result. +The specified init value is used as the initial accumulator value.

+ + +
+ + selectIf condition thenSource + +
+ Signature: condition:(unit -> bool) -> thenSource:IObservable<'?8576> -> IObservable<'?8576>
+ Type parameters: '?8576
+
+ + + + +

If the condition evaluates true, select the "thenSource" sequence. Otherwise, return an empty sequence.

+ + +
+ + selectIfElse(...) + +
+ Signature: condition:(unit -> bool) -> elseSource:IObservable<'Result> -> thenSource:IObservable<'Result> -> IObservable<'Result>
+ Type parameters: 'Result
+
+ + + + +

If the condition evaluates true, select the "thenSource" sequence. Otherwise, select the else source

+ + +
+ + selectIfOn(...) + +
+ Signature: scheduler:IScheduler -> condition:(unit -> bool) -> thenSource:IObservable<'?8578> -> IObservable<'?8578>
+ Type parameters: '?8578
+
+ + + + +

If the condition evaluates true, select the "thenSource" sequence. +Otherwise, return an empty sequence generated on the specified scheduler.

+ + +
+ + serve max sourceFactory + +
+ Signature: max:int -> sourceFactory:(unit -> '?8873) -> IObservable<'?8874>
+ Type parameters: '?8873, '?8874
+
+ + + + +

Description +Concurrently invokes the specified factory to create observables as fast and often as possible and subscribes to all of them +up to the default maximum concurrency.

+

Parameters +- max - The maximum number of observables to be subscribed simultaneously. +- sourceFactory - Function that returns the observable to invoke concurrently.

+ + +
+ + serveCustomOn(...) + +
+ Signature: sch:IScheduler -> max:int -> callOnError:(exn -> bool) -> sourceFactory:(unit -> '?8867) -> IObservable<'?8868>
+ Type parameters: '?8867, '?8868
+
+ + + + +

Description +Concurrently invokes the specified factory to create observables as fast and often as possible and subscribes to all of them +up to the default maximum concurrency.

+

Parameters +- sch - The scheduler on which the invocation should happen. +- max - The maximum number of observables to be subscribed simultaneously. +- callOnError - Function to determine whether or not the given exception should call the OnError. +- sourceFactory - Function that returns the observable to invoke concurrently.

+ + +
+ + serveGateCustomOn(...) + +
+ Signature: sch:IScheduler -> gate:'?8863 -> max:int -> callOnError:(exn -> bool) -> sourceFactory:(unit -> '?8864) -> IObservable<'?8865>
+ Type parameters: '?8863, '?8864, '?8865
+
+ + + + +

Description +Concurrently invokes the specified factory to create observables as fast and often as possible and subscribes to all of them +up to the default maximum concurrency.

+

Parameters +- sch - The scheduler on which the invocation should happen. +- gate - Common gate on which the synchronization should happen. +- max - The maximum number of observables to be subscribed simultaneously. +- callOnError - Function to determine whether or not the given exception should call the OnError. +- sourceFactory - Function that returns the observable to invoke concurrently.

+ + +
+ + serveOn sch max sourceFactory + +
+ Signature: sch:IScheduler -> max:int -> sourceFactory:(unit -> '?8870) -> IObservable<'?8871>
+ Type parameters: '?8870, '?8871
+
+ + + + +

Description +Concurrently invokes the specified factory to create observables as fast and often as possible and subscribes to all of them +up to the default maximum concurrency.

+

Parameters +- sch - The scheduler on which the invocation should happen. +- gate - Common gate on which the synchronization should happen. +- max - The maximum number of observables to be subscribed simultaneously. +- sourceFactory - Function that returns the observable to invoke concurrently.

+ + +
+ + single(value) + +
+ Signature: value:'Result -> IObservable<'Result>
+ Type parameters: 'Result
+
+ + + + +

Returns an observable sequence that contains a single element.

+ + +
+ + singleOn scheduler value + +
+ Signature: scheduler:IScheduler -> value:'?8584 -> IObservable<'?8584>
+ Type parameters: '?8584
+
+ + + + +

Returns an observable sequence that contains a single element, +using a specified scheduler to send out observer messages.

+ + +
+ + skip count source + +
+ Signature: count:int -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Bypasses a specified number of elements in an observable sequence and then returns the remaining elements.

+ + +
+ + skipLast count source + +
+ Signature: count:int -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Bypasses a specified number of elements at the end of an observable sequence.

+ + +
+ + skipLastSpan duration source + +
+ Signature: duration:TimeSpan -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Skips elements for the specified duration from the end of the observable source sequence.

+ + +
+ + skipLastSpanOn scheduler duration source + +
+ Signature: scheduler:IScheduler -> duration:TimeSpan -> source:IObservable<'?8596> -> IObservable<'?8596>
+ Type parameters: '?8596
+
+ + + + +

Skips elements for the specified duration from the end of the observable source sequence, +using the specified scheduler to run timers.

+ + +
+ + skipSpan duration source + +
+ Signature: duration:TimeSpan -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Skips elements for the specified duration from the start of the observable source sequence.

+ + +
+ + skipSpanOn scheduler duration source + +
+ Signature: scheduler:IScheduler -> duration:TimeSpan -> source:IObservable<'?8590> -> IObservable<'?8590>
+ Type parameters: '?8590
+
+ + + + +

Skips elements for the specified duration from the start of the observable source sequence, +using a specified scheduler to run timers.

+ + +
+ + skipUntil startTime source + +
+ Signature: startTime:DateTimeOffset -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Skips elements from the observable source sequence until the specified start time.

+ + +
+ + skipUntilOn scheduler startTime source + +
+ Signature: scheduler:IScheduler -> startTime:DateTimeOffset -> source:IObservable<'?8600> -> IObservable<'?8600>
+ Type parameters: '?8600
+
+ + + + +

Skips elements from the observable source sequence until the specified start time, +using the specified scheduler to run timers.

+ + +
+ + skipUntilOther other source + +
+ Signature: other:IObservable<'Other> -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Other, 'Source
+
+ + + + +

Returns the elements from the source observable sequence only after the other observable sequence produces an element.

+ + +
+ + skipWhile predicate source + +
+ Signature: predicate:('Source -> bool) -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements.

+ + +
+ + skipWhilei predicate source + +
+ Signature: predicate:('Source -> int -> bool) -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. +The element's index is used in the logic of the predicate functio

+ + +
+ + startWith values source + +
+ Signature: values:'?8609 -> source:IObservable<'T> -> IObservable<'T>
+ Type parameters: '?8609, 'T
+
+ + + + +

Prepends a sequence of values to an observable sequence.

+ + +
+ + startWithOn scheduler values source + +
+ Signature: scheduler:IScheduler -> values:'?8612 -> source:IObservable<'T> -> IObservable<'T>
+ Type parameters: '?8612, 'T
+
+ + + + +

Prepends a sequence of values to an observable sequence.

+ + +
+ + subscribe onNext observable + +
+ Signature: onNext:('T -> unit) -> observable:IObservable<'T> -> IDisposable
+ Type parameters: 'T
+
+ + + + +

Subscribes to the Observable with a next fuction.

+ + +
+ + subscribeObserver observer observable + +
+ Signature: observer:IObserver<'T> -> observable:IObservable<'T> -> IDisposable
+ Type parameters: 'T
+
+ + + + +

Subscribes to the observable with the given observer

+ + +
+ + subscribeOn scheduler source + +
+ Signature: scheduler:IScheduler -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Wraps the source sequence in order to run its subscription and unsubscription logic +on the specified scheduler. This operation is not commonly used; This only performs +the side-effects of subscription and unsubscription on the specified scheduler. +In order to invoke observer callbacks on a scheduler, use 'observeOn'

+ + +
+ + subscribeOnContext context source + +
+ Signature: context:SynchronizationContext -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Wraps the source sequence in order to run its subscription and unsubscription logic +on the specified SynchronizationContext. This operation is not commonly used; This only performs +the side-effects of subscription and unsubscription on the specified scheduler. +In order to invoke observer callbacks on a scheduler, use 'observeOn'

+ + +
+ + subscribeSafe onNext source + +
+ Signature: onNext:('?8629 -> unit) -> source:IObservable<'?8629> -> IDisposable
+ Type parameters: '?8629
+
+ + + + +

Subscribes to the specified source, re-routing synchronous exceptions during invocation of the +Subscribe function to the observer's 'OnError channel. This function is typically used to write query operators.

+ + +
+ + subscribeSafeObserver observer source + +
+ Signature: observer:IObserver<'?8636> -> source:IObservable<'?8636> -> IDisposable
+ Type parameters: '?8636
+
+ + + + +

Subscribes to the specified source, re-routing synchronous exceptions during invocation of the +Subscribe function to the observer's 'OnError channel. This function is typically used to write query operators.

+ + +
+ + subscribeSafeWithCallbacks(...) + +
+ Signature: onNext:('?8638 -> unit) -> onError:(exn -> unit) -> onCompleted:(unit -> unit) -> source:IObservable<'?8638> -> IDisposable
+ Type parameters: '?8638
+
+ + + + +

Subscribes to the specified source, re-routing synchronous exceptions during invocation of the +Subscribe function to the observer's 'OnError channel. This function is typically used to write query operators.

+ + +
+ + subscribeSafeWithCompletion(...) + +
+ Signature: onNext:('?8633 -> unit) -> onCompleted:'?8634 -> source:IObservable<'?8633> -> IDisposable
+ Type parameters: '?8633, '?8634
+
+ + + + +

Subscribes to the specified source, re-routing synchronous exceptions during invocation of the +Subscribe function to the observer's 'OnError channel. This function is typically used to write query operators.

+ + +
+ + subscribeSafeWithError(...) + +
+ Signature: onNext:('?8631 -> unit) -> onError:(exn -> unit) -> source:IObservable<'?8631> -> IDisposable
+ Type parameters: '?8631
+
+ + + + +

Subscribes to the specified source, re-routing synchronous exceptions during invocation of the +Subscribe function to the observer's 'OnError channel. This function is typically used to write query operators.

+ + +
+ + subscribeWithCallbacks(...) + +
+ Signature: onNext:('T -> unit) -> onError:(exn -> unit) -> onCompleted:(unit -> unit) -> observable:IObservable<'T> -> IDisposable
+ Type parameters: 'T
+
+ + + + +

Subscribes to the observable with all three callbacks

+ + +
+ + subscribeWithCompletion(...) + +
+ Signature: onNext:('T -> unit) -> onCompleted:(unit -> unit) -> observable:IObservable<'T> -> IDisposable
+ Type parameters: 'T
+
+ + + + +

Subscribes to the Observable with a next and a completion callback.

+ + +
+ + subscribeWithError(...) + +
+ Signature: onNext:('T -> unit) -> onError:(exn -> unit) -> observable:IObservable<'T> -> IDisposable
+ Type parameters: 'T
+
+ + + + +

Subscribes to the Observable with a next and an error-function.

+ + +
+ + switch(sources) + +
+ Signature: sources:IObservable<IObservable<'Source>> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Transforms an observable sequence of observable sequences into an +observable sequence producing values only from the most recent +observable sequence.Each time a new inner observable sequnce is recieved, +unsubscribe from the previous inner sequence

+ + +
+ + switchAsync(sources) + +
+ Signature: sources:IObservable<Async<'?8644>> -> IObservable<'?8644>
+ Type parameters: '?8644
+
+ + + + +

Transforms an observable sequence of tasks into an observable sequence +producing values only from the most recent observable sequence. +Each time a new task is received, the previous task's result is ignored.

+ + +
+ + switchMap f source + +
+ Signature: f:('?8853 -> IObservable<'?8854>) -> source:IObservable<'?8853> -> IObservable<'?8854>
+ Type parameters: '?8853, '?8854
+
+ + + + +

Description +Projects each source value to an Observable which is merged in the output +Observable, emitting values only from the most recently projected Observable. +Equivalent to a map followed by a switch.

+

Returns +Returns an Observable that emits items based on applying a function that you +supply to each item emitted by the source Observable, where that function +returns an (so-called "inner") Observable. Each time it observes one of these +inner Observables, the output Observable begins emitting the items emitted by +that inner Observable. When a new inner Observable is emitted, switchMap +stops emitting items from the earlier-emitted inner Observable and begins +emitting items from the new one. It continues to behave like this for +subsequent inner Observables.

+ + +
+ + switchTask(sources) + +
+ Signature: sources:IObservable<Task<'Source>> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Transforms an observable sequence of tasks into an observable sequence +producing values only from the most recent observable sequence. +Each time a new task is received, the previous task's result is ignored.

+ + +
+ + synchronize(source) + +
+ Signature: source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Synchronizes the observable sequence so that notifications cannot be delivered concurrently +this overload is useful to "fix" an observable sequence that exhibits concurrent +callbacks on individual observers, which is invalid behavior for the query processor

+ + +
+ + synchronizeGate gate source + +
+ Signature: gate:obj -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Synchronizes the observable sequence such that observer notifications +cannot be delivered concurrently, using the specified gate object.This +overload is useful when writing n-ary query operators, in order to prevent +concurrent callbacks from different sources by synchronizing on a common gate object.

+ + +
+ + tail(source) + +
+ Signature: source:IObservable<'?8650> -> IObservable<'?8650>
+ Type parameters: '?8650
+
+ + + + +

Bypasses the first element in an observable sequence and then returns the remaining elements.

+ + +
+ + take n source + +
+ Signature: n:int -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Takes n elements (from the beginning of an observable sequence? )

+ + +
+ + takeLast count source + +
+ Signature: count:int -> source:IObservable<'?8660> -> IObservable<'?8660>
+ Type parameters: '?8660
+
+ + + + +

Returns a specified number of contiguous elements from the end of an obserable sequence

+ + +
+ + takeLastBuffer duration source + +
+ Signature: duration:TimeSpan -> source:IObservable<'Source> -> IObservable<IList<'Source>>
+ Type parameters: 'Source
+
+ + + + +

Returns a list with the elements within the specified duration from the end of the observable source sequence.

+ + +
+ + takeLastBufferCount count source + +
+ Signature: count:int -> source:IObservable<'Source> -> IObservable<IList<'Source>>
+ Type parameters: 'Source
+
+ + + + +

Returns a list with the specified number of contiguous elements from the end of an observable sequence.

+ + +
+ + takeLastBufferOn(...) + +
+ Signature: scheduler:IScheduler -> duration:TimeSpan -> source:IObservable<'?8670> -> IObservable<IList<'?8670>>
+ Type parameters: '?8670
+
+ + + + +

Returns a list with the elements within the specified duration from the end of the observable source sequence, +using the specified scheduler to run timers.

+ + +
+ + takeLastOn scheduler count source + +
+ Signature: scheduler:IScheduler -> count:int -> source:IObservable<'?8662> -> IObservable<'?8662>
+ Type parameters: '?8662
+
+ + + + +

Returns a specified number of contiguous elements from the end of an obserable sequence, +using the specified scheduler to drain the queue.

+ + +
+ + takeLastSpan duration source + +
+ Signature: duration:TimeSpan -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns elements within the specified duration from the end of the observable source sequence.

+ + +
+ + takeLastSpanOn scheduler duration source + +
+ Signature: scheduler:IScheduler -> duration:TimeSpan -> source:IObservable<'?8666> -> IObservable<'?8666>
+ Type parameters: '?8666
+
+ + + + +

Returns elements within the specified duration from the end of the observable source sequence, +using the specified scheduler to run timers.

+ + +
+ + takeOn scheduler n source + +
+ Signature: scheduler:IScheduler -> n:int -> source:IObservable<'?8654> -> IObservable<'?8654>
+ Type parameters: '?8654
+
+ + + + +

Returns a specified number of contiguous elemenents from the start of an observable sequence, +using the specified scheduler for the edge case of take(0).

+ + +
+ + takeSpan duration source + +
+ Signature: duration:TimeSpan -> source:IObservable<'?8656> -> IObservable<'?8656>
+ Type parameters: '?8656
+
+ + + + +

Takes elements for a specified duration from the start of the observable source sequence.

+ + +
+ + takeSpanOn scheduler duration source + +
+ Signature: scheduler:IScheduler -> duration:TimeSpan -> source:IObservable<'?8658> -> IObservable<'?8658>
+ Type parameters: '?8658
+
+ + + + +

Takes elements for a specified duration from the start of the observable source sequence, +using the specified scheduler to run timers.

+ + +
+ + takeUntilOther other source + +
+ Signature: other:IObservable<'Other> -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Other, 'Source
+
+ + + + +

Returns the elements from the source observable sequence until the other produces and element

+ + +
+ + takeUntilTime endtime source + +
+ Signature: endtime:DateTimeOffset -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns the elements from the source observable until the specified time

+ + +
+ + takeUntilTimeOn scheduler endtime source + +
+ Signature: scheduler:IScheduler -> endtime:DateTimeOffset -> source:IObservable<'?8679> -> IObservable<'?8679>
+ Type parameters: '?8679
+
+ + + + +

Returns the elements from the source observable until the specified time, +using the specified scheduler to run timers.

+ + +
+ + takeWhile predicate source + +
+ Signature: predicate:('Source -> bool) -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns elements from an observable sequence as long as a specified condition is true.

+ + +
+ + takeWhilei predicate source + +
+ Signature: predicate:('Source -> int -> bool) -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Returns elements from an observable sequence as long as a specified condition is true. +The element's index is used in the logic of the predicate functi

+ + +
+ + thenMap map source + +
+ Signature: map:('Source -> 'Result) -> source:IObservable<'Source> -> Plan<'Result>
+ Type parameters: 'Source, 'Result
+
+ + + + +

matches when the observable sequence has an available element and +applies the map

+ + +
+ + throttle dueTime source + +
+ Signature: dueTime:TimeSpan -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Ignores elements from an observable sequence which are followed by another element within a specified relative time duration.

+ + +
+ + throttleComputed(...) + +
+ Signature: throttleDurationSelector:('Source -> IObservable<'Throttle>) -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source, 'Throttle
+
+ + + + +

Ignores elements from an observable sequence which are followed by another value within a computed throttle duration

+ + +
+ + throttleOn scheduler dueTime source + +
+ Signature: scheduler:IScheduler -> dueTime:TimeSpan -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Ignores elements from an observable sequence which are followed by another element within a specified relative time duration.

+ + +
+ + throw(except) + +
+ Signature: except:exn -> IObservable<'Result>
+ Type parameters: 'Result
+
+ + + + +

Returns an observable sequence that terminates with an exception.

+ + +
+ + throwOn scheduler ex + +
+ Signature: scheduler:IScheduler -> ex:exn -> IObservable<'?8696>
+ Type parameters: '?8696
+
+ + + + +

Returns an observable sequence that terminates with an exception, +using the specified scheduler to send out the single OnError message.

+ + +
+ + throwWitness witness ex + +
+ Signature: witness:'?8694 -> ex:exn -> IObservable<'?8694>
+ Type parameters: '?8694
+
+ + + + +

Returns an observable sequence that terminates with an exception.

+ + +
+ + throwWitnessOn scheduler witeness ex + +
+ Signature: scheduler:'?8698 -> witeness:IScheduler -> ex:exn -> IObservable<'?8698>
+ Type parameters: '?8698
+
+ + + + +

Returns an observable sequence that terminates with an exception, +using the specified scheduler to send out the single OnError message.

+ + +
+ + timeInterval(source) + +
+ Signature: source:IObservable<'Source> -> IObservable<TimeInterval<'Source>>
+ Type parameters: 'Source
+
+ + + + +

Records the time interval between consecutive elements in an observable sequence.

+ + +
+ + timeIntervalOn scheduler source + +
+ Signature: scheduler:IScheduler -> source:IObservable<'?8705> -> IObservable<TimeInterval<'?8705>>
+ Type parameters: '?8705
+
+ + + + +

Records the time interval between consecutive elements in an observable sequence, +using the specified scheduler to compute time intervals.

+ + +
+ + timeout timeout source + +
+ Signature: timeout:DateTimeOffset -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Applies a timeout policy to the observable sequence based on an absolute time. +If the sequence doesn't terminate before the specified absolute due time, a TimeoutException is propagated to the observer.

+ + +
+ + timeout2Duration(...) + +
+ Signature: timeout:IObservable<'Timeout> -> durationSelector:('Source -> IObservable<'Timeout>) -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Timeout, 'Source
+
+ + + + +

Applies a timeout policy to the observable sequence based on an initial timeout duration +for the first element, and a timeout duration computed for each subsequent element. +If the next element isn't received within the computed duration starting from its predecessor, +a TimeoutException is propagated to the observer.

+ + +
+ + timeout2DurationOther(...) + +
+ Signature: timeout:IObservable<'Timeout> -> durationSelector:('Source -> IObservable<'Timeout>) -> other:IObservable<'Source> -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Timeout, 'Source
+
+ + + + +

Applies a timeout policy to the observable sequence based on an initial timeout duration for the first +element, and a timeout duration computed for each subsequent element. +If the next element isn't received within the computed duration starting from its predecessor, +the other observable sequence is used to produce future messages from that point on.

+ + +
+ + timeoutDuration durationSelector source + +
+ Signature: durationSelector:('Source -> IObservable<'Timeout>) -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source, 'Timeout
+
+ + + + +

Applies a timeout policy to the observable sequence based on a timeout duration computed for each element. +If the next element isn't received within the computed duration starting from its predecessor, +a TimeoutException is propagated to the observer.

+ + +
+ + timeoutOn scheduler timeout source + +
+ Signature: scheduler:IScheduler -> timeout:DateTimeOffset -> source:IObservable<'?8709> -> IObservable<'?8709>
+ Type parameters: '?8709
+
+ + + + +

Applies a timeout policy to the observable sequence based on an absolute time, using the specified scheduler to run timeout timers. +If the sequence doesn't terminate before the specified absolute due time, a TimeoutException is propagated to the observer.

+ + +
+ + timeoutOther timeout other source + +
+ Signature: timeout:DateTimeOffset -> other:IObservable<'Source> -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Applies a timeout policy to the observable sequence based on an absolute time. +If the sequence doesn't terminate before the specified absolute due time, the other +observable sequence is used to produce future messages from that point on.

+ + +
+ + timeoutOtherOn(...) + +
+ Signature: scheduler:IScheduler -> timeout:DateTimeOffset -> other:IObservable<'?8713> -> source:IObservable<'?8713> -> IObservable<'?8713>
+ Type parameters: '?8713
+
+ + + + +

Applies a timeout policy to the observable sequence based on an absolute time, +using the specified scheduler to run timeout timers. +If the sequence doesn't terminate before the specified absolute due time, the other +observable sequence is used to produce future messages from that point on.

+ + +
+ + timeoutSpan timeout source + +
+ Signature: timeout:TimeSpan -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Applies a timeout policy for each element in the observable sequence. +If the next element isn't received within the specified timeout duration starting from its +predecessor, a TimeoutException is propagated to the observer.

+ + +
+ + timeoutSpanOn scheduler timeout source + +
+ Signature: scheduler:IScheduler -> timeout:TimeSpan -> source:IObservable<'?8717> -> IObservable<'?8717>
+ Type parameters: '?8717
+
+ + + + +

Applies a timeout policy for each element in the observable sequence, using the specified scheduler to run timeout timers. +If the next element isn't received within the specified timeout duration starting from its +predecessor, a TimeoutException is propagated to the observer.

+ + +
+ + timeoutSpanOther timeout other source + +
+ Signature: timeout:TimeSpan -> other:IObservable<'Source> -> source:IObservable<'Source> -> IObservable<'Source>
+ Type parameters: 'Source
+
+ + + + +

Applies a timeout policy for each element in the observable sequence. +If the next element isn't received within the specified timeout duration starting from +its predecessor, the other observable sequence is used to produce future messages from that point on.

+ + +
+ + timeoutSpanOtherOn(...) + +
+ Signature: scheduler:IScheduler -> timeout:TimeSpan -> other:IObservable<'?8721> -> source:IObservable<'?8721> -> IObservable<'?8721>
+ Type parameters: '?8721
+
+ + + + +

Applies a timeout policy for each element in the observable sequence, using the specified scheduler to run timeout timers. +If the next element isn't received within the specified timeout duration starting from +its predecessor, the other observable sequence is used to produce future messages from that point on.

+ + +
+ + timer(dueTime) + +
+ Signature: dueTime:DateTimeOffset -> IObservable<int64>
+
+
+ + + + +

Returns an observable sequence that produces a single value at the specified absolute due time.

+ + +
+ + timerOn scheduler dueTime + +
+ Signature: scheduler:IScheduler -> dueTime:DateTimeOffset -> IObservable<int64>
+
+
+ + + + +

Returns an observable sequence that produces a single value at the specified absolute due time, +using the specified scheduler to run the timer.

+ + +
+ + timerPeriod dueTime period + +
+ Signature: dueTime:DateTimeOffset -> period:TimeSpan -> IObservable<int64>
+
+
+ + + + +

Returns an observable sequence that periodically produces a value starting at the specified initial absolute due time.

+ + +
+ + timerSpan(dueTime) + +
+ Signature: dueTime:TimeSpan -> IObservable<int64>
+
+
+ + + + +

Returns an observable sequence that produces a single value after the specified relative due time has elapsed.

+ + +
+ + timerSpanOn scheduler dueTime + +
+ Signature: scheduler:IScheduler -> dueTime:TimeSpan -> IObservable<int64>
+
+
+ + + + +

Returns an observable sequence that produces a single value after the specified relative due time has elapsed, +using the specified scheduler to run the timer.

+ + +
+ + timerSpanPeriod(dueTime, period) + +
+ Signature: (dueTime:TimeSpan * period:TimeSpan) -> IObservable<int64>
+
+
+ + + + +

Returns an observable sequence that periodically produces a value after the specified +initial relative due time has elapsed.

+ + +
+ + timerSpanPeriodOn(...) + +
+ Signature: scheduler:IScheduler -> dueTime:TimeSpan -> period:TimeSpan -> IObservable<int64>
+
+
+ + + + +

Returns an observable sequence that periodically produces a value after the specified +initial relative due time has elapsed, using the specified scheduler to run the timer.

+ + +
+ + timestamp(source) + +
+ Signature: source:IObservable<'Source> -> IObservable<Timestamped<'Source>>
+ Type parameters: 'Source
+
+ + + + +

Timestamps each element in an observable sequence using the local system clock.

+ + +
+ + timestampOn scheduler source + +
+ Signature: scheduler:IScheduler -> source:IObservable<'Source> -> IObservable<Timestamped<'Source>>
+ Type parameters: 'Source
+
+ + + + +

Timestamps each element in an observable sequence using the supplied scheduler.

+ + +
+ + toArray(source) + +
+ Signature: source:IObservable<'?8745> -> IObservable<'?8745 []>
+ Type parameters: '?8745
+
+ + + + +

Creates an array from an observable sequence.

+ + +
+ + toDictionary keySelector source + +
+ Signature: keySelector:('?8747 -> '?8748) -> source:IObservable<'?8747> -> IObservable<IDictionary<'?8748,'?8747>>
+ Type parameters: '?8747, '?8748
+
+ + + + +

Creates an observable sequence according to a specified key selector function

+ + +
+ + toDictionaryCompareElements(...) + +
+ Signature: keySelector:('Source -> 'Key) -> elementSelector:('Source -> 'Elm) -> comparer:'Key -> source:'Source -> IObservable<IDictionary<'Key,'Elm>>
+ Type parameters: 'Source, 'Key, 'Elm
+
+ + + + +

Creates an observable sequence according to a specified key selector function

+ + +
+ + toDictionaryComparer(...) + +
+ Signature: keySelector:('Source -> 'Key) -> comparer:'Key -> source:'Source -> IObservable<IDictionary<'Key,'Source>>
+ Type parameters: 'Source, 'Key
+
+ + + + +

Creates an observable sequence according to a specified key selector function +and an a comparer

+ + +
+ + toDictionaryElements(...) + +
+ Signature: keySelector:('Source -> 'Key) -> elementSelector:('Source -> 'Elm) -> source:'Source -> IObservable<IDictionary<'Key,'Elm>>
+ Type parameters: 'Source, 'Key, 'Elm
+
+ + + + +

Creates an observable sequence according to a specified key selector function

+ + +
+ + toEnumerable(source) + +
+ Signature: source:IObservable<'T> -> IEnumerable<'T>
+ Type parameters: 'T
+
+ + + + +

Converts an observable into a seq

+ + +
+ + toEvent(source) + +
+ Signature: source:IObservable<unit> -> IEventSource<unit>
+
+
+ + + + +

Exposes an observable sequence as an object with an Action based .NET event

+ + +
+ + toEventType(source) + +
+ Signature: source:IObservable<'Source> -> IEventSource<'Source>
+ Type parameters: 'Source
+
+ + + + +

Exposes an observable sequence as an object with an Action<'Source> based .NET event.

+ + +
+ + toList(source) + +
+ Signature: source:IObservable<'?8764> -> IObservable<IList<'?8764>>
+ Type parameters: '?8764
+
+ + + + +

Creates a list from an observable sequence

+ + +
+ + toLookup keySelector source + +
+ Signature: keySelector:('Source -> 'Key) -> source:IObservable<'Source> -> IObservable<ILookup<'Key,'Source>>
+ Type parameters: 'Source, 'Key
+
+ + + + +

Creates a lookup from an observable sequence according to a specified key selector function.

+ + +
+ + toLookupCompare(...) + +
+ Signature: keySelector:('Source -> 'Key) -> comparer:IEqualityComparer<'Key> -> source:IObservable<'Source> -> IObservable<ILookup<'Key,'Source>>
+ Type parameters: 'Source, 'Key
+
+ + + + +

Creates a lookup from an observable sequence according to a specified key selector function, and a comparer.

+ + +
+ + toLookupCompareElement(...) + +
+ Signature: keySelector:('Source -> 'Key) -> elementSelector:('Source -> 'Element) -> source:IObservable<'Source> -> IObservable<ILookup<'Key,'Element>>
+ Type parameters: 'Source, 'Key, 'Element
+
+ + + + +

Creates a lookup from an observable sequence according to a specified key selector function, and an element selector function.

+ + +
+ + toLookupElement(...) + +
+ Signature: keySelector:('Source -> 'Key) -> elementSelector:('Source -> 'Element) -> comparer:IEqualityComparer<'Key> -> source:IObservable<'Source> -> IObservable<ILookup<'Key,'Element>>
+ Type parameters: 'Source, 'Key, 'Element
+
+ + + + +

Creates a lookup from an observable sequence according to a specified key selector function, and an element selector function.

+ + +
+ + toObservable(source) + +
+ Signature: source:seq<'T> -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Converts a seq into an observable

+ + +
+ + using resourceFactory observableFactory + +
+ Signature: resourceFactory:(unit -> 'TResource) -> observableFactory:('TResource -> IObservable<'Result>) -> IObservable<'Result>
+ Type parameters: 'TResource, 'Result
+
+ + + + +

Constructs an observable sequence that depends on a resource object, whose +lifetime is tied to the resulting observable sequence's lifetime.

+ + +
+ + usingAsync(...) + +
+ Signature: resourceFactory:(CancellationToken -> Async<'?8785>) -> observableFactory:('?8785 -> CancellationToken -> Async<IObservable<'?8786>>) -> IObservable<'?8786>
+ Type parameters: '?8785, '?8786
+
+ + + + +

Constructs an observable sequence that depends on a resource object, whose +lifetime is tied to the resulting observable sequence's lifetime. +The resource is obtained and used through asynchronous functions. +The cancellation token passed to the asyncrhonous functions is tied to the returned disposable subscription, +allowing best-effor cancellation at any stage of the resource acquisition or usage.

+ + +
+ + wait(source) + +
+ Signature: source:IObservable<'?8788> -> '?8788
+ Type parameters: '?8788
+
+ + + + +

waits for the observable sequence to complete and returns the last +element of the sequence. If the sequence terminates with OnError +notification, the exception is thrown

+ + +
+ + whileLoop condition source + +
+ Signature: condition:(unit -> bool) -> source:IObservable<'?8790> -> IObservable<'?8790>
+ Type parameters: '?8790
+
+ + + + +

Repeats the given function as long as the specified condition holds +where the condition is evaluated before each repeated source is +subscribed to

+ + +
+ + window windowClosingSelector source + +
+ Signature: windowClosingSelector:(unit -> IObservable<'WindowClosing>) -> source:IObservable<'Source> -> IObservable<IObservable<'Source>>
+ Type parameters: 'WindowClosing, 'Source
+
+ + + + +

Projects each element of an observable sequence into consecutive non-overlapping windows. +windowClosingSelector - A function invoked to define the boundaries of the produced windows. +A new window is started when the previous one is closed

+ + +
+ + windowBounded windowBoundaries source + +
+ Signature: windowBoundaries:IObservable<'WindowBoundary> -> source:IObservable<'Source> -> IObservable<IObservable<'Source>>
+ Type parameters: 'WindowBoundary, 'Source
+
+ + + + +

Projects each element of an observable sequence into consecutive non-overlapping windows +windowBoundaries - Sequence of window boundary markers. The current window is closed +and a new window is opened upon receiving a boundary marker

+ + +
+ + windowCount count source + +
+ Signature: count:int -> source:IObservable<'Source> -> IObservable<IObservable<'Source>>
+ Type parameters: 'Source
+
+ + + + +

Projects each element of an observable sequence into consecutive non-overlapping windows +which are produced based on element count information.

+ + +
+ + windowCountSkip count skip source + +
+ Signature: count:int -> skip:int -> source:IObservable<'Source> -> IObservable<IObservable<'Source>>
+ Type parameters: 'Source
+
+ + + + +

Projects each element of an observable sequence into zero or more windows which are produced based on element count information

+ + +
+ + windowOpenClose(...) + +
+ Signature: windowOpenings:IObservable<'WinOpen> -> windowClosingSelector:('WinOpen -> IObservable<'WinClose>) -> source:IObservable<'Source> -> IObservable<IObservable<'Source>>
+ Type parameters: 'WinOpen, 'WinClose, 'Source
+
+ + + + +

Projects each element of an observable sequence into zero or more windows. +windowOpenings - Observable sequence whose elements denote the creation of new windows. +windowClosingSelector - A function invoked to define the closing of each produced window.

+ + +
+ + windowTimeCount timeSpan count source + +
+ Signature: timeSpan:TimeSpan -> count:int -> source:IObservable<'Source> -> IObservable<IObservable<'Source>>
+ Type parameters: 'Source
+
+ + + + +

Projects each element of an observable sequence into a window that is completed when either it's full or +a given amount of time has elapsed. +A useful real-world analogy of this overload is the behavior of a ferry leaving the dock when all seats are +taken, or at the scheduled time of departure, whichever event occurs first

+ + +
+ + windowTimeCountOn(...) + +
+ Signature: scheduler:IScheduler -> timeSpan:TimeSpan -> count:int -> source:IObservable<'?8816> -> IObservable<IObservable<'?8816>>
+ Type parameters: '?8816
+
+ + + + +

Projects each element of an observable sequence into a window that is completed when either it's full or +a given amount of time has elapsed, using the specified scheduler to run timers. +A useful real-world analogy of this overload is the behavior of a ferry leaving the dock when all seats are +taken, or at the scheduled time of departure, whichever event occurs first

+ + +
+ + windowTimeShift(...) + +
+ Signature: timeSpan:TimeSpan -> timeShift:TimeSpan -> source:IObservable<'Source> -> IObservable<IObservable<'Source>>
+ Type parameters: 'Source
+
+ + + + +

Projects each element of an observable sequence into consecutive non-overlapping windows. +windowBoundaries - Sequence of window boundary markers. The current window is closed and a new window is opened upon receiving a boundary marker.

+ + +
+ + windowTimeShiftOn(...) + +
+ Signature: scheduler:IScheduler -> timeSpan:TimeSpan -> timeShift:TimeSpan -> source:IObservable<'?8805> -> IObservable<IObservable<'?8805>>
+ Type parameters: '?8805
+
+ + + + +

Projects each element of an observable sequence into consecutive non-overlapping windows, using the specified scheduler to run timers. +windowBoundaries - Sequence of window boundary markers. The current window is closed and a new window is opened upon receiving a boundary marker.

+ + +
+ + windowTimeSpan timeSpan source + +
+ Signature: timeSpan:TimeSpan -> source:IObservable<'Source> -> IObservable<IObservable<'Source>>
+ Type parameters: 'Source
+
+ + + + +

Projects each element of an observable sequence into consecutive non-overlapping windows +which are produced based on timing information.

+ + +
+ + windowTimeSpanOn(...) + +
+ Signature: scheduler:IScheduler -> timeSpan:TimeSpan -> source:IObservable<'?8797> -> IObservable<IObservable<'?8797>>
+ Type parameters: '?8797
+
+ + + + +

Projects each element of an observable sequence into consecutive non-overlapping windows +which are produced based on timing information, using the specified scheduler to run timers.

+ + +
+ + withLatestFrom(...) + +
+ Signature: resultSelector:('?8818 -> '?8819 -> '?8820) -> second:IObservable<'?8819> -> first:IObservable<'?8818> -> IObservable<'?8820>
+ Type parameters: '?8818, '?8819, '?8820
+
+ + + + +

Merges the specified observable sequences into one observable sequence by using the selector function +only when the first observable sequence produces an element and there was some element produced by the second +observable sequence

+ + +
+ + zip first second + +
+ Signature: first:IObservable<'Source1> -> second:IObservable<'Source2> -> IObservable<'Source1 * 'Source2>
+ Type parameters: 'Source1, 'Source2
+
+ + + + +

Merges two observable sequences into one observable sequence of pairs.

+ + +
+ + zip3 first second third + +
+ Signature: first:IObservable<'Source1> -> second:IObservable<'Source2> -> third:IObservable<'Source3> -> IObservable<'Source1 * 'Source2 * 'Source3>
+ Type parameters: 'Source1, 'Source2, 'Source3
+
+ + + + +

Merges three observable sequences into one observable sequence of triples.

+ + +
+ + zipArray(sources) + +
+ Signature: sources:IObservable<'Source> [] -> IObservable<IList<'Source>>
+ Type parameters: 'Source
+
+ + + + +

Merges the specified observable sequences into one observable sequence by emitting +a list with the elements of the observable sequences at corresponding indexe

+ + +
+ + zipSeq(sources) + +
+ Signature: sources:seq<IObservable<'Source>> -> IObservable<IList<'Source>>
+ Type parameters: 'Source
+
+ + + + +

Merges the specified observable sequences into one observable sequence by emitting a +list with the elements of the observable sequences at corresponding indexes.

+ + +
+ + zipSeqMap resultSelector sources + +
+ Signature: resultSelector:(IList<'S> -> 'R) -> sources:seq<IObservable<'S>> -> IObservable<'R>
+ Type parameters: 'S, 'R
+
+ + + + +

Merges the specified observable sequences into one observable sequence by using +the selector function whenever all of the observable sequences have produced an +element at a corresponding index.

+ + +
+ + zipWith resultSelector first second + +
+ Signature: resultSelector:('Source1 -> 'Source2 -> 'Result) -> first:IObservable<'Source1> -> second:IObservable<'Source2> -> IObservable<'Result>
+ Type parameters: 'Source1, 'Source2, 'Result
+
+ + + + +

Merges two observable sequences into one observable sequence by combining their elements through a projection function.

+ + +
+ + zipWithSeq resultSelector second first + +
+ Signature: resultSelector:('Source1 -> 'Source2 -> 'Result) -> second:seq<'Source2> -> first:IObservable<'Source1> -> IObservable<'Result>
+ Type parameters: 'Source1, 'Source2, 'Result
+
+ + + + +

Merges an observable sequence and an enumerable sequence into one +observable sequence by using the selector function.

+ + +
+

Type extensions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Type extensionDescription
+ + Observer.Create(onNext) + +
+ Signature: (onNext:('?8042 -> unit)) -> IObserver<'?8042>
+ Type parameters: '?8042
+
+ + + + +

Creates an observer from the specified onNext function.

+ + +

CompiledName: Observer.Create.Static

+
+ + Observer.Create(onNext, onError) + +
+ Signature: (onNext:('?8044 -> unit) * onError:(exn -> unit)) -> IObserver<'?8044>
+ Type parameters: '?8044
+
+ + + + +

Creates an observer from the specified onNext and onError functions.

+ + +

CompiledName: Observer.Create.Static

+
+ + Observer.Create(onNext, onCompleted) + +
+ Signature: (onNext:('?8046 -> unit) * onCompleted:(unit -> unit)) -> IObserver<'?8046>
+ Type parameters: '?8046
+
+ + + + +

Creates an observer from the specified onNext and onCompleted functions.

+ + +

CompiledName: Observer.Create.Static

+
+ + Observer.Create(...) + +
+ Signature: (onNext:('?8048 -> unit) * onError:(exn -> unit) * onCompleted:(unit -> unit)) -> IObserver<'?8048>
+ Type parameters: '?8048
+
+ + + + +

Creates an observer from the specified onNext, onError, and onCompleted functions.

+ + +

CompiledName: Observer.Create.Static

+
+ + Observable.Create(subscribe) + +
+ Signature: (subscribe:(IObserver<'T> -> unit -> unit)) -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Creates an observable sequence from the specified Subscribe method implementation.

+ + +

CompiledName: Observable.Create.Static

+
+ + Observable.CreateAsync(subscribe) + +
+ Signature: (subscribe:(IObserver<'T> -> Async<IDisposable>)) -> IObservable<'T>
+ Type parameters: 'T
+
+ + + + +

Creates an observable sequence from the specified asynchronous Subscribe method implementation.

+ + +

CompiledName: Observable.CreateAsync.Static

+
+ + Observer.Empty + +
+ Signature: IObserver<obj>
+
+
+ + + + +

Creates an observer that ignores the incoming emits from 'OnNext', 'OnError', and 'OnCompleted'.

+ + +

CompiledName: Observer.get_Empty.Static

+
+ + Observer.Empty + +
+ Signature: IObserver<obj>
+
+
+ + + + +

Creates an observer that ignores the incoming emits from 'OnNext', 'OnError', and 'OnCompleted'.

+ + +

CompiledName: Observer.get_Empty.Static

+
+ + x.Subscribe(onNext) + +
+ Signature: (onNext:('T -> unit)) -> IDisposable
+
+
+ + + + +

Subscribes to the Observable with just a next-function.

+ + +

CompiledName: IObservable`1.Subscribe

+
+ + x.Subscribe(onNext, onError) + +
+ Signature: (onNext:('T -> unit) * onError:(exn -> unit)) -> IDisposable
+
+
+ + + + +

Subscribes to the Observable with a next and an error-function.

+ + +

CompiledName: IObservable`1.Subscribe

+
+ + x.Subscribe(onNext, onCompleted) + +
+ Signature: (onNext:('T -> unit) * onCompleted:(unit -> unit)) -> IDisposable
+
+
+ + + + +

Subscribes to the Observable with a next and a completion callback.

+ + +

CompiledName: IObservable`1.Subscribe

+
+ + x.Subscribe(...) + +
+ Signature: (onNext:('T -> unit) * onError:(exn -> unit) * onCompleted:(unit -> unit)) -> IDisposable
+
+
+ + + + +

Subscribes to the Observable with all 3 callbacks.

+ + +

CompiledName: IObservable`1.Subscribe

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-schedule.html b/reference/fsharp-control-reactive-schedule.html new file mode 100644 index 0000000..0e98ec4 --- /dev/null +++ b/reference/fsharp-control-reactive-schedule.html @@ -0,0 +1,852 @@ + + + + + Schedule - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

Schedule

+

+ Namespace: FSharp.Control.Reactive
+

+
+

The Reactive module provides operators for working with IScheduler<_> in F#.

+ +
+ + + +

Functions and values

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Function or valueDescription
+ + action f sch + +
+ Signature: f:(unit -> unit) -> sch:IScheduler -> IDisposable
+
+
+ + + + +

Schedules an function to be executed.

+ + +
+ + actionAccOffsetRec state dueTime ff sch + +
+ Signature: state:'state -> dueTime:DateTimeOffset -> ff:('state -> ('state -> DateTimeOffset -> unit) -> unit) -> sch:IScheduler -> IDisposable
+ Type parameters: 'state
+
+ + + + +

Schedules an function to be executed recursively at a specified absolute due time.

+ + +
+ + actionAccRec state ff sch + +
+ Signature: state:'state -> ff:('state -> ('state -> unit) -> unit) -> sch:IScheduler -> IDisposable
+ Type parameters: 'state
+
+ + + + +

Schedules an function to be executed recursively.

+ + +
+ + actionAccSpanRec state dueTime ff sch + +
+ Signature: state:'state -> dueTime:TimeSpan -> ff:('state -> ('state -> TimeSpan -> unit) -> unit) -> sch:IScheduler -> IDisposable
+ Type parameters: 'state
+
+ + + + +

Schedules an function to be executed recursively after a specified relative due time.

+ + +
+ + actionLong f sch + +
+ Signature: f:(ICancelable -> unit) -> sch:ISchedulerLongRunning -> IDisposable
+
+
+ + + + +

Schedules an function to be executed.

+ + +
+ + actionLongState state f sch + +
+ Signature: state:'?8916 -> f:('?8916 -> ICancelable -> '?8917) -> sch:ISchedulerLongRunning -> IDisposable
+ Type parameters: '?8916, '?8917
+
+ + + + +

Schedules a long-running piece of work.

+ + +
+ + actionOffset offset f sch + +
+ Signature: offset:DateTimeOffset -> f:(unit -> unit) -> sch:IScheduler -> IDisposable
+
+
+ + + + +

Schedules an function to be executed at a specified absolute time.

+ + +
+ + actionOffsetRec dueTime ff sch + +
+ Signature: dueTime:DateTimeOffset -> ff:((unit -> unit) -> unit) -> sch:IScheduler -> IDisposable
+
+
+ + + + +

Schedules an function to be executed recursively at a specified absolute due time.

+ + +
+ + actionRec ff sch + +
+ Signature: ff:((unit -> unit) -> unit) -> sch:IScheduler -> IDisposable
+
+
+ + + + +

Schedules an function to be executed recursively.

+ + +
+ + actionSpanRec time ff sch + +
+ Signature: time:TimeSpan -> ff:(TimeSpan -> (TimeSpan -> unit) -> unit) -> sch:IScheduler -> IDisposable
+
+
+ + + + +

Schedules an function to be executed recursively.

+ + +
+ + asAsync(cta) + +
+ Signature: cta:SchedulerOperation -> Async<unit>
+
+
+ + + + + +
+ + asTask ct async + +
+ Signature: ct:CancellationToken -> async:Async<'T> -> Task<'T>
+ Type parameters: 'T
+
+ + + + + +
+ + async f sch + +
+ Signature: f:(IScheduler -> CancellationToken -> Async<'?8952>) -> sch:IScheduler -> IDisposable
+ Type parameters: '?8952
+
+ + + + +

Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style.

+ + +
+ + asyncAccOffsetResult state dueTime f sch + +
+ Signature: state:'state -> dueTime:DateTimeOffset -> f:(IScheduler -> 'state -> CancellationToken -> Async<IDisposable>) -> sch:IScheduler -> IDisposable
+ Type parameters: 'state
+
+ + + + +

Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style.

+ + +
+ + asyncAccOffsetUnit state dueTime f sch + +
+ Signature: state:'state -> dueTime:DateTimeOffset -> f:(IScheduler -> 'state -> CancellationToken -> Async<'?8972>) -> sch:IScheduler -> IDisposable
+ Type parameters: 'state, '?8972
+
+ + + + +

Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style.

+ + +
+ + asyncAccResult state f sch + +
+ Signature: state:'state -> f:(IScheduler -> 'state -> CancellationToken -> Async<IDisposable>) -> sch:IScheduler -> IDisposable
+ Type parameters: 'state
+
+ + + + +

Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style.

+ + +
+ + asyncAccSpanResult state dueTime f sch + +
+ Signature: state:'state -> dueTime:TimeSpan -> f:(IScheduler -> 'state -> CancellationToken -> Async<IDisposable>) -> sch:IScheduler -> IDisposable
+ Type parameters: 'state
+
+ + + + +

Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style.

+ + +
+ + asyncAccSpanUnit state dueTime f sch + +
+ Signature: state:'state -> dueTime:TimeSpan -> f:(IScheduler -> 'state -> CancellationToken -> Async<'?8967>) -> sch:IScheduler -> IDisposable
+ Type parameters: 'state, '?8967
+
+ + + + +

Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style.

+ + +
+ + asyncAccUnit state f sch + +
+ Signature: state:'state -> f:(IScheduler -> 'state -> CancellationToken -> Async<'?8956>) -> sch:IScheduler -> IDisposable
+ Type parameters: 'state, '?8956
+
+ + + + +

Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style.

+ + +
+ + asyncOffsetResult dueTime f sch + +
+ Signature: dueTime:DateTimeOffset -> f:(IScheduler -> CancellationToken -> Async<IDisposable>) -> sch:IScheduler -> IDisposable
+
+
+ + + + +

Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style.

+ + +
+ + asyncOffsetUnit dueTime f sch + +
+ Signature: dueTime:DateTimeOffset -> f:(IScheduler -> CancellationToken -> Async<'?8963>) -> sch:IScheduler -> IDisposable
+ Type parameters: '?8963
+
+ + + + +

Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style.

+ + +
+ + asyncResult f sch + +
+ Signature: f:(IScheduler -> CancellationToken -> Async<IDisposable>) -> sch:IScheduler -> IDisposable
+
+
+ + + + +

Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style.

+ + +
+ + asyncSpanResult dueTime f sch + +
+ Signature: dueTime:TimeSpan -> f:(IScheduler -> CancellationToken -> Async<IDisposable>) -> sch:IScheduler -> IDisposable
+
+
+ + + + +

Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style.

+ + +
+ + asyncSpanUnit dueTime f sch + +
+ Signature: dueTime:TimeSpan -> f:(IScheduler -> CancellationToken -> Async<'?8960>) -> sch:IScheduler -> IDisposable
+ Type parameters: '?8960
+
+ + + + +

Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style.

+ + +
+ + catch f sch + +
+ Signature: f:('?8941 -> bool) -> sch:IScheduler -> IScheduler
+ Type parameters: '?8941
+
+ + + + +

Returns a scheduler that wraps the original scheduler, adding exception handling for scheduled actions.

+ + +
+ + disableOptimizations(arg00) + +
+ Signature: arg00:IScheduler -> IScheduler
+
+
+ + + + +

Returns a scheduler that represents the original scheduler, without any of its interface-based optimizations (e.g. long running scheduling).

+ + +
+ + disableOptimizationsTypes(...) + +
+ Signature: optimizationInterfaces:Type list -> sch:IScheduler -> IScheduler
+
+
+ + + + +

Returns a scheduler that represents the original scheduler, without any of its interface-based optimizations (e.g. long running scheduling).

+ + +
+ + func state f sch + +
+ Signature: state:'?8919 -> f:(IScheduler -> '?8919 -> IDisposable) -> sch:IScheduler -> IDisposable
+ Type parameters: '?8919
+
+ + + + +

Schedules a function to be executed.

+ + +
+ + funcOffset state dueTime f sch + +
+ Signature: state:'?8923 -> dueTime:DateTimeOffset -> f:(IScheduler -> '?8923 -> IDisposable) -> sch:IScheduler -> IDisposable
+ Type parameters: '?8923
+
+ + + + +

Schedules a function to be executed at dueTime.

+ + +
+ + funcSpan state dueTime f sch + +
+ Signature: state:'?8921 -> dueTime:TimeSpan -> f:(IScheduler -> '?8921 -> IDisposable) -> sch:IScheduler -> IDisposable
+ Type parameters: '?8921
+
+ + + + +

Schedules a function to be executed after dueTime.

+ + +
+ + multiple fs sch + +
+ Signature: fs:(IScheduler -> IDisposable) list -> sch:IScheduler -> IDisposable
+
+
+ + + + +

Schedule multiple 'schedule' operations together

+ + +
+ + periodicAcc state period f sch + +
+ Signature: state:'?8934 -> period:TimeSpan -> f:('?8934 -> '?8934) -> sch:IScheduler -> IDisposable
+ Type parameters: '?8934
+
+ + + + +

Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. +If the scheduler supports periodic scheduling, the request will be forwarded to the periodic scheduling implementation. +If the scheduler provides stopwatch functionality, the periodic task will be emulated using recursive scheduling with a stopwatch to correct for time slippage. +Otherwise, the periodic task will be emulated using recursive scheduling.

+ + +
+ + periodicAccAction state period f sch + +
+ Signature: state:'?8936 -> period:TimeSpan -> f:('?8936 -> unit) -> sch:IScheduler -> IDisposable
+ Type parameters: '?8936
+
+ + + + +

Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. +If the scheduler supports periodic scheduling, the request will be forwarded to the periodic scheduling implementation. +If the scheduler provides stopwatch functionality, the periodic task will be emulated using recursive scheduling with a stopwatch to correct for time slippage. +Otherwise, the periodic task will be emulated using recursive scheduling.

+ + +
+ + periodicAction period f sch + +
+ Signature: period:TimeSpan -> f:(unit -> unit) -> sch:IScheduler -> IDisposable
+
+
+ + + + +

Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. +If the scheduler supports periodic scheduling, the request will be forwarded to the periodic scheduling implementation. +If the scheduler provides stopwatch functionality, the periodic task will be emulated using recursive scheduling with a stopwatch to correct for time slippage. +Otherwise, the periodic task will be emulated using recursive scheduling.

+ + +
+ + sleep dueTime sch + +
+ Signature: dueTime:TimeSpan -> sch:IScheduler -> Async<unit>
+
+
+ + + + +

Suspends execution of the current work item on the scheduler for the specified duration. +The caller should await the result of calling 'sleep' to schedule the remainder of the current work item (known as the continuation) after the specified duration.

+ + +
+ + sleepCancel dueTime ct sch + +
+ Signature: dueTime:TimeSpan -> ct:CancellationToken -> sch:IScheduler -> Async<unit>
+
+
+ + + + +

Suspends execution of the current work item on the scheduler for the specified duration. +The caller should await the result of calling 'sleep' to schedule the remainder of the current work item (known as the continuation) after the specified duration.

+ + +
+ + sleepOffset dueTime sch + +
+ Signature: dueTime:DateTimeOffset -> sch:IScheduler -> Async<unit>
+
+
+ + + + +

Suspends execution of the current work item on the scheduler for the specified duration. +The caller should await the result of calling 'sleep' to schedule the remainder of the current work item (known as the continuation) after the specified due time.

+ + +
+ + sleepOffsetCancel dueTime ct sch + +
+ Signature: dueTime:DateTimeOffset -> ct:CancellationToken -> sch:IScheduler -> Async<unit>
+
+
+ + + + +

Suspends execution of the current work item on the scheduler for the specified duration. +The caller should await the result of calling 'sleep' to schedule the remainder of the current work item (known as the continuation) after the specified due time.

+ + +
+ + yield_(x) + +
+ Signature: x:IScheduler -> Async<unit>
+
+
+ + + + +

Yields execution of the current work item on the scheduler to another work item on the scheduler. +The caller should await the result of calling 'yield' to schedule the remainder of the current work item (known as the continuation).

+ + +
+ + yieldCancel ct sch + +
+ Signature: ct:CancellationToken -> sch:IScheduler -> Async<unit>
+
+
+ + + + +

Yields execution of the current work item on the scheduler to another work item on the scheduler. +The caller should await the result of calling 'yield' to schedule the remainder of the current work item (known as the continuation).

+ + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-scheduler-scheduler.html b/reference/fsharp-control-reactive-scheduler-scheduler.html new file mode 100644 index 0000000..0a742bd --- /dev/null +++ b/reference/fsharp-control-reactive-scheduler-scheduler.html @@ -0,0 +1,144 @@ + + + + + Scheduler - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

Scheduler

+

+ + Namespace: FSharp.Control.Reactive
+ Parent Module: Scheduler
+

+
+
+

Constructors

+ + + + + + + + + + +
ConstructorDescription
+ + new() + +
+ Signature: unit -> Scheduler
+
+
+ + + + + +

CompiledName: .ctor

+
+

Static members

+ + + + + + + + + + + + + + +
Static memberDescription
+ + Scheduler.EventLoop + +
+ Signature: EventLoopScheduler
+
+
+ + + + +

Creates an object that schedules units of work on a designated thread.

+ + +

CompiledName: get_EventLoop

+
+ + Scheduler.Historical + +
+ Signature: HistoricalScheduler
+
+
+ + + + +

Creates a historical scheduler with a minimum value of DateTimeOffset as initial clock.

+ + +

CompiledName: get_Historical

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-scheduler.html b/reference/fsharp-control-reactive-scheduler.html new file mode 100644 index 0000000..5245c7e --- /dev/null +++ b/reference/fsharp-control-reactive-scheduler.html @@ -0,0 +1,117 @@ + + + + + Scheduler - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

Scheduler

+

+ Namespace: FSharp.Control.Reactive
+

+
+
+ + +

Nested types and modules

+
+ + + + + + + + + + +
TypeDescription
+ Scheduler + + +
+ +
+ +

Functions and values

+ + + + + + + + + + +
Function or valueDescription
+ + asLongRunning(sch) + +
+ Signature: sch:IScheduler -> ISchedulerLongRunning option
+
+
+ + + + +

Returns the 'ISchedulerLongRunning' implementation of the specified scheduler, or 'None' if no such implementation is available.

+ + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-subject-1.html b/reference/fsharp-control-reactive-subject-1.html new file mode 100644 index 0000000..52d5e45 --- /dev/null +++ b/reference/fsharp-control-reactive-subject-1.html @@ -0,0 +1,160 @@ + + + + + Subject<'a> - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

Subject<'a>

+

+ + Namespace: FSharp.Control.Reactive
+

+
+
+

Static members

+ + + + + + + + + + + + + + + + + + + + + + +
Static memberDescription
+ + Subject.async + +
+ Signature: AsyncSubject<'a>
+
+
+ + + + +

Represents the result of an asynchronous operation. +The last value before the OnCompleted notification, or the error received through OnError, is sent to all subscribed observers.

+ + +

CompiledName: get_async

+
+ + Subject.behavior(x) + +
+ Signature: x:'a -> BehaviorSubject<'a>
+
+
+ + + + +

Represents a value that changes over time. +Observers can subscribe to the subject to receive the last (or initial) value and all subsequent notifications.

+ + +
+ + Subject.broadcast + +
+ Signature: Subject<'a>
+
+
+ + + + +

Represents and object that is both an observable sequence as well as an observer. +Each notification is broadcasted to all subscribed observers.

+ + +

CompiledName: get_broadcast

+
+ + Subject.replay + +
+ Signature: ReplaySubject<'a>
+
+
+ + + + +

Represents an object that is both an observable sequence as well as an observer. +Each notification is broadcasted to all subscribed and future observers, subject to buffer trimming policies.

+ + +

CompiledName: get_replay

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-subjectmodule.html b/reference/fsharp-control-reactive-subjectmodule.html new file mode 100644 index 0000000..f5ff9bb --- /dev/null +++ b/reference/fsharp-control-reactive-subjectmodule.html @@ -0,0 +1,162 @@ + + + + + Subject - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

Subject

+

+ Namespace: FSharp.Control.Reactive
+ + Attributes:
+[<CompilationRepresentation(4)>]
+ +
+

+
+

The Reactive module provides operators working with Subjects in F#.

+ +
+ + + +

Functions and values

+ + + + + + + + + + + + + + + + + + + + + + +
Function or valueDescription
+ + onCompleted(s) + +
+ Signature: s:SubjectBase<'a> -> SubjectBase<'a>
+ Type parameters: 'a
+
+ + + + +

Notifies all subscribed observers about the end of the sequence.

+ + +
+ + onError ex s + +
+ Signature: ex:exn -> s:SubjectBase<'a> -> SubjectBase<'a>
+ Type parameters: 'a
+
+ + + + +

Notifies all subscribed observers about the specified exception.

+ + +
+ + onNext x s + +
+ Signature: x:'a -> s:SubjectBase<'a> -> SubjectBase<'a>
+ Type parameters: 'a
+
+ + + + +

Notifies all subscribed observers about the arrival of the specified element in the sequence.

+ + +
+ + onNexts xs s + +
+ Signature: xs:seq<'?8898> -> s:'?8899 -> '?8899
+ Type parameters: '?8898, '?8899
+
+ + + + +

Notifies all subscribed observers about the arrival of the specified elements in the sequence.

+ + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-testing-gentestnotification.html b/reference/fsharp-control-reactive-testing-gentestnotification.html new file mode 100644 index 0000000..8d20119 --- /dev/null +++ b/reference/fsharp-control-reactive-testing-gentestnotification.html @@ -0,0 +1,94 @@ + + + + + GenTestNotification - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

GenTestNotification

+

+ + Namespace: FSharp.Control.Reactive.Testing
+

+
+
+

Static members

+ + + + + + + + + + +
Static memberDescription
+ + GenTestNotification.GenNotifications() + +
+ Signature: unit -> Arbitrary<TestNotifications<'a>>
+ Type parameters: 'a
+
+ + + + + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-testing-marbles.html b/reference/fsharp-control-reactive-testing-marbles.html new file mode 100644 index 0000000..1d32128 --- /dev/null +++ b/reference/fsharp-control-reactive-testing-marbles.html @@ -0,0 +1,245 @@ + + + + + Marbles - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

Marbles

+

+ Namespace: FSharp.Control.Reactive.Testing
+

+
+

Reactive Marbles representation to make working with recorded test notifications like visualising the notifications as marbles.

+ +
+ + + +

Functions and values

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Function or valueDescription
+ + cold x sch + +
+ Signature: x:string -> sch:TestScheduler -> ITestableObservable<string>
+
+
+ + + + +

Creates from the given marble representation a Cold Observable +using the specified TestScheduler. +Note that the marble representation can't have a subscription marker (^), +only Hot Observables can have these.

+

Parameters

+
    +
  • x - Marble text representation. Example: --a---b--|.
  • +
  • sch - The given TestScheduler to use to create the Cold Observable.
  • +
+ + +
+ + expectMessages sch txt obs + +
+ Signature: sch:TestScheduler -> txt:string -> obs:IObservable<string> -> unit
+
+
+ + + + +

Verifies that the given marble representation is indeed the same as the observed messages found in the given test observer.

+ + +
+ + expectSubscription txt xs + +
+ Signature: txt:string -> xs:Subscription -> unit
+
+
+ + + + +

Verifies that the given marble representation is indeed the same as the subscription found in the given test observable sequence.

+ + +
+ + expectSubscriptions txt xs + +
+ Signature: txt:string list -> xs:Subscription list -> unit
+
+
+ + + + +

Verifies that the given marble representation is indeed the same as the subscriptions found in the given test observable sequence.

+ + +
+ + hot x sch + +
+ Signature: x:string -> sch:TestScheduler -> ITestableObservable<string>
+
+
+ + + + +

Creates from the given marble representation a Hot Observable +using the specified TestScheduler.

+

## Parameters +- x - Marble text represetantion. Example: --^-a---b--|. +- sch - The given TestScheduler to use to create the Hot Observable.

+ + +
+ + messages(txt) + +
+ Signature: txt:string -> TestNotifications<string>
+
+
+ + + + +

Creates from the given marble representation a TestNotifications<'a> model.

+ + +
+ + subscription + +
+ Signature: string -> Subscription
+
+
+ + + + +

Creates from the given marble representation a Subscription model.

+ + +
+ + subscriptions + +
+ Signature: string list -> Subscription list
+
+
+ + + + +

Creates from the given marble representation a Subscription list model.

+ + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-testing-testnotification-1.html b/reference/fsharp-control-reactive-testing-testnotification-1.html new file mode 100644 index 0000000..f2f46bf --- /dev/null +++ b/reference/fsharp-control-reactive-testing-testnotification-1.html @@ -0,0 +1,105 @@ + + + + + TestNotification<'a> - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

TestNotification<'a>

+

+ + Namespace: FSharp.Control.Reactive.Testing
+

+
+

Represents a recorded notification list to an observer.

+ +
+

Instance members

+ + + + + + + + + + + + + + +
Instance memberDescription
+ + x.Time + +
+ Signature: int64
+
+
+ +
+ + x.Value + +
+ Signature: Notification<'a>
+
+
+ +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-testing-testnotificationmodule.html b/reference/fsharp-control-reactive-testing-testnotificationmodule.html new file mode 100644 index 0000000..8e343ba --- /dev/null +++ b/reference/fsharp-control-reactive-testing-testnotificationmodule.html @@ -0,0 +1,418 @@ + + + + + TestNotification - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

TestNotification

+

+ Namespace: FSharp.Control.Reactive.Testing
+ + Attributes:
+[<CompilationRepresentation(4)>]
+ +
+

+
+

The Reactive module provides operators for working with TestObserver<_> in F#.

+ +
+ + + +

Functions and values

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Function or valueDescription
+ + errors(arg1) + +
+ Signature: TestNotifications<'b> -> exn list
+ Type parameters: 'b
+
+ + + + +

Filters the OnError recorded notifications of the specified list.

+ + +
+ + filter f arg2 + +
+ Signature: f:(TestNotification<'?9127> -> bool) -> TestNotifications<'?9127> -> TestNotifications<'?9127>
+ Type parameters: '?9127
+
+ + + + +

Filters the incoming TestNotifications on a given predicate function.

+ + +
+ + isError(_arg1) + +
+ Signature: _arg1:TestNotification<'?9121> -> bool
+ Type parameters: '?9121
+
+ + + + +

Determines if the incoming TestNotification is an 'OnError()' notification.

+ + +
+ + isNext(_arg1) + +
+ Signature: _arg1:TestNotification<'?9119> -> bool
+ Type parameters: '?9119
+
+ + + + +

Determines if the incoming TestNotification is an 'OnNext()' notification.

+ + +
+ + mapErrors(f) + +
+ Signature: f:(exn -> '?9146) -> TestNotifications<'?9147> -> '?9146 list
+ Type parameters: '?9146, '?9147
+
+ + + + +

Maps the OnError recorded notifications of the specified list to other values.

+ + +
+ + mapNexts(f) + +
+ Signature: f:('?9141 -> '?9142) -> TestNotifications<'?9141> -> '?9142 list
+ Type parameters: '?9141, '?9142
+
+ + + + +

Maps the OnNext recorded notification values of the specified list to other values.

+ + +
+ + nexts(arg1) + +
+ Signature: TestNotifications<'b> -> 'b list
+ Type parameters: 'b
+
+ + + + +

Filters the OnNexts recorded notifiation values of the specified list.

+ + +
+ + onCompleted(t) + +
+ Signature: t:int64 -> Recorded<Notification<'b>>
+ Type parameters: 'b
+
+ + + + +

Factory function for an OnCompleted notification record at a given time.

+ + +
+ + onError t ex + +
+ Signature: t:int64 -> ex:exn -> Recorded<Notification<'b>>
+ Type parameters: 'b
+
+ + + + +

Factory function for an OnError notification record at a given time with a given error.

+ + +
+ + onErrors(ms) + +
+ Signature: ms:TestNotifications<'?9131> -> TestNotifications<'?9131>
+ Type parameters: '?9131
+
+ + + + +

Filters the 'OnError()' recorded notifiations values of the specified list.

+ + +
+ + onNext t x + +
+ Signature: t:int64 -> x:'a -> Recorded<Notification<'a>>
+ Type parameters: 'a
+
+ + + + +

Factory function for an OnNext notification record at a given time with a given value.

+ + +
+ + onNexts(ms) + +
+ Signature: ms:TestNotifications<'?9129> -> TestNotifications<'?9129>
+ Type parameters: '?9129
+
+ + + + +

Filters the 'OnNext()' recorded notifiations of the specified list.

+ + +
+ + toOption(_arg1) + +
+ Signature: _arg1:TestNotification<'?9123> -> '?9123 option
+ Type parameters: '?9123
+
+ + + + +

Converts the incoming TestNotification to an Option with: +'OnNext()' notifications as Some and 'OnError()' and 'OnCompleted()' as None.

+ + +
+ + toResult(_arg1) + +
+ Signature: _arg1:TestNotification<'?9125> -> Result<'?9125,exn>
+ Type parameters: '?9125
+
+ + + + +

Converts the incoming TestNotification to an Result with: +'OnNext()' notifications as Some and 'OnError()' and 'OnCompleted()' as Error.

+ + +
+ + unwrap(arg1) + +
+ Signature: TestNotifications<'?9115> -> TestNotification<'?9115> list
+ Type parameters: '?9115
+
+ + + + +

Unwraps the 'TestNotifications' pattern into a 'TestNotification list'.

+ + +
+ + wrap(arg0) + +
+ Signature: arg0:TestNotification<'?9113> list -> TestNotifications<'?9113>
+ Type parameters: '?9113
+
+ + + + + +
+

Active patterns

+ + + + + + + + + + +
Active patternDescription
+ + ( |Next|Error|Completed| )(x) + +
+ Signature: x:TestNotification<'a> -> Choice<'a,exn,unit>
+ Type parameters: 'a
+
+ + + + +

Active pattern on the different kind of 'TestNotification''s (a.k.a. 'Recorded>').

+ + +

CompiledName: |Next|Error|Completed|

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-testing-testnotifications-1.html b/reference/fsharp-control-reactive-testing-testnotifications-1.html new file mode 100644 index 0000000..c457d63 --- /dev/null +++ b/reference/fsharp-control-reactive-testing-testnotifications-1.html @@ -0,0 +1,94 @@ + + + + + TestNotifications<'a> - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

TestNotifications<'a>

+

+ + Namespace: FSharp.Control.Reactive.Testing
+

+
+
+

Union Cases

+ + + + + + + + + + +
Union CaseDescription
+ + TestNotifications(...) + +
+ Signature: TestNotification<'a> list
+
+
+ + + + + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-testing-testobservable.html b/reference/fsharp-control-reactive-testing-testobservable.html new file mode 100644 index 0000000..101cd27 --- /dev/null +++ b/reference/fsharp-control-reactive-testing-testobservable.html @@ -0,0 +1,98 @@ + + + + + TestObservable - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

TestObservable

+

+ Namespace: FSharp.Control.Reactive.Testing
+

+
+
+ + + +

Functions and values

+ + + + + + + + + + +
Function or valueDescription
+ + subscriptions(o) + +
+ Signature: o:ITestableObservable<'a> -> Subscription list
+ Type parameters: 'a
+
+ + + + +

Gets a list of all the subscriptions to the observable sequence., including their lifetimes.

+ + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-testing-testobservermodule.html b/reference/fsharp-control-reactive-testing-testobservermodule.html new file mode 100644 index 0000000..d4af6ba --- /dev/null +++ b/reference/fsharp-control-reactive-testing-testobservermodule.html @@ -0,0 +1,170 @@ + + + + + TestObserver - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

TestObserver

+

+ Namespace: FSharp.Control.Reactive.Testing
+ + Attributes:
+[<CompilationRepresentation(4)>]
+ +
+

+
+

The Reactive module provides operators for working with TestObserver<_> in F#.

+ +
+ + + +

Functions and values

+ + + + + + + + + + + + + + + + + + + + + + +
Function or valueDescription
+ + all(o) + +
+ Signature: o:ITestableObserver<'a> -> TestNotifications<'a>
+ Type parameters: 'a + Attributes:
+[<Obsolete("Use 'messages' to get all the recored timestamped notifications")>]
+
+
+
+
+ WARNING: This API is obsolete +

Use 'messages' to get all the recored timestamped notifications

+
+ + + + +

Gets recorded timestamped notification messages received by the observer.

+ + +
+ + errors(o) + +
+ Signature: o:ITestableObserver<'a> -> exn list
+ Type parameters: 'a
+
+ + + + +

Gets recorded timestamped "OnError" notification messages received by the observer.

+ + +
+ + messages(o) + +
+ Signature: o:ITestableObserver<'a> -> TestNotifications<'a>
+ Type parameters: 'a
+
+ + + + +

Gets recorded timestamped notification messages received by the observer.

+ + +
+ + nexts(o) + +
+ Signature: o:ITestableObserver<'a> -> 'a list
+ Type parameters: 'a
+
+ + + + +

Gets recorded timestamped "OnNext" notification messages received by the observer.

+ + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-testing-testschedulemodule.html b/reference/fsharp-control-reactive-testing-testschedulemodule.html new file mode 100644 index 0000000..603f234 --- /dev/null +++ b/reference/fsharp-control-reactive-testing-testschedulemodule.html @@ -0,0 +1,322 @@ + + + + + TestSchedule - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

TestSchedule

+

+ Namespace: FSharp.Control.Reactive.Testing
+ + Attributes:
+[<CompilationRepresentation(4)>]
+ +
+

+
+

The Reactive module provides operators for working with TestScheduler in F#.

+ +
+ + + +

Functions and values

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Function or valueDescription
+ + advanceBy s time + +
+ Signature: s:TestScheduler -> time:int64 -> TestScheduler
+
+
+ + + + +

Advances the scheduler's clock by the specified relative time, running all work scheduled for that timespan.

+ + +
+ + advanceTo s time + +
+ Signature: s:TestScheduler -> time:int64 -> TestScheduler
+
+
+ + + + +

Advances the scheduler's clock to the specified time, running all work till that point.

+ + +
+ + coldObservable s arg2 + +
+ Signature: s:TestScheduler -> TestNotifications<'a> -> ITestableObservable<'a>
+ Type parameters: 'a
+
+ + + + +

Creates a cold observable using the specified timestamped notification messages.

+ + +
+ + createObserver(s) + +
+ Signature: s:TestScheduler -> ITestableObserver<'a>
+ Type parameters: 'a
+
+ + + + +

Creates an observer that records received notification messages and timestamps those.

+ + +
+ + hotObservable s arg2 + +
+ Signature: s:TestScheduler -> TestNotifications<'a> -> ITestableObservable<'a>
+ Type parameters: 'a
+
+ + + + +

Creates a hot observable using the specified timestamped notification messages.

+ + +
+ + schedule s state dueTime f + +
+ Signature: s:TestScheduler -> state:'?9090 -> dueTime:DateTimeOffset -> f:(IScheduler -> '?9090 -> IDisposable) -> IDisposable
+ Type parameters: '?9090 + Attributes:
+[<Obsolete("Use the 'Schedule' module for scheduling actions")>]
+
+
+
+
+ WARNING: This API is obsolete +

Use the 'Schedule' module for scheduling actions

+
+ + + + +

Schedules an action to be executed at dueTime

+ + +
+ + start(s) + +
+ Signature: s:TestScheduler -> TestScheduler
+
+
+ + + + +

Starts the virtual time scheduler.

+ + +
+ + startObservable s source + +
+ Signature: s:TestScheduler -> source:IObservable<'?9093> -> ITestableObserver<'?9093>
+ Type parameters: '?9093
+
+ + + + +

Starts the test scheduler and uses default virtual times to "ReactiveTest.Created", to "ReactiveTest.Subscribed", and to "ReactiveTest.Disposed".

+ + +
+ + subscribeBeforeAfter sch source f + +
+ Signature: sch:TestScheduler -> source:'?9099 -> f:('?9099 -> '?9101) -> ITestableObserver<'?9100> * ITestableObserver<'?9100>
+ Type parameters: '?9099, '?9100, '?9101
+
+ + + + +

Subscribes before and after and specified function to the observable with an observer that records received notification messasges and timestamps those.

+ + +
+ + subscribeTestObserver sch source + +
+ Signature: sch:TestScheduler -> source:IObservable<'?9095> -> ITestableObserver<'?9095>
+ Type parameters: '?9095
+
+ + + + +

Subscribes to the observable with an observer that records received notification messages and timestamps those.

+ + +
+ + subscribeTestObserverStart sch source + +
+ Signature: sch:TestScheduler -> source:IObservable<'a> -> ITestableObserver<'a>
+ Type parameters: 'a
+
+ + + + +

Subscribes (before starting) to the observable with an observer that records received notification messages and timestamps those.

+ + +
+ + usage(f) + +
+ Signature: f:(TestScheduler -> '?9080) -> '?9080
+ Type parameters: '?9080
+
+ + + + +

Virtual time scheduler used for testing applications and libraries built using Reactive Extensions.

+ + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-waithandle.html b/reference/fsharp-control-reactive-waithandle.html new file mode 100644 index 0000000..a835206 --- /dev/null +++ b/reference/fsharp-control-reactive-waithandle.html @@ -0,0 +1,97 @@ + + + + + WaitHandle - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

WaitHandle

+

+ + Namespace: FSharp.Control.Reactive
+

+
+
+

Static members

+ + + + + + + + + + +
Static memberDescription
+ + WaitHandle.Signal + +
+ Signature: ManualResetEvent
+
+
+ + + + +

Initializes a new instance of the ManualResetEvent class with initial state set to 'false'.

+ + +

CompiledName: get_Signal

+
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/fsharp-control-reactive-waithandlemodule.html b/reference/fsharp-control-reactive-waithandlemodule.html new file mode 100644 index 0000000..555f661 --- /dev/null +++ b/reference/fsharp-control-reactive-waithandlemodule.html @@ -0,0 +1,122 @@ + + + + + WaitHandle - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ + +

WaitHandle

+

+ Namespace: FSharp.Control.Reactive
+ + Attributes:
+[<CompilationRepresentation(4)>]
+ +
+

+
+
+ + + +

Functions and values

+ + + + + + + + + + + + + + +
Function or valueDescription
+ + flag(s) + +
+ Signature: s:EventWaitHandle -> unit
+
+
+ + + + +

Sets the state of the event to signaled, allowing one or more waiting threads to proceed.

+ + +
+ + wait(s) + +
+ Signature: s:WaitHandle -> unit
+
+
+ + + + +

Blocks the current thread until the WaitHandle receives a signal.

+ + +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/reference/index.html b/reference/index.html new file mode 100644 index 0000000..bc6ff5a --- /dev/null +++ b/reference/index.html @@ -0,0 +1,269 @@ + + + + + Namespaces - FSharp.Control.Reactive + + + + + + + + + + + + + + + +
+ +
+
+
+ +

FSharp.Control.Reactive

+ +

FSharp.Control.Reactive Namespace

+
+ + + + + + + + + + + + + + + + + + +
TypeDescription
+ Disposable + + +
+ Subject<'a> + + +
+ WaitHandle + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ModuleDescription
+ Builders + + +
+ Disposable + +

Operators to work on disposable types

+ + +
+ Disposables + + +
+ Observable + +

The Reactive module provides operators for working with IObservable<_> in F#.

+ + +
+ Schedule + +

The Reactive module provides operators for working with IScheduler<_> in F#.

+ + +
+ Scheduler + + +
+ Subject + +

The Reactive module provides operators working with Subjects in F#.

+ + +
+ WaitHandle + + +
+ +
+

FSharp.Control.Reactive.Testing Namespace

+
+ + + + + + + + + + + + + + + + + + +
TypeDescription
+ GenTestNotification + + +
+ TestNotification<'a> + +

Represents a recorded notification list to an observer.

+ + +
+ TestNotifications<'a> + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
ModuleDescription
+ Marbles + +

Reactive Marbles representation to make working with recorded test notifications like visualising the notifications as marbles.

+ + +
+ TestNotification + +

The Reactive module provides operators for working with TestObserver<_> in F#.

+ + +
+ TestObservable + + +
+ TestObserver + +

The Reactive module provides operators for working with TestObserver<_> in F#.

+ + +
+ TestSchedule + +

The Reactive module provides operators for working with TestScheduler in F#.

+ + +
+ +
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + + diff --git a/src/Directory.Build.props b/src/Directory.Build.props deleted file mode 100644 index e66f6ec..0000000 --- a/src/Directory.Build.props +++ /dev/null @@ -1,45 +0,0 @@ - - - - 6.1.0 - $(Version) - Ryan Riley;Steffen Forkmann;Jared Hester - A F#-friendly wrapper for the Reactive Extensions. - A F#-friendly wrapper for the Reactive Extensions. - LICENSE.txt - https://github.com/fsprojects/FSharp.Control.Reactive - README.md - logo.png - F#;FSharp;Reactive Extensions;Rx - https://github.com/fsprojects/FSharp.Control.Reactive - true - - true - - - true - - - true - - - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - true - snupkg - - - - - - - - - - - - - - @(ReleaseNoteLines, '%0a') - - - diff --git a/src/FSharp.Control.Reactive.Testing/FSharp.Control.Reactive.Testing.fsproj b/src/FSharp.Control.Reactive.Testing/FSharp.Control.Reactive.Testing.fsproj deleted file mode 100644 index 9e6fc98..0000000 --- a/src/FSharp.Control.Reactive.Testing/FSharp.Control.Reactive.Testing.fsproj +++ /dev/null @@ -1,18 +0,0 @@ - - - net6.0 - $(Version) - - - - - - - - - - - - - - diff --git a/src/FSharp.Control.Reactive.Testing/Marbles.fs b/src/FSharp.Control.Reactive.Testing/Marbles.fs deleted file mode 100644 index be4e92f..0000000 --- a/src/FSharp.Control.Reactive.Testing/Marbles.fs +++ /dev/null @@ -1,144 +0,0 @@ -namespace FSharp.Control.Reactive.Testing - -/// Reactive Marbles representation to make working with recorded test notifications like visualising the notifications as marbles. -module Marbles = - - open System - open Microsoft.Reactive.Testing - open FSharp.Control.Reactive.Testing - open FSharp.Control.Reactive.Testing.TestNotification - open FParsec - open Swensen.Unquote - - type private Token<'a> = - | Next of time:int64 * value:'a - | Error of time:int64 * ex:exn - | Done of time:int64 - - let private mapTime f = function - | Next (t, v) -> Next (f t, v) - | Error (t, ex) -> Error (f t, ex) - | Done t -> Done (f t) - - let private toNotifications xs = - List.fold (fun (time, ms) x -> - match x with - | Next (t, v) -> time + t, onNext (time + t) v - | Error (t, ex) -> time + t, onError (time + t) ex - | Done t -> time + t, onCompleted (time + t) - |> fun (t, n) -> t, n :: ms) (0L, []) xs - |> snd - |> List.rev - - type private Temperature = Hot | Cold - - let private frameMultiplier = 10L - - let private frsToTime xs = - List.map (fun _ -> frameMultiplier) xs - |> List.fold (+) 0L - - let private pframes = many (pchar '-') - - let private parseMarbles temp txt = - let txt = txt |> String.filter (fun c -> c <> ' ') - - let pvalueOne = noneOf [ '#'; '^'; '|'; '('; ')' ] - let pvalueMultiple = - between - (pchar '(') - (pchar ')') - (many1 pvalueOne |>> (Array.ofList >> String)) - - let pvaluewrap = (pvalueOne |>> string) <|> pvalueMultiple - let pframevalue = - pframes .>>. pvaluewrap - |>> fun (frs, x) -> Next (frsToTime frs, x) - - let pframeError = - pframes .>> pchar '#' - |>> fun frs -> Error (frsToTime frs, exn "error") - - let pemit = - attempt pframevalue - <|> attempt pframeError - - let pdone = - attempt (pframes .>> pchar '|' |>> (frsToTime >> Some)) - <|> (pframes |>> fun _ -> None) - - let pemitsdone = - many pemit .>>. pdone - |>> fun (cs, c) -> - match c with - | Some x -> cs @ [Done x] - | None -> cs - - let psub = - pframes .>> pchar '^' - |>> (frsToTime >> (+) frameMultiplier) - - let pemitssub = - (many pemit) .>> psub .>>. pemitsdone - |>> fun (xs, ys) -> - let xs = xs |> List.map (mapTime ((*) -1L)) - xs @ ys - - match temp with - | Hot -> attempt pemitssub <|> pemitsdone - | Cold -> pemitsdone - |> fun p -> run p txt - |> function - | Success (r, _, _) -> toNotifications r |> TestNotifications - | Failure (msg, _, _) -> failwith msg - - let private parseMarblesAsSubscription txt = - let txt = txt |> String.filter (fun c -> c <> ' ') - let psub = pframes .>> pchar '^' |>> frsToTime - let punsub = pframes .>> pchar '!' |>> (frsToTime >> (+) frameMultiplier) - let psubscriptions = psub .>>. punsub |>> fun (s, u) -> Subscription (s, s + u) - - match run psubscriptions txt with - | Success (r, _, _) -> r - | Failure (msg, _, _) -> failwith msg - - /// Creates from the given marble representation a Cold Observable - /// using the specified `TestScheduler`. - /// Note that the marble representation can't have a subscription marker (`^`), - /// only Hot Observables can have these. - /// - /// ## Parameters - /// - `x` - Marble text representation. Example: `--a---b--|`. - /// - `sch` - The given `TestScheduler` to use to create the Cold Observable. - let cold x sch = parseMarbles Cold x |> TestSchedule.coldObservable sch - - /// Creates from the given marble representation a Hot Observable - /// using the specified `TestScheduler`. - /// - /// ## Parameters - /// - `x` - Marble text represetantion. Example: `--^-a---b--|`. - ///- `sch` - The given `TestScheduler` to use to create the Hot Observable. - let hot x sch = parseMarbles Hot x |> TestSchedule.hotObservable sch - - /// Creates from the given marble representation a `TestNotifications<'a>` model. - let messages txt = - parseMarbles Cold txt - - /// Verifies that the given marble representation is indeed the same as the observed messages found in the given test observer. - let expectMessages sch txt obs = - TestSchedule.subscribeTestObserverStart sch obs - |> TestObserver.messages =! (parseMarbles Cold txt) - - /// Creates from the given marble representation a `Subscription` model. - let subscription = parseMarblesAsSubscription - - /// Creates from the given marble representation a `Subscription` list model. - let subscriptions = List.map parseMarblesAsSubscription - - /// Verifies that the given marble representation is indeed the same as the subscription found in the given test observable sequence. - let expectSubscription txt xs = - subscription txt |> (=!) xs - - /// Verifies that the given marble representation is indeed the same as the subscriptions found in the given test observable sequence. - let expectSubscriptions txt xs = - subscriptions txt |> (=!) xs \ No newline at end of file diff --git a/src/FSharp.Control.Reactive.Testing/TestNotifications.fs b/src/FSharp.Control.Reactive.Testing/TestNotifications.fs deleted file mode 100644 index 1494cea..0000000 --- a/src/FSharp.Control.Reactive.Testing/TestNotifications.fs +++ /dev/null @@ -1,110 +0,0 @@ -namespace FSharp.Control.Reactive.Testing - -open System.Reactive -open Microsoft.Reactive.Testing - -/// Represents a recorded notification list to an observer. -type TestNotification<'a> = Recorded> -type TestNotifications<'a> = TestNotifications of TestNotification<'a> list - -/// The Reactive module provides operators for working with TestObserver<_> in F#. -[] -module TestNotification = - open System - - let wrap = TestNotifications - - /// Unwraps the 'TestNotifications' pattern into a 'TestNotification list'. - let unwrap (TestNotifications xs) = xs - - /// Active pattern on the different kind of 'TestNotification''s (a.k.a. 'Recorded>'). - let (|Next|Error|Completed|) (x : TestNotification<'a>) = - match x.Value.Kind with - | NotificationKind.OnNext -> Next x.Value.Value - | NotificationKind.OnError -> Error x.Value.Exception - | NotificationKind.OnCompleted -> Completed - | _ -> Error (new ArgumentOutOfRangeException ("NotificationKind") :> exn) - - /// Determines if the incoming TestNotification is an 'OnNext()' notification. - let isNext = function Next _ -> true | _ -> false - - /// Determines if the incoming TestNotification is an 'OnError()' notification. - let isError = function Error _ -> true | _ -> false - - /// Converts the incoming TestNotification to an Option with: - /// 'OnNext()' notifications as Some and 'OnError()' and 'OnCompleted()' as None. - let toOption = function Next x -> Some x | _ -> None - - /// Converts the incoming TestNotification to an Result with: - /// 'OnNext()' notifications as Some and 'OnError()' and 'OnCompleted()' as Error. - let toResult = function - | Next x -> Result.Ok x - | Error ex -> Result.Error ex - | _ -> Result.Error (exn "'OnCompleted'") - - /// Filters the incoming TestNotifications on a given predicate function. - let filter f (TestNotifications ms) = List.filter f ms |> TestNotifications - - /// Filters the 'OnNext()' recorded notifiations of the specified list. - let onNexts ms = filter (isError >> not) ms - - /// Filters the 'OnError()' recorded notifiations values of the specified list. - let onErrors ms = filter (isNext >> not) ms - - /// Factory function for an OnNext notification record at a given time with a given value. - let onNext t (x : 'a) = ReactiveTest.OnNext (t, x) - - /// Factory function for an OnError notification record at a given time with a given error. - let onError t (ex : exn) = ReactiveTest.OnError (t, ex) - - /// Factory function for an OnCompleted notification record at a given time. - let onCompleted t = ReactiveTest.OnCompleted t - - /// Filters the OnNexts recorded notifiation values of the specified list. - let nexts (TestNotifications xs) = - List.choose (function | Next x -> Some x | _ -> None) xs - - /// Maps the OnNext recorded notification values of the specified list to other values. - let mapNexts f = (nexts >> List.map f) - - /// Filters the OnError recorded notifications of the specified list. - let errors (TestNotifications xs) = - List.choose (function | Error ex -> Some ex | _ -> None) xs - - /// Maps the OnError recorded notifications of the specified list to other values. - let mapErrors f = (errors >> List.map f) - -open FsCheck - -open TestNotification - -type GenTestNotification = - static member GenNotifications<'a> () = - let nexts_errors = - Gen.frequency [ - (1, Gen.constant (fun t _ -> onError t (new System.Exception ()))) - (2, Gen.constant onNext) ] - |> Gen.listOf - - let emits = - Gen.constant (fun h t -> h :: t) - <*> Gen.constant (fun t _ -> onCompleted t) - <*> nexts_errors - |> Gen.map List.rev - - let realisticMs = 100L - let growingNumbers l = - Arb.generate - |> Gen.map (fun (x, y) -> (abs x) + realisticMs, y) - |> Gen.listOfLength l - |> Gen.map (List.sortBy fst) - - let zipGrowingNumbers es = - growingNumbers (List.length es) - |> Gen.map (List.zip es) - - emits - >>= zipGrowingNumbers - |> Gen.map (List.map (fun (f, (x, y)) -> f x y) >> TestNotifications) - |> Arb.fromGen - diff --git a/src/FSharp.Control.Reactive.Testing/TestObservable.fs b/src/FSharp.Control.Reactive.Testing/TestObservable.fs deleted file mode 100644 index 924c465..0000000 --- a/src/FSharp.Control.Reactive.Testing/TestObservable.fs +++ /dev/null @@ -1,7 +0,0 @@ -module FSharp.Control.Reactive.Testing.TestObservable - -open Microsoft.Reactive.Testing - -/// Gets a list of all the subscriptions to the observable sequence., including their lifetimes. -let subscriptions (o : ITestableObservable<'a>) = - o.Subscriptions |> Seq.toList \ No newline at end of file diff --git a/src/FSharp.Control.Reactive.Testing/TestObserver.fs b/src/FSharp.Control.Reactive.Testing/TestObserver.fs deleted file mode 100644 index 8d68fc2..0000000 --- a/src/FSharp.Control.Reactive.Testing/TestObserver.fs +++ /dev/null @@ -1,24 +0,0 @@ -/// The Reactive module provides operators for working with TestObserver<_> in F#. -[] -module FSharp.Control.Reactive.Testing.TestObserver - -open System -open Microsoft.Reactive.Testing - -/// Gets recorded timestamped notification messages received by the observer. -[] -let all (o : ITestableObserver<'a>) = - o.Messages |> Seq.toList |> TestNotifications - -/// Gets recorded timestamped notification messages received by the observer. -let messages (o : ITestableObserver<'a>) = - o.Messages |> Seq.toList |> TestNotifications - -/// Gets recorded timestamped "OnNext" notification messages received by the observer. -let nexts (o : ITestableObserver<'a>) = - o.Messages |> Seq.toList |> TestNotifications |> TestNotification.nexts - -/// Gets recorded timestamped "OnError" notification messages received by the observer. -let errors (o : ITestableObserver<'a>) = - o.Messages |> Seq.toList |> TestNotifications |> TestNotification.errors - diff --git a/src/FSharp.Control.Reactive.Testing/TestSchedule.fs b/src/FSharp.Control.Reactive.Testing/TestSchedule.fs deleted file mode 100644 index 8b94e5b..0000000 --- a/src/FSharp.Control.Reactive.Testing/TestSchedule.fs +++ /dev/null @@ -1,61 +0,0 @@ -/// The Reactive module provides operators for working with TestScheduler in F#. -[] -module FSharp.Control.Reactive.Testing.TestSchedule - -open System -open FSharp.Control.Reactive -open Microsoft.Reactive.Testing - -/// Virtual time scheduler used for testing applications and libraries built using Reactive Extensions. -let usage f = - f <| TestScheduler () - -/// Creates a cold observable using the specified timestamped notification messages. -let coldObservable (s : TestScheduler) (TestNotifications ms) = - s.CreateColdObservable<'a> (ms |> List.toArray) - -/// Creates a hot observable using the specified timestamped notification messages. -let hotObservable (s : TestScheduler) (TestNotifications ms) = - s.CreateHotObservable (ms |> List.toArray) - -/// Advances the scheduler's clock by the specified relative time, running all work scheduled for that timespan. -let advanceBy (s : TestScheduler) time = - s.AdvanceBy time; s - -/// Advances the scheduler's clock to the specified time, running all work till that point. -let advanceTo (s : TestScheduler) time = - s.AdvanceTo time; s - -/// Creates an observer that records received notification messages and timestamps those. -let createObserver<'a> (s : TestScheduler) = - s.CreateObserver<'a> () - -/// Schedules an action to be executed at dueTime -[] -let schedule (s : TestScheduler) state (dueTime : DateTimeOffset) f = - s.Schedule (state, dueTime, fun x y -> f x y) - -/// Starts the virtual time scheduler. -let start (s : TestScheduler) = - s.Start (); s - -/// Starts the test scheduler and uses default virtual times to "ReactiveTest.Created", to "ReactiveTest.Subscribed", and to "ReactiveTest.Disposed". -let startObservable (s : TestScheduler) source = - s.Start (fun () -> source) - -/// Subscribes to the observable with an observer that records received notification messages and timestamps those. -let subscribeTestObserver (sch : TestScheduler) source = - let observer = sch.CreateObserver () - source |> Observable.subscribeObserver observer |> ignore - observer - -/// Subscribes (before starting) to the observable with an observer that records received notification messages and timestamps those. -let subscribeTestObserverStart sch source = - let observer = subscribeTestObserver sch source - sch.Start () - observer - -/// Subscribes before and after and specified function to the observable with an observer that records received notification messasges and timestamps those. -let subscribeBeforeAfter sch source f = - subscribeTestObserver sch source, - (f source |> ignore; subscribeTestObserver sch source) \ No newline at end of file diff --git a/src/FSharp.Control.Reactive.Testing/paket.references b/src/FSharp.Control.Reactive.Testing/paket.references deleted file mode 100644 index 0ab2123..0000000 --- a/src/FSharp.Control.Reactive.Testing/paket.references +++ /dev/null @@ -1,8 +0,0 @@ -FSharp.Core -System.Reactive -Microsoft.Reactive.Testing -FsCheck -fparsec -Unquote -GitVersion.MSBuild -Microsoft.SourceLink.GitHub \ No newline at end of file diff --git a/src/FSharp.Control.Reactive/Disposable.fs b/src/FSharp.Control.Reactive/Disposable.fs deleted file mode 100644 index 611c11d..0000000 --- a/src/FSharp.Control.Reactive/Disposable.fs +++ /dev/null @@ -1,89 +0,0 @@ -namespace FSharp.Control.Reactive - -open System -open System.Reactive.Disposables - -module Disposables = - - /// Returns an IDisposable that disposes all the underlying disposables - let compose (disposables: #seq) = - Disposable.Create(fun _ -> - disposables - |> Seq.iter(fun x -> x.Dispose())) - -type Disposable () = - - /// Creates a new composite disposable with no disposables contained initially. - static member Composite with get () = new CompositeDisposable () - - /// Represents a disposable resource whose underlying disposable resource can be replaced by another disposable resource, - /// causing automatic disposal of the previous underlying disposable resource. - static member Serial with get () = new SerialDisposable () - -[] -/// Operators to work on disposable types -module Disposable = - - /// Creates an disposable object that invokes the specified function when disposed. - let create f = Disposable.Create (Action f) - - /// An empty disposable which does nothing when disposed - let empty = Disposable.Empty - - /// Execute and action without the resource while the disposable is still 'active'. - /// The used resource will be disposed afterwards. - let ignoring f d = - use x = d - f () |> ignore - - /// Execute and action with the resource while the disposable is still 'active'. - /// The used resource will be disposed afterwards. - let using f d = - use x = d - f x - - /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - let dispose (x : IDisposable) = x.Dispose () - - /// Compose two disposables together so they are both disposed when disposed is called on the 'composite' disposable. - /// The expected usage is disposable1 |> compose disposable2, - // and disposable1 will be disposed before disposable2. - let compose (disposable2 : #IDisposable) (disposable1 : #IDisposable) : IDisposable = - // Do not replace Disposable.Create here - // with create. F# will convert the lambda to - // one which returns unit (null), eliminating - // the possibility of any tail-call - Disposable.Create (fun () -> - disposable1.Dispose() - disposable2.Dispose() - ) - - /// Uses the double-indirection pattern to assign the disposable returned by the specified disposableFactory - /// to the 'Disposable' property of the specified serial disposable. - let setIndirectly disposableFactory (d : SerialDisposable) = - let indirection = new SingleAssignmentDisposable () - d.Disposable <- indirection - indirection.Disposable <- disposableFactory () - - let setInnerDisposalOf (d : SerialDisposable) x = d.Disposable <- x - - /// Registers a disposable object into a composite disposable object - /// ensuring it's disposition when composite disposable object is disposed. - let inline disposeWith (d: CompositeDisposable) x = - d.Add x - -open System.Threading - -type WaitHandle = - - /// Initializes a new instance of the ManualResetEvent class with initial state set to 'false'. - static member Signal with get () = new ManualResetEvent (initialState=false) - -[] -module WaitHandle = - - /// Sets the state of the event to signaled, allowing one or more waiting threads to proceed. - let flag (s : EventWaitHandle) = s.Set () |> ignore - - /// Blocks the current thread until the WaitHandle receives a signal. - let wait (s : System.Threading.WaitHandle) = s.WaitOne () |> ignore \ No newline at end of file diff --git a/src/FSharp.Control.Reactive/FSharp.Control.Reactive.fsproj b/src/FSharp.Control.Reactive/FSharp.Control.Reactive.fsproj deleted file mode 100644 index 595f11c..0000000 --- a/src/FSharp.Control.Reactive/FSharp.Control.Reactive.fsproj +++ /dev/null @@ -1,22 +0,0 @@ - - - net472;netstandard2.0;net6.0 - $(Version) - - - - - link - true - - - - - - - - - - - - diff --git a/src/FSharp.Control.Reactive/Observable.fs b/src/FSharp.Control.Reactive/Observable.fs deleted file mode 100644 index 33d691f..0000000 --- a/src/FSharp.Control.Reactive/Observable.fs +++ /dev/null @@ -1,2658 +0,0 @@ -namespace FSharp.Control.Reactive - -open System -open System.Collections.Generic -open System.Threading -open System.Reactive -open System.Reactive.Linq -open System.Reactive.Concurrency -open System.Reactive.Disposables - - -[] -module Builders = - - /// An Observable computation builder. - type ObservableBuilder() = - member __.Bind(m: IObservable<_>, f: _ -> IObservable<_>) = m.SelectMany(f) - member __.Combine(comp1, comp2) = Observable.Concat(comp1, comp2) - member __.Delay(f: _ -> IObservable<_>) = Observable.Defer(fun _ -> f()) - member __.Zero() = Observable.Empty(Scheduler.CurrentThread :> IScheduler) - member __.For(sequence, body) = Observable.For(sequence, Func<_,_> body) - member __.TryWith(m: IObservable<_>, h: Exception -> IObservable<_>) = Observable.Catch(m, h) - member __.TryFinally(m, compensation) = Observable.Finally(m, Action compensation) - member __.Using(res: #IDisposable, body) = Observable.Using((fun () -> res), Func<_,_> body) - member __.While(guard, m: IObservable<_>) = Observable.While(Func<_> guard, m) - member __.Yield(x) = Observable.Return(x, Scheduler.CurrentThread) - member __.YieldFrom m : IObservable<_> = m - [] - member inline __.Return(x) = __.Yield(x) - [] - member inline __.ReturnFrom m = __.YieldFrom m - - let observe = ObservableBuilder() - - /// A reactive query builder. - /// See http://mnajder.blogspot.com/2011/09/when-reactive-framework-meets-f-30.html - type RxQueryBuilder() = - member __.For (s:IObservable<_>, body : _ -> IObservable<_>) = s.SelectMany(body) - [] - member __.Select (s:IObservable<_>, [] selector : _ -> _) = s.Select(selector) - [] - member __.Where (s:IObservable<_>, [] predicate : _ -> bool ) = s.Where(predicate) - [] - member __.TakeWhile (s:IObservable<_>, [] predicate : _ -> bool ) = s.TakeWhile(predicate) - [] - member __.Take (s:IObservable<_>, count: int) = s.Take(count) - [] - member __.SkipWhile (s:IObservable<_>, [] predicate : _ -> bool ) = s.SkipWhile(predicate) - [] - member __.Skip (s:IObservable<_>, count: int) = s.Skip(count) - member __.Zero () = Observable.Empty(Scheduler.CurrentThread :> IScheduler) - member __.Yield (value) = Observable.Return(value) - [] - member __.Count (s:IObservable<_>) = Observable.Count(s) - [] - member __.All (s:IObservable<_>, [] predicate : _ -> bool ) = s.All(new Func<_,bool>(predicate)) - [] - member __.Contains (s:IObservable<_>, key) = s.Contains(key) - [] - member __.Distinct (s:IObservable<_>) = s.Distinct() - [] - member __.ExactlyOne (s:IObservable<_>) = s.SingleAsync() - [] - member __.ExactlyOneOrDefault (s:IObservable<_>) = s.SingleOrDefaultAsync() - [] - member __.Find (s:IObservable<_>, [] predicate : _ -> bool) = s.FirstAsync(new Func<_,bool>(predicate)) - [] - member __.Head (s:IObservable<_>) = s.FirstAsync() - [] - member __.HeadOrDefault (s:IObservable<_>) = s.FirstOrDefaultAsync() - [] - member __.Last (s:IObservable<_>) = s.LastAsync() - [] - member __.LastOrDefault (s:IObservable<_>) = s.LastOrDefaultAsync() - [] - member __.MaxBy (s:IObservable<'a>, [] valueSelector : 'a -> 'b) = s.MaxBy(new Func<'a,'b>(valueSelector)) - [] - member __.MinBy (s:IObservable<'a>, [] valueSelector : 'a -> 'b) = s.MinBy(new Func<'a,'b>(valueSelector)) - [] - member __.Nth (s:IObservable<'a>, index ) = s.ElementAt(index) - [] - member inline __.SumBy (s:IObservable<_>,[] valueSelector : _ -> _) = s.Select(valueSelector).Aggregate(Unchecked.defaultof<_>, new Func<_,_,_>( fun a b -> a + b)) - [] - member __.GroupBy (s:IObservable<_>,[] keySelector : _ -> _) = s.GroupBy(new Func<_,_>(keySelector)) - [] - member __.GroupValBy (s:IObservable<_>,[] resultSelector : _ -> _,[] keySelector : _ -> _) = s.GroupBy(new Func<_,_>(keySelector),new Func<_,_>(resultSelector)) - [] - member __.Join (s1:IObservable<_>,s2:IObservable<_>, [] s1KeySelector : _ -> _,[] s2KeySelector : _ -> _,[] resultSelector : _ -> _) = s1.Join(s2,new Func<_,_>(s1KeySelector),new Func<_,_>(s2KeySelector),new Func<_,_,_>(resultSelector)) - [] - member __.GroupJoin (s1:IObservable<_>,s2:IObservable<_>, [] leftDurationSelector : _ -> _,[] rightDurationSelector : _ -> _,[] resultSelector : _ -> _) = s1.GroupJoin(s2,new Func<_,_>(leftDurationSelector),new Func<_,_>(rightDurationSelector),new Func<_,_,_>(resultSelector)) - [] - member __.Zip (s1:IObservable<_>,s2:IObservable<_>,[] resultSelector : _ -> _) = s1.Zip(s2,new Func<_,_,_>(resultSelector)) - //[] - //member __.ForkJoin (s1:IObservable<_>,s2:IObservable<_>,[] resultSelector : _ -> _) = s1.ForkJoin(s2,new Func<_,_,_>(resultSelector)) - [] - member __.Iter(s:IObservable<_>, [] selector : _ -> _) = s.Do(selector) - - let rxquery = RxQueryBuilder() - - -/// The Reactive module provides operators for working with IObservable<_> in F#. -[] -module Observable = - - type Observer with - /// Creates an observer from the specified onNext function. - static member Create(onNext) = - Observer.Create(Action<_> onNext) - - /// Creates an observer from the specified onNext and onError functions. - static member Create(onNext, onError) = - Observer.Create(Action<_> onNext, Action<_> onError) - - /// Creates an observer from the specified onNext and onCompleted functions. - static member Create(onNext, onCompleted) = - Observer.Create(Action<_> onNext, Action onCompleted) - - /// Creates an observer from the specified onNext, onError, and onCompleted functions. - static member Create(onNext, onError, onCompleted) = - Observer.Create(Action<_> onNext, Action<_> onError, Action onCompleted) - - /// Creates an observer that ignores the incoming emits from 'OnNext', 'OnError', and 'OnCompleted'. - static member Empty = - (fun () -> Observer.Create(Action<_> ignore, Action<_> ignore, Action (fun () -> ()))) () - - type Observable with - /// Creates an observable sequence from the specified Subscribe method implementation. - static member Create (subscribe: IObserver<'T> -> unit -> unit) = - let subscribe o = - let m = subscribe o - Action(m) - Observable.Create(subscribe) - - /// Creates an observable sequence from the specified asynchronous Subscribe method implementation. - static member CreateAsync (subscribe: IObserver<'T> -> Async) = - Observable.Create(subscribe >> Async.StartAsTask) - - type IObservable<'T> with - /// Subscribes to the Observable with just a next-function. - member this.Subscribe(onNext: 'T -> unit) = - this.Subscribe(Action<_> onNext) - - /// Subscribes to the Observable with a next and an error-function. - member this.Subscribe(onNext: 'T -> unit, onError: exn -> unit) = - this.Subscribe(Action<_> onNext, Action onError) - - /// Subscribes to the Observable with a next and a completion callback. - member this.Subscribe(onNext: 'T -> unit, onCompleted: unit -> unit) = - this.Subscribe(Action<_> onNext, Action onCompleted) - - /// Subscribes to the Observable with all 3 callbacks. - member this.Subscribe(onNext, onError, onCompleted) = - this.Subscribe(Action<_> onNext, Action<_> onError, Action onCompleted) - - -(*************************************************************** - * F# combinator wrappers for Rx extensions - ***************************************************************) - - - /// Applies an accumulator function over an observable sequence, returning the - /// result of the aggregation as a single element in the result sequence - let aggregate accumulator source = - Observable.Aggregate(source, Func<_,_,_> accumulator ) - - /// Determines whether all elements of an observable satisfy a predicate - let all pred source = - Observable.All(source, Func<_,_> pred ) - - - /// Returns the observable sequence that reacts first - let amb second first = Observable.Amb(first, second) - - - /// Propagates the observable sequence that reacts first - let ambSeq (source:seq>) = Observable.Amb( source ) - - - /// Propagates the observable sequence that reacts first - let ambArray (source:IObservable<'T>[]) = Observable.Amb( source ) - - - /// Determines whether an observable sequence contains any elements - let any (source:IObservable<'Source>) : IObservable = - Observable.Any(source) - - - /// Hides the identy of an observable sequence - let asObservable source : IObservable<'Source>= - Observable.AsObservable( source ) - - - /// Binds an observable to generate a subsequent observable. - let bind (f: 'T -> IObservable<'TNext>) (m: IObservable<'T>) = m.SelectMany(Func<_,_> f) - - - /// Lifts the values of f and m and applies f to m, returning an IObservable of the result. - let apply f m = f |> bind (fun f' -> m |> bind (fun m' -> Observable.Return(f' m'))) - - - /// Matches when both observable sequences have an available value - let both second first = Observable.And(first, second) - - // #region Buffers - - - let buffer (bufferClosingSelector:IObservable<'BufferClosing>) source = - Observable.Buffer(source, bufferClosingSelector) - - - /// Projects each element of an observable sequence into - /// consequtive non-overlapping buffers based on a sequence of boundary markers - let bufferBounded (boundaries:IObservable<'BufferClosing>) source : IObservable>= - Observable.Buffer(source, boundaries) - - - /// Projects each element of an observable sequence into - /// consequtive non-overlapping buffers produced based on count information - let bufferCount (count:int) source = - Observable.Buffer(source, count) - - - /// Projects each element of an observable sequence into zero or more buffers - /// which are produced based on element count information - let bufferCountSkip (count:int) (skip:int) source = - Observable.Buffer(source,count, skip) - - - /// Projects each element of an observable sequence into - /// consequtive non-overlapping buffers produced based on timing information - let bufferSpan (timeSpan:TimeSpan) source = - Observable.Buffer(source, timeSpan) - - - /// Projects each element of an observable sequence into consecutive non-overlapping buffers - /// which are produced based on timing information, using the specified scheduler to run timers. - let bufferSpanOn (scheduler:IScheduler) timeSpan source = - Observable.Buffer (source, timeSpan, scheduler) - - - /// Projects each element of an observable sequence into a buffer that goes - /// sent out when either it's full or a specific amount of time has elapsed - /// Analogy - A boat that departs when it's full or at its scheduled time to leave - let bufferSpanCount (timeSpan:TimeSpan) (count:int) source = - Observable.Buffer(source, timeSpan, count) - - - /// Projects each element of an observable sequence into a buffer that's sent out - /// when either it's full or a given amount of time has elapsed, using the specified scheduler to run timers. - /// Analogy - A ferry leaves the dock when all the seats are taken, or at the scheduled time or departure, - /// whichever event occurs first. - let bufferSpanCountOn (scheduler:IScheduler) (timeSpan:TimeSpan) (count:int) source = - Observable.Buffer(source, timeSpan, count, scheduler) - - - /// Projects each element of an observable sequence into zero of more buffers. - /// bufferOpenings - observable sequence whose elements denote the opening of each produced buffer - /// bufferClosing - observable sequence whose elements denote the closing of each produced buffer - let bufferFork ( bufferOpenings:IObservable<'BufferOpening>) - ( bufferClosingSelector: 'BufferOpening ->IObservable<'T> ) source = - Observable.Buffer( source, bufferOpenings,Func<_,_> bufferClosingSelector) - - - /// Projects each element of an observable sequence into - /// zero or more buffers produced based on timing information - let bufferSpanShift (timeSpan:TimeSpan) (timeShift:TimeSpan) source = - Observable.Buffer(source, timeSpan, timeShift) - - - /// Projects each element of an observable sequence into - /// zero or more buffers which are produced based on timing information, - /// using the specified scheduler to run timers. - let bufferSpanShiftOn (scheduler:IScheduler) (timeSpan:TimeSpan) (timeShift:TimeSpan) source = - Observable.Buffer(source, timeSpan, timeShift, scheduler) - - // #endregion - - - /// Converts the elements of the sequence to the specified type - let cast<'CastType> (source) = - Observable.Cast<'CastType>(source) - - - /// Uses selector to determine which source in sources to return, - /// choosing an empty sequence if no match is found - let case selector sources = - Observable.Case( Func<_> selector, sources ) - - - /// Uses selector to determine which source in sources to return, - /// choosing defaulSource if no match is found - let caseDefault selector (defaulSource:IObservable<'Result>) (sources:IDictionary<'Value,IObservable<'Result>>) = - Observable.Case( Func<'Value> selector, sources, defaulSource ) - - - /// Uses selector to determine which source in sources to return, - /// choosing an empty sequence on the specified scheduler if no match is found. - let caseOn (scheduler:IScheduler) selector sources = - Observable.Case (selector, sources, scheduler) - - /// Continues an observable sequence that is terminated - /// by an exception with the next observable sequence. - let catch (second: IObservable<'T>) first = - Observable.Catch(first, second) - - - /// Continues an observable sequence that is terminated by an exception - /// with an optional as result type. - let catchOption (source : IObservable<_>) = - let some = source.Select(Func<_, _> Some) - let none _ = Observable.Return None - Observable.Catch(some, none) - - - /// Continues an observable sequence that is terminated by an exception of - /// the specified type with the observable sequence produced by the handler, - /// wrapped in a 'Result' type. - let catchResult handler (source : IObservable<_>) = - let normal = source.Select(Func<_, _> Result.Ok) - let error ex = handler ex |> fun (o : IObservable<_>) -> o.Select(Func<_, _> Result.Error) - Observable.Catch(normal, error) - - - /// Continues an observable sequence that is terminated by an exception of - /// the specified type with the observable sequence produced by the handler. - let catchWith handler source = - Observable.Catch( source,Func<_,_> handler ) - - - /// Continues an observable sequence that is terminated by an exception with the next observable sequence. - let catchSeq (sources:seq>) = - Observable.Catch(sources) - - - /// Continues an observable sequence that is terminated by an exception with the next observable sequence. - let catchArray (sources:IObservable<'T>[]) = - Observable.Catch(sources) - - - /// Produces an enumerable sequence of consequtive (possibly empty) chunks of the source observable - let chunkify<'Source> source : seq> = - Observable.Chunkify<'Source>( source ) - - - /// Concatenates the observable sequences obtained by applying the map for each element in the given enumerable - let collect ( map )( source:seq<'Source> ) : IObservable<'Result> = - Observable.For( source, Func<'Source, IObservable<'Result>> map ) - - - - /// Produces an enumerable sequence that returns elements collected/aggregated from the source sequence between consecutive iterations. - /// merge - Merges a sequence element with the current collector - /// newCollector - Factory to create a new collector object. - let collectMerge newCollector merge source = - Observable.Collect( source, Func<_> newCollector,Func<_,_,_> merge ) - - - /// Produces an enumerable sequence that returns elements collected/aggregated from the source sequence between consecutive iterations. - /// merge - Merges a sequence element with the current collector - /// getNewCollector - Factory to replace the current collector by a new collector - /// getInitialCollector - Factory to create the initial collector object. - let collectMergeInit getInitialCollector merge getNewCollector source = - Observable.Collect( source , Func<_> getInitialCollector , - Func<_,_,_> merge, Func<_,_> getNewCollector ) - - // #region CombineLatest Functions - - - /// Merges the specified observable sequences into one observable sequence - /// whenever either of the observable sequences produces an element. - let combineLatest ( source1 : IObservable<'T1> ) ( source2 : IObservable<'T2> ) = - Observable.CombineLatest(source1, source2, fun t1 t2 -> (t1, t2) ) - - /// Merges the specified observable sequences into one observable sequence by - /// emmiting a list with the latest source elements of whenever any of the - /// observable sequences produces an element. - let combineLatestSeq (source :seq> ) : IObservable> = - Observable.CombineLatest( source ) - - - /// Merges the specified observable sequences into one observable sequence by applying the map - /// whenever any of the observable sequences produces an element. - let combineLatestArray (source :IObservable<'T>[] ) = - Observable.CombineLatest( source ) - - - /// Merges the specified observable sequences into one observable sequence by applying the map - /// whenever any of the observable sequences produces an element. - let combineLatestSeqMap ( map : IList<'T>-> 'Result ) ( source :seq> ) = - Observable.CombineLatest( source, Func,'Result> map ) - - - /// Concatenates the second observable sequence to the first observable sequence - /// upn the successful termination of the first - let concat (second: IObservable<'T>) (first: IObservable<'T>) = - Observable.Concat(first, second) - - - /// Concatenates all observable sequences within the sequence as long as - /// the previous observable sequence terminated successfully - let concatSeq (sources:seq>) : IObservable<'T> = - Observable.Concat(sources) - - - /// Concatenates all of the specified observable sequences as long as - /// the previous observable sequence terminated successfully - let concatArray (sources:IObservable<'T>[]) = - Observable.Concat(sources) - - - /// Concatenates all of the inner observable sequences as long as - /// the previous observable sequence terminated successfully - let concatInner (sources: IObservable>) = - Observable.Concat( sources ) - - - /// Concatenates all task results as long as - /// the previous taskterminated successfully - let concatTasks(sources: IObservable>) = - Observable.Concat( sources ) - - - /// Connects the observable wrapper to its source. All subscribed - /// observers will recieve values from the underlying observable - /// sequence as long as the connection is established. - /// ( publish an Observable to get a ConnectableObservable ) - let connect ( source:Subjects.IConnectableObservable<_> ) = - source.Connect() - - - /// Determines whether an observable sequence contains a specified - /// element by using the default equality comparer. - let contains value source = - Observable.Contains( source, value ) - - - /// Determines whether an observable sequence contains a - /// specified element by using a specified EqualityComparer - let containsCompare comparer value source = - Observable.Contains( source, value, comparer ) - - - /// Counts the elements - let count source = - Observable.Count(source) - - - /// Returns an observable sequence containing an int that represents how many elements - /// in the specified observable sequence satisfy a condition. - let countSatisfy predicate source = - Observable.Count( source, Func<_,_> predicate ) - - - /// Returns the elements of the specified sequence or the type parameter's default value - /// in a singleton sequence if the sequence is empty. - let defaultIfEmpty ( source:IObservable<'Source> ): IObservable<'Source> = - Observable.DefaultIfEmpty( source ) - - - /// Returns the elements of the specified sequence or the specified value in a singleton sequence if the sequence is empty. - let defaultIfEmptyIs (defaultValue:'Source )( source:IObservable<'Source> ) : IObservable<'Source> = - Observable.DefaultIfEmpty( source, defaultValue ) - - - /// Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes. - let defer ( observableFactory: unit -> IObservable<'Result> ): IObservable<'Result> = - Observable.Defer(Func> observableFactory ) - - - /// Time shifts the observable sequence by the specified relative time duration. - /// The relative time intervals between the values are preserved. - let delay ( dueTime:TimeSpan ) ( source:IObservable<'Source> ): IObservable<'Source>= - Observable.Delay(source, dueTime) - - /// Time shifts the observable sequence by the specified relative time duration, - /// using the specified scheduler to run timers. - /// The relative time intervals between the values are preserved. - let delayOn (scheduler:IScheduler) (dueTime:TimeSpan) source = - Observable.Delay(source, dueTime, scheduler) - - /// Time shifts the observable sequence to start propagating notifications at the specified absolute time. - /// The relative time intervals between the values are preserved. - let delayUntil ( source:IObservable<'Source> ) ( dueTime:DateTimeOffset ) : IObservable<'Source> = - Observable.Delay(source, dueTime ) - - /// Time shifts the observable sequence to start propagating notifications at the specified absolute time, - /// using the specified scheduler to run timers. - /// The relative time intervals between the values are preserved. - let delayUntilOn (scheduler:IScheduler) (dueTime:DateTimeOffset) source = - Observable.Delay(source, dueTime, scheduler) - - /// Time shifts the observable sequence based on a delay selector function for each element. - let delayMap ( delayDurationSelector:'Source -> IObservable<'TDelay> ) ( source:IObservable<'Source> ): IObservable<'Source> = - Observable.Delay( source, Func<'Source,IObservable<'TDelay>> delayDurationSelector) - - - /// Time shifts the observable sequence based on a subscription delay and a delay selector function for each element. - let delayMapFilter ( delayDurationSelector : 'Source -> IObservable<'TDelay>) - ( subscriptionDelay : IObservable<'TDelay>) - ( source:IObservable<'Source> ) : IObservable<'Source> = - Observable.Delay(source, subscriptionDelay, Func<'Source, IObservable<'TDelay>> delayDurationSelector) - - - /// Time shifts the observable sequence by delaying the subscription with the specified relative time duration. - let delaySubscription ( dueTime:TimeSpan) ( source:IObservable<'Source> ): IObservable<'Source> = - Observable.DelaySubscription( source, dueTime ) - - - /// Time shifts the observable sequence by delaying the subscription with the specified relative time duration, - /// using the specified scheduler to run timers. - let delaySubscriptionOn (scheduler:IScheduler) (dueTime:TimeSpan) source = - Observable.DelaySubscription(source, dueTime, scheduler) - - /// Time shifts the observable sequence by delaying the subscription to the specified absolute time. - let delaySubscriptionUntil ( dueTime:DateTimeOffset) ( source:IObservable<'Source> ) : IObservable<'Source> = - Observable.DelaySubscription( source, dueTime ) - - - /// Time shifts the observable sequence by delaying the subscription to the specified absolute time, - /// using the specified scheduler to run timers. - let delaySubscriptionUntilOn (scheduler:IScheduler) (dueTime:DateTimeOffset) source = - Observable.DelaySubscription(source, dueTime, scheduler) - - - /// Dematerializes the explicit notification values of an observable sequence as implicit notifications. - let dematerialize source = - Observable.Dematerialize(source) - - - /// Returns an observable sequence that only contains distinct elements - let distinct ( source:IObservable<'Source> ) : IObservable<'Source> = - Observable.Distinct( source ) - - - /// Returns an observable sequence that contains only distinct elements according to the keySelector. - let distinctKey ( keySelector:'Source -> 'Key )( source:IObservable<'Source> ) : IObservable<'Source> = - Observable.Distinct( source, Func<'Source,'Key> keySelector) - - - /// Returns an observable sequence that contains only distinct elements according to the comparer. - let distinctCompare ( comparer:IEqualityComparer<'Source> )( source:IObservable<'Source> ) : IObservable<'Source> = - Observable.Distinct( source, comparer ) - - - /// Returns an observable sequence that contains only distinct elements according to the keySelector and the comparer. - let distinctKeyCompare ( keySelector:'Source -> 'Key )( comparer:IEqualityComparer<'Key>)( source:IObservable<'Source> ) : IObservable<'Source> = - Observable.Distinct( source, Func<'Source,'Key> keySelector, comparer ) - - - /// Returns an observable sequence that only contains distinct contiguous elements - let distinctUntilChanged ( source:IObservable<'Source> ) : IObservable<'Source> = - Observable.DistinctUntilChanged(source) - - - /// Returns an observable sequence that contains only distinct contiguous elements according to the keySelector. - let distinctUntilChangedKey ( keySelector:'Source -> 'Key )( source:IObservable<'Source> ) : IObservable<'Source> = - Observable.DistinctUntilChanged( source, Func<'Source,'Key> keySelector ) - - - /// Returns an observable sequence that contains only distinct contiguous elements according to the comparer. - let distinctUntilChangedCompare ( comparer:IEqualityComparer<'Source> )( source:IObservable<'Source> ) : IObservable<'Source> = - Observable.DistinctUntilChanged( source, comparer ) - - - /// Returns an observable sequence that contains only distinct contiguous elements according to the keySelector and the comparer. - let distinctUntilChangedKeyCompare ( keySelector:'Source -> 'Key )( comparer:IEqualityComparer<'Key> )( source:IObservable<'Source> ) : IObservable<'Source> = - Observable.DistinctUntilChanged( source, Func<'Source,'Key> keySelector, comparer ) - - - /// Returns the element at a specified index in a sequence. - let elementAt ( index:int ) ( source:IObservable<'Source>): IObservable<'Source> = - Observable.ElementAt( source, index ) - - - /// Returns the element at a specified index in a sequence or a default value if the index is out of range - let elementAtOrDefault ( index:int )( source:IObservable<'Source> ) : IObservable<'Source> = - Observable.ElementAt( source, index ) - - /// Ignores all elements in an observable sequence leaving only the completed/error notifications - let ignoreElements source = - Observable.IgnoreElements (source) - - /// Returns an empty observable - let empty<'T> = Observable.Empty<'T>() - - - /// Returns an empty Observable sequence - let emptyWitness<'T>(witness:'T) :IObservable<'T> = - Observable.Empty( witness ) - - - /// Returns an empty sequence, using the specified scheduler to send out the single OnCompleted message. - let emptyCompleted (scheduler:IScheduler) = - Observable.Empty( scheduler ) - - - /// Returns an empty sequence, using the specified scheduler to send out the single OnCompleted message. - let emptyCompletedWitness scheduler witness = - Observable.Empty( scheduler, witness ) - - - /// Determines whether two sequences are equal by comparing the elements pairwise. - let equals ( first:IObservable<'Source> )( second:IObservable<'Source> ) : IObservable = - Observable.SequenceEqual( first, second ) - - - /// Determines whether two sequences are equal by comparing the elements pairwise using a specified equality comparer. - let equalsComparer ( comparer:IEqualityComparer<'Source>) ( first:IObservable<'Source> )( second:IObservable<'Source> ): IObservable = - Observable.SequenceEqual( first, second, comparer ) - - - /// Determines whether an observable and enumerable sequence are equal by comparing the elements pairwise. - let equalsSeq ( first:IObservable<'Source> )( second:seq<'Source>) : IObservable = - Observable.SequenceEqual( first, second ) - - - /// Determines whether an observable and enumerable sequence are equal by comparing the elements pairwise using a specified equality comparer. - let equalsSeqComparer ( comparer:IEqualityComparer<'Source> ) ( first:IObservable<'Source> )( second:seq<'Source> ) : IObservable = - Observable.SequenceEqual( first, second, comparer ) - - /// Immediately raises OnError on subscription - [] - let error e = Observable.Throw e - - - /// Determines whether an observable sequence contains a specified value - /// which satisfies the given predicate - let exists predicate source = - Observable.Any(source, Func<_,_> predicate) - - - /// Filters the observable elements of a sequence based on a predicate - let filter predicate (source: IObservable<'T>) = - Observable.Where( source, Func<_,_> predicate ) - - - /// Filters the observable elements of a sequence based on a predicate by - /// incorporating the element's index - let filteri predicate (source: IObservable<'T>) = - Observable.Where( source, Func<_,_,_> (fun i x -> predicate x i) ) - - - /// Invokes a specified action after the source observable sequence - /// terminates gracefully or exceptionally - let finallyDo finallyAction source = - Observable.Finally( source, Action finallyAction ) - - - /// Returns the first element of an observable sequence - let first (source:IObservable<'T>) = - source.FirstAsync() - - - /// Returns the first element of an observable sequence - /// if it satisfies the predicate - let firstIf predicate (source:IObservable<'T>) = - source.FirstAsync( Func<_,_> predicate ) - - - /// Projects each element of an observable sequence to an observable sequence - /// and merges the resulting observable sequences into one observable sequenc - let flatmap map source = - Observable.SelectMany(source, Func<'S,IObservable<'R>> map ) - - - /// Projects each element of an observable sequence to an observable sequence by incorporating the - /// element's index and merges the resulting observable sequences into one observable sequence. -// let flatmapi map source = -// Observable.SelectMany(source,Func<'Source,int,seq<'Result>> map ) -// - - /// Projects each element of the source observable sequence to the other observable sequence - /// and merges the resulting observable sequences into one observable sequence. - let flatmapOther ( other:IObservable<'Other> ) ( source:IObservable<'Source> ): IObservable<'Other> = - Observable.SelectMany( source, other ) - - - /// Projects each element of an observable sequence to an enumerable sequence and concatenates - /// the resulting enumerable sequences into one observable sequence. - let flatmapSeq map source = - Observable.SelectMany(source, Func<'Source,seq<'Result>> map) - - - /// Projects each element of an observable sequence to an enumerable sequence by incorporating the - /// element's index and concatenates the resulting enumerable sequences into one observable sequence. -// let flatmapSeqi map source = -// Observable.SelectMany(source, Func<'Source,int,seq<'Result>> map) -// -// - - /// Projects each element of an observable sequence to a task and merges all of the task results into one observable sequence. - let flatmapTask ( map ) ( source:IObservable<'Source> ) : IObservable<'Result> = - Observable.SelectMany( source, Func<'Source,Threading.Tasks.Task<'Result>> map ) - - ///Turns an F# async workflow into an observable - let ofAsync asyncOperation = - Observable.FromAsync - (fun (token : Threading.CancellationToken) -> Async.StartAsTask(asyncOperation, cancellationToken = token)) - - ///Helper function for turning async workflows into observables - let liftAsync asyncOperation = - asyncOperation >> ofAsync - - /// Projects each element of an observable sequence to a async workflow and merges all of the async worksflow results into one observable sequence. - let flatmapAsync asyncOperation (source : IObservable<'Source>) = - source.SelectMany(fun item -> liftAsync asyncOperation item) - - - /// Projects each element of an observable sequence to a task by incorporating the element's index - /// and merges all of the task results into one observable sequence. -// let flatmapTaski ( map ) ( source:IObservable<'Source> ) : IObservable<'Result> = -// Observable.SelectMany( source, Func<'Source,int,Threading.Tasks.Task<'Result>> map ) - - - /// Applies an accumulator function over an observable sequence, returning the - /// result of the fold as a single element in the result sequence - /// init is the initial accumulator value - let fold accumulator init source = - Observable.Aggregate(source, init, Func<_,_,_> accumulator) - - - /// Applies an accumulator function over an observable sequence, returning the - /// result of the fold as a single element in the result sequence - /// init is the initial accumulator value, map is performed after the fold - let foldMap accumulator init map source = - Observable.Aggregate(source, init,Func<_,_,_> accumulator,Func<_,_> map ) - - - /// Converts an Action-based .NET event to an observable sequence. Each event invocation is surfaced through an OnNext message in the resulting sequence. - /// For conversion of events conforming to the standard .NET event pattern, use any of the FromEventPattern overloads instead. - let fromEvent ( addHandler )( removeHandler ) : IObservable = - Observable.FromEvent( Action<'Delegate> addHandler, Action<'Delegate> removeHandler ) - - - /// Converts an Action-based .NET event to an observable sequence. Each event invocation is surfaced through an OnNext message in the resulting sequence. - /// For conversion of events conforming to the standard .NET event pattern, use any of the FromEventPattern overloads instead. - let fromEventOn scheduler addHandler removeHandler = - Observable.FromEvent(Action<_> addHandler, Action<_> removeHandler, scheduler) - - - /// Converts an generic Action-based .NET event to an observable sequence. Each event invocation is surfaced through an OnNext message in the resulting sequence. - /// For conversion of events conforming to the standard .NET event pattern, use any of the FromEventPattern overloads instead. - let fromEventGeneric addHandler removeHandler : IObservable<'TEventArgs> = - Observable.FromEvent(Action<'TEventArgs -> unit> addHandler, Action<'TEventArgs -> unit> removeHandler) - - - /// Converts an generic Action-based .NET event to an observable sequence. Each event invocation is surfaced through an OnNext message in the resulting sequence. - /// For conversion of events conforming to the standard .NET event pattern, use any of the FromEventPattern overloads instead. - let fromEventGenericOn scheduler addHandler removeHandler = - Observable.FromEvent(Action<#EventArgs -> unit> addHandler, Action<#EventArgs -> unit> removeHandler, scheduler) - - - /// Converts a .NET event to an observable sequence, using a conversion function to obtain the event delegate. - /// Each event invocation is surfaced through an OnNext message in the resulting sequence. - /// For conversion of events conforming to the standard .NET event pattern, use any of the FromEventPattern functions instead. - let fromEventConversion conversion addHandler removeHandler = - Observable.FromEvent( - conversion = Func, unit> (fun action -> conversion (fun args -> action.Invoke(args))), - addHandler = Action<_> addHandler, - removeHandler = Action<_> removeHandler - ) - - - - /// Converts a .NET event to an observable sequence, using a conversion function to obtain the event delegate, using a specified scheduler to run timers. - /// Each event invocation is surfaced through an OnNext message in the resulting sequence. - /// For conversion of events conforming to the standard .NET event pattern, use any of the FromEventPattern functions instead. - let fromEventConversionOn scheduler conversion addHandler removeHandler = - Observable.FromEventPattern - (Func, 'TDelegate> conversion, Action<'TDelegate> addHandler, Action<'TDelegate> removeHandler, scheduler) - - - /// Converts a .NET event to an observable sequence, using a supplied event delegate type. - /// Each event invocation is surfaced through an OnNext message in the resulting sequence. - let fromEventHandler addHandler removeHandler = - Observable.FromEventPattern<#EventArgs> ( - Action> addHandler, - Action> removeHandler) - - - /// Converts a .NET event to an observable sequence, using a supplied event delegate type on a specified scheduler. - /// Each event invocation is surfaced through an OnNext message in the resulting sequence. - let fromEventHandlerOn (scheduler:IScheduler) addHandler removeHandler = - Observable.FromEventPattern<#EventArgs> ( - Action> addHandler, - Action> removeHandler, - scheduler) - - - /// Generates an observable from an IEvent<_> as an EventPattern. - let fromEventPattern eventName (target:obj) = - Observable.FromEventPattern( target, eventName ) - - - - /// Generates an observable sequence by running a state-driven loop producing the sequence's elements. - let generate initialState condition iterator resultMap = - Observable.Generate( initialState, - Func<'State,bool> condition , - Func<'State,'State> iterator , - Func<'State,'Result> resultMap ) - - /// Generates an observable sequence by running a state-driven loop producing the sequence's elements. - let generateOn (scheduler:IScheduler) initialState condition iterator resultMap = - Observable.Generate( - initialState, - Func<'State, bool> condition, - Func<'State, 'State> iterator, - Func<'State, 'TResult> resultMap, - scheduler) - - - /// Generates an observable sequence by running a state-driven and temporal loop producing the sequence's elements. - let generateTimed( initialState:'State ) - ( condition ) - ( iterate ) - ( resultMap ) - ( timeSelector ) : IObservable<'Result> = - Observable.Generate( initialState , - Func<'State,bool> condition , - Func<'State,'State> iterate , - Func<'State,'Result> resultMap , - Func<'State,DateTimeOffset>timeSelector ) - - - /// Generates an observable sequence by running a state-driven and temporal loop producing the sequence's elements, - /// using a specified scheduler to run timers and to send out observer messages. - let generateTimedOn( scheduler ) - ( initialState:'State ) - ( condition ) - ( iterate ) - ( resultMap ) - ( timeSelector ) : IObservable<'Result> = - Observable.Generate( initialState , - Func<'State,bool> condition , - Func<'State,'State> iterate , - Func<'State,'Result> resultMap , - Func<'State,DateTimeOffset>timeSelector , - scheduler) - - /// Generates an observable sequence by running a state-driven and temporal loop producing the sequence's elements. - let generateTimeSpan ( initialState:'State )( condition )( iterate )( resultMap )( genTime ) : IObservable<'Result> = - Observable.Generate( initialState, Func<_,_> condition, Func<_,_> iterate, Func<'State,'Result> resultMap, Func<'State,TimeSpan> genTime ) - - - /// Generates an observable sequence by running a state-driven and temporal loop producing the sequence's elements, - /// using a specified scheduler to run timers and to send out observer messages. - let generateTimeSpanOn scheduler ( initialState:'State )( condition )( iterate )( resultMap )( genTime ) : IObservable<'Result> = - Observable.Generate( initialState, Func<_,_> condition, Func<_,_> iterate, Func<'State,'Result> resultMap, Func<'State,TimeSpan> genTime, scheduler ) - - /// Returns an enumerator that enumerates all values of the observable sequence. - let getEnumerator ( source ) : IEnumerator<_> = - Observable.GetEnumerator( source ) - - - /// Groups the elements of an observable sequence according to a specified key selector function. - let groupBy ( keySelector ) - ( source : IObservable<'Source> ) : IObservable> = - Observable.GroupBy( source,Func<'Source,'Key> keySelector ) - - - /// Groups the elements of an observable sequence with the specified initial - /// capacity according to a specified key selector function. -// let groupByCapacity ( keySelector ) -// ( capacity:int ) -// ( source:IObservable<'Source> ) : IObservable> = -// Observable.GroupBy( source, Func<'Source,'Key> keySelector, capacity) - - - /// Groups the elements of an observable sequence according to a specified key selector function and comparer. - let groupByCompare ( keySelector ) - ( comparer : IEqualityComparer<_> ) - ( source : IObservable<_> ) : IObservable> = - Observable.GroupBy( source, Func<_,_> keySelector, comparer ) - - - /// Groups the elements of an observable sequence and selects the resulting elements by using a specified function. - let groupByElement ( keySelector ) - ( elementSelector ) - ( source ) : IObservable> = - Observable.GroupBy( source, Func<'Source,'Key> keySelector, Func<'Source,'Element> elementSelector ) - - - /// Groups the elements of an observable sequence with the specified initial capacity - /// according to a specified key selector function and comparer. -// let groupByCapacityCompare -// ( keySelector ) -// ( capacity : int ) -// ( comparer : IEqualityComparer<'Key> ) -// ( source : IObservable<'Source> ) : IObservable> = -// Observable.GroupBy( source, Func<'Source,'Key> keySelector, capacity, comparer ) -// - - /// Groups the elements of an observable sequence with the specified initial capacity - /// and selects the resulting elements by using a specified function. - let groupByCapacityElement - ( keySelector ) - ( capacity : int ) - ( elementSelector ) - ( source : IObservable<'Source> ): IObservable> = - Observable.GroupBy( source, Func<'Source,'Key> keySelector, Func<'Source,'Element> elementSelector ) - - - /// Groups the elements of an observable sequence according to a specified key selector function - /// and comparer and selects the resulting elements by using a specified function. - let groupByCompareElement - ( keySelector ) - ( comparer : IEqualityComparer<'Key> ) - ( elementSelector ) - ( source : IObservable<'Source> ): IObservable> = - Observable.GroupBy( source,Func<'Source,'Key> keySelector, Func<'Source,'Element> elementSelector ) - - - - /// Groups the elements of an observable sequence with the specified initial capacity according to a - /// specified key selector function and comparer and selects the resulting elements by using a specified function. -// let groupByCapacityCompareElement -// ( keySelector ) -// ( capacity : int ) -// ( comparer : IEqualityComparer<'Key> ) -// ( elementSelector ) -// ( source : IObservable<'Source> ) : IObservable> = -// Observable.GroupBy( source, Func<'Source,'Key> keySelector, Func<'Source,'Element> elementSelector, capacity, comparer ) -// - - /// Groups the elements of an observable sequence according to a specified key selector function. - /// A duration selector function is used to control the lifetime of groups. When a group expires, - /// it receives an OnCompleted notification. When a new element with the same - /// key value as a reclaimed group occurs, the group will be reborn with a new lifetime request. - let groupByUntil( keySelector ) - ( durationSelector ) - ( source:IObservable<'Source> ) : IObservable> = - Observable.GroupByUntil( source, Func<'Source,'Key>keySelector,Func,IObservable<'TDuration>> durationSelector ) - - - /// Groups the elements of an observable sequence with the specified initial capacity according to a specified key selector function. - /// A duration selector function is used to control the lifetime of groups. When a group - /// expires, it receives an OnCompleted notification. When a new element with the same - /// key value as a reclaimed group occurs, the group will be reborn with a new lifetime request. -// let groupByCapacityUntil -// ( keySelector ) -// ( capacity : int ) -// ( durationSelector ) -// ( source : IObservable<'Source> ): IObservable> = -// Observable.GroupByUntil( source, Func<'Source,'Key> keySelector,Func,IObservable<'TDuration>> durationSelector, capacity) -// - - /// Groups the elements of an observable sequence according to a specified key selector function and comparer. - /// A duration selector function is used to control the lifetime of groups. When a group expires, - /// it receives an OnCompleted notification. When a new element with the same - /// key value as a reclaimed group occurs, the group will be reborn with a new lifetime request. - let groupByComparerUntil - ( keySelector) - ( comparer: IEqualityComparer<'Key> ) - ( durationSelector ) - ( source:IObservable<'Source> ) : IObservable> = - Observable.GroupByUntil( source, Func<'Source,'Key> keySelector, Func,IObservable<'TDuration>> durationSelector, comparer ) - - - /// Groups the elements of an observable sequence according to a specified key selector function - /// and selects the resulting elements by using a specified function. - /// A duration selector function is used to control the lifetime of groups. When a group expires, - /// it receives an OnCompleted notification. When a new element with the same - /// key value as a reclaimed group occurs, the group will be reborn with a new lifetime request. - let groupByElementUntil - ( keySelector ) - ( elementSelector ) - ( durationSelector) - ( source:IObservable<'Source> ): IObservable> = - Observable.GroupByUntil( source, Func<'Source,'Key> keySelector, Func<'Source,'Element>elementSelector, Func,IObservable<'TDuration>> durationSelector ) - - - /// Groups the elements of an observable sequence with the specified initial capacity according to a specified key selector function and comparer. - /// A duration selector function is used to control the lifetime of groups. When a group expires, it receives an OnCompleted notification. When a new element with the same - /// key value as a reclaimed group occurs, the group will be reborn with a new lifetime request. -// let groupByCapacityComparerUntil -// ( keySelector ) -// ( durationSelector ) -// ( capacity : int ) -// ( comparer : IEqualityComparer<'Key> ) -// ( source : IObservable<'Source> ) : IObservable> = -// Observable.GroupByUntil( source, -// Func<'Source,'Key> keySelector, -// Func,IObservable<'TDuration>> durationSelector, -// capacity, -// comparer ) - - - /// Groups the elements of an observable sequence with the specified initial capacity according to a specified key - /// selector function and selects the resulting elements by using a specified function. - /// A duration selector function is used to control the lifetime of groups. When a group - /// expires, it receives an OnCompleted notification. When a new element with the same - /// key value as a reclaimed group occurs, the group will be reborn with a new lifetime request. -// let groupByCapacityElementUntil -// ( keySelector ) -// ( capacity : int ) -// ( elementSelector ) -// ( durationSelector ) -// ( source : IObservable<'Source> ) : IObservable> = -// Observable.GroupByUntil( source, Func<'Source,'Key>keySelector, Func<'Source,'Element>elementSelector, Func,IObservable<'TDuration>> durationSelector, capacity ) - - - /// Groups the elements of an observable sequence according to a specified key selector function and - /// comparer and selects the resulting elements by using a specified function. - /// A duration selector function is used to control the lifetime of groups. When a group expires, - /// it receives an OnCompleted notification. When a new element with the same - /// key value as a reclaimed group occurs, the group will be reborn with a new lifetime request. - let groupByComparerElementUntil - ( keySelector ) - ( comparer:Collections.Generic.IEqualityComparer<'Key>) - ( elementSelector ) - ( durationSelector ) - ( source:IObservable<'Source> ) : IObservable> = - Observable.GroupByUntil( source, Func<'Source,'Key> keySelector, Func<'Source,'Element>elementSelector, Func,IObservable<'TDuration>>durationSelector, comparer ) - - - /// Groups the elements of an observable sequence with the specified initial capacity according to a specified - /// key selector function and comparer and selects the resulting elements by using a specified function. - /// A duration selector function is used to control the lifetime of groups. When a group expires, it receives - /// an OnCompleted notification. When a new element with the same - /// key value as a reclaimed group occurs, the group will be reborn with a new lifetime request. -// let groupByCapacityComparerElementUntil -// ( keySelector ) -// ( capacity:int ) -// ( comparer:IEqualityComparer<'Key>) -// ( elementSelector ) -// ( durationSelector ) -// ( source:IObservable<'Source> ) : IObservable> = -// Observable.GroupByUntil( source, Func<'Source,'Key>keySelector, Func<'Source,'Element>elementSelector, Func,IObservable<'TDuration>>durationSelector, capacity, comparer ) - - - /// Correlates the elements of two sequences based on overlapping - /// durations and groups the results - let groupJoin ( left : IObservable<'Left> ) - ( right : IObservable<'Right> ) - ( leftselect : 'Left -> IObservable<'a> ) - ( rightselect : 'Right-> IObservable<'b> ) - ( resultselect: 'Left -> IObservable<'Right>->'Result ) = - Observable.GroupJoin( left, right, - Func<'Left , IObservable<'a>> leftselect , - Func<'Right, IObservable<'b>> rightselect , - Func<'Left , IObservable<'Right>,'Result>resultselect) - - - /// Creates an observable that calls the specified function (each time) - /// after an observer is attached to the observable. This is useful to - /// make sure that events triggered by the function are handled. - let guard f (source:IObservable<'Args>) = - Observable.Create (fun observer -> - let disposable = source.Subscribe observer in f () - disposable - ) - - - /// Takes the first element of the observable sequence - let head obs = Observable.FirstAsync(obs) - - /// Returns an observable sequence that produces a value after each period - let interval period = - Observable.Interval( period ) - - /// Returns an observable sequence that produces a value on the specified scheduler after each period - let intervalOn (scheduler : IScheduler) period = - Observable.Interval( period, scheduler ) - - /// IsEmpty returns an Observable that emits true if and only if the - /// source Observable completes without emitting any items. - let isEmpty source = - Observable.IsEmpty source - - - /// Invokes an action for each element in the observable sequence, and propagates all observer - /// messages through the result sequence. This method can be used for debugging, logging, etc. of query - /// behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline. - let iter ( onNext ) ( source:IObservable<'Source> ): IObservable<'Source> = - Observable.Do( source, Action<'Source> onNext ) - - - /// Invokes an action for each element in the observable sequence and invokes an action - /// upon graceful termination of the observable sequence. This method can be used for debugging, - /// logging, etc. of query behavior by intercepting the message stream to run arbitrary - /// actions for messages on the pipeline. - let iterEnd ( onNext )( onCompleted ) ( source:IObservable<'Source> ): IObservable<'Source> = - Observable.Do( source, Action<'Source> onNext, Action onCompleted ) - - - /// Invokes an action for each element in the observable sequence and invokes an action upon - /// exceptional termination of the observable sequence. This method can be used for debugging, - /// logging, etc. of query behavior by intercepting the message stream to run arbitrary - /// actions for messages on the pipeline. - let iterError ( onNext)( onError ) ( source:IObservable<'Source> ): IObservable<'Source> = - Observable.Do( source, Action<'Source> onNext, Action onError ) - - - /// Invokes an action for each element in the observable sequence and invokes an action - /// upon graceful or exceptional termination of the observable sequence. - /// This method can be used for debugging, logging, etc. of query behavior by intercepting - /// the message stream to run arbitrary actions for messages on the pipeline. - let iterErrorEnd ( onNext )( onError ) ( onCompleted ) ( source:IObservable<'Source> ): IObservable<'Source> = - Observable.Do( source, Action<'Source> onNext, Action onError, Action onCompleted ) - - - /// Invokes the observer's methods for each message in the source sequence. - /// This method can be used for debugging, logging, etc. of query behavior by intercepting - /// the message stream to run arbitrary actions for messages on the pipeline. - let iterObserver ( observer:IObserver<'Source> ) ( source:IObservable<'Source> ): IObservable<'Source> = - Observable.Do( source,observer ) - - - /// Correlates the elements of two sequences based on overlapping durations. - let join right f left = - Observable.Join( left, right, Func<_, _> Observable.Return, Func<_, _> Observable.Return, Func<_, _, _> f ) - - - /// Correlates the elements of two sequences based on overlapping durations. - let joinMap right fLeft fRight fResult left = - Observable.Join( left, right, Func<_, _> fLeft, Func<_, _> fRight, Func<_, _, _> fResult ) - - - /// Joins together the results from several patterns - let joinWhen (plans:seq>): IObservable<'T> = - Observable.When( plans ) - - - /// Returns the last element of an observable sequence. - let last ( source:IObservable<'Source>) : IObservable<'Source> = - Observable.LastAsync( source ) - - - /// Returns the last element of an observable sequence that satisfies the condition in the predicate - let lastIf ( predicate ) ( source:IObservable<'Source> ) : IObservable<'Source> = - Observable.LastAsync( source, Func<'Source,bool> predicate ) - - - /// Returns an enumerable sequence whose enumeration returns the latest observed element in the source observable sequence. - /// Enumerators on the resulting sequence will never produce the same element repeatedly, - /// and will block until the next element becomes available. - let latest source = - Observable.Latest( source ) - - - /// Returns an observable sequence containing a int64 that represents - /// the total number of elements in an observable sequence - let longCount source = - Observable.LongCount(source) - - - /// Returns an observable sequence containing an int that represents how many elements - /// in the specified observable sequence satisfy a condition. - let longCountSatisfy predicate source = - Observable.LongCount(source, Func<_,_> predicate) - - - /// Maps the given observable with the given function - let map f source = Observable.Select(source, Func<_,_>(f)) - - - /// Maps the given observable with the given function and the - /// index of the element - let mapi (f:int -> 'Source -> 'Result) (source:IObservable<'Source>) = - Observable.Select (source, Func<_,_,_> (fun i x -> f x i)) - - - /// Maps two observables to the specified function. - let map2 f a b = apply (apply f a) b - - - /// Combines 'map' and 'fold'. Builds an observable whose emits are the result of applying the given function to each of the emits of the source observable. - /// The function is also used to accumulate a final value. - let mapFold (f : 'TState -> 'T -> 'TResult * 'TState) (init : 'TState) source = - Observable.Aggregate(source, ([], init), - Func<_, _, _> (fun (ys, state) x -> - let y, state = f state x - y :: ys, state)) - - - /// Maps every emission to a constant value. - let mapTo x (source : IObservable<'T>) = - Observable.Select (source, Func<_, _> (fun _ -> x)) - - - /// Maps every emission to a constant lazy value. - let mapToLazy (xLazy : Lazy<'T>) (source : IObservable<'T>) = - Observable.Select (source, Func<_, _> (fun _ -> xLazy.Force ())) - - - /// Materializes the implicit notifications of an observable sequence as - /// explicit notification values - let materialize source = - Observable.Materialize( source ) - - - - - - /// Merges the two observables - let merge (second: IObservable<'T>) (first: IObservable<'T>) = Observable.Merge(first, second) - - - /// Merges the two observables, using a specified scheduler for enumeration of and subscription to the sources. - let mergeOn (scheduler:IScheduler) (second:IObservable<'T>) (first:IObservable<'T>) = - Observable.Merge(first, second, scheduler) - - - /// Merges all the observable sequences into a single observable sequence. - let mergeArray (sources:IObservable<'T>[]) = - Observable.Merge(sources) - - - /// Merges all the observable sequences into a single observable sequence, - /// using a specified scheduler for enumeration of and subscription to the sources. - let mergeArrayOn (scheduler:IScheduler) (sources:IObservable<'T>[]) = - Observable.Merge(scheduler, sources) - - - /// Merges elements from all inner observable sequences - /// into a single observable sequence. - let mergeInner (sources:IObservable>) = - Observable.Merge(sources) - - - /// Merges elements from all inner observable sequences - /// into a single observable sequence limiting the number of concurrent - /// subscriptions to inner sequences - let mergeInnerMax (maxConcurrent:int) (sources:IObservable>) = - Observable.Merge(sources, maxConcurrent) - - - /// Merges an enumerable sequence of observable sequences into a single observable sequence. - let mergeSeq (sources:seq>) = - Observable.Merge(sources) - - - /// Merges an enumerable sequence of observable sequences into a single observable sequence, - /// using a specified scheduler for enumeration of and subscription to the sources. - let mergeSeqOn (scheduler:IScheduler) (sources:seq>) = - Observable.Merge(sources, scheduler) - - - /// Merges an enumerable sequence of observable sequences into an observable sequence, - /// limiting the number of concurrent subscriptions to inner sequences. - let mergeSeqMax (maxConcurrent:int)(sources:seq>) = - Observable.Merge(sources, maxConcurrent) - - - /// Merges an enumerable sequence of observable sequences into an observable sequence, - /// limiting the number of concurrent subscriptions to inner sequences, - /// using a specified scheduler for enumeration of and subscription to the sources. - let mergeSeqMaxOn (scheduler:IScheduler) (maxConcurrent:int) (sources:seq>) = - Observable.Merge(sources, maxConcurrent, scheduler) - - - /// Merge results from all source tasks into a single observable sequence - let mergeTasks (sources:IObservable>) = - Observable.Merge(sources) - - - /// Returns the maximum element in an observable sequence. - let maxOf (source:IObservable<'T>) = - Observable.Max( source ) - - - /// Returns an enumerable sequence whose sequence whose enumeration returns the - /// most recently observed element in the source observable sequence, using - /// the specified - let mostRecent initialVal source = - Observable.MostRecent( source, initialVal ) - - - /// Multicasts the source sequence notifications through the specified subject to - /// the resulting connectable observable. Upon connection of the connectable - /// observable, the subject is subscribed to the source exactly one, and messages - /// are forwarded to the observers registered with the connectable observable. - /// For specializations with fixed subject types, see Publish, PublishLast, and Replay. - let multicast subject source = - Observable.Multicast(source, subject) - - - /// Multicasts the source sequence notifications through an instantiated subject into - /// all uses of the sequence within a selector function. Each subscription to the - /// resulting sequence causes a separate multicast invocation, exposing the sequence - /// resulting from the selector function's invocation. For specializations with fixed - /// subject types, see Publish, PublishLast, and Replay. - let multicastMap subjectSelector selector source = - Observable.Multicast(source, Func<_> subjectSelector, Func<_,_> selector) - - - /// Returns a non-terminating observable sequence, which can - /// be used to denote an infinite duration (e.g. when using reactive joins). - let infinite() = - Observable.Never() - - - /// Returns a non-terminating observable sequence, which can be - /// used to denote an infinite duration (e.g. when using reactive joins). - let neverWitness( witness ) = - Observable.Never( witness ) - - - /// Returns an observable sequence whose enumeration blocks until the next - /// element in the source observable sequence becomes available. - /// Enumerators on the resulting sequence will block until the next - /// element becomes available. - let next source = - Observable.Next( source ) - - - /// Returns the sequence as an observable - let ofSeq<'Item>(source:'Item seq) : IObservable<'Item> = - Observable.ToObservable source - - - /// Returns the sequence as an observable, using the specified scheduler to run the enumeration loop - let ofSeqOn<'Item>(scheduler:Concurrency.IScheduler) (items:'Item seq) : IObservable<'Item> = - Observable.ToObservable (items, scheduler) - - - /// Wraps the source sequence in order to run its observer callbacks on the specified scheduler. - let observeOn (scheduler:Concurrency.IScheduler) source = - Observable.ObserveOn( source, scheduler ) - - - /// Wraps the source sequence in order to run its observer callbacks - /// on the specified synchronization context. - let observeOnContext (context:SynchronizationContext) source = - Observable.ObserveOn( source, context ) - - - /// Filters the elements of an observable sequence based on the specified type - let ofType source = - Observable.OfType( source ) - - - /// Concatenates the second observable sequence to the first observable sequence - /// upon successful or exceptional termination of the first. - let onErrorConcat ( second:IObservable<'Source> ) ( first:IObservable<'Source> ) : IObservable<'Source> = - Observable.OnErrorResumeNext( first, second ) - - - /// Concatenates all of the specified observable sequences, even if the previous observable sequence terminated exceptionally. - let onErrorConcatArray ( sources:IObservable<'Source> [] ) : IObservable<'Source> = - Observable.OnErrorResumeNext( sources ) - - - /// Concatenates all observable sequences in the given enumerable sequence, even if the - /// previous observable sequence terminated exceptionally. - let onErrorConcatSeq ( sources:seq> ) : IObservable<'Source> = - Observable.OnErrorResumeNext( sources ) - - - /// Iterates through the observable and performs the given side-effect - let perform f source = - let inner x = f x - Observable.Do(source, inner) - - /// Logs the incoming emits with a given prefix to a specified target. - let logTo prefix f source = - let onNext = Action<_> (fun x -> f (sprintf "%s - OnNext(%A)" prefix x)) - let onError = Action (fun ex -> - f (sprintf "%s - OnError:" prefix) - f (sprintf "\t %A" ex)) - let onCompleted = Action (fun () -> f (sprintf "%s - OnCompleted()" prefix)) - Observable.Do(source, onNext, onError, onCompleted) - - /// Logs the incoming emits with a given prefix to the console. - let log prefix source = - logTo prefix Console.WriteLine source - - - /// Invokes the finally action after source observable sequence terminates normally or by an exception. - let performFinally f source = Observable.Finally(source, Action f) - - - /// Returns a connectable observable sequence (IConnectableObsevable) that shares - /// a single subscription to the underlying sequence. This operator is a - /// specialization of Multicast using a regular Subject - let publish source = - Observable.Publish( source ) - - - /// Returns a connectable observable sequence (IConnectableObsevable) that shares - /// a single subscription to the underlying sequence and starts with the value - /// initial. This operator is a specialization of Multicast using a regular Subject - let publishInitial (initial:'Source) (source:IObservable<'Source>) = - Observable.Publish( source, initial ) - - - /// Returns an observable sequence that is the result of invoking - /// the selector on a connectable observable sequence that shares a - /// a single subscription to the underlying sequence. This operator is a - /// specialization of Multicast using a regular Subject - let publishMap ( map:IObservable<'Source> -> IObservable<'Result> ) - ( source :IObservable<'Source> ) = - Observable.Publish( source, Func,IObservable<'Result>> map ) - - - /// Returns an observable sequence that is the result of - /// the map on a connectable observable sequence that shares a - /// a single subscription to the underlying sequence. This operator is a - /// specialization of Multicast using a regular Subject - let publishInitialMap ( initial : 'Source ) - ( map: IObservable<'Source> -> IObservable<'Result> ) - ( source : IObservable<'Source> ) = - Observable.Publish( source, Func,IObservable<'Result>> map, initial ) - - - /// Returns an observable sequence that is the result of invoking - /// the selector on a connectable observable sequence containing - /// only the last notification This operator is a - /// specialization of Multicast using a regular Subject - let publishLast source = - Observable.PublishLast( source ) - - - /// Returns an observable sequence that is the result of invoking - /// the selector on a connectable observable sequence that shares a - /// a single subscription to the underlying sequence. This operator is a - /// specialization of Multicast using a regular Subject - let publishLastMap ( map: IObservable<'Source> -> IObservable<'Result> ) source = - Observable.PublishLast( source , Func,IObservable<'Result>> map ) - - - /// Creates a range as an observable - let range start count = Observable.Range(start, count) - - - /// Creates a range as an observable, using the specified scheduler to send out observer messages. - let rangeOn scheduler start count = Observable.Range(start, count, scheduler) - - - /// Reduces the observable - let reduce f source = Observable.Aggregate(source, Func<_,_,_> f) - - - /// Returns an observable that remains connected to the source as long - /// as there is at least one subscription to the observable sequence - /// ( publish an Observable to get a ConnectableObservable ) - let refCount ( source )= - Observable.RefCount ( source ) - - - /// Repeats the observable sequence indefinitely. - let repeat<'Source> ( source:IObservable<'Source> ) : IObservable<'Source> = - Observable.Repeat<'Source>( source ) - - - /// Repeats the observable sequence a specified number of times. - let repeatCount<'Result> ( repeatCount:int ) ( value:'Result ) : IObservable<'Result> = - Observable.Repeat( value, repeatCount ) - - - /// Generates an observable sequence that repeats the given element infinitely. - let repeatValue ( value:'Result ) : IObservable<'Result> = - Observable.Repeat<'Result>( value ) - - - /// Repeats the given observable sequence as long as the specified condition holds, where the - /// condition is evaluated after each repeated source is completed. - let repeatWhile ( condition)( source:IObservable<'Source> ) : IObservable<'Source> = - Observable.DoWhile( source, Func condition) - - - /// Returns a connectable observable sequence that shares a single subscription to the - /// underlying sequence replaying all notifications. - let replay ( source:IObservable<'Source>) : Subjects.IConnectableObservable<'Source> = - Observable.Replay( source ) - - /// Returns a connectable observable sequence that shares a single subscription to the - /// underlying sequence replaying all notifications. - let replayOn ( sch:IScheduler ) source = - Observable.Replay( source, sch ) - - /// Returns a connectable observable sequence that shares a single subscription to the underlying sequence - /// replaying notifications subject to a maximum element count for the replay buffer. - let replayBuffer ( bufferSize:int )( source:IObservable<'Source>) : Subjects.IConnectableObservable<'Source> = - Observable.Replay( source, bufferSize ) - - /// Returns a connectable observable sequence that shares a single subscription to the underlying sequence - /// replaying notifications subject to a maximum element count for the replay buffer and using the specified - /// scheduler to do the buffering on. - let replayBufferOn ( sch:IScheduler )( bufferSize:int )( source:IObservable<'Source>) : Subjects.IConnectableObservable<'Source> = - Observable.Replay( source, bufferSize, sch ) - - /// Returns an observable sequence that is the result of invoking the selector on a connectable observable - /// sequence that shares a single subscription to the underlying sequence replaying all notifications. - let replayMap ( map )( source:IObservable<'Source>) : IObservable<'Result> = - Observable.Replay( source, Func,IObservable<'Result>> map ) - - - /// Returns a connectable observable sequence that shares a single subscription to the underlying sequence - /// replaying notifications subject to a maximum time length for the replay buffer. - let replayWindow ( window:TimeSpan ) ( source:IObservable<'Source>): Subjects.IConnectableObservable<'Source> = - Observable.Replay( source, window ) - - /// Returns a connectable observable sequence that shares a single subscription to the underlying sequence - /// replaying notifications subject to a maximum time length for the replay buffer. - let replayWindowOn (scheduler:Concurrency.IScheduler) ( window:TimeSpan ) ( source:IObservable<'Source>): Subjects.IConnectableObservable<'Source> = - Observable.Replay( source, window, scheduler ) - - /// Returns a connectable observable sequence that shares a single subscription to the underlying sequence - // replaying notifications subject to a maximum time length and element count for the replay buffer. - let replayBufferWindow ( bufferSize:int )( window:TimeSpan )( source:IObservable<'Source>) : Subjects.IConnectableObservable<'Source> = - Observable.Replay( source, bufferSize, window ) - - /// Returns a connectable observable sequence that shares a single subscription to the underlying sequence - // replaying notifications subject to a maximum time length and element count for the replay buffer. - let replayBufferWindowOn (scheduler:Concurrency.IScheduler) ( bufferSize:int )( window:TimeSpan )( source:IObservable<'Source>) : Subjects.IConnectableObservable<'Source> = - Observable.Replay( source, bufferSize, window, scheduler ) - - /// Returns an observable sequence that is the result of apply a map to a connectable observable sequence that - /// shares a single subscription to the underlying sequence replaying notifications subject to - /// a maximum element count for the replay buffer. - let replayMapBuffer ( map ) ( bufferSize:int )( source:IObservable<'Source>) : IObservable<'Result> = - Observable.Replay( source, Func,IObservable<'Result>>map, bufferSize ) - - /// Returns an observable sequence that is the result of apply a map to a connectable observable sequence that - /// shares a single subscription to the underlying sequence replaying notifications subject to - /// a maximum time length. - let replayMapWindow ( map)( window:TimeSpan )( source:IObservable<'Source>) : IObservable<'Result> = - Observable.Replay( source,Func,IObservable<'Result>> map, window ) - - /// Returns an observable sequence that is the result of apply a map to a connectable observable sequence that - /// shares a single subscription to the underlying sequence replaying notifications subject to - /// a maximum time length. - let replayMapWindowOn (scheduler:Concurrency.IScheduler) ( map)( window:TimeSpan )( source:IObservable<'Source>) : IObservable<'Result> = - Observable.Replay( source,Func,IObservable<'Result>> map, window, scheduler ) - - /// Returns an observable sequence that is the result of apply a map to a connectable observable sequence that - /// shares a single subscription to the underlying sequence replaying notifications subject to - /// a maximum time length and element count for the replay buffer. - let replayMapBufferWindow ( map )( bufferSize:int ) ( window:TimeSpan ) ( source:IObservable<'Source>): IObservable<'Result> = - Observable.Replay( source, Func, IObservable<'Result>> map, bufferSize, window ) - - /// Returns an observable sequence that is the result of apply a map to a connectable observable sequence that - /// shares a single subscription to the underlying sequence replaying notifications subject to - /// a maximum time length and element count for the replay buffer. - let replayMapBufferWindowOn (scheduler:Concurrency.IScheduler) ( map )( bufferSize:int ) ( window:TimeSpan ) ( source:IObservable<'Source>): IObservable<'Result> = - Observable.Replay( source, Func, IObservable<'Result>> map, bufferSize, window, scheduler ) - - /// Repeats the source observable sequence until it successfully terminates. - let retry ( source:IObservable<'Source>) : IObservable<'Source> = - Observable.Retry( source ) - - - /// Repeats the source observable sequence the specified number of times or until it successfully terminates. - let retryCount (count:int) ( source:IObservable<'Source>) : IObservable<'Source> = - Observable.Retry( source, count ) - - /// Returns an observable which emits a single value - let result x : IObservable<_> = Observable.Return x - - /// Samples the observable at the given interval - let sample (interval: TimeSpan) source = - Observable.Sample(source, interval) - - - /// Samples the observable sequence at each interval, using the specified scheduler to run sampling timers. - /// Upon each sampling tick, the latest element (if any) in the source sequence during the - /// last sampling interval is sent to the resulting sequence. - let sampleOn scheduler interval source = - Observable.Sample(source, interval, scheduler) - - - /// Samples the source observable sequence using a samper observable sequence producing sampling ticks. - /// Upon each sampling tick, the latest element (if any) in the source sequence during the - /// last sampling interval is sent to the resulting sequence. - let sampleWith (sampler:IObservable<'Sample>) (source:IObservable<'Source>) : IObservable<'Source> = - Observable.Sample( source, sampler ) - - - /// Applies an accumulator function over an observable sequence and returns each intermediate result. - let scan (accumulator:'a->'a->'a) source = - Observable.Scan(source, Func<'a,'a,'a> accumulator ) - - - /// Applies an accumulator function over an observable sequence and returns each intermediate result. - /// The specified init value is used as the initial accumulator value. - let scanInit (init:'TAccumulate) (accumulator) (source:IObservable<'Source>) : IObservable<'TAccumulate> = - Observable.Scan( source, init, Func<'TAccumulate,'Source,'TAccumulate> accumulator ) - - - /// If the condition evaluates true, select the "thenSource" sequence. Otherwise, return an empty sequence. - let selectIf condition thenSource = - Observable.If( Func condition, thenSource ) - - - /// If the condition evaluates true, select the "thenSource" sequence. - /// Otherwise, return an empty sequence generated on the specified scheduler. - let selectIfOn (scheduler:IScheduler) condition thenSource = - Observable.If( Func condition, thenSource, scheduler) - - - /// If the condition evaluates true, select the "thenSource" sequence. Otherwise, select the else source - let selectIfElse condition ( elseSource : IObservable<'Result>) - ( thenSource : IObservable<'Result>) = - Observable.If( Func condition, thenSource, elseSource ) - - - /// Returns an observable sequence that contains a single element. - let single ( value:'Result) : IObservable<'Result> = - Observable.Return(value) - - /// Returns an observable sequence that contains a single element, - /// using a specified scheduler to send out observer messages. - let singleOn scheduler value = - Observable.Return(value, scheduler) - - /// Bypasses a specified number of elements in an observable sequence and then returns the remaining elements. - let skip (count:int) (source:IObservable<'Source>) : IObservable<'Source> = - Observable.Skip(source , count) - - - /// Skips elements for the specified duration from the start of the observable source sequence. - let skipSpan (duration:TimeSpan ) (source:IObservable<'Source> ): IObservable<'Source> = - Observable.Skip(source, duration) - - - /// Skips elements for the specified duration from the start of the observable source sequence, - /// using a specified scheduler to run timers. - let skipSpanOn (scheduler:IScheduler) duration source = - Observable.Skip(source, duration, scheduler) - - - /// Bypasses a specified number of elements at the end of an observable sequence. - let skipLast (count:int ) ( source:IObservable<'Source> ): IObservable<'Source> = - Observable.SkipLast (source, count ) - - - /// Skips elements for the specified duration from the end of the observable source sequence. - let skipLastSpan (duration:TimeSpan ) ( source:IObservable<'Source>) : IObservable<'Source> = - Observable.SkipLast ( source, duration) - - - /// Skips elements for the specified duration from the end of the observable source sequence, - /// using the specified scheduler to run timers. - let skipLastSpanOn (scheduler:IScheduler) duration source = - Observable.SkipLast(source, duration, scheduler) - - - /// Skips elements from the observable source sequence until the specified start time. - let skipUntil (startTime:DateTimeOffset ) ( source:IObservable<'Source> ) : IObservable<'Source> = - Observable.SkipUntil(source, startTime ) - - - /// Skips elements from the observable source sequence until the specified start time, - /// using the specified scheduler to run timers. - let skipUntilOn (scheduler:IScheduler) startTime source = - Observable.SkipUntil(source, startTime, scheduler) - - - /// Returns the elements from the source observable sequence only after the other observable sequence produces an element. - let skipUntilOther ( other:IObservable<'Other> ) ( source:IObservable<'Source> ): IObservable<'Source> = - Observable.SkipUntil(source, other ) - - - - /// Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. - let skipWhile ( predicate:'Source -> bool ) ( source:IObservable<'Source> ): IObservable<'Source> = - Observable.SkipWhile ( source, Func<'Source,bool> predicate ) - - - /// Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. - /// The element's index is used in the logic of the predicate functio - let skipWhilei ( predicate:'Source -> int -> bool)( source:IObservable<'Source> ) : IObservable<'Source> = - Observable.SkipWhile ( source, Func<'Source,int,bool> predicate) - - - /// Prepends a sequence of values to an observable sequence. - let startWith (values: #seq<'T>) (source: IObservable<'T>) : IObservable<'T> = - // TODO: re-evaluate wrapping the overload that takes a params array when params are supported by F#. - Observable.StartWith( source, values ) - - - /// Prepends a sequence of values to an observable sequence. - let startWithOn (scheduler:IScheduler) (values:#seq<'T>) source = - Observable.StartWith(source, scheduler, values) - - - /// Subscribes to the Observable with a next fuction. - let subscribe(onNext: 'T -> unit) (observable: IObservable<'T>) = - observable.Subscribe(Action<_> onNext) - - - /// Subscribes to the Observable with a next and an error-function. - let subscribeWithError ( onNext : 'T -> unit ) - ( onError : exn -> unit ) - ( observable : IObservable<'T> ) = - observable.Subscribe( Action<_> onNext, Action onError ) - - - /// Subscribes to the Observable with a next and a completion callback. - let subscribeWithCompletion (onNext: 'T -> unit) (onCompleted: unit -> unit) (observable: IObservable<'T>) = - observable.Subscribe(Action<_> onNext, Action onCompleted) - - - /// Subscribes to the observable with all three callbacks - let subscribeWithCallbacks onNext onError onCompleted (observable: IObservable<'T>) = - observable.Subscribe(Observer.Create(Action<_> onNext, Action<_> onError, Action onCompleted)) - - - /// Subscribes to the observable with the given observer - let subscribeObserver observer (observable: IObservable<'T>) = - observable.Subscribe observer - - - /// Wraps the source sequence in order to run its subscription and unsubscription logic - /// on the specified scheduler. This operation is not commonly used; This only performs - /// the side-effects of subscription and unsubscription on the specified scheduler. - /// In order to invoke observer callbacks on a scheduler, use 'observeOn' - let subscribeOn (scheduler:Reactive.Concurrency.IScheduler) (source:IObservable<'Source>) : IObservable<'Source> = - Observable.SubscribeOn( source, scheduler ) - - /// Wraps the source sequence in order to run its subscription and unsubscription logic - /// on the specified SynchronizationContext. This operation is not commonly used; This only performs - /// the side-effects of subscription and unsubscription on the specified scheduler. - /// In order to invoke observer callbacks on a scheduler, use 'observeOn' - let subscribeOnContext (context:Threading.SynchronizationContext) (source:IObservable<'Source>) : IObservable<'Source> = - Observable.SubscribeOn( source, context ) - - - /// Subscribes to the specified source, re-routing synchronous exceptions during invocation of the - /// Subscribe function to the observer's 'OnError channel. This function is typically used to write query operators. - let subscribeSafe onNext (source : IObservable<_>) = - source.SubscribeSafe (Observer.Create (Action<_> onNext, Action<_> ignore, Action ignore)) - - - /// Subscribes to the specified source, re-routing synchronous exceptions during invocation of the - /// Subscribe function to the observer's 'OnError channel. This function is typically used to write query operators. - let subscribeSafeWithError onNext onError (source : IObservable<_>) = - source.SubscribeSafe (Observer.Create (Action<_> onNext, Action<_> onError, Action ignore)) - - - /// Subscribes to the specified source, re-routing synchronous exceptions during invocation of the - /// Subscribe function to the observer's 'OnError channel. This function is typically used to write query operators. - let subscribeSafeWithCompletion onNext onCompleted (source : IObservable<_>) = - source.SubscribeSafe (Observer.Create (Action<_> onNext, Action<_> ignore, Action ignore)) - - - /// Subscribes to the specified source, re-routing synchronous exceptions during invocation of the - /// Subscribe function to the observer's 'OnError channel. This function is typically used to write query operators. - let subscribeSafeObserver observer (source : IObservable<_>) = - source.SubscribeSafe observer - - - /// Subscribes to the specified source, re-routing synchronous exceptions during invocation of the - /// Subscribe function to the observer's 'OnError channel. This function is typically used to write query operators. - let subscribeSafeWithCallbacks onNext onError onCompleted (source : IObservable<_>) = - source.SubscribeSafe (Observer.Create (Action<_> onNext, Action<_> onError, Action onCompleted)) - - - /// Transforms an observable sequence of observable sequences into an - /// observable sequence producing values only from the most recent - /// observable sequence.Each time a new inner observable sequnce is recieved, - /// unsubscribe from the previous inner sequence - let switch (sources:IObservable>) : IObservable<'Source>= - Observable.Switch(sources) - - - /// Transforms an observable sequence of tasks into an observable sequence - /// producing values only from the most recent observable sequence. - /// Each time a new task is received, the previous task's result is ignored. - let switchTask (sources: IObservable>) : IObservable<'Source> = - Observable.Switch( sources ) - - - /// Transforms an observable sequence of F# Asyncs into an observable sequence - /// producing values only from the most recent Async. - /// Each time a new Async is received, the previous Async is cancelled, - /// and will not continue to run in the background. - let switchAsync (sources:IObservable<_>) = - Observable.Switch(sources |> map ofAsync) - - - /// Synchronizes the observable sequence so that notifications cannot be delivered concurrently - /// this overload is useful to "fix" an observable sequence that exhibits concurrent - /// callbacks on individual observers, which is invalid behavior for the query processor - let synchronize source : IObservable<'Source>= - Observable.Synchronize( source ) - - - /// Synchronizes the observable sequence such that observer notifications - /// cannot be delivered concurrently, using the specified gate object.This - /// overload is useful when writing n-ary query operators, in order to prevent - /// concurrent callbacks from different sources by synchronizing on a common gate object. - let synchronizeGate (gate:obj) (source:IObservable<'Source>): IObservable<'Source> = - Observable.Synchronize( source, gate ) - - - /// Bypasses the first element in an observable sequence and then returns the remaining elements. - let tail source = skip 1 source - - - /// Takes n elements (from the beginning of an observable sequence? ) - let take (n: int) source : IObservable<'Source> = - Observable.Take(source, n) - - - /// Returns a specified number of contiguous elemenents from the start of an observable sequence, - /// using the specified scheduler for the edge case of take(0). - let takeOn (scheduler:IScheduler) (n:int) source = - Observable.Take( source, n, scheduler ) - - - /// Takes elements for a specified duration from the start of the observable source sequence. - let takeSpan (duration:TimeSpan) source = - Observable.Take( source, duration ) - - - /// Takes elements for a specified duration from the start of the observable source sequence, - /// using the specified scheduler to run timers. - let takeSpanOn (scheduler:IScheduler) (duration:TimeSpan) source = - Observable.Take( source, duration, scheduler ) - - - /// Returns a specified number of contiguous elements from the end of an obserable sequence - let takeLast ( count:int ) source = - Observable.TakeLast(source, count) - - - /// Returns a specified number of contiguous elements from the end of an obserable sequence, - /// using the specified scheduler to drain the queue. - let takeLastOn (scheduler:IScheduler) (count:int) source = - Observable.TakeLast( source, count, scheduler ) - - - /// Returns elements within the specified duration from the end of the observable source sequence. - let takeLastSpan ( duration:TimeSpan ) ( source:IObservable<'Source> ): IObservable<'Source> = - Observable.TakeLast( source, duration ) - - - /// Returns elements within the specified duration from the end of the observable source sequence, - /// using the specified scheduler to run timers. - let takeLastSpanOn (scheduler:IScheduler) (duration:TimeSpan) source = - Observable.TakeLast( source, duration, scheduler) - - - /// Returns a list with the elements within the specified duration from the end of the observable source sequence. - let takeLastBuffer ( duration:TimeSpan )( source:IObservable<'Source> ): IObservable> = - Observable.TakeLastBuffer( source, duration ) - - - /// Returns a list with the elements within the specified duration from the end of the observable source sequence, - /// using the specified scheduler to run timers. - let takeLastBufferOn (scheduler:IScheduler) duration source = - Observable.TakeLastBuffer( source, duration, scheduler ) - - - /// Returns a list with the specified number of contiguous elements from the end of an observable sequence. - let takeLastBufferCount ( count:int )( source:IObservable<'Source> ): IObservable> = - Observable.TakeLastBuffer( source, count ) - - - /// Returns the elements from the source observable sequence until the other produces and element - let takeUntilOther<'Other,'Source> other source = - Observable.TakeUntil<'Source,'Other>(source , other ) - -// - /// Returns the elements from the source observable until the specified time - let takeUntilTime<'Source> (endtime:DateTimeOffset) source = - Observable.TakeUntil<'Source>(source , endtime ) - - - /// Returns the elements from the source observable until the specified time, - /// using the specified scheduler to run timers. - let takeUntilTimeOn (scheduler:IScheduler) endtime source = - Observable.TakeUntil( source, endtime, scheduler ) - - - /// Returns elements from an observable sequence as long as a specified condition is true. - let takeWhile (predicate) ( source:IObservable<'Source>): IObservable<'Source> = - Observable.TakeWhile( source, Func<'Source,bool>predicate ) - - - /// Returns elements from an observable sequence as long as a specified condition is true. - /// The element's index is used in the logic of the predicate functi - let takeWhilei ( predicate) (source:IObservable<'Source>) : IObservable<'Source> = - Observable.TakeWhile( source, Func<'Source,int,bool> predicate ) - - - /// Ignores elements from an observable sequence which are followed by another element within a specified relative time duration. - let throttle (dueTime:TimeSpan) (source:IObservable<'Source>): IObservable<'Source> = - Observable.Throttle( source, dueTime ) - - /// Ignores elements from an observable sequence which are followed by another element within a specified relative time duration. - let throttleOn (scheduler : IScheduler) (dueTime:TimeSpan) (source:IObservable<'Source>): IObservable<'Source> = - Observable.Throttle( source, dueTime, scheduler ) - - /// Ignores elements from an observable sequence which are followed by another value within a computed throttle duration - let throttleComputed (throttleDurationSelector) ( source:IObservable<'Source>) : IObservable<'Source> = - Observable.Throttle( source, Func<'Source,IObservable<'Throttle>> throttleDurationSelector ) - - - /// Returns an observable sequence that terminates with an exception. - let throw ( except:exn ) : IObservable<'Result> = - Observable.Throw( except ) - - - /// Returns an observable sequence that terminates with an exception. - let throwWitness witness ex = - Observable.Throw( ex, witness=witness ) - - - /// Returns an observable sequence that terminates with an exception, - /// using the specified scheduler to send out the single OnError message. - let throwOn scheduler ex = - Observable.Throw( ex, scheduler=scheduler ) - - - /// Returns an observable sequence that terminates with an exception, - /// using the specified scheduler to send out the single OnError message. - let throwWitnessOn scheduler witeness ex = - Observable.Throw( ex, witeness, scheduler ) - - - /// matches when the observable sequence has an available element and - /// applies the map - let thenMap map source = - Observable.Then( source, Func<'Source,'Result> map ) - - - /// Records the time interval between consecutive elements in an observable sequence. - let timeInterval ( source:IObservable<'Source>) : IObservable> = - Observable.TimeInterval( source ) - - - /// Records the time interval between consecutive elements in an observable sequence, - /// using the specified scheduler to compute time intervals. - let timeIntervalOn scheduler source = - Observable.TimeInterval( source, scheduler) - - - /// Applies a timeout policy to the observable sequence based on an absolute time. - /// If the sequence doesn't terminate before the specified absolute due time, a TimeoutException is propagated to the observer. - let timeout ( timeout:System.DateTimeOffset ) ( source:IObservable<'Source>) = - Observable.Timeout( source, timeout) - - - /// Applies a timeout policy to the observable sequence based on an absolute time, using the specified scheduler to run timeout timers. - /// If the sequence doesn't terminate before the specified absolute due time, a TimeoutException is propagated to the observer. - let timeoutOn (scheduler:IScheduler) (timeout:DateTimeOffset) source = - Observable.Timeout( source, timeout, scheduler ) - - - /// Applies a timeout policy to the observable sequence based on an absolute time. - /// If the sequence doesn't terminate before the specified absolute due time, the other - /// observable sequence is used to produce future messages from that point on. - let timeoutOther ( timeout:System.DateTimeOffset ) ( other:IObservable<'Source>) ( source:IObservable<'Source>) = - Observable.Timeout( source, timeout, other) - - - /// Applies a timeout policy to the observable sequence based on an absolute time, - /// using the specified scheduler to run timeout timers. - /// If the sequence doesn't terminate before the specified absolute due time, the other - /// observable sequence is used to produce future messages from that point on. - let timeoutOtherOn (scheduler:IScheduler) (timeout:DateTimeOffset) other source = - Observable.Timeout( source, timeout, other, scheduler ) - - - /// Applies a timeout policy for each element in the observable sequence. - /// If the next element isn't received within the specified timeout duration starting from its - /// predecessor, a TimeoutException is propagated to the observer. - let timeoutSpan ( timeout:TimeSpan ) ( source:IObservable<'Source> ) = - Observable.Timeout( source, timeout) - - - /// Applies a timeout policy for each element in the observable sequence, using the specified scheduler to run timeout timers. - /// If the next element isn't received within the specified timeout duration starting from its - /// predecessor, a TimeoutException is propagated to the observer. - let timeoutSpanOn (scheduler:IScheduler) (timeout:TimeSpan) source = - Observable.Timeout( source, timeout, scheduler ) - - - /// Applies a timeout policy for each element in the observable sequence. - /// If the next element isn't received within the specified timeout duration starting from - /// its predecessor, the other observable sequence is used to produce future messages from that point on. - let timeoutSpanOther( timeout:TimeSpan ) ( other:IObservable<'Source> ) ( source:IObservable<'Source> ) = - Observable.Timeout( source, timeout, other) - - - /// Applies a timeout policy for each element in the observable sequence, using the specified scheduler to run timeout timers. - /// If the next element isn't received within the specified timeout duration starting from - /// its predecessor, the other observable sequence is used to produce future messages from that point on. - let timeoutSpanOtherOn (scheduler:IScheduler) (timeout:TimeSpan) other source = - Observable.Timeout( source, timeout, other, scheduler) - - - /// Applies a timeout policy to the observable sequence based on a timeout duration computed for each element. - /// If the next element isn't received within the computed duration starting from its predecessor, - /// a TimeoutException is propagated to the observer. - let timeoutDuration ( durationSelector )( source:IObservable<'Source> ) : IObservable<'Source> = - Observable.Timeout( source, Func<'Source,IObservable<'Timeout>> durationSelector ) - - - /// Applies a timeout policy to the observable sequence based on an initial timeout duration - /// for the first element, and a timeout duration computed for each subsequent element. - /// If the next element isn't received within the computed duration starting from its predecessor, - /// a TimeoutException is propagated to the observer. - let timeout2Duration ( timeout:IObservable<'Timeout> ) - ( durationSelector ) - ( source:IObservable<'Source> ) = - Observable.Timeout( source, timeout, Func<'Source, IObservable<'Timeout>> durationSelector) - - - - /// Applies a timeout policy to the observable sequence based on an initial timeout duration for the first - /// element, and a timeout duration computed for each subsequent element. - /// If the next element isn't received within the computed duration starting from its predecessor, - /// the other observable sequence is used to produce future messages from that point on. - let timeout2DurationOther ( timeout: IObservable<'Timeout>) - ( durationSelector ) - ( other : IObservable<'Source> ) - ( source : IObservable<'Source> ) = - Observable.Timeout( source, timeout, Func<'Source, IObservable<'Timeout>> durationSelector, other) - - -// #endregion - - - /// Returns an observable sequence that produces a single value at the specified absolute due time. - let timer ( dueTime:DateTimeOffset ) : IObservable = - Observable.Timer( dueTime ) - - - /// Returns an observable sequence that produces a single value at the specified absolute due time, - /// using the specified scheduler to run the timer. - let timerOn (scheduler:IScheduler) (dueTime:DateTimeOffset) = - Observable.Timer( dueTime, scheduler ) - - - /// Returns an observable sequence that periodically produces a value starting at the specified initial absolute due time. - let timerPeriod ( dueTime:DateTimeOffset) ( period:TimeSpan ) : IObservable = - Observable.Timer( dueTime, period) - - - /// Returns an observable sequence that produces a single value after the specified relative due time has elapsed. - let timerSpan ( dueTime:TimeSpan ) : IObservable = - Observable.Timer( dueTime ) - - - /// Returns an observable sequence that produces a single value after the specified relative due time has elapsed, - /// using the specified scheduler to run the timer. - let timerSpanOn (scheduler:IScheduler) (dueTime:TimeSpan) = - Observable.Timer( dueTime, scheduler) - - - /// Returns an observable sequence that periodically produces a value after the specified - /// initial relative due time has elapsed. - let timerSpanPeriod ( dueTime:TimeSpan, period:TimeSpan ) : IObservable = - Observable.Timer( dueTime, period) - - - /// Returns an observable sequence that periodically produces a value after the specified - /// initial relative due time has elapsed, using the specified scheduler to run the timer. - let timerSpanPeriodOn (scheduler:IScheduler) (dueTime:TimeSpan) (period:TimeSpan) = - Observable.Timer( dueTime, period, scheduler) - - - /// Timestamps each element in an observable sequence using the local system clock. - let timestamp ( source:IObservable<'Source> ) : IObservable> = - Observable.Timestamp( source ) - - /// Timestamps each element in an observable sequence using the supplied scheduler. - let timestampOn (scheduler : IScheduler) ( source:IObservable<'Source> ) : IObservable> = - Observable.Timestamp( source, scheduler ) - - /// Converts an observable into a seq - let toEnumerable (source: IObservable<'T>) = Observable.ToEnumerable(source) - /// Creates an array from an observable sequence - - - /// Creates an array from an observable sequence. - let toArray source = - Observable.ToArray(source) - - /// Creates an observable sequence according to a specified key selector function - let toDictionary keySelector source = - Observable.ToDictionary(source, Func<_,_> keySelector) - - - - /// Creates an observable sequence according to a specified key selector function - /// and an a comparer - let toDictionaryComparer (keySelector:'Source->'Key) (comparer:'Key) (source:'Source) = - Observable.ToDictionary( source, keySelector, comparer ) - - - /// Creates an observable sequence according to a specified key selector function - let toDictionaryElements (keySelector:'Source->'Key )(elementSelector:'Source->'Elm) (source:'Source) = - Observable.ToDictionary(source, keySelector, elementSelector) - - - /// Creates an observable sequence according to a specified key selector function - let toDictionaryCompareElements ( keySelector : 'Source -> 'Key ) - ( elementSelector: 'Source ->' Elm ) - ( comparer:'Key ) ( source:'Source ) = - Observable.ToDictionary( source , - Func<'Source,'Key> keySelector , - Func<'Source,'Elm> elementSelector , - comparer ) - - - /// Exposes an observable sequence as an object with an Action based .NET event - let toEvent (source:IObservable) = - Observable.ToEvent(source) - - - /// Exposes an observable sequence as an object with an Action<'Source> based .NET event. - let toEventType ( source:IObservable<'Source> ) : IEventSource<'Source> = - Observable.ToEvent(source) - - - /// Creates a list from an observable sequence - let toList source = - Observable.ToList(source) - - - /// Creates a lookup from an observable sequence according to a specified key selector function. - let toLookup ( keySelector )( source:IObservable<'Source> ) : IObservable> = - Observable.ToLookup( source, Func<'Source,'Key> keySelector ) - - - /// Creates a lookup from an observable sequence according to a specified key selector function, and a comparer. - let toLookupCompare ( keySelector ) ( comparer:IEqualityComparer<'Key> )( source:IObservable<'Source> ) : IObservable> = - Observable.ToLookup( source,Func<'Source,'Key> keySelector, comparer) - - - /// Creates a lookup from an observable sequence according to a specified key selector function, and an element selector function. - let toLookupElement ( keySelector ) ( elementSelector ) ( comparer:IEqualityComparer<'Key>)( source:IObservable<'Source> ) : IObservable>= - Observable.ToLookup( source, Func<'Source,'Key> keySelector, Func<'Source,'Element> elementSelector, comparer ) - - - /// Creates a lookup from an observable sequence according to a specified key selector function, and an element selector function. - let toLookupCompareElement ( keySelector ) ( elementSelector )( source:IObservable<'Source> ) : IObservable> = - Observable.ToLookup( source,Func<'Source,'Key> keySelector, Func<'Source,'Element> elementSelector ) - - - /// Converts a seq into an observable - let toObservable ( source: seq<'T> ) = Observable.ToObservable(source) - - - /// Constructs an observable sequence that depends on a resource object, whose - /// lifetime is tied to the resulting observable sequence's lifetime. - let using ( resourceFactory: unit ->'TResource ) (observableFactory: 'TResource -> IObservable<'Result> ) : IObservable<'Result> = - Observable.Using ( Func<_> resourceFactory, Func<_,_> observableFactory ) - - - /// Constructs an observable sequence that depends on a resource object, whose - /// lifetime is tied to the resulting observable sequence's lifetime. - /// The resource is obtained and used through asynchronous functions. - /// The cancellation token passed to the asyncrhonous functions is tied to the returned disposable subscription, - /// allowing best-effor cancellation at any stage of the resource acquisition or usage. - let usingAsync resourceFactory observableFactory = - Observable.Using ( Func<_, _> (resourceFactory >> Async.StartAsTask), Func< _, _, _> (fun d ct -> observableFactory d ct |> Async.StartAsTask)) - - - /// waits for the observable sequence to complete and returns the last - /// element of the sequence. If the sequence terminates with OnError - /// notification, the exception is thrown - let wait source = - Observable.Wait( source ) - - - /// Repeats the given function as long as the specified condition holds - /// where the condition is evaluated before each repeated source is - /// subscribed to - let whileLoop condition source = - Observable.While( Func condition, source ) - - - /// Projects each element of an observable sequence into consecutive non-overlapping windows. - /// windowClosingSelector - A function invoked to define the boundaries of the produced windows. - /// A new window is started when the previous one is closed - let window ( windowClosingSelector ) ( source:IObservable<'Source> ) : IObservable> = - Observable.Window( source, Func> windowClosingSelector) - - - /// Projects each element of an observable sequence into consecutive non-overlapping windows - /// which are produced based on timing information. - let windowTimeSpan ( timeSpan:TimeSpan )( source:IObservable<'Source> ) : IObservable> = - Observable.Window( source, timeSpan ) - - - /// Projects each element of an observable sequence into consecutive non-overlapping windows - /// which are produced based on timing information, using the specified scheduler to run timers. - let windowTimeSpanOn (scheduler:IScheduler) timeSpan source = - Observable.Window( source, timeSpan, scheduler ) - - - /// Projects each element of an observable sequence into zero or more windows. - /// windowOpenings - Observable sequence whose elements denote the creation of new windows. - /// windowClosingSelector - A function invoked to define the closing of each produced window. - let windowOpenClose ( windowOpenings : IObservable<'WinOpen> ) - ( windowClosingSelector : 'WinOpen->IObservable<'WinClose> ) - ( source : IObservable<'Source> ) : IObservable> = - Observable.Window(source, windowOpenings, Func<_,_> windowClosingSelector) - - - /// Projects each element of an observable sequence into consecutive non-overlapping windows. - /// windowBoundaries - Sequence of window boundary markers. The current window is closed and a new window is opened upon receiving a boundary marker. - let windowTimeShift ( timeSpan:TimeSpan )( timeShift:TimeSpan )( source:IObservable<'Source> ) : IObservable> = - Observable.Window( source, timeSpan, timeShift ) - - - /// Projects each element of an observable sequence into consecutive non-overlapping windows, using the specified scheduler to run timers. - /// windowBoundaries - Sequence of window boundary markers. The current window is closed and a new window is opened upon receiving a boundary marker. - let windowTimeShiftOn (scheduler:IScheduler) (timeSpan:TimeSpan) (timeShift:TimeSpan) source = - Observable.Window( source, timeSpan, timeShift, scheduler) - - - /// Projects each element of an observable sequence into consecutive non-overlapping windows - /// windowBoundaries - Sequence of window boundary markers. The current window is closed - /// and a new window is opened upon receiving a boundary marker - let windowBounded ( windowBoundaries:IObservable<'WindowBoundary> )( source:IObservable<'Source> ) : IObservable> = - Observable.Window( source, windowBoundaries ) - - - /// Projects each element of an observable sequence into zero or more windows which are produced based on element count information - let windowCountSkip ( count:int )( skip:int ) ( source:IObservable<'Source> ): IObservable> = - Observable.Window( source, count, skip ) - - - /// Projects each element of an observable sequence into consecutive non-overlapping windows - /// which are produced based on element count information. - let windowCount ( count:int )( source:IObservable<'Source> ) : IObservable> = - Observable.Window( source, count ) - - - /// Projects each element of an observable sequence into a window that is completed when either it's full or - /// a given amount of time has elapsed. - /// A useful real-world analogy of this overload is the behavior of a ferry leaving the dock when all seats are - /// taken, or at the scheduled time of departure, whichever event occurs first - let windowTimeCount ( timeSpan:TimeSpan ) (count:int) ( source:IObservable<'Source> ): IObservable> = - Observable.Window( source, timeSpan, count ) - - - /// Projects each element of an observable sequence into a window that is completed when either it's full or - /// a given amount of time has elapsed, using the specified scheduler to run timers. - /// A useful real-world analogy of this overload is the behavior of a ferry leaving the dock when all seats are - /// taken, or at the scheduled time of departure, whichever event occurs first - let windowTimeCountOn (scheduler:IScheduler) (timeSpan:TimeSpan) (count:int) source = - Observable.Window( source, timeSpan, count, scheduler) - - - /// Merges the specified observable sequences into one observable sequence by using the selector function - /// only when the first observable sequence produces an element and there was some element produced by the second - /// observable sequence - let withLatestFrom resultSelector second first = - Observable.WithLatestFrom( first, second, Func<_,_,_> resultSelector ) - - - /// Merges two observable sequences into one observable sequence of pairs. - let zip ( first:IObservable<'Source1> ) ( second:IObservable<'Source2> ) : IObservable<'Source1 * 'Source2> = - Observable.Zip( first, second, fun a b -> a,b) - - - /// Merges three observable sequences into one observable sequence of triples. - let zip3 ( first:IObservable<'Source1> ) ( second:IObservable<'Source2> ) ( third:IObservable<'Source3> ) : IObservable<'Source1 * 'Source2 * 'Source3> = - Observable.Zip( first, second, third, fun a b c -> a,b,c) - - - /// Merges two observable sequences into one observable sequence by combining their elements through a projection function. - let zipWith ( resultSelector:'Source1 -> 'Source2 -> 'Result) ( first:IObservable<'Source1>) ( second:IObservable<'Source2>) : IObservable<'Result> = - Observable.Zip( first, second, Func<'Source1,'Source2,'Result> resultSelector) - - - /// Merges the specified observable sequences into one observable sequence by emitting a - /// list with the elements of the observable sequences at corresponding indexes. - let zipSeq ( sources:seq>) : IObservable> = - Observable.Zip( sources ) - - - /// Merges the specified observable sequences into one observable sequence by emitting - /// a list with the elements of the observable sequences at corresponding indexe - let zipArray ( sources:IObservable<'Source> []) : IObservable> = - Observable.Zip( sources ) - - - /// Merges the specified observable sequences into one observable sequence by using - /// the selector function whenever all of the observable sequences have produced an - /// element at a corresponding index. - let zipSeqMap ( resultSelector: IList<'S> ->'R) ( sources: seq>) : IObservable<'R> = - Observable.Zip( sources, Func,'R> resultSelector) - - - - /// Merges an observable sequence and an enumerable sequence into one - /// observable sequence by using the selector function. - let zipWithSeq ( resultSelector: 'Source1 -> 'Source2 -> 'Result ) - ( second : seq<'Source2> ) - ( first : IObservable<'Source1> ) : IObservable<'Result> = - Observable.Zip(first, second, Func<_,_,_> resultSelector ) - - -(*************************************************************** - * F# extra combinator wrappers for Rx extensions - ***************************************************************) - - /// **Description** - /// Periodically repeats the observable sequence exposing a responses or failures. - /// - /// **Parameters** - /// - `sch` - Accepts the scheduler on which the polling period should be run. - /// - `period` - Accepts the period in which the polling should happen. - /// - `source` - The source observable on which the polling happen. - let pollOn sch period source = - timerOn sch period - |> bind (fun _ -> source) - |> catchWith (Result.Error >> single) - |> repeat - - /// **Description** - /// Periodically repeats the observable sequence exposing a responses or failures. - /// Using the `Scheduler.Default` on which the polling period should run. - /// - /// **Parameters** - /// - `period` - Accepts the period in which the polling should happen. - /// - `source` - The source observable on which the polling happen. - let poll period source = - pollOn Scheduler.Default period source - - /// **Description** - /// Applies the given function to each value of the given source Observable - /// comprimised of the results x for each element for which the function returns `Some(x)`. - /// - /// **Parameters** - /// - `f` - Accepts a chooser function to only pick a subset of emits. - /// - `source` - The source observable to take a subset from. - let choose f source = - Observable.Create (fun (o : IObserver<_>) -> - subscribeSafeWithCallbacks - (fun x -> Option.iter o.OnNext (try f x with ex -> o.OnError ex; None)) - o.OnError - o.OnCompleted - source) - - /// **Description** - /// Projects each source value to an Observable which is merged in the output - /// Observable, emitting values only from the most recently projected Observable. - /// Equivalent to a map followed by a switch. - /// - /// **Returns** - /// Returns an Observable that emits items based on applying a function that you - /// supply to each item emitted by the source Observable, where that function - /// returns an (so-called "inner") Observable. Each time it observes one of these - /// inner Observables, the output Observable begins emitting the items emitted by - /// that inner Observable. When a new inner Observable is emitted, `switchMap` - /// stops emitting items from the earlier-emitted inner Observable and begins - /// emitting items from the new one. It continues to behave like this for - /// subsequent inner Observables. - let switchMap f source = - source |> map f |> switch - - /// Projects each source value to an Observable which is merged in the output - /// Observable only if the previous projected Observable has completed. - // - /// **Returns** - /// Returns an Observable that emits items based on applying a function that you - /// supply to each item emitted by the source Observable, where that function - /// returns an (so-called "inner") Observable. When it projects a source value to - /// an Observable, the output Observable begins emitting the items emitted by - /// that projected Observable. However, `exhaustMap` ignores every new projected - /// Observable if the previous projected Observable has not yet completed. Once - /// that one completes, it will accept and flatten the next projected Observable - /// and repeat this process. - let exhaustMap f source = - Observable.Create (fun (o : IObserver<_>) -> - let mutable hasSubscription = false - let mutable innerSub = None - let onInnerCompleted () = - hasSubscription <- false - innerSub |> Option.iter Disposable.dispose - let onOuterNext x = - if not hasSubscription then - hasSubscription <- true - f x |> subscribeSafeWithCallbacks - o.OnNext o.OnError onInnerCompleted - |> fun y -> innerSub <- Some y - source - |> subscribeSafeWithCallbacks - onOuterNext o.OnError o.OnCompleted) - -(*************************************************************** - * F# advanced combinator wrappers for Rx extensions - >> Inspired by the C# Rxx: https://github.com/RxDave/Rxx << - ***************************************************************) - - let private serveInternal sch max callOnError sourceFactory = - Observable.Create (fun (o : IObserver<'a>) -> - let subscribeSource self = - let onError ex = - if callOnError ex then o.OnError ex - else self () - sourceFactory () - |> subscribeSafeWithCallbacks - o.OnNext onError self - - let com = Disposable.Composite - for _ in 1..max do - let current = new SerialDisposable () - com.Add current - sch |> Schedule.actionRec (fun self -> - current - |> Disposable.setIndirectly - (fun () -> subscribeSource self)) - |> com.Add - com :> IDisposable) - - /// **Description** - /// Concurrently invokes the specified factory to create observables as fast and often as possible and subscribes to all of them - /// up to the default maximum concurrency. - /// - /// **Parameters** - /// - `sch` - The scheduler on which the invocation should happen. - /// - `gate` - Common gate on which the synchronization should happen. - /// - `max` - The maximum number of observables to be subscribed simultaneously. - /// - `callOnError` - Function to determine whether or not the given exception should call the `OnError`. - /// - `sourceFactory` - Function that returns the observable to invoke concurrently. - let serveGateCustomOn sch gate max callOnError sourceFactory = - serveInternal sch max callOnError sourceFactory |> synchronizeGate gate - - /// **Description** - /// Concurrently invokes the specified factory to create observables as fast and often as possible and subscribes to all of them - /// up to the default maximum concurrency. - /// - /// **Parameters** - /// - `sch` - The scheduler on which the invocation should happen. - /// - `max` - The maximum number of observables to be subscribed simultaneously. - /// - `callOnError` - Function to determine whether or not the given exception should call the `OnError`. - /// - `sourceFactory` - Function that returns the observable to invoke concurrently. - let serveCustomOn sch max callOnError sourceFactory = - serveInternal sch max callOnError sourceFactory |> synchronize - - /// **Description** - /// Concurrently invokes the specified factory to create observables as fast and often as possible and subscribes to all of them - /// up to the default maximum concurrency. - /// - /// **Parameters** - /// - `sch` - The scheduler on which the invocation should happen. - /// - `gate` - Common gate on which the synchronization should happen. - /// - `max` - The maximum number of observables to be subscribed simultaneously. - /// - `sourceFactory` - Function that returns the observable to invoke concurrently. - let serveOn sch max sourceFactory = - serveCustomOn sch max (fun _ -> true) sourceFactory - - /// **Description** - /// Concurrently invokes the specified factory to create observables as fast and often as possible and subscribes to all of them - /// up to the default maximum concurrency. - /// - /// **Parameters** - /// - `max` - The maximum number of observables to be subscribed simultaneously. - /// - `sourceFactory` - Function that returns the observable to invoke concurrently. - let serve max sourceFactory = - serveOn Scheduler.CurrentThread max sourceFactory - - /// Generates a sequence using the producer/consumer pattern. - /// The purpose of the source sequence is simply to notify the consumer when out-of-band data becomes available. - /// The data in the source sequence provides additional information to the function, - /// but it does not have to be the actual data being produced. - /// - /// The function is not necessarily called for every value in the source sequence. - /// It is only called if the previous consumer's observable has completed; otherwise, the current notification is ignored. This ensures - /// that only one consumer is active at any given time, but it also means that the function is not guaranteed - /// to receive every value in the source sequence; therefore, the function must read - /// data from out-of-band storage instead; e.g., from a shared stream or queue. - /// - /// The function may also be called when data is not available. For example, if the current consuming - /// observable completes and additional notifications from the source were received, then the function - /// is called again to check whether new data was missed. This avoids a race condition between the source sequence - /// and the consuming observable's completion notification. If no data is available when function is called, then - /// an empty sequence should be returned and the function will not be called again until another notification is observed - /// from the source. - /// - /// Producers and the single active consumer are intended to access shared objects concurrently, yet it remains their responsibility - /// to ensure thread-safety. The consume operator cannot do so without breaking concurrency. For example, - /// a producer/consumer implementation that uses an in-memory queue must manually ensure that reads and writes to the queue are thread-safe. - /// - /// Multiple producers are supported. Simply create an observable sequence for each producer that notifies when data is generated, - /// merge them together using the merge operator, and use the merged observable as the source argument in the consume operator. - /// Multiple consumers are supported by calling consume once and then calling subscribe multiple times on the cold observable that is returned. - /// Just be sure that the source sequence is hot so that each subscription will consume based on the same producers' notifications. - /// - /// ## Parameters - /// - `f` - A function that generates an observable sequence from out-of-band data. - /// - `source` - Indicates when data becomes available from one or more producers. - /// - /// ## Returns - /// An observable sequence that is the concatenation of all subscriptions to the consumer observable. - let consumeMap (f : 'a -> IObservable<'b>) (source : IObservable<'a>) = - Observable.Create (fun (o : IObserver<_>) -> - let gate = obj () - let consumingSubscription = new SerialDisposable () - let schedule = new SerialDisposable () - - let mutable lastSkipped = Unchecked.defaultof<'a> - let mutable hasSkipped = false - let mutable consuming = false - let mutable stopped = false - - let onNext value = - lock gate (fun () -> - if consuming - then lastSkipped <- value - hasSkipped <- true - else consuming <- true - hasSkipped <- false) - - let mutable additionalData = value - let scheduleRec self = - let onCompleted () = - let consumeAgain, completeNow = - lock gate (fun () -> - consuming <- hasSkipped - if consuming then - additionalData <- lastSkipped - hasSkipped <- false - true, false - else false, stopped) - - if consumeAgain then self () - if completeNow then o.OnCompleted () - - try Some (f additionalData) - with | ex -> o.OnError ex; None - |> Option.iter (fun xs -> - consumingSubscription - |> Disposable.setIndirectly (fun () -> - subscribeSafeWithCallbacks - o.OnNext o.OnError onCompleted xs)) - - Scheduler.Immediate - |> Schedule.actionRec scheduleRec - |> Disposable.setInnerDisposalOf schedule - - let onCompleted () = - let completeNow = lock gate (fun () -> - stopped <- true; consuming) - if completeNow then o.OnCompleted () - - let subscription = - subscribeSafeWithCallbacks - onNext o.OnError onCompleted source - - Disposables.compose [ consumingSubscription; subscription; schedule ]) - - /// Generates a sequence using the producer/consumer pattern. - /// The purpose of the source sequence is simply to notify the consumer when out-of-band data becomes available. - /// The data in the source sequence provides additional information to the function, - /// but it does not have to be the actual data being produced. - /// - /// The function is not necessarily called for every value in the source sequence. - /// It is only called if the previous consumer's observable has completed; otherwise, the current notification is ignored. This ensures - /// that only one consumer is active at any given time, but it also means that the function is not guaranteed - /// to receive every value in the source sequence; therefore, the function must read - /// data from out-of-band storage instead; e.g., from a shared stream or queue. - /// - /// The function may also be called when data is not available. For example, if the current consuming - /// observable completes and additional notifications from the source were received, then the function - /// is called again to check whether new data was missed. This avoids a race condition between the source sequence - /// and the consuming observable's completion notification. If no data is available when function is called, then - /// an empty sequence should be returned and the function will not be called again until another notification is observed - /// from the source. - /// - /// Producers and the single active consumer are intended to access shared objects concurrently, yet it remains their responsibility - /// to ensure thread-safety. The consume operator cannot do so without breaking concurrency. For example, - /// a producer/consumer implementation that uses an in-memory queue must manually ensure that reads and writes to the queue are thread-safe. - /// - /// Multiple producers are supported. Simply create an observable sequence for each producer that notifies when data is generated, - /// merge them together using the merge operator, and use the merged observable as the source argument in the consume operator. - /// Multiple consumers are supported by calling consume once and then calling subscribe multiple times on the cold observable that is returned. - /// Just be sure that the source sequence is hot so that each subscription will consume based on the same producers' notifications. - /// - /// ## Parameters - /// - `f` - A function that generates an observable sequence from out-of-band data. - /// - `source` - Indicates when data becomes available from one or more producers. - /// - /// ## Returns - /// An observable sequence that is the concatenation of all subscriptions to the consumer observable. - let consume consumer source = consumeMap (fun _ -> consumer) source - - /// Generates a sequence using the producer/consumer pattern. - /// The purpose of the source sequence is simply to notify the consumer when out-of-band data becomes available. - /// The data in the source sequence provides additional information to the function, - /// but it does not have to be the actual data being produced. - /// - /// The function is not necessarily called for every value in the source sequence. - /// It is only called if the previous consumer's observable has completed; otherwise, the current notification is ignored. This ensures - /// that only one consumer is active at any given time, but it also means that the function is not guaranteed - /// to receive every value in the source sequence; therefore, the function must read - /// data from out-of-band storage instead; e.g., from a shared stream or queue. - /// - /// The function may also be called when data is not available. For example, if the current consuming - /// observable completes and additional notifications from the source were received, then the function - /// is called again to check whether new data was missed. This avoids a race condition between the source sequence - /// and the consuming observable's completion notification. If no data is available when function is called, then - /// an empty sequence should be returned and the function will not be called again until another notification is observed - /// from the source. - /// - /// Producers and the single active consumer are intended to access shared objects concurrently, yet it remains their responsibility - /// to ensure thread-safety. The consume operator cannot do so without breaking concurrency. For example, - /// a producer/consumer implementation that uses an in-memory queue must manually ensure that reads and writes to the queue are thread-safe. - /// - /// Multiple producers are supported. Simply create an observable sequence for each producer that notifies when data is generated, - /// merge them together using the merge operator, and use the merged observable as the source argument in the consume operator. - /// Multiple consumers are supported by calling consume once and then calling subscribe multiple times on the cold observable that is returned. - /// Just be sure that the source sequence is hot so that each subscription will consume based on the same producers' notifications. - /// - /// ## Parameters - /// - `f` - A function that is called iteratively to generate values from out-of-band data. - /// - `source` - Indicates when data becomes available from one or more producers. - /// - /// ## Returns - /// An observable sequence that is the concatenation of the values returned by the consumeNext function. - let consumeNextOn sch f source = - let rec onNext (o : IObserver<_>) x = - try f x - with ex -> o.OnError ex; None - |> function - | Some next -> o.OnNext next; onNext o x - | None -> o.OnCompleted () - source - |> consumeMap (fun x -> - Observable.Create (fun o -> - Schedule.action (fun () -> onNext o x) sch)) - - /// Generates a sequence using the producer/consumer pattern. - /// The purpose of the source sequence is simply to notify the consumer when out-of-band data becomes available. - /// The data in the source sequence provides additional information to the function, - /// but it does not have to be the actual data being produced. - /// - /// The function is not necessarily called for every value in the source sequence. - /// It is only called if the previous consumer's observable has completed; otherwise, the current notification is ignored. This ensures - /// that only one consumer is active at any given time, but it also means that the function is not guaranteed - /// to receive every value in the source sequence; therefore, the function must read - /// data from out-of-band storage instead; e.g., from a shared stream or queue. - /// - /// The function may also be called when data is not available. For example, if the current consuming - /// observable completes and additional notifications from the source were received, then the function - /// is called again to check whether new data was missed. This avoids a race condition between the source sequence - /// and the consuming observable's completion notification. If no data is available when function is called, then - /// an empty sequence should be returned and the function will not be called again until another notification is observed - /// from the source. - /// - /// Producers and the single active consumer are intended to access shared objects concurrently, yet it remains their responsibility - /// to ensure thread-safety. The consume operator cannot do so without breaking concurrency. For example, - /// a producer/consumer implementation that uses an in-memory queue must manually ensure that reads and writes to the queue are thread-safe. - /// - /// Multiple producers are supported. Simply create an observable sequence for each producer that notifies when data is generated, - /// merge them together using the merge operator, and use the merged observable as the source argument in the consume operator. - /// Multiple consumers are supported by calling consume once and then calling subscribe multiple times on the cold observable that is returned. - /// Just be sure that the source sequence is hot so that each subscription will consume based on the same producers' notifications. - /// - /// ## Parameters - /// - `f` - A function that is called iteratively to generate values from out-of-band data. - /// - `source` - Indicates when data becomes available from one or more producers. - /// - /// ## Returns - /// An observable sequence that is the concatenation of the values returned by the consumeNext function. - let consumeNext f source = consumeNextOn Scheduler.Default f source diff --git a/src/FSharp.Control.Reactive/Scheduler.fs b/src/FSharp.Control.Reactive/Scheduler.fs deleted file mode 100644 index 6ca94f8..0000000 --- a/src/FSharp.Control.Reactive/Scheduler.fs +++ /dev/null @@ -1,250 +0,0 @@ -namespace FSharp.Control.Reactive - -open System -open System.Collections.Generic -open System.Threading -open System.Reactive -open System.Reactive.Linq -open System.Reactive.Concurrency -open System.Reactive.Disposables -open System.Threading.Tasks - -module Scheduler = - - /// Returns the 'ISchedulerLongRunning' implementation of the specified scheduler, or 'None' if no such implementation is available. - let asLongRunning (sch : IScheduler) = - match sch.AsLongRunning () with - | null -> None - | x -> Some x - - type Scheduler () = - - /// Creates a historical scheduler with a minimum value of DateTimeOffset as initial clock. - static member Historical = (fun () -> new HistoricalScheduler ()) () - - /// Creates an object that schedules units of work on a designated thread. - static member EventLoop = (fun () -> new EventLoopScheduler ()) () - -/// The Reactive module provides operators for working with IScheduler<_> in F#. -module Schedule = - - /// Schedule multiple 'schedule' operations together - let multiple (fs : (IScheduler -> IDisposable) list) sch = - List.map (fun f -> f sch) fs |> Disposables.compose - - (*************************************************************** - * Simple - ***************************************************************) - - /// Schedules an function to be executed. - let action f sch = Scheduler.Schedule (sch, Action f) - - /// Schedules an function to be executed at a specified absolute time. - let actionOffset offset f sch = - Scheduler.Schedule (sch, (offset : DateTimeOffset), Action f) - - /// Schedules an function to be executed. - let actionLong f sch = - Scheduler.ScheduleLongRunning (sch, Action f) - - /// Schedules a long-running piece of work. - let actionLongState state f (sch : ISchedulerLongRunning) = - sch.ScheduleLongRunning (state, Action<_, _> (fun s c -> f s c |> ignore)) - - /// Schedules a function to be executed. - let func state f (sch : IScheduler) = - sch.Schedule (state, Func<_, _, _> f) - - /// Schedules a function to be executed after dueTime. - let funcSpan state (dueTime : TimeSpan) f (sch : IScheduler) = - sch.Schedule (state, dueTime, Func<_, _, _> f) - - /// Schedules a function to be executed at dueTime. - let funcOffset state (dueTime : DateTimeOffset) f (sch : IScheduler) = - sch.Schedule (state, dueTime, Func<_, _, _> f) - - (*************************************************************** - * Recursive - ***************************************************************) - - /// Schedules an function to be executed recursively. - let actionRec ff sch = - Scheduler.Schedule (sch, Action (fun f -> ff (fun () -> f.Invoke ()))) - - /// Schedules an function to be executed recursively. - let actionSpanRec time ff sch = - Scheduler.Schedule (sch, time, Action> (fun t f -> ff t f.Invoke)) - - /// Schedules an function to be executed recursively. - let actionAccRec state ff sch = - Scheduler.Schedule (sch, state, (Action<'state, Action<'state>> (fun s f -> ff s f.Invoke))) - - /// Schedules an function to be executed recursively after a specified relative due time. - let actionAccSpanRec state dueTime ff sch = - Scheduler.Schedule (sch, state, dueTime, Action<'state, Action<'state, TimeSpan>> (fun s f -> ff s (fun x y -> f.Invoke (x, y)))) - - /// Schedules an function to be executed recursively at a specified absolute due time. - let actionOffsetRec dueTime ff sch = - Scheduler.Schedule (sch, dueTime, Action> (fun f -> ff (fun () -> f.Invoke dueTime))) - - /// Schedules an function to be executed recursively at a specified absolute due time. - let actionAccOffsetRec state dueTime ff sch = - Scheduler.Schedule (sch, state, dueTime, Action<'state, Action<'state, DateTimeOffset>> (fun s f -> ff s (fun x y -> f.Invoke (x, y)))) - - (*************************************************************** - * Services Emulation - ***************************************************************) - - /// Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. - /// If the scheduler supports periodic scheduling, the request will be forwarded to the periodic scheduling implementation. - /// If the scheduler provides stopwatch functionality, the periodic task will be emulated using recursive scheduling with a stopwatch to correct for time slippage. - /// Otherwise, the periodic task will be emulated using recursive scheduling. - let periodicAcc state period f sch = - Scheduler.SchedulePeriodic (sch, state, period, Func<_, _> f) - - /// Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. - /// If the scheduler supports periodic scheduling, the request will be forwarded to the periodic scheduling implementation. - /// If the scheduler provides stopwatch functionality, the periodic task will be emulated using recursive scheduling with a stopwatch to correct for time slippage. - /// Otherwise, the periodic task will be emulated using recursive scheduling. - let periodicAccAction state period f sch = - Scheduler.SchedulePeriodic (sch, state, period, Action<_> f) - - /// Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. - /// If the scheduler supports periodic scheduling, the request will be forwarded to the periodic scheduling implementation. - /// If the scheduler provides stopwatch functionality, the periodic task will be emulated using recursive scheduling with a stopwatch to correct for time slippage. - /// Otherwise, the periodic task will be emulated using recursive scheduling. - let periodicAction period f sch = - Scheduler.SchedulePeriodic (sch, period, Action f) - - (*************************************************************** - * Wrappers - ***************************************************************) - - /// Returns a scheduler that represents the original scheduler, without any of its interface-based optimizations (e.g. long running scheduling). - let disableOptimizations = Scheduler.DisableOptimizations - - /// Returns a scheduler that represents the original scheduler, without any of its interface-based optimizations (e.g. long running scheduling). - let disableOptimizationsTypes (optimizationInterfaces : Type list) sch = - Scheduler.DisableOptimizations (sch, optimizationInterfaces |> List.toArray) - - /// Returns a scheduler that wraps the original scheduler, adding exception handling for scheduled actions. - let catch f sch = Scheduler.Catch (sch, Func<_, _> f) - - (*************************************************************** - * Async - ***************************************************************) - - let asAsync (cta: SchedulerOperation) = - Async.FromContinuations <| fun (completed, caught, _) -> - let aw = cta.GetAwaiter () - aw.OnCompleted( - new Action(fun _ -> - try aw.GetResult (); completed () - with ex -> caught ex)) - - /// Yields execution of the current work item on the scheduler to another work item on the scheduler. - /// The caller should await the result of calling 'yield' to schedule the remainder of the current work item (known as the continuation). - let yield_ x = Scheduler.Yield x |> asAsync - - /// Yields execution of the current work item on the scheduler to another work item on the scheduler. - /// The caller should await the result of calling 'yield' to schedule the remainder of the current work item (known as the continuation). - let yieldCancel ct sch = Scheduler.Yield (sch, ct) |> asAsync - - /// Suspends execution of the current work item on the scheduler for the specified duration. - /// The caller should await the result of calling 'sleep' to schedule the remainder of the current work item (known as the continuation) after the specified duration. - let sleep dueTime sch = Scheduler.Sleep (sch, (dueTime : TimeSpan)) |> asAsync - - /// Suspends execution of the current work item on the scheduler for the specified duration. - /// The caller should await the result of calling 'sleep' to schedule the remainder of the current work item (known as the continuation) after the specified duration. - let sleepCancel dueTime ct sch = Scheduler.Sleep (sch, (dueTime : TimeSpan), ct) |> asAsync - - /// Suspends execution of the current work item on the scheduler for the specified duration. - /// The caller should await the result of calling 'sleep' to schedule the remainder of the current work item (known as the continuation) after the specified due time. - let sleepOffset dueTime sch = Scheduler.Sleep (sch, (dueTime : DateTimeOffset)) |> asAsync - - /// Suspends execution of the current work item on the scheduler for the specified duration. - /// The caller should await the result of calling 'sleep' to schedule the remainder of the current work item (known as the continuation) after the specified due time. - let sleepOffsetCancel dueTime ct sch = Scheduler.Sleep (sch, (dueTime : DateTimeOffset), ct) |> asAsync - - let asTask (ct: CancellationToken) (async: Async<'T>) = - let tcs = TaskCompletionSource<'T>() - Async.StartWithContinuations( - async, - tcs.SetResult, - tcs.SetException, - tcs.SetException, - ct) - tcs.Task - - /// Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style. - let async f sch = - let ff = Func (fun sc ct -> - f sc ct |> asTask ct :> Task) - Scheduler.ScheduleAsync (sch, ff) - - /// Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style. - let asyncResult f sch = - let ff = Func> (fun sc ct -> - f sc ct |> asTask ct :> Task<_>) - Scheduler.ScheduleAsync (sch, ff) - - /// Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style. - let asyncAccUnit state f sch = - let ff = Func (fun sc st ct -> - f sc st ct |> asTask ct :> Task) - Scheduler.ScheduleAsync (sch, state, ff) - - /// Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style. - let asyncAccResult state f sch = - let ff = Func> (fun sc st ct -> - f sc st ct |> asTask ct :> Task<_>) - Scheduler.ScheduleAsync (sch, state, ff) - - /// Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style. - let asyncSpanUnit dueTime f sch = - let ff = Func (fun sc ct -> - f sc ct |> asTask ct :> Task) - Scheduler.ScheduleAsync (sch, (dueTime : TimeSpan), ff) - - /// Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style. - let asyncSpanResult dueTime f sch = - let ff = Func> (fun sc ct -> - f sc ct |> asTask ct :> Task<_>) - Scheduler.ScheduleAsync (sch, (dueTime : TimeSpan), ff) - - /// Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style. - let asyncOffsetUnit dueTime f sch = - let ff = Func (fun sc ct -> - f sc ct |> asTask ct :> Task) - Scheduler.ScheduleAsync (sch, (dueTime : DateTimeOffset), ff) - - /// Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style. - let asyncOffsetResult dueTime f sch = - let ff = Func> (fun sc ct -> - f sc ct |> asTask ct :> Task<_>) - Scheduler.ScheduleAsync (sch, (dueTime : DateTimeOffset), ff) - - /// Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style. - let asyncAccSpanUnit state dueTime f sch = - let ff = Func (fun sc st ct -> - f sc st ct |> asTask ct :> Task) - Scheduler.ScheduleAsync (sch, state, (dueTime : TimeSpan), ff) - - /// Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style. - let asyncAccSpanResult state dueTime f sch = - let ff = Func> (fun sc st ct -> - f sc st ct |> asTask ct :> Task<_>) - Scheduler.ScheduleAsync (sch, state, (dueTime : TimeSpan), ff) - - /// Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style. - let asyncAccOffsetUnit state dueTime f sch = - let ff = Func (fun sc st ct -> - f sc st ct |> asTask ct :> Task) - Scheduler.ScheduleAsync (sch, state, (dueTime : DateTimeOffset), ff) - - /// Schedules the work using an asynchonous function, allowing for cooperative scheduling in a imperative coding style. - let asyncAccOffsetResult state dueTime f sch = - let ff = Func> (fun sc st ct -> - f sc st ct |> asTask ct :> Task<_>) - Scheduler.ScheduleAsync (sch, state, (dueTime : DateTimeOffset), ff) - diff --git a/src/FSharp.Control.Reactive/Subject.fs b/src/FSharp.Control.Reactive/Subject.fs deleted file mode 100644 index 0c9b5de..0000000 --- a/src/FSharp.Control.Reactive/Subject.fs +++ /dev/null @@ -1,64 +0,0 @@ -namespace FSharp.Control.Reactive - -open System.Reactive.Subjects - -type Subject<'a> private () = - - /// Represents and object that is both an observable sequence as well as an observer. - /// Each notification is broadcasted to all subscribed observers. - static member broadcast - with get () = new System.Reactive.Subjects.Subject<'a> () - - /// Represents the result of an asynchronous operation. - /// The last value before the OnCompleted notification, or the error received through OnError, is sent to all subscribed observers. - static member async - with get () = new AsyncSubject<'a> () - - /// Represents an object that is both an observable sequence as well as an observer. - /// Each notification is broadcasted to all subscribed and future observers, subject to buffer trimming policies. - static member replay - with get () = new ReplaySubject<'a> () - - /// Represents a value that changes over time. - /// Observers can subscribe to the subject to receive the last (or initial) value and all subsequent notifications. - static member behavior x = new BehaviorSubject<'a> (x) - -/// The Reactive module provides operators working with Subjects in F#. -[] -module Subject = - - /// Notifies all subscribed observers about the arrival of the specified element in the sequence. - let onNext x (s : SubjectBase<'a>) = - s.OnNext x; s - - /// Notifies all subscribed observers about the arrival of the specified elements in the sequence. - let onNexts xs s = - Seq.iter (fun x -> onNext x s |> ignore) xs; s - - /// Notifies all subscribed observers about the specified exception. - let onError ex (s : SubjectBase<'a>) = - s.OnError ex; s - - /// Notifies all subscribed observers about the end of the sequence. - let onCompleted (s : SubjectBase<'a>) = - s.OnCompleted (); s - - /// An empty subject representing a null-sink - /// combining an Observable.empty and Observer.empty - let empty = { new System.Reactive.Subjects.ISubject<_> with - // we use an object expression here because - // Observable.empty and Observer.empty haven't been declared yet - member _.OnCompleted() = () - member _.OnError(_) = () - member _.OnNext(_) = () - member _.Subscribe(_) = Disposable.empty - } - - /// An empty subject representing a null-sink - /// for IObserver<'source> and IObservable<'result> - let empty2 = { new System.Reactive.Subjects.ISubject<_,_> with - member _.OnCompleted() = () - member _.OnError(_) = () - member _.OnNext(_) = () - member _.Subscribe(_) = Disposable.empty - } diff --git a/src/FSharp.Control.Reactive/paket.references b/src/FSharp.Control.Reactive/paket.references deleted file mode 100644 index d9a9a73..0000000 --- a/src/FSharp.Control.Reactive/paket.references +++ /dev/null @@ -1,4 +0,0 @@ -FSharp.Core -System.Reactive -GitVersion.MSBuild -Microsoft.SourceLink.GitHub \ No newline at end of file diff --git a/tests/DisposableSpecs.fs b/tests/DisposableSpecs.fs deleted file mode 100644 index 7b8c3c2..0000000 --- a/tests/DisposableSpecs.fs +++ /dev/null @@ -1,86 +0,0 @@ -module FSharp.Reactive.Tests.DisposableSpecs - -open NUnit.Framework -open FsCheck -open FSharp.Control.Reactive -open FSharp.Control.Reactive.Testing -open System.Reactive.Disposables - -[] -let ``Disposable.compose is immutable`` () = - let disp1 = Disposable.create id - let disp2 = Disposable.create id - let disp3 = Disposable.create id - - let groupa = Disposable.compose disp1 disp2 - let groupb = Disposable.compose disp1 disp2 - let groupc = Disposable.compose groupa disp3 - - //groupa isn't mutated to groupc - //previously, this test would have failed - Assert.That(groupa, Is.Not.EqualTo(groupc)) - - -[] -let ``Disposable.compose follows ordering`` () = - let mutlist = new ResizeArray<_>() - let add n = fun () -> mutlist.Add n - let contents () = mutlist |> List.ofSeq - - let range = [1..10] - - //apply compose recursively over range - let composite = - range - |> List.map add - |> List.map Disposable.create - |> List.reduce (fun a b -> a |> Disposable.compose b) - - //dispose the entire range - composite.Dispose() - - Assert.That(contents (), Is.EqualTo(range)) - -[] -let ``Disposals happen only once`` () = - let mutlist = new ResizeArray<_>() - let add n = fun () -> mutlist.Add n - let contents () = mutlist |> List.ofSeq - - let disp1 = Disposable.create (add 1) - let disp2 = Disposable.create (add 2) - let disp3 = Disposable.create (add 3) - - let group1 = disp1 |> Disposable.compose disp2 - let group2 = group1 |> Disposable.compose disp3 - - group1.Dispose() - //group1 isn't mutated and disposes in order - Assert.That(contents (), Is.EqualTo([1; 2;])) - - group2.Dispose() - //group1 has already been disposed, - //so only disp3.Dispose() should happen - Assert.That(contents (), Is.EqualTo([1; 2; 3])) - () - -[] -let ``CompositeDispose disposes correctly inner disposables`` () = - let mutlist = new ResizeArray<_>() - let add n = fun () -> mutlist.Add n - let contents () = mutlist |> List.ofSeq - - let compDisp = new CompositeDisposable() - let disp1 = Disposable.create (add 1) - let disp2 = Disposable.create (add 2) - let disp3 = Disposable.create (add 3) - - disp1 |> Disposable.disposeWith compDisp - disp2 |> Disposable.disposeWith compDisp - disp3 |> Disposable.disposeWith compDisp - - compDisp.Dispose() - - Assert.That(contents (), Is.EqualTo([1; 2; 3;])) - () - diff --git a/tests/EmitsSpecs.fs b/tests/EmitsSpecs.fs deleted file mode 100644 index 563707f..0000000 --- a/tests/EmitsSpecs.fs +++ /dev/null @@ -1,59 +0,0 @@ -module FSharp.Reactive.Tests.EmitsSpecs - -open NUnit.Framework -open FsCheck -open FSharp.Control.Reactive -open FSharp.Control.Reactive.Testing - -#nowarn "988" - -[] -type EmitTest () = - - [] - member __.Setup () = - Arb.register () |> ignore - - [] - member __.``Notifications gets passed through`` () = - Check.QuickThrowOnFailure <| fun ms -> - TestSchedule.usage <| fun sch -> - TestSchedule.coldObservable sch ms - |> TestSchedule.subscribeTestObserverStart sch - |> TestObserver.messages = ms - - [] - member __.``Functor Law of Observables`` () = - Check.QuickThrowOnFailure <| - fun ms (f : int -> int) (g : int -> int) -> - TestSchedule.usage <| fun sch -> - TestSchedule.hotObservable sch ms - |> Observable.retry - |> Observable.map f - |> Observable.map g - |> TestSchedule.subscribeTestObserverStart sch - |> TestObserver.nexts = TestNotification.mapNexts (f >> g) ms - - [] - member __.``Applicative Law of Observables`` () = - Check.QuickThrowOnFailure <| - fun ms (f : int -> int) -> - TestSchedule.usage <| fun sch -> - TestSchedule.hotObservable sch ms - |> Observable.retry - |> Observable.apply (Observable.single f) - |> TestSchedule.subscribeTestObserverStart sch - |> TestObserver.nexts = TestNotification.mapNexts f ms - - [] - member __.``Monadic Law of Observables`` () = - Check.QuickThrowOnFailure <| - fun ms (f : int -> int) -> - TestSchedule.usage <| fun sch -> - TestSchedule.hotObservable sch ms - |> Observable.retry - |> Observable.bind (f >> Observable.single) - |> TestSchedule.subscribeTestObserverStart sch - |> TestObserver.nexts = TestNotification.mapNexts f ms - - diff --git a/tests/FSharp.Control.Reactive.Tests.fsproj b/tests/FSharp.Control.Reactive.Tests.fsproj deleted file mode 100644 index 78bf870..0000000 --- a/tests/FSharp.Control.Reactive.Tests.fsproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - net6.0 - false - true - - - - - - - - - - - - - - - - - diff --git a/tests/MarbleSpecs.fs b/tests/MarbleSpecs.fs deleted file mode 100644 index 0fc0764..0000000 --- a/tests/MarbleSpecs.fs +++ /dev/null @@ -1,79 +0,0 @@ -module FSharp.Reactive.Tests.MarbleSpecs - -open FSharp.Control.Reactive -open FSharp.Control.Reactive.Testing -open FSharp.Control.Reactive.Testing.Marbles -open NUnit.Framework -open FsCheck - -let test f = - Check.QuickThrowOnFailure <| fun () -> - TestSchedule.usage <| fun sch -> f sch - -[] -let ``cold: marble should parse simple test`` () = - test <| fun sch -> - let a = cold "--1--2--|" sch - let e = "--2--3--|" - let s = "^-----!" - - a |> Observable.map (int >> (+) 1 >> string) - |> Marbles.expectMessages sch e - a |> TestObservable.subscriptions - |> Marbles.expectSubscriptions [s] - -[] -let ``cold: marble should parse concat`` () = - test <| fun sch -> - let a = cold "--1--2--|" sch - let sa = "^-----!" - let b = cold "--3--|" sch - let sb = "------^---!" - let e = "--1--2----3--|" - - Observable.concat b a - |> Marbles.expectMessages sch e - TestObservable.subscriptions a |> expectSubscriptions [sa] - TestObservable.subscriptions b |> expectSubscriptions [sb] - -[] -let ``cold/hot: marble should parse concat`` () = - test <| fun sch -> - let a = cold "--1--2--|" sch - let sa = "^-----!" - let b = hot "^----3----4--|" sch - let sb = "------^---!" - let e = "--1--2----4--|" - - Observable.concat b a - |> Marbles.expectMessages sch e - TestObservable.subscriptions a |> expectSubscriptions [sa] - TestObservable.subscriptions b |> expectSubscriptions [sb] - -[] -let ``cold/hot: marble concat with negative times`` () = - test <| fun sch -> - let a = cold "--1--2--|" sch - let sa = "^-----!" - let b = hot "0--^----3----4--|" sch - let sb = "------^---!" - let e = "--1--2----4--|" - - Observable.concat b a - |> Marbles.expectMessages sch e - TestObservable.subscriptions a |> expectSubscriptions [sa] - TestObservable.subscriptions b |> expectSubscriptions [sb] - -[] -let ``zip marbles`` () = - test <| fun sch -> - let a = cold "-- a --- b -|" sch - let sa = "^ --- - -!" - let b = cold "- c ---- d -|" sch - let sb = "^ ---- -!" - let e = "--(ac)---(bd)-|" - - Observable.zipWith (sprintf "%s%s") a b - |> Marbles.expectMessages sch e - TestObservable.subscriptions a |> expectSubscriptions [sa] - TestObservable.subscriptions b |> expectSubscriptions [sb] \ No newline at end of file diff --git a/tests/ObservableSpecs.fs b/tests/ObservableSpecs.fs deleted file mode 100644 index 608e2d8..0000000 --- a/tests/ObservableSpecs.fs +++ /dev/null @@ -1,867 +0,0 @@ -module FSharp.Reactive.Tests.ObservableSpecs - -open System -open System.Reactive.Concurrency -open System.Reactive.Disposables -open System.Reactive.Linq -open Microsoft.Reactive.Testing -open NUnit.Framework -open FsCheck -open FSharp.Control.Reactive -open FSharp.Control.Reactive.Builders -open FSharp.Control.Reactive.Observable -open FSharp.Control.Reactive.Testing -open FSharp.Control.Reactive.Testing.TestNotification -open System.Reactive.Subjects - - -let ``should be`` expectedNext expectedError expectedCompleted (observable:'a IObservable) = - let next = ref 0 - let error = ref false - let completed = ref false - - let subscription = observable |> Observable.subscribeWithCallbacks (fun _ -> incr next) (fun _ -> error := true) (fun () -> completed := true) - - Assert.That(!next, Is.EqualTo expectedNext) - Assert.That(!error, Is.EqualTo expectedError) - Assert.That(!completed, Is.EqualTo expectedCompleted) - -let tuple x y = x,y - -[] -let ``When subscribing to a single value observable, OnNext and OnCompleted should be fired``() = - Observable.Return(1) |> ``should be`` 1 false true - -[] -let ``When subscribing to an empty observable, only OnCompleted should be fired``() = - Observable.Empty() |> ``should be`` 0 false true - -[] -let ``All OnNext notifications are ignored``() = - Observable.range 1 10 |> Observable.ignoreElements |> ``should be`` 0 false true - -[] -let ``When subscribing to an observable that fires an exception, only OnError should be fired``() = - Observable.Throw(Exception()) |> ``should be`` 0 true false - -[] -let ``When subscribing to an F# event, only OnNext should be called``() = - let next = ref 0 - let error = ref false - let completed = ref false - let testEvent = Event() - - let subscription = testEvent.Publish.Subscribe((fun _ -> incr next), (fun _ -> error := true), (fun () -> completed := true)) - testEvent.Trigger(null, EventArgs()) - - Assert.That(!next, Is.EqualTo 1) - Assert.That(!error, Is.False) - Assert.That(!completed, Is.False) - -type TestType() = - let testEvent = Event() - [] member this.TestEvent = testEvent.Publish - member this.Trigger() = testEvent.Trigger(this, EventArgs()) - -[] -let ``When subscribing to an event, only OnNext should be fired once.``() = - let next = ref 0 - let error = ref false - let completed = ref false - - let tester = TestType() -// let subscription = tester.TestEvent.Subscribe((fun _ -> incr next), (fun _ -> error := true), (fun () -> completed := true)) - let observable = Observable.fromEventPattern "TestEvent" tester - let subscription = observable.Subscribe((fun _ -> incr next), (fun _ -> error := true), (fun () -> completed := true)) - tester.Trigger() - - Assert.That(!next, Is.EqualTo 1) - Assert.That(!error, Is.False) - Assert.That(!completed, Is.False) - -[] -let ``When subscribing to an observable that fires an exception using the ObservableBuilder, only OnError should be fired``() = - let builder = observe { - failwith "Test" - yield 1 } - builder |> ``should be`` 0 true false - -[] -let ``ObservableBuilder can run-time test, and try-catch the type of exception``() = - - let errorObservable = - observe { - try - InvalidOperationException() |> raise - with - | :? InvalidOperationException -> - yield 1 - } - - errorObservable |> ``should be`` 1 false true - -[] -let ``When zip is defined with the applicative, it should match the result of Observable.zip``() = - let inline (<*>) f m = Observable.apply f m - let inline () f m = Observable.map f m - let a = Observable.Return 1 - let b = Observable.Return 2 - let zip a b = tuple a <*> b - - let actual = ref (0,0) - let expected = ref (0,0) - - (zip a b).Subscribe(fun x -> actual := x) |> ignore - (Observable.zip a b).Subscribe(fun x -> expected := x) |> ignore - - Assert.That(!actual, Is.EqualTo (!expected)) - -[] -let ``zip used in rxquery matches output from Observable.zip`` () = - let a = Observable.ofSeq [1;2;3] - let b = Observable.ofSeq [1;2;3] - - let expected = ResizeArray() - (Observable.zip a b).Subscribe(expected.Add) |> ignore - - let actual = ResizeArray() - (rxquery { - for x in a do - zip y in b - yield x, y - }).Subscribe(actual.Add) |> ignore - - Assert.That(List.ofSeq actual = List.ofSeq expected) - -[] -let ``Test should show the stack overflow is fixed with Rx 2 beta``() = - let test() = - let rec g x = observe { - yield x - if x < 100000 then - yield! g (x + 1) } - g 5 |> Observable.subscribeWithCallbacks ignore ignore ignore |> ignore - Assert.DoesNotThrow(TestDelegate(fun () -> test())) - -[] -let ``RxQueryBuilder.Head can return first item`` () = - let test = observe { - yield 1 - yield 2 - yield 3 - yield 4 } - - let query = rxquery { - for x in test do - head } - - query |> Observable.subscribe (fun x -> Assert.AreEqual(1, x)) |> ignore - -[] -let ``RxQueryBuilder.ExactlyOne can returns only one item`` () = - let test = observe { yield 1 } - - let query = rxquery { - for x in test do - exactlyOne } - - query |> Observable.subscribe (fun x -> Assert.AreEqual(1, x)) |> ignore - -[] -let ``groupBy in Rx builder matches GroupBy method`` () = - let nat = Observable.range 0 10 - let query = rxquery { - for i in nat do - groupBy (i % 3) into grp - yield grp.Key - } - - Assert.IsTrue([0; 1; 2;] |> Observable.equalsSeq query |> Observable.wait) - -[] -let ``groupByJoin in Rx builder matches GroupByJoin method`` () = - - let left = - [ - "2020-01-01 02:00:00", "Batch1" - "2020-01-01 03:00:00", "Batch2" - "2020-01-01 04:00:00", "Batch3" - ] |> Observable.ofSeq - - let right = - [ - "2020-01-01 01:00:00", "Production=2" - "2020-01-01 02:00:00", "Production=0" - "2020-01-01 03:00:00", "Production=3" - ] |> Observable.ofSeq - - - let never = Observable.neverWitness 0 - - let query = rxquery { - for l in left do - groupJoin right never never (fun r' -> r', l) into (grouped, l) - for (rtime, rvalue) in grouped do - let (ltime, lvalue) = l - where (ltime = rtime) - yield lvalue, rvalue - } - - let expected = ["Batch1", "Production=0"; "Batch2", "Production=3"] - let actual = query |> Observable.take expected.Length - Assert.IsTrue(expected |> Observable.equalsSeq actual |> Observable.wait) - -[] -let ``RxQueryBuilder.ExactlyOne throws when source contains more than one item`` () = - let test = observe { - yield 1 - yield 2 } - - let query = rxquery { - for x in test do - exactlyOne } - - Observable.subscribeWithError - (fun _ -> Assert.Fail("ExactlyOne should throw when source contains more than one element")) - (fun _ -> Assert.Pass()) - query |> ignore - -[] -let ``Zipping two observable sequences of different types creates a single zipped observable``() = - let obs1 = Observable.Return 1 - let obs2 = Observable.Return "A" - let zipped = Observable.zip obs1 obs2 - let result = zipped |> Observable.Wait - let expected = ( 1, "A" ) - - Assert.That(result, Is.EqualTo expected) - -[] -let ``ZipWith on two observable sequences of different types creates a single zipped observable``() = - let obs1 = Observable.Return 1 - let obs2 = Observable.Return "A" - let zipped = Observable.zipWith tuple obs1 obs2 - let result = zipped |> Observable.Wait - let expected = ( 1, "A" ) - - Assert.That(result, Is.EqualTo expected) - - -[] -let ``distinctKey uses the key function to decide whether an element has been seen before``() = - let result = ResizeArray() - let obs = Observable.ofSeq [ (1,3); (2,5); (2,7); (1,6); (3,5) ] - let expected = [ (1,3); (2,5); (3,5) ] - obs |> Observable.distinctKey fst - |> Observable.subscribe(result.Add) - |> ignore - - Assert.That(result, Is.EqualTo expected) - -[] -let ``distinctKeyCompare uses the key function and the comparer to decide whether an element has been seen before``() = - let comparer = { new System.Collections.Generic.IEqualityComparer with - member x.Equals(a,b) = a % 2 = b % 2 - member x.GetHashCode(a) = a % 2 } // Equivalence based on odd or even - let result = ResizeArray() - let obs = Observable.ofSeq [ (1,3); (2,5); (2,7); (1,6); (3,5) ] - let expected = [ (1,3); (2,5) ] - obs |> Observable.distinctKeyCompare fst comparer - |> Observable.subscribe(result.Add) - |> ignore - - Assert.That(result, Is.EqualTo expected) - -[] -let ``distinctUntilChangedKey uses the key function to decide whether an element has been seen before``() = - let result = ResizeArray() - let obs = Observable.ofSeq [ (1,3); (2,5); (2,7); (1,6); (3,5) ] - let expected = [ (1,3); (2,5); (1,6); (3,5) ] - obs |> Observable.distinctUntilChangedKey fst - |> Observable.subscribe(result.Add) - |> ignore - - Assert.That(result, Is.EqualTo expected) - -[] -let ``distinctUntilChangedKeyCompare uses the key function and the comparer to decide whether an element has been seen before``() = - let comparer = { new System.Collections.Generic.IEqualityComparer with - member x.Equals(a,b) = a % 2 = b % 2 - member x.GetHashCode(a) = a % 2 } // Equivalence based on odd or even - let result = ResizeArray() - let obs = Observable.ofSeq [ (1,3); (2,5); (2,7); (1,6); (3,5) ] - let expected = [ (1,3); (2,5); (1,6) ] - obs |> Observable.distinctUntilChangedKeyCompare fst comparer - |> Observable.subscribe(result.Add) - |> ignore - - Assert.That(result, Is.EqualTo expected) - -[] -let ``ofSeqOn enumerates its sequence on the specified scheduler``() = - let result = ResizeArray() - let items = [ 1; 2; 3] - let scheduler = TestScheduler() - - let obs = items |> Observable.ofSeqOn scheduler - obs |> Observable.subscribe(result.Add) - |> ignore - - Assert.That(result, Is.Empty) - scheduler.Start() - Assert.That(result, Is.EqualTo items) - -[] -let ``intervalOn produces a value at the specified rate on the supplied scheduler``() = - let result = ResizeArray() - let scheduler = TestScheduler() - let oneSecond = TimeSpan.FromSeconds(1.).Ticks - - let obs = Observable.intervalOn scheduler (TimeSpan.FromSeconds(2.)) - obs |> Observable.subscribe(result.Add) - |> ignore - - Assert.That(result, Is.Empty) - scheduler.AdvanceBy oneSecond; Assert.That(result, Is.Empty) - scheduler.AdvanceBy oneSecond; Assert.That(result, Has.Count.EqualTo 1) - scheduler.AdvanceBy oneSecond; Assert.That(result, Has.Count.EqualTo 1) - scheduler.AdvanceBy oneSecond; Assert.That(result, Has.Count.EqualTo 2) - -[] -let ``throttleOn produces a value at the specified rate on the supplied scheduler``() = - let result = ResizeArray() - use obs = new Subject() - let scheduler = TestScheduler() - let oneSecond = TimeSpan.FromSeconds(1.).Ticks - - obs |> Observable.throttleOn scheduler (TimeSpan.FromSeconds(2.)) - |> Observable.subscribe(result.Add) - |> ignore - - obs.OnNext(1); Assert.That(result, Is.Empty) - scheduler.AdvanceBy oneSecond; Assert.That(result, Is.Empty) - scheduler.AdvanceBy oneSecond - Assert.That(result, Is.EqualTo [1] ) - - obs.OnNext(2) - scheduler.AdvanceBy oneSecond; Assert.That(result, Is.EqualTo [1] ) - obs.OnNext(3) - scheduler.AdvanceBy oneSecond; Assert.That(result, Is.EqualTo [1] ) - scheduler.AdvanceBy oneSecond; Assert.That(result, Is.EqualTo [1; 3] ) - -[] -let ``combineLatest calls map function with pairs of latest values``() = - let result = ResizeArray() - use obs1 = new Subject() - use obs2 = new Subject() - let map (x, y) = x + (y / 2) - Observable.combineLatest obs1 obs2 - |> Observable.map map - |> Observable.subscribe(result.Add) - |> ignore - - Assert.That(result, Is.Empty) - obs1.OnNext 1 - Assert.That(result, Is.Empty) - obs1.OnNext 2 - Assert.That(result, Is.Empty) - obs2.OnNext 10 - Assert.That(result, Is.EqualTo [ 7 ] ) - obs2.OnNext 20 - Assert.That(result, Is.EqualTo [ 7; 12 ] ) - obs1.OnNext 3 - Assert.That(result, Is.EqualTo [ 7; 12; 13 ] ) - -[] -let ``combineLatestArray produces arrays of latest values``() = - let result = ResizeArray() - use obs1 = new Subject() - use obs2 = new Subject() - Observable.combineLatestArray [| obs1; obs2 |] - |> Observable.subscribe(result.Add) - |> ignore - - Assert.That(result, Is.Empty) - obs1.OnNext 1 - Assert.That(result, Is.Empty) - obs1.OnNext 2 - Assert.That(result, Is.Empty) - obs2.OnNext 10 - Assert.That(result, Is.EqualTo [ [| 2; 10 |] ] ) - obs2.OnNext 20 - Assert.That(result, Is.EqualTo [ [| 2; 10 |]; [| 2; 20 |] ] ) - obs1.OnNext 3 - Assert.That(result, Is.EqualTo [ [| 2; 10 |]; [| 2; 20 |]; [| 3; 20 |] ] ) - -[] -let ``combineLatestSeq produces lists of latest values``() = - let result = ResizeArray() - use obs1 = new Subject() - use obs2 = new Subject() - let sources = [ obs1 :> IObservable<_>; obs2 :> IObservable<_>] |> Seq.ofList - Observable.combineLatestSeq sources - |> Observable.subscribe(result.Add) - |> ignore - - Assert.That(result, Is.Empty) - obs1.OnNext 1 - Assert.That(result, Is.Empty) - obs1.OnNext 2 - Assert.That(result, Is.Empty) - obs2.OnNext 10 - Assert.That(result, Is.EqualTo [ [2; 10] ] ) - obs2.OnNext 20 - Assert.That(result, Is.EqualTo [ [2; 10]; [2; 20] ] ) - obs1.OnNext 3 - Assert.That(result, Is.EqualTo [ [2; 10]; [2; 20]; [3; 20] ] ) - -[] -let ``combineLatestSeqMap applies map function to latest values``() = - let result = ResizeArray() - use obs1 = new Subject() - use obs2 = new Subject() - let sources = [ obs1 :> IObservable<_>; obs2 :> IObservable<_>] |> Seq.ofList - let map xs = xs |> Seq.sum - Observable.combineLatestSeqMap map sources - |> Observable.subscribe(result.Add) - |> ignore - - Assert.That(result, Is.Empty) - obs1.OnNext 1 - Assert.That(result, Is.Empty) - obs1.OnNext 2 - Assert.That(result, Is.Empty) - obs2.OnNext 10 - Assert.That(result, Is.EqualTo [ 12 ] ) - obs2.OnNext 20 - Assert.That(result, Is.EqualTo [ 12; 22 ] ) - obs1.OnNext 3 - Assert.That(result, Is.EqualTo [ 12; 22; 23 ] ) - -[] -let ``replay replays all notifications upon subscription``() = - let result = ResizeArray() - use subject = new Subject() - - let obs = subject |> Observable.replay - obs |> Observable.connect - |> ignore - - subject.OnNext 1 - subject.OnNext 2 - subject.OnNext 3 - - obs |> Observable.subscribe(result.Add) - |> ignore - - Assert.That(result, Is.EqualTo [ 1; 2; 3 ] ) - subject.OnNext 4 - Assert.That(result, Is.EqualTo [ 1; 2; 3; 4 ] ) - - -[] -let ``replayBuffer replays only the required count of notifications upon subscription``() = - let result = ResizeArray() - use subject = new Subject() - - let obs = subject |> Observable.replayBuffer 2 - obs |> Observable.connect - |> ignore - - subject.OnNext 1 - subject.OnNext 2 - subject.OnNext 3 - - obs |> Observable.subscribe(result.Add) - |> ignore - - Assert.That(result, Is.EqualTo [ 2; 3 ] ) - subject.OnNext 4 - Assert.That(result, Is.EqualTo [ 2; 3; 4 ] ) - - -[] -let ``replayBufferOn replays only the required count of notifications upon subscription``() = - let oneSecond = TimeSpan.FromSeconds(1.).Ticks - let result = ResizeArray() - use subject = new Subject() - let scheduler = TestScheduler() - - let obs = subject |> Observable.replayBufferOn scheduler 2 - obs |> Observable.connect - |> ignore - - scheduler.AdvanceBy(oneSecond); subject.OnNext 1 - scheduler.AdvanceBy(oneSecond); subject.OnNext 2 - scheduler.AdvanceBy(oneSecond); subject.OnNext 3 - scheduler.AdvanceBy(oneSecond); - - obs |> Observable.subscribe(result.Add) - |> ignore - - scheduler.Start() - Assert.That(result, Is.EqualTo [ 2; 3 ] ) - scheduler.AdvanceBy(oneSecond); subject.OnNext 4 - scheduler.AdvanceBy(oneSecond); - printf "9: %A\n" (result |> List.ofSeq) - Assert.That(result, Is.EqualTo [ 2; 3; 4 ] ) - printf "10: %A\n" (result |> List.ofSeq) - -[] -let ``replayWindowOn replays only the required time range of notifications upon subscription``() = - let oneSecond = TimeSpan.FromSeconds(1.).Ticks - let result = ResizeArray() - use subject = new Subject() - let scheduler = TestScheduler() - - let obs = subject |> Observable.replayWindowOn scheduler (TimeSpan.FromSeconds(3.)) - obs |> Observable.connect - |> ignore - - scheduler.AdvanceBy(oneSecond); subject.OnNext 1 - scheduler.AdvanceBy(oneSecond); subject.OnNext 2 - scheduler.AdvanceBy(oneSecond); subject.OnNext 3 - scheduler.AdvanceBy(oneSecond); subject.OnNext 4 - scheduler.AdvanceBy(oneSecond) - - obs |> Observable.subscribe(result.Add) - |> ignore - - scheduler.Start() - Assert.That(result, Is.EqualTo [ 2; 3; 4 ] ) - -[] -let ``replayBufferWindowOn replays only the required time range of notifications upon subscription``() = - let oneSecond = TimeSpan.FromSeconds(1.).Ticks - let result = ResizeArray() - use subject = new Subject() - let scheduler = TestScheduler() - - let obs = subject |> Observable.replayBufferWindowOn scheduler 4 (TimeSpan.FromSeconds(3.)) - obs |> Observable.connect - |> ignore - - scheduler.AdvanceBy(oneSecond); subject.OnNext 1 - scheduler.AdvanceBy(oneSecond); subject.OnNext 2 - scheduler.AdvanceBy(oneSecond); subject.OnNext 3 - scheduler.AdvanceBy(oneSecond); subject.OnNext 4 - scheduler.AdvanceBy(oneSecond) - - obs |> Observable.subscribe(result.Add) - |> ignore - - scheduler.Start() - Assert.That(result, Is.EqualTo [ 2; 3; 4 ] ) - -[] -let ``replayBufferWindowOn replays only the required count of notifications upon subscription``() = - let oneSecond = TimeSpan.FromSeconds(1.).Ticks - let result = ResizeArray() - use subject = new Subject() - let scheduler = TestScheduler() - - let obs = subject |> Observable.replayBufferWindowOn scheduler 2 (TimeSpan.FromSeconds(3.)) - obs |> Observable.connect - |> ignore - - scheduler.AdvanceBy(oneSecond); subject.OnNext 1 - scheduler.AdvanceBy(oneSecond); subject.OnNext 2 - scheduler.AdvanceBy(oneSecond); subject.OnNext 3 - scheduler.AdvanceBy(oneSecond); subject.OnNext 4 - scheduler.AdvanceBy(oneSecond) - - obs |> Observable.subscribe(result.Add) - |> ignore - - scheduler.Start() - Assert.That(result, Is.EqualTo [ 3; 4 ] ) - -[] -let ``timestampOn uses timestamps from the supplied scheduler``() = - let oneSecond = TimeSpan.FromSeconds(1.).Ticks - let result = ResizeArray() - use subject = new Subject() - let scheduler = TestScheduler() - - let obs = subject |> Observable.materialize - |> Observable.timestampOn scheduler - |> Observable.subscribe(result.Add) - |> ignore - - scheduler.AdvanceBy(oneSecond) - let firstNotificationAt = scheduler.Now - subject.OnNext 1 - - scheduler.AdvanceBy(oneSecond) - let secondNotificationAt = scheduler.Now - subject.OnNext 2 - - Assert.That(result, Has.Count.EqualTo 2) - Assert.That(result.[0].Timestamp, Is.EqualTo firstNotificationAt) - Assert.That(result.[1].Timestamp, Is.EqualTo secondNotificationAt) - -[] -let ``Observable.Create should support a simple observable returning fun () -> ()``() = - let obs = - fun (o:IObserver<_>) -> - o.OnNext("xxx") - o.OnCompleted() - fun () -> () - |> Observable.Create - - use x = obs.Subscribe(fun result -> Assert.That(result, Is.EqualTo "xxx")) - () - -[] -let ``Observable.Create should support a simple observable returning ignore``() = - let obs = - Observable.Create(fun (o : IObserver<_>) -> - o.OnNext("xxx") - o.OnCompleted() - ignore) - - use x = obs.Subscribe(fun result -> Assert.That(result, Is.EqualTo "xxx")) - () - -[] -let ``Observable.Create should support a simple observable returning Disposable.Empty``() = - let obs = - fun (o:IObserver<_>) -> - o.OnNext("xxx") - o.OnCompleted() - Disposable.Empty - |> Observable.Create - - use x = obs.Subscribe(fun result -> Assert.That(result, Is.EqualTo "xxx")) - () - -[] -let ``Observable.subscribeOn should run subscription on another thread`` () = - let expected = "Hello World" - let scheduler = new TestScheduler() - let result = ResizeArray() - let oneSecond = TimeSpan.FromSeconds(1.).Ticks - let obs = - Observable.Create(fun (o : IObserver<_>) -> - scheduler.Schedule(Action(fun () -> o.OnNext(expected))) - ) - use x = obs - |> Observable.subscribeOn(scheduler) - |> Observable.subscribe(result.Add) - Assert.IsTrue(result |> Seq.isEmpty) - - scheduler.AdvanceBy(oneSecond) - Assert.That(result.[0], Is.EqualTo expected) - () - -[] -let ``FlatMapAsync should take F# async workflows and flatmap them to observables``() = - let expected = "fake header" - let fakeHttpRequest _ = - async { return expected } - let result = ResizeArray() - let subject = new Subject() - - use mapper = subject - |> Observable.flatmapAsync fakeHttpRequest - |> Observable.subscribe result.Add - - Assert.That(result.Count, Is.EqualTo 0) - - subject.OnNext("www.google.com") - subject.OnNext("www.microsoft.com") - subject.OnNext("www.apple.com") - - System.Threading.Thread.Sleep 100 - // HACK: Yes this is using a Thread.Sleep. This is a problem in the current version of Rx - // interoping with other concurrency models. James World has a great Stackoverflow post - // on the problems with this : http://stackoverflow.com/a/28236216 - // Dave Sexton has made a pull request to try to resolve these issues: - // https://github.com/Reactive-Extensions/Rx.NET/pull/65 - // - // It looks like this will be in the next version of Rx to allow use of TestScheduler - // but for now we live with this hack - - Assert.That(result.Count, Is.EqualTo 3) - Assert.That(result.[0], Is.EqualTo expected) - Assert.That(result.[1], Is.EqualTo expected) - Assert.That(result.[2], Is.EqualTo expected) - -[] -let ``Observable.mapi should be equivalent to Array.mapi`` ()= - Check.QuickThrowOnFailure <| - fun (items : int array) -> - items - |> Observable.ofSeq - |> Observable.mapi (fun i x -> (i, x)) - |> Observable.toEnumerable - |> Seq.toArray - |> (=) (items |> Array.mapi (fun i x -> (i, x))) - -[] -let ``Observable.mapTo always maps to constant`` () = - Check.QuickThrowOnFailure <| - fun (xs : int array) (y : int) -> - Observable.ofSeq xs - |> Observable.mapTo y - |> Observable.toEnumerable - |> Seq.toList - |> (=) (List.replicate xs.Length y) - -[] -let ``filteri should be equivalent to mapi then filter`` () = - Check.QuickThrowOnFailure <| - fun (items : int array) -> - let predicate i x = (i % 2 = 0) && (x > 0) - - let filtered = - items - |> Observable.ofSeq - |> Observable.mapi (fun i x -> (i, x)) - |> Observable.filter (fun (i, x) -> predicate i x) - |> Observable.map snd - |> Observable.toEnumerable - |> Seq.toArray - - let filtered' = - Observable.ofSeq items - |> Observable.filteri predicate - |> Observable.toEnumerable - |> Seq.toArray - - filtered = filtered' - -[] -let ``serve subscribes to all created observables`` () = - TestSchedule.usage <| fun sch -> - Observable.serve 1 (fun () -> Observable.range 0 10) - |> Observable.takeUntilOther (Observable.timerSpan (TimeSpan.FromMilliseconds 100.)) - |> TestSchedule.subscribeTestObserver sch - |> TestObserver.nexts - |> fun xs -> Assert.Greater (xs.Length, 10) - -[] -type ObservableTests_WithTestNotifications () = - - let ``concat nexts with first error`` (TestNotifications ms) = - let nexts = List.takeWhile isNext ms - let fstError = List.tryFind isError ms |> Option.toList - nexts @ fstError - - static member Exceptions = Gen.constant (exn "Test Exception") |> Arb.fromGen - - [] - member __.Setup () = - Arb.register () |> ignore - Arb.register () |> ignore - - [] - member __. ``choose should only pick 'Some' emits`` () = - Check.QuickThrowOnFailure <| - fun (f : int -> int option) ms -> - TestSchedule.usage <| fun sch -> - TestSchedule.hotObservable sch ms - |> Observable.retry - |> Observable.choose f - |> TestSchedule.subscribeTestObserverStart sch - |> TestObserver.nexts - |> (=) (TestNotification.nexts ms |> List.choose f) - - [] - member __. ``throwing an exception inside choose routes it to an OnError and does not lead to the exception flowing out`` () = - let o = Observable.ofSeq [1;2;3] |> Observable.choose (fun _ -> failwith "qwe") - let error_flows_out = ref false - try o |> Observable.subscribeWithError (printfn "%i") (printfn "%A") |> ignore - with _ -> error_flows_out := true - Assert.That(!error_flows_out, Is.EqualTo false) - o |> ``should be`` 0 true false - - [] - member __.``switchMap maps to new observable`` () = - Check.QuickThrowOnFailure <| - fun (xs : int list) (ys : int list) -> - TestSchedule.usage <| fun sch -> - Observable.ofSeq xs - |> Observable.switchMap (fun _ -> Observable.ofSeq ys) - |> TestSchedule.subscribeTestObserverStart sch - |> TestObserver.nexts - |> fun zs -> - let emptyWhenAnyEmpty = (xs = [] || ys = []) = (zs = []) - let collectWhenGreater = (List.collect (fun _ -> ys) xs) = zs - emptyWhenAnyEmpty .|. collectWhenGreater - |> Prop.collect (printfn "Source: %A, Inner: %A, Result: %A" xs ys zs) - - [] - member __.``exhaustMap maps all incoming source emits`` () = - Check.QuickThrowOnFailure <| - fun (xs : int list) (f : int -> int) -> - TestSchedule.usage <| fun sch -> - let inner = xs |> List.map f - let got = - Observable.ofSeq xs - |> Observable.exhaustMap (fun _ -> Observable.ofSeq inner) - |> TestSchedule.subscribeTestObserverStart sch - |> TestObserver.nexts - let expected = inner - - expected = got - - [] - member __.``exhaustMap with interval`` () = - let source = Observable.interval (TimeSpan.FromSeconds 1.) - source - |> Observable.delay (TimeSpan.FromMilliseconds 10.) - |> Observable.take 4 - |> Observable.merge (Observable.single 1L) - |> Observable.exhaustMap (fun _ -> source |> Observable.take 5) - |> Observable.toEnumerable - |> Seq.toList - |> fun ys -> Assert.AreEqual ([0L..3L], ys) - - [] - member __. ``catchOption maps to 'None' type when 'OnError'`` () = - Check.QuickThrowOnFailure <| fun xs -> - TestSchedule.usage <| fun sch -> - TestSchedule.coldObservable sch xs - |> Observable.catchOption - |> TestSchedule.subscribeTestObserverStart sch - |> TestObserver.nexts - |> (=) (``concat nexts with first error`` xs - |> List.map TestNotification.toOption) - - [] - member __.``catchResult maps to 'Error' when 'OnError'`` () = - Check.QuickThrowOnFailure <| fun xs -> - TestSchedule.usage <| fun sch -> - TestSchedule.coldObservable sch xs - |> Observable.catchResult Observable.single - |> TestSchedule.subscribeTestObserverStart sch - |> TestObserver.nexts - |> (=) (``concat nexts with first error`` xs - |> List.map TestNotification.toResult) - - [] - member __.``consumes the emits by the producer: Test Hot Observable`` () = - Check.QuickThrowOnFailure <| fun ms x -> - TestSchedule.usage <| fun sch -> - TestSchedule.hotObservable sch ms - |> Observable.consumeMap (fun _ -> Observable.single x) - |> TestSchedule.subscribeTestObserverStart sch - |> TestObserver.nexts - |> fun xs -> (List.replicate xs.Length x) = xs - - [] - member __.``consumes the optional emits by the producer: Test Hot Observable``() = - Check.QuickThrowOnFailure <| fun (xs : int list) (x : int) -> - (List.length xs >= 2) ==> lazy - TestSchedule.usage <| fun sch -> - let completeNow = ref false - Observable.ofSeq xs - |> Observable.consumeNextOn Scheduler.Immediate (fun _ -> - if !completeNow then None - else completeNow := true; Some x) - |> TestSchedule.subscribeTestObserverStart sch - |> TestObserver.nexts - |> (=) [x] - - diff --git a/tests/SchedulerSpecs.fs b/tests/SchedulerSpecs.fs deleted file mode 100644 index 049cae1..0000000 --- a/tests/SchedulerSpecs.fs +++ /dev/null @@ -1,140 +0,0 @@ -module Control.Reactive.Tests.SchedulerSpecs - -open System -open System.Collections.Generic -open System.Reactive.Concurrency -open NUnit.Framework -open FSharp.Control.Reactive.Testing -open FSharp.Control.Reactive -open System.Threading -open System.Reactive -open Microsoft.Reactive.Testing -open System.Reactive.Disposables -open FSharp.Control.Reactive.Scheduler - -let equal x y = Assert.AreEqual (x, y) -let isTrue x = Assert.True (x : bool) - -[] -let ``schedule immediate non-recursive action`` () = - let mutable res = false - Scheduler.Immediate - |> Schedule.action (fun () -> res <- true) - |> Disposable.ignoring (fun () -> isTrue res) - -[] -let ``schedule immediate recursive action`` () = - let i = ref 0 - Scheduler.Immediate - |> Schedule.actionRec (fun f -> incr i; if !i < 10 then f ()) - |> Disposable.ignoring (fun () -> equal !i 10) - -[] -let ``schedule immediate action`` () = - let x = ref 0 - Scheduler.Immediate - |> Schedule.funcSpan 42 TimeSpan.Zero (fun s y -> x := y; Disposable.Empty) - |> Disposable.ignoring (fun () -> equal 42 !x) - -[] -let ``schedule long-running`` () = - let x, e = WaitHandle.Signal, WaitHandle.Signal - TaskPoolScheduler.Default - |> Scheduler.AsLongRunning - |> Schedule.actionLongState 42 (fun _ c -> - while not c.IsDisposed do WaitHandle.flag x - WaitHandle.flag e) - |> Disposable.ignoring x.WaitOne - WaitHandle.wait e - -[] -let ``schedule periodic 1`` () = - let n = ref 0 - let e = WaitHandle.Signal - Scheduler.Default - |> Schedule.periodicAction - (TimeSpan.FromMilliseconds 50.) - (fun () -> incr n; if !n = 10 then WaitHandle.flag e) - |> Disposable.ignoring e.WaitOne - -[] -let ``catch built-in swallow shallow`` () = - let finish = WaitHandle.Signal - Scheduler.Default - |> Schedule.catch (fun _ -> WaitHandle.flag finish; true) - |> Schedule.action (fun () -> failwith "Something happend!") - |> Disposable.ignoring finish.WaitOne - -[] -let ``schedule async`` () = - TestSchedule.usage <| fun sch -> - let o = sch.CreateObserver () - sch |> Schedule.async (fun s ct -> async { o.OnNext 42 }) - |> ignore - sch.Start () - equal (TestObserver.nexts o) [42] - -[] -let ``schedule async with due time`` () = - TestSchedule.usage <| fun sch -> - let o = sch.CreateObserver () - sch |> Schedule.asyncSpanUnit - (TimeSpan.FromTicks 50L) - (fun s ct -> async { o.OnNext 42 }) - |> Disposable.ignoring sch.Start - equal (TestObserver.nexts o) [42] - -[] -[] -let ``schedule sleep cancel`` () = - let e = WaitHandle.Signal - let cts = new CancellationTokenSource () - Scheduler.Default - |> Schedule.sleepCancel (TimeSpan.FromHours 1.) cts.Token - |> fun a -> async.TryFinally(a, fun () -> WaitHandle.flag e) - |> Async.Ignore - |> Async.Start - cts.Cancel () - WaitHandle.wait e - -[] -let ``schedule async without cancellation`` () = - TestSchedule.usage <| fun sch -> - let o = sch.CreateObserver () - sch |> Schedule.async (fun s _ -> async { - o.OnNext 42 - do! Schedule.yield_ s - o.OnNext 43 - do! Schedule.sleep (TimeSpan.FromTicks 10L) s - o.OnNext 44 - do! Schedule.sleepOffset (new DateTimeOffset (250L, TimeSpan.Zero)) s - o.OnNext 45 }) - |> Disposable.ignoring sch.Start - - equal (TestObserver.nexts o) [42..45] - -[] -let ``schedule with disabled optimazations isn't long-running`` () = - TaskPoolScheduler.Default - |> Schedule.disableOptimizations - |> Scheduler.asLongRunning - |> equal None - -let days i = (new DateTimeOffset(1979, 10, 31, 4, 30, 15, TimeSpan.Zero)).AddDays (float i) -let stamped x stamp = new Timestamped<_> (x, stamp) - -let schedule (xs : List<_>) x y (sch : IScheduler) = - Schedule.actionOffset (days x) (fun () -> xs.Add (stamped y sch.Now)) sch - -[] -let ``schedule historical advanced-by`` () = - let xs = new List> () - let sch = Scheduler.Historical - sch - |> Schedule.multiple ( - [0; 1; 2; 10; 11] - |> List.map (fun i -> schedule xs i i)) - |> Disposable.ignoring (fun () -> (days 8 - sch.Now) |> sch.AdvanceBy) - [0..2] - |> List.map (fun i -> stamped i (days i)) - |> equal xs \ No newline at end of file diff --git a/tests/SubjectSpecs.fs b/tests/SubjectSpecs.fs deleted file mode 100644 index ea9e8ac..0000000 --- a/tests/SubjectSpecs.fs +++ /dev/null @@ -1,54 +0,0 @@ -module FSharp.Reactive.Tests.SubjectSpecs - -open NUnit.Framework -open FsCheck -open FSharp.Control.Reactive -open FSharp.Control.Reactive.Testing - -[] -let ``Broadcast Subject broadcast to all observers`` () = - Check.QuickThrowOnFailure <| fun (xs : int list) -> - TestSchedule.usage <| fun sch -> - use s = Subject.broadcast - let observer = TestSchedule.subscribeTestObserver sch s - - Subject.onNexts xs s - |> Subject.onCompleted - |> ignore - - TestObserver.nexts observer = xs - -[] -let ``Async Subject emits only last value of asnychronous operation`` () = - Check.QuickThrowOnFailure <| fun (NonEmptyArray xs : NonEmptyArray) -> - TestSchedule.usage <| fun sch -> - use s = Subject.async - Subject.onNexts xs s - |> Subject.onCompleted - |> TestSchedule.subscribeTestObserver sch - |> TestObserver.nexts - |> (=) [Array.last xs] - -[] -let ``Behavior Subject remembers last emited value for next observers`` () = - Check.QuickThrowOnFailure <| fun (x : int) (y : int) -> - TestSchedule.usage <| fun sch -> - use s = Subject.behavior x - let before, after = - TestSchedule.subscribeBeforeAfter - sch s (Subject.onNext y) - - Subject.onCompleted s |> ignore - (TestObserver.nexts before = [x; y]) |@ "Subscribe before 'OnNexts'" .&. - (TestObserver.nexts after = [y]) |@ "Subscribe after 'OnNexts'" - -[] -let ``Replay Subject re-emits notificatiosn to future observers`` () = - Check.QuickThrowOnFailure <| fun (xs : int list) -> - TestSchedule.usage <| fun sch -> - use s = Subject.replay - let before, after = - TestSchedule.subscribeBeforeAfter - sch s (Subject.onNexts xs >> Subject.onCompleted) - - TestObserver.nexts before = TestObserver.nexts after diff --git a/tests/paket.references b/tests/paket.references deleted file mode 100644 index a70f605..0000000 --- a/tests/paket.references +++ /dev/null @@ -1,7 +0,0 @@ -FSharp.Core -FsCheck -Microsoft.NET.Test.Sdk -Microsoft.Reactive.Testing -NUnit -NUnit.Runners -NUnit3TestAdapter \ No newline at end of file diff --git a/tutorial.html b/tutorial.html new file mode 100644 index 0000000..0b47f11 --- /dev/null +++ b/tutorial.html @@ -0,0 +1,248 @@ + + + + + Getting Started + + + + + + + + + + + + + + + + +
+ +
+
+
+

Getting Started

+

The easiest way to get started using FSharp.Control.Reactive is to take a look at the tests. In general, you can consider the Observable module as providing a set of extensions to the built-in Observable module.

+

Observable Module

+

As a first, simple example, the built-in module does not include a zip operator, but FSharp.Control.Reactive fills in this gap:

+ + + +
1: 
+2: 
+3: 
+4: 
+5: 
+6: 
+7: 
+8: 
+
open FSharp.Control.Reactive
+
+let obs1 = Observable.single 1
+let obs2 = Observable.single "A"
+
+Observable.zip obs1 obs2
+|> Observable.subscribe (printfn "%A")
+|> ignore
+
+

Computation Expressions

+

The provided computation expressions open new approaches for constructing and combining Observable computations. The observe computation expression provides a simple workflow using the essential LINQ operators:

+ + + +
 1: 
+ 2: 
+ 3: 
+ 4: 
+ 5: 
+ 6: 
+ 7: 
+ 8: 
+ 9: 
+10: 
+
open FSharp.Control.Reactive.Builders
+
+let rec generate x =
+    observe {
+        yield x
+        if x < 100000 then
+            yield! generate (x + 1) }
+generate 5
+|> Observable.subscribeWithCallbacks ignore ignore ignore
+|> ignore
+
+

You can find a few additional examples of both the observe and rxquery computation expressions on the source blog post.

+

Reactive Extensions

+

For more information on Rx, check out the Rx Workshop on Channel 9. The examples provided in the workshop should be easy to port to FSharp.Control.Reactive. The Beginner's Guide to the Reactive Extensions includes many other links to excellent content.

+

Reactive Testing

+

The Rx.NET has several OOP-minded objects to test Reactive Applications. This package contains some wrappers to make your Reactive Tests more functional.

+

Following test shows how the Broadcast Subject can be tested:

+ + + +
 1: 
+ 2: 
+ 3: 
+ 4: 
+ 5: 
+ 6: 
+ 7: 
+ 8: 
+ 9: 
+10: 
+11: 
+12: 
+13: 
+14: 
+15: 
+16: 
+
open NUnit.Framework
+open FsCheck
+open FSharp.Control.Reactive.Testing
+
+[<Test>]
+let ``Broadcast Subject broadcast to all observers`` () =
+    Check.QuickThrowOnFailure <| fun (xs : int list) ->
+        TestSchedule.usage <| fun sch ->
+            use s = Subject.broadcast
+            let observer = TestSchedule.subscribeTestObserver sch s
+
+            Subject.onNexts xs s 
+            |> Subject.onCompleted 
+            |> ignore
+            
+            TestObserver.nexts observer = xs
+
+
    +
  • The TestSchedule.usage call wil make sure we have a virtual time scheduler that we can use to sync our different observables and observers.
  • +
  • The subscribeTestObserver call will subscribe the given observable to a TestObserver.
  • +
  • This TestObserver can be used to assert on the emits that the SUT sends to it by using the TesteObserver module. (TestObserver.nexts, TestObserver.all, TestObserver.errors)
  • +
+

The testing package also contains generated TestNotifications which we can use to simulate a stream of emits. +This values has to be registered first before using.

+

Following example shows how the Functor Law can be testsd by creating a Hot Observable of simulated emits.

+ + + +
 1: 
+ 2: 
+ 3: 
+ 4: 
+ 5: 
+ 6: 
+ 7: 
+ 8: 
+ 9: 
+10: 
+11: 
+12: 
+13: 
+14: 
+15: 
+
[<SetUp>]
+member __.Setup () =
+    Arb.register<GenTestNotification> () |> ignore
+
+[<Test>]
+member __.``Functor Law of Observables`` () =
+    Check.QuickThrowOnFailure <| 
+        fun (TestNotifications ms : TestNotifications<int>) (f : int -> int) (g : int -> int) ->
+            TestSchedule.usage <| fun sch ->
+                TestSchedule.hotObservable sch ms
+                |> Observable.retry
+                |> Observable.map f
+                |> Observable.map g
+                |> TestSchedule.subscribeTestObserverStart sch
+                |> TestObserver.nexts = TestNotification.mapNexts (f >> g) ms
+
+

NOTE: the previous test contains a Observable.retry call because the simulated emits will possible contain 'OnError' emits as well. +See: https://github.com/fsprojects/FSharp.Control.Reactive/blob/master/src/FSharp.Control.Reactive.Testing/TestNotifications.fs for more info on how the simulated emits are generated.

+ +
Multiple items
namespace FSharp

--------------------
namespace Microsoft.FSharp
+
Multiple items
namespace FSharp.Control

--------------------
namespace Microsoft.FSharp.Control
+
namespace FSharp.Control.Reactive
+
val obs1 : System.IObservable<int>
+
Multiple items
module Observable

from FSharp.Control.Reactive

--------------------
module Observable

from Microsoft.FSharp.Control
+
val single : value:'Result -> System.IObservable<'Result>
+
val obs2 : System.IObservable<string>
+
val zip : first:System.IObservable<'Source1> -> second:System.IObservable<'Source2> -> System.IObservable<'Source1 * 'Source2>
+
Multiple items
val subscribe : onNext:('T -> unit) -> observable:System.IObservable<'T> -> System.IDisposable

--------------------
val subscribe : callback:('T -> unit) -> source:System.IObservable<'T> -> System.IDisposable
+
val printfn : format:Printf.TextWriterFormat<'T> -> 'T
+
val ignore : value:'T -> unit
+
module Builders

from FSharp.Control.Reactive
+
val generate : x:int -> System.IObservable<int>
+
val x : int
+
val observe : ObservableBuilder
+
val subscribeWithCallbacks : onNext:('T -> unit) -> onError:(exn -> unit) -> onCompleted:(unit -> unit) -> observable:System.IObservable<'T> -> System.IDisposable
+
namespace NUnit
+
namespace NUnit.Framework
+
namespace FsCheck
+
namespace FSharp.Control.Reactive.Testing
+
Multiple items
type TestAttribute =
  inherit NUnitAttribute
  new : unit -> TestAttribute
  member ApplyToTest : test:Test -> unit
  member Author : string with get, set
  member BuildFrom : method:IMethodInfo * suite:Test -> TestMethod
  member Description : string with get, set
  member ExpectedResult : obj with get, set
  member TestOf : Type with get, set

--------------------
TestAttribute() : TestAttribute
+
val ( Broadcast Subject broadcast to all observers ) : unit -> unit
+
type Check =
  static member All : config:Config -> unit
  static member All : config:Config * test:Type -> unit
  static member Method : config:Config * methodInfo:MethodInfo * ?target:obj -> unit
  static member One : config:Config * property:'Testable -> unit
  static member One : name:string * config:Config * property:'Testable -> unit
  static member Quick : property:'Testable -> unit
  static member Quick : name:string * property:'Testable -> unit
  static member QuickAll : unit -> unit
  static member QuickAll : test:Type -> unit
  static member QuickThrowOnFailure : property:'Testable -> unit
  ...
+
static member Check.QuickThrowOnFailure : property:'Testable -> unit
+
val xs : int list
+
Multiple items
val int : value:'T -> int (requires member op_Explicit)

--------------------
type int = int32

--------------------
type int<'Measure> = int
+
type 'T list = List<'T>
+
module TestSchedule

from FSharp.Control.Reactive.Testing
+
val usage : f:(Reactive.Testing.TestScheduler -> 'a) -> 'a
+
val sch : Reactive.Testing.TestScheduler
+
val s : System.Reactive.Subjects.Subject<int>
+
Multiple items
module Subject

from FSharp.Control.Reactive

--------------------
type Subject<'a> =
  private new : unit -> Subject<'a>
  static member behavior : x:'a -> BehaviorSubject<'a>
  static member async : AsyncSubject<'a>
  static member broadcast : Subject<'a>
  static member replay : ReplaySubject<'a>
+
property Subject.broadcast: System.Reactive.Subjects.Subject<'a> with get
+
val observer : Reactive.Testing.ITestableObserver<int>
+
val subscribeTestObserver : sch:Reactive.Testing.TestScheduler -> source:System.IObservable<'a> -> Reactive.Testing.ITestableObserver<'a>
+
val onNexts : xs:seq<'a> -> s:'b -> 'b (requires 'b :> System.Reactive.Subjects.SubjectBase<'a>)
+
val onCompleted : s:System.Reactive.Subjects.SubjectBase<'a> -> System.Reactive.Subjects.SubjectBase<'a>
+
module TestObserver

from FSharp.Control.Reactive.Testing
+
val nexts : o:Reactive.Testing.ITestableObserver<'a> -> 'a list
+
Multiple items
type SetUpAttribute =
  inherit NUnitAttribute
  new : unit -> SetUpAttribute

--------------------
SetUpAttribute() : SetUpAttribute
+
module Arb

from FsCheck
+
val register<'t> : unit -> TypeClass.TypeClassComparison
+
type GenTestNotification =
  static member GenNotifications : unit -> Arbitrary<TestNotifications<'a>>
+
Multiple items
union case TestNotifications.TestNotifications: TestNotification<'a> list -> TestNotifications<'a>

--------------------
type TestNotifications<'a> = | TestNotifications of TestNotification<'a> list
+
val hotObservable : s:Reactive.Testing.TestScheduler -> TestNotifications<'a> -> Reactive.Testing.ITestableObservable<'a>
+
val retry : source:System.IObservable<'Source> -> System.IObservable<'Source>
+
Multiple items
val map : f:('a -> 'b) -> source:System.IObservable<'a> -> System.IObservable<'b>

--------------------
val map : mapping:('T -> 'U) -> source:System.IObservable<'T> -> System.IObservable<'U>
+
val subscribeTestObserverStart : sch:Reactive.Testing.TestScheduler -> source:System.IObservable<'a> -> Reactive.Testing.ITestableObserver<'a>
+
Multiple items
module TestNotification

from FSharp.Control.Reactive.Testing

--------------------
type TestNotification<'a> = Reactive.Testing.Recorded<System.Reactive.Notification<'a>>
+
val mapNexts : f:('a -> 'b) -> (TestNotifications<'a> -> 'b list)
+ +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + +