Skip to content

Commit

Permalink
Merge pull request #734 from dotnet/ix-refs
Browse files Browse the repository at this point in the history
Ix Reference Assemblies
  • Loading branch information
Oren Novotny authored Jul 3, 2018
2 parents 393b157 + d6cbcb6 commit ee70f99
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .vsts.ix-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ steps:
displayName: Set Version
condition: eq(variables['system.pullrequest.isfork'], false)

- task: DotNetCoreCLI@2
inputs:
command: build
projects: Ix.NET/Source/refs/**/System.Interactive*.csproj
arguments: -c $(BuildConfiguration)
displayName: Build reference assemblies

- task: DotNetCoreCLI@2
inputs:
command: pack
Expand Down
2 changes: 1 addition & 1 deletion Ix.NET/Source/Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)ReactiveX.snk</AssemblyOriginatorKeyFile>
<NoWarn>$(NoWarn);1701;1702;CS1591</NoWarn>
<NoWarn>$(NoWarn);1701;1702;CS1591;NU5105</NoWarn>
<DefaultLanguage>en-US</DefaultLanguage>
<IsTestProject>$(MSBuildProjectName.Contains('Test'))</IsTestProject>
<DebugType>embedded</DebugType>
Expand Down
12 changes: 12 additions & 0 deletions Ix.NET/Source/Ix.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{87534290
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B733D97A-F1ED-4FC3-BF8E-9AC47A89DE96}"
ProjectSection(SolutionItems) = preProject
..\..\.vsts.ix-ci.yml = ..\..\.vsts.ix-ci.yml
..\..\.vsts.ix-pr.yml = ..\..\.vsts.ix-pr.yml
..\..\.vsts.ix-shared.yml = ..\..\.vsts.ix-shared.yml
CodeCoverage.runsettings = CodeCoverage.runsettings
Directory.build.props = Directory.build.props
Directory.build.targets = Directory.build.targets
Expand All @@ -25,6 +28,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Interactive.Tests",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Interactive.Async.Tests", "System.Interactive.Async.Tests\System.Interactive.Async.Tests.csproj", "{172BD8C4-5C3E-4928-9D3F-746CF336FFEC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Refs", "Refs", "{A3D72E6E-4ADA-42E0-8B2A-055B1F244281}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Interactive", "refs\System.Interactive\System.Interactive.csproj", "{2EC0C302-B029-4DDB-AC91-000BF11006AD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -55,13 +62,18 @@ Global
{172BD8C4-5C3E-4928-9D3F-746CF336FFEC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{172BD8C4-5C3E-4928-9D3F-746CF336FFEC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{172BD8C4-5C3E-4928-9D3F-746CF336FFEC}.Release|Any CPU.Build.0 = Release|Any CPU
{2EC0C302-B029-4DDB-AC91-000BF11006AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2EC0C302-B029-4DDB-AC91-000BF11006AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2EC0C302-B029-4DDB-AC91-000BF11006AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2EC0C302-B029-4DDB-AC91-000BF11006AD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{AFD2E6EC-C5B0-4276-A14A-467D786D0DDA} = {87534290-A7A6-47A4-9A3A-D0D21A9AD1D4}
{172BD8C4-5C3E-4928-9D3F-746CF336FFEC} = {87534290-A7A6-47A4-9A3A-D0D21A9AD1D4}
{2EC0C302-B029-4DDB-AC91-000BF11006AD} = {A3D72E6E-4ADA-42E0-8B2A-055B1F244281}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9B5F6126-CBBA-4C3A-A3BB-26AFE56DABEC}
Expand Down
4 changes: 3 additions & 1 deletion Ix.NET/Source/System.Interactive/Skip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace System.Linq
{
public static partial class EnumerableEx
{
#if !(REF_ASSM && NETCOREAPP2_0)
/// <summary>
/// Bypasses a specified number of contiguous elements from the end of the sequence and returns the remaining elements.
/// </summary>
Expand All @@ -32,6 +33,7 @@ public static IEnumerable<TSource> SkipLast<TSource>(this IEnumerable<TSource> s

return source.SkipLast_(count);
}
#endif

private static IEnumerable<TSource> SkipLast_<TSource>(this IEnumerable<TSource> source, int count)
{
Expand All @@ -47,4 +49,4 @@ private static IEnumerable<TSource> SkipLast_<TSource>(this IEnumerable<TSource>
}
}
}
}
}
33 changes: 33 additions & 0 deletions Ix.NET/Source/System.Interactive/System.Interactive.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,37 @@
<EmbeddedResource Include="Properties\System.Interactive.rd.xml" />
</ItemGroup>

<PropertyGroup>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);GetRefs</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>


<Target Name="GetRefs">

<MSBuild Projects="..\refs\System.Interactive\System.Interactive.csproj"
Targets="_GetReferenceAssemblies"
Properties="TargetFramework=$(TargetFramework)">

<Output TaskParameter="TargetOutputs" ItemName="_refAssms" />
</MSBuild>

<ItemGroup>
<TfmSpecificPackageFile Include="@(_refAssms)" PackagePath="ref/$(TargetFramework)" />
</ItemGroup>
</Target>

<Target Name="GetRefsWithoutLib" BeforeTargets="_GetPackageFiles">
<MSBuild Projects="..\refs\System.Interactive\System.Interactive.csproj"
Targets="_GetReferenceAssemblies"
Properties="TargetFramework=netcoreapp2.0">

<Output TaskParameter="TargetOutputs" ItemName="_refAssms20" />
</MSBuild>

<ItemGroup>
<None Include="@(_refAssms20)" PackagePath="ref/netcoreapp2.0" Pack="true" />
</ItemGroup>

</Target>

</Project>
4 changes: 3 additions & 1 deletion Ix.NET/Source/System.Interactive/Take.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace System.Linq
{
public static partial class EnumerableEx
{
#if !(REF_ASSM && NETCOREAPP2_0)
/// <summary>
/// Returns a specified number of contiguous elements from the end of the sequence.
/// </summary>
Expand All @@ -29,6 +30,7 @@ public static IEnumerable<TSource> TakeLast<TSource>(this IEnumerable<TSource> s

return source.TakeLast_(count);
}
#endif

private static IEnumerable<TSource> TakeLast_<TSource>(this IEnumerable<TSource> source, int count)
{
Expand All @@ -55,4 +57,4 @@ private static IEnumerable<TSource> TakeLast_<TSource>(this IEnumerable<TSource>
}
}
}
}
}
26 changes: 26 additions & 0 deletions Ix.NET/Source/refs/System.Interactive/System.Interactive.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>Interactive Extensions Main Library used to express queries over enumerable sequences.</Description>
<AssemblyTitle>Interactive Extensions - Main Library</AssemblyTitle>
<Authors>Microsoft</Authors>
<TargetFrameworks>net45;netstandard1.0;netstandard2.0;netcoreapp2.0</TargetFrameworks>
<PackageTags>Ix;Interactive;Extensions;Enumerable</PackageTags>
<DefineConstants>$(DefineConstants);REF_ASSM</DefineConstants>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<Deterministic>true</Deterministic>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\..\System.Interactive\**\*.cs" Exclude="..\..\System.Interactive\obj\**" />
</ItemGroup>

<Target Name="_GetReferenceAssemblies" DependsOnTargets="Build" Returns="@(ReferenceAssembliesOutput)">
<ItemGroup>
<ReferenceAssembliesOutput Include="@(IntermediateRefAssembly->'%(FullPath)')" />
<ReferenceAssembliesOutput Include="@(DocumentationProjectOutputGroupOutput->'%(FullPath)')" />
</ItemGroup>
</Target>

</Project>

0 comments on commit ee70f99

Please sign in to comment.