You've already forked linux-packaging-mono
Imported Upstream version 5.2.0.175
Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
parent
4bdbaf4a88
commit
966bba02bb
106
external/corefx/src/System.Linq/System.Linq.sln
vendored
106
external/corefx/src/System.Linq/System.Linq.sln
vendored
@@ -1,82 +1,60 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.21005.1
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Linq.Performance.Tests", "tests\Performance\System.Linq.Performance.Tests.csproj", "{E4EBF34F-B1E1-4C87-9A00-13F4798F329F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1} = {CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Linq.Tests", "tests\System.Linq.Tests.csproj", "{7C70BB15-870B-4946-8098-625DACD645A6}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1} = {CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Linq.Performance.Tests", "tests\Performance\System.Linq.Performance.Tests.csproj", "{28FB26C9-E425-4E50-9D1D-08F34560E86E}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1} = {CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Linq", "src\System.Linq.csproj", "{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E09DDC3B-0BBC-4275-A9DD-B366F4F02B81} = {E09DDC3B-0BBC-4275-A9DD-B366F4F02B81}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Linq", "ref\System.Linq.csproj", "{E09DDC3B-0BBC-4275-A9DD-B366F4F02B81}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1A2F9F4A-A032-433E-B914-ADD5992BB178}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2E666815-2EDB-464B-9DF6-380BF4789AD4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
DebugNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU = DebugNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU
|
||||
ReleaseNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU = ReleaseNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU
|
||||
DebugNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU = DebugNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU
|
||||
ReleaseNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU = ReleaseNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU
|
||||
DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU = DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU
|
||||
ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU = ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU
|
||||
DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU = DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU
|
||||
ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU = ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.DebugNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.DebugNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.ReleaseNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.ReleaseNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.DebugNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.DebugNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.ReleaseNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.ReleaseNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{E4EBF34F-B1E1-4C87-9A00-13F4798F329F}.DebugNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{E4EBF34F-B1E1-4C87-9A00-13F4798F329F}.DebugNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{E4EBF34F-B1E1-4C87-9A00-13F4798F329F}.ReleaseNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{E4EBF34F-B1E1-4C87-9A00-13F4798F329F}.ReleaseNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{E4EBF34F-B1E1-4C87-9A00-13F4798F329F}.DebugNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{E4EBF34F-B1E1-4C87-9A00-13F4798F329F}.DebugNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{E4EBF34F-B1E1-4C87-9A00-13F4798F329F}.ReleaseNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{E4EBF34F-B1E1-4C87-9A00-13F4798F329F}.ReleaseNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{E4EBF34F-B1E1-4C87-9A00-13F4798F329F}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{E4EBF34F-B1E1-4C87-9A00-13F4798F329F}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{E4EBF34F-B1E1-4C87-9A00-13F4798F329F}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{E4EBF34F-B1E1-4C87-9A00-13F4798F329F}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{E4EBF34F-B1E1-4C87-9A00-13F4798F329F}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{E4EBF34F-B1E1-4C87-9A00-13F4798F329F}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{E4EBF34F-B1E1-4C87-9A00-13F4798F329F}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{E4EBF34F-B1E1-4C87-9A00-13F4798F329F}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.DebugNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = net461-Windows_NT-Debug|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.DebugNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.Build.0 = net461-Windows_NT-Debug|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.ReleaseNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = net461-Windows_NT-Release|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.ReleaseNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.Build.0 = net461-Windows_NT-Release|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.DebugNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = net461-Windows_NT-Debug|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.DebugNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.Build.0 = net461-Windows_NT-Debug|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.ReleaseNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = net461-Windows_NT-Release|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.ReleaseNETCoreAppnet461-Windows_NTnetcoreapp|AnyCPU.Build.0 = net461-Windows_NT-Release|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.DebugNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.ReleaseNETCoreAppnetcoreappnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{28FB26C9-E425-4E50-9D1D-08F34560E86E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{28FB26C9-E425-4E50-9D1D-08F34560E86E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{28FB26C9-E425-4E50-9D1D-08F34560E86E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{28FB26C9-E425-4E50-9D1D-08F34560E86E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{E09DDC3B-0BBC-4275-A9DD-B366F4F02B81}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{E09DDC3B-0BBC-4275-A9DD-B366F4F02B81}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{E09DDC3B-0BBC-4275-A9DD-B366F4F02B81}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{E09DDC3B-0BBC-4275-A9DD-B366F4F02B81}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{7C70BB15-870B-4946-8098-625DACD645A6} = {1A2F9F4A-A032-433E-B914-ADD5992BB178}
|
||||
{28FB26C9-E425-4E50-9D1D-08F34560E86E} = {1A2F9F4A-A032-433E-B914-ADD5992BB178}
|
||||
{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD}
|
||||
{E09DDC3B-0BBC-4275-A9DD-B366F4F02B81} = {2E666815-2EDB-464B-9DF6-380BF4789AD4}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
1
external/corefx/src/System.Linq/dir.props
vendored
1
external/corefx/src/System.Linq/dir.props
vendored
@@ -4,5 +4,6 @@
|
||||
<PropertyGroup>
|
||||
<AssemblyVersion>4.2.0.0</AssemblyVersion>
|
||||
<IsNETCoreApp>true</IsNETCoreApp>
|
||||
<IsUAP>true</IsUAP>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
<ItemGroup>
|
||||
<Project Include="System.Linq.csproj" />
|
||||
<Project Include="System.Linq.csproj">
|
||||
<TargetGroup>netcoreapp</TargetGroup>
|
||||
</Project>
|
||||
</ItemGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
|
||||
</Project>
|
||||
@@ -16,6 +16,7 @@ namespace System.Linq
|
||||
public static bool All<TSource>(this System.Collections.Generic.IEnumerable<TSource> source, System.Func<TSource, bool> predicate) { throw null; }
|
||||
public static bool Any<TSource>(this System.Collections.Generic.IEnumerable<TSource> source) { throw null; }
|
||||
public static bool Any<TSource>(this System.Collections.Generic.IEnumerable<TSource> source, System.Func<TSource, bool> predicate) { throw null; }
|
||||
public static System.Collections.Generic.IEnumerable<TSource> Append<TSource>(this System.Collections.Generic.IEnumerable<TSource> source, TSource element) { throw null; }
|
||||
public static System.Collections.Generic.IEnumerable<TSource> AsEnumerable<TSource>(this System.Collections.Generic.IEnumerable<TSource> source) { throw null; }
|
||||
public static decimal Average(this System.Collections.Generic.IEnumerable<decimal> source) { throw null; }
|
||||
public static double Average(this System.Collections.Generic.IEnumerable<double> source) { throw null; }
|
||||
@@ -39,8 +40,6 @@ namespace System.Linq
|
||||
public static float Average<TSource>(this System.Collections.Generic.IEnumerable<TSource> source, System.Func<TSource, float> selector) { throw null; }
|
||||
public static System.Collections.Generic.IEnumerable<TResult> Cast<TResult>(this System.Collections.IEnumerable source) { throw null; }
|
||||
public static System.Collections.Generic.IEnumerable<TSource> Concat<TSource>(this System.Collections.Generic.IEnumerable<TSource> first, System.Collections.Generic.IEnumerable<TSource> second) { throw null; }
|
||||
public static System.Collections.Generic.IEnumerable<TSource> Append<TSource>(this System.Collections.Generic.IEnumerable<TSource> source, TSource element) { throw null; }
|
||||
public static System.Collections.Generic.IEnumerable<TSource> Prepend<TSource>(this System.Collections.Generic.IEnumerable<TSource> source, TSource element) { throw null; }
|
||||
public static bool Contains<TSource>(this System.Collections.Generic.IEnumerable<TSource> source, TSource value) { throw null; }
|
||||
public static bool Contains<TSource>(this System.Collections.Generic.IEnumerable<TSource> source, TSource value, System.Collections.Generic.IEqualityComparer<TSource> comparer) { throw null; }
|
||||
public static int Count<TSource>(this System.Collections.Generic.IEnumerable<TSource> source) { throw null; }
|
||||
@@ -127,6 +126,7 @@ namespace System.Linq
|
||||
public static System.Linq.IOrderedEnumerable<TSource> OrderBy<TSource, TKey>(this System.Collections.Generic.IEnumerable<TSource> source, System.Func<TSource, TKey> keySelector, System.Collections.Generic.IComparer<TKey> comparer) { throw null; }
|
||||
public static System.Linq.IOrderedEnumerable<TSource> OrderByDescending<TSource, TKey>(this System.Collections.Generic.IEnumerable<TSource> source, System.Func<TSource, TKey> keySelector) { throw null; }
|
||||
public static System.Linq.IOrderedEnumerable<TSource> OrderByDescending<TSource, TKey>(this System.Collections.Generic.IEnumerable<TSource> source, System.Func<TSource, TKey> keySelector, System.Collections.Generic.IComparer<TKey> comparer) { throw null; }
|
||||
public static System.Collections.Generic.IEnumerable<TSource> Prepend<TSource>(this System.Collections.Generic.IEnumerable<TSource> source, TSource element) { throw null; }
|
||||
public static System.Collections.Generic.IEnumerable<int> Range(int start, int count) { throw null; }
|
||||
public static System.Collections.Generic.IEnumerable<TResult> Repeat<TResult>(TResult element, int count) { throw null; }
|
||||
public static System.Collections.Generic.IEnumerable<TSource> Reverse<TSource>(this System.Collections.Generic.IEnumerable<TSource> source) { throw null; }
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{E09DDC3B-0BBC-4275-A9DD-B366F4F02B81}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Debug|AnyCPU'" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<BuildConfigurations>
|
||||
net461-Windows_NT;
|
||||
uap-Windows_NT;
|
||||
netcoreapp;
|
||||
</BuildConfigurations>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,64 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
|
||||
@@ -5,21 +5,18 @@
|
||||
<ProjectGuid>{CA488507-3B6E-4494-B7BE-7B4EEEB2C4D1}</ProjectGuid>
|
||||
<AssemblyName>System.Linq</AssemblyName>
|
||||
<RootNamespace>System.Linq</RootNamespace>
|
||||
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'net461'">true</IsPartialFacadeAssembly>
|
||||
<!-- The following line needs to be removed once we have a targeting pack for 4.6.3 -->
|
||||
<TargetingPackNugetPackageId Condition="'$(TargetGroup)' == 'net461'">Microsoft.TargetingPack.NETFramework.v4.6.1</TargetingPackNugetPackageId>
|
||||
</PropertyGroup>
|
||||
<!-- Default configurations to help VS understand the configurations -->
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='net461-Windows_NT-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='net461-Windows_NT-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Release|AnyCPU'" />
|
||||
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Windows_NT-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Windows_NT-Release|AnyCPU'" />
|
||||
<ItemGroup>
|
||||
<ContractProject Include="..\ref\System.Linq.csproj">
|
||||
<TargetGroup>netcoreapp</TargetGroup>
|
||||
</ContractProject>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
|
||||
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap'">
|
||||
<Compile Include="$(CommonPath)\System\Collections\Generic\ArrayBuilder.cs">
|
||||
<Link>System\Collections\Generic\ArrayBuilder.cs</Link>
|
||||
</Compile>
|
||||
@@ -72,6 +69,7 @@
|
||||
<Compile Include="System\Linq\SequenceEqual.cs" />
|
||||
<Compile Include="System\Linq\Set.cs" />
|
||||
<Compile Include="System\Linq\Single.cs" />
|
||||
<Compile Include="System\Linq\SingleLinkedNode.cs" />
|
||||
<Compile Include="System\Linq\Skip.cs" />
|
||||
<Compile Include="System\Linq\Sum.cs" />
|
||||
<Compile Include="System\Linq\Take.cs" />
|
||||
@@ -81,10 +79,6 @@
|
||||
<Compile Include="System\Linq\Where.cs" />
|
||||
<Compile Include="System\Linq\Zip.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' == 'net461'">
|
||||
<TargetingPackReference Include="mscorlib" />
|
||||
<TargetingPackReference Include="System.Core" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Resources\" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace System.Linq
|
||||
return appendable.Append(element);
|
||||
}
|
||||
|
||||
return new AppendPrepend1Iterator<TSource>(source, element, true);
|
||||
return new AppendPrepend1Iterator<TSource>(source, element, appending: true);
|
||||
}
|
||||
|
||||
public static IEnumerable<TSource> Prepend<TSource>(this IEnumerable<TSource> source, TSource element)
|
||||
@@ -38,7 +38,7 @@ namespace System.Linq
|
||||
return appendable.Prepend(element);
|
||||
}
|
||||
|
||||
return new AppendPrepend1Iterator<TSource>(source, element, false);
|
||||
return new AppendPrepend1Iterator<TSource>(source, element, appending: false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -154,11 +154,11 @@ namespace System.Linq
|
||||
{
|
||||
if (_appending)
|
||||
{
|
||||
return new AppendPrependN<TSource>(_source, null, new SingleLinkedNode<TSource>(_item, item));
|
||||
return new AppendPrependN<TSource>(_source, null, new SingleLinkedNode<TSource>(_item).Add(item), prependCount: 0, appendCount: 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new AppendPrependN<TSource>(_source, new SingleLinkedNode<TSource>(_item), new SingleLinkedNode<TSource>(item));
|
||||
return new AppendPrependN<TSource>(_source, new SingleLinkedNode<TSource>(_item), new SingleLinkedNode<TSource>(item), prependCount: 1, appendCount: 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,11 +166,11 @@ namespace System.Linq
|
||||
{
|
||||
if (_appending)
|
||||
{
|
||||
return new AppendPrependN<TSource>(_source, new SingleLinkedNode<TSource>(item), new SingleLinkedNode<TSource>(_item));
|
||||
return new AppendPrependN<TSource>(_source, new SingleLinkedNode<TSource>(item), new SingleLinkedNode<TSource>(_item), prependCount: 1, appendCount: 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new AppendPrependN<TSource>(_source, new SingleLinkedNode<TSource>(_item, item), null);
|
||||
return new AppendPrependN<TSource>(_source, new SingleLinkedNode<TSource>(_item).Add(item), null, prependCount: 2, appendCount: 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,94 +256,6 @@ namespace System.Linq
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An immutable node in a singly-linked list of items.
|
||||
/// </summary>
|
||||
/// <typeparam name="TSource">The type of the node's item.</typeparam>
|
||||
private sealed class SingleLinkedNode<TSource>
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructs a node linked to the tail node.
|
||||
/// </summary>
|
||||
/// <param name="first">The first item, to be placed in the tail node.</param>
|
||||
/// <param name="second">The second item, to be placed in this node.</param>
|
||||
public SingleLinkedNode(TSource first, TSource second)
|
||||
{
|
||||
Linked = new SingleLinkedNode<TSource>(first);
|
||||
Item = second;
|
||||
Count = 2;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a tail node.
|
||||
/// </summary>
|
||||
/// <param name="item">The item to place in the tail node.</param>
|
||||
public SingleLinkedNode(TSource item)
|
||||
{
|
||||
Item = item;
|
||||
Count = 1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a node linked to the specified node.
|
||||
/// </summary>
|
||||
/// <param name="linked">The linked node.</param>
|
||||
/// <param name="item">The item to place in this node.</param>
|
||||
private SingleLinkedNode(SingleLinkedNode<TSource> linked, TSource item)
|
||||
{
|
||||
Debug.Assert(linked != null);
|
||||
Linked = linked;
|
||||
Item = item;
|
||||
Count = linked.Count + 1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The item held by this node.
|
||||
/// </summary>
|
||||
public TSource Item { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The next node in the singly-linked list.
|
||||
/// </summary>
|
||||
public SingleLinkedNode<TSource> Linked { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The number of items stored in this and subsequent nodes.
|
||||
/// </summary>
|
||||
public int Count { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new node that holds the specified item and is linked to this node.
|
||||
/// </summary>
|
||||
/// <param name="item">The item to place in the new node.</param>
|
||||
public SingleLinkedNode<TSource> Add(TSource item) => new SingleLinkedNode<TSource>(this, item);
|
||||
|
||||
/// <summary>
|
||||
/// Gets an <see cref="IEnumerator{TSource}"/> that enumerates the items of this node's singly-linked list in reverse.
|
||||
/// </summary>
|
||||
public IEnumerator<TSource> GetEnumerator()
|
||||
{
|
||||
return ((IEnumerable<TSource>)ToArray()).GetEnumerator();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns an <see cref="T:TSource[]"/> that contains the items of this node's singly-linked list in reverse.
|
||||
/// </summary>
|
||||
public TSource[] ToArray()
|
||||
{
|
||||
TSource[] array = new TSource[Count];
|
||||
int index = Count;
|
||||
for (SingleLinkedNode<TSource> node = this; node != null; node = node.Linked)
|
||||
{
|
||||
--index;
|
||||
array[index] = node.Item;
|
||||
}
|
||||
|
||||
Debug.Assert(index == 0);
|
||||
return array;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents the insertion of multiple items before or after an <see cref="IEnumerable{TSource}"/>.
|
||||
/// </summary>
|
||||
@@ -352,17 +264,26 @@ namespace System.Linq
|
||||
{
|
||||
private readonly SingleLinkedNode<TSource> _prepended;
|
||||
private readonly SingleLinkedNode<TSource> _appended;
|
||||
private readonly int _prependCount;
|
||||
private readonly int _appendCount;
|
||||
private SingleLinkedNode<TSource> _node;
|
||||
|
||||
public AppendPrependN(IEnumerable<TSource> source, SingleLinkedNode<TSource> prepended, SingleLinkedNode<TSource> appended)
|
||||
public AppendPrependN(IEnumerable<TSource> source, SingleLinkedNode<TSource> prepended, SingleLinkedNode<TSource> appended, int prependCount, int appendCount)
|
||||
: base(source)
|
||||
{
|
||||
Debug.Assert(prepended != null || appended != null);
|
||||
Debug.Assert(prependCount > 0 || appendCount > 0);
|
||||
Debug.Assert(prependCount + appendCount >= 2);
|
||||
Debug.Assert((prepended?.GetCount() ?? 0) == prependCount);
|
||||
Debug.Assert((appended?.GetCount() ?? 0) == appendCount);
|
||||
|
||||
_prepended = prepended;
|
||||
_appended = appended;
|
||||
_prependCount = prependCount;
|
||||
_appendCount = appendCount;
|
||||
}
|
||||
|
||||
public override Iterator<TSource> Clone() => new AppendPrependN<TSource>(_source, _prepended, _appended);
|
||||
public override Iterator<TSource> Clone() => new AppendPrependN<TSource>(_source, _prepended, _appended, _prependCount, _appendCount);
|
||||
|
||||
public override bool MoveNext()
|
||||
{
|
||||
@@ -394,7 +315,7 @@ namespace System.Linq
|
||||
return false;
|
||||
}
|
||||
|
||||
_enumerator = _appended.GetEnumerator();
|
||||
_enumerator = _appended.GetEnumerator(_appendCount);
|
||||
_state = 4;
|
||||
goto case 4;
|
||||
case 4:
|
||||
@@ -407,12 +328,14 @@ namespace System.Linq
|
||||
|
||||
public override AppendPrependIterator<TSource> Append(TSource item)
|
||||
{
|
||||
return new AppendPrependN<TSource>(_source, _prepended, _appended != null ? _appended.Add(item) : new SingleLinkedNode<TSource>(item));
|
||||
var appended = _appended != null ? _appended.Add(item) : new SingleLinkedNode<TSource>(item);
|
||||
return new AppendPrependN<TSource>(_source, _prepended, appended, _prependCount, _appendCount + 1);
|
||||
}
|
||||
|
||||
public override AppendPrependIterator<TSource> Prepend(TSource item)
|
||||
{
|
||||
return new AppendPrependN<TSource>(_source, _prepended != null ? _prepended.Add(item) : new SingleLinkedNode<TSource>(item), _appended);
|
||||
var prepended = _prepended != null ? _prepended.Add(item) : new SingleLinkedNode<TSource>(item);
|
||||
return new AppendPrependN<TSource>(_source, prepended, _appended, _prependCount + 1, _appendCount);
|
||||
}
|
||||
|
||||
private TSource[] LazyToArray()
|
||||
@@ -423,14 +346,14 @@ namespace System.Linq
|
||||
|
||||
if (_prepended != null)
|
||||
{
|
||||
builder.Reserve(_prepended.Count);
|
||||
builder.Reserve(_prependCount);
|
||||
}
|
||||
|
||||
builder.AddRange(_source);
|
||||
|
||||
if (_appended != null)
|
||||
{
|
||||
builder.Reserve(_appended.Count);
|
||||
builder.Reserve(_appendCount);
|
||||
}
|
||||
|
||||
TSource[] array = builder.ToArray();
|
||||
@@ -502,7 +425,7 @@ namespace System.Linq
|
||||
list.AddRange(_source);
|
||||
if (_appended != null)
|
||||
{
|
||||
IEnumerator<TSource> e = _appended.GetEnumerator();
|
||||
IEnumerator<TSource> e = _appended.GetEnumerator(_appendCount);
|
||||
while (e.MoveNext())
|
||||
{
|
||||
list.Add(e.Current);
|
||||
@@ -518,10 +441,10 @@ namespace System.Linq
|
||||
if (listProv != null)
|
||||
{
|
||||
int count = listProv.GetCount(onlyIfCheap);
|
||||
return count == -1 ? -1 : count + (_appended == null ? 0 : _appended.Count) + (_prepended == null ? 0 : _prepended.Count);
|
||||
return count == -1 ? -1 : count + _appendCount + _prependCount;
|
||||
}
|
||||
|
||||
return !onlyIfCheap || _source is ICollection<TSource> ? _source.Count() + (_appended == null ? 0 : _appended.Count) + (_prepended == null ? 0 : _prepended.Count) : -1;
|
||||
return !onlyIfCheap || _source is ICollection<TSource> ? _source.Count() + _appendCount + _prependCount : -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,4 +97,35 @@ namespace System.Linq
|
||||
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
|
||||
private IEnumerable _enumerable;
|
||||
}
|
||||
|
||||
internal sealed class SystemLinq_GroupingDebugView<TKey, TElement>
|
||||
{
|
||||
private readonly Grouping<TKey, TElement> _grouping;
|
||||
private TElement[] _cachedValues;
|
||||
|
||||
public SystemLinq_GroupingDebugView(Grouping<TKey, TElement> grouping)
|
||||
{
|
||||
_grouping = grouping;
|
||||
}
|
||||
|
||||
public TKey Key => _grouping.Key;
|
||||
|
||||
// The name of this property must alphabetically follow `Key` so the elements appear last in the display.
|
||||
[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
|
||||
public TElement[] Values => _cachedValues ?? (_cachedValues = _grouping.ToArray());
|
||||
}
|
||||
|
||||
internal sealed class SystemLinq_LookupDebugView<TKey, TElement>
|
||||
{
|
||||
private readonly Lookup<TKey, TElement> _lookup;
|
||||
private IGrouping<TKey, TElement>[] _cachedGroupings;
|
||||
|
||||
public SystemLinq_LookupDebugView(Lookup<TKey, TElement> lookup)
|
||||
{
|
||||
_lookup = lookup;
|
||||
}
|
||||
|
||||
[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
|
||||
public IGrouping<TKey, TElement>[] Groupings => _cachedGroupings ?? (_cachedGroupings = _lookup.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,11 +98,7 @@ namespace System.Linq
|
||||
private Set<TSource> FillSet()
|
||||
{
|
||||
Set<TSource> set = new Set<TSource>(_comparer);
|
||||
foreach (TSource element in _source)
|
||||
{
|
||||
set.Add(element);
|
||||
}
|
||||
|
||||
set.UnionWith(_source);
|
||||
return set;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace System.Linq
|
||||
{
|
||||
@@ -61,6 +62,8 @@ namespace System.Linq
|
||||
//
|
||||
// To limit the damage, the toolchain makes this type appear in a hidden assembly.
|
||||
// (This is also why it is no longer a nested type of Lookup<,>).
|
||||
[DebuggerDisplay("Key = {Key}")]
|
||||
[DebuggerTypeProxy(typeof(SystemLinq_GroupingDebugView<,>))]
|
||||
#if !MONO
|
||||
public
|
||||
#endif
|
||||
|
||||
@@ -65,6 +65,8 @@ namespace System.Linq
|
||||
bool Contains(TKey key);
|
||||
}
|
||||
|
||||
[DebuggerDisplay("Count = {Count}")]
|
||||
[DebuggerTypeProxy(typeof(SystemLinq_LookupDebugView<,>))]
|
||||
public class Lookup<TKey, TElement> : ILookup<TKey, TElement>, IIListProvider<IGrouping<TKey, TElement>>
|
||||
{
|
||||
private readonly IEqualityComparer<TKey> _comparer;
|
||||
|
||||
@@ -172,14 +172,14 @@ namespace System.Linq
|
||||
|
||||
public IPartition<TElement> Skip(int count)
|
||||
{
|
||||
int minIndex = _minIndexInclusive + count;
|
||||
return (uint)minIndex > (uint)_maxIndexInclusive ? EmptyPartition<TElement>.Instance : new OrderedPartition<TElement>(_source, minIndex, _maxIndexInclusive);
|
||||
int minIndex = unchecked(_minIndexInclusive + count);
|
||||
return unchecked((uint)minIndex > (uint)_maxIndexInclusive) ? EmptyPartition<TElement>.Instance : new OrderedPartition<TElement>(_source, minIndex, _maxIndexInclusive);
|
||||
}
|
||||
|
||||
public IPartition<TElement> Take(int count)
|
||||
{
|
||||
int maxIndex = _minIndexInclusive + count - 1;
|
||||
if ((uint)maxIndex >= (uint)_maxIndexInclusive)
|
||||
int maxIndex = unchecked(_minIndexInclusive + count - 1);
|
||||
if (unchecked((uint)maxIndex >= (uint)_maxIndexInclusive))
|
||||
{
|
||||
return this;
|
||||
}
|
||||
@@ -189,7 +189,7 @@ namespace System.Linq
|
||||
|
||||
public TElement TryGetElementAt(int index, out bool found)
|
||||
{
|
||||
if ((uint)index <= (uint)(_maxIndexInclusive - _minIndexInclusive))
|
||||
if (unchecked((uint)index <= (uint)(_maxIndexInclusive - _minIndexInclusive)))
|
||||
{
|
||||
return _source.TryGetElementAt(index + _minIndexInclusive, out found);
|
||||
}
|
||||
@@ -257,7 +257,7 @@ namespace System.Linq
|
||||
// Having a separate field for the index would be more readable. However, we save it
|
||||
// into _state with a bias to minimize field size of the iterator.
|
||||
int index = _state - 1;
|
||||
if ((uint)index <= (uint)(_maxIndexInclusive - _minIndexInclusive) && index < _source.Count - _minIndexInclusive)
|
||||
if (unchecked((uint)index <= (uint)(_maxIndexInclusive - _minIndexInclusive) && index < _source.Count - _minIndexInclusive))
|
||||
{
|
||||
_current = _source[_minIndexInclusive + index];
|
||||
++_state;
|
||||
@@ -281,13 +281,13 @@ namespace System.Linq
|
||||
|
||||
public IPartition<TSource> Take(int count)
|
||||
{
|
||||
int maxIndex = _minIndexInclusive + count - 1;
|
||||
return (uint)maxIndex >= (uint)_maxIndexInclusive ? this : new ListPartition<TSource>(_source, _minIndexInclusive, maxIndex);
|
||||
int maxIndex = unchecked(_minIndexInclusive + count - 1);
|
||||
return unchecked((uint)maxIndex >= (uint)_maxIndexInclusive) ? this : new ListPartition<TSource>(_source, _minIndexInclusive, maxIndex);
|
||||
}
|
||||
|
||||
public TSource TryGetElementAt(int index, out bool found)
|
||||
{
|
||||
if ((uint)index <= (uint)(_maxIndexInclusive - _minIndexInclusive) && index < _source.Count - _minIndexInclusive)
|
||||
if (unchecked((uint)index <= (uint)(_maxIndexInclusive - _minIndexInclusive) && index < _source.Count - _minIndexInclusive))
|
||||
{
|
||||
found = true;
|
||||
return _source[_minIndexInclusive + index];
|
||||
@@ -410,7 +410,7 @@ namespace System.Linq
|
||||
// on how many elements we can have.
|
||||
private bool HasLimit => _maxIndexInclusive != -1;
|
||||
|
||||
private int Limit => (_maxIndexInclusive + 1) - _minIndexInclusive; // This is that upper bound.
|
||||
private int Limit => unchecked((_maxIndexInclusive + 1) - _minIndexInclusive); // This is that upper bound.
|
||||
|
||||
public override Iterator<TSource> Clone()
|
||||
{
|
||||
@@ -514,7 +514,8 @@ namespace System.Linq
|
||||
|
||||
public IPartition<TSource> Skip(int count)
|
||||
{
|
||||
int minIndex = _minIndexInclusive + count;
|
||||
int minIndex = unchecked(_minIndexInclusive + count);
|
||||
|
||||
if (!HasLimit)
|
||||
{
|
||||
if (minIndex < 0)
|
||||
@@ -539,7 +540,7 @@ namespace System.Linq
|
||||
|
||||
public IPartition<TSource> Take(int count)
|
||||
{
|
||||
int maxIndex = _minIndexInclusive + count - 1;
|
||||
int maxIndex = unchecked(_minIndexInclusive + count - 1);
|
||||
if (!HasLimit)
|
||||
{
|
||||
if (maxIndex < 0)
|
||||
@@ -553,7 +554,7 @@ namespace System.Linq
|
||||
return new EnumerablePartition<TSource>(this, 0, count - 1);
|
||||
}
|
||||
}
|
||||
else if ((uint)maxIndex >= (uint)_maxIndexInclusive)
|
||||
else if (unchecked((uint)maxIndex >= (uint)_maxIndexInclusive))
|
||||
{
|
||||
// If we don't know our max count, we can't go down this branch.
|
||||
// It's always possible for us to contain more than count items, as the rest
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace System.Linq
|
||||
{
|
||||
Debug.Assert(count > 0);
|
||||
_start = start;
|
||||
_end = start + count;
|
||||
_end = unchecked(start + count);
|
||||
}
|
||||
|
||||
public override Iterator<int> Clone()
|
||||
@@ -55,7 +55,7 @@ namespace System.Linq
|
||||
_state = 2;
|
||||
return true;
|
||||
case 2:
|
||||
if (++_current == _end)
|
||||
if (unchecked(++_current) == _end)
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -103,7 +103,7 @@ namespace System.Linq
|
||||
|
||||
public int GetCount(bool onlyIfCheap)
|
||||
{
|
||||
return _end - _start;
|
||||
return unchecked(_end - _start);
|
||||
}
|
||||
|
||||
public IPartition<int> Skip(int count)
|
||||
@@ -129,7 +129,7 @@ namespace System.Linq
|
||||
|
||||
public int TryGetElementAt(int index, out bool found)
|
||||
{
|
||||
if ((uint)index < (uint)(_end - _start))
|
||||
if (unchecked((uint)index < (uint)(_end - _start)))
|
||||
{
|
||||
found = true;
|
||||
return _start + index;
|
||||
|
||||
@@ -79,10 +79,7 @@ namespace System.Linq
|
||||
TResult[] array = new TResult[_count];
|
||||
if (_current != null)
|
||||
{
|
||||
for (int i = 0; i != array.Length; ++i)
|
||||
{
|
||||
array[i] = _current;
|
||||
}
|
||||
Array.Fill(array, _current);
|
||||
}
|
||||
|
||||
return array;
|
||||
|
||||
@@ -91,16 +91,7 @@ namespace System.Linq
|
||||
public TSource[] ToArray()
|
||||
{
|
||||
TSource[] array = _source.ToArray();
|
||||
|
||||
// Array.Reverse() involves boxing for non-primitive value types, but
|
||||
// checking that has its own cost, so just use this approach for all types.
|
||||
for (int i = 0, j = array.Length - 1; i < j; ++i, --j)
|
||||
{
|
||||
TSource temp = array[i];
|
||||
array[i] = array[j];
|
||||
array[j] = temp;
|
||||
}
|
||||
|
||||
Array.Reverse<TSource>(array);
|
||||
return array;
|
||||
}
|
||||
|
||||
|
||||
@@ -300,7 +300,7 @@ namespace System.Linq
|
||||
|
||||
public TResult TryGetElementAt(int index, out bool found)
|
||||
{
|
||||
if ((uint)index < (uint)_source.Length)
|
||||
if (unchecked((uint)index < (uint)_source.Length))
|
||||
{
|
||||
found = true;
|
||||
return _selector(_source[index]);
|
||||
@@ -438,7 +438,7 @@ namespace System.Linq
|
||||
|
||||
public TResult TryGetElementAt(int index, out bool found)
|
||||
{
|
||||
if ((uint)index < (uint)_source.Count)
|
||||
if (unchecked((uint)index < (uint)_source.Count))
|
||||
{
|
||||
found = true;
|
||||
return _selector(_source[index]);
|
||||
@@ -596,7 +596,7 @@ namespace System.Linq
|
||||
|
||||
public TResult TryGetElementAt(int index, out bool found)
|
||||
{
|
||||
if ((uint)index < (uint)_source.Count)
|
||||
if (unchecked((uint)index < (uint)_source.Count))
|
||||
{
|
||||
found = true;
|
||||
return _selector(_source[index]);
|
||||
@@ -847,7 +847,7 @@ namespace System.Linq
|
||||
// Having a separate field for the index would be more readable. However, we save it
|
||||
// into _state with a bias to minimize field size of the iterator.
|
||||
int index = _state - 1;
|
||||
if ((uint)index <= (uint)(_maxIndexInclusive - _minIndexInclusive) && index < _source.Count - _minIndexInclusive)
|
||||
if (unchecked((uint)index <= (uint)(_maxIndexInclusive - _minIndexInclusive) && index < _source.Count - _minIndexInclusive))
|
||||
{
|
||||
_current = _selector(_source[_minIndexInclusive + index]);
|
||||
++_state;
|
||||
|
||||
@@ -242,7 +242,7 @@ namespace System.Linq
|
||||
continue;
|
||||
}
|
||||
|
||||
builder.AddRange(_selector(element));
|
||||
builder.AddRange(enumerable);
|
||||
}
|
||||
|
||||
TResult[] array = builder.ToArray();
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace System.Linq
|
||||
/// Creates an array from the items in this set.
|
||||
/// </summary>
|
||||
/// <returns>An array of the items in this set.</returns>
|
||||
internal TElement[] ToArray()
|
||||
public TElement[] ToArray()
|
||||
{
|
||||
#if DEBUG
|
||||
Debug.Assert(!_haveRemoved, "Optimised ToArray cannot be called if Remove has been called.");
|
||||
@@ -175,7 +175,7 @@ namespace System.Linq
|
||||
/// Creates a list from the items in this set.
|
||||
/// </summary>
|
||||
/// <returns>A list of the items in this set.</returns>
|
||||
internal List<TElement> ToList()
|
||||
public List<TElement> ToList()
|
||||
{
|
||||
#if DEBUG
|
||||
Debug.Assert(!_haveRemoved, "Optimised ToList cannot be called if Remove has been called.");
|
||||
@@ -193,14 +193,28 @@ namespace System.Linq
|
||||
/// <summary>
|
||||
/// The number of items in this set.
|
||||
/// </summary>
|
||||
internal int Count => _count;
|
||||
public int Count => _count;
|
||||
|
||||
/// <summary>
|
||||
/// Unions this set with an enumerable.
|
||||
/// </summary>
|
||||
/// <param name="other">The enumerable.</param>
|
||||
public void UnionWith(IEnumerable<TElement> other)
|
||||
{
|
||||
Debug.Assert(other != null);
|
||||
|
||||
foreach (TElement item in other)
|
||||
{
|
||||
Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code of the provided value with its sign bit zeroed out, so that modulo has a positive result.
|
||||
/// </summary>
|
||||
/// <param name="value">The value to hash.</param>
|
||||
/// <returns>The lower 31 bits of the value's hash code.</returns>
|
||||
internal int InternalGetHashCode(TElement value)
|
||||
private int InternalGetHashCode(TElement value)
|
||||
{
|
||||
// Handle comparer implementations that throw when passed null
|
||||
return (value == null) ? 0 : _comparer.GetHashCode(value) & 0x7FFFFFFF;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user