diff --git a/CHANGES.txt b/CHANGES.txt
index c70f5d8ac..f83f51eed 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -261,6 +261,7 @@ Release 0.6.0 Beta2 - 2015/05/24
NEW FEATURE
* New utility method of SerializationContext to switch back the behavior to previous version's one.
+ * Add corlib only build (MsgPack.Unity3D.Micro). This build only depends mscorlib. This feature is experimental. Related to Issue #72.
IMPROVEMENTS
* Add many workarounds for AOT issues of Mono on iOS (in particular, Unity).
diff --git a/MsgPack.compats.sln b/MsgPack.compats.sln
index 9d89debf4..953776500 100644
--- a/MsgPack.compats.sln
+++ b/MsgPack.compats.sln
@@ -41,6 +41,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NUnitLiteRunner", "..\..\Yu
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunitlite-3.5", "..\..\Yusuke\Documents\git\msgpack-cli\test\NUnitLite\src\framework\nunitlite-3.5.csproj", "{43B24DC5-16D6-45EF-93F1-B021B785A892}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MsgPack.Unity3D.Micro", "src\MsgPack.Unity3D.Micro\MsgPack.Unity3D.Micro.csproj", "{B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
CodeAnalysis|Any CPU = CodeAnalysis|Any CPU
@@ -299,6 +301,36 @@ Global
{43B24DC5-16D6-45EF-93F1-B021B785A892}.Release|ARM.ActiveCfg = Release|Any CPU
{43B24DC5-16D6-45EF-93F1-B021B785A892}.Release|x64.ActiveCfg = Release|Any CPU
{43B24DC5-16D6-45EF-93F1-B021B785A892}.Release|x86.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.CodeAnalysis|Any CPU.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.CodeAnalysis|Any CPU.Build.0 = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.CodeAnalysis|ARM.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.CodeAnalysis|x64.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.CodeAnalysis|x86.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.CoreProfile|Any CPU.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.CoreProfile|Any CPU.Build.0 = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.CoreProfile|ARM.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.CoreProfile|x64.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.CoreProfile|x86.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.Instrument|Any CPU.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.Instrument|Any CPU.Build.0 = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.Instrument|ARM.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.Instrument|x64.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.Instrument|x86.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.PerformanceTest|Any CPU.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.PerformanceTest|Any CPU.Build.0 = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.PerformanceTest|ARM.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.PerformanceTest|x64.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.PerformanceTest|x86.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.Release|ARM.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.Release|x64.ActiveCfg = Release|Any CPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -315,5 +347,6 @@ Global
{767C2A1C-53F8-4048-BE02-CB4393B1CEB6} = {87A17015-9338-431E-B338-57BDA03984C1}
{12047296-B817-4C1A-B01B-5E619F72E407} = {767C2A1C-53F8-4048-BE02-CB4393B1CEB6}
{43B24DC5-16D6-45EF-93F1-B021B785A892} = {767C2A1C-53F8-4048-BE02-CB4393B1CEB6}
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121} = {936467D2-1DD3-4243-BBB4-FCCB2CA1E3AC}
EndGlobalSection
EndGlobal
diff --git a/Sync.xml b/Sync.xml
index 2de72d427..efb38884e 100644
--- a/Sync.xml
+++ b/Sync.xml
@@ -68,6 +68,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/MsgPack.Unity3D.Micro/MicroCorLibHelper.cs b/src/MsgPack.Unity3D.Micro/MicroCorLibHelper.cs
new file mode 100644
index 000000000..05b0b9c9c
--- /dev/null
+++ b/src/MsgPack.Unity3D.Micro/MicroCorLibHelper.cs
@@ -0,0 +1,86 @@
+#region -- License Terms --
+//
+// MessagePack for CLI
+//
+// Copyright (C) 2015 FUJIWARA, Yusuke
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#endregion -- License Terms --
+
+using System;
+using System.Collections.Generic;
+
+namespace MsgPack
+{
+#if CORLIB_ONLY
+ internal sealed class BooleanStack
+ {
+ private readonly List _list;
+
+ public int Count { get { return this._list.Count; } }
+
+ public BooleanStack( int initialCapacity )
+ {
+ this._list = new List( initialCapacity );
+ }
+
+ public void Push( Boolean value )
+ {
+ this._list.Add( value );
+ }
+
+ public Boolean Peek()
+ {
+ return this._list[ this._list.Count - 1 ];
+ }
+
+ public Boolean Pop()
+ {
+ var result = this.Peek();
+ this._list.RemoveAt( this._list.Count - 1 );
+ return result;
+ }
+ }
+
+ internal sealed class Int64Stack
+ {
+ private readonly List _list;
+
+ public int Count { get { return this._list.Count; } }
+
+ public Int64Stack( int initialCapacity )
+ {
+ this._list = new List( initialCapacity );
+ }
+
+ public void Push( Int64 value )
+ {
+ this._list.Add( value );
+ }
+
+ public Int64 Peek()
+ {
+ return this._list[ this._list.Count - 1 ];
+ }
+
+ public Int64 Pop()
+ {
+ var result = this.Peek();
+ this._list.RemoveAt( this._list.Count - 1 );
+ return result;
+ }
+ }
+
+#endif // CORLIB_ONLY
+}
diff --git a/src/MsgPack.Unity3D.Micro/MicroCorLibHelper.tt b/src/MsgPack.Unity3D.Micro/MicroCorLibHelper.tt
new file mode 100644
index 000000000..352270e09
--- /dev/null
+++ b/src/MsgPack.Unity3D.Micro/MicroCorLibHelper.tt
@@ -0,0 +1,70 @@
+<#@ template debug="false" hostspecific="false" language="C#" #>
+<#@ assembly name="System.Core" #>
+<#@ import namespace="System.Linq" #>
+<#@ import namespace="System.Text" #>
+<#@ import namespace="System.Collections.Generic" #>
+<#@ output extension=".cs" #>
+#region -- License Terms --
+//
+// MessagePack for CLI
+//
+// Copyright (C) 2015 FUJIWARA, Yusuke
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#endregion -- License Terms --
+
+using System;
+using System.Collections.Generic;
+
+namespace MsgPack
+{
+#if CORLIB_ONLY
+<#
+foreach ( var itemType in new[] { typeof( bool ), typeof( long ) } )
+{
+#>
+ internal sealed class <#= itemType.Name #>Stack
+ {
+ private readonly List<<#= itemType.Name #>> _list;
+
+ public int Count { get { return this._list.Count; } }
+
+ public <#= itemType.Name #>Stack( int initialCapacity )
+ {
+ this._list = new List<<#= itemType.Name #>>( initialCapacity );
+ }
+
+ public void Push( <#= itemType.Name #> value )
+ {
+ this._list.Add( value );
+ }
+
+ public <#= itemType.Name #> Peek()
+ {
+ return this._list[ this._list.Count - 1 ];
+ }
+
+ public <#= itemType.Name #> Pop()
+ {
+ var result = this.Peek();
+ this._list.RemoveAt( this._list.Count - 1 );
+ return result;
+ }
+ }
+
+<#
+ }
+#>
+#endif // CORLIB_ONLY
+}
diff --git a/src/MsgPack.Unity3D.Micro/MsgPack.Unity3D.Micro.csproj b/src/MsgPack.Unity3D.Micro/MsgPack.Unity3D.Micro.csproj
new file mode 100644
index 000000000..f915f7007
--- /dev/null
+++ b/src/MsgPack.Unity3D.Micro/MsgPack.Unity3D.Micro.csproj
@@ -0,0 +1,665 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {B752BA0A-72A8-4EE8-AF44-D4F5A55A6121}
+ Library
+ Properties
+ MsgPack
+ MsgPack
+ v3.5
+ 512
+
+
+ true
+ full
+ false
+ bin\Debug\
+ TRACE;DEBUG;UNITY_IPHONE;CORLIB_ONLY;CODE_ANALYSIS
+ prompt
+ 4
+ bin\Debug\MsgPack.XML
+ 3001,3002
+
+
+ pdbonly
+ true
+ ..\..\MsgPack-CLI\unity3d-micro\
+ TRACE;UNITY_IPHONE;CORLIB_ONLY
+ prompt
+ 4
+ ..\..\MsgPack-CLI\unity3d-micro\MsgPack.XML
+ 3001,3002
+
+
+
+ Properties\CommonAssemblyInfo.cs
+
+
+ Properties\CommonAssemblyInfo.Pack.cs
+
+
+ Serialization\AotHelper.cs
+
+
+ Serialization\AotHelper.EqualityComparers.cs
+
+
+ Serialization\EnumTypedMessagePackSerializerWrapper`1.cs
+
+
+ Serialization\NonGenericMessagePackSerializer.cs
+
+
+ Serialization\TypedMessagePackSerializerWrapper`1.cs
+
+
+ MPContract.cs
+
+
+ BigEndianBinary.cs
+
+
+ Binary.cs
+
+
+ CollectionDebuggerProxy`1.cs
+
+
+ CollectionOperation.cs
+
+
+ DictionaryDebuggerProxy`2.cs
+
+
+ Float32Bits.cs
+
+
+ Float64Bits.cs
+
+
+ GlobalSuppressions.cs
+
+
+ InvalidMessagePackStreamException.cs
+
+
+ IPackable.cs
+
+
+ ItemsUnpacker.cs
+
+
+ ItemsUnpacker.Skipping.cs
+
+
+ ItemsUnpacker.Unpacking.cs
+
+
+ IUnpackable.cs
+
+
+ MessageNotSupportedException.cs
+
+
+ MessagePackCode.cs
+
+
+ MessagePackConvert.cs
+
+
+ MessagePackExtendedTypeObject.cs
+
+
+ MessagePackObject.cs
+
+
+ MessagePackObject.Utilities.cs
+
+
+ MessagePackObjectDictionary.cs
+
+
+ MessagePackObjectDictionary.Enumerator.cs
+
+
+ MessagePackObjectDictionary.KeySet.cs
+
+
+ MessagePackObjectDictionary.KeySet.Enumerator.cs
+
+
+ MessagePackObjectDictionary.ValueCollection.cs
+
+
+ MessagePackObjectDictionary.ValueCollection.Enumerator.cs
+
+
+ MessagePackObjectEqualityComparer.cs
+
+
+ MessagePackString.cs
+
+
+ MessageTypeException.cs
+
+
+ Packer.cs
+
+
+ Packer.Nullable.cs
+
+
+ PackerCompatibilityOptions.cs
+
+
+ PackerUnpackerExtensions.cs
+
+
+ PackingOptions.cs
+
+
+ ReflectionAbstractions.cs
+
+
+ Serialization\CollectionDetailedKind.cs
+
+
+ Serialization\CollectionKind.cs
+
+
+ Serialization\CollectionSerializers\CollectionMessagePackSerializer`2.cs
+
+
+ Serialization\CollectionSerializers\CollectionSerializerHelpers.cs
+
+
+ Serialization\CollectionSerializers\DictionaryMessagePackSerializer`3.cs
+
+
+ Serialization\CollectionSerializers\EnumerableMessagePackSerializerBase`2.cs
+
+
+ Serialization\CollectionSerializers\EnumerableMessagePackSerializer`2.cs
+
+
+ Serialization\CollectionSerializers\ICollectionInstanceFactory.cs
+
+
+ Serialization\CollectionSerializers\NonGenericCollectionMessagePackSerializer`1.cs
+
+
+ Serialization\CollectionSerializers\NonGenericDictionaryMessagePackSerializer`1.cs
+
+
+ Serialization\CollectionSerializers\NonGenericEnumerableMessagePackSerializerBase`1.cs
+
+
+ Serialization\CollectionSerializers\NonGenericEnumerableMessagePackSerializer`1.cs
+
+
+ Serialization\CollectionSerializers\NonGenericListMessagePackSerializer`1.cs
+
+
+ Serialization\CollectionTraits.cs
+
+
+ Serialization\DataMemberContract.cs
+
+
+ Serialization\DateTimeConversionMethod.cs
+
+
+ Serialization\DateTimeMemberConversionMethod.cs
+
+
+ Serialization\DateTimeMessagePackSerializerHelpers.cs
+
+
+ Serialization\DefaultConcreteTypeRepository.cs
+
+
+ Serialization\DefaultSerializers\AbstractCollectionMessagePackSerializer`2.cs
+
+
+ Serialization\DefaultSerializers\AbstractCollectionSerializerHelper.cs
+
+
+ Serialization\DefaultSerializers\AbstractDictionaryMessagePackSerializer`3.cs
+
+
+ Serialization\DefaultSerializers\AbstractEnumerableMessagePackSerializer`2.cs
+
+
+ Serialization\DefaultSerializers\AbstractNonGenericCollectionMessagePackSerializer`1.cs
+
+
+ Serialization\DefaultSerializers\AbstractNonGenericDictionaryMessagePackSerializer`1.cs
+
+
+ Serialization\DefaultSerializers\AbstractNonGenericEnumerableMessagePackSerializer`1.cs
+
+
+ Serialization\DefaultSerializers\AbstractNonGenericListMessagePackSerializer`1.cs
+
+
+ Serialization\DefaultSerializers\ArraySegmentMessageSerializer.cs
+
+
+ Serialization\DefaultSerializers\ArraySerializer.cs
+
+
+ Serialization\DefaultSerializers\ArraySerializer.Primitives.cs
+
+
+ Serialization\DefaultSerializers\ArraySerializer`1.cs
+
+
+ Serialization\DefaultSerializers\DateTimeMessagePackSerializerProvider.cs
+
+
+ Serialization\DefaultSerializers\DateTimeOffsetMessagePackSerializer.cs
+
+
+ Serialization\DefaultSerializers\DateTimeOffsetMessagePackSerializerProvider.cs
+
+
+ Serialization\DefaultSerializers\DefaultSerializers.cs
+
+
+ Serialization\DefaultSerializers\FileTimeMessagePackSerializerProvider.cs
+
+
+ Serialization\DefaultSerializers\GenericSerializer.cs
+
+
+ Serialization\DefaultSerializers\ImmutableCollectionSerializer`2.cs
+
+
+ Serialization\DefaultSerializers\ImmutableDictionarySerializer`3.cs
+
+
+ Serialization\DefaultSerializers\ImmutableStackSerializer`2.cs
+
+
+ Serialization\DefaultSerializers\InternalDateTimeExtensions.cs
+
+
+ Serialization\DefaultSerializers\MessagePackObjectExtensions.cs
+
+
+ Serialization\DefaultSerializers\MsgPack_MessagePackExtendedTypeObjectMessagePackSerializer.cs
+
+
+ Serialization\DefaultSerializers\MsgPack_MessagePackObjectDictionaryMessagePackSerializer.cs
+
+
+ Serialization\DefaultSerializers\MsgPack_MessagePackObjectMessagePackSerializer.cs
+
+
+ Serialization\DefaultSerializers\NativeDateTimeMessagePackSerializer.cs
+
+
+ Serialization\DefaultSerializers\NativeFileTimeMessagePackSerializer.cs
+
+
+ Serialization\DefaultSerializers\NullableMessagePackSerializer`1.cs
+
+
+ Serialization\DefaultSerializers\System_ArraySegment_1MessagePackSerializer`1.cs
+
+
+ Serialization\DefaultSerializers\System_ByteArrayMessagePackSerializer.cs
+
+
+ Serialization\DefaultSerializers\System_CharArrayMessagePackSerializer.cs
+
+
+ Serialization\DefaultSerializers\System_Collections_DictionaryEntryMessagePackSerializer.cs
+
+
+ Serialization\DefaultSerializers\System_Collections_Generic_Dictionary_2MessagePackSerializer`2.cs
+
+
+ Serialization\DefaultSerializers\System_Collections_Generic_KeyValuePair_2MessagePackSerializer`2.cs
+
+
+ Serialization\DefaultSerializers\System_Collections_Generic_ListOfMessagePackObjectMessagePackSerializer.cs
+
+
+ Serialization\DefaultSerializers\System_Collections_Generic_List_1MessagePackSerializer`1.cs
+
+
+ Serialization\DefaultSerializers\System_Collections_QueueMessagePackSerializer.cs
+
+
+ Serialization\DefaultSerializers\System_Collections_StackMessagePackSerializer.cs
+
+
+ Serialization\DefaultSerializers\System_Numerics_ComplexMessagePackSerializer.cs
+
+
+ Serialization\DefaultSerializers\System_ObjectMessagePackSerializer.cs
+
+
+ Serialization\DefaultSerializers\System_StringMessagePackSerializer.cs
+
+
+ Serialization\DefaultSerializers\System_Text_StringBuilderMessagePackSerializer.cs
+
+
+ Serialization\DefaultSerializers\System_VersionMessagePackSerializer.cs
+
+
+ Serialization\DefaultSerializers\UnixEpocDateTimeMessagePackSerializer.cs
+
+
+ Serialization\DefaultSerializers\UnixEpocFileTimeMessagePackSerializer.cs
+
+
+ Serialization\EmitterFlavor.cs
+
+
+ Serialization\EnumMemberSerializationMethod.cs
+
+
+ Serialization\EnumMessagePackSerializerHelpers.cs
+
+
+ Serialization\EnumMessagePackSerializerProvider.cs
+
+
+ Serialization\EnumMessagePackSerializer`1.cs
+
+
+ Serialization\EnumSerializationMethod.cs
+
+
+ Serialization\ICustomizableEnumSerializer.cs
+
+
+ Serialization\IdentifierUtility.cs
+
+
+ Serialization\IMessagePackSerializer.cs
+
+
+ Serialization\IMessagePackSingleObjectSerializer.cs
+
+
+ Serialization\INilImplicationHandlerOnUnpackedParameter.cs
+
+
+ Serialization\INilImplicationHandlerParameter.cs
+
+
+ Serialization\ISerializerGeneratorConfiguration.cs
+
+
+ Serialization\LazyDelegatingMessagePackSerializer`1.cs
+
+
+ Serialization\MessagePackDateTimeMemberAttribute.cs
+
+
+ Serialization\MessagePackDeserializationConstructorAttribute.cs
+
+
+ Serialization\MessagePackEnumAttribute.cs
+
+
+ Serialization\MessagePackEnumMemberAttribute.cs
+
+
+ Serialization\MessagePackIgnoreAttribute.cs
+
+
+ Serialization\MessagePackKnownTypeAttributes.cs
+
+
+ Serialization\MessagePackMemberAttribute.cs
+
+
+ Serialization\MessagePackRuntimeTypeAttributes.cs
+
+
+ Serialization\MessagePackSerializer.cs
+
+
+ Serialization\MessagePackSerializerExtensions.cs
+
+
+ Serialization\MessagePackSerializerProvider.cs
+
+
+ Serialization\MessagePackSerializer`1.cs
+
+
+ Serialization\NilImplication.cs
+
+
+ Serialization\NilImplicationHandler`4.cs
+
+
+ Serialization\Polymorphic\IPolymorphicDeserializer.cs
+
+
+ Serialization\Polymorphic\IPolymorphicHelperAttributes.cs
+
+
+ Serialization\Polymorphic\KnownTypePolymorhicMessagePackSerializer`1.cs
+
+
+ Serialization\Polymorphic\PolymorphicSerializerProvider`1.cs
+
+
+ Serialization\Polymorphic\TypeEmbedingPolymorhicMessagePackSerializer`1.cs
+
+
+ Serialization\Polymorphic\TypeInfoEncoder.cs
+
+
+ Serialization\Polymorphic\TypeInfoEncoding.cs
+
+
+ Serialization\PolymorphismSchema.Constructors.cs
+
+
+ Serialization\PolymorphismSchema.cs
+
+
+ Serialization\PolymorphismSchema.Internals.cs
+
+
+ Serialization\PolymorphismSchemaChildrenType.cs
+
+
+ Serialization\PolymorphismTarget.cs
+
+
+ Serialization\PolymorphismType.cs
+
+
+ Serialization\ReflectionExtensions.cs
+
+
+ Serialization\ReflectionSerializers\ReflectionCollectionMessagePackSerializer`2.cs
+
+
+ Serialization\ReflectionSerializers\ReflectionDictionaryMessagePackSerializer`3.cs
+
+
+ Serialization\ReflectionSerializers\ReflectionEnumerableMessagePackSerializer`2.cs
+
+
+ Serialization\ReflectionSerializers\ReflectionEnumMessagePackSerializer`1.cs
+
+
+ Serialization\ReflectionSerializers\ReflectionNilImplicationHandler.cs
+
+
+ Serialization\ReflectionSerializers\ReflectionNonGeenricCollectionMessagePackSerializer`1.cs
+
+
+ Serialization\ReflectionSerializers\ReflectionNonGeenricEnumerableMessagePackSerializer`1.cs
+
+
+ Serialization\ReflectionSerializers\ReflectionNonGenericDictionaryMessagePackSerializer`1.cs
+
+
+ Serialization\ReflectionSerializers\ReflectionNonGenericListMessagePackSerializer`1.cs
+
+
+ Serialization\ReflectionSerializers\ReflectionObjectMessagePackSerializer`1.cs
+
+
+ Serialization\ReflectionSerializers\ReflectionSerializerHelper.cs
+
+
+ Serialization\ReflectionSerializers\ReflectionSerializerNilImplicationHandlerOnUnpackedParameter.cs
+
+
+ Serialization\ReflectionSerializers\ReflectionSerializerNilImplicationHandlerParameter.cs
+
+
+ Serialization\Reflection\GenericTypeExtensions.cs
+
+
+ Serialization\Reflection\ReflectionExtensions.cs
+
+
+ Serialization\SerializationCompatibilityOptions.cs
+
+
+ Serialization\SerializationContext.cs
+
+
+ Serialization\SerializationContext.TypeEmbedding.cs
+
+
+ Serialization\SerializationExceptions.cs
+
+
+ Serialization\SerializationMethod.cs
+
+
+ Serialization\SerializationMethodGeneratorOption.cs
+
+
+ Serialization\SerializationTarget.cs
+
+
+ Serialization\SerializerAssemblyGenerationConfiguration.cs
+
+
+ Serialization\SerializerDebugging.cs
+
+
+ Serialization\SerializerRepository.cs
+
+
+ Serialization\SerializerRepository.defaults.cs
+
+
+ Serialization\SerializerTypeKeyRepository.cs
+
+
+ Serialization\SerializingMember.cs
+
+
+ Serialization\TypeEmbeddingSettings.cs
+
+
+ Serialization\TypeKeyRepository.cs
+
+
+ Serialization\UnpackHelpers.cs
+
+
+ Serialization\UnpackHelpers.direct.cs
+
+
+ SetOperation.cs
+
+
+ StreamPacker.cs
+
+
+ SubtreeUnpacker.cs
+
+
+ SubtreeUnpacker.Unpacking.cs
+
+
+ TupleItems.cs
+
+
+ UnassignedMessageTypeException.cs
+
+
+ Unpacker.cs
+
+
+ Unpacker.Unpacking.cs
+
+
+ UnpackException.cs
+
+
+ Unpacking.cs
+
+
+ Unpacking.Numerics.cs
+
+
+ Unpacking.Others.cs
+
+
+ Unpacking.Streaming.cs
+
+
+ Unpacking.String.cs
+
+
+ UnpackingMode.cs
+
+
+ UnpackingResult.cs
+
+
+ UnpackingStream.cs
+
+
+ UnpackingStreamReader.cs
+
+
+
+
+
+
+ remarks.xml
+
+
+ TextTemplatingFileGenerator
+ MicroCorLibHelper.cs
+
+
+
+
+ remarks.xml
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/MsgPack.Unity3D.Micro/Properties/AssemblyInfo.cs b/src/MsgPack.Unity3D.Micro/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..e01973e6d
--- /dev/null
+++ b/src/MsgPack.Unity3D.Micro/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+#region -- License Terms --
+//
+// MessagePack for CLI
+//
+// Copyright (C) 2015 FUJIWARA, Yusuke
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#endregion -- License Terms --
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Security;
+
+[assembly: AssemblyTitle( "MessagePack for CLI(.NET/Mono)" )]
+[assembly: AssemblyDescription( "MessagePack for CLI(.NET/Mono) packing/unpacking library for Unity3D stripping mode." )]
+[assembly: AssemblyCopyright( "Copyright © FUJIWARA, Yusuke 2010-2014" )]
+
+
+[assembly: AssemblyFileVersion( "0.6.1941.926" )]
+
+[assembly: AllowPartiallyTrustedCallers]
+
+#if DEBUG || PERFORMANCE_TEST
+[assembly: InternalsVisibleTo( "MsgPack.UnitTest.Unity3D" )]
+#endif
diff --git a/src/MsgPack.Unity3D/MsgPack.Unity3D.csproj b/src/MsgPack.Unity3D/MsgPack.Unity3D.csproj
index 47035d733..4a692207c 100644
--- a/src/MsgPack.Unity3D/MsgPack.Unity3D.csproj
+++ b/src/MsgPack.Unity3D/MsgPack.Unity3D.csproj
@@ -51,10 +51,6 @@
-
-
-
-
diff --git a/src/MsgPack.Unity3D/Serialization/AotHelper.EqualityComparers.cs b/src/MsgPack.Unity3D/Serialization/AotHelper.EqualityComparers.cs
index 4bd48d43e..7d35fcc5c 100644
--- a/src/MsgPack.Unity3D/Serialization/AotHelper.EqualityComparers.cs
+++ b/src/MsgPack.Unity3D/Serialization/AotHelper.EqualityComparers.cs
@@ -154,20 +154,30 @@ private static Dictionary InitializeEqualityComparerT
result.Add( typeof( System.IO.FileOptions? ).TypeHandle, new NullableSystem_IO_FileOptionsEqualityComparer() );
result.Add( typeof( System.IO.FileShare ).TypeHandle, new System_IO_FileShareEqualityComparer() );
result.Add( typeof( System.IO.FileShare? ).TypeHandle, new NullableSystem_IO_FileShareEqualityComparer() );
+#if !CORLIB_ONLY
result.Add( typeof( System.IO.HandleInheritability ).TypeHandle, new System_IO_HandleInheritabilityEqualityComparer() );
result.Add( typeof( System.IO.HandleInheritability? ).TypeHandle, new NullableSystem_IO_HandleInheritabilityEqualityComparer() );
+#endif // !CORLIB_ONLY
result.Add( typeof( System.IO.SearchOption ).TypeHandle, new System_IO_SearchOptionEqualityComparer() );
result.Add( typeof( System.IO.SearchOption? ).TypeHandle, new NullableSystem_IO_SearchOptionEqualityComparer() );
result.Add( typeof( System.IO.SeekOrigin ).TypeHandle, new System_IO_SeekOriginEqualityComparer() );
result.Add( typeof( System.IO.SeekOrigin? ).TypeHandle, new NullableSystem_IO_SeekOriginEqualityComparer() );
+#if !CORLIB_ONLY
result.Add( typeof( System.IO.Pipes.PipeAccessRights ).TypeHandle, new System_IO_Pipes_PipeAccessRightsEqualityComparer() );
result.Add( typeof( System.IO.Pipes.PipeAccessRights? ).TypeHandle, new NullableSystem_IO_Pipes_PipeAccessRightsEqualityComparer() );
+#endif // !CORLIB_ONLY
+#if !CORLIB_ONLY
result.Add( typeof( System.IO.Pipes.PipeDirection ).TypeHandle, new System_IO_Pipes_PipeDirectionEqualityComparer() );
result.Add( typeof( System.IO.Pipes.PipeDirection? ).TypeHandle, new NullableSystem_IO_Pipes_PipeDirectionEqualityComparer() );
+#endif // !CORLIB_ONLY
+#if !CORLIB_ONLY
result.Add( typeof( System.IO.Pipes.PipeOptions ).TypeHandle, new System_IO_Pipes_PipeOptionsEqualityComparer() );
result.Add( typeof( System.IO.Pipes.PipeOptions? ).TypeHandle, new NullableSystem_IO_Pipes_PipeOptionsEqualityComparer() );
+#endif // !CORLIB_ONLY
+#if !CORLIB_ONLY
result.Add( typeof( System.IO.Pipes.PipeTransmissionMode ).TypeHandle, new System_IO_Pipes_PipeTransmissionModeEqualityComparer() );
result.Add( typeof( System.IO.Pipes.PipeTransmissionMode? ).TypeHandle, new NullableSystem_IO_Pipes_PipeTransmissionModeEqualityComparer() );
+#endif // !CORLIB_ONLY
result.Add( typeof( System.Reflection.AssemblyNameFlags ).TypeHandle, new System_Reflection_AssemblyNameFlagsEqualityComparer() );
result.Add( typeof( System.Reflection.AssemblyNameFlags? ).TypeHandle, new NullableSystem_Reflection_AssemblyNameFlagsEqualityComparer() );
result.Add( typeof( System.Reflection.BindingFlags ).TypeHandle, new System_Reflection_BindingFlagsEqualityComparer() );
@@ -394,8 +404,10 @@ private static Dictionary InitializeEqualityComparerT
result.Add( typeof( System.Threading.EventResetMode? ).TypeHandle, new NullableSystem_Threading_EventResetModeEqualityComparer() );
result.Add( typeof( System.Threading.LockCookie ).TypeHandle, new System_Threading_LockCookieEqualityComparer() );
result.Add( typeof( System.Threading.LockCookie? ).TypeHandle, new NullableSystem_Threading_LockCookieEqualityComparer() );
+#if !CORLIB_ONLY
result.Add( typeof( System.Threading.LockRecursionPolicy ).TypeHandle, new System_Threading_LockRecursionPolicyEqualityComparer() );
result.Add( typeof( System.Threading.LockRecursionPolicy? ).TypeHandle, new NullableSystem_Threading_LockRecursionPolicyEqualityComparer() );
+#endif // !CORLIB_ONLY
result.Add( typeof( System.Threading.NativeOverlapped ).TypeHandle, new System_Threading_NativeOverlappedEqualityComparer() );
result.Add( typeof( System.Threading.NativeOverlapped? ).TypeHandle, new NullableSystem_Threading_NativeOverlappedEqualityComparer() );
result.Add( typeof( System.Threading.ThreadPriority ).TypeHandle, new System_Threading_ThreadPriorityEqualityComparer() );
@@ -403,7 +415,9 @@ private static Dictionary InitializeEqualityComparerT
result.Add( typeof( System.Threading.ThreadState ).TypeHandle, new System_Threading_ThreadStateEqualityComparer() );
result.Add( typeof( System.Threading.ThreadState? ).TypeHandle, new NullableSystem_Threading_ThreadStateEqualityComparer() );
result.Add( typeof( System.Object ).TypeHandle, new BoxingGenericEqualityComparer() );
+#if !CORLIB_ONLY
result.Add( typeof( System.Uri ).TypeHandle, new BoxingGenericEqualityComparer() );
+#endif // !CORLIB_ONLY
result.Add( typeof( System.Version ).TypeHandle, new BoxingGenericEqualityComparer() );
result.Add( typeof( System.String ).TypeHandle, System.StringComparer.Ordinal );
result.Add( typeof( MsgPack.MessagePackObject ).TypeHandle, MsgPack.MessagePackObjectEqualityComparer.Instance );
@@ -2789,6 +2803,7 @@ public int GetHashCode( System.IO.FileShare? obj )
return obj == null ? 0 : obj.GetHashCode();
}
}
+#if !CORLIB_ONLY
private sealed class System_IO_HandleInheritabilityEqualityComparer : IEqualityComparer
{
@@ -2828,6 +2843,7 @@ public int GetHashCode( System.IO.HandleInheritability? obj )
return obj == null ? 0 : obj.GetHashCode();
}
}
+#endif // !CORLIB_ONLY
private sealed class System_IO_SearchOptionEqualityComparer : IEqualityComparer
{
@@ -2906,6 +2922,7 @@ public int GetHashCode( System.IO.SeekOrigin? obj )
return obj == null ? 0 : obj.GetHashCode();
}
}
+#if !CORLIB_ONLY
private sealed class System_IO_Pipes_PipeAccessRightsEqualityComparer : IEqualityComparer
{
@@ -2945,6 +2962,8 @@ public int GetHashCode( System.IO.Pipes.PipeAccessRights? obj )
return obj == null ? 0 : obj.GetHashCode();
}
}
+#endif // !CORLIB_ONLY
+#if !CORLIB_ONLY
private sealed class System_IO_Pipes_PipeDirectionEqualityComparer : IEqualityComparer
{
@@ -2984,6 +3003,8 @@ public int GetHashCode( System.IO.Pipes.PipeDirection? obj )
return obj == null ? 0 : obj.GetHashCode();
}
}
+#endif // !CORLIB_ONLY
+#if !CORLIB_ONLY
private sealed class System_IO_Pipes_PipeOptionsEqualityComparer : IEqualityComparer
{
@@ -3023,6 +3044,8 @@ public int GetHashCode( System.IO.Pipes.PipeOptions? obj )
return obj == null ? 0 : obj.GetHashCode();
}
}
+#endif // !CORLIB_ONLY
+#if !CORLIB_ONLY
private sealed class System_IO_Pipes_PipeTransmissionModeEqualityComparer : IEqualityComparer
{
@@ -3062,6 +3085,7 @@ public int GetHashCode( System.IO.Pipes.PipeTransmissionMode? obj )
return obj == null ? 0 : obj.GetHashCode();
}
}
+#endif // !CORLIB_ONLY
private sealed class System_Reflection_AssemblyNameFlagsEqualityComparer : IEqualityComparer
{
@@ -7469,6 +7493,7 @@ public int GetHashCode( System.Threading.LockCookie? obj )
return obj == null ? 0 : obj.GetHashCode();
}
}
+#if !CORLIB_ONLY
private sealed class System_Threading_LockRecursionPolicyEqualityComparer : IEqualityComparer
{
@@ -7508,6 +7533,7 @@ public int GetHashCode( System.Threading.LockRecursionPolicy? obj )
return obj == null ? 0 : obj.GetHashCode();
}
}
+#endif // !CORLIB_ONLY
private sealed class System_Threading_NativeOverlappedEqualityComparer : IEqualityComparer
{
diff --git a/src/MsgPack.Unity3D/Serialization/AotHelper.EqualityComparers.tt b/src/MsgPack.Unity3D/Serialization/AotHelper.EqualityComparers.tt
index 87326ec41..97ecb96cf 100644
--- a/src/MsgPack.Unity3D/Serialization/AotHelper.EqualityComparers.tt
+++ b/src/MsgPack.Unity3D/Serialization/AotHelper.EqualityComparers.tt
@@ -136,18 +136,42 @@ namespace MsgPack.Serialization
<#
foreach ( var valueType in valueTypes )
{
+ if ( valueType.Type.Assembly.FullName != typeof( object ).Assembly.FullName )
+ {
+#>
+#if !CORLIB_ONLY
+<#
+ }
#>
result.Add( typeof( <#= valueType.Type.FullName #> ).TypeHandle, new <#= valueType.ComparerName #>() );
result.Add( typeof( <#= valueType.Type.FullName #>? ).TypeHandle, new Nullable<#= valueType.ComparerName #>() );
<#
+ if ( valueType.Type.Assembly.FullName != typeof( object ).Assembly.FullName )
+ {
+#>
+#endif // !CORLIB_ONLY
+<#
+ }
}
#>
<#
foreach ( var knownComparer in knownComparers )
{
+ if ( typeof( object ).Assembly.GetType( knownComparer.TypeName, false ) == null && !knownComparer.TypeName.StartsWith( "MsgPack." ) )
+ {
+#>
+#if !CORLIB_ONLY
+<#
+ }
#>
result.Add( typeof( <#= knownComparer.TypeName #> ).TypeHandle, <#= knownComparer.ComparerExpression #> );
<#
+ if ( typeof( object ).Assembly.GetType( knownComparer.TypeName, false ) == null && !knownComparer.TypeName.StartsWith( "MsgPack." ) )
+ {
+#>
+#endif // !CORLIB_ONLY
+<#
+ }
}
#>
return result;
@@ -156,6 +180,12 @@ foreach ( var knownComparer in knownComparers )
<#
foreach ( var valueType in valueTypes )
{
+ if ( valueType.Type.Assembly.FullName != typeof( object ).Assembly.FullName )
+ {
+#>
+#if !CORLIB_ONLY
+<#
+ }
#>
private sealed class <#= valueType.ComparerName #> : IEqualityComparer<#= "<" + valueType.Type.FullName + ">" #>
@@ -223,6 +253,12 @@ foreach ( var valueType in valueTypes )
}
}
<#
+ if ( valueType.Type.Assembly.FullName != typeof( object ).Assembly.FullName )
+ {
+#>
+#endif // !CORLIB_ONLY
+<#
+ }
}
#>
}
diff --git a/src/MsgPack/ItemsUnpacker.Skipping.cs b/src/MsgPack/ItemsUnpacker.Skipping.cs
index db14a765f..b5163e730 100644
--- a/src/MsgPack/ItemsUnpacker.Skipping.cs
+++ b/src/MsgPack/ItemsUnpacker.Skipping.cs
@@ -34,6 +34,10 @@
#endif // !UNITY
using System.Globalization;
+#if !CORLIB_ONLY
+using Int64Stack = System.Collections.Generic.Stack;
+#endif // !CORLIB_ONLY
+
namespace MsgPack
{
// This file was generated from ItemsUnpacker.Skipping.tt and StreamingUnapkcerBase.ttinclude T4Template.
@@ -54,7 +58,7 @@ partial class ItemsUnpacker
long remainingItems = -1;
long skipped = 0;
- Stack remainingCollections = null;
+ Int64Stack remainingCollections = null;
do
{
var header = source.ReadByte();
@@ -178,7 +182,7 @@ partial class ItemsUnpacker
{
if( remainingCollections == null )
{
- remainingCollections = new Stack( 4 );
+ remainingCollections = new Int64Stack( 4 );
}
remainingCollections.Push( remainingItems );
@@ -225,7 +229,7 @@ partial class ItemsUnpacker
{
if( remainingCollections == null )
{
- remainingCollections = new Stack( 4 );
+ remainingCollections = new Int64Stack( 4 );
}
remainingCollections.Push( remainingItems );
@@ -603,7 +607,7 @@ partial class ItemsUnpacker
{
if( remainingCollections == null )
{
- remainingCollections = new Stack( 4 );
+ remainingCollections = new Int64Stack( 4 );
}
remainingCollections.Push( remainingItems );
@@ -660,7 +664,7 @@ partial class ItemsUnpacker
{
if( remainingCollections == null )
{
- remainingCollections = new Stack( 4 );
+ remainingCollections = new Int64Stack( 4 );
}
remainingCollections.Push( remainingItems );
@@ -717,7 +721,7 @@ partial class ItemsUnpacker
{
if( remainingCollections == null )
{
- remainingCollections = new Stack( 4 );
+ remainingCollections = new Int64Stack( 4 );
}
remainingCollections.Push( remainingItems );
@@ -774,7 +778,7 @@ partial class ItemsUnpacker
{
if( remainingCollections == null )
{
- remainingCollections = new Stack( 4 );
+ remainingCollections = new Int64Stack( 4 );
}
remainingCollections.Push( remainingItems );
diff --git a/src/MsgPack/ItemsUnpacker.Skipping.tt b/src/MsgPack/ItemsUnpacker.Skipping.tt
index 6f1fd00bb..21dfbc9b9 100644
--- a/src/MsgPack/ItemsUnpacker.Skipping.tt
+++ b/src/MsgPack/ItemsUnpacker.Skipping.tt
@@ -44,6 +44,10 @@ using System.Diagnostics.Contracts;
#endif // !UNITY
using System.Globalization;
+#if !CORLIB_ONLY
+using Int64Stack = System.Collections.Generic.Stack;
+#endif // !CORLIB_ONLY
+
namespace MsgPack
{
// This file was generated from ItemsUnpacker.Skipping.tt and StreamingUnapkcerBase.ttinclude T4Template.
@@ -64,7 +68,7 @@ namespace MsgPack
long remainingItems = -1;
long skipped = 0;
- Stack remainingCollections = null;
+ Int64Stack remainingCollections = null;
do
{
var header = source.ReadByte();
@@ -384,7 +388,7 @@ if( remainingItems >= 0 )
{
if( remainingCollections == null )
{
- remainingCollections = new Stack( 4 );
+ remainingCollections = new Int64Stack( 4 );
}
remainingCollections.Push( remainingItems );
diff --git a/src/MsgPack/Serialization/CollectionSerializers/ICollectionInstanceFactory.cs b/src/MsgPack/Serialization/CollectionSerializers/ICollectionInstanceFactory.cs
index 376243a91..bb9d0f9a2 100644
--- a/src/MsgPack/Serialization/CollectionSerializers/ICollectionInstanceFactory.cs
+++ b/src/MsgPack/Serialization/CollectionSerializers/ICollectionInstanceFactory.cs
@@ -19,8 +19,6 @@
#endregion -- License Terms --
using System;
-using System.CodeDom;
-using System.Runtime.CompilerServices;
namespace MsgPack.Serialization.CollectionSerializers
{
diff --git a/src/MsgPack/Serialization/DateTimeMessagePackSerializerHelpers.cs b/src/MsgPack/Serialization/DateTimeMessagePackSerializerHelpers.cs
index fb377f134..f63c5fb55 100644
--- a/src/MsgPack/Serialization/DateTimeMessagePackSerializerHelpers.cs
+++ b/src/MsgPack/Serialization/DateTimeMessagePackSerializerHelpers.cs
@@ -19,7 +19,9 @@
#endregion -- License Terms --
using System;
+#if !CORLIB_ONLY
using System.ComponentModel;
+#endif // !CORLIB_ONLY
#if !SILVERLIGHT || WINDOWS_PHONE
using System.Runtime.InteropServices.ComTypes;
#endif // !SILVERLIGHT || WINDOWS_PHONE
@@ -30,7 +32,9 @@ namespace MsgPack.Serialization
/// This is intened to MsgPack for CLI internal use. Do not use this type from application directly.
/// Helper methods for date time message pack serializer.
///
+#if !CORLIB_ONLY
[EditorBrowsable( EditorBrowsableState.Never )]
+#endif // !CORLIB_ONLY
public static class DateTimeMessagePackSerializerHelpers
{
///
@@ -42,6 +46,9 @@ public static class DateTimeMessagePackSerializerHelpers
///
/// is null.
///
+#if !CORLIB_ONLY
+ [EditorBrowsable( EditorBrowsableState.Never )]
+#endif // !CORLIB_ONLY
public static DateTimeConversionMethod DetermineDateTimeConversionMethod(
SerializationContext context,
DateTimeMemberConversionMethod dateTimeMemberConversionMethod
diff --git a/src/MsgPack/Serialization/DefaultConcreteTypeRepository.cs b/src/MsgPack/Serialization/DefaultConcreteTypeRepository.cs
index 6e687719f..80fdc1675 100644
--- a/src/MsgPack/Serialization/DefaultConcreteTypeRepository.cs
+++ b/src/MsgPack/Serialization/DefaultConcreteTypeRepository.cs
@@ -92,7 +92,7 @@ internal DefaultConcreteTypeRepository()
///
///
/// -
- /// (.NET 4 or lator)
+ /// ISet{T} (.NET 4 or lator)
///
///
/// -
diff --git a/src/MsgPack/Serialization/DefaultSerializers/DefaultSerializers.cs b/src/MsgPack/Serialization/DefaultSerializers/DefaultSerializers.cs
index 23401019f..3b49cae19 100644
--- a/src/MsgPack/Serialization/DefaultSerializers/DefaultSerializers.cs
+++ b/src/MsgPack/Serialization/DefaultSerializers/DefaultSerializers.cs
@@ -422,6 +422,7 @@ protected internal sealed override System.UInt64 UnpackFromCore( Unpacker unpac
}
#if !SILVERLIGHT && !NETFX_CORE
+#if !CORLIB_ONLY
internal sealed class System_Collections_Specialized_BitVector32MessagePackSerializer : MessagePackSerializer< System.Collections.Specialized.BitVector32 >
{
public System_Collections_Specialized_BitVector32MessagePackSerializer( SerializationContext ownerContext )
@@ -450,8 +451,10 @@ protected internal sealed override System.Collections.Specialized.BitVector32 U
}
}
#endif // !SILVERLIGHT && !NETFX_CORE
+#endif // !CORLIB_ONLY
#if !WINDOWS_PHONE && !NETFX_35 && !UNITY
+#if !CORLIB_ONLY
internal sealed class System_Numerics_BigIntegerMessagePackSerializer : MessagePackSerializer< System.Numerics.BigInteger >
{
public System_Numerics_BigIntegerMessagePackSerializer( SerializationContext ownerContext )
@@ -481,4 +484,5 @@ protected internal sealed override System.Numerics.BigInteger UnpackFromCore( U
}
}
#endif // !WINDOWS_PHONE && !NETFX_35 && !UNITY
+#endif // !CORLIB_ONLY
}
diff --git a/src/MsgPack/Serialization/DefaultSerializers/DefaultSerializers.tt b/src/MsgPack/Serialization/DefaultSerializers/DefaultSerializers.tt
index d5a9bcda3..ed1781921 100644
--- a/src/MsgPack/Serialization/DefaultSerializers/DefaultSerializers.tt
+++ b/src/MsgPack/Serialization/DefaultSerializers/DefaultSerializers.tt
@@ -2,7 +2,7 @@
//
// MessagePack for CLI
//
-// Copyright (C) 2010-2012 FUJIWARA, Yusuke
+// Copyright (C) 2010-2015 FUJIWARA, Yusuke
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -235,6 +235,13 @@ foreach( Type __type in __types )
}
var __typeName = __type.FullName.Replace( Type.Delimiter, '_' ).Replace( '`', '_' ) + "MessagePackSerializer";
+
+ if ( __type.Assembly.FullName != typeof( object ).Assembly.FullName )
+ {
+#>
+#if !CORLIB_ONLY
+<#
+ }
#>
internal sealed class <#= __typeName #> : MessagePackSerializer< <#= ToCSharpToken( __type ) #> >
{
@@ -376,6 +383,13 @@ foreach( var ctor in ctors )
{
#>
#endif // !SILVERLIGHT && !NETFX_CORE
+<#
+ }
+
+ if ( __type.Assembly.FullName != typeof( object ).Assembly.FullName )
+ {
+#>
+#endif // !CORLIB_ONLY
<#
}
}
diff --git a/src/MsgPack/Serialization/EnumMessagePackSerializerHelpers.cs b/src/MsgPack/Serialization/EnumMessagePackSerializerHelpers.cs
index e1ffc4c6b..cbe258a53 100644
--- a/src/MsgPack/Serialization/EnumMessagePackSerializerHelpers.cs
+++ b/src/MsgPack/Serialization/EnumMessagePackSerializerHelpers.cs
@@ -2,7 +2,7 @@
//
// MessagePack for CLI
//
-// Copyright (C) 2014 FUJIWARA, Yusuke
+// Copyright (C) 2014-2015 FUJIWARA, Yusuke
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -19,7 +19,9 @@
#endregion -- License Terms --
using System;
+#if !CORLIB_ONLY
using System.ComponentModel;
+#endif // !CORLIB_ONLY
#if NETFX_CORE
using System.Reflection;
#endif
@@ -30,7 +32,9 @@ namespace MsgPack.Serialization
/// This is intened to MsgPack for CLI internal use. Do not use this type from application directly.
/// Helper methods for enum message pack serializer.
///
+#if !CORLIB_ONLY
[EditorBrowsable( EditorBrowsableState.Never )]
+#endif // !CORLIB_ONLY
public static class EnumMessagePackSerializerHelpers
{
///
diff --git a/src/MsgPack/Serialization/PolymorphismSchema.Constructors.cs b/src/MsgPack/Serialization/PolymorphismSchema.Constructors.cs
index 80f2b20ec..264abec2d 100644
--- a/src/MsgPack/Serialization/PolymorphismSchema.Constructors.cs
+++ b/src/MsgPack/Serialization/PolymorphismSchema.Constructors.cs
@@ -23,7 +23,9 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+#if !CORLIB_ONLY
using System.ComponentModel;
+#endif // !CORLIB_ONLY
using System.Linq;
namespace MsgPack.Serialization
@@ -102,7 +104,9 @@ private PolymorphismSchema(
/// The type of the serialization target.
/// A new instance of the class for non-collection object which uses type embedding based polymorphism.
/// is null.
+#if !CORLIB_ONLY
[EditorBrowsable( EditorBrowsableState.Never )]
+#endif // !CORLIB_ONLY
public static PolymorphismSchema ForPolymorphicObject( Type targetType )
{
return new PolymorphismSchema( targetType, PolymorphismType.RuntimeType, PolymorphismSchemaChildrenType.None );
@@ -115,7 +119,9 @@ public static PolymorphismSchema ForPolymorphicObject( Type targetType )
/// The code-type mapping which maps between ext-type codes and .NET s.
/// A new instance of the class for non-collection object which uses ext-type code mapping based polymorphism.
/// is null.
+#if !CORLIB_ONLY
[EditorBrowsable( EditorBrowsableState.Never )]
+#endif // !CORLIB_ONLY
public static PolymorphismSchema ForPolymorphicObject( Type targetType, IDictionary codeTypeMapping )
{
return
@@ -136,7 +142,9 @@ public static PolymorphismSchema ForPolymorphicObject( Type targetType, IDiction
/// The schema for collection items of the serialization target collection.
/// A new instance of the class for collection object which uses declared type or context specified concrete type.
/// is null.
+#if !CORLIB_ONLY
[EditorBrowsable( EditorBrowsableState.Never )]
+#endif // !CORLIB_ONLY
public static PolymorphismSchema ForContextSpecifiedCollection( Type targetType, PolymorphismSchema itemSchema )
{
return
@@ -155,7 +163,9 @@ public static PolymorphismSchema ForContextSpecifiedCollection( Type targetType,
/// The schema for collection items of the serialization target collection.
/// A new instance of the class for collection object which uses type embedding based polymorphism.
/// is null.
+#if !CORLIB_ONLY
[EditorBrowsable( EditorBrowsableState.Never )]
+#endif // !CORLIB_ONLY
public static PolymorphismSchema ForPolymorphicCollection( Type targetType, PolymorphismSchema itemSchema )
{
return
@@ -175,7 +185,9 @@ public static PolymorphismSchema ForPolymorphicCollection( Type targetType, Poly
/// The schema for collection items of the serialization target collection.
/// A new instance of the class for collection object which uses ext-type code mapping based polymorphism.
/// is null.
+#if !CORLIB_ONLY
[EditorBrowsable( EditorBrowsableState.Never )]
+#endif // !CORLIB_ONLY
public static PolymorphismSchema ForPolymorphicCollection(
Type targetType,
IDictionary codeTypeMapping,
@@ -202,7 +214,9 @@ PolymorphismSchema itemSchema
/// The schema for dictionary values of the serialization target dictionary.
/// A new instance of the class for dictionary object which uses declared type or context specified concrete type.
/// is null.
+#if !CORLIB_ONLY
[EditorBrowsable( EditorBrowsableState.Never )]
+#endif // !CORLIB_ONLY
public static PolymorphismSchema ForContextSpecifiedDictionary(
Type targetType,
PolymorphismSchema keySchema,
@@ -226,7 +240,9 @@ public static PolymorphismSchema ForContextSpecifiedDictionary(
/// The schema for dictionary values of the serialization target dictionary.
/// A new instance of the class for dictionary object which uses type embedding based polymorphism.
/// is null.
+#if !CORLIB_ONLY
[EditorBrowsable( EditorBrowsableState.Never )]
+#endif // !CORLIB_ONLY
public static PolymorphismSchema ForPolymorphicDictionary(
Type targetType,
PolymorphismSchema keySchema,
@@ -252,7 +268,9 @@ PolymorphismSchema valueSchema
/// The schema for dictionary values of the serialization target dictionary.
/// A new instance of the class for dictionary object which uses ext-type code mapping based polymorphism.
/// is null.
+#if !CORLIB_ONLY
[EditorBrowsable( EditorBrowsableState.Never )]
+#endif // !CORLIB_ONLY
public static PolymorphismSchema ForPolymorphicDictionary(
Type targetType,
IDictionary codeTypeMapping,
diff --git a/src/MsgPack/Serialization/PolymorphismSchema.cs b/src/MsgPack/Serialization/PolymorphismSchema.cs
index 7f70ed500..14a39fe78 100644
--- a/src/MsgPack/Serialization/PolymorphismSchema.cs
+++ b/src/MsgPack/Serialization/PolymorphismSchema.cs
@@ -25,7 +25,9 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+#if !CORLIB_ONLY
using System.ComponentModel;
+#endif // !CORLIB_ONLY
using System.Diagnostics;
using System.Linq;
@@ -39,7 +41,9 @@ namespace MsgPack.Serialization
/// A provider parameter to support polymorphism.
///
///
+#if !CORLIB_ONLY
[EditorBrowsable( EditorBrowsableState.Never )]
+#endif // !CORLIB_ONLY
[DebuggerDisplay("{DebugString}")]
public sealed partial class PolymorphismSchema
{
diff --git a/src/MsgPack/Serialization/ReflectionExtensions.cs b/src/MsgPack/Serialization/ReflectionExtensions.cs
index e19df30ff..40aa79a33 100644
--- a/src/MsgPack/Serialization/ReflectionExtensions.cs
+++ b/src/MsgPack/Serialization/ReflectionExtensions.cs
@@ -130,9 +130,15 @@ private static Exception HoistUpInnerException( TargetInvocationException target
{
return ctor.Invoke( new object[] { targetInvocationException.InnerException.Message, targetInvocationException } ) as Exception;
}
- catch(Exception ex)
+#if !CORLIB_ONLY
+ catch ( Exception ex )
+#else
+ catch ( Exception )
+#endif // !CORLIB_ONLY
{
+#if !CORLIB_ONLY
Debug.WriteLine( "HoistUpInnerException:" + ex );
+#endif // !CORLIB_ONLY
return null;
}
}
diff --git a/src/MsgPack/Serialization/SerializationExceptions.cs b/src/MsgPack/Serialization/SerializationExceptions.cs
index 9abc403e9..47e15577c 100644
--- a/src/MsgPack/Serialization/SerializationExceptions.cs
+++ b/src/MsgPack/Serialization/SerializationExceptions.cs
@@ -23,7 +23,9 @@
#endif
using System;
+#if !CORLIB_ONLY
using System.ComponentModel;
+#endif // !CORLIB_ONLY
#if !UNITY
#if XAMIOS || XAMDROID
using Contract = MsgPack.MPContract;
@@ -44,7 +46,9 @@ namespace MsgPack.Serialization
/// This is intended to MsgPack for CLI internal use. Do not use this type from application directly.
/// Defines common exception factory methods.
///
+#if !CORLIB_ONLY
[EditorBrowsable( EditorBrowsableState.Never )]
+#endif // !CORLIB_ONLY
public static class SerializationExceptions
{
#if !XAMIOS && !XAMDROID && !UNITY
diff --git a/src/MsgPack/Serialization/SerializationMethodGeneratorOption.cs b/src/MsgPack/Serialization/SerializationMethodGeneratorOption.cs
index 954d600eb..7b7206a64 100644
--- a/src/MsgPack/Serialization/SerializationMethodGeneratorOption.cs
+++ b/src/MsgPack/Serialization/SerializationMethodGeneratorOption.cs
@@ -2,7 +2,7 @@
//
// MessagePack for CLI
//
-// Copyright (C) 2010-2012 FUJIWARA, Yusuke
+// Copyright (C) 2010-2015 FUJIWARA, Yusuke
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -19,7 +19,9 @@
#endregion -- License Terms --
using System;
+#if !CORLIB_ONLY
using System.ComponentModel;
+#endif // !CORLIB_ONLY
namespace MsgPack.Serialization
{
@@ -33,7 +35,9 @@ public enum SerializationMethodGeneratorOption
/// The generated method IL can be dumped to the current directory.
/// It is intended for the runtime, you cannot use this option.
///
+#if !CORLIB_ONLY
[EditorBrowsable( EditorBrowsableState.Never )]
+#endif // !CORLIB_ONLY
CanDump,
///
diff --git a/src/MsgPack/Serialization/SerializerRepository.defaults.cs b/src/MsgPack/Serialization/SerializerRepository.defaults.cs
index 6f1b0185c..994028f42 100644
--- a/src/MsgPack/Serialization/SerializerRepository.defaults.cs
+++ b/src/MsgPack/Serialization/SerializerRepository.defaults.cs
@@ -2,7 +2,7 @@
//
// MessagePack for CLI
//
-// Copyright (C) 2010-2014 FUJIWARA, Yusuke
+// Copyright (C) 2010-2015 FUJIWARA, Yusuke
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -25,7 +25,9 @@
using System;
using System.Collections;
using System.Collections.Generic;
+#if !CORLIB_ONLY
using System.Collections.Specialized;
+#endif // !CORLIB_ONLY
using System.Globalization;
#if !WINDOWS_PHONE && !NETFX_35 && !UNITY
using System.Numerics;
@@ -90,11 +92,15 @@ internal static Dictionary InitializeDefaultTable( Se
dictionary.Add( typeof( System.UInt32 ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.System_UInt32MessagePackSerializer( ownerContext ) );
dictionary.Add( typeof( System.UInt64 ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.System_UInt64MessagePackSerializer( ownerContext ) );
#if !SILVERLIGHT && !NETFX_CORE
+#if !CORLIB_ONLY
dictionary.Add( typeof( System.Collections.Specialized.BitVector32 ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.System_Collections_Specialized_BitVector32MessagePackSerializer( ownerContext ) );
+#endif // !CORLIB_ONLY
#endif // !SILVERLIGHT && !NETFX_CORE
#if !WINDOWS_PHONE
#if !NETFX_35 && !UNITY
+#if !CORLIB_ONLY
dictionary.Add( typeof( System.Numerics.BigInteger ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.System_Numerics_BigIntegerMessagePackSerializer( ownerContext ) );
+#endif // !CORLIB_ONLY
#endif // !NETFX_35 && !UNITY
#endif // !WINDOWS_PHONE
#if !UNITY
@@ -110,17 +116,27 @@ internal static Dictionary InitializeDefaultTable( Se
#if !UNITY
dictionary.Add( typeof( System.Collections.Generic.KeyValuePair<,> ).TypeHandle, typeof( System_Collections_Generic_KeyValuePair_2MessagePackSerializer<, > ) );
#endif // !UNITY
+#if !CORLIB_ONLY
dictionary.Add( typeof( System.Collections.Generic.Stack<> ).TypeHandle, typeof( System_Collections_Generic_Stack_1MessagePackSerializer<> ) );
+#endif // !CORLIB_ONLY
+#if !CORLIB_ONLY
dictionary.Add( typeof( System.Collections.Generic.Queue<> ).TypeHandle, typeof( System_Collections_Generic_Queue_1MessagePackSerializer<> ) );
+#endif // !CORLIB_ONLY
#if !WINDOWS_PHONE
#if !NETFX_35 && !UNITY
+#if !CORLIB_ONLY
dictionary.Add( typeof( System.Numerics.Complex ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.System_Numerics_ComplexMessagePackSerializer( ownerContext ) );
+#endif // !CORLIB_ONLY
#endif // !NETFX_35 && !UNITY
#endif // !WINDOWS_PHONE
+#if !CORLIB_ONLY
dictionary.Add( typeof( System.Uri ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.System_UriMessagePackSerializer( ownerContext ) );
+#endif // !CORLIB_ONLY
dictionary.Add( typeof( System.Version ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.System_VersionMessagePackSerializer( ownerContext ) );
#if !SILVERLIGHT && !NETFX_CORE
+#if !CORLIB_ONLY
dictionary.Add( typeof( System.Collections.Specialized.NameValueCollection ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.System_Collections_Specialized_NameValueCollectionMessagePackSerializer( ownerContext ) );
+#endif // !CORLIB_ONLY
#endif // !SILVERLIGHT && !NETFX_CORE
return dictionary;
}
diff --git a/src/MsgPack/Serialization/SerializerRepository.defaults.tt b/src/MsgPack/Serialization/SerializerRepository.defaults.tt
index 659749ec6..d20c4f9f3 100644
--- a/src/MsgPack/Serialization/SerializerRepository.defaults.tt
+++ b/src/MsgPack/Serialization/SerializerRepository.defaults.tt
@@ -2,7 +2,7 @@
//
// MessagePack for CLI
//
-// Copyright (C) 2010-2014 FUJIWARA, Yusuke
+// Copyright (C) 2010-2015 FUJIWARA, Yusuke
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -207,7 +207,7 @@ var __notInUnities =
//
// MessagePack for CLI
//
-// Copyright (C) 2010-2014 FUJIWARA, Yusuke
+// Copyright (C) 2010-2015 FUJIWARA, Yusuke
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -230,7 +230,9 @@ var __notInUnities =
using System;
using System.Collections;
using System.Collections.Generic;
+#if !CORLIB_ONLY
using System.Collections.Specialized;
+#endif // !CORLIB_ONLY
using System.Globalization;
#if !WINDOWS_PHONE && !NETFX_35 && !UNITY
using System.Numerics;
@@ -314,12 +316,26 @@ foreach( Type __type in __structTypes )
{
#>
#if !NETFX_35 && !UNITY
+<#
+ }
+
+ if ( __type.Assembly.FullName != typeof( object ).Assembly.FullName )
+ {
+#>
+#if !CORLIB_ONLY
<#
}
#>
dictionary.Add( typeof( <#= __type.FullName #> ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.<#= __type.FullName.Replace( Type.Delimiter, '_' ).Replace( '`', '_' ) #>MessagePackSerializer( ownerContext ) );
<#
+ if ( __type.Assembly.FullName != typeof( object ).Assembly.FullName )
+ {
+#>
+#endif // !CORLIB_ONLY
+<#
+ }
+
if( __notInNet35s.Contains( __type ) )
{
#>
@@ -387,6 +403,13 @@ foreach( Type __type in __classTypes )
{
#>
#if !UNITY
+<#
+ }
+
+ if ( __type.Assembly.FullName != typeof( object ).Assembly.FullName )
+ {
+#>
+#if !CORLIB_ONLY
<#
}
@@ -402,6 +425,13 @@ foreach( Type __type in __classTypes )
dictionary.Add( typeof( <#= ToCSharpTypeToken( __type ) #> ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.<#= __type.FullName.Replace( Type.Delimiter, '_' ).Replace( '`', '_' ) #>MessagePackSerializer( ownerContext ) );
<#
}
+
+ if ( __type.Assembly.FullName != typeof( object ).Assembly.FullName )
+ {
+#>
+#endif // !CORLIB_ONLY
+<#
+ }
if( __notInUnities.Contains( __type) )
{
diff --git a/src/MsgPack/Serialization/UnpackHelpers.cs b/src/MsgPack/Serialization/UnpackHelpers.cs
index 50147d77f..a75eae839 100644
--- a/src/MsgPack/Serialization/UnpackHelpers.cs
+++ b/src/MsgPack/Serialization/UnpackHelpers.cs
@@ -25,7 +25,9 @@
using System;
using System.Collections;
using System.Collections.Generic;
+#if !CORLIB_ONLY
using System.ComponentModel;
+#endif //!CORLIB_ONLY
using System.Reflection;
#if !UNITY
#if XAMIOS || XAMDROID
@@ -42,7 +44,9 @@ namespace MsgPack.Serialization
/// This is intened to MsgPack for CLI internal use. Do not use this type from application directly.
/// Defines serialization helper APIs.
///
+#if !CORLIB_ONLY
[EditorBrowsable( EditorBrowsableState.Never )]
+#endif // !CORLIB_ONLY
public static partial class UnpackHelpers
{
private static readonly MessagePackSerializer _messagePackObjectSerializer =
@@ -58,8 +62,10 @@ public static partial class UnpackHelpers
///
/// Failed to deserialization.
///
+#if !CORLIB_ONLY
[EditorBrowsable( EditorBrowsableState.Never )]
- [Obsolete( "This API is not used at generated serializers in current release, so this API will be removed future.")]
+#endif // !CORLIB_ONLY
+ [Obsolete( "This API is not used at generated serializers in current release, so this API will be removed future." )]
public static void UnpackArrayTo( Unpacker unpacker, MessagePackSerializer serializer, T[] array )
{
if ( unpacker == null )
@@ -120,7 +126,9 @@ public static void UnpackArrayTo( Unpacker unpacker, MessagePackSerializer
///
/// Failed to deserialization.
///
+#if !CORLIB_ONLY
[EditorBrowsable( EditorBrowsableState.Never )]
+#endif // !CORLIB_ONLY
[Obsolete( "This API is not used at generated serializers in current release, so this API will be removed future." )]
public static void UnpackCollectionTo( Unpacker unpacker, IEnumerable collection, Action