Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add some WinRT goodness

  • Loading branch information...
commit 0a58aed7a8dac0dfb00a3a256365b4ef9d4fb6a6 1 parent 21b0695
@paulcbetts authored
View
30 LinqToAwait.sln
@@ -9,16 +9,46 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{9EB839
.nuget\NuGet.targets = .nuget\NuGet.targets
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinqToAwait_WinRT", "LinqToAwait\LinqToAwait_WinRT.csproj", "{2236C6E8-7519-4728-A167-ED722037C17D}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|ARM = Debug|ARM
Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|ARM = Release|ARM
Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {2236C6E8-7519-4728-A167-ED722037C17D}.Debug|ARM.ActiveCfg = Debug|ARM
+ {2236C6E8-7519-4728-A167-ED722037C17D}.Debug|ARM.Build.0 = Debug|ARM
+ {2236C6E8-7519-4728-A167-ED722037C17D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2236C6E8-7519-4728-A167-ED722037C17D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2236C6E8-7519-4728-A167-ED722037C17D}.Debug|x64.ActiveCfg = Debug|x64
+ {2236C6E8-7519-4728-A167-ED722037C17D}.Debug|x64.Build.0 = Debug|x64
+ {2236C6E8-7519-4728-A167-ED722037C17D}.Debug|x86.ActiveCfg = Debug|x86
+ {2236C6E8-7519-4728-A167-ED722037C17D}.Debug|x86.Build.0 = Debug|x86
+ {2236C6E8-7519-4728-A167-ED722037C17D}.Release|ARM.ActiveCfg = Release|ARM
+ {2236C6E8-7519-4728-A167-ED722037C17D}.Release|ARM.Build.0 = Release|ARM
+ {2236C6E8-7519-4728-A167-ED722037C17D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2236C6E8-7519-4728-A167-ED722037C17D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2236C6E8-7519-4728-A167-ED722037C17D}.Release|x64.ActiveCfg = Release|x64
+ {2236C6E8-7519-4728-A167-ED722037C17D}.Release|x64.Build.0 = Release|x64
+ {2236C6E8-7519-4728-A167-ED722037C17D}.Release|x86.ActiveCfg = Release|x86
+ {2236C6E8-7519-4728-A167-ED722037C17D}.Release|x86.Build.0 = Release|x86
+ {E8708FF7-B4AA-4028-98ED-F7D7FE373D7F}.Debug|ARM.ActiveCfg = Debug|Any CPU
{E8708FF7-B4AA-4028-98ED-F7D7FE373D7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E8708FF7-B4AA-4028-98ED-F7D7FE373D7F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E8708FF7-B4AA-4028-98ED-F7D7FE373D7F}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {E8708FF7-B4AA-4028-98ED-F7D7FE373D7F}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E8708FF7-B4AA-4028-98ED-F7D7FE373D7F}.Release|ARM.ActiveCfg = Release|Any CPU
{E8708FF7-B4AA-4028-98ED-F7D7FE373D7F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E8708FF7-B4AA-4028-98ED-F7D7FE373D7F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E8708FF7-B4AA-4028-98ED-F7D7FE373D7F}.Release|x64.ActiveCfg = Release|Any CPU
+ {E8708FF7-B4AA-4028-98ED-F7D7FE373D7F}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
View
145 LinqToAwait/LinqToAwait_WinRT.csproj
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{2236C6E8-7519-4728-A167-ED722037C17D}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>LinqToAwait</RootNamespace>
+ <AssemblyName>LinqToAwait_WinRT</AssemblyName>
+ <DefaultLanguage>en-US</DefaultLanguage>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\LinqToAwait\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE;NETFX_CORE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\ARM\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants>
+ <NoWarn>;2008</NoWarn>
+ <DebugType>full</DebugType>
+ <PlatformTarget>ARM</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>ExpressRules.ruleset</CodeAnalysisRuleSet>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
+ <OutputPath>bin\ARM\Release\</OutputPath>
+ <DefineConstants>TRACE;NETFX_CORE</DefineConstants>
+ <Optimize>true</Optimize>
+ <NoWarn>;2008</NoWarn>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>ARM</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>ExpressRules.ruleset</CodeAnalysisRuleSet>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x64\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants>
+ <NoWarn>;2008</NoWarn>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>ExpressRules.ruleset</CodeAnalysisRuleSet>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ <OutputPath>bin\x64\Release\</OutputPath>
+ <DefineConstants>TRACE;NETFX_CORE</DefineConstants>
+ <Optimize>true</Optimize>
+ <NoWarn>;2008</NoWarn>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>ExpressRules.ruleset</CodeAnalysisRuleSet>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;NETFX_CORE</DefineConstants>
+ <NoWarn>;2008</NoWarn>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>ExpressRules.ruleset</CodeAnalysisRuleSet>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <DefineConstants>TRACE;NETFX_CORE</DefineConstants>
+ <Optimize>true</Optimize>
+ <NoWarn>;2008</NoWarn>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>ExpressRules.ruleset</CodeAnalysisRuleSet>
+ <Prefer32Bit>true</Prefer32Bit>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="Operators.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Reference Include="System.Reactive.Core, Version=2.0.20304.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <HintPath>..\packages\Rx-Core.2.0.20304-beta\lib\WinRT45\System.Reactive.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Reactive.Interfaces, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <HintPath>..\packages\Rx-Interfaces.2.0.20304-beta\lib\WinRT45\System.Reactive.Interfaces.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Reactive.Linq, Version=2.0.20304.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <HintPath>..\packages\Rx-Linq.2.0.20304-beta\lib\WinRT45\System.Reactive.Linq.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Reactive.PlatformServices, Version=2.0.20304.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <HintPath>..\packages\Rx-PlatformServices.2.0.20304-beta\lib\WinRT45\System.Reactive.PlatformServices.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Reactive.Windows.Threading, Version=2.0.20304.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <HintPath>..\packages\Rx-Metro.2.0.20304-beta\lib\WinRT45\System.Reactive.Windows.Threading.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Reactive.WindowsRuntime, Version=2.0.20304.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <HintPath>..\packages\Rx-WinRT.2.0.20304-beta\lib\WinRT45\System.Reactive.WindowsRuntime.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' ">
+ <VisualStudioVersion>11.0</VisualStudioVersion>
+ </PropertyGroup>
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
+ <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
View
21 LinqToAwait/WinRTOps.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Reactive.Linq;
+using System.Reactive.Windows.Foundation;
+using Windows.Foundation;
+
+namespace LinqToAwait
+{
+ public static class LinqToAwaitWinRT
+ {
+ public static IObservable<TRet> SelectAsync<T, TRet>(this IObservable<T> This, Func<T, IAsyncOperation<TRet>> selector, bool preserveOrdering = false)
+ {
+ return preserveOrdering ?
+ This.Select(x => selector(x).ToObservable()).Concat() :
+ This.SelectMany(x => selector(x).ToObservable());
+ }
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.