Skip to content

Commit

Permalink
Merge pull request #260 from msgpack/wip/timestamp
Browse files Browse the repository at this point in the history
Add timestamp support
  • Loading branch information
yfakariya authored Oct 1, 2017
2 parents 18c906f + ade67fa commit 4586454
Show file tree
Hide file tree
Showing 108 changed files with 19,868 additions and 3,944 deletions.
9 changes: 9 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -707,10 +707,19 @@ Release 0.9.1 2017-8-30
BUG FIXES
* Fix ByteArrayPacker throws IndexOutOfBoundException when the buffer remaining bytes is equal to packed scalar size. #252

Release 0.9.2 2017-09-26

BUG FIXES
* Fix UAP build drop does not exists in nupkg. #186

Release 1.0.0-beta1 T.B.D.

NEW FEATURES
* .NET Standard 2.0 which supports serializer source code generation on .NET Core. Note that serializer assembly generation is not supported.
* MessagePackSerializer.UnpackMessagePackObject(byte[]) utility method.
* MessagePack timestamp type support. This includes interoperability with DateTime/DateTimeOffset as well as MsgPack.Timespan type with basic arithmatics, properties, and conversions.

BUG FIXES
* Fix ByteArrayPacker throws IndexOutOfBoundException when the buffer remaining bytes is equal to packed scalar size. #252
* Fix UAP build drop does not exists in nupkg. #186
* Fix new unpacker cannot unpack reserved ext types.
3 changes: 2 additions & 1 deletion MsgPack.Windows.sln
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@ Global
{9D65A105-FB03-40DB-9185-8C695B8EE8D6}.Release|Any CPU.Build.0 = Release|Any CPU
{9D65A105-FB03-40DB-9185-8C695B8EE8D6}.Release|ARM.ActiveCfg = Release|ARM
{9D65A105-FB03-40DB-9185-8C695B8EE8D6}.Release|ARM.Build.0 = Release|ARM
{9D65A105-FB03-40DB-9185-8C695B8EE8D6}.Release|Mixed Platforms.ActiveCfg = Release|x86
{9D65A105-FB03-40DB-9185-8C695B8EE8D6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{9D65A105-FB03-40DB-9185-8C695B8EE8D6}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{9D65A105-FB03-40DB-9185-8C695B8EE8D6}.Release|x64.ActiveCfg = Release|x64
{9D65A105-FB03-40DB-9185-8C695B8EE8D6}.Release|x64.Build.0 = Release|x64
{9D65A105-FB03-40DB-9185-8C695B8EE8D6}.Release|x86.ActiveCfg = Release|x86
Expand Down
2 changes: 2 additions & 0 deletions Sync.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
{"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/SimdTypeSerializers.cs"},
{"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/System_Numerics_ComplexMessagePackSerializer.cs"},
{"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/System_Security_Cryptography_HashAlgorithmNameMessagePackSerializer.cs"},
{"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/TimestampFileTimeMessagePackSerializer.cs"},
{"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/UnixEpocFileTimeMessagePackSerializer.cs"},
{"type": "remove", "path": "../MsgPack/Serialization/ReflectionSerializers/ReflectionTupleMessagePackSerializer`1.cs"},
{"type": "remove", "path": "../MsgPack/Serialization/ReflectionExtensions.ConstructorDelegate.cs"},
Expand Down Expand Up @@ -117,6 +118,7 @@
{"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/System_Collections_StackMessagePackSerializer.cs"},
{"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/System_Collections_Specialized_NameValueCollectionMessagePackSerializer.cs"},
{"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/System_Security_Cryptography_HashAlgorithmNameMessagePackSerializer.cs"},
{"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/TimestampFileTimeMessagePackSerializer.cs"},
{"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/UnixEpocFileTimeMessagePackSerializer.cs"},
{"type": "remove", "path": "../MsgPack/BufferedStream.cs"},
{"type": "remove", "path": "../MsgPack/NetStandardCompatibility.cs"},
Expand Down
4 changes: 2 additions & 2 deletions samples/Samples/Samples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework, Version=3.6.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework, Version=3.8.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\..\packages\NUnit.3.8.1\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
2 changes: 1 addition & 1 deletion samples/Samples/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="3.6.1" targetFramework="net461" />
<package id="NUnit" version="3.8.1" targetFramework="net461" />
</packages>
45 changes: 45 additions & 0 deletions src/MsgPack.Silverlight.5/MsgPack.Silverlight.5.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,15 @@
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\System_VersionMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\System_VersionMessagePackSerializer.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\TimestampDateTimeMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\TimestampDateTimeMessagePackSerializer.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\TimestampMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\TimestampMessagePackSerializer.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\TimestampMessagePackSerializerProvider.cs">
<Link>Serialization\DefaultSerializers\TimestampMessagePackSerializerProvider.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\UnixEpocDateTimeMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\UnixEpocDateTimeMessagePackSerializer.cs</Link>
</Compile>
Expand Down Expand Up @@ -743,6 +752,42 @@
<Compile Include="..\MsgPack\SubtreeUnpacker.Unpacking.cs">
<Link>SubtreeUnpacker.Unpacking.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Calculation.cs">
<Link>Timestamp.Calculation.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Comparison.cs">
<Link>Timestamp.Comparison.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Conversion.cs">
<Link>Timestamp.Conversion.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.cs">
<Link>Timestamp.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.ParseExact.cs">
<Link>Timestamp.ParseExact.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Properties.cs">
<Link>Timestamp.Properties.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.ToString.cs">
<Link>Timestamp.ToString.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.TryParseExact.cs">
<Link>Timestamp.TryParseExact.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampParseResult.cs">
<Link>TimestampParseResult.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampStringConverter.cs">
<Link>TimestampStringConverter.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampStringConverter.Parse.cs">
<Link>TimestampStringConverter.Parse.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampStringConverter.ToString.cs">
<Link>TimestampStringConverter.ToString.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TupleItems.cs">
<Link>TupleItems.cs</Link>
</Compile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,18 @@
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\System_VersionMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\System_VersionMessagePackSerializer.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\TimestampDateTimeMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\TimestampDateTimeMessagePackSerializer.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\TimestampFileTimeMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\TimestampFileTimeMessagePackSerializer.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\TimestampMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\TimestampMessagePackSerializer.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\TimestampMessagePackSerializerProvider.cs">
<Link>Serialization\DefaultSerializers\TimestampMessagePackSerializerProvider.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\UnixEpocDateTimeMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\UnixEpocDateTimeMessagePackSerializer.cs</Link>
</Compile>
Expand Down Expand Up @@ -741,6 +753,42 @@
<Compile Include="..\MsgPack\SubtreeUnpacker.Unpacking.cs">
<Link>SubtreeUnpacker.Unpacking.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Calculation.cs">
<Link>Timestamp.Calculation.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Comparison.cs">
<Link>Timestamp.Comparison.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Conversion.cs">
<Link>Timestamp.Conversion.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.cs">
<Link>Timestamp.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.ParseExact.cs">
<Link>Timestamp.ParseExact.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Properties.cs">
<Link>Timestamp.Properties.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.ToString.cs">
<Link>Timestamp.ToString.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.TryParseExact.cs">
<Link>Timestamp.TryParseExact.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampParseResult.cs">
<Link>TimestampParseResult.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampStringConverter.cs">
<Link>TimestampStringConverter.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampStringConverter.Parse.cs">
<Link>TimestampStringConverter.Parse.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampStringConverter.ToString.cs">
<Link>TimestampStringConverter.ToString.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TupleItems.cs">
<Link>TupleItems.cs</Link>
</Compile>
Expand Down
45 changes: 45 additions & 0 deletions src/MsgPack.Unity.Full/MsgPack.Unity.Full.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,15 @@
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\System_VersionMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\System_VersionMessagePackSerializer.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\TimestampDateTimeMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\TimestampDateTimeMessagePackSerializer.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\TimestampMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\TimestampMessagePackSerializer.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\TimestampMessagePackSerializerProvider.cs">
<Link>Serialization\DefaultSerializers\TimestampMessagePackSerializerProvider.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\UnixEpocDateTimeMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\UnixEpocDateTimeMessagePackSerializer.cs</Link>
</Compile>
Expand Down Expand Up @@ -712,6 +721,42 @@
<Compile Include="..\MsgPack\SubtreeUnpacker.Unpacking.cs">
<Link>SubtreeUnpacker.Unpacking.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Calculation.cs">
<Link>Timestamp.Calculation.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Comparison.cs">
<Link>Timestamp.Comparison.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Conversion.cs">
<Link>Timestamp.Conversion.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.cs">
<Link>Timestamp.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.ParseExact.cs">
<Link>Timestamp.ParseExact.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Properties.cs">
<Link>Timestamp.Properties.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.ToString.cs">
<Link>Timestamp.ToString.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.TryParseExact.cs">
<Link>Timestamp.TryParseExact.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampParseResult.cs">
<Link>TimestampParseResult.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampStringConverter.cs">
<Link>TimestampStringConverter.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampStringConverter.Parse.cs">
<Link>TimestampStringConverter.Parse.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampStringConverter.ToString.cs">
<Link>TimestampStringConverter.ToString.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TupleItems.cs">
<Link>TupleItems.cs</Link>
</Compile>
Expand Down
45 changes: 45 additions & 0 deletions src/MsgPack.Unity/MsgPack.Unity.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,15 @@
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\System_VersionMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\System_VersionMessagePackSerializer.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\TimestampDateTimeMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\TimestampDateTimeMessagePackSerializer.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\TimestampMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\TimestampMessagePackSerializer.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\TimestampMessagePackSerializerProvider.cs">
<Link>Serialization\DefaultSerializers\TimestampMessagePackSerializerProvider.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\UnixEpocDateTimeMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\UnixEpocDateTimeMessagePackSerializer.cs</Link>
</Compile>
Expand Down Expand Up @@ -718,6 +727,42 @@
<Compile Include="..\MsgPack\SubtreeUnpacker.Unpacking.cs">
<Link>SubtreeUnpacker.Unpacking.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Calculation.cs">
<Link>Timestamp.Calculation.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Comparison.cs">
<Link>Timestamp.Comparison.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Conversion.cs">
<Link>Timestamp.Conversion.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.cs">
<Link>Timestamp.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.ParseExact.cs">
<Link>Timestamp.ParseExact.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Properties.cs">
<Link>Timestamp.Properties.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.ToString.cs">
<Link>Timestamp.ToString.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.TryParseExact.cs">
<Link>Timestamp.TryParseExact.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampParseResult.cs">
<Link>TimestampParseResult.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampStringConverter.cs">
<Link>TimestampStringConverter.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampStringConverter.Parse.cs">
<Link>TimestampStringConverter.Parse.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampStringConverter.ToString.cs">
<Link>TimestampStringConverter.ToString.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TupleItems.cs">
<Link>TupleItems.cs</Link>
</Compile>
Expand Down
48 changes: 48 additions & 0 deletions src/MsgPack.Uwp/MsgPack.Uwp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,18 @@
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\System_VersionMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\System_VersionMessagePackSerializer.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\TimestampDateTimeMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\TimestampDateTimeMessagePackSerializer.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\TimestampFileTimeMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\TimestampFileTimeMessagePackSerializer.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\TimestampMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\TimestampMessagePackSerializer.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\TimestampMessagePackSerializerProvider.cs">
<Link>Serialization\DefaultSerializers\TimestampMessagePackSerializerProvider.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Serialization\DefaultSerializers\UnixEpocDateTimeMessagePackSerializer.cs">
<Link>Serialization\DefaultSerializers\UnixEpocDateTimeMessagePackSerializer.cs</Link>
</Compile>
Expand Down Expand Up @@ -787,6 +799,42 @@
<Compile Include="..\MsgPack\TaskAugument.cs">
<Link>TaskAugument.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Calculation.cs">
<Link>Timestamp.Calculation.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Comparison.cs">
<Link>Timestamp.Comparison.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Conversion.cs">
<Link>Timestamp.Conversion.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.cs">
<Link>Timestamp.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.ParseExact.cs">
<Link>Timestamp.ParseExact.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.Properties.cs">
<Link>Timestamp.Properties.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.ToString.cs">
<Link>Timestamp.ToString.cs</Link>
</Compile>
<Compile Include="..\MsgPack\Timestamp.TryParseExact.cs">
<Link>Timestamp.TryParseExact.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampParseResult.cs">
<Link>TimestampParseResult.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampStringConverter.cs">
<Link>TimestampStringConverter.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampStringConverter.Parse.cs">
<Link>TimestampStringConverter.Parse.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TimestampStringConverter.ToString.cs">
<Link>TimestampStringConverter.ToString.cs</Link>
</Compile>
<Compile Include="..\MsgPack\TupleItems.cs">
<Link>TupleItems.cs</Link>
</Compile>
Expand Down
15 changes: 13 additions & 2 deletions src/MsgPack/KnownExtTypeCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// MessagePack for CLI
//
// Copyright (C) 2015 FUJIWARA, Yusuke
// Copyright (C) 2015-2017 FUJIWARA, Yusuke
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,6 +31,17 @@ namespace MsgPack
/// </remarks>
public static class KnownExtTypeCode
{
/// <summary>
/// Gets the ext type code which represents MsgPack timestamp.
/// </summary>
/// <value>
/// 0xFF(-1).
/// </value>
public static byte Timestamp
{
get { return 0xFF; }
}

/// <summary>
/// Gets the ext type code which represents multidimensional array.
/// </summary>
Expand All @@ -42,4 +53,4 @@ public static byte MultidimensionalArray
get { return 0x71; }
}
}
}
}
Loading

0 comments on commit 4586454

Please sign in to comment.