Skip to content

Commit 9f499ec

Browse files
committed
Remove Xamarin build options.
1 parent adae2be commit 9f499ec

17 files changed

+94
-142
lines changed

src/MsgPack/MessagePackObject.Utilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ private static void ToStringBinary( StringBuilder buffer, bool isJson, MessagePa
922922
}
923923

924924
// Lifting support.
925-
#if ( NETSTANDARD1_1 || NETSTANDARD1_3 ) && !XAMARIN
925+
#if ( NETSTANDARD1_1 || NETSTANDARD1_3 )
926926
switch ( NetStandardCompatibility.GetTypeCode( type ) )
927927
#else
928928
switch ( Type.GetTypeCode( type ) )

src/MsgPack/MessagePackObjectDictionary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ private static MessagePackObject ValidateObjectArgument( object obj, string para
481481
return new MessagePackObject( asMessagePackString );
482482
}
483483

484-
#if ( NETSTANDARD1_1 || NETSTANDARD1_3 ) && !XAMARIN
484+
#if ( NETSTANDARD1_1 || NETSTANDARD1_3 )
485485
switch ( NetStandardCompatibility.GetTypeCode( value.GetType() ) )
486486
#else
487487
switch ( Type.GetTypeCode( value.GetType() ) )

src/MsgPack/MsgPack.csproj

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,23 @@
44
<ProjectGuid>{5BCEC32E-990E-4DE5-945F-BD27326A7418}</ProjectGuid>
55
<OutputType>Library</OutputType>
66
<AssemblyName>MsgPack</AssemblyName>
7-
<TargetFrameworks>net46;net35;net45;netstandard1.1;netstandard1.3;netstandard2.0;MonoAndroid10;Xamarin.iOS10</TargetFrameworks>
7+
<TargetFrameworks>net46;net35;net45;netstandard1.1;netstandard1.3;netstandard2.0;</TargetFrameworks>
88
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
99
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
1010
<NuspecFile>$(SolutionDir)/msgpack.nuspec</NuspecFile>
1111
</PropertyGroup>
1212
<Import Project="..\..\MsgPack.Common.props" />
13-
<PropertyGroup Condition="'$(Configuration)' == 'Release' and ('$(TargetFramework)' == 'MonoAndroid10' or '$(TargetFramework)' == 'Xamarin.iOS10')">
14-
<OutputPath>..\..\bin\$(TargetFramework)\</OutputPath>
15-
</PropertyGroup>
16-
<PropertyGroup Condition="'$(Configuration)' == 'Release' and '$(TargetFramework)' != 'MonoAndroid10' and '$(TargetFramework)' != 'Xamarin.iOS10'">
13+
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
1714
<OutputPath>..\..\bin\</OutputPath>
1815
</PropertyGroup>
19-
<PropertyGroup Condition="'$(Configuration)' != 'Release' and ('$(TargetFramework)' == 'MonoAndroid10' or '$(TargetFramework)' == 'Xamarin.iOS10')">
20-
<OutputPath>bin\$(Configuration)\$(TargetFramework)\</OutputPath>
21-
</PropertyGroup>
22-
<PropertyGroup Condition="'$(Configuration)' != 'Release' and '$(TargetFramework)' != 'MonoAndroid10' and '$(TargetFramework)' != 'Xamarin.iOS10'">
16+
<PropertyGroup Condition="'$(Configuration)' != 'Release'">
2317
<OutputPath>bin\$(Configuration)\</OutputPath>
2418
</PropertyGroup>
25-
<PropertyGroup Condition="'$(TargetFramework)' == 'MonoAndroid10'">
26-
<!-- Workaround for VS 15.3 -->
27-
<NuGetTargetMoniker>MonoAndroid,Version=1.0</NuGetTargetMoniker>
28-
</PropertyGroup>
2919
<ItemGroup Condition="'$(TargetFramework)' != 'uap10.0' and '$(TargetFramework)' != 'netstandard1.1' and '$(TargetFramework)' != 'netstandard1.3' and '$(TargetFramework)' != 'netstandard2.0'">
3020
<Reference Include="System" />
3121
<Reference Include="System.Core" />
3222
<Reference Include="System.Numerics" Condition="'$(TargetFramework)' != 'net35'" />
3323
</ItemGroup>
34-
<ItemGroup Condition="'$(TargetFramework)' == 'MonoAndroid10'">
35-
<Reference Include="Mono.Android" />
36-
</ItemGroup>
37-
<ItemGroup Condition="'$(TargetFramework)' == 'Xamarin.iOS10'">
38-
<Reference Include="Xamarin.iOS" />
39-
</ItemGroup>
4024
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.1' or '$(TargetFramework)' == 'netstandard1.3'">
4125
<PackageReference Include="System.Collections" Version="4.0.11" />
4226
<PackageReference Include="System.Collections.Concurrent" Version="4.0.12" />
@@ -446,7 +430,7 @@
446430
<Compile Remove="Serialization\DefaultSerializers\SimdTypeSerializers.cs" />
447431
<Compile Remove="Serialization\DefaultSerializers\System_Security_Cryptography_HashAlgorithmNameMessagePackSerializer.cs" />
448432
</ItemGroup>
449-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.1' or '$(TargetFramework)' == 'netstandard1.3' or '$(TargetFramework)' == 'uap10.0' or '$(TargetFramework)' == 'MonoAndroid10' or '$(TargetFramework)' == 'Xamarin.iOS10'">
433+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.1' or '$(TargetFramework)' == 'netstandard1.3' or '$(TargetFramework)' == 'uap10.0'">
450434
<Compile Remove="Serialization\CodeDomSerializers\*.*" />
451435
<Compile Remove="Serialization\CodeGenerationSink.cs" />
452436
<Compile Remove="Serialization\DependentAssemblyManager.cs" />
@@ -469,7 +453,7 @@
469453
<ItemGroup Condition="'$(TargetFramework)' == 'uap10.0'">
470454
<Compile Remove="UnsafeNativeMethods.cs" />
471455
</ItemGroup>
472-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.1' or '$(TargetFramework)' == 'uap10.0' or '$(TargetFramework)' == 'MonoAndroid10' or '$(TargetFramework)' == 'Xamarin.iOS10'">
456+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.1' or '$(TargetFramework)' == 'uap10.0'">
473457
<Compile Remove="Serialization\AbstractSerializers\**\*.*" />
474458
<Compile Remove="Serialization\DefaultSerializers\System_Security_Cryptography_HashAlgorithmNameMessagePackSerializer.cs" />
475459
<Compile Remove="Serialization\EmittingSerializers\**\*.*" />
@@ -500,14 +484,7 @@
500484
<Compile Remove="Serialization\EmittingSerializers\AssemblyBuilderCodeGenerationContext.cs" />
501485
<Compile Remove="Serialization\DefaultSerializers\System_Security_Cryptography_HashAlgorithmNameMessagePackSerializer.cs" />
502486
</ItemGroup>
503-
<ItemGroup Condition="'$(TargetFramework)' == 'MonoAndroid10' or '$(TargetFramework)' == 'Xamarin.iOS10'">
504-
<Compile Remove="Serialization\DefaultSerializers\FileTimeMessagePackSerializerProvider.cs" />
505-
<Compile Remove="Serialization\DefaultSerializers\NativeFileTimeMessagePackSerializer.cs" />
506-
<Compile Remove="Serialization\DefaultSerializers\UnixEpocFileTimeMessagePackSerializer.cs" />
507-
<Compile Remove="Serialization\DefaultSerializers\TimestampFileTimeMessagePackSerializer.cs" />
508-
<Compile Remove="Serialization\ReflectionExtensions.ConstructorDelegate.cs" />
509-
</ItemGroup>
510-
<ItemGroup Condition="'$(TargetFramework)' == 'net45' or '$(TargetFramework)' == 'net46' or '$(TargetFramework)' == 'netstandard1.1' or '$(TargetFramework)' == 'netstandard1.3' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'uap10.0' or '$(TargetFramework)' == 'MonoAndroid10' or '$(TargetFramework)' == 'Xamarin.iOS10'">
487+
<ItemGroup Condition="'$(TargetFramework)' == 'net45' or '$(TargetFramework)' == 'net46' or '$(TargetFramework)' == 'netstandard1.1' or '$(TargetFramework)' == 'netstandard1.3' or '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'uap10.0'">
511488
<Compile Include="AsyncReadResult.cs" />
512489
<Compile Include="AsyncReadResult`1.cs" />
513490
<Compile Include="TaskAugument.cs" />
@@ -520,10 +497,4 @@
520497
<!-- For VS, use $(MSBuildExtensionsPath) -->
521498
<VSMSBuildExtensionsPath>$(MSBuildExtensionsPath)</VSMSBuildExtensionsPath>
522499
</PropertyGroup>
523-
<PropertyGroup Condition="'$(XamarinMSBuildExtensionsPath)' == ''">
524-
<XamarinMSBuildExtensionsPath>$(VSMSBuildExtensionsPath)</XamarinMSBuildExtensionsPath>
525-
</PropertyGroup>
526-
<Import Project="$(VSMSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" Condition="'$(TargetFramework)' == 'uap10.0'" />
527-
<Import Project="$(XamarinMSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" Condition="'$(TargetFramework)' == 'MonoAndroid10' and $(SkipXamarin) != 'true'" />
528-
<Import Project="$(XamarinMSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" Condition="'$(TargetFramework)' == 'Xamarin.iOS10' and $(SkipXamarin) != 'true'" />
529500
</Project>

src/MsgPack/Properties/AssemblyInfo.cs

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#region -- License Terms --
1+
#region -- License Terms --
22
//
33
// MessagePack for CLI
44
//
@@ -34,15 +34,6 @@
3434
".NET Standard 1.1"
3535
#elif NETSTANDARD1_3
3636
".NET Standard 1.3"
37-
#elif XAMARIN
38-
"Xamarin for " +
39-
#if __ANDROID__
40-
"Android"
41-
#elif __IOS__
42-
"iOS"
43-
#else
44-
#error Unexpected Xamarin!
45-
#endif // XAMARIN
4637
#elif NETSTANDARD2_0
4738
".NET Standard 2.0"
4839
#else
@@ -67,12 +58,8 @@
6758
[assembly: InternalsVisibleTo( "MsgPack.UnitTest.CodeDom.Net35, PublicKey=0024000004800000940000000602000000240000525341310004000001000100a967de8de9d45380b93a6aa56f64fc2cb2d3c9d4b400e00de01f31ba9e15cf5ca95926dbf8760cce413eabd711e23df0c133193a570da8a3bb1bdc00ef170fccb2bc033266fa5346442c9cf0b071133d5b484845eab17095652aeafeeb71193506b8294d9c8c91e3fd01cc50bdbc2d0eb78dd655bb8cd0bd3cdbbcb192549cb4" )]
6859
#endif // NET35
6960
[assembly: InternalsVisibleTo( "MsgPack.UnitTest.BclExtensions, PublicKey=0024000004800000940000000602000000240000525341310004000001000100a967de8de9d45380b93a6aa56f64fc2cb2d3c9d4b400e00de01f31ba9e15cf5ca95926dbf8760cce413eabd711e23df0c133193a570da8a3bb1bdc00ef170fccb2bc033266fa5346442c9cf0b071133d5b484845eab17095652aeafeeb71193506b8294d9c8c91e3fd01cc50bdbc2d0eb78dd655bb8cd0bd3cdbbcb192549cb4" )]
70-
#if XAMARIN
71-
#if __ANDROID__
72-
[assembly:InternalsVisibleTo( "MsgPack.UnitTest.Xamarin.Android" )]
73-
#endif // __ANDROID__
74-
#if __IOS__
75-
[assembly:InternalsVisibleTo( "MsgPackUnitTestXamariniOS" )]
76-
#endif // __IOS__
77-
#endif // XAMARIN
61+
#if NETSTANDARD1_3 || NETSTANDARD2_0
62+
[assembly:InternalsVisibleTo( "MsgPack.UnitTest.Xamarin.Android, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100a967de8de9d45380b93a6aa56f64fc2cb2d3c9d4b400e00de01f31ba9e15cf5ca95926dbf8760cce413eabd711e23df0c133193a570da8a3bb1bdc00ef170fccb2bc033266fa5346442c9cf0b071133d5b484845eab17095652aeafeeb71193506b8294d9c8c91e3fd01cc50bdbc2d0eb78dd655bb8cd0bd3cdbbcb192549cb4" )]
63+
[assembly:InternalsVisibleTo( "MsgPackUnitTestXamariniOS, PublicKey=0024000004800000940000000602000000240000525341310004000001000100a967de8de9d45380b93a6aa56f64fc2cb2d3c9d4b400e00de01f31ba9e15cf5ca95926dbf8760cce413eabd711e23df0c133193a570da8a3bb1bdc00ef170fccb2bc033266fa5346442c9cf0b071133d5b484845eab17095652aeafeeb71193506b8294d9c8c91e3fd01cc50bdbc2d0eb78dd655bb8cd0bd3cdbbcb192549cb4" )]
64+
#endif // NETSTANDARD1_3 || NETSTANDARD2_0
7865
#endif // DEBUG || PERFORMANCE_TEST

src/MsgPack/Serialization/CollectionSerializers/DictionaryMessagePackSerializer`3.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,4 +281,4 @@ private void UnpackToCore( Unpacker unpacker, object collection, int itemsCount
281281
}
282282
}
283283
#endif // UNITY
284-
}
284+
}

src/MsgPack/Serialization/DateTimeMessagePackSerializerHelpers.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ internal static bool IsDateTime( Type dateTimeType )
8989
return
9090
dateTimeType == typeof( DateTime )
9191
|| dateTimeType == typeof( DateTime? )
92-
#if ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY
92+
#if ( !SILVERLIGHT || WINDOWS_PHONE ) && !UNITY
9393
|| dateTimeType == typeof( FILETIME )
9494
|| dateTimeType == typeof( FILETIME? )
95-
#endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY
95+
#endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !UNITY
9696
// DateTimeOffset? and Timestamp? do not have to be treat specially.
9797
|| dateTimeType == typeof( DateTimeOffset )
9898
|| dateTimeType == typeof( Timestamp );

src/MsgPack/Serialization/DefaultSerializers/GenericSerializer.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#region -- License Terms --
1+
#region -- License Terms --
22
//
33
// MessagePack for CLI
44
//
@@ -125,12 +125,12 @@ private static MessagePackSerializer CreateNullableSerializer( SerializationCont
125125
#if !UNITY
126126
private static MessagePackSerializer CreateListSerializer( SerializationContext context, Type itemType, PolymorphismSchema schema )
127127
{
128-
#if DEBUG && !XAMARIN && !UNITY_IPHONE && !UNITY_ANDROID
128+
#if DEBUG
129129
if ( SerializerDebugging.AvoidsGenericSerializer )
130130
{
131131
return null;
132132
}
133-
#endif // DEBUG && !XAMARIN && !UNITY_IPHONE && !UNITY_ANDROID
133+
#endif // DEBUG
134134
return
135135
ReflectionExtensions.CreateInstancePreservingExceptionType<IGenericBuiltInSerializerFactory>(
136136
typeof( ListInstanceFactory<> ).MakeGenericType( itemType )
@@ -146,12 +146,12 @@ private static MessagePackSerializer CreateListSerializer( SerializationContext
146146
#if !UNITY
147147
private static MessagePackSerializer CreateDictionarySerializer( SerializationContext context, Type keyType, Type valueType, PolymorphismSchema schema )
148148
{
149-
#if DEBUG && !XAMARIN && !UNITY_IPHONE && !UNITY_ANDROID
149+
#if DEBUG
150150
if ( SerializerDebugging.AvoidsGenericSerializer )
151151
{
152152
return null;
153153
}
154-
#endif // DEBUG && !XAMARIN && !UNITY_IPHONE && !UNITY_ANDROID
154+
#endif // DEBUG
155155
return
156156
ReflectionExtensions.CreateInstancePreservingExceptionType<IGenericBuiltInSerializerFactory>(
157157
typeof( DictionaryInstanceFactory<,> ).MakeGenericType( keyType, valueType )

src/MsgPack/Serialization/DefaultSerializers/InternalDateTimeExtensions.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#region -- License Terms --
1+
#region -- License Terms --
22
//
33
// MessagePack for CLI
44
//
@@ -23,9 +23,9 @@
2323
#endif
2424

2525
using System;
26-
#if ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY
26+
#if ( !SILVERLIGHT || WINDOWS_PHONE ) && !UNITY
2727
using System.Runtime.InteropServices.ComTypes;
28-
#endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY
28+
#endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !UNITY
2929

3030
namespace MsgPack.Serialization.DefaultSerializers
3131
{
@@ -70,7 +70,7 @@ public static Int64 ToBinary( this DateTime source )
7070
// End porting
7171
#endif // SILVERLIGHT
7272

73-
#if ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY
73+
#if ( !SILVERLIGHT || WINDOWS_PHONE ) && !UNITY
7474
private static readonly DateTime _fileTimeEpocUtc = new DateTime( 1601, 1, 1, 0, 0, 0, DateTimeKind.Utc );
7575

7676
public static DateTime ToDateTime( this FILETIME source )
@@ -92,6 +92,6 @@ public static FILETIME ToWin32FileTimeUtc( this DateTime source )
9292
dwLowDateTime = unchecked( ( int ) ( value & 0xffffffff ) )
9393
};
9494
}
95-
#endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY
95+
#endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !UNITY
9696
}
97-
}
97+
}

src/MsgPack/Serialization/MessagePackSerializer.Factories.cs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,19 @@
2323

2424
#if UNITY_5 || UNITY_STANDALONE || UNITY_WEBPLAYER || UNITY_WII || UNITY_IPHONE || UNITY_ANDROID || UNITY_PS3 || UNITY_XBOX360 || UNITY_FLASH || UNITY_BKACKBERRY || UNITY_WINRT
2525
#define UNITY
26-
#define AOT
2726
#endif
2827

29-
#if !AOT && !SILVERLIGHT && !NETSTANDARD1_1
28+
#if !UNITY && !SILVERLIGHT && !NETSTANDARD1_1
3029
#define FEATURE_EMIT
31-
#endif // !AOT && !SILVERLIGHT && !NETSTANDARD1_1
30+
#endif // !UNITY && !SILVERLIGHT && !NETSTANDARD1_1
3231

3332
using System;
3433
using System.IO;
3534
using System.Globalization;
36-
#if AOT
35+
#if UNITY
3736
using System.Linq;
3837
using System.Reflection;
39-
#endif // AOT
38+
#endif // UNITY
4039
using System.Runtime.Serialization;
4140

4241
using MsgPack.Serialization.DefaultSerializers;
@@ -216,22 +215,22 @@ internal static MessagePackSerializer<T> CreateInternal<T>( SerializationContext
216215
Contract.Ensures( Contract.Result<MessagePackSerializer<T>>() != null );
217216
#endif // DEBUG
218217

219-
#if DEBUG && !AOT && !SILVERLIGHT && !NETSTANDARD1_1
218+
#if DEBUG && !UNITY && !SILVERLIGHT && !NETSTANDARD1_1
220219
SerializerDebugging.TraceEmitEvent(
221220
"SerializationContext::CreateInternal<{0}>(@{1}, {2})",
222221
typeof( T ),
223222
context.GetHashCode(),
224223
schema == null ? "null" : schema.DebugString
225224
);
226225

227-
#endif // DEBUG && !AOT && !SILVERLIGHT && !NETSTANDARD1_1
226+
#endif // DEBUG && !UNITY && !SILVERLIGHT && !NETSTANDARD1_1
228227
Type concreteType = null;
229228
CollectionTraits collectionTraits =
230-
#if AOT
229+
#if UNITY
231230
typeof( T ).GetCollectionTraits( CollectionTraitOptions.None, context.CompatibilityOptions.AllowNonCollectionEnumerableTypes );
232231
#else
233232
typeof( T ).GetCollectionTraits( CollectionTraitOptions.Full, context.CompatibilityOptions.AllowNonCollectionEnumerableTypes );
234-
#endif // AOT
233+
#endif // UNITY
235234

236235
if ( typeof( T ).GetIsAbstract() || typeof( T ).GetIsInterface() )
237236
{
@@ -361,7 +360,7 @@ public static MessagePackSerializer Create( Type targetType, SerializationContex
361360
Contract.Ensures( Contract.Result<MessagePackSerializer>() != null );
362361
#endif // DEBUG
363362

364-
#if AOT
363+
#if UNITY
365364
return CreateInternal( context, targetType, null );
366365
#else
367366
// MPS.Create should always return new instance, and creator delegate should be cached for performance.
@@ -412,7 +411,7 @@ public static MessagePackSerializer Create( Type targetType, SerializationContex
412411
);
413412
#endif // NETSTANDARD1_1 || NETSTANDARD1_3
414413
return factory( context );
415-
#endif // AOT
414+
#endif // UNITY
416415
}
417416

418417
/// <summary>
@@ -539,7 +538,7 @@ public static MessagePackSerializer Get( Type targetType, SerializationContext c
539538
return context.GetSerializer( targetType, providerParameter );
540539
}
541540

542-
#if AOT
541+
#if UNITY
543542
private static readonly System.Reflection.MethodInfo CreateInternal_2 =
544543
typeof( MessagePackSerializer ).GetRuntimeMethods()
545544
.Single( m =>
@@ -563,7 +562,7 @@ internal static MessagePackSerializer CreateInternal( SerializationContext conte
563562
as Func<SerializationContext, PolymorphismSchema, object> )( context, schema ) as MessagePackSerializer;
564563
#endif // UNITY
565564
}
566-
#endif // AOT
565+
#endif // UNITY
567566

568567
internal static MessagePackSerializer<T> CreateReflectionInternal<T>( SerializationContext context, Type concreteType, PolymorphismSchema schema )
569568
{

0 commit comments

Comments
 (0)