File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed
DataProtection/DataProtection
test/Microsoft.AspNetCore.DataProtection.Tests/Internal Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 2121 <Compile Include =" $(SharedSourceRoot)TrimmingAttributes.cs" LinkBase =" Shared" />
2222 <Compile Include =" $(SharedSourceRoot)ThrowHelpers\ArgumentNullThrowHelper.cs" LinkBase =" Shared" />
2323 <Compile Include =" $(SharedSourceRoot)CallerArgument\CallerArgumentExpressionAttribute.cs" LinkBase =" Shared" />
24+ <Compile Include =" $(SharedSourceRoot)Encoding\Int7BitEncodingUtils.cs" LinkBase =" Shared" />
2425 </ItemGroup >
2526
2627 <ItemGroup >
Original file line number Diff line number Diff line change 55using System . Collections . Generic ;
66using System . Text ;
77using Microsoft . AspNetCore . DataProtection . Internal ;
8+ using Microsoft . AspNetCore . Shared ;
89
910namespace Microsoft . AspNetCore . DataProtection . Tests . Internal ;
1011
11- public class Int7BitEncodingUtils
12+ public class Int7BitEncodingUtilsTests
1213{
1314 [ Theory ]
1415 [ InlineData ( 0 , 1 ) ]
Original file line number Diff line number Diff line change 77using System . Text ;
88using System . Threading . Tasks ;
99
10- namespace Microsoft . AspNetCore . DataProtection . Internal ;
10+ namespace Microsoft . AspNetCore . Shared ;
11+
1112internal static class Int7BitEncodingUtils
1213{
1314 public static int Measure7BitEncodedUIntLength ( this int value )
@@ -18,12 +19,12 @@ public static int Measure7BitEncodedUIntLength(this uint value)
1819#if NET10_0_OR_GREATER
1920 return ( ( 31 - System . Numerics . BitOperations . LeadingZeroCount ( value | 1 ) ) / 7 ) + 1 ;
2021#else
21- int count = 1 ;
22- while ( ( value >>= 7 ) != 0 )
23- {
24- count ++ ;
25- }
26- return count ;
22+ int count = 1 ;
23+ while ( ( value >>= 7 ) != 0 )
24+ {
25+ count ++ ;
26+ }
27+ return count ;
2728#endif
2829 }
2930
You can’t perform that action at this time.
0 commit comments