Skip to content

Commit 26fab32

Browse files
committed
Remove P/Invoke from WP-SL binding.
1 parent bfe5eab commit 26fab32

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

src/MsgPack.Silverlight.WindowsPhone/MsgPack.Silverlight.WindowsPhone.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,6 @@
682682
<Compile Include="..\MsgPack\UnpackingStreamReader.cs">
683683
<Link>UnpackingStreamReader.cs</Link>
684684
</Compile>
685-
<Compile Include="..\MsgPack\UnsafeNativeMethods.cs">
686-
<Link>UnsafeNativeMethods.cs</Link>
687685
</Compile>
688686
<Compile Include="Properties\AssemblyInfo.cs" />
689687
</ItemGroup>

src/MsgPack/MessagePackString.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ private static bool EqualsEncoded( MessagePackString left, MessagePackString rig
257257
return false;
258258
}
259259

260-
#if !UNITY
260+
#if !UNITY && !WINDOWS_PHONE
261261
if ( _isFastEqualsDisabled == 0 )
262262
{
263263
try
@@ -273,7 +273,7 @@ private static bool EqualsEncoded( MessagePackString left, MessagePackString rig
273273
Interlocked.Exchange( ref _isFastEqualsDisabled, 1 );
274274
}
275275
}
276-
#endif // if !UNITY
276+
#endif // if !UNITY && !WINDOWS_PHONE
277277

278278
return SlowEquals( left._encoded, right._encoded );
279279
}
@@ -291,13 +291,13 @@ private static bool SlowEquals( byte[] x, byte[] y )
291291
return true;
292292
}
293293

294-
#if !UNITY
295-
#if SILVERLIGHT && !WINDOWS_PHONE
294+
#if !UNITY && !WINDOWS_PHONE
295+
#if SILVERLIGHT
296296
private static int _isFastEqualsDisabled =
297297
System.Windows.Application.Current.HasElevatedPermissions ? 0 : 1;
298298
#else
299299
private static int _isFastEqualsDisabled;
300-
#endif // if SILVERLIGHT && !WINDOWS_PHONE
300+
#endif // if SILVERLIGHT
301301

302302
#if DEBUG
303303
// for testing
@@ -327,7 +327,7 @@ private static bool UnsafeFastEquals( byte[] x, byte[] y )
327327

328328
return result == 0;
329329
}
330-
#endif // if !UNITY
330+
#endif // if !UNITY && !WINDOWS_PHONE
331331

332332
#if !SILVERLIGHT && !NETFX_CORE
333333
[Serializable]

0 commit comments

Comments
 (0)