Skip to content

Commit eed5d75

Browse files
committed
Add DefaultInterpolatedStringHandler
realized by StringBuilder
1 parent 6b69a59 commit eed5d75

File tree

6 files changed

+379
-13
lines changed

6 files changed

+379
-13
lines changed

AdvancedSharpAdbClient/AdvancedSharpAdbClient.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
System.Range;
4848
System.Runtime.CompilerServices.CallerArgumentExpressionAttribute;
4949
System.Runtime.CompilerServices.IsExternalInit;
50+
System.Runtime.CompilerServices.InterpolatedStringHandlerAttribute
5051
</PolySharpIncludeGeneratedTypes>
5152
</PropertyGroup>
5253

@@ -61,6 +62,7 @@
6162
<ItemGroup>
6263
<InternalsVisibleTo Include="AdvancedSharpAdbClient.Tests" />
6364
<InternalsVisibleTo Include="AdvancedSharpAdbClient.WinRT" />
65+
<InternalsVisibleTo Include="AdvancedSharpAdbClient.Native" />
6466
</ItemGroup>
6567

6668
<ItemGroup>

AdvancedSharpAdbClient/Polyfills/HashCode.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ public static int Combine<T1, T2, T3, T4, T5, T6, T7, T8>(T1 value1, T2 value2,
356356
return (int)hash;
357357
}
358358

359-
[MethodImpl((MethodImplOptions)256)]
359+
[MethodImpl((MethodImplOptions)0x100)]
360360
private static void Initialize(out uint v1, out uint v2, out uint v3, out uint v4)
361361
{
362362
v1 = s_seed + Prime1 + Prime2;
@@ -365,19 +365,19 @@ private static void Initialize(out uint v1, out uint v2, out uint v3, out uint v
365365
v4 = s_seed - Prime1;
366366
}
367367

368-
[MethodImpl((MethodImplOptions)256)]
368+
[MethodImpl((MethodImplOptions)0x100)]
369369
private static uint Round(uint hash, uint input)
370370
{
371371
return RotateLeft(hash + (input * Prime2), 13) * Prime1;
372372
}
373373

374-
[MethodImpl((MethodImplOptions)256)]
374+
[MethodImpl((MethodImplOptions)0x100)]
375375
private static uint QueueRound(uint hash, uint queuedValue)
376376
{
377377
return RotateLeft(hash + (queuedValue * Prime3), 17) * Prime4;
378378
}
379379

380-
[MethodImpl((MethodImplOptions)256)]
380+
[MethodImpl((MethodImplOptions)0x100)]
381381
private static uint MixState(uint v1, uint v2, uint v3, uint v4)
382382
{
383383
return RotateLeft(v1, 1) + RotateLeft(v2, 7) + RotateLeft(v3, 12) + RotateLeft(v4, 18);
@@ -388,7 +388,7 @@ private static uint MixEmptyState()
388388
return s_seed + Prime5;
389389
}
390390

391-
[MethodImpl((MethodImplOptions)256)]
391+
[MethodImpl((MethodImplOptions)0x100)]
392392
private static uint MixFinal(uint hash)
393393
{
394394
hash ^= hash >> 15;
@@ -407,7 +407,7 @@ private static uint MixFinal(uint hash)
407407
/// <param name="offset">The number of bits to rotate by.
408408
/// Any value outside the range [0..31] is treated as congruent mod 32.</param>
409409
/// <returns>The rotated value.</returns>
410-
[MethodImpl((MethodImplOptions)256)]
410+
[MethodImpl((MethodImplOptions)0x100)]
411411
private static uint RotateLeft(uint value, int offset)
412412
=> (value << offset) | (value >> (32 - offset));
413413

AdvancedSharpAdbClient/Polyfills/Range.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ value is Range r &&
9191
/// It is expected Range will be used with collections which always have non negative length/count.
9292
/// We validate the range is inside the length scope though.
9393
/// </remarks>
94-
[MethodImpl((MethodImplOptions)256)]
94+
[MethodImpl((MethodImplOptions)0x100)]
9595
public Tuple<int, int> GetOffsetAndLength(int length)
9696
{
9797
int start = Start.GetOffset(length);

0 commit comments

Comments
 (0)