ready for 1.6.0
This commit is contained in:
Родитель
62961155ce
Коммит
634a032cbf
49
README.md
49
README.md
|
@ -239,7 +239,7 @@ var bin = MessagePackSerializer.Serialize(data);
|
|||
var point = MessagePackSerializer.Deserialize<Point>(bin);
|
||||
```
|
||||
|
||||
MessagePackSerializer choose constructor with the least argument and match index if key in integer or match name(ignore case) if key is string. If encounts `MessagePackDynamicObjectResolverException: can't find matched constructor parameter` you should check about this.
|
||||
MessagePackSerializer choose constructor with the least matched argument, match index if key in integer or match name(ignore case) if key is string. If encounts `MessagePackDynamicObjectResolverException: can't find matched constructor parameter` you should check about this.
|
||||
|
||||
If can not match automatically, you can specify to use constructor manually by `[SerializationConstructorAttribute]`.
|
||||
|
||||
|
@ -252,11 +252,10 @@ public struct Point
|
|||
[Key(1)]
|
||||
public readonly int Y;
|
||||
|
||||
// can't find matched constructor parameter, parameterType mismatch. type:Point parameterIndex:0 paramterType:ValueTuple`2
|
||||
public Point((int, int) p)
|
||||
// If not marked attribute, used this(least matched argument)
|
||||
public Point(int x)
|
||||
{
|
||||
X = p.Item1;
|
||||
Y = p.Item2;
|
||||
X = x;
|
||||
}
|
||||
|
||||
[SerializationConstructor]
|
||||
|
@ -468,10 +467,47 @@ Benchmarks comparing to other serializers run on `Windows 10 Pro x64 Intel Core
|
|||
* Don't use `IEnumerable<T>` abstraction on iterate collection, [see:CollectionFormatterBase](https://github.com/neuecc/MessagePack-CSharp/blob/209f301e2e595ed366408624011ba2e856d23429/src/MessagePack/Formatters/CollectionFormatter.cs#L192-L355) and inherited collection formatters
|
||||
* Uses pre generated lookup table to reduce check messagepack type, [see: MessagePackBinary](https://github.com/neuecc/MessagePack-CSharp/blob/209f301e2e595ed366408624011ba2e856d23429/src/MessagePack/MessagePackBinary.cs#L15-L212)
|
||||
* Uses optimized type key dictionary for non-generic methods, [see: ThreadsafeTypeKeyHashTable](https://github.com/neuecc/MessagePack-CSharp/blob/91312921cb7fe987f48336768c898a76ac7dbb40/src/MessagePack/Internal/ThreadsafeTypeKeyHashTable.cs)
|
||||
* Avoid string key decode for lookup map(string key) key with calc hash by FarmHash, see: [ByteArrayStringHashTable](https://github.com/neuecc/MessagePack-CSharp/blob/91312921cb7fe987f48336768c898a76ac7dbb40/src/MessagePack/Internal/ByteArrayStringHashTable.cs)
|
||||
* Avoid string key decode for lookup map(string key) key and uses automata based name lookup with il inlining code generation, see: [AutomataDictionary](https://github.com/neuecc/MessagePack-CSharp/blob/bcedbce3fd98cb294210d6b4a22bdc4c75ccd916/src/MessagePack/Internal/AutomataDictionary.cs)
|
||||
|
||||
Before creating this library, I implemented a fast fast serializer with [ZeroFormatter#Performance](https://github.com/neuecc/ZeroFormatter#performance). And this is a further evolved implementation. MessagePack for C# is always fast, optimized for all types(primitive, small struct, large object, any collections).
|
||||
|
||||
Deserialize Perfomrance per options
|
||||
---
|
||||
Performance varies depending on options. This is a micro benchamark with [BenchmarkDotNet](https://github.com/dotnet/BenchmarkDotNet). Target object has 9 members(`MyProperty1` ~ `MyProperty9`), value are zero.
|
||||
|
||||
| Method | Mean | Error | Scaled | Gen 0 | Allocated |
|
||||
|-------------------- |------------:|------:|-------:|-------:|----------:|
|
||||
| IntKey | 72.67 ns | NA | 1.00 | 0.0132 | 56 B |
|
||||
| StringKey | 217.95 ns | NA | 3.00 | 0.0131 | 56 B |
|
||||
| Typeless_IntKey | 176.71 ns | NA | 2.43 | 0.0131 | 56 B |
|
||||
| Typeless_StringKey | 378.64 ns | NA | 5.21 | 0.0129 | 56 B |
|
||||
| MsgPackCliMap | 1,355.26 ns | NA | 18.65 | 0.1431 | 608 B |
|
||||
| MsgPackCliArray | 455.28 ns | NA | 6.26 | 0.0415 | 176 B |
|
||||
| ProtobufNet | 265.85 ns | NA | 3.66 | 0.0319 | 136 B |
|
||||
| Hyperion | 366.47 ns | NA | 5.04 | 0.0949 | 400 B |
|
||||
| JsonNetString | 2,783.39 ns | NA | 38.30 | 0.6790 | 2864 B |
|
||||
| JsonNetStreamReader | 3,297.90 ns | NA | 45.38 | 1.4267 | 6000 B |
|
||||
| JilString | 553.65 ns | NA | 7.62 | 0.0362 | 152 B |
|
||||
| JilStreamReader | 1,408.46 ns | NA | 19.38 | 0.8450 | 3552 B |
|
||||
|
||||
IntKey, StringKey, Typeless_IntKey, Typeless_StringKey are MessagePack for C# options. All MessagePack for C# options achive zero memory allocation on deserialization process. JsonNetString/JilString is deserialized from string. JsonNetStreamReader/JilStreamReader is deserialized from UTF8 byte[] with StreamReader. Deserialization is normally read from Stream. Thus, it will be restored from byte[](or Stream) instead of string.
|
||||
|
||||
MessagePack for C# IntKey is fastest. StringKey is slower than IntKey because matching from the character string is required. If IntKey, read array length, for(array length) { binary decode }. If StringKey, read map length, for(map length) { decode key, lookup by key, binary decode } so requires additional two steps(decode key and lookup by key).
|
||||
|
||||
String key is often useful, contractless, simple replacement of JSON, interoperability with other languages, and more certain versioning. MessagePack for C# is also optimized for String Key. First of all, it do not decode UTF8 byte[] to String for matching with the member name, it will look up the byte[] as it is(avoid decode cost and extra allocation).
|
||||
|
||||
And It will try to match each `long type` (per 8 character, if it is not enough, pad with 0) using automata and inline it when IL code generating.
|
||||
|
||||
![image](https://user-images.githubusercontent.com/46207/29754771-216b40e2-8bc7-11e7-8310-1c3602e80a08.png)
|
||||
|
||||
This also avoids calculating the hash code of byte[], and the comparison can be made several times on a long unit.
|
||||
|
||||
This is the sample decompile of generated deserializer code by [ILSpy](http://ilspy.net/).
|
||||
|
||||
![image](https://user-images.githubusercontent.com/46207/29754804-b5ba0f44-8bc7-11e7-9f6b-0c8f3c041237.png)
|
||||
|
||||
If the number of nodes is large, search with a embedded binary search.
|
||||
|
||||
LZ4 Compression
|
||||
---
|
||||
MessagePack is a fast and *compact* format but it is not compression. [LZ4](https://github.com/lz4/lz4) is extremely fast compression algorithm, with MessagePack for C# can achive extremely fast perfrormance and extremely compact binary size!
|
||||
|
@ -709,6 +745,7 @@ Primitive API(MessagePackBinary)
|
|||
| ReadNextBlock | Skip MessagePackFormat binary block with sub structures(array/map), returns read size. This is useful for create deserializer. |
|
||||
| ReadMessageBlockFromStreamUnsafe | Read binary block from Stream, if readOnlySingleMessage = false then read sub structures(array/map). |
|
||||
| ReadStringSegment | Read string format but do not decode UTF8, returns `ArraySegment<byte>`. |
|
||||
| ReadBytesSegment | Read binary format but do not copy bytes, returns `ArraySegment<byte>`. |
|
||||
| Write/ReadMapHeader | Write/Read map format header(element length). |
|
||||
| WriteMapHeaderForceMap32Block | Write map format header, always use map32 format(length is fixed, 5). |
|
||||
| Write/ReadArrayHeader | Write/Read array format header(element length). |
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>MessagePack.AspNetCoreMvcFormatter</id>
|
||||
<version>1.5.1</version>
|
||||
<version>1.6.0</version>
|
||||
<title>ASP.NET Core MVC Input/Output MessagePack formatter</title>
|
||||
<authors>neuecc</authors>
|
||||
<owners>neuecc</owners>
|
||||
|
@ -13,7 +13,7 @@
|
|||
<tags>MsgPack, MessagePack, Serialization, Formatter, Serializer, aspnetcore, aspnetcoremvc</tags>
|
||||
<dependencies>
|
||||
<group targetFramework=".NETStandard1.4">
|
||||
<dependency id="MessagePack" version="1.5.1" />
|
||||
<dependency id="MessagePack" version="1.6.0" />
|
||||
<dependency id="Microsoft.AspNetCore.Mvc.Abstractions" version="1.2.0" />
|
||||
</group>
|
||||
</dependencies>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>MessagePack.ImmutableCollection</id>
|
||||
<version>1.5.1</version>
|
||||
<version>1.6.0</version>
|
||||
<title>MessagePack for C# Extension Support for ImmutableCollection</title>
|
||||
<authors>neuecc</authors>
|
||||
<owners>neuecc</owners>
|
||||
|
@ -17,15 +17,15 @@
|
|||
</frameworkAssemblies>
|
||||
<dependencies>
|
||||
<group targetFramework=".NETFramework4.7">
|
||||
<dependency id="MessagePack" version="1.5.1" />
|
||||
<dependency id="MessagePack" version="1.6.0" />
|
||||
<dependency id="System.Collections.Immutable" version="1.3.1" />
|
||||
</group>
|
||||
<group targetFramework=".NETFramework4.5">
|
||||
<dependency id="MessagePack" version="1.5.1" />
|
||||
<dependency id="MessagePack" version="1.6.0" />
|
||||
<dependency id="System.Collections.Immutable" version="1.3.1" />
|
||||
</group>
|
||||
<group targetFramework=".NETStandard1.4">
|
||||
<dependency id="MessagePack" version="1.5.1" />
|
||||
<dependency id="MessagePack" version="1.6.0" />
|
||||
<dependency id="System.Collections.Immutable" version="1.3.1" />
|
||||
</group>
|
||||
</dependencies>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>MessagePack.ReactiveProperty</id>
|
||||
<version>1.5.1</version>
|
||||
<version>1.6.0</version>
|
||||
<title>MessagePack for C# Extension Support for ReactiveProperty</title>
|
||||
<authors>neuecc</authors>
|
||||
<owners>neuecc</owners>
|
||||
|
@ -17,15 +17,15 @@
|
|||
</frameworkAssemblies>
|
||||
<dependencies>
|
||||
<group targetFramework=".NETFramework4.7">
|
||||
<dependency id="MessagePack" version="1.5.1" />
|
||||
<dependency id="MessagePack" version="1.6.0" />
|
||||
<dependency id="ReactiveProperty" version="3.5.1" />
|
||||
</group>
|
||||
<group targetFramework=".NETFramework4.5">
|
||||
<dependency id="MessagePack" version="1.5.1" />
|
||||
<dependency id="MessagePack" version="1.6.0" />
|
||||
<dependency id="ReactiveProperty" version="3.5.1" />
|
||||
</group>
|
||||
<group targetFramework=".NETStandard1.4">
|
||||
<dependency id="MessagePack" version="1.5.1" />
|
||||
<dependency id="MessagePack" version="1.6.0" />
|
||||
<dependency id="ReactiveProperty" version="3.5.1" />
|
||||
</group>
|
||||
</dependencies>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>MessagePack.UnityShims</id>
|
||||
<version>1.5.1</version>
|
||||
<version>1.6.0</version>
|
||||
<title>MessagePack for C# Extension Support for Unity(add pseudo Vector type and fast Vectory[] extension formatter)</title>
|
||||
<authors>neuecc</authors>
|
||||
<owners>neuecc</owners>
|
||||
|
@ -17,13 +17,13 @@
|
|||
</frameworkAssemblies>
|
||||
<dependencies>
|
||||
<group targetFramework=".NETFramework4.7">
|
||||
<dependency id="MessagePack" version="1.5.1" />
|
||||
<dependency id="MessagePack" version="1.6.0" />
|
||||
</group>
|
||||
<group targetFramework=".NETFramework4.5">
|
||||
<dependency id="MessagePack" version="1.5.1" />
|
||||
<dependency id="MessagePack" version="1.6.0" />
|
||||
</group>
|
||||
<group targetFramework=".NETStandard1.4">
|
||||
<dependency id="MessagePack" version="1.5.1" />
|
||||
<dependency id="MessagePack" version="1.6.0" />
|
||||
</group>
|
||||
</dependencies>
|
||||
</metadata>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>MessagePack</id>
|
||||
<version>1.5.1</version>
|
||||
<version>1.6.0</version>
|
||||
<title>MessagePack for C#</title>
|
||||
<authors>neuecc</authors>
|
||||
<owners>neuecc</owners>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
nuget push MessagePack.1.5.1.nupkg -Source https://www.nuget.org/api/v2/package
|
||||
nuget push MessagePack.ImmutableCollection.1.5.1.nupkg -Source https://www.nuget.org/api/v2/package
|
||||
nuget push MessagePack.ReactiveProperty.1.5.1.nupkg -Source https://www.nuget.org/api/v2/package
|
||||
nuget push MessagePack.UnityShims.1.5.1.nupkg -Source https://www.nuget.org/api/v2/package
|
||||
nuget push MessagePack.AspNetCoreMvcFormatter.1.5.1.nupkg -Source https://www.nuget.org/api/v2/package
|
||||
nuget push MessagePack.1.6.0.nupkg -Source https://www.nuget.org/api/v2/package
|
||||
nuget push MessagePack.ImmutableCollection.1.6.0.nupkg -Source https://www.nuget.org/api/v2/package
|
||||
nuget push MessagePack.ReactiveProperty.1.6.0.nupkg -Source https://www.nuget.org/api/v2/package
|
||||
nuget push MessagePack.UnityShims.1.6.0.nupkg -Source https://www.nuget.org/api/v2/package
|
||||
nuget push MessagePack.AspNetCoreMvcFormatter.1.6.0.nupkg -Source https://www.nuget.org/api/v2/package
|
||||
REM nuget push MessagePackAnalyzer.1.6.0.nupkg -Source https://www.nuget.org/api/v2/package
|
|
@ -107,9 +107,8 @@ namespace DynamicCodeDumper
|
|||
[MessagePackObject(true)]
|
||||
public class SimlpeStringKeyData2
|
||||
{
|
||||
public int FooBarBaz { get; set; }
|
||||
public int FooBarPoo { get; set; }
|
||||
public ByteEnum AprilJuneJuly { get; set; }
|
||||
public int MyProperty1 { get; set; }
|
||||
public int MyProperty2 { get; set; }
|
||||
}
|
||||
|
||||
[MessagePack.MessagePackObject(true)]
|
||||
|
|
|
@ -287,11 +287,22 @@ namespace Sandbox
|
|||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var now = MessagePackSerializer.Typeless.Serialize('a');
|
||||
|
||||
// File.WriteAllBytes(@"msgpack.bin", now);
|
||||
var automata = new AutomataDictionary();
|
||||
automata.Add("MyProperty1", 0);
|
||||
automata.Add("MyProperty2", 0);
|
||||
|
||||
Console.WriteLine(string.Join(" ", Encoding.UTF8.GetBytes("MyProperty1")));
|
||||
Console.WriteLine(string.Join(" ", Encoding.UTF8.GetBytes("MyProperty2")));
|
||||
//Console.WriteLine(Encoding.UTF8.GetBytes("MyProperty2"));
|
||||
|
||||
|
||||
Console.WriteLine(automata.ToString());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Console.WriteLine(MessagePackSerializer.ToJson(now));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -520,8 +520,8 @@ namespace SharedData
|
|||
|
||||
public class FindingConstructorCheck
|
||||
{
|
||||
public int MyProperty1 { get; set; }
|
||||
public string MyProperty2 { get; set; }
|
||||
public int MyProperty1 { get; private set; }
|
||||
public string MyProperty2 { get; private set; }
|
||||
|
||||
|
||||
public FindingConstructorCheck(KeyValuePair<int, string> ok)
|
||||
|
|
|
@ -33,9 +33,6 @@
|
|||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MessagePack, Version=1.5.1.0, Culture=neutral, PublicKeyToken=b4a0369545f0a1be, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\MessagePack.1.5.1\lib\net45\MessagePack.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
|
@ -54,7 +51,10 @@
|
|||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<ProjectReference Include="..\..\src\MessagePack\MessagePack.csproj">
|
||||
<Project>{7abb33ee-a2f1-492b-8daf-5df89f0f0b79}</Project>
|
||||
<Name>MessagePack</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MessagePack" version="1.5.1" targetFramework="net461" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.ValueTuple" version="4.3.0" targetFramework="net461" />
|
||||
</packages>
|
|
@ -11,5 +11,5 @@ using System.Runtime.InteropServices;
|
|||
[assembly: ComVisible(false)]
|
||||
|
||||
[assembly: Guid("7c1f59ed-3929-4cbb-8aca-b13139fbca3a")]
|
||||
[assembly: AssemblyVersion("1.5.1")]
|
||||
[assembly: AssemblyFileVersion("1.5.1")]
|
||||
[assembly: AssemblyVersion("1.6.0")]
|
||||
[assembly: AssemblyFileVersion("1.6.0")]
|
||||
|
|
|
@ -11,5 +11,5 @@ using System.Runtime.InteropServices;
|
|||
[assembly: ComVisible(false)]
|
||||
|
||||
[assembly: Guid("fe5a979e-24c6-47dd-919f-81df6fb2e160")]
|
||||
[assembly: AssemblyVersion("1.5.1")]
|
||||
[assembly: AssemblyFileVersion("1.5.1")]
|
||||
[assembly: AssemblyVersion("1.6.0")]
|
||||
[assembly: AssemblyFileVersion("1.6.0")]
|
||||
|
|
|
@ -11,5 +11,5 @@ using System.Runtime.InteropServices;
|
|||
[assembly: ComVisible(false)]
|
||||
|
||||
[assembly: Guid("16b0640a-c86d-4f21-bf2f-45efc728ae96")]
|
||||
[assembly: AssemblyVersion("1.5.1")]
|
||||
[assembly: AssemblyFileVersion("1.5.1")]
|
||||
[assembly: AssemblyVersion("1.6.0")]
|
||||
[assembly: AssemblyFileVersion("1.6.0")]
|
||||
|
|
|
@ -13,13 +13,11 @@
|
|||
<TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Unity Subset v3.5</TargetFrameworkProfile>
|
||||
<CompilerResponseFile>
|
||||
</CompilerResponseFile>
|
||||
<CompilerResponseFile>Assets\smcs.rsp</CompilerResponseFile>
|
||||
<UnityProjectType>Game:1</UnityProjectType>
|
||||
<UnityBuildTarget>StandaloneWindows:5</UnityBuildTarget>
|
||||
<UnityVersion>2017.1.0f3</UnityVersion>
|
||||
<RootNamespace>
|
||||
</RootNamespace>
|
||||
<RootNamespace></RootNamespace>
|
||||
<LangVersion Condition=" '$(VisualStudioVersion)' != '10.0' ">4</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
|
@ -29,8 +27,8 @@
|
|||
<IntermediateOutputPath>Temp\UnityVS_obj\Debug\</IntermediateOutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_0;UNITY_2017_1;UNITY_2017;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE</DefineConstants>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_0;UNITY_2017_1;UNITY_2017;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
|
@ -39,8 +37,8 @@
|
|||
<IntermediateOutputPath>Temp\UnityVS_obj\Release\</IntermediateOutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DefineConstants>TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_0;UNITY_2017_1;UNITY_2017;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE</DefineConstants>
|
||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||
<DefineConstants>TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_0;UNITY_2017_1;UNITY_2017;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE;</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="mscorlib" />
|
||||
|
@ -101,6 +99,11 @@
|
|||
<Compile Include="Assets\Scripts\MessagePack\Formatters\DictionaryFormatter.cs" />
|
||||
<Compile Include="Assets\Scripts\MessagePack\Formatters\DynamicObjectTypeFallbackFormatter.cs" />
|
||||
<Compile Include="Assets\Scripts\MessagePack\Formatters\EnumAsStringFormatter.cs" />
|
||||
<Compile Include="Assets\Scripts\MessagePack\Formatters\ForceSizePrimitiveFormatter.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>ForceSizePrimitiveFormatter.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Assets\Scripts\MessagePack\Formatters\IMessagePackFormatter.cs" />
|
||||
<Compile Include="Assets\Scripts\MessagePack\Formatters\MultiDimentionalArrayFormatter.cs" />
|
||||
<Compile Include="Assets\Scripts\MessagePack\Formatters\NullableFormatter.cs" />
|
||||
|
@ -172,10 +175,10 @@
|
|||
<Compile Include="Assets\Scripts\MessagePack\Unity\UnityResolver.cs" />
|
||||
<Compile Include="Assets\Scripts\MessagePack\UnsafeExtensions\UnityBlitResolver.cs" />
|
||||
<Compile Include="Assets\Scripts\MessagePack\UnsafeExtensions\UnsafeBlitFormatter.cs" />
|
||||
<Compile Include="Assets\Scripts\Tests\ContractlessTest.cs" />
|
||||
<Compile Include="Assets\Scripts\Tests\_Loader.cs" />
|
||||
<Compile Include="Assets\Scripts\Tests\Class1.cs" />
|
||||
<Compile Include="Assets\Scripts\Tests\CollectionFormatterTest.cs" />
|
||||
<Compile Include="Assets\Scripts\Tests\ContractlessTest.cs" />
|
||||
<Compile Include="Assets\Scripts\Tests\FormatterTest.cs" />
|
||||
<Compile Include="Assets\Scripts\Tests\LZ4Test.cs" />
|
||||
<Compile Include="Assets\Scripts\Tests\MsgPack\PersonSerializer.cs" />
|
||||
|
@ -190,6 +193,10 @@
|
|||
<Compile Include="Assets\Scripts\Tests\UnityBlitTest.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Assets\Scripts\MessagePack\Formatters\ForceSizePrimitiveFormatter.tt">
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>ForceSizePrimitiveFormatter.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Assets\Scripts\MessagePack\Formatters\PrimitiveFormatter.tt">
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>PrimitiveFormatter.cs</LastGenOutput>
|
||||
|
@ -208,4 +215,4 @@
|
|||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="GenerateTargetFrameworkMonikerAttribute" />
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
Двоичный файл не отображается.
|
@ -11,5 +11,5 @@ using System.Runtime.InteropServices;
|
|||
[assembly: ComVisible(false)]
|
||||
|
||||
[assembly: Guid("4b074f49-f7cb-4885-9a58-cc75a7d64b62")]
|
||||
[assembly: AssemblyVersion("1.5.1")]
|
||||
[assembly: AssemblyFileVersion("1.5.1")]
|
||||
[assembly: AssemblyVersion("1.6.0")]
|
||||
[assembly: AssemblyFileVersion("1.6.0")]
|
||||
|
|
|
@ -90,6 +90,7 @@ namespace MessagePack.Formatters
|
|||
}
|
||||
else
|
||||
{
|
||||
// use ReadBytesSegment? But currently straem api uses memory pool so can't save arraysegment...
|
||||
var binary = MessagePackBinary.ReadBytes(bytes, offset, out readSize);
|
||||
return new ArraySegment<byte>(binary, 0, binary.Length);
|
||||
}
|
||||
|
|
|
@ -12,8 +12,8 @@ using System.Runtime.InteropServices;
|
|||
[assembly: ComVisible(false)]
|
||||
|
||||
[assembly: Guid("b23e464e-0ac2-47c9-9520-ea98cbb99575")]
|
||||
[assembly: AssemblyVersion("1.5.1")]
|
||||
[assembly: AssemblyFileVersion("1.5.1")]
|
||||
[assembly: AssemblyVersion("1.6.0")]
|
||||
[assembly: AssemblyFileVersion("1.6.0")]
|
||||
|
||||
// sn.exe -Tp
|
||||
//[assembly: InternalsVisibleTo("MessagePack.Tests, PublicKey=" +
|
||||
|
|
Загрузка…
Ссылка в новой задаче