File tree Expand file tree Collapse file tree 5 files changed +20
-17
lines changed
Tools/SemanticSearch/BuildTask
Workspaces/SharedUtilitiesAndExtensions/Compiler/Core Expand file tree Collapse file tree 5 files changed +20
-17
lines changed Original file line number Diff line number Diff line change 22// The .NET Foundation licenses this file to you under the MIT license.
33// See the LICENSE file in the project root for more information.
44
5- #if ! NETCOREAPP
5+ #if NET
6+
7+ #pragma warning disable RS0016 // Add public types and members to the declared API (this is a supporting forwarder for an internal polyfill API)
8+ [ assembly: System . Runtime . CompilerServices . TypeForwardedTo ( typeof ( System . Index ) ) ]
9+ #pragma warning restore RS0016 // Add public types and members to the declared API
10+
11+ #else
12+
613using System . Runtime . CompilerServices ;
14+
715namespace System
816{
917 /// <summary>Represent a type can be used to index a collection either from the start or the end.</summary>
Original file line number Diff line number Diff line change 2525 <Compile Include =" $(MSBuildThisFileDirectory)RequiredMemberAttribute.cs" />
2626 <Compile Include =" $(MSBuildThisFileDirectory)SetsRequiredMembersAttribute.cs" />
2727 <Compile Include =" $(MSBuildThisFileDirectory)ExceptionUtilities.cs" />
28+ <Compile Include =" $(MSBuildThisFileDirectory)Index.cs" />
29+ <Compile Include =" $(MSBuildThisFileDirectory)Range.cs" />
2830 </ItemGroup >
2931 <ItemGroup Condition =" '$(DefaultLanguageSourceExtension)' != '' AND '$(BuildingInsideVisualStudio)' != 'true'" >
3032 <ExpectedCompile Include =" $(MSBuildThisFileDirectory)**\*$(DefaultLanguageSourceExtension)" />
Original file line number Diff line number Diff line change 22// The .NET Foundation licenses this file to you under the MIT license.
33// See the LICENSE file in the project root for more information.
44
5- #if ! NETCOREAPP
5+ #if NET
6+
7+ #pragma warning disable RS0016 // Add public types and members to the declared API (this is a supporting forwarder for an internal polyfill API)
8+ [ assembly: System . Runtime . CompilerServices . TypeForwardedTo ( typeof ( System . Range ) ) ]
9+ #pragma warning restore RS0016 // Add public types and members to the declared API
10+
11+ #else
612using System . Runtime . CompilerServices ;
7- using Roslyn . Utilities ;
13+
814namespace System
915{
1016 /// <summary>Represent a range has start and end indexes.</summary>
@@ -46,9 +52,7 @@ value is Range r &&
4652
4753 /// <summary>Returns the hash code for this instance.</summary>
4854 public override int GetHashCode ( )
49- {
50- return Hash . Combine ( Start . GetHashCode ( ) , End . GetHashCode ( ) ) ;
51- }
55+ => unchecked ( Start . GetHashCode ( ) * ( int ) 0xA5555529 + End . GetHashCode ( ) ) ;
5256
5357 /// <summary>Converts the value of the current Range object to its equivalent string representation.</summary>
5458 public override string ToString ( )
Original file line number Diff line number Diff line change 1616 <ItemGroup >
1717 <InternalsVisibleTo Include =" SemanticSearch.BuildTask.UnitTests" />
1818 </ItemGroup >
19- <ItemGroup >
20- <Compile Include =" ..\..\..\Compilers\Core\Portable\InternalUtilities\Range.cs" Link =" Utilities\Range.cs" />
21- <Compile Include =" ..\..\..\Compilers\Core\Portable\InternalUtilities\Index.cs" Link =" Utilities\Index.cs" />
22- <Compile Include =" ..\..\..\Compilers\Core\Portable\InternalUtilities\Hash.cs" Link =" Utilities\Hash.cs" />
23- </ItemGroup >
2419 <Import Project =" ..\..\..\Dependencies\Contracts\Microsoft.CodeAnalysis.Contracts.projitems" Label =" Shared" />
2520</Project >
Original file line number Diff line number Diff line change 113113 <Compile Include =" $(MSBuildThisFileDirectory)..\..\..\..\Compilers\Core\Portable\InternalUtilities\ImmutableListExtensions.cs" >
114114 <Link >InternalUtilities\ImmutableListExtensions.cs</Link >
115115 </Compile >
116- <Compile Include =" $(MSBuildThisFileDirectory)..\..\..\..\Compilers\Core\Portable\InternalUtilities\Index.cs" >
117- <Link >InternalUtilities\Index.cs</Link >
118- </Compile >
119116 <Compile Include =" $(MSBuildThisFileDirectory)..\..\..\..\Compilers\Core\Portable\InternalUtilities\ISetExtensions.cs" >
120117 <Link >InternalUtilities\ISetExtensions.cs</Link >
121118 </Compile >
140137 <Compile Include =" $(MSBuildThisFileDirectory)..\..\..\..\Compilers\Core\Portable\InternalUtilities\PlatformInformation.cs" >
141138 <Link >InternalUtilities\PlatformInformation.cs</Link >
142139 </Compile >
143- <Compile Include =" $(MSBuildThisFileDirectory)..\..\..\..\Compilers\Core\Portable\InternalUtilities\Range.cs" >
144- <Link >InternalUtilities\Range.cs</Link >
145- </Compile >
146140 <Compile Include =" $(MSBuildThisFileDirectory)..\..\..\..\Compilers\Core\Portable\InternalUtilities\ReaderWriterLockSlimExtensions.cs" >
147141 <Link >InternalUtilities\ReaderWriterLockSlimExtensions.cs</Link >
148142 </Compile >
You can’t perform that action at this time.
0 commit comments