Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/aspnet/MessagePack-CSharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2019-07-14 16:19:34 +0300
committerAndrew Arnott <andrewarnott@gmail.com>2019-07-14 16:20:01 +0300
commit3d816272e7ef29ffc0773bcbf684af7ef807e58c (patch)
tree5077227b8f1a3f0aa6d18c2924933f59e042168c /benchmark
parentb21d5dbaf25c2428f0b166d35209ee6f31db57da (diff)
Apply StyleCop.Analyzers and conform to it
Freshen copyright and license Include "contributors" as shared owners, and use modern nuget-preferred style license indicator. Closes #480
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/SerializerBenchmark/BenchmarkConfig.cs74
-rw-r--r--benchmark/SerializerBenchmark/ExtensionMethods.cs55
-rw-r--r--benchmark/SerializerBenchmark/Fixture/BooleanValueFixture.cs10
-rw-r--r--benchmark/SerializerBenchmark/Fixture/ByteValueFixture.cs10
-rw-r--r--benchmark/SerializerBenchmark/Fixture/DateTimeOffsetValueFixture.cs12
-rw-r--r--benchmark/SerializerBenchmark/Fixture/DateTimeValueFixture.cs14
-rw-r--r--benchmark/SerializerBenchmark/Fixture/DecimalValueFixture.cs10
-rw-r--r--benchmark/SerializerBenchmark/Fixture/DoubleValueFixture.cs10
-rw-r--r--benchmark/SerializerBenchmark/Fixture/EnumValueFixture.cs15
-rw-r--r--benchmark/SerializerBenchmark/Fixture/ExpressionTreeFixture.cs166
-rw-r--r--benchmark/SerializerBenchmark/Fixture/FloatValueFixture.cs10
-rw-r--r--benchmark/SerializerBenchmark/Fixture/GuidValueFixture.cs5
-rw-r--r--benchmark/SerializerBenchmark/Fixture/IValueFixture.cs8
-rw-r--r--benchmark/SerializerBenchmark/Fixture/IntValueFixture.cs10
-rw-r--r--benchmark/SerializerBenchmark/Fixture/LongValueFixture.cs10
-rw-r--r--benchmark/SerializerBenchmark/Fixture/OtherPrimitiveFixtures.cs24
-rw-r--r--benchmark/SerializerBenchmark/Fixture/ShortValueFixture.cs10
-rw-r--r--benchmark/SerializerBenchmark/Fixture/StringValueFixture.cs12
-rw-r--r--benchmark/SerializerBenchmark/IGenericEquality.cs8
-rw-r--r--benchmark/SerializerBenchmark/IGenericEquality`1.cs12
-rw-r--r--benchmark/SerializerBenchmark/Models/AccessToken.cs31
-rw-r--r--benchmark/SerializerBenchmark/Models/AccountMerge.cs26
-rw-r--r--benchmark/SerializerBenchmark/Models/Answer.cs152
-rw-r--r--benchmark/SerializerBenchmark/Models/Badge.cs60
-rw-r--r--benchmark/SerializerBenchmark/Models/Comment.cs84
-rw-r--r--benchmark/SerializerBenchmark/Models/Error.cs26
-rw-r--r--benchmark/SerializerBenchmark/Models/Event.cs40
-rw-r--r--benchmark/SerializerBenchmark/Models/Feed.cs603
-rw-r--r--benchmark/SerializerBenchmark/Models/FlagOption.cs62
-rw-r--r--benchmark/SerializerBenchmark/Models/InboxItem.cs70
-rw-r--r--benchmark/SerializerBenchmark/Models/Info.cs242
-rw-r--r--benchmark/SerializerBenchmark/Models/NetworkUser.cs74
-rw-r--r--benchmark/SerializerBenchmark/Models/Notification.cs42
-rw-r--r--benchmark/SerializerBenchmark/Models/Post.cs116
-rw-r--r--benchmark/SerializerBenchmark/Models/Privilege.cs26
-rw-r--r--benchmark/SerializerBenchmark/Models/Question.cs348
-rw-r--r--benchmark/SerializerBenchmark/Models/QuestionTimeline.cs70
-rw-r--r--benchmark/SerializerBenchmark/Models/Reputation.cs58
-rw-r--r--benchmark/SerializerBenchmark/Models/ReputationHistory.cs40
-rw-r--r--benchmark/SerializerBenchmark/Models/Revision.cs106
-rw-r--r--benchmark/SerializerBenchmark/Models/SearchExcerpt.cs122
-rw-r--r--benchmark/SerializerBenchmark/Models/ShallowUser.cs58
-rw-r--r--benchmark/SerializerBenchmark/Models/SuggestedEdit.cs76
-rw-r--r--benchmark/SerializerBenchmark/Models/Tag.cs56
-rw-r--r--benchmark/SerializerBenchmark/Models/TagScore.cs26
-rw-r--r--benchmark/SerializerBenchmark/Models/TagSynonym.cs38
-rw-r--r--benchmark/SerializerBenchmark/Models/TagWiki.cs54
-rw-r--r--benchmark/SerializerBenchmark/Models/TopTag.cs44
-rw-r--r--benchmark/SerializerBenchmark/Models/User.cs194
-rw-r--r--benchmark/SerializerBenchmark/Models/UserTimeline.cs76
-rw-r--r--benchmark/SerializerBenchmark/Models/WritePermission.cs50
-rw-r--r--benchmark/SerializerBenchmark/Program.cs11
-rw-r--r--benchmark/SerializerBenchmark/SerializerBenchmark.cs1352
-rw-r--r--benchmark/SerializerBenchmark/SerializerBenchmark.csproj8
-rw-r--r--benchmark/SerializerBenchmark/SerializerBenchmark.ruleset7
-rw-r--r--benchmark/SerializerBenchmark/Serializers/BinaryFormatter.cs7
-rw-r--r--benchmark/SerializerBenchmark/Serializers/CerasSerializer.cs13
-rw-r--r--benchmark/SerializerBenchmark/Serializers/DataContractSerializer.cs7
-rw-r--r--benchmark/SerializerBenchmark/Serializers/FsPicklerSerializer.cs15
-rw-r--r--benchmark/SerializerBenchmark/Serializers/HagarSerializer.cs115
-rw-r--r--benchmark/SerializerBenchmark/Serializers/HyperionSerializer.cs15
-rw-r--r--benchmark/SerializerBenchmark/Serializers/JilSerializer.cs11
-rw-r--r--benchmark/SerializerBenchmark/Serializers/JsonNetSerializer.cs16
-rw-r--r--benchmark/SerializerBenchmark/Serializers/MessagePackSerializer.cs9
-rw-r--r--benchmark/SerializerBenchmark/Serializers/MsgPackCliSerializer.cs7
-rw-r--r--benchmark/SerializerBenchmark/Serializers/ProtobufSerializer.cs12
-rw-r--r--benchmark/SerializerBenchmark/Serializers/SerializerBase.cs7
-rw-r--r--benchmark/SerializerBenchmark/Serializers/SpanJsonSerializer.cs7
-rw-r--r--benchmark/SerializerBenchmark/Serializers/Utf8JsonSerializer.cs7
69 files changed, 2865 insertions, 2316 deletions
diff --git a/benchmark/SerializerBenchmark/BenchmarkConfig.cs b/benchmark/SerializerBenchmark/BenchmarkConfig.cs
index c88d5d3a..a1f4cb8c 100644
--- a/benchmark/SerializerBenchmark/BenchmarkConfig.cs
+++ b/benchmark/SerializerBenchmark/BenchmarkConfig.cs
@@ -1,4 +1,10 @@
-using Benchmark.Serializers;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Benchmark.Serializers;
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Diagnosers;
@@ -9,9 +15,6 @@ using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Order;
using BenchmarkDotNet.Reports;
using BenchmarkDotNet.Running;
-using System;
-using System.Collections.Generic;
-using System.Linq;
namespace Benchmark
{
@@ -20,23 +23,22 @@ namespace Benchmark
public BenchmarkConfig()
{
// run quickly:)
- var baseConfig = Job.ShortRun.WithIterationCount(1).WithWarmupCount(1);
+ Job baseConfig = Job.ShortRun.WithIterationCount(1).WithWarmupCount(1);
// Add(baseConfig.With(Runtime.Clr).With(Jit.RyuJit).With(Platform.X64));
- Add(baseConfig.With(Runtime.Core).With(Jit.RyuJit).With(Platform.X64));
+ this.Add(baseConfig.With(Runtime.Core).With(Jit.RyuJit).With(Platform.X64));
- Add(MarkdownExporter.GitHub);
- Add(CsvExporter.Default);
- Add(MemoryDiagnoser.Default);
+ this.Add(MarkdownExporter.GitHub);
+ this.Add(CsvExporter.Default);
+ this.Add(MemoryDiagnoser.Default);
- Add(new DataSizeColumn());
+ this.Add(new DataSizeColumn());
this.Set(new CustomOrderer());
}
// 0.11.4 has bug of set CustomOrderer https://github.com/dotnet/BenchmarkDotNet/issues/1070
// so skip update to 0.11.4.
-
public class CustomOrderer : IOrderer
{
public bool SeparateLogicalGroups => false;
@@ -89,12 +91,12 @@ namespace Benchmark
public string GetValue(Summary summary, BenchmarkCase benchmarkCase)
{
- return GetValue(summary, benchmarkCase, null);
+ return this.GetValue(summary, benchmarkCase, null);
}
public string GetValue(Summary summary, BenchmarkCase benchmarkCase, ISummaryStyle style)
{
- var mi = benchmarkCase.Descriptor.WorkloadMethod;
+ System.Reflection.MethodInfo mi = benchmarkCase.Descriptor.WorkloadMethod;
if (mi.Name.Contains("Serialize"))
{
var instance = Activator.CreateInstance(mi.DeclaringType);
@@ -119,36 +121,60 @@ namespace Benchmark
return false;
}
- static string ToHumanReadableSize(long size)
+ private static string ToHumanReadableSize(long size)
{
- return ToHumanReadableSize(new Nullable<long>(size));
+ return ToHumanReadableSize(new long?(size));
}
- static string ToHumanReadableSize(long? size)
+ private static string ToHumanReadableSize(long? size)
{
- if (size == null) return "NULL";
+ if (size == null)
+ {
+ return "NULL";
+ }
double bytes = size.Value;
- if (bytes <= 1024) return bytes.ToString("f2") + " B";
+ if (bytes <= 1024)
+ {
+ return bytes.ToString("f2") + " B";
+ }
bytes = bytes / 1024;
- if (bytes <= 1024) return bytes.ToString("f2") + " KB";
+ if (bytes <= 1024)
+ {
+ return bytes.ToString("f2") + " KB";
+ }
bytes = bytes / 1024;
- if (bytes <= 1024) return bytes.ToString("f2") + " MB";
+ if (bytes <= 1024)
+ {
+ return bytes.ToString("f2") + " MB";
+ }
bytes = bytes / 1024;
- if (bytes <= 1024) return bytes.ToString("f2") + " GB";
+ if (bytes <= 1024)
+ {
+ return bytes.ToString("f2") + " GB";
+ }
bytes = bytes / 1024;
- if (bytes <= 1024) return bytes.ToString("f2") + " TB";
+ if (bytes <= 1024)
+ {
+ return bytes.ToString("f2") + " TB";
+ }
bytes = bytes / 1024;
- if (bytes <= 1024) return bytes.ToString("f2") + " PB";
+ if (bytes <= 1024)
+ {
+ return bytes.ToString("f2") + " PB";
+ }
bytes = bytes / 1024;
- if (bytes <= 1024) return bytes.ToString("f2") + " EB";
+ if (bytes <= 1024)
+ {
+ return bytes.ToString("f2") + " EB";
+ }
bytes = bytes / 1024;
return bytes + " ZB";
diff --git a/benchmark/SerializerBenchmark/ExtensionMethods.cs b/benchmark/SerializerBenchmark/ExtensionMethods.cs
index 941c48db..086187dc 100644
--- a/benchmark/SerializerBenchmark/ExtensionMethods.cs
+++ b/benchmark/SerializerBenchmark/ExtensionMethods.cs
@@ -1,25 +1,13 @@
-using System;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Benchmark
{
- public class GenericEqualityComparer<T> : IEqualityComparer<T> where T : class, IGenericEquality<T>
- {
- public static readonly GenericEqualityComparer<T> Default = new GenericEqualityComparer<T>();
-
- public bool Equals(T x, T y)
- {
- return x.TrueEquals(y);
- }
-
- public int GetHashCode(T obj)
- {
- return 0; // not fast, but not really important here
- }
- }
-
public static class ExtensionMethods
{
public static bool TrueEqualsString(this IEnumerable<string> a, IEnumerable<string> b)
@@ -39,10 +27,12 @@ namespace Benchmark
{
return true;
}
+
if (!a.HasValue)
{
return false;
}
+
if (!b.HasValue)
{
return false;
@@ -90,13 +80,14 @@ namespace Benchmark
{
return false;
}
+
if (ReferenceEquals(b, null))
{
return false;
}
- using (var e1 = a.GetEnumerator())
- using (var e2 = b.GetEnumerator())
+ using (IEnumerator<T> e1 = a.GetEnumerator())
+ using (IEnumerator<dynamic> e2 = b.GetEnumerator())
{
while (true)
{
@@ -106,21 +97,25 @@ namespace Benchmark
{
return false;
}
+
if (!e1Next && !e2Next)
{
break;
}
- var c1 = e1.Current;
- var c2 = e2.Current;
+
+ T c1 = e1.Current;
+ dynamic c2 = e2.Current;
if (c1 == null && c2 != null)
{
return false;
}
+
if (c2 == null && c1 != null)
{
return false;
}
+
if (!c1.EqualsDynamic(c2))
{
return false;
@@ -134,9 +129,25 @@ namespace Benchmark
public static bool IsTypedList(this Type type)
{
return
- type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == typeof(IList<>) ||
+ (type.GetTypeInfo().IsGenericType && type.GetGenericTypeDefinition() == typeof(IList<>)) ||
type.GetTypeInfo().GetInterfaces().Any(i =>
i.GetTypeInfo().IsGenericType && i.GetGenericTypeDefinition() == typeof(IList<>));
}
+
+ private class GenericEqualityComparer<T> : IEqualityComparer<T>
+ where T : class, IGenericEquality<T>
+ {
+ public static readonly GenericEqualityComparer<T> Default = new GenericEqualityComparer<T>();
+
+ public bool Equals(T x, T y)
+ {
+ return x.TrueEquals(y);
+ }
+
+ public int GetHashCode(T obj)
+ {
+ return 0; // not fast, but not really important here
+ }
+ }
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Fixture/BooleanValueFixture.cs b/benchmark/SerializerBenchmark/Fixture/BooleanValueFixture.cs
index bb600ce5..dfd0ce6e 100644
--- a/benchmark/SerializerBenchmark/Fixture/BooleanValueFixture.cs
+++ b/benchmark/SerializerBenchmark/Fixture/BooleanValueFixture.cs
@@ -1,15 +1,19 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System;
namespace Benchmark.Fixture
{
public class BooleanValueFixture : IValueFixture
{
- private readonly Random _prng = new Random();
+ private readonly Random prng = new Random();
+
public Type Type { get; } = typeof(bool);
public object Generate()
{
- return _prng.Next() % 2 == 1;
+ return this.prng.Next() % 2 == 1;
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Fixture/ByteValueFixture.cs b/benchmark/SerializerBenchmark/Fixture/ByteValueFixture.cs
index d0833179..9b32dd95 100644
--- a/benchmark/SerializerBenchmark/Fixture/ByteValueFixture.cs
+++ b/benchmark/SerializerBenchmark/Fixture/ByteValueFixture.cs
@@ -1,15 +1,19 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System;
namespace Benchmark.Fixture
{
public class ByteValueFixture : IValueFixture
{
- private readonly Random _prng = new Random();
+ private readonly Random prng = new Random();
+
public Type Type { get; } = typeof(byte);
public object Generate()
{
- return (byte) (_prng.Next() & 0xFF);
+ return (byte)(this.prng.Next() & 0xFF);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Fixture/DateTimeOffsetValueFixture.cs b/benchmark/SerializerBenchmark/Fixture/DateTimeOffsetValueFixture.cs
index f7302c7a..e12fd57b 100644
--- a/benchmark/SerializerBenchmark/Fixture/DateTimeOffsetValueFixture.cs
+++ b/benchmark/SerializerBenchmark/Fixture/DateTimeOffsetValueFixture.cs
@@ -1,16 +1,20 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System;
namespace Benchmark.Fixture
{
public class DateTimeOffsetValueFixture : IValueFixture
{
- private long _lastValue;
+ private long lastValue;
+
public Type Type { get; } = typeof(DateTimeOffset);
public object Generate()
{
- _lastValue += 1000;
- return DateTimeOffset.FromUnixTimeMilliseconds(_lastValue);
+ this.lastValue += 1000;
+ return DateTimeOffset.FromUnixTimeMilliseconds(this.lastValue);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Fixture/DateTimeValueFixture.cs b/benchmark/SerializerBenchmark/Fixture/DateTimeValueFixture.cs
index b64d5794..0b484c1c 100644
--- a/benchmark/SerializerBenchmark/Fixture/DateTimeValueFixture.cs
+++ b/benchmark/SerializerBenchmark/Fixture/DateTimeValueFixture.cs
@@ -1,18 +1,22 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System;
namespace Benchmark.Fixture
{
public class DateTimeValueFixture : IValueFixture
{
- private long _lastValue;
- private static readonly long Offset = new DateTime(1970, 1,1,0,0,0).ToFileTime();
+ private long lastValue;
+ private static readonly long Offset = new DateTime(1970, 1, 1, 0, 0, 0).ToFileTime();
+
public Type Type { get; } = typeof(DateTime);
public object Generate()
{
- _lastValue += 1000;
- var dt = DateTime.FromFileTime(_lastValue+Offset);
+ this.lastValue += 1000;
+ var dt = DateTime.FromFileTime(this.lastValue + Offset);
return dt;
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Fixture/DecimalValueFixture.cs b/benchmark/SerializerBenchmark/Fixture/DecimalValueFixture.cs
index 5ab727ae..89d9dd04 100644
--- a/benchmark/SerializerBenchmark/Fixture/DecimalValueFixture.cs
+++ b/benchmark/SerializerBenchmark/Fixture/DecimalValueFixture.cs
@@ -1,15 +1,19 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System;
namespace Benchmark.Fixture
{
public class DecimalValueFixture : IValueFixture
{
- private readonly Random _prng = new Random();
+ private readonly Random prng = new Random();
+
public Type Type { get; } = typeof(decimal);
public object Generate()
{
- return _prng.Next() + 0.66m;
+ return this.prng.Next() + 0.66m;
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Fixture/DoubleValueFixture.cs b/benchmark/SerializerBenchmark/Fixture/DoubleValueFixture.cs
index 7eb0b1ad..848cbd7e 100644
--- a/benchmark/SerializerBenchmark/Fixture/DoubleValueFixture.cs
+++ b/benchmark/SerializerBenchmark/Fixture/DoubleValueFixture.cs
@@ -1,15 +1,19 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System;
namespace Benchmark.Fixture
{
public class DoubleValueFixture : IValueFixture
{
- private readonly Random _prng = new Random();
+ private readonly Random prng = new Random();
+
public Type Type { get; } = typeof(double);
public object Generate()
{
- return _prng.Next() + 0.5d;
+ return this.prng.Next() + 0.5d;
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Fixture/EnumValueFixture.cs b/benchmark/SerializerBenchmark/Fixture/EnumValueFixture.cs
index cf944d42..18e7dd0c 100644
--- a/benchmark/SerializerBenchmark/Fixture/EnumValueFixture.cs
+++ b/benchmark/SerializerBenchmark/Fixture/EnumValueFixture.cs
@@ -1,23 +1,26 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System;
namespace Benchmark.Fixture
{
public class EnumValueFixture : IValueFixture
{
- private readonly Random _prng = new Random();
- private readonly string[] _values;
+ private readonly Random prng = new Random();
+ private readonly string[] values;
public EnumValueFixture(Type type)
{
- Type = type;
- _values = Enum.GetNames(Type);
+ this.Type = type;
+ this.values = Enum.GetNames(this.Type);
}
public Type Type { get; }
public object Generate()
{
- return Enum.Parse(Type, _values[_prng.Next(_values.Length)]);
+ return Enum.Parse(this.Type, this.values[this.prng.Next(this.values.Length)]);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Fixture/ExpressionTreeFixture.cs b/benchmark/SerializerBenchmark/Fixture/ExpressionTreeFixture.cs
index bede1abc..86c9a678 100644
--- a/benchmark/SerializerBenchmark/Fixture/ExpressionTreeFixture.cs
+++ b/benchmark/SerializerBenchmark/Fixture/ExpressionTreeFixture.cs
@@ -1,3 +1,6 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -9,10 +12,10 @@ namespace Benchmark.Fixture
{
public class ExpressionTreeFixture
{
- private readonly ConcurrentDictionary<Type, Func<int, int, object>> _functorCache =
+ private readonly ConcurrentDictionary<Type, Func<int, int, object>> functorCache =
new ConcurrentDictionary<Type, Func<int, int, object>>();
- private readonly Dictionary<Type, IValueFixture> _valueFixtures = new Dictionary<Type, IValueFixture>();
+ private readonly Dictionary<Type, IValueFixture> valueFixtures = new Dictionary<Type, IValueFixture>();
public ExpressionTreeFixture()
{
@@ -35,55 +38,60 @@ namespace Benchmark.Fixture
new UShortValueFixture(),
new UInt32ValueFixture(),
new UInt64ValueFixture(),
- new CharValueFixture()
+ new CharValueFixture(),
};
- foreach (var item in fixtures)
+ foreach (IValueFixture item in fixtures)
{
- _valueFixtures.Add(item.Type, item);
+ this.valueFixtures.Add(item.Type, item);
}
}
public object Create(Type type, int repeatCount = 1, int recursiveCount = 1)
{
- var functor = _functorCache.GetOrAdd(type, AddFunctor);
+ Func<int, int, object> functor = this.functorCache.GetOrAdd(type, this.AddFunctor);
return functor(repeatCount, recursiveCount);
}
private Func<int, int, object> AddFunctor(Type type)
{
- var repeatCount = Expression.Parameter(typeof(int), "repeatCount");
- var recursiveCount = Expression.Parameter(typeof(int), "recursiveCount");
+ ParameterExpression repeatCount = Expression.Parameter(typeof(int), "repeatCount");
+ ParameterExpression recursiveCount = Expression.Parameter(typeof(int), "recursiveCount");
var subExpressions = new List<Expression>();
- var typedOutput = Expression.Variable(type, "typedOutput");
- if (_valueFixtures.ContainsKey(type) || type.IsArray || type.IsTypedList()
- ) // they can be generated directly
+ ParameterExpression typedOutput = Expression.Variable(type, "typedOutput");
+ if (this.valueFixtures.ContainsKey(type) || type.IsArray || type.IsTypedList())
{
- var expression = GenerateValue(typedOutput, repeatCount, recursiveCount, type);
+ // they can be generated directly
+ Expression expression = this.GenerateValue(typedOutput, repeatCount, recursiveCount, type);
subExpressions.Add(expression);
}
else
{
subExpressions.Add(Expression.Assign(typedOutput, Expression.New(type)));
- var typeProps = type.GetProperties();
- foreach (var propertyInfo in typeProps)
+ PropertyInfo[] typeProps = type.GetProperties();
+ foreach (PropertyInfo propertyInfo in typeProps)
{
if (!propertyInfo.CanWrite)
{
continue;
}
- var propertyType = propertyInfo.PropertyType;
- var isRecursion = IsRecursion(type, propertyType) || IsRecursion(propertyType, type);
- var memberAccess = Expression.MakeMemberAccess(typedOutput, propertyInfo);
- var expression = GenerateValue(memberAccess, repeatCount,
- isRecursion ? Expression.Decrement(recursiveCount) : (Expression)recursiveCount, propertyType);
+
+ Type propertyType = propertyInfo.PropertyType;
+ var isRecursion = this.IsRecursion(type, propertyType) || this.IsRecursion(propertyType, type);
+ MemberExpression memberAccess = Expression.MakeMemberAccess(typedOutput, propertyInfo);
+ Expression expression = this.GenerateValue(
+ memberAccess,
+ repeatCount,
+ isRecursion ? Expression.Decrement(recursiveCount) : (Expression)recursiveCount,
+ propertyType);
subExpressions.Add(expression);
}
}
- var returnTarget = Expression.Label(typeof(object));
- var returnLabel = Expression.Label(returnTarget, Expression.Convert(typedOutput, typeof(object)));
+
+ LabelTarget returnTarget = Expression.Label(typeof(object));
+ LabelExpression returnLabel = Expression.Label(returnTarget, Expression.Convert(typedOutput, typeof(object)));
subExpressions.Add(returnLabel);
- var block = Expression.Block(new[] { typedOutput }, subExpressions);
+ BlockExpression block = Expression.Block(new[] { typedOutput }, subExpressions);
var lambda = Expression.Lambda<Func<int, int, object>>(block, repeatCount, recursiveCount);
return lambda.Compile();
}
@@ -94,128 +102,133 @@ namespace Benchmark.Fixture
{
return true;
}
+
if (parentType.IsTypedList())
{
- var childType = parentType.GetGenericArguments()[0];
- return IsRecursion(type, childType);
+ Type childType = parentType.GetGenericArguments()[0];
+ return this.IsRecursion(type, childType);
}
+
if (parentType.IsArray)
{
- var elementType = parentType.GetElementType();
- return IsRecursion(type, elementType);
+ Type elementType = parentType.GetElementType();
+ return this.IsRecursion(type, elementType);
}
+
if (Nullable.GetUnderlyingType(parentType) != null)
{
- var nullableType = Nullable.GetUnderlyingType(parentType);
- return IsRecursion(type, nullableType);
+ Type nullableType = Nullable.GetUnderlyingType(parentType);
+ return this.IsRecursion(type, nullableType);
}
+
return false;
}
- private Expression GenerateValue(Expression generatedValue, Expression repeatCount, Expression recursiveCount,
- Type type)
+ private Expression GenerateValue(Expression generatedValue, Expression repeatCount, Expression recursiveCount, Type type)
{
var result = new List<Expression>();
- if (_valueFixtures.TryGetValue(type, out var valueFixture))
+ if (this.valueFixtures.TryGetValue(type, out IValueFixture valueFixture))
{
- var generateMethodInfo = valueFixture.GetType().GetMethod(nameof(IValueFixture.Generate));
- result.Add(Expression.Assign(generatedValue,
- Expression.Convert(Expression.Call(Expression.Constant(valueFixture), generateMethodInfo),
- generatedValue.Type)));
+ MethodInfo generateMethodInfo = valueFixture.GetType().GetMethod(nameof(IValueFixture.Generate));
+ result.Add(Expression.Assign(
+ generatedValue,
+ Expression.Convert(Expression.Call(Expression.Constant(valueFixture), generateMethodInfo), generatedValue.Type)));
}
else if (type.IsTypedList())
{
var expressionList = new List<Expression>();
- var elementType = type.GetGenericArguments()[0];
+ Type elementType = type.GetGenericArguments()[0];
expressionList.Add(Expression.Assign(generatedValue, Expression.New(type)));
- var index = Expression.Parameter(typeof(int), "i");
- var addMi = type.GetMethod("Add", new[] { elementType });
- var childValue = Expression.Parameter(elementType);
+ ParameterExpression index = Expression.Parameter(typeof(int), "i");
+ MethodInfo addMi = type.GetMethod("Add", new[] { elementType });
+ ParameterExpression childValue = Expression.Parameter(elementType);
var loopBlock = new List<Expression>
{
- GenerateValue(childValue, repeatCount, recursiveCount, elementType),
- Expression.Call(generatedValue, addMi, childValue)
+ this.GenerateValue(childValue, repeatCount, recursiveCount, elementType),
+ Expression.Call(generatedValue, addMi, childValue),
};
if (loopBlock.Count > 0)
{
- var loopContent = Expression.Block(new[] { childValue, index }, loopBlock);
+ BlockExpression loopContent = Expression.Block(new[] { childValue, index }, loopBlock);
expressionList.Add(ForLoop(index, repeatCount, loopContent));
}
- result.Add(MakeIfExpression(recursiveCount, expressionList));
+
+ result.Add(this.MakeIfExpression(recursiveCount, expressionList));
}
else if (type.IsArray)
{
- var elementType = type.GetElementType();
- var index = Expression.Parameter(typeof(int), "i");
+ Type elementType = type.GetElementType();
+ ParameterExpression index = Expression.Parameter(typeof(int), "i");
var arrayList = new List<Expression>
{
Expression.Assign(generatedValue, Expression.NewArrayBounds(elementType, repeatCount)),
- ForLoop(index, repeatCount,
- GenerateValue(Expression.ArrayAccess(generatedValue, index), repeatCount, recursiveCount,
- elementType))
+ ForLoop(
+ index,
+ repeatCount,
+ this.GenerateValue(Expression.ArrayAccess(generatedValue, index), repeatCount, recursiveCount, elementType)),
};
- result.Add(MakeIfExpression(recursiveCount, arrayList));
+ result.Add(this.MakeIfExpression(recursiveCount, arrayList));
}
else if (Nullable.GetUnderlyingType(type) != null)
{
- var elementType = Nullable.GetUnderlyingType(type);
- result.Add(GenerateValue(generatedValue, repeatCount, recursiveCount, elementType));
+ Type elementType = Nullable.GetUnderlyingType(type);
+ result.Add(this.GenerateValue(generatedValue, repeatCount, recursiveCount, elementType));
}
else if (type.GetTypeInfo().IsEnum)
{
- if (!_valueFixtures.TryGetValue(type, out valueFixture))
+ if (!this.valueFixtures.TryGetValue(type, out valueFixture))
{
valueFixture = new EnumValueFixture(type);
- _valueFixtures.Add(valueFixture.Type, valueFixture);
+ this.valueFixtures.Add(valueFixture.Type, valueFixture);
}
- result.Add(GenerateValue(generatedValue, repeatCount, recursiveCount,
- type)); // call again for main method
+
+ result.Add(this.GenerateValue(generatedValue, repeatCount, recursiveCount, type)); // call again for main method
}
else
{
- result.Add(MakeIfExpression(recursiveCount,
- InvokeCreate(type, generatedValue, repeatCount, recursiveCount)));
+ result.Add(this.MakeIfExpression(recursiveCount, this.InvokeCreate(type, generatedValue, repeatCount, recursiveCount)));
}
+
return result.Count > 1 ? Expression.Block(result) : result.Single();
}
- private Expression InvokeCreate(Type type, Expression generatedValue, Expression repeatCount,
- Expression recursiveCount)
+ private Expression InvokeCreate(Type type, Expression generatedValue, Expression repeatCount, Expression recursiveCount)
{
- var mi = typeof(ExpressionTreeFixture).GetMethod(nameof(Create),
- new[] { typeof(Type), typeof(int), typeof(int) });
- return Expression.Assign(generatedValue,
+ MethodInfo mi = typeof(ExpressionTreeFixture).GetMethod(nameof(this.Create), new[] { typeof(Type), typeof(int), typeof(int) });
+ return Expression.Assign(
+ generatedValue,
Expression.Convert(
- Expression.Call(Expression.Constant(this), mi,
- new[] { Expression.Constant(type), repeatCount, recursiveCount }),
+ Expression.Call(Expression.Constant(this), mi, new[] { Expression.Constant(type), repeatCount, recursiveCount }),
generatedValue.Type));
}
private Expression MakeIfExpression(Expression recursiveCount, params Expression[] input)
{
- return Expression.IfThen(Expression.GreaterThanOrEqual(recursiveCount, Expression.Constant(0)),
+ return Expression.IfThen(
+ Expression.GreaterThanOrEqual(recursiveCount, Expression.Constant(0)),
input.Length > 1 ? Expression.Block(input) : input.Single());
}
private Expression MakeIfExpression(Expression recursiveCount, IList<Expression> input)
{
- return Expression.IfThen(Expression.GreaterThanOrEqual(recursiveCount, Expression.Constant(0)),
+ return Expression.IfThen(
+ Expression.GreaterThanOrEqual(recursiveCount, Expression.Constant(0)),
input.Count > 1 ? Expression.Block(input) : input.Single());
}
public T Create<T>(int repeatCount = 1, int recursiveCount = 1)
{
- return (T)Create(typeof(T), repeatCount, recursiveCount);
+ return (T)this.Create(typeof(T), repeatCount, recursiveCount);
}
public IEnumerable<T> CreateMany<T>(int count, int repeatCount = 1, int recursiveCount = 1)
{
- return CreateMany(typeof(T), count, repeatCount, recursiveCount).Cast<T>();
+ return this.CreateMany(typeof(T), count, repeatCount, recursiveCount).Cast<T>();
}
public IEnumerable<object> CreateMany(Type type, int count, int repeatCount = 1, int recursiveCount = 1)
{
- var functor = _functorCache.GetOrAdd(type, AddFunctor);
+ Func<int, int, object> functor = this.functorCache.GetOrAdd(type, this.AddFunctor);
for (var i = 0; i < count; i++)
{
yield return functor(repeatCount, recursiveCount);
@@ -224,20 +237,19 @@ namespace Benchmark.Fixture
public static Expression ForLoop(ParameterExpression index, Expression lengthExpression, Expression loopContent)
{
- var breakLabel = Expression.Label("LoopBreak");
- var length = Expression.Variable(typeof(int), "length");
- var block = Expression.Block(new[] { index, length },
+ LabelTarget breakLabel = Expression.Label("LoopBreak");
+ ParameterExpression length = Expression.Variable(typeof(int), "length");
+ BlockExpression block = Expression.Block(
+ new[] { index, length },
Expression.Assign(index, Expression.Constant(0)),
Expression.Assign(length, lengthExpression),
Expression.Loop(
Expression.IfThenElse(
Expression.LessThan(index, length),
Expression.Block(loopContent, Expression.PostIncrementAssign(index)),
- Expression.Break(breakLabel)
- ),
- breakLabel)
- );
+ Expression.Break(breakLabel)),
+ breakLabel));
return block;
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Fixture/FloatValueFixture.cs b/benchmark/SerializerBenchmark/Fixture/FloatValueFixture.cs
index c4ff9df7..2a88dcc3 100644
--- a/benchmark/SerializerBenchmark/Fixture/FloatValueFixture.cs
+++ b/benchmark/SerializerBenchmark/Fixture/FloatValueFixture.cs
@@ -1,15 +1,19 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System;
namespace Benchmark.Fixture
{
public class FloatValueFixture : IValueFixture
{
- private readonly Random _prng = new Random();
+ private readonly Random prng = new Random();
+
public Type Type { get; } = typeof(float);
public object Generate()
{
- return (float) _prng.Next() % 10000 + 0.5f;
+ return ((float)this.prng.Next() % 10000) + 0.5f;
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Fixture/GuidValueFixture.cs b/benchmark/SerializerBenchmark/Fixture/GuidValueFixture.cs
index 948e495f..7fcdf655 100644
--- a/benchmark/SerializerBenchmark/Fixture/GuidValueFixture.cs
+++ b/benchmark/SerializerBenchmark/Fixture/GuidValueFixture.cs
@@ -1,3 +1,6 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System;
namespace Benchmark.Fixture
@@ -11,4 +14,4 @@ namespace Benchmark.Fixture
return Guid.NewGuid();
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Fixture/IValueFixture.cs b/benchmark/SerializerBenchmark/Fixture/IValueFixture.cs
index b5128ccc..73d23d46 100644
--- a/benchmark/SerializerBenchmark/Fixture/IValueFixture.cs
+++ b/benchmark/SerializerBenchmark/Fixture/IValueFixture.cs
@@ -1,10 +1,14 @@
-using System;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
namespace Benchmark.Fixture
{
public interface IValueFixture
{
Type Type { get; }
+
object Generate();
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Fixture/IntValueFixture.cs b/benchmark/SerializerBenchmark/Fixture/IntValueFixture.cs
index 54a57f3d..1766d881 100644
--- a/benchmark/SerializerBenchmark/Fixture/IntValueFixture.cs
+++ b/benchmark/SerializerBenchmark/Fixture/IntValueFixture.cs
@@ -1,15 +1,19 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System;
namespace Benchmark.Fixture
{
public class IntValueFixture : IValueFixture
{
- private readonly Random _prng = new Random();
+ private readonly Random prng = new Random();
+
public Type Type { get; } = typeof(int);
public object Generate()
{
- return _prng.Next();
+ return this.prng.Next();
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Fixture/LongValueFixture.cs b/benchmark/SerializerBenchmark/Fixture/LongValueFixture.cs
index a0f0ebf4..ecc9df16 100644
--- a/benchmark/SerializerBenchmark/Fixture/LongValueFixture.cs
+++ b/benchmark/SerializerBenchmark/Fixture/LongValueFixture.cs
@@ -1,15 +1,19 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System;
namespace Benchmark.Fixture
{
public class LongValueFixture : IValueFixture
{
- private readonly Random _prng = new Random();
+ private readonly Random prng = new Random();
+
public Type Type { get; } = typeof(long);
public object Generate()
{
- return ((long) _prng.Next() << 32) | (uint) _prng.Next();
+ return ((long)this.prng.Next() << 32) | (uint)this.prng.Next();
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Fixture/OtherPrimitiveFixtures.cs b/benchmark/SerializerBenchmark/Fixture/OtherPrimitiveFixtures.cs
index 586b4614..b73b10e8 100644
--- a/benchmark/SerializerBenchmark/Fixture/OtherPrimitiveFixtures.cs
+++ b/benchmark/SerializerBenchmark/Fixture/OtherPrimitiveFixtures.cs
@@ -1,6 +1,11 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System;
using System.Runtime.CompilerServices;
+#pragma warning disable SA1649 // File name should match first type name
+
namespace Benchmark.Fixture
{
public delegate T Converter<T>(ReadOnlySpan<byte> buffer);
@@ -17,7 +22,7 @@ namespace Benchmark.Fixture
protected unsafe object GenerateBytes(Converter<T> converter)
{
Span<byte> buffer = stackalloc byte[sizeof(T)];
- rand.NextBytes(buffer);
+ this.rand.NextBytes(buffer);
return converter(buffer);
}
}
@@ -26,40 +31,41 @@ namespace Benchmark.Fixture
{
public override object Generate()
{
- return GenerateBytes(x => unchecked((sbyte)x[0]));
+ return this.GenerateBytes(x => unchecked((sbyte)x[0]));
}
}
public class UShortValueFixture : PrimitiveFixtureBase<ushort>
{
- public override object Generate() => GenerateBytes(BitConverter.ToUInt16);
+ public override object Generate() => this.GenerateBytes(BitConverter.ToUInt16);
}
public class UInt32ValueFixture : PrimitiveFixtureBase<UInt32>
{
- public override object Generate() => GenerateBytes(BitConverter.ToUInt32);
+ public override object Generate() => this.GenerateBytes(BitConverter.ToUInt32);
}
public class UInt64ValueFixture : PrimitiveFixtureBase<UInt64>
{
- public override object Generate() => GenerateBytes(BitConverter.ToUInt64);
+ public override object Generate() => this.GenerateBytes(BitConverter.ToUInt64);
}
public class CharValueFixture : PrimitiveFixtureBase<Char>
{
- public override object Generate() => GenerateBytes(BitConverter.ToChar);
+ public override object Generate() => this.GenerateBytes(BitConverter.ToChar);
}
public class ByteArrayFixture : IValueFixture
{
- private readonly Random _prng = new Random();
+ private readonly Random prng = new Random();
+
public Type Type { get; } = typeof(byte[]);
public object Generate()
{
var bytes = new byte[100];
- _prng.NextBytes(bytes);
+ this.prng.NextBytes(bytes);
return bytes;
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Fixture/ShortValueFixture.cs b/benchmark/SerializerBenchmark/Fixture/ShortValueFixture.cs
index fc75d0b5..2b621e1f 100644
--- a/benchmark/SerializerBenchmark/Fixture/ShortValueFixture.cs
+++ b/benchmark/SerializerBenchmark/Fixture/ShortValueFixture.cs
@@ -1,15 +1,19 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System;
namespace Benchmark.Fixture
{
public class ShortValueFixture : IValueFixture
{
- private readonly Random _prng = new Random();
+ private readonly Random prng = new Random();
+
public Type Type { get; } = typeof(short);
public object Generate()
{
- return (short) (_prng.Next() & 0xFFFF);
+ return (short)(this.prng.Next() & 0xFFFF);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Fixture/StringValueFixture.cs b/benchmark/SerializerBenchmark/Fixture/StringValueFixture.cs
index 17a74014..a16becbe 100644
--- a/benchmark/SerializerBenchmark/Fixture/StringValueFixture.cs
+++ b/benchmark/SerializerBenchmark/Fixture/StringValueFixture.cs
@@ -1,16 +1,19 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System;
namespace Benchmark.Fixture
{
public class StringValueFixture : IValueFixture
{
- private readonly Random _prng = new Random();
+ private readonly Random prng = new Random();
public Type Type { get; } = typeof(string);
public object Generate()
{
- return Generate(8);
+ return this.Generate(8);
}
private string Generate(int length)
@@ -19,9 +22,10 @@ namespace Benchmark.Fixture
var cArray = new char[length];
for (var i = 0; i < length; i++)
{
- cArray[i] = chars[_prng.Next(chars.Length)];
+ cArray[i] = chars[this.prng.Next(chars.Length)];
}
+
return new string(cArray);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/IGenericEquality.cs b/benchmark/SerializerBenchmark/IGenericEquality.cs
deleted file mode 100644
index ae24e6e0..00000000
--- a/benchmark/SerializerBenchmark/IGenericEquality.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace Benchmark
-{
- public interface IGenericEquality<in T>
- {
- bool Equals(T obj);
- bool EqualsDynamic(dynamic obj);
- }
-} \ No newline at end of file
diff --git a/benchmark/SerializerBenchmark/IGenericEquality`1.cs b/benchmark/SerializerBenchmark/IGenericEquality`1.cs
new file mode 100644
index 00000000..81500e3d
--- /dev/null
+++ b/benchmark/SerializerBenchmark/IGenericEquality`1.cs
@@ -0,0 +1,12 @@
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+namespace Benchmark
+{
+ public interface IGenericEquality<in T>
+ {
+ bool Equals(T obj);
+
+ bool EqualsDynamic(dynamic obj);
+ }
+}
diff --git a/benchmark/SerializerBenchmark/Models/AccessToken.cs b/benchmark/SerializerBenchmark/Models/AccessToken.cs
index adde978b..a4884aab 100644
--- a/benchmark/SerializerBenchmark/Models/AccessToken.cs
+++ b/benchmark/SerializerBenchmark/Models/AccessToken.cs
@@ -1,4 +1,7 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
using System;
@@ -10,34 +13,34 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class AccessToken : IGenericEquality<AccessToken>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public string access_token { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public DateTime? expires_on_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public int? account_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public List<string> scope { get; set; }
public bool Equals(AccessToken obj)
{
return
- access_token.TrueEqualsString(obj.access_token) ||
- expires_on_date.TrueEquals(obj.expires_on_date) ||
- account_id.TrueEquals(obj.account_id) ||
- scope.TrueEqualsString(obj.scope);
+ this.access_token.TrueEqualsString(obj.access_token) ||
+ this.expires_on_date.TrueEquals(obj.expires_on_date) ||
+ this.account_id.TrueEquals(obj.account_id) ||
+ this.scope.TrueEqualsString(obj.scope);
}
public bool EqualsDynamic(dynamic obj)
{
return
- access_token.TrueEqualsString((string)obj.access_token) ||
- expires_on_date.TrueEquals((DateTime?)obj.expires_on_date) ||
- account_id.TrueEquals((int?)obj.account_id) ||
- scope.TrueEqualsString((IEnumerable<string>)obj.scope);
+ this.access_token.TrueEqualsString((string)obj.access_token) ||
+ this.expires_on_date.TrueEquals((DateTime?)obj.expires_on_date) ||
+ this.account_id.TrueEquals((int?)obj.account_id) ||
+ this.scope.TrueEqualsString((IEnumerable<string>)obj.scope);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/AccountMerge.cs b/benchmark/SerializerBenchmark/Models/AccountMerge.cs
index 32a4fcab..e3ab8629 100644
--- a/benchmark/SerializerBenchmark/Models/AccountMerge.cs
+++ b/benchmark/SerializerBenchmark/Models/AccountMerge.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using ProtoBuf;
@@ -8,29 +12,29 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class AccountMerge : IGenericEquality<AccountMerge>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? old_account_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public int? new_account_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public DateTime? merge_date { get; set; }
public bool Equals(AccountMerge obj)
{
return
- old_account_id.TrueEquals(obj.old_account_id) &&
- new_account_id.TrueEquals(obj.new_account_id) &&
- merge_date.TrueEquals(obj.merge_date);
+ this.old_account_id.TrueEquals(obj.old_account_id) &&
+ this.new_account_id.TrueEquals(obj.new_account_id) &&
+ this.merge_date.TrueEquals(obj.merge_date);
}
public bool EqualsDynamic(dynamic obj)
{
return
- old_account_id.TrueEquals((int?) obj.old_account_id) &&
- new_account_id.TrueEquals((int?) obj.new_account_id) &&
- merge_date.TrueEquals((DateTime?) obj.merge_date);
+ this.old_account_id.TrueEquals((int?)obj.old_account_id) &&
+ this.new_account_id.TrueEquals((int?)obj.new_account_id) &&
+ this.merge_date.TrueEquals((DateTime?)obj.merge_date);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/Answer.cs b/benchmark/SerializerBenchmark/Models/Answer.cs
index ec0464b6..1462867d 100644
--- a/benchmark/SerializerBenchmark/Models/Answer.cs
+++ b/benchmark/SerializerBenchmark/Models/Answer.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using System.Collections.Generic;
using ProtoBuf;
@@ -9,134 +13,134 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class Answer : IGenericEquality<Answer>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? question_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public int? answer_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public DateTime? locked_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public DateTime? creation_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public DateTime? last_edit_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public DateTime? last_activity_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public int? score { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public DateTime? community_owned_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public bool? is_accepted { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public string body { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
public ShallowUser owner { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
public string title { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
public int? up_vote_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
public int? down_vote_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(15), oldmsgpack::MessagePack.Key(15 - 1), newmsgpack::MessagePack.Key(15 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(15), oldmsgpack::MessagePack.Key(15 - 1), newmsgpack::MessagePack.Key(15 - 1)]
public List<Comment> comments { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(16), oldmsgpack::MessagePack.Key(16 - 1), newmsgpack::MessagePack.Key(16 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(16), oldmsgpack::MessagePack.Key(16 - 1), newmsgpack::MessagePack.Key(16 - 1)]
public string link { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(17), oldmsgpack::MessagePack.Key(17 - 1), newmsgpack::MessagePack.Key(17 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(17), oldmsgpack::MessagePack.Key(17 - 1), newmsgpack::MessagePack.Key(17 - 1)]
public List<string> tags { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(18), oldmsgpack::MessagePack.Key(18 - 1), newmsgpack::MessagePack.Key(18 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(18), oldmsgpack::MessagePack.Key(18 - 1), newmsgpack::MessagePack.Key(18 - 1)]
public bool? upvoted { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(19), oldmsgpack::MessagePack.Key(19 - 1), newmsgpack::MessagePack.Key(19 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(19), oldmsgpack::MessagePack.Key(19 - 1), newmsgpack::MessagePack.Key(19 - 1)]
public bool? downvoted { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(20), oldmsgpack::MessagePack.Key(20 - 1), newmsgpack::MessagePack.Key(20 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(20), oldmsgpack::MessagePack.Key(20 - 1), newmsgpack::MessagePack.Key(20 - 1)]
public bool? accepted { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(21), oldmsgpack::MessagePack.Key(21 - 1), newmsgpack::MessagePack.Key(21 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(21), oldmsgpack::MessagePack.Key(21 - 1), newmsgpack::MessagePack.Key(21 - 1)]
public ShallowUser last_editor { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(22), oldmsgpack::MessagePack.Key(22 - 1), newmsgpack::MessagePack.Key(22 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(22), oldmsgpack::MessagePack.Key(22 - 1), newmsgpack::MessagePack.Key(22 - 1)]
public int? comment_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(23), oldmsgpack::MessagePack.Key(23 - 1), newmsgpack::MessagePack.Key(23 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(23), oldmsgpack::MessagePack.Key(23 - 1), newmsgpack::MessagePack.Key(23 - 1)]
public string body_markdown { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(24), oldmsgpack::MessagePack.Key(24 - 1), newmsgpack::MessagePack.Key(24 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(24), oldmsgpack::MessagePack.Key(24 - 1), newmsgpack::MessagePack.Key(24 - 1)]
public string share_link { get; set; }
public bool Equals(Answer obj)
{
return
- accepted.TrueEquals(obj.accepted) &&
- answer_id.TrueEquals(obj.answer_id) &&
- body.TrueEqualsString(obj.body) &&
- body_markdown.TrueEqualsString(obj.body_markdown) &&
- comment_count.TrueEquals(obj.comment_count) &&
- comments.TrueEqualsList(obj.comments) &&
- community_owned_date.TrueEquals(obj.community_owned_date) &&
- creation_date.TrueEquals(obj.creation_date) &&
- down_vote_count.TrueEquals(obj.down_vote_count) &&
- downvoted.TrueEquals(obj.downvoted) &&
- is_accepted.TrueEquals(obj.is_accepted) &&
- last_activity_date.TrueEquals(obj.last_activity_date) &&
- last_edit_date.TrueEquals(obj.last_edit_date) &&
- last_editor.TrueEquals(obj.last_editor) &&
- link.TrueEqualsString(obj.link) &&
- locked_date.TrueEquals(obj.locked_date) &&
- owner.TrueEquals(obj.owner) &&
- question_id.TrueEquals(obj.question_id) &&
- score.TrueEquals(obj.score) &&
- share_link.TrueEqualsString(obj.share_link) &&
- tags.TrueEqualsString(obj.tags) &&
- title.TrueEqualsString(obj.title) &&
- up_vote_count.TrueEquals(obj.up_vote_count) &&
- upvoted.TrueEquals(obj.upvoted);
+ this.accepted.TrueEquals(obj.accepted) &&
+ this.answer_id.TrueEquals(obj.answer_id) &&
+ this.body.TrueEqualsString(obj.body) &&
+ this.body_markdown.TrueEqualsString(obj.body_markdown) &&
+ this.comment_count.TrueEquals(obj.comment_count) &&
+ this.comments.TrueEqualsList(obj.comments) &&
+ this.community_owned_date.TrueEquals(obj.community_owned_date) &&
+ this.creation_date.TrueEquals(obj.creation_date) &&
+ this.down_vote_count.TrueEquals(obj.down_vote_count) &&
+ this.downvoted.TrueEquals(obj.downvoted) &&
+ this.is_accepted.TrueEquals(obj.is_accepted) &&
+ this.last_activity_date.TrueEquals(obj.last_activity_date) &&
+ this.last_edit_date.TrueEquals(obj.last_edit_date) &&
+ this.last_editor.TrueEquals(obj.last_editor) &&
+ this.link.TrueEqualsString(obj.link) &&
+ this.locked_date.TrueEquals(obj.locked_date) &&
+ this.owner.TrueEquals(obj.owner) &&
+ this.question_id.TrueEquals(obj.question_id) &&
+ this.score.TrueEquals(obj.score) &&
+ this.share_link.TrueEqualsString(obj.share_link) &&
+ this.tags.TrueEqualsString(obj.tags) &&
+ this.title.TrueEqualsString(obj.title) &&
+ this.up_vote_count.TrueEquals(obj.up_vote_count) &&
+ this.upvoted.TrueEquals(obj.upvoted);
}
public bool EqualsDynamic(dynamic obj)
{
return
- accepted.TrueEquals((bool?) obj.accepted) &&
- answer_id.TrueEquals((int?) obj.answer_id) &&
- body.TrueEqualsString((string) obj.body) &&
- body_markdown.TrueEqualsString((string) obj.body_markdown) &&
- comment_count.TrueEquals((int?) obj.comment_count) &&
- comments.TrueEqualsListDynamic((IEnumerable<dynamic>) obj.comments) &&
- community_owned_date.TrueEquals((DateTime?) obj.community_owned_date) &&
- creation_date.TrueEquals((DateTime?) obj.creation_date) &&
- down_vote_count.TrueEquals((int?) obj.down_vote_count) &&
- downvoted.TrueEquals((bool?) obj.downvoted) &&
- is_accepted.TrueEquals((bool?) obj.is_accepted) &&
- last_activity_date.TrueEquals((DateTime?) obj.last_activity_date) &&
- last_edit_date.TrueEquals((DateTime?) obj.last_edit_date) &&
- (last_editor == null && obj.last_editor == null || last_editor.EqualsDynamic(obj.last_editor)) &&
- link.TrueEqualsString((string) obj.link) &&
- locked_date.TrueEquals((DateTime?) obj.locked_date) &&
- (owner == null && obj.owner == null || owner.EqualsDynamic(obj.owner)) &&
- question_id.TrueEquals((int?) obj.question_id) &&
- score.TrueEquals((int?) obj.score) &&
- share_link.TrueEqualsString((string) obj.share_link) &&
- tags.TrueEqualsString((IEnumerable<string>) obj.tags) &&
- title.TrueEqualsString((string) obj.title) &&
- up_vote_count.TrueEquals((int?) obj.up_vote_count) &&
- upvoted.TrueEquals((bool?) obj.upvoted);
+ this.accepted.TrueEquals((bool?)obj.accepted) &&
+ this.answer_id.TrueEquals((int?)obj.answer_id) &&
+ this.body.TrueEqualsString((string)obj.body) &&
+ this.body_markdown.TrueEqualsString((string)obj.body_markdown) &&
+ this.comment_count.TrueEquals((int?)obj.comment_count) &&
+ this.comments.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.comments) &&
+ this.community_owned_date.TrueEquals((DateTime?)obj.community_owned_date) &&
+ this.creation_date.TrueEquals((DateTime?)obj.creation_date) &&
+ this.down_vote_count.TrueEquals((int?)obj.down_vote_count) &&
+ this.downvoted.TrueEquals((bool?)obj.downvoted) &&
+ this.is_accepted.TrueEquals((bool?)obj.is_accepted) &&
+ this.last_activity_date.TrueEquals((DateTime?)obj.last_activity_date) &&
+ this.last_edit_date.TrueEquals((DateTime?)obj.last_edit_date) &&
+ ((this.last_editor == null && obj.last_editor == null) || this.last_editor.EqualsDynamic(obj.last_editor)) &&
+ this.link.TrueEqualsString((string)obj.link) &&
+ this.locked_date.TrueEquals((DateTime?)obj.locked_date) &&
+ ((this.owner == null && obj.owner == null) || this.owner.EqualsDynamic(obj.owner)) &&
+ this.question_id.TrueEquals((int?)obj.question_id) &&
+ this.score.TrueEquals((int?)obj.score) &&
+ this.share_link.TrueEqualsString((string)obj.share_link) &&
+ this.tags.TrueEqualsString((IEnumerable<string>)obj.tags) &&
+ this.title.TrueEqualsString((string)obj.title) &&
+ this.up_vote_count.TrueEquals((int?)obj.up_vote_count) &&
+ this.upvoted.TrueEquals((bool?)obj.upvoted);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/Badge.cs b/benchmark/SerializerBenchmark/Models/Badge.cs
index 8cfa5b67..fbe6d9d5 100644
--- a/benchmark/SerializerBenchmark/Models/Badge.cs
+++ b/benchmark/SerializerBenchmark/Models/Badge.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using ProtoBuf;
namespace Benchmark.Models
@@ -8,66 +12,66 @@ namespace Benchmark.Models
{
bronze = 3,
silver = 2,
- gold = 1
+ gold = 1,
}
public enum BadgeType
{
named = 1,
- tag_based = 2
+ tag_based = 2,
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class Badge : IGenericEquality<Badge>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? badge_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public BadgeRank? rank { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public string name { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public string description { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public int? award_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public BadgeType? badge_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public ShallowUser user { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public string link { get; set; }
public bool Equals(Badge obj)
{
return
- award_count.TrueEquals(obj.award_count) &&
- badge_id.TrueEquals(obj.badge_id) &&
- badge_type.TrueEquals(obj.badge_type) &&
- description.TrueEqualsString(obj.description) &&
- link.TrueEqualsString(obj.link) &&
- name.TrueEqualsString(obj.name) &&
- rank.TrueEquals(obj.rank) &&
- user.TrueEquals(obj.user);
+ this.award_count.TrueEquals(obj.award_count) &&
+ this.badge_id.TrueEquals(obj.badge_id) &&
+ this.badge_type.TrueEquals(obj.badge_type) &&
+ this.description.TrueEqualsString(obj.description) &&
+ this.link.TrueEqualsString(obj.link) &&
+ this.name.TrueEqualsString(obj.name) &&
+ this.rank.TrueEquals(obj.rank) &&
+ this.user.TrueEquals(obj.user);
}
public bool EqualsDynamic(dynamic obj)
{
return
- award_count.TrueEquals((int?) obj.award_count) &&
- badge_id.TrueEquals((int?) obj.badge_id) &&
- badge_type.TrueEquals((BadgeType?) obj.badge_type) &&
- description.TrueEqualsString((string) obj.description) &&
- link.TrueEqualsString((string) obj.link) &&
- name.TrueEqualsString((string) obj.name) &&
- rank.TrueEquals((BadgeRank?) obj.rank) &&
- (user == null && obj.user == null || user.EqualsDynamic(obj.user));
+ this.award_count.TrueEquals((int?)obj.award_count) &&
+ this.badge_id.TrueEquals((int?)obj.badge_id) &&
+ this.badge_type.TrueEquals((BadgeType?)obj.badge_type) &&
+ this.description.TrueEqualsString((string)obj.description) &&
+ this.link.TrueEqualsString((string)obj.link) &&
+ this.name.TrueEqualsString((string)obj.name) &&
+ this.rank.TrueEquals((BadgeRank?)obj.rank) &&
+ ((this.user == null && obj.user == null) || this.user.EqualsDynamic(obj.user));
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/Comment.cs b/benchmark/SerializerBenchmark/Models/Comment.cs
index 8daf4aba..c2c36d2c 100644
--- a/benchmark/SerializerBenchmark/Models/Comment.cs
+++ b/benchmark/SerializerBenchmark/Models/Comment.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using ProtoBuf;
@@ -8,81 +12,81 @@ namespace Benchmark.Models
public enum PostType : byte
{
question = 1,
- answer = 2
+ answer = 2,
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class Comment : IGenericEquality<Comment>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? comment_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public int? post_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public DateTime? creation_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public PostType? post_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public int? score { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public bool? edited { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public string body { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public ShallowUser owner { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public ShallowUser reply_to_user { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public string link { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
public string body_markdown { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
public bool? upvoted { get; set; }
public bool Equals(Comment obj)
{
return
- body.TrueEqualsString(obj.body) &&
- body_markdown.TrueEqualsString(obj.body_markdown) &&
- comment_id.TrueEquals(obj.comment_id) &&
- creation_date.TrueEquals(obj.creation_date) &&
- edited.TrueEquals(obj.edited) &&
- link.TrueEqualsString(obj.link) &&
- owner.TrueEquals(obj.owner) &&
- post_id.TrueEquals(obj.post_id) &&
- post_type.TrueEquals(obj.post_type) &&
- reply_to_user.TrueEquals(obj.reply_to_user) &&
- score.TrueEquals(obj.score) &&
- upvoted.TrueEquals(obj.upvoted);
+ this.body.TrueEqualsString(obj.body) &&
+ this.body_markdown.TrueEqualsString(obj.body_markdown) &&
+ this.comment_id.TrueEquals(obj.comment_id) &&
+ this.creation_date.TrueEquals(obj.creation_date) &&
+ this.edited.TrueEquals(obj.edited) &&
+ this.link.TrueEqualsString(obj.link) &&
+ this.owner.TrueEquals(obj.owner) &&
+ this.post_id.TrueEquals(obj.post_id) &&
+ this.post_type.TrueEquals(obj.post_type) &&
+ this.reply_to_user.TrueEquals(obj.reply_to_user) &&
+ this.score.TrueEquals(obj.score) &&
+ this.upvoted.TrueEquals(obj.upvoted);
}
public bool EqualsDynamic(dynamic obj)
{
return
- body.TrueEqualsString((string) obj.body) &&
- body_markdown.TrueEqualsString((string) obj.body_markdown) &&
- comment_id.TrueEquals((int?) obj.comment_id) &&
- creation_date.TrueEquals((DateTime?) obj.creation_date) &&
- edited.TrueEquals((bool?) obj.edited) &&
- link.TrueEqualsString((string) obj.link) &&
- (owner == null && obj.owner == null || owner.EqualsDynamic(obj.owner)) &&
- post_id.TrueEquals((int?) obj.post_id) &&
- post_type.TrueEquals((PostType?) obj.post_type) &&
- (reply_to_user == null && obj.reply_to_user == null ||
- reply_to_user.EqualsDynamic(obj.reply_to_user)) &&
- score.TrueEquals((int?) obj.score) &&
- upvoted.TrueEquals((bool?) obj.upvoted);
+ this.body.TrueEqualsString((string)obj.body) &&
+ this.body_markdown.TrueEqualsString((string)obj.body_markdown) &&
+ this.comment_id.TrueEquals((int?)obj.comment_id) &&
+ this.creation_date.TrueEquals((DateTime?)obj.creation_date) &&
+ this.edited.TrueEquals((bool?)obj.edited) &&
+ this.link.TrueEqualsString((string)obj.link) &&
+ ((this.owner == null && obj.owner == null) || this.owner.EqualsDynamic(obj.owner)) &&
+ this.post_id.TrueEquals((int?)obj.post_id) &&
+ this.post_type.TrueEquals((PostType?)obj.post_type) &&
+ ((this.reply_to_user == null && obj.reply_to_user == null) ||
+ this.reply_to_user.EqualsDynamic(obj.reply_to_user)) &&
+ this.score.TrueEquals((int?)obj.score) &&
+ this.upvoted.TrueEquals((bool?)obj.upvoted);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/Error.cs b/benchmark/SerializerBenchmark/Models/Error.cs
index c0ace9c3..1137cd9d 100644
--- a/benchmark/SerializerBenchmark/Models/Error.cs
+++ b/benchmark/SerializerBenchmark/Models/Error.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using ProtoBuf;
namespace Benchmark.Models
@@ -7,29 +11,29 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class Error : IGenericEquality<Error>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? error_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public string error_name { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public string description { get; set; }
public bool Equals(Error obj)
{
return
- error_id.TrueEquals(obj.error_id) &&
- error_name.TrueEqualsString(obj.error_name) &&
- description.TrueEqualsString(obj.description);
+ this.error_id.TrueEquals(obj.error_id) &&
+ this.error_name.TrueEqualsString(obj.error_name) &&
+ this.description.TrueEqualsString(obj.description);
}
public bool EqualsDynamic(dynamic obj)
{
return
- error_id.TrueEquals((int?) obj.error_id) &&
- error_name.TrueEqualsString((string) obj.error_name) &&
- description.TrueEqualsString((string) obj.description);
+ this.error_id.TrueEquals((int?)obj.error_id) &&
+ this.error_name.TrueEqualsString((string)obj.error_name) &&
+ this.description.TrueEqualsString((string)obj.description);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/Event.cs b/benchmark/SerializerBenchmark/Models/Event.cs
index 488768dc..570e08ad 100644
--- a/benchmark/SerializerBenchmark/Models/Event.cs
+++ b/benchmark/SerializerBenchmark/Models/Event.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using ProtoBuf;
@@ -11,45 +15,45 @@ namespace Benchmark.Models
answer_posted = 2,
comment_posted = 3,
post_edited = 4,
- user_created = 5
+ user_created = 5,
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class Event : IGenericEquality<Event>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public EventType? event_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public int? event_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public DateTime? creation_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public string link { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public string excerpt { get; set; }
public bool Equals(Event obj)
{
return
- creation_date.TrueEquals(obj.creation_date) &&
- event_id.TrueEquals(obj.event_id) &&
- event_type.TrueEquals(obj.event_type) &&
- excerpt.TrueEqualsString(obj.excerpt) &&
- link.TrueEqualsString(obj.link);
+ this.creation_date.TrueEquals(obj.creation_date) &&
+ this.event_id.TrueEquals(obj.event_id) &&
+ this.event_type.TrueEquals(obj.event_type) &&
+ this.excerpt.TrueEqualsString(obj.excerpt) &&
+ this.link.TrueEqualsString(obj.link);
}
public bool EqualsDynamic(dynamic obj)
{
return
- creation_date.TrueEquals((DateTime?) obj.creation_date) &&
- event_id.TrueEquals((int?) obj.event_id) &&
- event_type.TrueEquals((EventType?) obj.event_type) &&
- excerpt.TrueEqualsString((string) obj.excerpt) &&
- link.TrueEqualsString((string) obj.link);
+ this.creation_date.TrueEquals((DateTime?)obj.creation_date) &&
+ this.event_id.TrueEquals((int?)obj.event_id) &&
+ this.event_type.TrueEquals((EventType?)obj.event_type) &&
+ this.excerpt.TrueEqualsString((string)obj.excerpt) &&
+ this.link.TrueEqualsString((string)obj.link);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/Feed.cs b/benchmark/SerializerBenchmark/Models/Feed.cs
index 7640ecdf..d18af036 100644
--- a/benchmark/SerializerBenchmark/Models/Feed.cs
+++ b/benchmark/SerializerBenchmark/Models/Feed.cs
@@ -1,291 +1,298 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System.Collections.Generic;
using ProtoBuf;
+#pragma warning disable SA1649 // File name should match first type name
+
namespace Benchmark.Models
{
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class MobileFeed : IGenericEquality<MobileFeed>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public List<MobileQuestion> hot_questions { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public List<MobileInboxItem> inbox_items { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public List<MobileQuestion> likely_to_answer_questions { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public List<MobileRepChange> reputation_events { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public List<MobileQuestion> cross_site_interesting_questions { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public List<MobileBadgeAward> badges { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public List<MobilePrivilege> earned_privileges { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public List<MobilePrivilege> upcoming_privileges { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public List<MobileCommunityBulletin> community_bulletins { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public List<MobileAssociationBonus> association_bonuses { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
public List<MobileCareersJobAd> careers_job_ads { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
public List<MobileBannerAd> banner_ads { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
public long? before { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
public long? since { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(15), oldmsgpack::MessagePack.Key(15 - 1), newmsgpack::MessagePack.Key(15 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(15), oldmsgpack::MessagePack.Key(15 - 1), newmsgpack::MessagePack.Key(15 - 1)]
public int? account_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(16), oldmsgpack::MessagePack.Key(16 - 1), newmsgpack::MessagePack.Key(16 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(16), oldmsgpack::MessagePack.Key(16 - 1), newmsgpack::MessagePack.Key(16 - 1)]
public MobileUpdateNotice update_notice { get; set; }
public bool Equals(MobileFeed obj)
{
return
- account_id == obj.account_id &&
- association_bonuses.TrueEqualsList(obj.association_bonuses) &&
- badges.TrueEqualsList(obj.badges) &&
- banner_ads.TrueEqualsList(obj.banner_ads) &&
- before == obj.before &&
- careers_job_ads.TrueEqualsList(obj.careers_job_ads) &&
- community_bulletins.TrueEqualsList(obj.community_bulletins) &&
- cross_site_interesting_questions.TrueEqualsList(obj.cross_site_interesting_questions) &&
- earned_privileges.TrueEqualsList(obj.earned_privileges) &&
- hot_questions.TrueEqualsList(obj.hot_questions) &&
- inbox_items.TrueEqualsList(obj.inbox_items) &&
- likely_to_answer_questions.TrueEqualsList(obj.likely_to_answer_questions) &&
- reputation_events.TrueEqualsList(obj.reputation_events) &&
- since == obj.since &&
- upcoming_privileges.TrueEqualsList(obj.upcoming_privileges) &&
- update_notice.TrueEquals(obj.update_notice);
+ this.account_id == obj.account_id &&
+ this.association_bonuses.TrueEqualsList(obj.association_bonuses) &&
+ this.badges.TrueEqualsList(obj.badges) &&
+ this.banner_ads.TrueEqualsList(obj.banner_ads) &&
+ this.before == obj.before &&
+ this.careers_job_ads.TrueEqualsList(obj.careers_job_ads) &&
+ this.community_bulletins.TrueEqualsList(obj.community_bulletins) &&
+ this.cross_site_interesting_questions.TrueEqualsList(obj.cross_site_interesting_questions) &&
+ this.earned_privileges.TrueEqualsList(obj.earned_privileges) &&
+ this.hot_questions.TrueEqualsList(obj.hot_questions) &&
+ this.inbox_items.TrueEqualsList(obj.inbox_items) &&
+ this.likely_to_answer_questions.TrueEqualsList(obj.likely_to_answer_questions) &&
+ this.reputation_events.TrueEqualsList(obj.reputation_events) &&
+ this.since == obj.since &&
+ this.upcoming_privileges.TrueEqualsList(obj.upcoming_privileges) &&
+ this.update_notice.TrueEquals(obj.update_notice);
}
public bool EqualsDynamic(dynamic obj)
{
return
- account_id == (int?) obj.account_id &&
- association_bonuses.TrueEqualsListDynamic((IEnumerable<dynamic>) obj.association_bonuses) &&
- badges.TrueEqualsListDynamic((IEnumerable<dynamic>) obj.badges) &&
- banner_ads.TrueEqualsListDynamic((IEnumerable<dynamic>) obj.banner_ads) &&
- before == (long?) obj.before &&
- careers_job_ads.TrueEqualsListDynamic((IEnumerable<dynamic>) obj.careers_job_ads) &&
- community_bulletins.TrueEqualsListDynamic((IEnumerable<dynamic>) obj.community_bulletins) &&
- cross_site_interesting_questions.TrueEqualsListDynamic(
- (IEnumerable<dynamic>) obj.cross_site_interesting_questions) &&
- earned_privileges.TrueEqualsListDynamic((IEnumerable<dynamic>) obj.earned_privileges) &&
- hot_questions.TrueEqualsListDynamic((IEnumerable<dynamic>) obj.hot_questions) &&
- inbox_items.TrueEqualsListDynamic((IEnumerable<dynamic>) obj.inbox_items) &&
- likely_to_answer_questions.TrueEqualsListDynamic(
- (IEnumerable<dynamic>) obj.likely_to_answer_questions) &&
- reputation_events.TrueEqualsListDynamic((IEnumerable<dynamic>) obj.reputation_events) &&
- since == (long?) obj.since &&
- upcoming_privileges.TrueEqualsListDynamic((IEnumerable<dynamic>) obj.upcoming_privileges) &&
- (update_notice == null && obj.update_notice == null || update_notice.EqualsDynamic(obj.update_notice));
+ this.account_id == (int?)obj.account_id &&
+ this.association_bonuses.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.association_bonuses) &&
+ this.badges.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.badges) &&
+ this.banner_ads.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.banner_ads) &&
+ this.before == (long?)obj.before &&
+ this.careers_job_ads.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.careers_job_ads) &&
+ this.community_bulletins.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.community_bulletins) &&
+ this.cross_site_interesting_questions.TrueEqualsListDynamic(
+ (IEnumerable<dynamic>)obj.cross_site_interesting_questions) &&
+ this.earned_privileges.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.earned_privileges) &&
+ this.hot_questions.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.hot_questions) &&
+ this.inbox_items.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.inbox_items) &&
+ this.likely_to_answer_questions.TrueEqualsListDynamic(
+ (IEnumerable<dynamic>)obj.likely_to_answer_questions) &&
+ this.reputation_events.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.reputation_events) &&
+ this.since == (long?)obj.since &&
+ this.upcoming_privileges.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.upcoming_privileges) &&
+ ((this.update_notice == null && obj.update_notice == null) || this.update_notice.EqualsDynamic(obj.update_notice));
}
}
public interface IMobileFeedBase<T> : IGenericEquality<T>
{
int? group_id { get; set; }
+
long? added_date { get; set; }
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public sealed class MobileQuestion : IMobileFeedBase<MobileQuestion>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public int? question_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public long? question_creation_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public string title { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public long? last_activity_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public List<string> tags { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public string site { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public bool? is_deleted { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public bool? has_accepted_answer { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
public int? answer_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? group_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public long? added_date { get; set; }
public bool Equals(MobileQuestion obj)
{
return
- added_date == obj.added_date &&
- answer_count == obj.answer_count &&
- group_id == obj.group_id &&
- has_accepted_answer == obj.has_accepted_answer &&
- is_deleted == obj.is_deleted &&
- last_activity_date == obj.last_activity_date &&
- question_creation_date == obj.question_creation_date &&
- question_id == obj.question_id &&
- site == obj.site &&
- tags.TrueEqualsString(obj.tags) &&
- title == obj.title;
+ this.added_date == obj.added_date &&
+ this.answer_count == obj.answer_count &&
+ this.group_id == obj.group_id &&
+ this.has_accepted_answer == obj.has_accepted_answer &&
+ this.is_deleted == obj.is_deleted &&
+ this.last_activity_date == obj.last_activity_date &&
+ this.question_creation_date == obj.question_creation_date &&
+ this.question_id == obj.question_id &&
+ this.site == obj.site &&
+ this.tags.TrueEqualsString(obj.tags) &&
+ this.title == obj.title;
}
public bool EqualsDynamic(dynamic obj)
{
return
- added_date == (long?) obj.added_date &&
- answer_count == (int?) obj.answer_count &&
- group_id == (int?) obj.group_id &&
- has_accepted_answer == (bool?) obj.has_accepted_answer &&
- is_deleted == (bool?) obj.is_deleted &&
- last_activity_date == (long?) obj.last_activity_date &&
- question_creation_date == (long?) obj.question_creation_date &&
- question_id == (int?) obj.question_id &&
- site == (string) obj.site &&
- tags.TrueEqualsString((IEnumerable<string>) obj.tags) &&
- title == (string) obj.title;
+ this.added_date == (long?)obj.added_date &&
+ this.answer_count == (int?)obj.answer_count &&
+ this.group_id == (int?)obj.group_id &&
+ this.has_accepted_answer == (bool?)obj.has_accepted_answer &&
+ this.is_deleted == (bool?)obj.is_deleted &&
+ this.last_activity_date == (long?)obj.last_activity_date &&
+ this.question_creation_date == (long?)obj.question_creation_date &&
+ this.question_id == (int?)obj.question_id &&
+ this.site == (string)obj.site &&
+ this.tags.TrueEqualsString((IEnumerable<string>)obj.tags) &&
+ this.title == (string)obj.title;
}
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public sealed class MobileRepChange : IMobileFeedBase<MobileRepChange>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public string site { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public string title { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public string link { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public int? rep_change { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? group_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public long? added_date { get; set; }
public bool Equals(MobileRepChange obj)
{
return
- added_date == obj.added_date &&
- group_id == obj.group_id &&
- link == obj.link &&
- rep_change == obj.rep_change &&
- site == obj.site &&
- title == obj.title;
+ this.added_date == obj.added_date &&
+ this.group_id == obj.group_id &&
+ this.link == obj.link &&
+ this.rep_change == obj.rep_change &&
+ this.site == obj.site &&
+ this.title == obj.title;
}
public bool EqualsDynamic(dynamic obj)
{
return
- added_date == (long?) obj.added_date &&
- group_id == (int?) obj.group_id &&
- link == (string) obj.link &&
- rep_change == (int?) obj.rep_change &&
- site == (string) obj.site &&
- title == (string) obj.title;
+ this.added_date == (long?)obj.added_date &&
+ this.group_id == (int?)obj.group_id &&
+ this.link == (string)obj.link &&
+ this.rep_change == (int?)obj.rep_change &&
+ this.site == (string)obj.site &&
+ this.title == (string)obj.title;
}
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public sealed class MobileInboxItem : IMobileFeedBase<MobileInboxItem>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public int? answer_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public string body { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public int? comment_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public long? creation_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public string item_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public string link { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public int? question_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public string title { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
public string site { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? group_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public long? added_date { get; set; }
public bool Equals(MobileInboxItem obj)
{
return
- added_date == obj.added_date &&
- answer_id == obj.answer_id &&
- body == obj.body &&
- comment_id == obj.comment_id &&
- creation_date == obj.creation_date &&
- group_id == obj.group_id &&
- item_type == obj.item_type &&
- link == obj.link &&
- question_id == obj.question_id &&
- site == obj.site &&
- title == obj.title;
+ this.added_date == obj.added_date &&
+ this.answer_id == obj.answer_id &&
+ this.body == obj.body &&
+ this.comment_id == obj.comment_id &&
+ this.creation_date == obj.creation_date &&
+ this.group_id == obj.group_id &&
+ this.item_type == obj.item_type &&
+ this.link == obj.link &&
+ this.question_id == obj.question_id &&
+ this.site == obj.site &&
+ this.title == obj.title;
}
public bool EqualsDynamic(dynamic obj)
{
return
- added_date == (long?) obj.added_date &&
- answer_id == (int?) obj.answer_id &&
- body == (string) obj.body &&
- comment_id == (int?) obj.comment_id &&
- creation_date == (long?) obj.creation_date &&
- group_id == (int?) obj.group_id &&
- item_type == (string) obj.item_type &&
- link == (string) obj.link &&
- question_id == (int?) obj.question_id &&
- site == (string) obj.site &&
- title == (string) obj.title;
+ this.added_date == (long?)obj.added_date &&
+ this.answer_id == (int?)obj.answer_id &&
+ this.body == (string)obj.body &&
+ this.comment_id == (int?)obj.comment_id &&
+ this.creation_date == (long?)obj.creation_date &&
+ this.group_id == (int?)obj.group_id &&
+ this.item_type == (string)obj.item_type &&
+ this.link == (string)obj.link &&
+ this.question_id == (int?)obj.question_id &&
+ this.site == (string)obj.site &&
+ this.title == (string)obj.title;
}
}
@@ -296,127 +303,127 @@ namespace Benchmark.Models
{
bronze = 1,
silver = 2,
- gold = 3
+ gold = 3,
}
public enum BadgeType
{
named = 1,
- tag_based = 2
+ tag_based = 2,
}
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public string site { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public string badge_name { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public string badge_description { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public int? badge_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public int? post_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public string link { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public BadgeRank? rank { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public BadgeType? badge_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? group_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public long? added_date { get; set; }
public bool Equals(MobileBadgeAward obj)
{
return
- added_date == obj.added_date &&
- badge_description == obj.badge_description &&
- badge_id == obj.badge_id &&
- badge_name == obj.badge_name &&
- badge_type == obj.badge_type &&
- group_id == obj.group_id &&
- link == obj.link &&
- post_id == obj.post_id &&
- rank == obj.rank &&
- site == obj.site;
+ this.added_date == obj.added_date &&
+ this.badge_description == obj.badge_description &&
+ this.badge_id == obj.badge_id &&
+ this.badge_name == obj.badge_name &&
+ this.badge_type == obj.badge_type &&
+ this.group_id == obj.group_id &&
+ this.link == obj.link &&
+ this.post_id == obj.post_id &&
+ this.rank == obj.rank &&
+ this.site == obj.site;
}
public bool EqualsDynamic(dynamic obj)
{
return
- added_date == (long?) obj.added_date &&
- badge_description == (string) obj.badge_description &&
- badge_id == (int?) obj.badge_id &&
- badge_name == (string) obj.badge_name &&
- badge_type == (BadgeType?) obj.badge_type &&
- group_id == (int?) obj.group_id &&
- link == (string) obj.link &&
- post_id == (int?) obj.post_id &&
- rank == (BadgeRank?) obj.rank &&
- site == (string) obj.site;
+ this.added_date == (long?)obj.added_date &&
+ this.badge_description == (string)obj.badge_description &&
+ this.badge_id == (int?)obj.badge_id &&
+ this.badge_name == (string)obj.badge_name &&
+ this.badge_type == (BadgeType?)obj.badge_type &&
+ this.group_id == (int?)obj.group_id &&
+ this.link == (string)obj.link &&
+ this.post_id == (int?)obj.post_id &&
+ this.rank == (BadgeRank?)obj.rank &&
+ this.site == (string)obj.site;
}
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public sealed class MobilePrivilege : IMobileFeedBase<MobilePrivilege>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public string site { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public string privilege_short_description { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public string privilege_long_description { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public int? privilege_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public int? reputation_required { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public string link { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? group_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public long? added_date { get; set; }
public bool Equals(MobilePrivilege obj)
{
return
- added_date == obj.added_date &&
- group_id == obj.group_id &&
- link == obj.link &&
- privilege_id == obj.privilege_id &&
- privilege_long_description == obj.privilege_long_description &&
- privilege_short_description == obj.privilege_short_description &&
- reputation_required == obj.reputation_required &&
- site == obj.site;
+ this.added_date == obj.added_date &&
+ this.group_id == obj.group_id &&
+ this.link == obj.link &&
+ this.privilege_id == obj.privilege_id &&
+ this.privilege_long_description == obj.privilege_long_description &&
+ this.privilege_short_description == obj.privilege_short_description &&
+ this.reputation_required == obj.reputation_required &&
+ this.site == obj.site;
}
public bool EqualsDynamic(dynamic obj)
{
return
- added_date == (long?) obj.added_date &&
- group_id == (int?) obj.group_id &&
- link == (string) obj.link &&
- privilege_id == (int?) obj.privilege_id &&
- privilege_long_description == (string) obj.privilege_long_description &&
- privilege_short_description == (string) obj.privilege_short_description &&
- reputation_required == (int?) obj.reputation_required &&
- site == (string) obj.site;
+ this.added_date == (long?)obj.added_date &&
+ this.group_id == (int?)obj.group_id &&
+ this.link == (string)obj.link &&
+ this.privilege_id == (int?)obj.privilege_id &&
+ this.privilege_long_description == (string)obj.privilege_long_description &&
+ this.privilege_short_description == (string)obj.privilege_short_description &&
+ this.reputation_required == (int?)obj.reputation_required &&
+ this.site == (string)obj.site;
}
}
@@ -427,232 +434,232 @@ namespace Benchmark.Models
{
blog_post = 1,
featured_meta_question = 2,
- upcoming_event = 3
+ upcoming_event = 3,
}
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public string site { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public string title { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public string link { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public CommunityBulletinType? bulletin_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public long? begin_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public long? end_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public string custom_date_string { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public List<string> tags { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
public bool? is_deleted { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
public bool? has_accepted_answer { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
public int? answer_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
public bool? is_promoted { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? group_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public long? added_date { get; set; }
public bool Equals(MobileCommunityBulletin obj)
{
return
- added_date == obj.added_date &&
- answer_count == obj.answer_count &&
- begin_date == obj.begin_date &&
- bulletin_type == obj.bulletin_type &&
- custom_date_string == obj.custom_date_string &&
- end_date == obj.end_date &&
- group_id == obj.group_id &&
- has_accepted_answer == obj.has_accepted_answer &&
- is_deleted == obj.is_deleted &&
- is_promoted == obj.is_promoted &&
- link == obj.link &&
- site == obj.site &&
- tags.TrueEqualsString(obj.tags) &&
- title == obj.title;
+ this.added_date == obj.added_date &&
+ this.answer_count == obj.answer_count &&
+ this.begin_date == obj.begin_date &&
+ this.bulletin_type == obj.bulletin_type &&
+ this.custom_date_string == obj.custom_date_string &&
+ this.end_date == obj.end_date &&
+ this.group_id == obj.group_id &&
+ this.has_accepted_answer == obj.has_accepted_answer &&
+ this.is_deleted == obj.is_deleted &&
+ this.is_promoted == obj.is_promoted &&
+ this.link == obj.link &&
+ this.site == obj.site &&
+ this.tags.TrueEqualsString(obj.tags) &&
+ this.title == obj.title;
}
public bool EqualsDynamic(dynamic obj)
{
return
- added_date == (long?) obj.added_date &&
- answer_count == (int?) obj.answer_count &&
- begin_date == (long?) obj.begin_date &&
- bulletin_type == (CommunityBulletinType?) obj.bulletin_type &&
- custom_date_string == (string) obj.custom_date_string &&
- end_date == (long?) obj.end_date &&
- group_id == (int?) obj.group_id &&
- has_accepted_answer == (bool?) obj.has_accepted_answer &&
- is_deleted == (bool?) obj.is_deleted &&
- is_promoted == (bool?) obj.is_promoted &&
- link == (string) obj.link &&
- site == (string) obj.site &&
- tags.TrueEqualsString((IEnumerable<string>) obj.tags) &&
- title == (string) obj.title;
+ this.added_date == (long?)obj.added_date &&
+ this.answer_count == (int?)obj.answer_count &&
+ this.begin_date == (long?)obj.begin_date &&
+ this.bulletin_type == (CommunityBulletinType?)obj.bulletin_type &&
+ this.custom_date_string == (string)obj.custom_date_string &&
+ this.end_date == (long?)obj.end_date &&
+ this.group_id == (int?)obj.group_id &&
+ this.has_accepted_answer == (bool?)obj.has_accepted_answer &&
+ this.is_deleted == (bool?)obj.is_deleted &&
+ this.is_promoted == (bool?)obj.is_promoted &&
+ this.link == (string)obj.link &&
+ this.site == (string)obj.site &&
+ this.tags.TrueEqualsString((IEnumerable<string>)obj.tags) &&
+ this.title == (string)obj.title;
}
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public sealed class MobileAssociationBonus : IMobileFeedBase<MobileAssociationBonus>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public string site { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public int? amount { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? group_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public long? added_date { get; set; }
public bool Equals(MobileAssociationBonus obj)
{
return
- added_date == obj.added_date &&
- amount == obj.amount &&
- group_id == obj.group_id &&
- site == obj.site;
+ this.added_date == obj.added_date &&
+ this.amount == obj.amount &&
+ this.group_id == obj.group_id &&
+ this.site == obj.site;
}
public bool EqualsDynamic(dynamic obj)
{
return
- added_date == (long?) obj.added_date &&
- amount == (int?) obj.amount &&
- group_id == (int?) obj.group_id &&
- site == (string) obj.site;
+ this.added_date == (long?)obj.added_date &&
+ this.amount == (int?)obj.amount &&
+ this.group_id == (int?)obj.group_id &&
+ this.site == (string)obj.site;
}
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public sealed class MobileCareersJobAd : IMobileFeedBase<MobileCareersJobAd>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public int? job_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public string link { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public string company_name { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public string location { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public string title { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? group_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public long? added_date { get; set; }
public bool Equals(MobileCareersJobAd obj)
{
return
- added_date == obj.added_date &&
- company_name == obj.company_name &&
- group_id == obj.group_id &&
- job_id == obj.job_id &&
- link == obj.link &&
- location == obj.location &&
- title == obj.title;
+ this.added_date == obj.added_date &&
+ this.company_name == obj.company_name &&
+ this.group_id == obj.group_id &&
+ this.job_id == obj.job_id &&
+ this.link == obj.link &&
+ this.location == obj.location &&
+ this.title == obj.title;
}
public bool EqualsDynamic(dynamic obj)
{
return
- added_date == (long?) obj.added_date &&
- company_name == (string) obj.company_name &&
- group_id == (int?) obj.group_id &&
- job_id == (int?) obj.job_id &&
- link == (string) obj.link &&
- location == (string) obj.location &&
- title == (string) obj.title;
+ this.added_date == (long?)obj.added_date &&
+ this.company_name == (string)obj.company_name &&
+ this.group_id == (int?)obj.group_id &&
+ this.job_id == (int?)obj.job_id &&
+ this.link == (string)obj.link &&
+ this.location == (string)obj.location &&
+ this.title == (string)obj.title;
}
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public sealed class MobileBannerAd : IMobileFeedBase<MobileBannerAd>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public string link { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public List<MobileBannerAdImage> images { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? group_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public long? added_date { get; set; }
public bool Equals(MobileBannerAd obj)
{
return
- added_date == obj.added_date &&
- group_id == obj.group_id &&
- images.TrueEqualsList(obj.images) &&
- link == obj.link;
+ this.added_date == obj.added_date &&
+ this.group_id == obj.group_id &&
+ this.images.TrueEqualsList(obj.images) &&
+ this.link == obj.link;
}
public bool EqualsDynamic(dynamic obj)
{
return
- added_date == (long?) obj.added_date &&
- group_id == (int?) obj.group_id &&
- images.TrueEqualsListDynamic((IEnumerable<dynamic>) obj.images) &&
- link == (string) obj.link;
+ this.added_date == (long?)obj.added_date &&
+ this.group_id == (int?)obj.group_id &&
+ this.images.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.images) &&
+ this.link == (string)obj.link;
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public sealed class MobileBannerAdImage : IGenericEquality<MobileBannerAdImage>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public string image_url { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public int? width { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public int? height { get; set; }
public bool Equals(MobileBannerAdImage obj)
{
return
- height == obj.height &&
- image_url == obj.image_url &&
- width == obj.width;
+ this.height == obj.height &&
+ this.image_url == obj.image_url &&
+ this.width == obj.width;
}
public bool EqualsDynamic(dynamic obj)
{
return
- height == (int?) obj.height &&
- image_url == (string) obj.image_url &&
- width == (int?) obj.width;
+ this.height == (int?)obj.height &&
+ this.image_url == (string)obj.image_url &&
+ this.width == (int?)obj.width;
}
}
}
@@ -660,29 +667,29 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public sealed class MobileUpdateNotice : IGenericEquality<MobileUpdateNotice>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public bool? should_update { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public string message { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public string minimum_supported_version { get; set; }
public bool Equals(MobileUpdateNotice obj)
{
return
- message == obj.message &&
- minimum_supported_version == obj.minimum_supported_version &&
- should_update == obj.should_update;
+ this.message == obj.message &&
+ this.minimum_supported_version == obj.minimum_supported_version &&
+ this.should_update == obj.should_update;
}
public bool EqualsDynamic(dynamic obj)
{
return
- message == (string) obj.message &&
- minimum_supported_version == (string) obj.minimum_supported_version &&
- should_update == (bool?) obj.should_update;
+ this.message == (string)obj.message &&
+ this.minimum_supported_version == (string)obj.minimum_supported_version &&
+ this.should_update == (bool?)obj.should_update;
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/FlagOption.cs b/benchmark/SerializerBenchmark/Models/FlagOption.cs
index 49dc0dc1..95328086 100644
--- a/benchmark/SerializerBenchmark/Models/FlagOption.cs
+++ b/benchmark/SerializerBenchmark/Models/FlagOption.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System.Collections.Generic;
using ProtoBuf;
@@ -8,59 +12,59 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class FlagOption : IGenericEquality<FlagOption>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? option_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public bool? requires_comment { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public bool? requires_site { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public bool? requires_question_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public string title { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public string description { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public List<FlagOption> sub_options { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public bool? has_flagged { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public int? count { get; set; }
public bool Equals(FlagOption obj)
{
return
- count.TrueEquals(obj.count) &&
- description.TrueEqualsString(obj.description) &&
- has_flagged.TrueEquals(obj.has_flagged) &&
- option_id.TrueEquals(obj.option_id) &&
- requires_comment.TrueEquals(obj.requires_comment) &&
- requires_question_id.TrueEquals(obj.requires_question_id) &&
- requires_site.TrueEquals(obj.requires_site) &&
- sub_options.TrueEqualsList(obj.sub_options) &&
- title.TrueEqualsString(obj.title);
+ this.count.TrueEquals(obj.count) &&
+ this.description.TrueEqualsString(obj.description) &&
+ this.has_flagged.TrueEquals(obj.has_flagged) &&
+ this.option_id.TrueEquals(obj.option_id) &&
+ this.requires_comment.TrueEquals(obj.requires_comment) &&
+ this.requires_question_id.TrueEquals(obj.requires_question_id) &&
+ this.requires_site.TrueEquals(obj.requires_site) &&
+ this.sub_options.TrueEqualsList(obj.sub_options) &&
+ this.title.TrueEqualsString(obj.title);
}
public bool EqualsDynamic(dynamic obj)
{
return
- count.TrueEquals((int?) obj.count) &&
- description.TrueEqualsString((string) obj.description) &&
- has_flagged.TrueEquals((bool?) obj.has_flagged) &&
- option_id.TrueEquals((int?) obj.option_id) &&
- requires_comment.TrueEquals((bool?) obj.requires_comment) &&
- requires_question_id.TrueEquals((bool?) obj.requires_question_id) &&
- requires_site.TrueEquals((bool?) obj.requires_site) &&
- sub_options.TrueEqualsListDynamic((IEnumerable<dynamic>) obj.sub_options) &&
- title.TrueEqualsString((string) obj.title);
+ this.count.TrueEquals((int?)obj.count) &&
+ this.description.TrueEqualsString((string)obj.description) &&
+ this.has_flagged.TrueEquals((bool?)obj.has_flagged) &&
+ this.option_id.TrueEquals((int?)obj.option_id) &&
+ this.requires_comment.TrueEquals((bool?)obj.requires_comment) &&
+ this.requires_question_id.TrueEquals((bool?)obj.requires_question_id) &&
+ this.requires_site.TrueEquals((bool?)obj.requires_site) &&
+ this.sub_options.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.sub_options) &&
+ this.title.TrueEqualsString((string)obj.title);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/InboxItem.cs b/benchmark/SerializerBenchmark/Models/InboxItem.cs
index 8996ceea..30d33a8e 100644
--- a/benchmark/SerializerBenchmark/Models/InboxItem.cs
+++ b/benchmark/SerializerBenchmark/Models/InboxItem.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using ProtoBuf;
@@ -14,70 +18,70 @@ namespace Benchmark.Models
careers_invitations = 5,
meta_question = 6,
post_notice = 7,
- moderator_message = 8
+ moderator_message = 8,
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class InboxItem : IGenericEquality<InboxItem>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public InboxItemType? item_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public int? question_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public int? answer_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public int? comment_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public string title { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public DateTime? creation_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public bool? is_unread { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public Info.Site site { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public string body { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public string link { get; set; }
public bool Equals(InboxItem obj)
{
return
- answer_id.TrueEquals(obj.answer_id) &&
- body.TrueEqualsString(obj.body) &&
- comment_id.TrueEquals(obj.comment_id) &&
- creation_date.TrueEquals(obj.creation_date) &&
- is_unread.TrueEquals(obj.is_unread) &&
- item_type.TrueEquals(obj.item_type) &&
- link.TrueEqualsString(obj.link) &&
- question_id.TrueEquals(obj.question_id) &&
- site.TrueEquals(obj.site) &&
- title.TrueEqualsString(obj.title);
+ this.answer_id.TrueEquals(obj.answer_id) &&
+ this.body.TrueEqualsString(obj.body) &&
+ this.comment_id.TrueEquals(obj.comment_id) &&
+ this.creation_date.TrueEquals(obj.creation_date) &&
+ this.is_unread.TrueEquals(obj.is_unread) &&
+ this.item_type.TrueEquals(obj.item_type) &&
+ this.link.TrueEqualsString(obj.link) &&
+ this.question_id.TrueEquals(obj.question_id) &&
+ this.site.TrueEquals(obj.site) &&
+ this.title.TrueEqualsString(obj.title);
}
public bool EqualsDynamic(dynamic obj)
{
return
- answer_id.TrueEquals((int?) obj.answer_id) &&
- body.TrueEqualsString((string) obj.body) &&
- comment_id.TrueEquals((int?) obj.comment_id) &&
- creation_date.TrueEquals((DateTime?) obj.creation_date) &&
- is_unread.TrueEquals((bool?) obj.is_unread) &&
- item_type.TrueEquals((InboxItemType?) obj.item_type) &&
- link.TrueEqualsString((string) obj.link) &&
- question_id.TrueEquals((int?) obj.question_id) &&
- (site == null && obj.site == null || site.EqualsDynamic(obj.site)) &&
- title.TrueEqualsString((string) obj.title);
+ this.answer_id.TrueEquals((int?)obj.answer_id) &&
+ this.body.TrueEqualsString((string)obj.body) &&
+ this.comment_id.TrueEquals((int?)obj.comment_id) &&
+ this.creation_date.TrueEquals((DateTime?)obj.creation_date) &&
+ this.is_unread.TrueEquals((bool?)obj.is_unread) &&
+ this.item_type.TrueEquals((InboxItemType?)obj.item_type) &&
+ this.link.TrueEqualsString((string)obj.link) &&
+ this.question_id.TrueEquals((int?)obj.question_id) &&
+ ((this.site == null && obj.site == null) || this.site.EqualsDynamic(obj.site)) &&
+ this.title.TrueEqualsString((string)obj.title);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/Info.cs b/benchmark/SerializerBenchmark/Models/Info.cs
index 7ef7e363..26662d0e 100644
--- a/benchmark/SerializerBenchmark/Models/Info.cs
+++ b/benchmark/SerializerBenchmark/Models/Info.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using System.Collections.Generic;
using ProtoBuf;
@@ -9,84 +13,84 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class Info : IGenericEquality<Info>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? total_questions { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public int? total_unanswered { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public int? total_accepted { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public int? total_answers { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public decimal? questions_per_minute { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public decimal? answers_per_minute { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public int? total_comments { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public int? total_votes { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public int? total_badges { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public decimal? badges_per_minute { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
public int? total_users { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
public int? new_active_users { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
public string api_revision { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
public Site site { get; set; }
public bool Equals(Info obj)
{
return
- answers_per_minute.TrueEquals(obj.answers_per_minute) &&
- api_revision.TrueEqualsString(obj.api_revision) &&
- badges_per_minute.TrueEquals(obj.badges_per_minute) &&
- new_active_users.TrueEquals(obj.new_active_users) &&
- questions_per_minute.TrueEquals(obj.questions_per_minute) &&
- site.TrueEquals(obj.site) &&
- total_accepted.TrueEquals(obj.total_accepted) &&
- total_answers.TrueEquals(obj.total_answers) &&
- total_badges.TrueEquals(obj.total_badges) &&
- total_comments.TrueEquals(obj.total_comments) &&
- total_questions.TrueEquals(obj.total_questions) &&
- total_unanswered.TrueEquals(obj.total_unanswered) &&
- total_users.TrueEquals(obj.total_users) &&
- total_votes.TrueEquals(obj.total_votes);
+ this.answers_per_minute.TrueEquals(obj.answers_per_minute) &&
+ this.api_revision.TrueEqualsString(obj.api_revision) &&
+ this.badges_per_minute.TrueEquals(obj.badges_per_minute) &&
+ this.new_active_users.TrueEquals(obj.new_active_users) &&
+ this.questions_per_minute.TrueEquals(obj.questions_per_minute) &&
+ this.site.TrueEquals(obj.site) &&
+ this.total_accepted.TrueEquals(obj.total_accepted) &&
+ this.total_answers.TrueEquals(obj.total_answers) &&
+ this.total_badges.TrueEquals(obj.total_badges) &&
+ this.total_comments.TrueEquals(obj.total_comments) &&
+ this.total_questions.TrueEquals(obj.total_questions) &&
+ this.total_unanswered.TrueEquals(obj.total_unanswered) &&
+ this.total_users.TrueEquals(obj.total_users) &&
+ this.total_votes.TrueEquals(obj.total_votes);
}
public bool EqualsDynamic(dynamic obj)
{
return
- answers_per_minute.TrueEquals((decimal?) obj.answers_per_minute) &&
- api_revision.TrueEqualsString((string) obj.api_revision) &&
- badges_per_minute.TrueEquals((decimal?) obj.badges_per_minute) &&
- new_active_users.TrueEquals((int?) obj.new_active_users) &&
- questions_per_minute.TrueEquals((decimal?) obj.questions_per_minute) &&
- (site == null && obj.site == null || site.EqualsDynamic(obj.site)) &&
- total_accepted.TrueEquals((int?) obj.total_accepted) &&
- total_answers.TrueEquals((int?) obj.total_answers) &&
- total_badges.TrueEquals((int?) obj.total_badges) &&
- total_comments.TrueEquals((int?) obj.total_comments) &&
- total_questions.TrueEquals((int?) obj.total_questions) &&
- total_unanswered.TrueEquals((int?) obj.total_unanswered) &&
- total_users.TrueEquals((int?) obj.total_users) &&
- total_votes.TrueEquals((int?) obj.total_votes);
+ this.answers_per_minute.TrueEquals((decimal?)obj.answers_per_minute) &&
+ this.api_revision.TrueEqualsString((string)obj.api_revision) &&
+ this.badges_per_minute.TrueEquals((decimal?)obj.badges_per_minute) &&
+ this.new_active_users.TrueEquals((int?)obj.new_active_users) &&
+ this.questions_per_minute.TrueEquals((decimal?)obj.questions_per_minute) &&
+ ((this.site == null && obj.site == null) || this.site.EqualsDynamic(obj.site)) &&
+ this.total_accepted.TrueEquals((int?)obj.total_accepted) &&
+ this.total_answers.TrueEquals((int?)obj.total_answers) &&
+ this.total_badges.TrueEquals((int?)obj.total_badges) &&
+ this.total_comments.TrueEquals((int?)obj.total_comments) &&
+ this.total_questions.TrueEquals((int?)obj.total_questions) &&
+ this.total_unanswered.TrueEquals((int?)obj.total_unanswered) &&
+ this.total_users.TrueEquals((int?)obj.total_users) &&
+ this.total_votes.TrueEquals((int?)obj.total_votes);
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
@@ -97,135 +101,135 @@ namespace Benchmark.Models
normal,
closed_beta,
open_beta,
- linked_meta
+ linked_meta,
}
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public string site_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public string name { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public string logo_url { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public string api_site_parameter { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public string site_url { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public string audience { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public string icon_url { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public List<string> aliases { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public SiteState? site_state { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public Styling styling { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
public DateTime? closed_beta_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
public DateTime? open_beta_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
public DateTime? launch_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
public string favicon_url { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(15), oldmsgpack::MessagePack.Key(15 - 1), newmsgpack::MessagePack.Key(15 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(15), oldmsgpack::MessagePack.Key(15 - 1), newmsgpack::MessagePack.Key(15 - 1)]
public List<RelatedSite> related_sites { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(16), oldmsgpack::MessagePack.Key(16 - 1), newmsgpack::MessagePack.Key(16 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(16), oldmsgpack::MessagePack.Key(16 - 1), newmsgpack::MessagePack.Key(16 - 1)]
public string twitter_account { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(17), oldmsgpack::MessagePack.Key(17 - 1), newmsgpack::MessagePack.Key(17 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(17), oldmsgpack::MessagePack.Key(17 - 1), newmsgpack::MessagePack.Key(17 - 1)]
public List<string> markdown_extensions { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(18), oldmsgpack::MessagePack.Key(18 - 1), newmsgpack::MessagePack.Key(18 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(18), oldmsgpack::MessagePack.Key(18 - 1), newmsgpack::MessagePack.Key(18 - 1)]
public string high_resolution_icon_url { get; set; }
public bool Equals(Site obj)
{
return
- aliases.TrueEqualsString(obj.aliases) &&
- api_site_parameter.TrueEqualsString(obj.api_site_parameter) &&
- audience.TrueEqualsString(obj.audience) &&
- closed_beta_date.TrueEquals(obj.closed_beta_date) &&
- favicon_url.TrueEqualsString(obj.favicon_url) &&
- high_resolution_icon_url.TrueEqualsString(obj.high_resolution_icon_url) &&
- icon_url.TrueEqualsString(obj.icon_url) &&
- launch_date.TrueEquals(obj.launch_date) &&
- logo_url.TrueEqualsString(obj.logo_url) &&
- markdown_extensions.TrueEqualsString(obj.markdown_extensions) &&
- name.TrueEqualsString(obj.name) &&
- open_beta_date.TrueEquals(obj.open_beta_date) &&
- related_sites.TrueEqualsList(obj.related_sites) &&
- site_state.TrueEquals(obj.site_state) &&
- site_type.TrueEqualsString(obj.site_type) &&
- site_url.TrueEqualsString(obj.site_url) &&
- styling.TrueEquals(obj.styling) &&
- twitter_account.TrueEqualsString(obj.twitter_account);
+ this.aliases.TrueEqualsString(obj.aliases) &&
+ this.api_site_parameter.TrueEqualsString(obj.api_site_parameter) &&
+ this.audience.TrueEqualsString(obj.audience) &&
+ this.closed_beta_date.TrueEquals(obj.closed_beta_date) &&
+ this.favicon_url.TrueEqualsString(obj.favicon_url) &&
+ this.high_resolution_icon_url.TrueEqualsString(obj.high_resolution_icon_url) &&
+ this.icon_url.TrueEqualsString(obj.icon_url) &&
+ this.launch_date.TrueEquals(obj.launch_date) &&
+ this.logo_url.TrueEqualsString(obj.logo_url) &&
+ this.markdown_extensions.TrueEqualsString(obj.markdown_extensions) &&
+ this.name.TrueEqualsString(obj.name) &&
+ this.open_beta_date.TrueEquals(obj.open_beta_date) &&
+ this.related_sites.TrueEqualsList(obj.related_sites) &&
+ this.site_state.TrueEquals(obj.site_state) &&
+ this.site_type.TrueEqualsString(obj.site_type) &&
+ this.site_url.TrueEqualsString(obj.site_url) &&
+ this.styling.TrueEquals(obj.styling) &&
+ this.twitter_account.TrueEqualsString(obj.twitter_account);
}
public bool EqualsDynamic(dynamic obj)
{
return
- aliases.TrueEqualsString((IEnumerable<string>) obj.aliases) &&
- api_site_parameter.TrueEqualsString((string) obj.api_site_parameter) &&
- audience.TrueEqualsString((string) obj.audience) &&
- closed_beta_date.TrueEquals((DateTime?) obj.closed_beta_date) &&
- favicon_url.TrueEqualsString((string) obj.favicon_url) &&
- high_resolution_icon_url.TrueEqualsString((string) obj.high_resolution_icon_url) &&
- icon_url.TrueEqualsString((string) obj.icon_url) &&
- launch_date.TrueEquals((DateTime?) obj.launch_date) &&
- logo_url.TrueEqualsString((string) obj.logo_url) &&
- markdown_extensions.TrueEqualsString((IEnumerable<string>) obj.markdown_extensions) &&
- name.TrueEqualsString((string) obj.name) &&
- open_beta_date.TrueEquals((DateTime?) obj.open_beta_date) &&
- related_sites.TrueEqualsListDynamic((IEnumerable<dynamic>) obj.related_sites) &&
- site_state.TrueEquals((SiteState?) obj.site_state) &&
- site_type.TrueEqualsString((string) obj.site_type) &&
- site_url.TrueEqualsString((string) obj.site_url) &&
- (styling == null && obj.styling == null || styling.EqualsDynamic(obj.styling)) &&
- twitter_account.TrueEqualsString((string) obj.twitter_account);
+ this.aliases.TrueEqualsString((IEnumerable<string>)obj.aliases) &&
+ this.api_site_parameter.TrueEqualsString((string)obj.api_site_parameter) &&
+ this.audience.TrueEqualsString((string)obj.audience) &&
+ this.closed_beta_date.TrueEquals((DateTime?)obj.closed_beta_date) &&
+ this.favicon_url.TrueEqualsString((string)obj.favicon_url) &&
+ this.high_resolution_icon_url.TrueEqualsString((string)obj.high_resolution_icon_url) &&
+ this.icon_url.TrueEqualsString((string)obj.icon_url) &&
+ this.launch_date.TrueEquals((DateTime?)obj.launch_date) &&
+ this.logo_url.TrueEqualsString((string)obj.logo_url) &&
+ this.markdown_extensions.TrueEqualsString((IEnumerable<string>)obj.markdown_extensions) &&
+ this.name.TrueEqualsString((string)obj.name) &&
+ this.open_beta_date.TrueEquals((DateTime?)obj.open_beta_date) &&
+ this.related_sites.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.related_sites) &&
+ this.site_state.TrueEquals((SiteState?)obj.site_state) &&
+ this.site_type.TrueEqualsString((string)obj.site_type) &&
+ this.site_url.TrueEqualsString((string)obj.site_url) &&
+ ((this.styling == null && obj.styling == null) || this.styling.EqualsDynamic(obj.styling)) &&
+ this.twitter_account.TrueEqualsString((string)obj.twitter_account);
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class Styling : IGenericEquality<Styling>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public string link_color { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public string tag_foreground_color { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public string tag_background_color { get; set; }
public bool Equals(Styling obj)
{
return
- link_color.TrueEqualsString(obj.link_color) &&
- tag_background_color.TrueEqualsString(obj.tag_background_color) &&
- tag_foreground_color.TrueEqualsString(obj.tag_foreground_color);
+ this.link_color.TrueEqualsString(obj.link_color) &&
+ this.tag_background_color.TrueEqualsString(obj.tag_background_color) &&
+ this.tag_foreground_color.TrueEqualsString(obj.tag_foreground_color);
}
public bool EqualsDynamic(dynamic obj)
{
return
- link_color.TrueEqualsString((string) obj.link_color) &&
- tag_background_color.TrueEqualsString((string) obj.tag_background_color) &&
- tag_foreground_color.TrueEqualsString((string) obj.tag_foreground_color);
+ this.link_color.TrueEqualsString((string)obj.link_color) &&
+ this.tag_background_color.TrueEqualsString((string)obj.tag_background_color) &&
+ this.tag_foreground_color.TrueEqualsString((string)obj.tag_foreground_color);
}
}
}
@@ -237,36 +241,36 @@ namespace Benchmark.Models
{
parent,
meta,
- chat
+ chat,
}
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public string name { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public string site_url { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public SiteRelation? relation { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public string api_site_parameter { get; set; }
public bool Equals(RelatedSite obj)
{
return
- name.TrueEqualsString(obj.name) &&
- relation.TrueEquals(obj.relation) &&
- api_site_parameter.TrueEqualsString(obj.api_site_parameter);
+ this.name.TrueEqualsString(obj.name) &&
+ this.relation.TrueEquals(obj.relation) &&
+ this.api_site_parameter.TrueEqualsString(obj.api_site_parameter);
}
public bool EqualsDynamic(dynamic obj)
{
return
- name.TrueEqualsString((string) obj.name) &&
- relation.TrueEquals((SiteRelation?) obj.relation) &&
- api_site_parameter.TrueEqualsString((string) obj.api_site_parameter);
+ this.name.TrueEqualsString((string)obj.name) &&
+ this.relation.TrueEquals((SiteRelation?)obj.relation) &&
+ this.api_site_parameter.TrueEqualsString((string)obj.api_site_parameter);
}
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/NetworkUser.cs b/benchmark/SerializerBenchmark/Models/NetworkUser.cs
index 172d1f1f..76a7fd9b 100644
--- a/benchmark/SerializerBenchmark/Models/NetworkUser.cs
+++ b/benchmark/SerializerBenchmark/Models/NetworkUser.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using ProtoBuf;
@@ -8,69 +12,69 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class NetworkUser : IGenericEquality<NetworkUser>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public string site_name { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public string site_url { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public int? user_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public int? reputation { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public int? account_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public DateTime? creation_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public UserType? user_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public User.BadgeCount badge_counts { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public DateTime? last_access_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public int? answer_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
public int? question_count { get; set; }
public bool Equals(NetworkUser obj)
{
return
- account_id.TrueEquals(obj.account_id) &&
- answer_count.TrueEquals(obj.answer_count) &&
- badge_counts.TrueEquals(obj.badge_counts) &&
- creation_date.TrueEquals(obj.creation_date) &&
- last_access_date.TrueEquals(obj.last_access_date) &&
- question_count.TrueEquals(obj.question_count) &&
- reputation.TrueEquals(obj.reputation) &&
- site_name.TrueEqualsString(obj.site_name) &&
- site_url.TrueEqualsString(obj.site_url) &&
- user_id.TrueEquals(obj.user_id) &&
- user_type.TrueEquals(obj.user_type);
+ this.account_id.TrueEquals(obj.account_id) &&
+ this.answer_count.TrueEquals(obj.answer_count) &&
+ this.badge_counts.TrueEquals(obj.badge_counts) &&
+ this.creation_date.TrueEquals(obj.creation_date) &&
+ this.last_access_date.TrueEquals(obj.last_access_date) &&
+ this.question_count.TrueEquals(obj.question_count) &&
+ this.reputation.TrueEquals(obj.reputation) &&
+ this.site_name.TrueEqualsString(obj.site_name) &&
+ this.site_url.TrueEqualsString(obj.site_url) &&
+ this.user_id.TrueEquals(obj.user_id) &&
+ this.user_type.TrueEquals(obj.user_type);
}
public bool EqualsDynamic(dynamic obj)
{
return
- account_id.TrueEquals((int?) obj.account_id) &&
- answer_count.TrueEquals((int?) obj.answer_count) &&
- (badge_counts == null && obj.badge_counts == null || badge_counts.EqualsDynamic(obj.badge_counts)) &&
- creation_date.TrueEquals((DateTime?) obj.creation_date) &&
- last_access_date.TrueEquals((DateTime?) obj.last_access_date) &&
- question_count.TrueEquals((int?) obj.question_count) &&
- reputation.TrueEquals((int?) obj.reputation) &&
- site_name.TrueEqualsString((string) obj.site_name) &&
- site_url.TrueEqualsString((string) obj.site_url) &&
- user_id.TrueEquals((int?) obj.user_id) &&
- user_type.TrueEquals((UserType?) obj.user_type);
+ this.account_id.TrueEquals((int?)obj.account_id) &&
+ this.answer_count.TrueEquals((int?)obj.answer_count) &&
+ ((this.badge_counts == null && obj.badge_counts == null) || this.badge_counts.EqualsDynamic(obj.badge_counts)) &&
+ this.creation_date.TrueEquals((DateTime?)obj.creation_date) &&
+ this.last_access_date.TrueEquals((DateTime?)obj.last_access_date) &&
+ this.question_count.TrueEquals((int?)obj.question_count) &&
+ this.reputation.TrueEquals((int?)obj.reputation) &&
+ this.site_name.TrueEqualsString((string)obj.site_name) &&
+ this.site_url.TrueEqualsString((string)obj.site_url) &&
+ this.user_id.TrueEquals((int?)obj.user_id) &&
+ this.user_type.TrueEquals((UserType?)obj.user_type);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/Notification.cs b/benchmark/SerializerBenchmark/Models/Notification.cs
index b2d884c0..677cd395 100644
--- a/benchmark/SerializerBenchmark/Models/Notification.cs
+++ b/benchmark/SerializerBenchmark/Models/Notification.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using ProtoBuf;
@@ -21,48 +25,48 @@ namespace Benchmark.Models
registration_reminder = 12,
substantive_edit = 23,
reputation_bonus = 7,
- bounty_grace_period_started = 24
+ bounty_grace_period_started = 24,
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class Notification : IGenericEquality<Notification>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public NotificationType? notification_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public Info.Site site { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public DateTime? creation_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public string body { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public int? post_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public bool? is_unread { get; set; }
public bool Equals(Notification obj)
{
return
- body.TrueEqualsString(obj.body) &&
- site.TrueEquals(obj.site) &&
- creation_date.TrueEquals(obj.creation_date) &&
- post_id.TrueEquals(obj.post_id) &&
- is_unread.TrueEquals(obj.is_unread);
+ this.body.TrueEqualsString(obj.body) &&
+ this.site.TrueEquals(obj.site) &&
+ this.creation_date.TrueEquals(obj.creation_date) &&
+ this.post_id.TrueEquals(obj.post_id) &&
+ this.is_unread.TrueEquals(obj.is_unread);
}
public bool EqualsDynamic(dynamic obj)
{
return
- body.TrueEqualsString((string) obj.body) &&
- (site == null && obj.site == null || site.EqualsDynamic(obj.site)) &&
- creation_date.TrueEquals((DateTime?) obj.creation_date) &&
- post_id.TrueEquals((int?) obj.post_id) &&
- is_unread.TrueEquals((bool?) obj.is_unread);
+ this.body.TrueEqualsString((string)obj.body) &&
+ ((this.site == null && obj.site == null) || this.site.EqualsDynamic(obj.site)) &&
+ this.creation_date.TrueEquals((DateTime?)obj.creation_date) &&
+ this.post_id.TrueEquals((int?)obj.post_id) &&
+ this.is_unread.TrueEquals((bool?)obj.is_unread);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/Post.cs b/benchmark/SerializerBenchmark/Models/Post.cs
index fe0e85c8..4ec6b4ba 100644
--- a/benchmark/SerializerBenchmark/Models/Post.cs
+++ b/benchmark/SerializerBenchmark/Models/Post.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using System.Collections.Generic;
using ProtoBuf;
@@ -9,104 +13,104 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class Post : IGenericEquality<Post>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? post_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public PostType? post_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public string body { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public ShallowUser owner { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public DateTime? creation_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public DateTime? last_activity_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public DateTime? last_edit_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public int? score { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public int? up_vote_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public int? down_vote_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
public List<Comment> comments { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
public string link { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
public bool? upvoted { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
public bool? downvoted { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(15), oldmsgpack::MessagePack.Key(15 - 1), newmsgpack::MessagePack.Key(15 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(15), oldmsgpack::MessagePack.Key(15 - 1), newmsgpack::MessagePack.Key(15 - 1)]
public ShallowUser last_editor { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(16), oldmsgpack::MessagePack.Key(16 - 1), newmsgpack::MessagePack.Key(16 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(16), oldmsgpack::MessagePack.Key(16 - 1), newmsgpack::MessagePack.Key(16 - 1)]
public int? comment_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(17), oldmsgpack::MessagePack.Key(17 - 1), newmsgpack::MessagePack.Key(17 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(17), oldmsgpack::MessagePack.Key(17 - 1), newmsgpack::MessagePack.Key(17 - 1)]
public string body_markdown { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(18), oldmsgpack::MessagePack.Key(18 - 1), newmsgpack::MessagePack.Key(18 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(18), oldmsgpack::MessagePack.Key(18 - 1), newmsgpack::MessagePack.Key(18 - 1)]
public string share_link { get; set; }
public bool Equals(Post obj)
{
return
- body.TrueEqualsString(obj.body) &&
- body_markdown.TrueEqualsString(obj.body_markdown) &&
- comment_count.TrueEquals(obj.comment_count) &&
- comments.TrueEqualsList(obj.comments) &&
- creation_date.TrueEquals(obj.creation_date) &&
- down_vote_count.TrueEquals(obj.down_vote_count) &&
- downvoted.TrueEquals(obj.downvoted) &&
- last_activity_date.TrueEquals(obj.last_activity_date) &&
- last_edit_date.TrueEquals(obj.last_edit_date) &&
- last_editor.TrueEquals(obj.last_editor) &&
- link.TrueEqualsString(obj.link) &&
- owner.TrueEquals(obj.owner) &&
- post_id.TrueEquals(obj.post_id) &&
- post_type.TrueEquals(obj.post_type) &&
- score.TrueEquals(obj.score) &&
- share_link.TrueEqualsString(obj.share_link) &&
- up_vote_count.TrueEquals(obj.up_vote_count) &&
- upvoted.TrueEquals(obj.upvoted);
+ this.body.TrueEqualsString(obj.body) &&
+ this.body_markdown.TrueEqualsString(obj.body_markdown) &&
+ this.comment_count.TrueEquals(obj.comment_count) &&
+ this.comments.TrueEqualsList(obj.comments) &&
+ this.creation_date.TrueEquals(obj.creation_date) &&
+ this.down_vote_count.TrueEquals(obj.down_vote_count) &&
+ this.downvoted.TrueEquals(obj.downvoted) &&
+ this.last_activity_date.TrueEquals(obj.last_activity_date) &&
+ this.last_edit_date.TrueEquals(obj.last_edit_date) &&
+ this.last_editor.TrueEquals(obj.last_editor) &&
+ this.link.TrueEqualsString(obj.link) &&
+ this.owner.TrueEquals(obj.owner) &&
+ this.post_id.TrueEquals(obj.post_id) &&
+ this.post_type.TrueEquals(obj.post_type) &&
+ this.score.TrueEquals(obj.score) &&
+ this.share_link.TrueEqualsString(obj.share_link) &&
+ this.up_vote_count.TrueEquals(obj.up_vote_count) &&
+ this.upvoted.TrueEquals(obj.upvoted);
}
public bool EqualsDynamic(dynamic obj)
{
return
- body.TrueEqualsString((string) obj.body) &&
- body_markdown.TrueEqualsString((string) obj.body_markdown) &&
- comment_count.TrueEquals((int?) obj.comment_count) &&
- comments.TrueEqualsListDynamic((IEnumerable<dynamic>) obj.comments) &&
- creation_date.TrueEquals((DateTime?) obj.creation_date) &&
- down_vote_count.TrueEquals((int?) obj.down_vote_count) &&
- downvoted.TrueEquals((bool?) obj.downvoted) &&
- last_activity_date.TrueEquals((DateTime?) obj.last_activity_date) &&
- last_edit_date.TrueEquals((DateTime?) obj.last_edit_date) &&
- (last_editor == null && obj.last_editor == null || last_editor.EqualsDynamic(obj.last_editor)) &&
- link.TrueEqualsString((string) obj.link) &&
- (owner == null && obj.owner == null || owner.EqualsDynamic(obj.owner)) &&
- post_id.TrueEquals((int?) obj.post_id) &&
- post_type.TrueEquals((PostType?) obj.post_type) &&
- score.TrueEquals((int?) obj.score) &&
- share_link.TrueEqualsString((string) obj.share_link) &&
- up_vote_count.TrueEquals((int?) obj.up_vote_count) &&
- upvoted.TrueEquals((bool?) obj.upvoted);
+ this.body.TrueEqualsString((string)obj.body) &&
+ this.body_markdown.TrueEqualsString((string)obj.body_markdown) &&
+ this.comment_count.TrueEquals((int?)obj.comment_count) &&
+ this.comments.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.comments) &&
+ this.creation_date.TrueEquals((DateTime?)obj.creation_date) &&
+ this.down_vote_count.TrueEquals((int?)obj.down_vote_count) &&
+ this.downvoted.TrueEquals((bool?)obj.downvoted) &&
+ this.last_activity_date.TrueEquals((DateTime?)obj.last_activity_date) &&
+ this.last_edit_date.TrueEquals((DateTime?)obj.last_edit_date) &&
+ ((this.last_editor == null && obj.last_editor == null) || this.last_editor.EqualsDynamic(obj.last_editor)) &&
+ this.link.TrueEqualsString((string)obj.link) &&
+ ((this.owner == null && obj.owner == null) || this.owner.EqualsDynamic(obj.owner)) &&
+ this.post_id.TrueEquals((int?)obj.post_id) &&
+ this.post_type.TrueEquals((PostType?)obj.post_type) &&
+ this.score.TrueEquals((int?)obj.score) &&
+ this.share_link.TrueEqualsString((string)obj.share_link) &&
+ this.up_vote_count.TrueEquals((int?)obj.up_vote_count) &&
+ this.upvoted.TrueEquals((bool?)obj.upvoted);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/Privilege.cs b/benchmark/SerializerBenchmark/Models/Privilege.cs
index ae07c15e..77978c4c 100644
--- a/benchmark/SerializerBenchmark/Models/Privilege.cs
+++ b/benchmark/SerializerBenchmark/Models/Privilege.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using ProtoBuf;
namespace Benchmark.Models
@@ -7,29 +11,29 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class Privilege : IGenericEquality<Privilege>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public string short_description { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public string description { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public int? reputation { get; set; }
public bool Equals(Privilege obj)
{
return
- description.TrueEqualsString(obj.description) &&
- reputation.TrueEquals(obj.reputation) &&
- short_description.TrueEqualsString(obj.short_description);
+ this.description.TrueEqualsString(obj.description) &&
+ this.reputation.TrueEquals(obj.reputation) &&
+ this.short_description.TrueEqualsString(obj.short_description);
}
public bool EqualsDynamic(dynamic obj)
{
return
- description.TrueEqualsString((string) obj.description) &&
- reputation.TrueEquals((int?) obj.reputation) &&
- short_description.TrueEqualsString((string) obj.short_description);
+ this.description.TrueEqualsString((string)obj.description) &&
+ this.reputation.TrueEquals((int?)obj.reputation) &&
+ this.short_description.TrueEqualsString((string)obj.short_description);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/Question.cs b/benchmark/SerializerBenchmark/Models/Question.cs
index df6731a3..2b2198ce 100644
--- a/benchmark/SerializerBenchmark/Models/Question.cs
+++ b/benchmark/SerializerBenchmark/Models/Question.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using System.Collections.Generic;
using ProtoBuf;
@@ -9,291 +13,291 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class Question : IGenericEquality<Question>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? question_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public DateTime? last_edit_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public DateTime? creation_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public DateTime? last_activity_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public DateTime? locked_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public int? score { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public DateTime? community_owned_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public int? answer_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public int? accepted_answer_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public MigrationInfo migrated_to { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
public MigrationInfo migrated_from { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
public DateTime? bounty_closes_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
public int? bounty_amount { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
public DateTime? closed_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(15), oldmsgpack::MessagePack.Key(15 - 1), newmsgpack::MessagePack.Key(15 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(15), oldmsgpack::MessagePack.Key(15 - 1), newmsgpack::MessagePack.Key(15 - 1)]
public DateTime? protected_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(16), oldmsgpack::MessagePack.Key(16 - 1), newmsgpack::MessagePack.Key(16 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(16), oldmsgpack::MessagePack.Key(16 - 1), newmsgpack::MessagePack.Key(16 - 1)]
public string body { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(17), oldmsgpack::MessagePack.Key(17 - 1), newmsgpack::MessagePack.Key(17 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(17), oldmsgpack::MessagePack.Key(17 - 1), newmsgpack::MessagePack.Key(17 - 1)]
public string title { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(18), oldmsgpack::MessagePack.Key(18 - 1), newmsgpack::MessagePack.Key(18 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(18), oldmsgpack::MessagePack.Key(18 - 1), newmsgpack::MessagePack.Key(18 - 1)]
public List<string> tags { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(19), oldmsgpack::MessagePack.Key(19 - 1), newmsgpack::MessagePack.Key(19 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(19), oldmsgpack::MessagePack.Key(19 - 1), newmsgpack::MessagePack.Key(19 - 1)]
public string closed_reason { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(20), oldmsgpack::MessagePack.Key(20 - 1), newmsgpack::MessagePack.Key(20 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(20), oldmsgpack::MessagePack.Key(20 - 1), newmsgpack::MessagePack.Key(20 - 1)]
public int? up_vote_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(21), oldmsgpack::MessagePack.Key(21 - 1), newmsgpack::MessagePack.Key(21 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(21), oldmsgpack::MessagePack.Key(21 - 1), newmsgpack::MessagePack.Key(21 - 1)]
public int? down_vote_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(22), oldmsgpack::MessagePack.Key(22 - 1), newmsgpack::MessagePack.Key(22 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(22), oldmsgpack::MessagePack.Key(22 - 1), newmsgpack::MessagePack.Key(22 - 1)]
public int? favorite_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(23), oldmsgpack::MessagePack.Key(23 - 1), newmsgpack::MessagePack.Key(23 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(23), oldmsgpack::MessagePack.Key(23 - 1), newmsgpack::MessagePack.Key(23 - 1)]
public int? view_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(24), oldmsgpack::MessagePack.Key(24 - 1), newmsgpack::MessagePack.Key(24 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(24), oldmsgpack::MessagePack.Key(24 - 1), newmsgpack::MessagePack.Key(24 - 1)]
public ShallowUser owner { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(25), oldmsgpack::MessagePack.Key(25 - 1), newmsgpack::MessagePack.Key(25 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(25), oldmsgpack::MessagePack.Key(25 - 1), newmsgpack::MessagePack.Key(25 - 1)]
public List<Comment> comments { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(26), oldmsgpack::MessagePack.Key(26 - 1), newmsgpack::MessagePack.Key(26 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(26), oldmsgpack::MessagePack.Key(26 - 1), newmsgpack::MessagePack.Key(26 - 1)]
public List<Answer> answers { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(27), oldmsgpack::MessagePack.Key(27 - 1), newmsgpack::MessagePack.Key(27 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(27), oldmsgpack::MessagePack.Key(27 - 1), newmsgpack::MessagePack.Key(27 - 1)]
public string link { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(28), oldmsgpack::MessagePack.Key(28 - 1), newmsgpack::MessagePack.Key(28 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(28), oldmsgpack::MessagePack.Key(28 - 1), newmsgpack::MessagePack.Key(28 - 1)]
public bool? is_answered { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(29), oldmsgpack::MessagePack.Key(29 - 1), newmsgpack::MessagePack.Key(29 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(29), oldmsgpack::MessagePack.Key(29 - 1), newmsgpack::MessagePack.Key(29 - 1)]
public int? close_vote_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(30), oldmsgpack::MessagePack.Key(30 - 1), newmsgpack::MessagePack.Key(30 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(30), oldmsgpack::MessagePack.Key(30 - 1), newmsgpack::MessagePack.Key(30 - 1)]
public int? reopen_vote_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(31), oldmsgpack::MessagePack.Key(31 - 1), newmsgpack::MessagePack.Key(31 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(31), oldmsgpack::MessagePack.Key(31 - 1), newmsgpack::MessagePack.Key(31 - 1)]
public int? delete_vote_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(32), oldmsgpack::MessagePack.Key(32 - 1), newmsgpack::MessagePack.Key(32 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(32), oldmsgpack::MessagePack.Key(32 - 1), newmsgpack::MessagePack.Key(32 - 1)]
public Notice notice { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(33), oldmsgpack::MessagePack.Key(33 - 1), newmsgpack::MessagePack.Key(33 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(33), oldmsgpack::MessagePack.Key(33 - 1), newmsgpack::MessagePack.Key(33 - 1)]
public bool? upvoted { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(34), oldmsgpack::MessagePack.Key(34 - 1), newmsgpack::MessagePack.Key(34 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(34), oldmsgpack::MessagePack.Key(34 - 1), newmsgpack::MessagePack.Key(34 - 1)]
public bool? downvoted { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(35), oldmsgpack::MessagePack.Key(35 - 1), newmsgpack::MessagePack.Key(35 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(35), oldmsgpack::MessagePack.Key(35 - 1), newmsgpack::MessagePack.Key(35 - 1)]
public bool? favorited { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(36), oldmsgpack::MessagePack.Key(36 - 1), newmsgpack::MessagePack.Key(36 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(36), oldmsgpack::MessagePack.Key(36 - 1), newmsgpack::MessagePack.Key(36 - 1)]
public ShallowUser last_editor { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(37), oldmsgpack::MessagePack.Key(37 - 1), newmsgpack::MessagePack.Key(37 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(37), oldmsgpack::MessagePack.Key(37 - 1), newmsgpack::MessagePack.Key(37 - 1)]
public int? comment_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(38), oldmsgpack::MessagePack.Key(38 - 1), newmsgpack::MessagePack.Key(38 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(38), oldmsgpack::MessagePack.Key(38 - 1), newmsgpack::MessagePack.Key(38 - 1)]
public string body_markdown { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(39), oldmsgpack::MessagePack.Key(39 - 1), newmsgpack::MessagePack.Key(39 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(39), oldmsgpack::MessagePack.Key(39 - 1), newmsgpack::MessagePack.Key(39 - 1)]
public ClosedDetails closed_details { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(40), oldmsgpack::MessagePack.Key(40 - 1), newmsgpack::MessagePack.Key(40 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(40), oldmsgpack::MessagePack.Key(40 - 1), newmsgpack::MessagePack.Key(40 - 1)]
public string share_link { get; set; }
public bool Equals(Question obj)
{
return
- accepted_answer_id.TrueEquals(obj.accepted_answer_id) &&
- answer_count.TrueEquals(obj.answer_count) &&
- answers.TrueEqualsList(obj.answers) &&
- body.TrueEqualsString(obj.body) &&
- body_markdown.TrueEqualsString(obj.body_markdown) &&
- bounty_amount.TrueEquals(obj.bounty_amount) &&
- bounty_closes_date.TrueEquals(obj.bounty_closes_date) &&
- close_vote_count.TrueEquals(obj.close_vote_count) &&
- closed_date.TrueEquals(obj.closed_date) &&
- closed_details.TrueEquals(obj.closed_details) &&
- closed_reason.TrueEqualsString(obj.closed_reason) &&
- comment_count.TrueEquals(obj.comment_count) &&
- comments.TrueEqualsList(obj.comments) &&
- community_owned_date.TrueEquals(obj.community_owned_date) &&
- creation_date.TrueEquals(obj.creation_date) &&
- delete_vote_count.TrueEquals(obj.delete_vote_count) &&
- down_vote_count.TrueEquals(obj.down_vote_count) &&
- downvoted.TrueEquals(obj.downvoted) &&
- favorite_count.TrueEquals(obj.favorite_count) &&
- favorited.TrueEquals(obj.favorited) &&
- is_answered.TrueEquals(obj.is_answered) &&
- last_activity_date.TrueEquals(obj.last_activity_date) &&
- last_edit_date.TrueEquals(obj.last_edit_date) &&
- last_editor.TrueEquals(obj.last_editor) &&
- link.TrueEqualsString(obj.link) &&
- locked_date.TrueEquals(obj.locked_date) &&
- migrated_from.TrueEquals(obj.migrated_from) &&
- migrated_to.TrueEquals(obj.migrated_to) &&
- notice.TrueEquals(obj.notice) &&
- owner.TrueEquals(obj.owner) &&
- protected_date.TrueEquals(obj.protected_date) &&
- question_id.TrueEquals(obj.question_id) &&
- reopen_vote_count.TrueEquals(obj.reopen_vote_count) &&
- score.TrueEquals(obj.score) &&
- share_link.TrueEqualsString(obj.share_link) &&
- tags.TrueEqualsString(obj.tags) &&
- title.TrueEqualsString(obj.title) &&
- up_vote_count.TrueEquals(obj.up_vote_count) &&
- upvoted.TrueEquals(obj.upvoted) &&
- view_count.TrueEquals(obj.view_count);
+ this.accepted_answer_id.TrueEquals(obj.accepted_answer_id) &&
+ this.answer_count.TrueEquals(obj.answer_count) &&
+ this.answers.TrueEqualsList(obj.answers) &&
+ this.body.TrueEqualsString(obj.body) &&
+ this.body_markdown.TrueEqualsString(obj.body_markdown) &&
+ this.bounty_amount.TrueEquals(obj.bounty_amount) &&
+ this.bounty_closes_date.TrueEquals(obj.bounty_closes_date) &&
+ this.close_vote_count.TrueEquals(obj.close_vote_count) &&
+ this.closed_date.TrueEquals(obj.closed_date) &&
+ this.closed_details.TrueEquals(obj.closed_details) &&
+ this.closed_reason.TrueEqualsString(obj.closed_reason) &&
+ this.comment_count.TrueEquals(obj.comment_count) &&
+ this.comments.TrueEqualsList(obj.comments) &&
+ this.community_owned_date.TrueEquals(obj.community_owned_date) &&
+ this.creation_date.TrueEquals(obj.creation_date) &&
+ this.delete_vote_count.TrueEquals(obj.delete_vote_count) &&
+ this.down_vote_count.TrueEquals(obj.down_vote_count) &&
+ this.downvoted.TrueEquals(obj.downvoted) &&
+ this.favorite_count.TrueEquals(obj.favorite_count) &&
+ this.favorited.TrueEquals(obj.favorited) &&
+ this.is_answered.TrueEquals(obj.is_answered) &&
+ this.last_activity_date.TrueEquals(obj.last_activity_date) &&
+ this.last_edit_date.TrueEquals(obj.last_edit_date) &&
+ this.last_editor.TrueEquals(obj.last_editor) &&
+ this.link.TrueEqualsString(obj.link) &&
+ this.locked_date.TrueEquals(obj.locked_date) &&
+ this.migrated_from.TrueEquals(obj.migrated_from) &&
+ this.migrated_to.TrueEquals(obj.migrated_to) &&
+ this.notice.TrueEquals(obj.notice) &&
+ this.owner.TrueEquals(obj.owner) &&
+ this.protected_date.TrueEquals(obj.protected_date) &&
+ this.question_id.TrueEquals(obj.question_id) &&
+ this.reopen_vote_count.TrueEquals(obj.reopen_vote_count) &&
+ this.score.TrueEquals(obj.score) &&
+ this.share_link.TrueEqualsString(obj.share_link) &&
+ this.tags.TrueEqualsString(obj.tags) &&
+ this.title.TrueEqualsString(obj.title) &&
+ this.up_vote_count.TrueEquals(obj.up_vote_count) &&
+ this.upvoted.TrueEquals(obj.upvoted) &&
+ this.view_count.TrueEquals(obj.view_count);
}
public bool EqualsDynamic(dynamic obj)
{
return
- accepted_answer_id.TrueEquals((int?) obj.accepted_answer_id) &&
- answer_count.TrueEquals((int?) obj.answer_count) &&
- answers.TrueEqualsListDynamic((IEnumerable<dynamic>) obj.answers) &&
- body.TrueEqualsString((string) obj.body) &&
- body_markdown.TrueEqualsString((string) obj.body_markdown) &&
- bounty_amount.TrueEquals((int?) obj.bounty_amount) &&
- bounty_closes_date.TrueEquals((DateTime?) obj.bounty_closes_date) &&
- close_vote_count.TrueEquals((int?) obj.close_vote_count) &&
- closed_date.TrueEquals((DateTime?) obj.closed_date) &&
- (closed_details == null && obj.closed_details == null ||
- closed_details.EqualsDynamic(obj.closed_details)) &&
- closed_reason.TrueEqualsString((string) obj.closed_reason) &&
- comment_count.TrueEquals((int?) obj.comment_count) &&
- comments.TrueEqualsListDynamic((IEnumerable<dynamic>) obj.comments) &&
- community_owned_date.TrueEquals((DateTime?) obj.community_owned_date) &&
- creation_date.TrueEquals((DateTime?) obj.creation_date) &&
- delete_vote_count.TrueEquals((int?) obj.delete_vote_count) &&
- down_vote_count.TrueEquals((int?) obj.down_vote_count) &&
- downvoted.TrueEquals((bool?) obj.downvoted) &&
- favorite_count.TrueEquals((int?) obj.favorite_count) &&
- favorited.TrueEquals((bool?) obj.favorited) &&
- is_answered.TrueEquals((bool?) obj.is_answered) &&
- last_activity_date.TrueEquals((DateTime?) obj.last_activity_date) &&
- last_edit_date.TrueEquals((DateTime?) obj.last_edit_date) &&
- (last_editor == null && obj.last_editor == null || last_editor.EqualsDynamic(obj.last_editor)) &&
- link.TrueEqualsString((string) obj.link) &&
- locked_date.TrueEquals((DateTime?) obj.locked_date) &&
- (migrated_from == null && obj.migrated_from == null ||
- migrated_from.EqualsDynamic(obj.migrated_from)) &&
- (migrated_to == null && obj.migrated_to == null || migrated_to.EqualsDynamic(obj.migrated_to)) &&
- (notice == null && obj.notice == null || notice.EqualsDynamic(obj.notice)) &&
- (owner == null && obj.owner == null || owner.EqualsDynamic(obj.owner)) &&
- protected_date.TrueEquals((DateTime?) obj.protected_date) &&
- question_id.TrueEquals((int?) obj.question_id) &&
- reopen_vote_count.TrueEquals((int?) obj.reopen_vote_count) &&
- score.TrueEquals((int?) obj.score) &&
- share_link.TrueEqualsString((string) obj.share_link) &&
- tags.TrueEqualsString((IEnumerable<string>) obj.tags) &&
- title.TrueEqualsString((string) obj.title) &&
- up_vote_count.TrueEquals((int?) obj.up_vote_count) &&
- upvoted.TrueEquals((bool?) obj.upvoted) &&
- view_count.TrueEquals((int?) obj.view_count);
+ this.accepted_answer_id.TrueEquals((int?)obj.accepted_answer_id) &&
+ this.answer_count.TrueEquals((int?)obj.answer_count) &&
+ this.answers.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.answers) &&
+ this.body.TrueEqualsString((string)obj.body) &&
+ this.body_markdown.TrueEqualsString((string)obj.body_markdown) &&
+ this.bounty_amount.TrueEquals((int?)obj.bounty_amount) &&
+ this.bounty_closes_date.TrueEquals((DateTime?)obj.bounty_closes_date) &&
+ this.close_vote_count.TrueEquals((int?)obj.close_vote_count) &&
+ this.closed_date.TrueEquals((DateTime?)obj.closed_date) &&
+ ((this.closed_details == null && obj.closed_details == null) ||
+ this.closed_details.EqualsDynamic(obj.closed_details)) &&
+ this.closed_reason.TrueEqualsString((string)obj.closed_reason) &&
+ this.comment_count.TrueEquals((int?)obj.comment_count) &&
+ this.comments.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.comments) &&
+ this.community_owned_date.TrueEquals((DateTime?)obj.community_owned_date) &&
+ this.creation_date.TrueEquals((DateTime?)obj.creation_date) &&
+ this.delete_vote_count.TrueEquals((int?)obj.delete_vote_count) &&
+ this.down_vote_count.TrueEquals((int?)obj.down_vote_count) &&
+ this.downvoted.TrueEquals((bool?)obj.downvoted) &&
+ this.favorite_count.TrueEquals((int?)obj.favorite_count) &&
+ this.favorited.TrueEquals((bool?)obj.favorited) &&
+ this.is_answered.TrueEquals((bool?)obj.is_answered) &&
+ this.last_activity_date.TrueEquals((DateTime?)obj.last_activity_date) &&
+ this.last_edit_date.TrueEquals((DateTime?)obj.last_edit_date) &&
+ ((this.last_editor == null && obj.last_editor == null) || this.last_editor.EqualsDynamic(obj.last_editor)) &&
+ this.link.TrueEqualsString((string)obj.link) &&
+ this.locked_date.TrueEquals((DateTime?)obj.locked_date) &&
+ ((this.migrated_from == null && obj.migrated_from == null) ||
+ this.migrated_from.EqualsDynamic(obj.migrated_from)) &&
+ ((this.migrated_to == null && obj.migrated_to == null) || this.migrated_to.EqualsDynamic(obj.migrated_to)) &&
+ ((this.notice == null && obj.notice == null) || this.notice.EqualsDynamic(obj.notice)) &&
+ ((this.owner == null && obj.owner == null) || this.owner.EqualsDynamic(obj.owner)) &&
+ this.protected_date.TrueEquals((DateTime?)obj.protected_date) &&
+ this.question_id.TrueEquals((int?)obj.question_id) &&
+ this.reopen_vote_count.TrueEquals((int?)obj.reopen_vote_count) &&
+ this.score.TrueEquals((int?)obj.score) &&
+ this.share_link.TrueEqualsString((string)obj.share_link) &&
+ this.tags.TrueEqualsString((IEnumerable<string>)obj.tags) &&
+ this.title.TrueEqualsString((string)obj.title) &&
+ this.up_vote_count.TrueEquals((int?)obj.up_vote_count) &&
+ this.upvoted.TrueEquals((bool?)obj.upvoted) &&
+ this.view_count.TrueEquals((int?)obj.view_count);
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class ClosedDetails : IGenericEquality<ClosedDetails>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public bool? on_hold { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public string reason { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public string description { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public List<ShallowUser> by_users { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public List<OriginalQuestion> original_questions { get; set; }
public bool Equals(ClosedDetails obj)
{
return
- by_users.TrueEqualsList(obj.by_users) &&
- description.TrueEqualsString(obj.description) &&
- on_hold.TrueEquals(obj.on_hold) &&
- original_questions.TrueEqualsList(obj.original_questions) &&
- reason.TrueEqualsString(obj.reason);
+ this.by_users.TrueEqualsList(obj.by_users) &&
+ this.description.TrueEqualsString(obj.description) &&
+ this.on_hold.TrueEquals(obj.on_hold) &&
+ this.original_questions.TrueEqualsList(obj.original_questions) &&
+ this.reason.TrueEqualsString(obj.reason);
}
public bool EqualsDynamic(dynamic obj)
{
- var oq = obj.original_questions;
- var oqI = (IEnumerable<dynamic>) oq;
+ dynamic oq = obj.original_questions;
+ var oqI = (IEnumerable<dynamic>)oq;
return
- by_users.TrueEqualsListDynamic((IEnumerable<dynamic>) obj.by_users) &&
- description.TrueEqualsString((string) obj.description) &&
- on_hold.TrueEquals((bool?) obj.on_hold) &&
- //this.original_questions.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.original_questions) &&
- original_questions.TrueEqualsListDynamic(oqI) &&
- reason.TrueEqualsString((string) obj.reason);
+ this.by_users.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.by_users) &&
+ this.description.TrueEqualsString((string)obj.description) &&
+ this.on_hold.TrueEquals((bool?)obj.on_hold) &&
+ ////this.original_questions.TrueEqualsListDynamic((IEnumerable<dynamic>)obj.original_questions) &&
+ this.original_questions.TrueEqualsListDynamic(oqI) &&
+ this.reason.TrueEqualsString((string)obj.reason);
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class OriginalQuestion : IGenericEquality<OriginalQuestion>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? question_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public string title { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public int? answer_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public int? accepted_answer_id { get; set; }
public bool Equals(OriginalQuestion obj)
{
return
- accepted_answer_id.TrueEquals(obj.accepted_answer_id) &&
- answer_count.TrueEquals(obj.answer_count) &&
- question_id.TrueEquals(obj.question_id) &&
- title.TrueEqualsString(obj.title);
+ this.accepted_answer_id.TrueEquals(obj.accepted_answer_id) &&
+ this.answer_count.TrueEquals(obj.answer_count) &&
+ this.question_id.TrueEquals(obj.question_id) &&
+ this.title.TrueEqualsString(obj.title);
}
public bool EqualsDynamic(dynamic obj)
{
return
- accepted_answer_id.TrueEquals((int?) obj.accepted_answer_id) &&
- answer_count.TrueEquals((int?) obj.answer_count) &&
- question_id.TrueEquals((int?) obj.question_id) &&
- title.TrueEqualsString((string) obj.title);
+ this.accepted_answer_id.TrueEquals((int?)obj.accepted_answer_id) &&
+ this.answer_count.TrueEquals((int?)obj.answer_count) &&
+ this.question_id.TrueEquals((int?)obj.question_id) &&
+ this.title.TrueEqualsString((string)obj.title);
}
}
}
@@ -301,59 +305,59 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class Notice : IGenericEquality<Notice>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public string body { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public DateTime? creation_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public int? owner_user_id { get; set; }
public bool Equals(Notice obj)
{
return
- body.TrueEqualsString(obj.body) &&
- creation_date.TrueEquals(obj.creation_date) &&
- owner_user_id.TrueEquals(obj.owner_user_id);
+ this.body.TrueEqualsString(obj.body) &&
+ this.creation_date.TrueEquals(obj.creation_date) &&
+ this.owner_user_id.TrueEquals(obj.owner_user_id);
}
public bool EqualsDynamic(dynamic obj)
{
return
- body.TrueEqualsString((string) obj.body) &&
- creation_date.TrueEquals((DateTime?) obj.creation_date) &&
- owner_user_id.TrueEquals((int?) obj.owner_user_id);
+ this.body.TrueEqualsString((string)obj.body) &&
+ this.creation_date.TrueEquals((DateTime?)obj.creation_date) &&
+ this.owner_user_id.TrueEquals((int?)obj.owner_user_id);
}
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class MigrationInfo : IGenericEquality<MigrationInfo>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? question_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public Info.Site other_site { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public DateTime? on_date { get; set; }
public bool Equals(MigrationInfo obj)
{
return
- on_date.TrueEquals(obj.on_date) &&
- other_site.TrueEquals(obj.other_site) &&
- question_id.TrueEquals(obj.question_id);
+ this.on_date.TrueEquals(obj.on_date) &&
+ this.other_site.TrueEquals(obj.other_site) &&
+ this.question_id.TrueEquals(obj.question_id);
}
public bool EqualsDynamic(dynamic obj)
{
return
- on_date.TrueEquals((DateTime?) obj.on_date) &&
- (other_site == null && obj.other_site == null || other_site.EqualsDynamic(obj.other_site)) &&
- question_id.TrueEquals((int?) obj.question_id);
+ this.on_date.TrueEquals((DateTime?)obj.on_date) &&
+ ((this.other_site == null && obj.other_site == null) || this.other_site.EqualsDynamic(obj.other_site)) &&
+ this.question_id.TrueEquals((int?)obj.question_id);
}
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/QuestionTimeline.cs b/benchmark/SerializerBenchmark/Models/QuestionTimeline.cs
index 186d5a1e..5d69bd5d 100644
--- a/benchmark/SerializerBenchmark/Models/QuestionTimeline.cs
+++ b/benchmark/SerializerBenchmark/Models/QuestionTimeline.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using ProtoBuf;
@@ -14,70 +18,70 @@ namespace Benchmark.Models
accepted_answer = 5,
vote_aggregate = 6,
revision = 7,
- post_state_changed = 8
+ post_state_changed = 8,
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class QuestionTimeline : IGenericEquality<QuestionTimeline>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public QuestionTimelineAction? timeline_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public int? question_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public int? post_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public int? comment_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public string revision_guid { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public int? up_vote_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public int? down_vote_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public DateTime? creation_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public ShallowUser user { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public ShallowUser owner { get; set; }
public bool Equals(QuestionTimeline obj)
{
return
- comment_id.TrueEquals(obj.comment_id) &&
- creation_date.TrueEquals(obj.creation_date) &&
- down_vote_count.TrueEquals(obj.down_vote_count) &&
- owner.TrueEquals(obj.owner) &&
- post_id.TrueEquals(obj.post_id) &&
- question_id.TrueEquals(obj.question_id) &&
- revision_guid.TrueEqualsString(obj.revision_guid) &&
- timeline_type.TrueEquals(obj.timeline_type) &&
- up_vote_count.TrueEquals(obj.up_vote_count) &&
- user.TrueEquals(obj.user);
+ this.comment_id.TrueEquals(obj.comment_id) &&
+ this.creation_date.TrueEquals(obj.creation_date) &&
+ this.down_vote_count.TrueEquals(obj.down_vote_count) &&
+ this.owner.TrueEquals(obj.owner) &&
+ this.post_id.TrueEquals(obj.post_id) &&
+ this.question_id.TrueEquals(obj.question_id) &&
+ this.revision_guid.TrueEqualsString(obj.revision_guid) &&
+ this.timeline_type.TrueEquals(obj.timeline_type) &&
+ this.up_vote_count.TrueEquals(obj.up_vote_count) &&
+ this.user.TrueEquals(obj.user);
}
public bool EqualsDynamic(dynamic obj)
{
return
- comment_id.TrueEquals((int?) obj.comment_id) &&
- creation_date.TrueEquals((DateTime?) obj.creation_date) &&
- down_vote_count.TrueEquals((int?) obj.down_vote_count) &&
- (owner == null && obj.owner == null || owner.EqualsDynamic(obj.owner)) &&
- post_id.TrueEquals((int?) obj.post_id) &&
- question_id.TrueEquals((int?) obj.question_id) &&
- revision_guid.TrueEqualsString((string) obj.revision_guid) &&
- timeline_type.TrueEquals((QuestionTimelineAction?) obj.timeline_type) &&
- up_vote_count.TrueEquals((int?) obj.up_vote_count) &&
- (user == null && obj.user == null || user.EqualsDynamic(obj.user));
+ this.comment_id.TrueEquals((int?)obj.comment_id) &&
+ this.creation_date.TrueEquals((DateTime?)obj.creation_date) &&
+ this.down_vote_count.TrueEquals((int?)obj.down_vote_count) &&
+ ((this.owner == null && obj.owner == null) || this.owner.EqualsDynamic(obj.owner)) &&
+ this.post_id.TrueEquals((int?)obj.post_id) &&
+ this.question_id.TrueEquals((int?)obj.question_id) &&
+ this.revision_guid.TrueEqualsString((string)obj.revision_guid) &&
+ this.timeline_type.TrueEquals((QuestionTimelineAction?)obj.timeline_type) &&
+ this.up_vote_count.TrueEquals((int?)obj.up_vote_count) &&
+ ((this.user == null && obj.user == null) || this.user.EqualsDynamic(obj.user));
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/Reputation.cs b/benchmark/SerializerBenchmark/Models/Reputation.cs
index 8b00d8dd..d750dfd7 100644
--- a/benchmark/SerializerBenchmark/Models/Reputation.cs
+++ b/benchmark/SerializerBenchmark/Models/Reputation.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using ProtoBuf;
@@ -13,60 +17,60 @@ namespace Benchmark.Models
accepts = 1,
bounties_won = 9,
bounties_offered = 8,
- suggested_edits = 16
+ suggested_edits = 16,
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class Reputation : IGenericEquality<Reputation>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? user_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public int? post_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public PostType? post_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public VoteType? vote_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public string title { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public string link { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public int? reputation_change { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public DateTime? on_date { get; set; }
public bool Equals(Reputation obj)
{
return
- link.TrueEqualsString(obj.link) &&
- on_date.TrueEquals(obj.on_date) &&
- post_id.TrueEquals(obj.post_id) &&
- post_type.TrueEquals(obj.post_type) &&
- reputation_change.TrueEquals(obj.reputation_change) &&
- title.TrueEqualsString(obj.title) &&
- user_id.TrueEquals(obj.user_id) &&
- vote_type.TrueEquals(obj.vote_type);
+ this.link.TrueEqualsString(obj.link) &&
+ this.on_date.TrueEquals(obj.on_date) &&
+ this.post_id.TrueEquals(obj.post_id) &&
+ this.post_type.TrueEquals(obj.post_type) &&
+ this.reputation_change.TrueEquals(obj.reputation_change) &&
+ this.title.TrueEqualsString(obj.title) &&
+ this.user_id.TrueEquals(obj.user_id) &&
+ this.vote_type.TrueEquals(obj.vote_type);
}
public bool EqualsDynamic(dynamic obj)
{
return
- link.TrueEqualsString((string) obj.link) &&
- on_date.TrueEquals((DateTime?) obj.on_date) &&
- post_id.TrueEquals((int?) obj.post_id) &&
- post_type.TrueEquals((PostType?) obj.post_type) &&
- reputation_change.TrueEquals((int?) obj.reputation_change) &&
- title.TrueEqualsString((string) obj.title) &&
- user_id.TrueEquals((int?) obj.user_id) &&
- vote_type.TrueEquals((VoteType?) obj.vote_type);
+ this.link.TrueEqualsString((string)obj.link) &&
+ this.on_date.TrueEquals((DateTime?)obj.on_date) &&
+ this.post_id.TrueEquals((int?)obj.post_id) &&
+ this.post_type.TrueEquals((PostType?)obj.post_type) &&
+ this.reputation_change.TrueEquals((int?)obj.reputation_change) &&
+ this.title.TrueEqualsString((string)obj.title) &&
+ this.user_id.TrueEquals((int?)obj.user_id) &&
+ this.vote_type.TrueEquals((VoteType?)obj.vote_type);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/ReputationHistory.cs b/benchmark/SerializerBenchmark/Models/ReputationHistory.cs
index 9f57aa01..a084eb3e 100644
--- a/benchmark/SerializerBenchmark/Models/ReputationHistory.cs
+++ b/benchmark/SerializerBenchmark/Models/ReputationHistory.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using ProtoBuf;
@@ -42,42 +46,42 @@ namespace Benchmark.Models
post_migrated = 22,
- user_deleted = 23
+ user_deleted = 23,
}
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? user_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public DateTime? creation_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public int? post_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public int? reputation_change { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public ReputationHistoryType? reputation_history_type { get; set; }
public bool Equals(ReputationHistory obj)
{
return
- creation_date.TrueEquals(obj.creation_date) &&
- post_id.TrueEquals(obj.post_id) &&
- reputation_change.TrueEquals(obj.reputation_change) &&
- reputation_history_type.TrueEquals(obj.reputation_history_type) &&
- user_id.TrueEquals(obj.user_id);
+ this.creation_date.TrueEquals(obj.creation_date) &&
+ this.post_id.TrueEquals(obj.post_id) &&
+ this.reputation_change.TrueEquals(obj.reputation_change) &&
+ this.reputation_history_type.TrueEquals(obj.reputation_history_type) &&
+ this.user_id.TrueEquals(obj.user_id);
}
public bool EqualsDynamic(dynamic obj)
{
return
- creation_date.TrueEquals((DateTime?) obj.creation_date) &&
- post_id.TrueEquals((int?) obj.post_id) &&
- reputation_change.TrueEquals((int?) obj.reputation_change) &&
- reputation_history_type.TrueEquals((ReputationHistoryType?) obj.reputation_history_type) &&
- user_id.TrueEquals((int?) obj.user_id);
+ this.creation_date.TrueEquals((DateTime?)obj.creation_date) &&
+ this.post_id.TrueEquals((int?)obj.post_id) &&
+ this.reputation_change.TrueEquals((int?)obj.reputation_change) &&
+ this.reputation_history_type.TrueEquals((ReputationHistoryType?)obj.reputation_history_type) &&
+ this.user_id.TrueEquals((int?)obj.user_id);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/Revision.cs b/benchmark/SerializerBenchmark/Models/Revision.cs
index f4d62d34..b76d385c 100644
--- a/benchmark/SerializerBenchmark/Models/Revision.cs
+++ b/benchmark/SerializerBenchmark/Models/Revision.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using System.Collections.Generic;
using ProtoBuf;
@@ -9,100 +13,100 @@ namespace Benchmark.Models
public enum RevisionType : byte
{
single_user = 1,
- vote_based = 2
+ vote_based = 2,
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class Revision : IGenericEquality<Revision>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public string revision_guid { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public int? revision_number { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public RevisionType? revision_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public PostType? post_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public int? post_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public string comment { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public DateTime? creation_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public bool? is_rollback { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public string last_body { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public string last_title { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
public List<string> last_tags { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
public string body { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
public string title { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
public List<string> tags { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(15), oldmsgpack::MessagePack.Key(15 - 1), newmsgpack::MessagePack.Key(15 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(15), oldmsgpack::MessagePack.Key(15 - 1), newmsgpack::MessagePack.Key(15 - 1)]
public bool? set_community_wiki { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(16), oldmsgpack::MessagePack.Key(16 - 1), newmsgpack::MessagePack.Key(16 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(16), oldmsgpack::MessagePack.Key(16 - 1), newmsgpack::MessagePack.Key(16 - 1)]
public ShallowUser user { get; set; }
public bool Equals(Revision obj)
{
return
- body.TrueEqualsString(obj.body) &&
- comment.TrueEqualsString(obj.comment) &&
- creation_date.TrueEquals(obj.creation_date) &&
- is_rollback.TrueEquals(obj.is_rollback) &&
- last_body.TrueEqualsString(obj.last_body) &&
- last_tags.TrueEqualsString(obj.last_tags) &&
- last_title.TrueEqualsString(obj.last_title) &&
- post_id.TrueEquals(obj.post_id) &&
- post_type.TrueEquals(obj.post_type) &&
- revision_guid.TrueEqualsString(obj.revision_guid) &&
- revision_number.TrueEquals(obj.revision_number) &&
- revision_type.TrueEquals(obj.revision_type) &&
- set_community_wiki.TrueEquals(obj.set_community_wiki) &&
- tags.TrueEqualsString(obj.tags) &&
- title.TrueEqualsString(obj.title) &&
- user.TrueEquals(obj.user);
+ this.body.TrueEqualsString(obj.body) &&
+ this.comment.TrueEqualsString(obj.comment) &&
+ this.creation_date.TrueEquals(obj.creation_date) &&
+ this.is_rollback.TrueEquals(obj.is_rollback) &&
+ this.last_body.TrueEqualsString(obj.last_body) &&
+ this.last_tags.TrueEqualsString(obj.last_tags) &&
+ this.last_title.TrueEqualsString(obj.last_title) &&
+ this.post_id.TrueEquals(obj.post_id) &&
+ this.post_type.TrueEquals(obj.post_type) &&
+ this.revision_guid.TrueEqualsString(obj.revision_guid) &&
+ this.revision_number.TrueEquals(obj.revision_number) &&
+ this.revision_type.TrueEquals(obj.revision_type) &&
+ this.set_community_wiki.TrueEquals(obj.set_community_wiki) &&
+ this.tags.TrueEqualsString(obj.tags) &&
+ this.title.TrueEqualsString(obj.title) &&
+ this.user.TrueEquals(obj.user);
}
public bool EqualsDynamic(dynamic obj)
{
return
- body.TrueEqualsString((string) obj.body) &&
- comment.TrueEqualsString((string) obj.comment) &&
- creation_date.TrueEquals((DateTime?) obj.creation_date) &&
- is_rollback.TrueEquals((bool?) obj.is_rollback) &&
- last_body.TrueEqualsString((string) obj.last_body) &&
- last_tags.TrueEqualsString((IEnumerable<string>) obj.last_tags) &&
- last_title.TrueEqualsString((string) obj.last_title) &&
- post_id.TrueEquals((int?) obj.post_id) &&
- post_type.TrueEquals((PostType?) obj.post_type) &&
- revision_guid.TrueEqualsString((string) obj.revision_guid) &&
- revision_number.TrueEquals((int?) obj.revision_number) &&
- revision_type.TrueEquals((RevisionType?) obj.revision_type) &&
- set_community_wiki.TrueEquals((bool?) obj.set_community_wiki) &&
- tags.TrueEqualsString((IEnumerable<string>) obj.tags) &&
- title.TrueEqualsString((string) obj.title) &&
- (user == null && obj.user == null || user.EqualsDynamic(obj.user));
+ this.body.TrueEqualsString((string)obj.body) &&
+ this.comment.TrueEqualsString((string)obj.comment) &&
+ this.creation_date.TrueEquals((DateTime?)obj.creation_date) &&
+ this.is_rollback.TrueEquals((bool?)obj.is_rollback) &&
+ this.last_body.TrueEqualsString((string)obj.last_body) &&
+ this.last_tags.TrueEqualsString((IEnumerable<string>)obj.last_tags) &&
+ this.last_title.TrueEqualsString((string)obj.last_title) &&
+ this.post_id.TrueEquals((int?)obj.post_id) &&
+ this.post_type.TrueEquals((PostType?)obj.post_type) &&
+ this.revision_guid.TrueEqualsString((string)obj.revision_guid) &&
+ this.revision_number.TrueEquals((int?)obj.revision_number) &&
+ this.revision_type.TrueEquals((RevisionType?)obj.revision_type) &&
+ this.set_community_wiki.TrueEquals((bool?)obj.set_community_wiki) &&
+ this.tags.TrueEqualsString((IEnumerable<string>)obj.tags) &&
+ this.title.TrueEqualsString((string)obj.title) &&
+ ((this.user == null && obj.user == null) || this.user.EqualsDynamic(obj.user));
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/SearchExcerpt.cs b/benchmark/SerializerBenchmark/Models/SearchExcerpt.cs
index 85912ba5..a5d85e31 100644
--- a/benchmark/SerializerBenchmark/Models/SearchExcerpt.cs
+++ b/benchmark/SerializerBenchmark/Models/SearchExcerpt.cs
@@ -1,119 +1,125 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using System.Collections.Generic;
using ProtoBuf;
+#pragma warning disable SA1300 // Element should begin with upper-case letter
+
namespace Benchmark.Models
{
public enum SearchExcerptItemType : byte
{
question = 1,
- answer = 2
+ answer = 2,
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class SearchExcerpt : IGenericEquality<SearchExcerpt>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public string title { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public string excerpt { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public DateTime? community_owned_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public DateTime? locked_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public DateTime? creation_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public DateTime? last_activity_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public ShallowUser owner { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public ShallowUser last_activity_user { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public int? score { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public SearchExcerptItemType? item_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
public string body { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
public int? question_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
public bool? is_answered { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
public int? answer_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(15), oldmsgpack::MessagePack.Key(15 - 1), newmsgpack::MessagePack.Key(15 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(15), oldmsgpack::MessagePack.Key(15 - 1), newmsgpack::MessagePack.Key(15 - 1)]
public List<string> tags { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(16), oldmsgpack::MessagePack.Key(16 - 1), newmsgpack::MessagePack.Key(16 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(16), oldmsgpack::MessagePack.Key(16 - 1), newmsgpack::MessagePack.Key(16 - 1)]
public DateTime? closed_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(17), oldmsgpack::MessagePack.Key(17 - 1), newmsgpack::MessagePack.Key(17 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(17), oldmsgpack::MessagePack.Key(17 - 1), newmsgpack::MessagePack.Key(17 - 1)]
public int? answer_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(18), oldmsgpack::MessagePack.Key(18 - 1), newmsgpack::MessagePack.Key(18 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(18), oldmsgpack::MessagePack.Key(18 - 1), newmsgpack::MessagePack.Key(18 - 1)]
public bool? is_accepted { get; set; }
public bool Equals(SearchExcerpt obj)
{
return
- answer_count.TrueEquals(obj.answer_count) &&
- answer_id.TrueEquals(obj.answer_id) &&
- body.TrueEqualsString(obj.body) &&
- closed_date.TrueEquals(obj.closed_date) &&
- community_owned_date.TrueEquals(obj.community_owned_date) &&
- creation_date.TrueEquals(obj.creation_date) &&
- excerpt.TrueEqualsString(obj.excerpt) &&
- is_accepted.TrueEquals(obj.is_accepted) &&
- is_answered.TrueEquals(obj.is_answered) &&
- item_type.TrueEquals(obj.item_type) &&
- last_activity_date.TrueEquals(obj.last_activity_date) &&
- last_activity_user.TrueEquals(obj.last_activity_user) &&
- locked_date.TrueEquals(obj.locked_date) &&
- owner.TrueEquals(obj.owner) &&
- question_id.TrueEquals(obj.question_id) &&
- score.TrueEquals(obj.score) &&
- tags.TrueEqualsString(obj.tags) &&
- title.TrueEqualsString(obj.title);
+ this.answer_count.TrueEquals(obj.answer_count) &&
+ this.answer_id.TrueEquals(obj.answer_id) &&
+ this.body.TrueEqualsString(obj.body) &&
+ this.closed_date.TrueEquals(obj.closed_date) &&
+ this.community_owned_date.TrueEquals(obj.community_owned_date) &&
+ this.creation_date.TrueEquals(obj.creation_date) &&
+ this.excerpt.TrueEqualsString(obj.excerpt) &&
+ this.is_accepted.TrueEquals(obj.is_accepted) &&
+ this.is_answered.TrueEquals(obj.is_answered) &&
+ this.item_type.TrueEquals(obj.item_type) &&
+ this.last_activity_date.TrueEquals(obj.last_activity_date) &&
+ this.last_activity_user.TrueEquals(obj.last_activity_user) &&
+ this.locked_date.TrueEquals(obj.locked_date) &&
+ this.owner.TrueEquals(obj.owner) &&
+ this.question_id.TrueEquals(obj.question_id) &&
+ this.score.TrueEquals(obj.score) &&
+ this.tags.TrueEqualsString(obj.tags) &&
+ this.title.TrueEqualsString(obj.title);
}
public bool EqualsDynamic(dynamic obj)
{
return
- answer_count.TrueEquals((int?) obj.answer_count) &&
- answer_id.TrueEquals((int?) obj.answer_id) &&
- body.TrueEqualsString((string) obj.body) &&
- closed_date.TrueEquals((DateTime?) obj.closed_date) &&
- community_owned_date.TrueEquals((DateTime?) obj.community_owned_date) &&
- creation_date.TrueEquals((DateTime?) obj.creation_date) &&
- excerpt.TrueEqualsString((string) obj.excerpt) &&
- is_accepted.TrueEquals((bool?) obj.is_accepted) &&
- is_answered.TrueEquals((bool?) obj.is_answered) &&
- item_type.TrueEquals((SearchExcerptItemType?) obj.item_type) &&
- last_activity_date.TrueEquals((DateTime?) obj.last_activity_date) &&
- (last_activity_user == null && obj.last_activity_user == null ||
- last_activity_user.EqualsDynamic(obj.last_activity_user)) &&
- locked_date.TrueEquals((DateTime?) obj.locked_date) &&
- (owner == null && obj.owner == null || owner.EqualsDynamic(obj.owner)) &&
- question_id.TrueEquals((int?) obj.question_id) &&
- score.TrueEquals((int?) obj.score) &&
- tags.TrueEqualsString((IEnumerable<string>) obj.tags) &&
- title.TrueEqualsString((string) obj.title);
+ this.answer_count.TrueEquals((int?)obj.answer_count) &&
+ this.answer_id.TrueEquals((int?)obj.answer_id) &&
+ this.body.TrueEqualsString((string)obj.body) &&
+ this.closed_date.TrueEquals((DateTime?)obj.closed_date) &&
+ this.community_owned_date.TrueEquals((DateTime?)obj.community_owned_date) &&
+ this.creation_date.TrueEquals((DateTime?)obj.creation_date) &&
+ this.excerpt.TrueEqualsString((string)obj.excerpt) &&
+ this.is_accepted.TrueEquals((bool?)obj.is_accepted) &&
+ this.is_answered.TrueEquals((bool?)obj.is_answered) &&
+ this.item_type.TrueEquals((SearchExcerptItemType?)obj.item_type) &&
+ this.last_activity_date.TrueEquals((DateTime?)obj.last_activity_date) &&
+ ((this.last_activity_user == null && obj.last_activity_user == null) ||
+ this.last_activity_user.EqualsDynamic(obj.last_activity_user)) &&
+ this.locked_date.TrueEquals((DateTime?)obj.locked_date) &&
+ ((this.owner == null && obj.owner == null) || this.owner.EqualsDynamic(obj.owner)) &&
+ this.question_id.TrueEquals((int?)obj.question_id) &&
+ this.score.TrueEquals((int?)obj.score) &&
+ this.tags.TrueEqualsString((IEnumerable<string>)obj.tags) &&
+ this.title.TrueEqualsString((string)obj.title);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/ShallowUser.cs b/benchmark/SerializerBenchmark/Models/ShallowUser.cs
index 2a5da846..2d3efd0a 100644
--- a/benchmark/SerializerBenchmark/Models/ShallowUser.cs
+++ b/benchmark/SerializerBenchmark/Models/ShallowUser.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using ProtoBuf;
namespace Benchmark.Models
@@ -9,60 +13,60 @@ namespace Benchmark.Models
unregistered = 2,
registered = 3,
moderator = 4,
- does_not_exist = 255
+ does_not_exist = 255,
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class ShallowUser : IGenericEquality<ShallowUser>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? user_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public string display_name { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public int? reputation { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public UserType? user_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public string profile_image { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public string link { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public int? accept_rate { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public User.BadgeCount badge_counts { get; set; }
public bool Equals(ShallowUser obj)
{
return
- accept_rate.TrueEquals(obj.accept_rate) &&
- badge_counts.TrueEquals(obj.badge_counts) &&
- display_name.TrueEqualsString(obj.display_name) &&
- link.TrueEqualsString(obj.link) &&
- profile_image.TrueEqualsString(obj.profile_image) &&
- reputation.TrueEquals(obj.reputation) &&
- user_id.TrueEquals(obj.user_id) &&
- user_type.TrueEquals(obj.user_type);
+ this.accept_rate.TrueEquals(obj.accept_rate) &&
+ this.badge_counts.TrueEquals(obj.badge_counts) &&
+ this.display_name.TrueEqualsString(obj.display_name) &&
+ this.link.TrueEqualsString(obj.link) &&
+ this.profile_image.TrueEqualsString(obj.profile_image) &&
+ this.reputation.TrueEquals(obj.reputation) &&
+ this.user_id.TrueEquals(obj.user_id) &&
+ this.user_type.TrueEquals(obj.user_type);
}
public bool EqualsDynamic(dynamic obj)
{
return
- accept_rate.TrueEquals((int?) obj.accept_rate) &&
- (badge_counts == null && obj.badge_counts == null || badge_counts.EqualsDynamic(obj.badge_counts)) &&
- display_name.TrueEqualsString((string) obj.display_name) &&
- link.TrueEqualsString((string) obj.link) &&
- profile_image.TrueEqualsString((string) obj.profile_image) &&
- reputation.TrueEquals((int?) obj.reputation) &&
- user_id.TrueEquals((int?) obj.user_id) &&
- user_type.TrueEquals((UserType?) obj.user_type);
+ this.accept_rate.TrueEquals((int?)obj.accept_rate) &&
+ ((this.badge_counts == null && obj.badge_counts == null) || this.badge_counts.EqualsDynamic(obj.badge_counts)) &&
+ this.display_name.TrueEqualsString((string)obj.display_name) &&
+ this.link.TrueEqualsString((string)obj.link) &&
+ this.profile_image.TrueEqualsString((string)obj.profile_image) &&
+ this.reputation.TrueEquals((int?)obj.reputation) &&
+ this.user_id.TrueEquals((int?)obj.user_id) &&
+ this.user_type.TrueEquals((UserType?)obj.user_type);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/SuggestedEdit.cs b/benchmark/SerializerBenchmark/Models/SuggestedEdit.cs
index 79e6bac4..f774655a 100644
--- a/benchmark/SerializerBenchmark/Models/SuggestedEdit.cs
+++ b/benchmark/SerializerBenchmark/Models/SuggestedEdit.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using System.Collections.Generic;
using ProtoBuf;
@@ -9,70 +13,70 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class SuggestedEdit : IGenericEquality<SuggestedEdit>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? suggested_edit_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public int? post_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public PostType? post_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public string body { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public string title { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public List<string> tags { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public string comment { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public DateTime? creation_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public DateTime? approval_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public DateTime? rejection_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
public ShallowUser proposing_user { get; set; }
public bool Equals(SuggestedEdit obj)
{
return
- approval_date.TrueEquals(obj.approval_date) &&
- body.TrueEqualsString(obj.body) &&
- comment.TrueEqualsString(obj.comment) &&
- creation_date.TrueEquals(obj.creation_date) &&
- post_id.TrueEquals(obj.post_id) &&
- post_type.TrueEquals(obj.post_type) &&
- proposing_user.TrueEquals(obj.proposing_user) &&
- rejection_date.TrueEquals(obj.rejection_date) &&
- suggested_edit_id.TrueEquals(obj.suggested_edit_id) &&
- tags.TrueEqualsString(obj.tags) &&
- title.TrueEqualsString(obj.title);
+ this.approval_date.TrueEquals(obj.approval_date) &&
+ this.body.TrueEqualsString(obj.body) &&
+ this.comment.TrueEqualsString(obj.comment) &&
+ this.creation_date.TrueEquals(obj.creation_date) &&
+ this.post_id.TrueEquals(obj.post_id) &&
+ this.post_type.TrueEquals(obj.post_type) &&
+ this.proposing_user.TrueEquals(obj.proposing_user) &&
+ this.rejection_date.TrueEquals(obj.rejection_date) &&
+ this.suggested_edit_id.TrueEquals(obj.suggested_edit_id) &&
+ this.tags.TrueEqualsString(obj.tags) &&
+ this.title.TrueEqualsString(obj.title);
}
public bool EqualsDynamic(dynamic obj)
{
return
- approval_date.TrueEquals((DateTime?) obj.approval_date) &&
- body.TrueEqualsString((string) obj.body) &&
- comment.TrueEqualsString((string) obj.comment) &&
- creation_date.TrueEquals((DateTime?) obj.creation_date) &&
- post_id.TrueEquals((int?) obj.post_id) &&
- post_type.TrueEquals((PostType?) obj.post_type) &&
- (proposing_user == null && obj.proposing_user == null ||
- proposing_user.EqualsDynamic(obj.proposing_user)) &&
- rejection_date.TrueEquals((DateTime?) obj.rejection_date) &&
- suggested_edit_id.TrueEquals((int?) obj.suggested_edit_id) &&
- tags.TrueEqualsString((IEnumerable<string>) obj.tags) &&
- title.TrueEqualsString((string) obj.title);
+ this.approval_date.TrueEquals((DateTime?)obj.approval_date) &&
+ this.body.TrueEqualsString((string)obj.body) &&
+ this.comment.TrueEqualsString((string)obj.comment) &&
+ this.creation_date.TrueEquals((DateTime?)obj.creation_date) &&
+ this.post_id.TrueEquals((int?)obj.post_id) &&
+ this.post_type.TrueEquals((PostType?)obj.post_type) &&
+ ((this.proposing_user == null && obj.proposing_user == null) ||
+ this.proposing_user.EqualsDynamic(obj.proposing_user)) &&
+ this.rejection_date.TrueEquals((DateTime?)obj.rejection_date) &&
+ this.suggested_edit_id.TrueEquals((int?)obj.suggested_edit_id) &&
+ this.tags.TrueEqualsString((IEnumerable<string>)obj.tags) &&
+ this.title.TrueEqualsString((string)obj.title);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/Tag.cs b/benchmark/SerializerBenchmark/Models/Tag.cs
index 9ac7fd29..586f60ff 100644
--- a/benchmark/SerializerBenchmark/Models/Tag.cs
+++ b/benchmark/SerializerBenchmark/Models/Tag.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using System.Collections.Generic;
using ProtoBuf;
@@ -9,54 +13,54 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class Tag : IGenericEquality<Tag>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public string name { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public int? count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public bool? is_required { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public bool? is_moderator_only { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public int? user_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public bool? has_synonyms { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public DateTime? last_activity_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public List<string> synonyms { get; set; }
public bool Equals(Tag obj)
{
return
- count.TrueEquals(obj.count) &&
- has_synonyms.TrueEquals(obj.has_synonyms) &&
- is_moderator_only.TrueEquals(obj.is_moderator_only) &&
- is_required.TrueEquals(obj.is_required) &&
- last_activity_date.TrueEquals(obj.last_activity_date) &&
- name.TrueEqualsString(obj.name) &&
- synonyms.TrueEqualsString(obj.synonyms) &&
- user_id.TrueEquals(obj.user_id);
+ this.count.TrueEquals(obj.count) &&
+ this.has_synonyms.TrueEquals(obj.has_synonyms) &&
+ this.is_moderator_only.TrueEquals(obj.is_moderator_only) &&
+ this.is_required.TrueEquals(obj.is_required) &&
+ this.last_activity_date.TrueEquals(obj.last_activity_date) &&
+ this.name.TrueEqualsString(obj.name) &&
+ this.synonyms.TrueEqualsString(obj.synonyms) &&
+ this.user_id.TrueEquals(obj.user_id);
}
public bool EqualsDynamic(dynamic obj)
{
return
- count.TrueEquals((int?) obj.count) &&
- has_synonyms.TrueEquals((bool?) obj.has_synonyms) &&
- is_moderator_only.TrueEquals((bool?) obj.is_moderator_only) &&
- is_required.TrueEquals((bool?) obj.is_required) &&
- last_activity_date.TrueEquals((DateTime?) obj.last_activity_date) &&
- name.TrueEqualsString((string) obj.name) &&
- synonyms.TrueEqualsString((IEnumerable<string>) obj.synonyms) &&
- user_id.TrueEquals((int?) obj.user_id);
+ this.count.TrueEquals((int?)obj.count) &&
+ this.has_synonyms.TrueEquals((bool?)obj.has_synonyms) &&
+ this.is_moderator_only.TrueEquals((bool?)obj.is_moderator_only) &&
+ this.is_required.TrueEquals((bool?)obj.is_required) &&
+ this.last_activity_date.TrueEquals((DateTime?)obj.last_activity_date) &&
+ this.name.TrueEqualsString((string)obj.name) &&
+ this.synonyms.TrueEqualsString((IEnumerable<string>)obj.synonyms) &&
+ this.user_id.TrueEquals((int?)obj.user_id);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/TagScore.cs b/benchmark/SerializerBenchmark/Models/TagScore.cs
index 7aee2fc8..b377008e 100644
--- a/benchmark/SerializerBenchmark/Models/TagScore.cs
+++ b/benchmark/SerializerBenchmark/Models/TagScore.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using ProtoBuf;
namespace Benchmark.Models
@@ -7,29 +11,29 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class TagScore : IGenericEquality<TagScore>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public ShallowUser user { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public int? score { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public int? post_count { get; set; }
public bool Equals(TagScore obj)
{
return
- post_count.TrueEquals(obj.post_count) &&
- score.TrueEquals(obj.score) &&
- user.TrueEquals(obj.user);
+ this.post_count.TrueEquals(obj.post_count) &&
+ this.score.TrueEquals(obj.score) &&
+ this.user.TrueEquals(obj.user);
}
public bool EqualsDynamic(dynamic obj)
{
return
- post_count.TrueEquals((int?) obj.post_count) &&
- score.TrueEquals((int?) obj.score) &&
- (user == null && obj.user == null || user.EqualsDynamic(obj.user));
+ this.post_count.TrueEquals((int?)obj.post_count) &&
+ this.score.TrueEquals((int?)obj.score) &&
+ ((this.user == null && obj.user == null) || this.user.EqualsDynamic(obj.user));
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/TagSynonym.cs b/benchmark/SerializerBenchmark/Models/TagSynonym.cs
index 786d027b..615226d1 100644
--- a/benchmark/SerializerBenchmark/Models/TagSynonym.cs
+++ b/benchmark/SerializerBenchmark/Models/TagSynonym.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using ProtoBuf;
@@ -8,39 +12,39 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class TagSynonym : IGenericEquality<TagSynonym>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public string from_tag { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public string to_tag { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public int? applied_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public DateTime? last_applied_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public DateTime? creation_date { get; set; }
public bool Equals(TagSynonym obj)
{
return
- applied_count.TrueEquals(obj.applied_count) &&
- creation_date.TrueEquals(obj.creation_date) &&
- from_tag.TrueEqualsString(obj.from_tag) &&
- last_applied_date.TrueEquals(obj.last_applied_date) &&
- to_tag.TrueEqualsString(obj.to_tag);
+ this.applied_count.TrueEquals(obj.applied_count) &&
+ this.creation_date.TrueEquals(obj.creation_date) &&
+ this.from_tag.TrueEqualsString(obj.from_tag) &&
+ this.last_applied_date.TrueEquals(obj.last_applied_date) &&
+ this.to_tag.TrueEqualsString(obj.to_tag);
}
public bool EqualsDynamic(dynamic obj)
{
return
- applied_count.TrueEquals((int?) obj.applied_count) &&
- creation_date.TrueEquals((DateTime?) obj.creation_date) &&
- from_tag.TrueEqualsString((string) obj.from_tag) &&
- last_applied_date.TrueEquals((DateTime?) obj.last_applied_date) &&
- to_tag.TrueEqualsString((string) obj.to_tag);
+ this.applied_count.TrueEquals((int?)obj.applied_count) &&
+ this.creation_date.TrueEquals((DateTime?)obj.creation_date) &&
+ this.from_tag.TrueEqualsString((string)obj.from_tag) &&
+ this.last_applied_date.TrueEquals((DateTime?)obj.last_applied_date) &&
+ this.to_tag.TrueEqualsString((string)obj.to_tag);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/TagWiki.cs b/benchmark/SerializerBenchmark/Models/TagWiki.cs
index d5804d14..aa37ca22 100644
--- a/benchmark/SerializerBenchmark/Models/TagWiki.cs
+++ b/benchmark/SerializerBenchmark/Models/TagWiki.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using ProtoBuf;
@@ -8,51 +12,51 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class TagWiki : IGenericEquality<TagWiki>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public string tag_name { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public string body { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public string excerpt { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public DateTime? body_last_edit_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public DateTime? excerpt_last_edit_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public ShallowUser last_body_editor { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public ShallowUser last_excerpt_editor { get; set; }
public bool Equals(TagWiki obj)
{
return
- body.TrueEqualsString(obj.body) &&
- body_last_edit_date.TrueEquals(obj.body_last_edit_date) &&
- excerpt.TrueEqualsString(obj.excerpt) &&
- excerpt_last_edit_date.TrueEquals(obj.excerpt_last_edit_date) &&
- last_body_editor.TrueEquals(obj.last_body_editor) &&
- last_excerpt_editor.TrueEquals(obj.last_excerpt_editor) &&
- tag_name.TrueEqualsString(obj.tag_name);
+ this.body.TrueEqualsString(obj.body) &&
+ this.body_last_edit_date.TrueEquals(obj.body_last_edit_date) &&
+ this.excerpt.TrueEqualsString(obj.excerpt) &&
+ this.excerpt_last_edit_date.TrueEquals(obj.excerpt_last_edit_date) &&
+ this.last_body_editor.TrueEquals(obj.last_body_editor) &&
+ this.last_excerpt_editor.TrueEquals(obj.last_excerpt_editor) &&
+ this.tag_name.TrueEqualsString(obj.tag_name);
}
public bool EqualsDynamic(dynamic obj)
{
return
- body.TrueEqualsString((string) obj.body) &&
- body_last_edit_date.TrueEquals((DateTime?) obj.body_last_edit_date) &&
- excerpt.TrueEqualsString((string) obj.excerpt) &&
- excerpt_last_edit_date.TrueEquals((DateTime?) obj.excerpt_last_edit_date) &&
- (last_body_editor == null && obj.last_body_editor == null ||
- last_body_editor.EqualsDynamic(obj.last_body_editor)) &&
- (last_excerpt_editor == null && obj.last_excerpt_editor == null ||
- last_excerpt_editor.EqualsDynamic(obj.last_excerpt_editor)) &&
- tag_name.TrueEqualsString((string) obj.tag_name);
+ this.body.TrueEqualsString((string)obj.body) &&
+ this.body_last_edit_date.TrueEquals((DateTime?)obj.body_last_edit_date) &&
+ this.excerpt.TrueEqualsString((string)obj.excerpt) &&
+ this.excerpt_last_edit_date.TrueEquals((DateTime?)obj.excerpt_last_edit_date) &&
+ ((this.last_body_editor == null && obj.last_body_editor == null) ||
+ this.last_body_editor.EqualsDynamic(obj.last_body_editor)) &&
+ ((this.last_excerpt_editor == null && obj.last_excerpt_editor == null) ||
+ this.last_excerpt_editor.EqualsDynamic(obj.last_excerpt_editor)) &&
+ this.tag_name.TrueEqualsString((string)obj.tag_name);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/TopTag.cs b/benchmark/SerializerBenchmark/Models/TopTag.cs
index e8940a10..2fc0c8e8 100644
--- a/benchmark/SerializerBenchmark/Models/TopTag.cs
+++ b/benchmark/SerializerBenchmark/Models/TopTag.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using ProtoBuf;
namespace Benchmark.Models
@@ -7,44 +11,44 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class TopTag : IGenericEquality<TopTag>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public string tag_name { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public int? question_score { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public int? question_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public int? answer_score { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public int? answer_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public int? user_id { get; set; }
public bool Equals(TopTag obj)
{
return
- answer_count.TrueEquals(obj.answer_count) &&
- answer_score.TrueEquals(obj.answer_score) &&
- question_count.TrueEquals(obj.question_count) &&
- question_score.TrueEquals(obj.question_score) &&
- tag_name.TrueEqualsString(obj.tag_name) &&
- user_id.TrueEquals(obj.user_id);
+ this.answer_count.TrueEquals(obj.answer_count) &&
+ this.answer_score.TrueEquals(obj.answer_score) &&
+ this.question_count.TrueEquals(obj.question_count) &&
+ this.question_score.TrueEquals(obj.question_score) &&
+ this.tag_name.TrueEqualsString(obj.tag_name) &&
+ this.user_id.TrueEquals(obj.user_id);
}
public bool EqualsDynamic(dynamic obj)
{
return
- answer_count.TrueEquals((int?) obj.answer_count) &&
- answer_score.TrueEquals((int?) obj.answer_score) &&
- question_count.TrueEquals((int?) obj.question_count) &&
- question_score.TrueEquals((int?) obj.question_score) &&
- tag_name.TrueEqualsString((string) obj.tag_name) &&
- user_id.TrueEquals((int?) obj.user_id);
+ this.answer_count.TrueEquals((int?)obj.answer_count) &&
+ this.answer_score.TrueEquals((int?)obj.answer_score) &&
+ this.question_count.TrueEquals((int?)obj.question_count) &&
+ this.question_score.TrueEquals((int?)obj.question_score) &&
+ this.tag_name.TrueEqualsString((string)obj.tag_name) &&
+ this.user_id.TrueEquals((int?)obj.user_id);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/User.cs b/benchmark/SerializerBenchmark/Models/User.cs
index b8bb8d42..b02c9148 100644
--- a/benchmark/SerializerBenchmark/Models/User.cs
+++ b/benchmark/SerializerBenchmark/Models/User.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using ProtoBuf;
@@ -8,183 +12,183 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class User : IGenericEquality<User>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? user_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public UserType? user_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public DateTime? creation_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public string display_name { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public string profile_image { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public int? reputation { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public int? reputation_change_day { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public int? reputation_change_week { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public int? reputation_change_month { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public int? reputation_change_quarter { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
public int? reputation_change_year { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(12), oldmsgpack::MessagePack.Key(12 - 1), newmsgpack::MessagePack.Key(12 - 1)]
public int? age { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(13), oldmsgpack::MessagePack.Key(13 - 1), newmsgpack::MessagePack.Key(13 - 1)]
public DateTime? last_access_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(14), oldmsgpack::MessagePack.Key(14 - 1), newmsgpack::MessagePack.Key(14 - 1)]
public DateTime? last_modified_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(15), oldmsgpack::MessagePack.Key(15 - 1), newmsgpack::MessagePack.Key(15 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(15), oldmsgpack::MessagePack.Key(15 - 1), newmsgpack::MessagePack.Key(15 - 1)]
public bool? is_employee { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(16), oldmsgpack::MessagePack.Key(16 - 1), newmsgpack::MessagePack.Key(16 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(16), oldmsgpack::MessagePack.Key(16 - 1), newmsgpack::MessagePack.Key(16 - 1)]
public string link { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(17), oldmsgpack::MessagePack.Key(17 - 1), newmsgpack::MessagePack.Key(17 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(17), oldmsgpack::MessagePack.Key(17 - 1), newmsgpack::MessagePack.Key(17 - 1)]
public string website_url { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(18), oldmsgpack::MessagePack.Key(18 - 1), newmsgpack::MessagePack.Key(18 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(18), oldmsgpack::MessagePack.Key(18 - 1), newmsgpack::MessagePack.Key(18 - 1)]
public string location { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(19), oldmsgpack::MessagePack.Key(19 - 1), newmsgpack::MessagePack.Key(19 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(19), oldmsgpack::MessagePack.Key(19 - 1), newmsgpack::MessagePack.Key(19 - 1)]
public int? account_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(20), oldmsgpack::MessagePack.Key(20 - 1), newmsgpack::MessagePack.Key(20 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(20), oldmsgpack::MessagePack.Key(20 - 1), newmsgpack::MessagePack.Key(20 - 1)]
public DateTime? timed_penalty_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(21), oldmsgpack::MessagePack.Key(21 - 1), newmsgpack::MessagePack.Key(21 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(21), oldmsgpack::MessagePack.Key(21 - 1), newmsgpack::MessagePack.Key(21 - 1)]
public BadgeCount badge_counts { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(22), oldmsgpack::MessagePack.Key(22 - 1), newmsgpack::MessagePack.Key(22 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(22), oldmsgpack::MessagePack.Key(22 - 1), newmsgpack::MessagePack.Key(22 - 1)]
public int? question_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(23), oldmsgpack::MessagePack.Key(23 - 1), newmsgpack::MessagePack.Key(23 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(23), oldmsgpack::MessagePack.Key(23 - 1), newmsgpack::MessagePack.Key(23 - 1)]
public int? answer_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(24), oldmsgpack::MessagePack.Key(24 - 1), newmsgpack::MessagePack.Key(24 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(24), oldmsgpack::MessagePack.Key(24 - 1), newmsgpack::MessagePack.Key(24 - 1)]
public int? up_vote_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(25), oldmsgpack::MessagePack.Key(25 - 1), newmsgpack::MessagePack.Key(25 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(25), oldmsgpack::MessagePack.Key(25 - 1), newmsgpack::MessagePack.Key(25 - 1)]
public int? down_vote_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(26), oldmsgpack::MessagePack.Key(26 - 1), newmsgpack::MessagePack.Key(26 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(26), oldmsgpack::MessagePack.Key(26 - 1), newmsgpack::MessagePack.Key(26 - 1)]
public string about_me { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(27), oldmsgpack::MessagePack.Key(27 - 1), newmsgpack::MessagePack.Key(27 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(27), oldmsgpack::MessagePack.Key(27 - 1), newmsgpack::MessagePack.Key(27 - 1)]
public int? view_count { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(28), oldmsgpack::MessagePack.Key(28 - 1), newmsgpack::MessagePack.Key(28 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(28), oldmsgpack::MessagePack.Key(28 - 1), newmsgpack::MessagePack.Key(28 - 1)]
public int? accept_rate { get; set; }
public bool Equals(User obj)
{
return
- about_me.TrueEqualsString(obj.about_me) &&
- accept_rate.TrueEquals(obj.accept_rate) &&
- account_id.TrueEquals(obj.account_id) &&
- age.TrueEquals(obj.age) &&
- answer_count.TrueEquals(obj.answer_count) &&
- badge_counts.TrueEquals(obj.badge_counts) &&
- creation_date.TrueEquals(obj.creation_date) &&
- display_name.TrueEqualsString(obj.display_name) &&
- down_vote_count.TrueEquals(obj.down_vote_count) &&
- is_employee.TrueEquals(obj.is_employee) &&
- last_access_date.TrueEquals(obj.last_access_date) &&
- last_modified_date.TrueEquals(obj.last_modified_date) &&
- link.TrueEqualsString(obj.link) &&
- location.TrueEqualsString(obj.location) &&
- profile_image.TrueEqualsString(obj.profile_image) &&
- question_count.TrueEquals(obj.question_count) &&
- reputation.TrueEquals(obj.reputation) &&
- reputation_change_day.TrueEquals(obj.reputation_change_day) &&
- reputation_change_month.TrueEquals(obj.reputation_change_month) &&
- reputation_change_quarter.TrueEquals(obj.reputation_change_quarter) &&
- reputation_change_week.TrueEquals(obj.reputation_change_week) &&
- reputation_change_year.TrueEquals(obj.reputation_change_year) &&
- timed_penalty_date.TrueEquals(obj.timed_penalty_date) &&
- up_vote_count.TrueEquals(obj.up_vote_count) &&
- user_id.TrueEquals(obj.user_id) &&
- user_type.TrueEquals(obj.user_type) &&
- view_count.TrueEquals(obj.view_count) &&
- website_url.TrueEqualsString(obj.website_url);
+ this.about_me.TrueEqualsString(obj.about_me) &&
+ this.accept_rate.TrueEquals(obj.accept_rate) &&
+ this.account_id.TrueEquals(obj.account_id) &&
+ this.age.TrueEquals(obj.age) &&
+ this.answer_count.TrueEquals(obj.answer_count) &&
+ this.badge_counts.TrueEquals(obj.badge_counts) &&
+ this.creation_date.TrueEquals(obj.creation_date) &&
+ this.display_name.TrueEqualsString(obj.display_name) &&
+ this.down_vote_count.TrueEquals(obj.down_vote_count) &&
+ this.is_employee.TrueEquals(obj.is_employee) &&
+ this.last_access_date.TrueEquals(obj.last_access_date) &&
+ this.last_modified_date.TrueEquals(obj.last_modified_date) &&
+ this.link.TrueEqualsString(obj.link) &&
+ this.location.TrueEqualsString(obj.location) &&
+ this.profile_image.TrueEqualsString(obj.profile_image) &&
+ this.question_count.TrueEquals(obj.question_count) &&
+ this.reputation.TrueEquals(obj.reputation) &&
+ this.reputation_change_day.TrueEquals(obj.reputation_change_day) &&
+ this.reputation_change_month.TrueEquals(obj.reputation_change_month) &&
+ this.reputation_change_quarter.TrueEquals(obj.reputation_change_quarter) &&
+ this.reputation_change_week.TrueEquals(obj.reputation_change_week) &&
+ this.reputation_change_year.TrueEquals(obj.reputation_change_year) &&
+ this.timed_penalty_date.TrueEquals(obj.timed_penalty_date) &&
+ this.up_vote_count.TrueEquals(obj.up_vote_count) &&
+ this.user_id.TrueEquals(obj.user_id) &&
+ this.user_type.TrueEquals(obj.user_type) &&
+ this.view_count.TrueEquals(obj.view_count) &&
+ this.website_url.TrueEqualsString(obj.website_url);
}
public bool EqualsDynamic(dynamic obj)
{
return
- about_me.TrueEqualsString((string) obj.about_me) &&
- accept_rate.TrueEquals((int?) obj.accept_rate) &&
- account_id.TrueEquals((int?) obj.account_id) &&
- age.TrueEquals((int?) obj.age) &&
- answer_count.TrueEquals((int?) obj.answer_count) &&
- (badge_counts == null && obj.badge_counts == null || badge_counts.EqualsDynamic(obj.badge_counts)) &&
- creation_date.TrueEquals((DateTime?) obj.creation_date) &&
- display_name.TrueEqualsString((string) obj.display_name) &&
- down_vote_count.TrueEquals((int?) obj.down_vote_count) &&
- is_employee.TrueEquals((bool?) obj.is_employee) &&
- last_access_date.TrueEquals((DateTime?) obj.last_access_date) &&
- last_modified_date.TrueEquals((DateTime?) obj.last_modified_date) &&
- link.TrueEqualsString((string) obj.link) &&
- location.TrueEqualsString((string) obj.location) &&
- profile_image.TrueEqualsString((string) obj.profile_image) &&
- question_count.TrueEquals((int?) obj.question_count) &&
- reputation.TrueEquals((int?) obj.reputation) &&
- reputation_change_day.TrueEquals((int?) obj.reputation_change_day) &&
- reputation_change_month.TrueEquals((int?) obj.reputation_change_month) &&
- reputation_change_quarter.TrueEquals((int?) obj.reputation_change_quarter) &&
- reputation_change_week.TrueEquals((int?) obj.reputation_change_week) &&
- reputation_change_year.TrueEquals((int?) obj.reputation_change_year) &&
- timed_penalty_date.TrueEquals((DateTime?) obj.timed_penalty_date) &&
- up_vote_count.TrueEquals((int?) obj.up_vote_count) &&
- user_id.TrueEquals((int?) obj.user_id) &&
- user_type.TrueEquals((UserType?) obj.user_type) &&
- view_count.TrueEquals((int?) obj.view_count) &&
- website_url.TrueEqualsString((string) obj.website_url);
+ this.about_me.TrueEqualsString((string)obj.about_me) &&
+ this.accept_rate.TrueEquals((int?)obj.accept_rate) &&
+ this.account_id.TrueEquals((int?)obj.account_id) &&
+ this.age.TrueEquals((int?)obj.age) &&
+ this.answer_count.TrueEquals((int?)obj.answer_count) &&
+ ((this.badge_counts == null && obj.badge_counts == null) || this.badge_counts.EqualsDynamic(obj.badge_counts)) &&
+ this.creation_date.TrueEquals((DateTime?)obj.creation_date) &&
+ this.display_name.TrueEqualsString((string)obj.display_name) &&
+ this.down_vote_count.TrueEquals((int?)obj.down_vote_count) &&
+ this.is_employee.TrueEquals((bool?)obj.is_employee) &&
+ this.last_access_date.TrueEquals((DateTime?)obj.last_access_date) &&
+ this.last_modified_date.TrueEquals((DateTime?)obj.last_modified_date) &&
+ this.link.TrueEqualsString((string)obj.link) &&
+ this.location.TrueEqualsString((string)obj.location) &&
+ this.profile_image.TrueEqualsString((string)obj.profile_image) &&
+ this.question_count.TrueEquals((int?)obj.question_count) &&
+ this.reputation.TrueEquals((int?)obj.reputation) &&
+ this.reputation_change_day.TrueEquals((int?)obj.reputation_change_day) &&
+ this.reputation_change_month.TrueEquals((int?)obj.reputation_change_month) &&
+ this.reputation_change_quarter.TrueEquals((int?)obj.reputation_change_quarter) &&
+ this.reputation_change_week.TrueEquals((int?)obj.reputation_change_week) &&
+ this.reputation_change_year.TrueEquals((int?)obj.reputation_change_year) &&
+ this.timed_penalty_date.TrueEquals((DateTime?)obj.timed_penalty_date) &&
+ this.up_vote_count.TrueEquals((int?)obj.up_vote_count) &&
+ this.user_id.TrueEquals((int?)obj.user_id) &&
+ this.user_type.TrueEquals((UserType?)obj.user_type) &&
+ this.view_count.TrueEquals((int?)obj.view_count) &&
+ this.website_url.TrueEqualsString((string)obj.website_url);
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class BadgeCount : IGenericEquality<BadgeCount>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? gold { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public int? silver { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public int? bronze { get; set; }
public bool Equals(BadgeCount obj)
{
return
- bronze.TrueEquals(obj.bronze) &&
- silver.TrueEquals(obj.silver) &&
- gold.TrueEquals(obj.gold);
+ this.bronze.TrueEquals(obj.bronze) &&
+ this.silver.TrueEquals(obj.silver) &&
+ this.gold.TrueEquals(obj.gold);
}
public bool EqualsDynamic(dynamic obj)
{
return
- bronze.TrueEquals((int?) obj.bronze) &&
- silver.TrueEquals((int?) obj.silver) &&
- gold.TrueEquals((int?) obj.gold);
+ this.bronze.TrueEquals((int?)obj.bronze) &&
+ this.silver.TrueEquals((int?)obj.silver) &&
+ this.gold.TrueEquals((int?)obj.gold);
}
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/UserTimeline.cs b/benchmark/SerializerBenchmark/Models/UserTimeline.cs
index d973c64b..1e4410db 100644
--- a/benchmark/SerializerBenchmark/Models/UserTimeline.cs
+++ b/benchmark/SerializerBenchmark/Models/UserTimeline.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using System;
using ProtoBuf;
@@ -14,75 +18,75 @@ namespace Benchmark.Models
revision = 5,
accepted = 6,
reviewed = 7,
- suggested = 8
+ suggested = 8,
}
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class UserTimeline : IGenericEquality<UserTimeline>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public DateTime? creation_date { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public PostType? post_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public UserTimelineType? timeline_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public int? user_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public int? post_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public int? comment_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public int? suggested_edit_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(8), oldmsgpack::MessagePack.Key(8 - 1), newmsgpack::MessagePack.Key(8 - 1)]
public int? badge_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(9), oldmsgpack::MessagePack.Key(9 - 1), newmsgpack::MessagePack.Key(9 - 1)]
public string title { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(10), oldmsgpack::MessagePack.Key(10 - 1), newmsgpack::MessagePack.Key(10 - 1)]
public string detail { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(11), oldmsgpack::MessagePack.Key(11 - 1), newmsgpack::MessagePack.Key(11 - 1)]
public string link { get; set; }
public bool Equals(UserTimeline obj)
{
return
- badge_id.TrueEquals(obj.badge_id) &&
- comment_id.TrueEquals(obj.comment_id) &&
- creation_date.TrueEquals(obj.creation_date) &&
- detail.TrueEqualsString(obj.detail) &&
- link.TrueEqualsString(obj.link) &&
- post_id.TrueEquals(obj.post_id) &&
- post_type.TrueEquals(obj.post_type) &&
- suggested_edit_id.TrueEquals(obj.suggested_edit_id) &&
- timeline_type.TrueEquals(obj.timeline_type) &&
- title.TrueEqualsString(obj.title) &&
- user_id.TrueEquals(obj.user_id);
+ this.badge_id.TrueEquals(obj.badge_id) &&
+ this.comment_id.TrueEquals(obj.comment_id) &&
+ this.creation_date.TrueEquals(obj.creation_date) &&
+ this.detail.TrueEqualsString(obj.detail) &&
+ this.link.TrueEqualsString(obj.link) &&
+ this.post_id.TrueEquals(obj.post_id) &&
+ this.post_type.TrueEquals(obj.post_type) &&
+ this.suggested_edit_id.TrueEquals(obj.suggested_edit_id) &&
+ this.timeline_type.TrueEquals(obj.timeline_type) &&
+ this.title.TrueEqualsString(obj.title) &&
+ this.user_id.TrueEquals(obj.user_id);
}
public bool EqualsDynamic(dynamic obj)
{
return
- badge_id.TrueEquals((int?) obj.badge_id) &&
- comment_id.TrueEquals((int?) obj.comment_id) &&
- creation_date.TrueEquals((DateTime?) obj.creation_date) &&
- detail.TrueEqualsString((string) obj.detail) &&
- link.TrueEqualsString((string) obj.link) &&
- post_id.TrueEquals((int?) obj.post_id) &&
- post_type.TrueEquals((PostType?) obj.post_type) &&
- suggested_edit_id.TrueEquals((int?) obj.suggested_edit_id) &&
- timeline_type.TrueEquals((UserTimelineType?) obj.timeline_type) &&
- title.TrueEqualsString((string) obj.title) &&
- user_id.TrueEquals((int?) obj.user_id);
+ this.badge_id.TrueEquals((int?)obj.badge_id) &&
+ this.comment_id.TrueEquals((int?)obj.comment_id) &&
+ this.creation_date.TrueEquals((DateTime?)obj.creation_date) &&
+ this.detail.TrueEqualsString((string)obj.detail) &&
+ this.link.TrueEqualsString((string)obj.link) &&
+ this.post_id.TrueEquals((int?)obj.post_id) &&
+ this.post_type.TrueEquals((PostType?)obj.post_type) &&
+ this.suggested_edit_id.TrueEquals((int?)obj.suggested_edit_id) &&
+ this.timeline_type.TrueEquals((UserTimelineType?)obj.timeline_type) &&
+ this.title.TrueEqualsString((string)obj.title) &&
+ this.user_id.TrueEquals((int?)obj.user_id);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Models/WritePermission.cs b/benchmark/SerializerBenchmark/Models/WritePermission.cs
index 7799a32d..f450ec2a 100644
--- a/benchmark/SerializerBenchmark/Models/WritePermission.cs
+++ b/benchmark/SerializerBenchmark/Models/WritePermission.cs
@@ -1,5 +1,9 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
+
using ProtoBuf;
namespace Benchmark.Models
@@ -7,49 +11,49 @@ namespace Benchmark.Models
[ProtoContract, System.Serializable, System.Runtime.Serialization.DataContract, oldmsgpack::MessagePack.MessagePackObject, newmsgpack::MessagePack.MessagePackObject]
public class WritePermission : IGenericEquality<WritePermission>
{
- [System.Runtime.Serialization.DataMember(), ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(1), oldmsgpack::MessagePack.Key(1 - 1), newmsgpack::MessagePack.Key(1 - 1)]
public int? user_id { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(2), oldmsgpack::MessagePack.Key(2 - 1), newmsgpack::MessagePack.Key(2 - 1)]
public string object_type { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(3), oldmsgpack::MessagePack.Key(3 - 1), newmsgpack::MessagePack.Key(3 - 1)]
public bool? can_add { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(4), oldmsgpack::MessagePack.Key(4 - 1), newmsgpack::MessagePack.Key(4 - 1)]
public bool? can_edit { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(5), oldmsgpack::MessagePack.Key(5 - 1), newmsgpack::MessagePack.Key(5 - 1)]
public bool? can_delete { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(6), oldmsgpack::MessagePack.Key(6 - 1), newmsgpack::MessagePack.Key(6 - 1)]
public int? max_daily_actions { get; set; }
- [System.Runtime.Serialization.DataMember(), ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
+ [System.Runtime.Serialization.DataMember, ProtoMember(7), oldmsgpack::MessagePack.Key(7 - 1), newmsgpack::MessagePack.Key(7 - 1)]
public int? min_seconds_between_actions { get; set; }
public bool Equals(WritePermission obj)
{
return
- can_add.TrueEquals(obj.can_add) &&
- can_delete.TrueEquals(obj.can_delete) &&
- can_edit.TrueEquals(obj.can_edit) &&
- max_daily_actions.TrueEquals(obj.max_daily_actions) &&
- min_seconds_between_actions.TrueEquals(obj.min_seconds_between_actions) &&
- object_type.TrueEqualsString(obj.object_type) &&
- user_id.TrueEquals(obj.user_id);
+ this.can_add.TrueEquals(obj.can_add) &&
+ this.can_delete.TrueEquals(obj.can_delete) &&
+ this.can_edit.TrueEquals(obj.can_edit) &&
+ this.max_daily_actions.TrueEquals(obj.max_daily_actions) &&
+ this.min_seconds_between_actions.TrueEquals(obj.min_seconds_between_actions) &&
+ this.object_type.TrueEqualsString(obj.object_type) &&
+ this.user_id.TrueEquals(obj.user_id);
}
public bool EqualsDynamic(dynamic obj)
{
return
- can_add.TrueEquals((bool?) obj.can_add) &&
- can_delete.TrueEquals((bool?) obj.can_delete) &&
- can_edit.TrueEquals((bool?) obj.can_edit) &&
- max_daily_actions.TrueEquals((int?) obj.max_daily_actions) &&
- min_seconds_between_actions.TrueEquals((int?) obj.min_seconds_between_actions) &&
- object_type.TrueEqualsString((string) obj.object_type) &&
- user_id.TrueEquals((int?) obj.user_id);
+ this.can_add.TrueEquals((bool?)obj.can_add) &&
+ this.can_delete.TrueEquals((bool?)obj.can_delete) &&
+ this.can_edit.TrueEquals((bool?)obj.can_edit) &&
+ this.max_daily_actions.TrueEquals((int?)obj.max_daily_actions) &&
+ this.min_seconds_between_actions.TrueEquals((int?)obj.min_seconds_between_actions) &&
+ this.object_type.TrueEqualsString((string)obj.object_type) &&
+ this.user_id.TrueEquals((int?)obj.user_id);
}
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Program.cs b/benchmark/SerializerBenchmark/Program.cs
index 3a504280..cb7154bc 100644
--- a/benchmark/SerializerBenchmark/Program.cs
+++ b/benchmark/SerializerBenchmark/Program.cs
@@ -1,15 +1,18 @@
-using Benchmark;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using Benchmark;
using Benchmark.Models;
using BenchmarkDotNet.Running;
namespace ConsoleApp1
{
- class Program
+ internal class Program
{
- static void Main(string[] args)
+ private static void Main(string[] args)
{
BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);
- //BenchmarkRunner.Run<ShortRun_AllSerializerBenchmark_BytesInOut>();
+ ////BenchmarkRunner.Run<ShortRun_AllSerializerBenchmark_BytesInOut>();
}
}
}
diff --git a/benchmark/SerializerBenchmark/SerializerBenchmark.cs b/benchmark/SerializerBenchmark/SerializerBenchmark.cs
index b80f8bcb..311f3dba 100644
--- a/benchmark/SerializerBenchmark/SerializerBenchmark.cs
+++ b/benchmark/SerializerBenchmark/SerializerBenchmark.cs
@@ -1,12 +1,20 @@
-namespace Benchmark
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.Collections.Generic;
+using Benchmark.Fixture;
+using Benchmark.Models;
+using Benchmark.Serializers;
+using BenchmarkDotNet.Attributes;
+
+#pragma warning disable SA1300 // Element should begin with upper-case letter
+#pragma warning disable SA1306 // Field names should begin with lower-case letter
+#pragma warning disable SA1401 // Fields should be private
+#pragma warning disable SA1649 // File name should match first type name
+
+namespace Benchmark
{
- using Benchmark.Fixture;
- using Benchmark.Models;
- using Benchmark.Serializers;
- using BenchmarkDotNet.Attributes;
- using System;
- using System.Collections.Generic;
-
[Config(typeof(BenchmarkConfig))]
public class AllSerializerBenchmark_BytesInOut
{
@@ -14,7 +22,6 @@
public SerializerBase Serializer;
// Currently BenchmarkdDotNet does not detect inherited ParamsSource so use copy and paste:)
-
public IEnumerable<SerializerBase> Serializers => new SerializerBase[]
{
new MessagePack_v1(),
@@ -37,7 +44,6 @@
protected static readonly ExpressionTreeFixture ExpressionTreeFixture = new ExpressionTreeFixture();
// primitives
-
protected static readonly sbyte SByteInput = ExpressionTreeFixture.Create<sbyte>();
protected static readonly short ShortInput = ExpressionTreeFixture.Create<short>();
protected static readonly int IntInput = ExpressionTreeFixture.Create<int>();
@@ -54,7 +60,6 @@
protected static readonly byte[] BytesInput = ExpressionTreeFixture.Create<byte[]>();
// models
-
protected static readonly Benchmark.Models.AccessToken AccessTokenInput = ExpressionTreeFixture.Create<Benchmark.Models.AccessToken>();
protected static readonly Benchmark.Models.AccountMerge AccountMergeInput = ExpressionTreeFixture.Create<Benchmark.Models.AccountMerge>();
@@ -155,280 +160,402 @@
protected static readonly Benchmark.Models.Question.ClosedDetails.OriginalQuestion OriginalQuestionInput = ExpressionTreeFixture.Create<Benchmark.Models.Question.ClosedDetails.OriginalQuestion>();
- object SByteOutput;
- object ShortOutput;
- object IntOutput;
- object LongOutput;
- object ByteOutput;
- object UShortOutput;
- object UIntOutput;
- object ULongOutput;
- object BoolOutput;
- object StringOutput;
- object CharOutput;
- object DateTimeOutput;
- object GuidOutput;
- object BytesOutput;
-
- object AccessTokenOutput;
- object AccountMergeOutput;
- object AnswerOutput;
- object BadgeOutput;
- object CommentOutput;
- object ErrorOutput;
- object EventOutput;
- object MobileFeedOutput;
- object MobileQuestionOutput;
- object MobileRepChangeOutput;
- object MobileInboxItemOutput;
- object MobileBadgeAwardOutput;
- object MobilePrivilegeOutput;
- object MobileCommunityBulletinOutput;
- object MobileAssociationBonusOutput;
- object MobileCareersJobAdOutput;
- object MobileBannerAdOutput;
- object MobileUpdateNoticeOutput;
- object FlagOptionOutput;
- object InboxItemOutput;
- object InfoOutput;
- object NetworkUserOutput;
- object NotificationOutput;
- object PostOutput;
- object PrivilegeOutput;
- object QuestionOutput;
- object QuestionTimelineOutput;
- object ReputationOutput;
- object ReputationHistoryOutput;
- object RevisionOutput;
- object SearchExcerptOutput;
- object ShallowUserOutput;
- object SuggestedEditOutput;
- object TagOutput;
- object TagScoreOutput;
- object TagSynonymOutput;
- object TagWikiOutput;
- object TopTagOutput;
- object UserOutput;
- object UserTimelineOutput;
- object WritePermissionOutput;
- object MobileBannerAdImageOutput;
- object SiteOutput;
- object RelatedSiteOutput;
- object ClosedDetailsOutput;
- object NoticeOutput;
- object MigrationInfoOutput;
- object BadgeCountOutput;
- object StylingOutput;
- object OriginalQuestionOutput;
+ private object SByteOutput;
+ private object ShortOutput;
+ private object IntOutput;
+ private object LongOutput;
+ private object ByteOutput;
+ private object UShortOutput;
+ private object UIntOutput;
+ private object ULongOutput;
+ private object BoolOutput;
+ private object StringOutput;
+ private object CharOutput;
+ private object DateTimeOutput;
+ private object GuidOutput;
+ private object BytesOutput;
+
+ private object AccessTokenOutput;
+ private object AccountMergeOutput;
+ private object AnswerOutput;
+ private object BadgeOutput;
+ private object CommentOutput;
+ private object ErrorOutput;
+ private object EventOutput;
+ private object MobileFeedOutput;
+ private object MobileQuestionOutput;
+ private object MobileRepChangeOutput;
+ private object MobileInboxItemOutput;
+ private object MobileBadgeAwardOutput;
+ private object MobilePrivilegeOutput;
+ private object MobileCommunityBulletinOutput;
+ private object MobileAssociationBonusOutput;
+ private object MobileCareersJobAdOutput;
+ private object MobileBannerAdOutput;
+ private object MobileUpdateNoticeOutput;
+ private object FlagOptionOutput;
+ private object InboxItemOutput;
+ private object InfoOutput;
+ private object NetworkUserOutput;
+ private object NotificationOutput;
+ private object PostOutput;
+ private object PrivilegeOutput;
+ private object QuestionOutput;
+ private object QuestionTimelineOutput;
+ private object ReputationOutput;
+ private object ReputationHistoryOutput;
+ private object RevisionOutput;
+ private object SearchExcerptOutput;
+ private object ShallowUserOutput;
+ private object SuggestedEditOutput;
+ private object TagOutput;
+ private object TagScoreOutput;
+ private object TagSynonymOutput;
+ private object TagWikiOutput;
+ private object TopTagOutput;
+ private object UserOutput;
+ private object UserTimelineOutput;
+ private object WritePermissionOutput;
+ private object MobileBannerAdImageOutput;
+ private object SiteOutput;
+ private object RelatedSiteOutput;
+ private object ClosedDetailsOutput;
+ private object NoticeOutput;
+ private object MigrationInfoOutput;
+ private object BadgeCountOutput;
+ private object StylingOutput;
+ private object OriginalQuestionOutput;
[GlobalSetup]
public void Setup()
{
// primitives
- SByteOutput = Serializer.Serialize(SByteInput);
- ShortOutput = Serializer.Serialize(ShortInput);
- IntOutput = Serializer.Serialize(IntInput);
- LongOutput = Serializer.Serialize(LongInput);
- ByteOutput = Serializer.Serialize(ByteInput);
- UShortOutput = Serializer.Serialize(UShortInput);
- UIntOutput = Serializer.Serialize(UIntInput);
- ULongOutput = Serializer.Serialize(ULongInput);
- BoolOutput = Serializer.Serialize(BoolInput);
- StringOutput = Serializer.Serialize(StringInput);
- CharOutput = Serializer.Serialize(CharInput);
- DateTimeOutput = Serializer.Serialize(DateTimeInput);
- GuidOutput = Serializer.Serialize(GuidInput);
- BytesOutput = Serializer.Serialize(BytesInput);
+ this.SByteOutput = this.Serializer.Serialize(SByteInput);
+ this.ShortOutput = this.Serializer.Serialize(ShortInput);
+ this.IntOutput = this.Serializer.Serialize(IntInput);
+ this.LongOutput = this.Serializer.Serialize(LongInput);
+ this.ByteOutput = this.Serializer.Serialize(ByteInput);
+ this.UShortOutput = this.Serializer.Serialize(UShortInput);
+ this.UIntOutput = this.Serializer.Serialize(UIntInput);
+ this.ULongOutput = this.Serializer.Serialize(ULongInput);
+ this.BoolOutput = this.Serializer.Serialize(BoolInput);
+ this.StringOutput = this.Serializer.Serialize(StringInput);
+ this.CharOutput = this.Serializer.Serialize(CharInput);
+ this.DateTimeOutput = this.Serializer.Serialize(DateTimeInput);
+ this.GuidOutput = this.Serializer.Serialize(GuidInput);
+ this.BytesOutput = this.Serializer.Serialize(BytesInput);
// models
- AccessTokenOutput = Serializer.Serialize(AccessTokenInput);
- AccountMergeOutput = Serializer.Serialize(AccountMergeInput);
- AnswerOutput = Serializer.Serialize(AnswerInput);
- BadgeOutput = Serializer.Serialize(BadgeInput);
- CommentOutput = Serializer.Serialize(CommentInput);
- ErrorOutput = Serializer.Serialize(ErrorInput);
- EventOutput = Serializer.Serialize(EventInput);
- MobileFeedOutput = Serializer.Serialize(MobileFeedInput);
- MobileQuestionOutput = Serializer.Serialize(MobileQuestionInput);
- MobileRepChangeOutput = Serializer.Serialize(MobileRepChangeInput);
- MobileInboxItemOutput = Serializer.Serialize(MobileInboxItemInput);
- MobileBadgeAwardOutput = Serializer.Serialize(MobileBadgeAwardInput);
- MobilePrivilegeOutput = Serializer.Serialize(MobilePrivilegeInput);
- MobileCommunityBulletinOutput = Serializer.Serialize(MobileCommunityBulletinInput);
- MobileAssociationBonusOutput = Serializer.Serialize(MobileAssociationBonusInput);
- MobileCareersJobAdOutput = Serializer.Serialize(MobileCareersJobAdInput);
- MobileBannerAdOutput = Serializer.Serialize(MobileBannerAdInput);
- MobileUpdateNoticeOutput = Serializer.Serialize(MobileUpdateNoticeInput);
- FlagOptionOutput = Serializer.Serialize(FlagOptionInput);
- InboxItemOutput = Serializer.Serialize(InboxItemInput);
- InfoOutput = Serializer.Serialize(InfoInput);
- NetworkUserOutput = Serializer.Serialize(NetworkUserInput);
- NotificationOutput = Serializer.Serialize(NotificationInput);
- PostOutput = Serializer.Serialize(PostInput);
- PrivilegeOutput = Serializer.Serialize(PrivilegeInput);
- QuestionOutput = Serializer.Serialize(QuestionInput);
- QuestionTimelineOutput = Serializer.Serialize(QuestionTimelineInput);
- ReputationOutput = Serializer.Serialize(ReputationInput);
- ReputationHistoryOutput = Serializer.Serialize(ReputationHistoryInput);
- RevisionOutput = Serializer.Serialize(RevisionInput);
- SearchExcerptOutput = Serializer.Serialize(SearchExcerptInput);
- ShallowUserOutput = Serializer.Serialize(ShallowUserInput);
- SuggestedEditOutput = Serializer.Serialize(SuggestedEditInput);
- TagOutput = Serializer.Serialize(TagInput);
- TagScoreOutput = Serializer.Serialize(TagScoreInput);
- TagSynonymOutput = Serializer.Serialize(TagSynonymInput);
- TagWikiOutput = Serializer.Serialize(TagWikiInput);
- TopTagOutput = Serializer.Serialize(TopTagInput);
- UserOutput = Serializer.Serialize(UserInput);
- UserTimelineOutput = Serializer.Serialize(UserTimelineInput);
- WritePermissionOutput = Serializer.Serialize(WritePermissionInput);
- MobileBannerAdImageOutput = Serializer.Serialize(MobileBannerAdImageInput);
- SiteOutput = Serializer.Serialize(SiteInput);
- RelatedSiteOutput = Serializer.Serialize(RelatedSiteInput);
- ClosedDetailsOutput = Serializer.Serialize(ClosedDetailsInput);
- NoticeOutput = Serializer.Serialize(NoticeInput);
- MigrationInfoOutput = Serializer.Serialize(MigrationInfoInput);
- BadgeCountOutput = Serializer.Serialize(BadgeCountInput);
- StylingOutput = Serializer.Serialize(StylingInput);
- OriginalQuestionOutput = Serializer.Serialize(OriginalQuestionInput);
+ this.AccessTokenOutput = this.Serializer.Serialize(AccessTokenInput);
+ this.AccountMergeOutput = this.Serializer.Serialize(AccountMergeInput);
+ this.AnswerOutput = this.Serializer.Serialize(AnswerInput);
+ this.BadgeOutput = this.Serializer.Serialize(BadgeInput);
+ this.CommentOutput = this.Serializer.Serialize(CommentInput);
+ this.ErrorOutput = this.Serializer.Serialize(ErrorInput);
+ this.EventOutput = this.Serializer.Serialize(EventInput);
+ this.MobileFeedOutput = this.Serializer.Serialize(MobileFeedInput);
+ this.MobileQuestionOutput = this.Serializer.Serialize(MobileQuestionInput);
+ this.MobileRepChangeOutput = this.Serializer.Serialize(MobileRepChangeInput);
+ this.MobileInboxItemOutput = this.Serializer.Serialize(MobileInboxItemInput);
+ this.MobileBadgeAwardOutput = this.Serializer.Serialize(MobileBadgeAwardInput);
+ this.MobilePrivilegeOutput = this.Serializer.Serialize(MobilePrivilegeInput);
+ this.MobileCommunityBulletinOutput = this.Serializer.Serialize(MobileCommunityBulletinInput);
+ this.MobileAssociationBonusOutput = this.Serializer.Serialize(MobileAssociationBonusInput);
+ this.MobileCareersJobAdOutput = this.Serializer.Serialize(MobileCareersJobAdInput);
+ this.MobileBannerAdOutput = this.Serializer.Serialize(MobileBannerAdInput);
+ this.MobileUpdateNoticeOutput = this.Serializer.Serialize(MobileUpdateNoticeInput);
+ this.FlagOptionOutput = this.Serializer.Serialize(FlagOptionInput);
+ this.InboxItemOutput = this.Serializer.Serialize(InboxItemInput);
+ this.InfoOutput = this.Serializer.Serialize(InfoInput);
+ this.NetworkUserOutput = this.Serializer.Serialize(NetworkUserInput);
+ this.NotificationOutput = this.Serializer.Serialize(NotificationInput);
+ this.PostOutput = this.Serializer.Serialize(PostInput);
+ this.PrivilegeOutput = this.Serializer.Serialize(PrivilegeInput);
+ this.QuestionOutput = this.Serializer.Serialize(QuestionInput);
+ this.QuestionTimelineOutput = this.Serializer.Serialize(QuestionTimelineInput);
+ this.ReputationOutput = this.Serializer.Serialize(ReputationInput);
+ this.ReputationHistoryOutput = this.Serializer.Serialize(ReputationHistoryInput);
+ this.RevisionOutput = this.Serializer.Serialize(RevisionInput);
+ this.SearchExcerptOutput = this.Serializer.Serialize(SearchExcerptInput);
+ this.ShallowUserOutput = this.Serializer.Serialize(ShallowUserInput);
+ this.SuggestedEditOutput = this.Serializer.Serialize(SuggestedEditInput);
+ this.TagOutput = this.Serializer.Serialize(TagInput);
+ this.TagScoreOutput = this.Serializer.Serialize(TagScoreInput);
+ this.TagSynonymOutput = this.Serializer.Serialize(TagSynonymInput);
+ this.TagWikiOutput = this.Serializer.Serialize(TagWikiInput);
+ this.TopTagOutput = this.Serializer.Serialize(TopTagInput);
+ this.UserOutput = this.Serializer.Serialize(UserInput);
+ this.UserTimelineOutput = this.Serializer.Serialize(UserTimelineInput);
+ this.WritePermissionOutput = this.Serializer.Serialize(WritePermissionInput);
+ this.MobileBannerAdImageOutput = this.Serializer.Serialize(MobileBannerAdImageInput);
+ this.SiteOutput = this.Serializer.Serialize(SiteInput);
+ this.RelatedSiteOutput = this.Serializer.Serialize(RelatedSiteInput);
+ this.ClosedDetailsOutput = this.Serializer.Serialize(ClosedDetailsInput);
+ this.NoticeOutput = this.Serializer.Serialize(NoticeInput);
+ this.MigrationInfoOutput = this.Serializer.Serialize(MigrationInfoInput);
+ this.BadgeCountOutput = this.Serializer.Serialize(BadgeCountInput);
+ this.StylingOutput = this.Serializer.Serialize(StylingInput);
+ this.OriginalQuestionOutput = this.Serializer.Serialize(OriginalQuestionInput);
}
// Serialize
+ [Benchmark] public object _PrimitiveSByteSerialize() => this.Serializer.Serialize(SByteInput);
+
+ [Benchmark] public object _PrimitiveShortSerialize() => this.Serializer.Serialize(ShortInput);
+
+ [Benchmark] public object _PrimitiveIntSerialize() => this.Serializer.Serialize(IntInput);
+
+ [Benchmark] public object _PrimitiveLongSerialize() => this.Serializer.Serialize(LongInput);
+
+ [Benchmark] public object _PrimitiveByteSerialize() => this.Serializer.Serialize(ByteInput);
+
+ [Benchmark] public object _PrimitiveUShortSerialize() => this.Serializer.Serialize(UShortInput);
+
+ [Benchmark] public object _PrimitiveUIntSerialize() => this.Serializer.Serialize(UIntInput);
+
+ [Benchmark] public object _PrimitiveULongSerialize() => this.Serializer.Serialize(ULongInput);
+
+ [Benchmark] public object _PrimitiveBoolSerialize() => this.Serializer.Serialize(BoolInput);
+
+ [Benchmark] public object _PrimitiveStringSerialize() => this.Serializer.Serialize(StringInput);
+
+ [Benchmark] public object _PrimitiveCharSerialize() => this.Serializer.Serialize(CharInput);
+
+ [Benchmark] public object _PrimitiveDateTimeSerialize() => this.Serializer.Serialize(DateTimeInput);
+
+ [Benchmark] public object _PrimitiveGuidSerialize() => this.Serializer.Serialize(GuidInput);
+
+ [Benchmark] public object _PrimitiveBytesSerialize() => this.Serializer.Serialize(BytesInput);
+
+ [Benchmark] public object AccessTokenSerialize() => this.Serializer.Serialize(AccessTokenInput);
+
+ [Benchmark] public object AccountMergeSerialize() => this.Serializer.Serialize(AccountMergeInput);
+
+ [Benchmark] public object AnswerSerialize() => this.Serializer.Serialize(AnswerInput);
+
+ [Benchmark] public object BadgeSerialize() => this.Serializer.Serialize(BadgeInput);
+
+ [Benchmark] public object CommentSerialize() => this.Serializer.Serialize(CommentInput);
+
+ [Benchmark] public object ErrorSerialize() => this.Serializer.Serialize(ErrorInput);
+
+ [Benchmark] public object EventSerialize() => this.Serializer.Serialize(EventInput);
+
+ [Benchmark] public object MobileFeedSerialize() => this.Serializer.Serialize(MobileFeedInput);
+
+ [Benchmark] public object MobileQuestionSerialize() => this.Serializer.Serialize(MobileQuestionInput);
+
+ [Benchmark] public object MobileRepChangeSerialize() => this.Serializer.Serialize(MobileRepChangeInput);
+
+ [Benchmark] public object MobileInboxItemSerialize() => this.Serializer.Serialize(MobileInboxItemInput);
+
+ [Benchmark] public object MobileBadgeAwardSerialize() => this.Serializer.Serialize(MobileBadgeAwardInput);
+
+ [Benchmark] public object MobilePrivilegeSerialize() => this.Serializer.Serialize(MobilePrivilegeInput);
+
+ [Benchmark] public object MobileCommunityBulletinSerialize() => this.Serializer.Serialize(MobileCommunityBulletinInput);
+
+ [Benchmark] public object MobileAssociationBonusSerialize() => this.Serializer.Serialize(MobileAssociationBonusInput);
+
+ [Benchmark] public object MobileCareersJobAdSerialize() => this.Serializer.Serialize(MobileCareersJobAdInput);
+
+ [Benchmark] public object MobileBannerAdSerialize() => this.Serializer.Serialize(MobileBannerAdInput);
- [Benchmark] public object _PrimitiveSByteSerialize() => Serializer.Serialize(SByteInput);
- [Benchmark] public object _PrimitiveShortSerialize() => Serializer.Serialize(ShortInput);
- [Benchmark] public object _PrimitiveIntSerialize() => Serializer.Serialize(IntInput);
- [Benchmark] public object _PrimitiveLongSerialize() => Serializer.Serialize(LongInput);
- [Benchmark] public object _PrimitiveByteSerialize() => Serializer.Serialize(ByteInput);
- [Benchmark] public object _PrimitiveUShortSerialize() => Serializer.Serialize(UShortInput);
- [Benchmark] public object _PrimitiveUIntSerialize() => Serializer.Serialize(UIntInput);
- [Benchmark] public object _PrimitiveULongSerialize() => Serializer.Serialize(ULongInput);
- [Benchmark] public object _PrimitiveBoolSerialize() => Serializer.Serialize(BoolInput);
- [Benchmark] public object _PrimitiveStringSerialize() => Serializer.Serialize(StringInput);
- [Benchmark] public object _PrimitiveCharSerialize() => Serializer.Serialize(CharInput);
- [Benchmark] public object _PrimitiveDateTimeSerialize() => Serializer.Serialize(DateTimeInput);
- [Benchmark] public object _PrimitiveGuidSerialize() => Serializer.Serialize(GuidInput);
- [Benchmark] public object _PrimitiveBytesSerialize() => Serializer.Serialize(BytesInput);
-
- [Benchmark] public object AccessTokenSerialize() => Serializer.Serialize(AccessTokenInput);
- [Benchmark] public object AccountMergeSerialize() => Serializer.Serialize(AccountMergeInput);
- [Benchmark] public object AnswerSerialize() => Serializer.Serialize(AnswerInput);
- [Benchmark] public object BadgeSerialize() => Serializer.Serialize(BadgeInput);
- [Benchmark] public object CommentSerialize() => Serializer.Serialize(CommentInput);
- [Benchmark] public object ErrorSerialize() => Serializer.Serialize(ErrorInput);
- [Benchmark] public object EventSerialize() => Serializer.Serialize(EventInput);
- [Benchmark] public object MobileFeedSerialize() => Serializer.Serialize(MobileFeedInput);
- [Benchmark] public object MobileQuestionSerialize() => Serializer.Serialize(MobileQuestionInput);
- [Benchmark] public object MobileRepChangeSerialize() => Serializer.Serialize(MobileRepChangeInput);
- [Benchmark] public object MobileInboxItemSerialize() => Serializer.Serialize(MobileInboxItemInput);
- [Benchmark] public object MobileBadgeAwardSerialize() => Serializer.Serialize(MobileBadgeAwardInput);
- [Benchmark] public object MobilePrivilegeSerialize() => Serializer.Serialize(MobilePrivilegeInput);
- [Benchmark] public object MobileCommunityBulletinSerialize() => Serializer.Serialize(MobileCommunityBulletinInput);
- [Benchmark] public object MobileAssociationBonusSerialize() => Serializer.Serialize(MobileAssociationBonusInput);
- [Benchmark] public object MobileCareersJobAdSerialize() => Serializer.Serialize(MobileCareersJobAdInput);
- [Benchmark] public object MobileBannerAdSerialize() => Serializer.Serialize(MobileBannerAdInput);
- [Benchmark] public object MobileUpdateNoticeSerialize() => Serializer.Serialize(MobileUpdateNoticeInput);
- [Benchmark] public object FlagOptionSerialize() => Serializer.Serialize(FlagOptionInput);
- [Benchmark] public object InboxItemSerialize() => Serializer.Serialize(InboxItemInput);
- [Benchmark] public object InfoSerialize() => Serializer.Serialize(InfoInput);
- [Benchmark] public object NetworkUserSerialize() => Serializer.Serialize(NetworkUserInput);
- [Benchmark] public object NotificationSerialize() => Serializer.Serialize(NotificationInput);
- [Benchmark] public object PostSerialize() => Serializer.Serialize(PostInput);
- [Benchmark] public object PrivilegeSerialize() => Serializer.Serialize(PrivilegeInput);
- [Benchmark] public object QuestionSerialize() => Serializer.Serialize(QuestionInput);
- [Benchmark] public object QuestionTimelineSerialize() => Serializer.Serialize(QuestionTimelineInput);
- [Benchmark] public object ReputationSerialize() => Serializer.Serialize(ReputationInput);
- [Benchmark] public object ReputationHistorySerialize() => Serializer.Serialize(ReputationHistoryInput);
- [Benchmark] public object RevisionSerialize() => Serializer.Serialize(RevisionInput);
- [Benchmark] public object SearchExcerptSerialize() => Serializer.Serialize(SearchExcerptInput);
- [Benchmark] public object ShallowUserSerialize() => Serializer.Serialize(ShallowUserInput);
- [Benchmark] public object SuggestedEditSerialize() => Serializer.Serialize(SuggestedEditInput);
- [Benchmark] public object TagSerialize() => Serializer.Serialize(TagInput);
- [Benchmark] public object TagScoreSerialize() => Serializer.Serialize(TagScoreInput);
- [Benchmark] public object TagSynonymSerialize() => Serializer.Serialize(TagSynonymInput);
- [Benchmark] public object TagWikiSerialize() => Serializer.Serialize(TagWikiInput);
- [Benchmark] public object TopTagSerialize() => Serializer.Serialize(TopTagInput);
- [Benchmark] public object UserSerialize() => Serializer.Serialize(UserInput);
- [Benchmark] public object UserTimelineSerialize() => Serializer.Serialize(UserTimelineInput);
- [Benchmark] public object WritePermissionSerialize() => Serializer.Serialize(WritePermissionInput);
- [Benchmark] public object MobileBannerAdImageSerialize() => Serializer.Serialize(MobileBannerAdImageInput);
- [Benchmark] public object SiteSerialize() => Serializer.Serialize(SiteInput);
- [Benchmark] public object RelatedSiteSerialize() => Serializer.Serialize(RelatedSiteInput);
- [Benchmark] public object ClosedDetailsSerialize() => Serializer.Serialize(ClosedDetailsInput);
- [Benchmark] public object NoticeSerialize() => Serializer.Serialize(NoticeInput);
- [Benchmark] public object MigrationInfoSerialize() => Serializer.Serialize(MigrationInfoInput);
- [Benchmark] public object BadgeCountSerialize() => Serializer.Serialize(BadgeCountInput);
- [Benchmark] public object StylingSerialize() => Serializer.Serialize(StylingInput);
- [Benchmark] public object OriginalQuestionSerialize() => Serializer.Serialize(OriginalQuestionInput);
+ [Benchmark] public object MobileUpdateNoticeSerialize() => this.Serializer.Serialize(MobileUpdateNoticeInput);
+
+ [Benchmark] public object FlagOptionSerialize() => this.Serializer.Serialize(FlagOptionInput);
+
+ [Benchmark] public object InboxItemSerialize() => this.Serializer.Serialize(InboxItemInput);
+
+ [Benchmark] public object InfoSerialize() => this.Serializer.Serialize(InfoInput);
+
+ [Benchmark] public object NetworkUserSerialize() => this.Serializer.Serialize(NetworkUserInput);
+
+ [Benchmark] public object NotificationSerialize() => this.Serializer.Serialize(NotificationInput);
+
+ [Benchmark] public object PostSerialize() => this.Serializer.Serialize(PostInput);
+
+ [Benchmark] public object PrivilegeSerialize() => this.Serializer.Serialize(PrivilegeInput);
+
+ [Benchmark] public object QuestionSerialize() => this.Serializer.Serialize(QuestionInput);
+
+ [Benchmark] public object QuestionTimelineSerialize() => this.Serializer.Serialize(QuestionTimelineInput);
+
+ [Benchmark] public object ReputationSerialize() => this.Serializer.Serialize(ReputationInput);
+
+ [Benchmark] public object ReputationHistorySerialize() => this.Serializer.Serialize(ReputationHistoryInput);
+
+ [Benchmark] public object RevisionSerialize() => this.Serializer.Serialize(RevisionInput);
+
+ [Benchmark] public object SearchExcerptSerialize() => this.Serializer.Serialize(SearchExcerptInput);
+
+ [Benchmark] public object ShallowUserSerialize() => this.Serializer.Serialize(ShallowUserInput);
+
+ [Benchmark] public object SuggestedEditSerialize() => this.Serializer.Serialize(SuggestedEditInput);
+
+ [Benchmark] public object TagSerialize() => this.Serializer.Serialize(TagInput);
+
+ [Benchmark] public object TagScoreSerialize() => this.Serializer.Serialize(TagScoreInput);
+
+ [Benchmark] public object TagSynonymSerialize() => this.Serializer.Serialize(TagSynonymInput);
+
+ [Benchmark] public object TagWikiSerialize() => this.Serializer.Serialize(TagWikiInput);
+
+ [Benchmark] public object TopTagSerialize() => this.Serializer.Serialize(TopTagInput);
+
+ [Benchmark] public object UserSerialize() => this.Serializer.Serialize(UserInput);
+
+ [Benchmark] public object UserTimelineSerialize() => this.Serializer.Serialize(UserTimelineInput);
+
+ [Benchmark] public object WritePermissionSerialize() => this.Serializer.Serialize(WritePermissionInput);
+
+ [Benchmark] public object MobileBannerAdImageSerialize() => this.Serializer.Serialize(MobileBannerAdImageInput);
+
+ [Benchmark] public object SiteSerialize() => this.Serializer.Serialize(SiteInput);
+
+ [Benchmark] public object RelatedSiteSerialize() => this.Serializer.Serialize(RelatedSiteInput);
+
+ [Benchmark] public object ClosedDetailsSerialize() => this.Serializer.Serialize(ClosedDetailsInput);
+
+ [Benchmark] public object NoticeSerialize() => this.Serializer.Serialize(NoticeInput);
+
+ [Benchmark] public object MigrationInfoSerialize() => this.Serializer.Serialize(MigrationInfoInput);
+
+ [Benchmark] public object BadgeCountSerialize() => this.Serializer.Serialize(BadgeCountInput);
+
+ [Benchmark] public object StylingSerialize() => this.Serializer.Serialize(StylingInput);
+
+ [Benchmark] public object OriginalQuestionSerialize() => this.Serializer.Serialize(OriginalQuestionInput);
// Deserialize
+ [Benchmark] public SByte _PrimitiveSByteDeserialize() => this.Serializer.Deserialize<SByte>(this.SByteOutput);
- [Benchmark] public SByte _PrimitiveSByteDeserialize() => Serializer.Deserialize<SByte>(SByteOutput);
- [Benchmark] public short _PrimitiveShortDeserialize() => Serializer.Deserialize<short>(ShortOutput);
- [Benchmark] public Int32 _PrimitiveIntDeserialize() => Serializer.Deserialize<Int32>(IntOutput);
- [Benchmark] public Int64 _PrimitiveLongDeserialize() => Serializer.Deserialize<Int64>(LongOutput);
- [Benchmark] public Byte _PrimitiveByteDeserialize() => Serializer.Deserialize<Byte>(ByteOutput);
- [Benchmark] public ushort _PrimitiveUShortDeserialize() => Serializer.Deserialize<ushort>(UShortOutput);
- [Benchmark] public uint _PrimitiveUIntDeserialize() => Serializer.Deserialize<uint>(UIntOutput);
- [Benchmark] public ulong _PrimitiveULongDeserialize() => Serializer.Deserialize<ulong>(ULongOutput);
- [Benchmark] public bool _PrimitiveBoolDeserialize() => Serializer.Deserialize<bool>(BoolOutput);
- [Benchmark] public String _PrimitiveStringDeserialize() => Serializer.Deserialize<String>(StringOutput);
- [Benchmark] public Char _PrimitiveCharDeserialize() => Serializer.Deserialize<Char>(CharOutput);
- [Benchmark] public DateTime _PrimitiveDateTimeDeserialize() => Serializer.Deserialize<DateTime>(DateTimeOutput);
- [Benchmark] public Guid _PrimitiveGuidDeserialize() => Serializer.Deserialize<Guid>(GuidOutput);
- [Benchmark] public byte[] _PrimitiveBytesDeserialize() => Serializer.Deserialize<byte[]>(BytesOutput);
- [Benchmark] public AccessToken AccessTokenDeserialize() => Serializer.Deserialize<AccessToken>(AccessTokenOutput);
- [Benchmark] public AccountMerge AccountMergeDeserialize() => Serializer.Deserialize<AccountMerge>(AccountMergeOutput);
- [Benchmark] public Answer AnswerDeserialize() => Serializer.Deserialize<Answer>(AnswerOutput);
- [Benchmark] public Badge BadgeDeserialize() => Serializer.Deserialize<Badge>(BadgeOutput);
- [Benchmark] public Comment CommentDeserialize() => Serializer.Deserialize<Comment>(CommentOutput);
- [Benchmark] public Error ErrorDeserialize() => Serializer.Deserialize<Error>(ErrorOutput);
- [Benchmark] public Event EventDeserialize() => Serializer.Deserialize<Event>(EventOutput);
- [Benchmark] public MobileFeed MobileFeedDeserialize() => Serializer.Deserialize<MobileFeed>(MobileFeedOutput);
- [Benchmark] public MobileQuestion MobileQuestionDeserialize() => Serializer.Deserialize<MobileQuestion>(MobileQuestionOutput);
- [Benchmark] public MobileRepChange MobileRepChangeDeserialize() => Serializer.Deserialize<MobileRepChange>(MobileRepChangeOutput);
- [Benchmark] public MobileInboxItem MobileInboxItemDeserialize() => Serializer.Deserialize<MobileInboxItem>(MobileInboxItemOutput);
- [Benchmark] public MobileBadgeAward MobileBadgeAwardDeserialize() => Serializer.Deserialize<MobileBadgeAward>(MobileBadgeAwardOutput);
- [Benchmark] public MobilePrivilege MobilePrivilegeDeserialize() => Serializer.Deserialize<MobilePrivilege>(MobilePrivilegeOutput);
- [Benchmark] public MobileCommunityBulletin MobileCommunityBulletinDeserialize() => Serializer.Deserialize<MobileCommunityBulletin>(MobileCommunityBulletinOutput);
- [Benchmark] public MobileAssociationBonus MobileAssociationBonusDeserialize() => Serializer.Deserialize<MobileAssociationBonus>(MobileAssociationBonusOutput);
- [Benchmark] public MobileCareersJobAd MobileCareersJobAdDeserialize() => Serializer.Deserialize<MobileCareersJobAd>(MobileCareersJobAdOutput);
- [Benchmark] public MobileBannerAd MobileBannerAdDeserialize() => Serializer.Deserialize<MobileBannerAd>(MobileBannerAdOutput);
- [Benchmark] public MobileUpdateNotice MobileUpdateNoticeDeserialize() => Serializer.Deserialize<MobileUpdateNotice>(MobileUpdateNoticeOutput);
- [Benchmark] public FlagOption FlagOptionDeserialize() => Serializer.Deserialize<FlagOption>(FlagOptionOutput);
- [Benchmark] public InboxItem InboxItemDeserialize() => Serializer.Deserialize<InboxItem>(InboxItemOutput);
- [Benchmark] public Info InfoDeserialize() => Serializer.Deserialize<Info>(InfoOutput);
- [Benchmark] public NetworkUser NetworkUserDeserialize() => Serializer.Deserialize<NetworkUser>(NetworkUserOutput);
- [Benchmark] public Notification NotificationDeserialize() => Serializer.Deserialize<Notification>(NotificationOutput);
- [Benchmark] public Post PostDeserialize() => Serializer.Deserialize<Post>(PostOutput);
- [Benchmark] public Privilege PrivilegeDeserialize() => Serializer.Deserialize<Privilege>(PrivilegeOutput);
- [Benchmark] public Question QuestionDeserialize() => Serializer.Deserialize<Question>(QuestionOutput);
- [Benchmark] public QuestionTimeline QuestionTimelineDeserialize() => Serializer.Deserialize<QuestionTimeline>(QuestionTimelineOutput);
- [Benchmark] public Reputation ReputationDeserialize() => Serializer.Deserialize<Reputation>(ReputationOutput);
- [Benchmark] public ReputationHistory ReputationHistoryDeserialize() => Serializer.Deserialize<ReputationHistory>(ReputationHistoryOutput);
- [Benchmark] public Revision RevisionDeserialize() => Serializer.Deserialize<Revision>(RevisionOutput);
- [Benchmark] public SearchExcerpt SearchExcerptDeserialize() => Serializer.Deserialize<SearchExcerpt>(SearchExcerptOutput);
- [Benchmark] public ShallowUser ShallowUserDeserialize() => Serializer.Deserialize<ShallowUser>(ShallowUserOutput);
- [Benchmark] public SuggestedEdit SuggestedEditDeserialize() => Serializer.Deserialize<SuggestedEdit>(SuggestedEditOutput);
- [Benchmark] public Tag TagDeserialize() => Serializer.Deserialize<Tag>(TagOutput);
- [Benchmark] public TagScore TagScoreDeserialize() => Serializer.Deserialize<TagScore>(TagScoreOutput);
- [Benchmark] public TagSynonym TagSynonymDeserialize() => Serializer.Deserialize<TagSynonym>(TagSynonymOutput);
- [Benchmark] public TagWiki TagWikiDeserialize() => Serializer.Deserialize<TagWiki>(TagWikiOutput);
- [Benchmark] public TopTag TopTagDeserialize() => Serializer.Deserialize<TopTag>(TopTagOutput);
- [Benchmark] public User UserDeserialize() => Serializer.Deserialize<User>(UserOutput);
- [Benchmark] public UserTimeline UserTimelineDeserialize() => Serializer.Deserialize<UserTimeline>(UserTimelineOutput);
- [Benchmark] public WritePermission WritePermissionDeserialize() => Serializer.Deserialize<WritePermission>(WritePermissionOutput);
- [Benchmark] public MobileBannerAd.MobileBannerAdImage MobileBannerAdImageDeserialize() => Serializer.Deserialize<MobileBannerAd.MobileBannerAdImage>(MobileBannerAdImageOutput);
- [Benchmark] public Info.Site SiteDeserialize() => Serializer.Deserialize<Info.Site>(SiteOutput);
- [Benchmark] public Info.RelatedSite RelatedSiteDeserialize() => Serializer.Deserialize<Info.RelatedSite>(RelatedSiteOutput);
- [Benchmark] public Question.ClosedDetails ClosedDetailsDeserialize() => Serializer.Deserialize<Question.ClosedDetails>(ClosedDetailsOutput);
- [Benchmark] public Question.Notice NoticeDeserialize() => Serializer.Deserialize<Question.Notice>(NoticeOutput);
- [Benchmark] public Question.MigrationInfo MigrationInfoDeserialize() => Serializer.Deserialize<Question.MigrationInfo>(MigrationInfoOutput);
- [Benchmark] public User.BadgeCount BadgeCountDeserialize() => Serializer.Deserialize<User.BadgeCount>(BadgeCountOutput);
- [Benchmark] public Info.Site.Styling StylingDeserialize() => Serializer.Deserialize<Info.Site.Styling>(StylingOutput);
- [Benchmark] public Question.ClosedDetails.OriginalQuestion OriginalQuestionDeserialize() => Serializer.Deserialize<Question.ClosedDetails.OriginalQuestion>(OriginalQuestionOutput);
- }
+ [Benchmark] public short _PrimitiveShortDeserialize() => this.Serializer.Deserialize<short>(this.ShortOutput);
+ [Benchmark] public Int32 _PrimitiveIntDeserialize() => this.Serializer.Deserialize<Int32>(this.IntOutput);
+
+ [Benchmark] public Int64 _PrimitiveLongDeserialize() => this.Serializer.Deserialize<Int64>(this.LongOutput);
+
+ [Benchmark] public Byte _PrimitiveByteDeserialize() => this.Serializer.Deserialize<Byte>(this.ByteOutput);
+
+ [Benchmark] public ushort _PrimitiveUShortDeserialize() => this.Serializer.Deserialize<ushort>(this.UShortOutput);
+
+ [Benchmark] public uint _PrimitiveUIntDeserialize() => this.Serializer.Deserialize<uint>(this.UIntOutput);
+
+ [Benchmark] public ulong _PrimitiveULongDeserialize() => this.Serializer.Deserialize<ulong>(this.ULongOutput);
+
+ [Benchmark] public bool _PrimitiveBoolDeserialize() => this.Serializer.Deserialize<bool>(this.BoolOutput);
+
+ [Benchmark] public String _PrimitiveStringDeserialize() => this.Serializer.Deserialize<String>(this.StringOutput);
+
+ [Benchmark] public Char _PrimitiveCharDeserialize() => this.Serializer.Deserialize<Char>(this.CharOutput);
+
+ [Benchmark] public DateTime _PrimitiveDateTimeDeserialize() => this.Serializer.Deserialize<DateTime>(this.DateTimeOutput);
+
+ [Benchmark] public Guid _PrimitiveGuidDeserialize() => this.Serializer.Deserialize<Guid>(this.GuidOutput);
+
+ [Benchmark] public byte[] _PrimitiveBytesDeserialize() => this.Serializer.Deserialize<byte[]>(this.BytesOutput);
+
+ [Benchmark] public AccessToken AccessTokenDeserialize() => this.Serializer.Deserialize<AccessToken>(this.AccessTokenOutput);
+
+ [Benchmark] public AccountMerge AccountMergeDeserialize() => this.Serializer.Deserialize<AccountMerge>(this.AccountMergeOutput);
+
+ [Benchmark] public Answer AnswerDeserialize() => this.Serializer.Deserialize<Answer>(this.AnswerOutput);
+
+ [Benchmark] public Badge BadgeDeserialize() => this.Serializer.Deserialize<Badge>(this.BadgeOutput);
+
+ [Benchmark] public Comment CommentDeserialize() => this.Serializer.Deserialize<Comment>(this.CommentOutput);
+
+ [Benchmark] public Error ErrorDeserialize() => this.Serializer.Deserialize<Error>(this.ErrorOutput);
+
+ [Benchmark] public Event EventDeserialize() => this.Serializer.Deserialize<Event>(this.EventOutput);
+
+ [Benchmark] public MobileFeed MobileFeedDeserialize() => this.Serializer.Deserialize<MobileFeed>(this.MobileFeedOutput);
+
+ [Benchmark] public MobileQuestion MobileQuestionDeserialize() => this.Serializer.Deserialize<MobileQuestion>(this.MobileQuestionOutput);
+
+ [Benchmark] public MobileRepChange MobileRepChangeDeserialize() => this.Serializer.Deserialize<MobileRepChange>(this.MobileRepChangeOutput);
+
+ [Benchmark] public MobileInboxItem MobileInboxItemDeserialize() => this.Serializer.Deserialize<MobileInboxItem>(this.MobileInboxItemOutput);
+
+ [Benchmark] public MobileBadgeAward MobileBadgeAwardDeserialize() => this.Serializer.Deserialize<MobileBadgeAward>(this.MobileBadgeAwardOutput);
+
+ [Benchmark] public MobilePrivilege MobilePrivilegeDeserialize() => this.Serializer.Deserialize<MobilePrivilege>(this.MobilePrivilegeOutput);
+
+ [Benchmark] public MobileCommunityBulletin MobileCommunityBulletinDeserialize() => this.Serializer.Deserialize<MobileCommunityBulletin>(this.MobileCommunityBulletinOutput);
+
+ [Benchmark] public MobileAssociationBonus MobileAssociationBonusDeserialize() => this.Serializer.Deserialize<MobileAssociationBonus>(this.MobileAssociationBonusOutput);
+
+ [Benchmark] public MobileCareersJobAd MobileCareersJobAdDeserialize() => this.Serializer.Deserialize<MobileCareersJobAd>(this.MobileCareersJobAdOutput);
+
+ [Benchmark] public MobileBannerAd MobileBannerAdDeserialize() => this.Serializer.Deserialize<MobileBannerAd>(this.MobileBannerAdOutput);
+
+ [Benchmark] public MobileUpdateNotice MobileUpdateNoticeDeserialize() => this.Serializer.Deserialize<MobileUpdateNotice>(this.MobileUpdateNoticeOutput);
+
+ [Benchmark] public FlagOption FlagOptionDeserialize() => this.Serializer.Deserialize<FlagOption>(this.FlagOptionOutput);
+
+ [Benchmark] public InboxItem InboxItemDeserialize() => this.Serializer.Deserialize<InboxItem>(this.InboxItemOutput);
+
+ [Benchmark] public Info InfoDeserialize() => this.Serializer.Deserialize<Info>(this.InfoOutput);
+
+ [Benchmark] public NetworkUser NetworkUserDeserialize() => this.Serializer.Deserialize<NetworkUser>(this.NetworkUserOutput);
+
+ [Benchmark] public Notification NotificationDeserialize() => this.Serializer.Deserialize<Notification>(this.NotificationOutput);
+
+ [Benchmark] public Post PostDeserialize() => this.Serializer.Deserialize<Post>(this.PostOutput);
+
+ [Benchmark] public Privilege PrivilegeDeserialize() => this.Serializer.Deserialize<Privilege>(this.PrivilegeOutput);
+
+ [Benchmark] public Question QuestionDeserialize() => this.Serializer.Deserialize<Question>(this.QuestionOutput);
+
+ [Benchmark] public QuestionTimeline QuestionTimelineDeserialize() => this.Serializer.Deserialize<QuestionTimeline>(this.QuestionTimelineOutput);
+
+ [Benchmark] public Reputation ReputationDeserialize() => this.Serializer.Deserialize<Reputation>(this.ReputationOutput);
+
+ [Benchmark] public ReputationHistory ReputationHistoryDeserialize() => this.Serializer.Deserialize<ReputationHistory>(this.ReputationHistoryOutput);
+
+ [Benchmark] public Revision RevisionDeserialize() => this.Serializer.Deserialize<Revision>(this.RevisionOutput);
+
+ [Benchmark] public SearchExcerpt SearchExcerptDeserialize() => this.Serializer.Deserialize<SearchExcerpt>(this.SearchExcerptOutput);
+
+ [Benchmark] public ShallowUser ShallowUserDeserialize() => this.Serializer.Deserialize<ShallowUser>(this.ShallowUserOutput);
+
+ [Benchmark] public SuggestedEdit SuggestedEditDeserialize() => this.Serializer.Deserialize<SuggestedEdit>(this.SuggestedEditOutput);
+
+ [Benchmark] public Tag TagDeserialize() => this.Serializer.Deserialize<Tag>(this.TagOutput);
+
+ [Benchmark] public TagScore TagScoreDeserialize() => this.Serializer.Deserialize<TagScore>(this.TagScoreOutput);
+
+ [Benchmark] public TagSynonym TagSynonymDeserialize() => this.Serializer.Deserialize<TagSynonym>(this.TagSynonymOutput);
+
+ [Benchmark] public TagWiki TagWikiDeserialize() => this.Serializer.Deserialize<TagWiki>(this.TagWikiOutput);
+
+ [Benchmark] public TopTag TopTagDeserialize() => this.Serializer.Deserialize<TopTag>(this.TopTagOutput);
+
+ [Benchmark] public User UserDeserialize() => this.Serializer.Deserialize<User>(this.UserOutput);
+
+ [Benchmark] public UserTimeline UserTimelineDeserialize() => this.Serializer.Deserialize<UserTimeline>(this.UserTimelineOutput);
+
+ [Benchmark] public WritePermission WritePermissionDeserialize() => this.Serializer.Deserialize<WritePermission>(this.WritePermissionOutput);
+
+ [Benchmark] public MobileBannerAd.MobileBannerAdImage MobileBannerAdImageDeserialize() => this.Serializer.Deserialize<MobileBannerAd.MobileBannerAdImage>(this.MobileBannerAdImageOutput);
+
+ [Benchmark] public Info.Site SiteDeserialize() => this.Serializer.Deserialize<Info.Site>(this.SiteOutput);
+
+ [Benchmark] public Info.RelatedSite RelatedSiteDeserialize() => this.Serializer.Deserialize<Info.RelatedSite>(this.RelatedSiteOutput);
+
+ [Benchmark] public Question.ClosedDetails ClosedDetailsDeserialize() => this.Serializer.Deserialize<Question.ClosedDetails>(this.ClosedDetailsOutput);
+
+ [Benchmark] public Question.Notice NoticeDeserialize() => this.Serializer.Deserialize<Question.Notice>(this.NoticeOutput);
+
+ [Benchmark] public Question.MigrationInfo MigrationInfoDeserialize() => this.Serializer.Deserialize<Question.MigrationInfo>(this.MigrationInfoOutput);
+
+ [Benchmark] public User.BadgeCount BadgeCountDeserialize() => this.Serializer.Deserialize<User.BadgeCount>(this.BadgeCountOutput);
+
+ [Benchmark] public Info.Site.Styling StylingDeserialize() => this.Serializer.Deserialize<Info.Site.Styling>(this.StylingOutput);
+
+ [Benchmark] public Question.ClosedDetails.OriginalQuestion OriginalQuestionDeserialize() => this.Serializer.Deserialize<Question.ClosedDetails.OriginalQuestion>(this.OriginalQuestionOutput);
+ }
[Config(typeof(BenchmarkConfig))]
public class MsgPackV1_Vs_MsgPackV2_BytesInOut // : AllSerializerBenchmark
@@ -437,7 +564,6 @@
public SerializerBase Serializer;
// Currently BenchmarkdDotNet does not detect inherited ParamsSource so use copy and paste:)
-
public IEnumerable<SerializerBase> Serializers => new SerializerBase[]
{
new MessagePack_v1(),
@@ -447,7 +573,6 @@
protected static readonly ExpressionTreeFixture ExpressionTreeFixture = new ExpressionTreeFixture();
// primitives
-
protected static readonly sbyte SByteInput = ExpressionTreeFixture.Create<sbyte>();
protected static readonly short ShortInput = ExpressionTreeFixture.Create<short>();
protected static readonly int IntInput = ExpressionTreeFixture.Create<int>();
@@ -464,7 +589,6 @@
protected static readonly byte[] BytesInput = ExpressionTreeFixture.Create<byte[]>();
// models
-
protected static readonly Benchmark.Models.AccessToken AccessTokenInput = ExpressionTreeFixture.Create<Benchmark.Models.AccessToken>();
protected static readonly Benchmark.Models.AccountMerge AccountMergeInput = ExpressionTreeFixture.Create<Benchmark.Models.AccountMerge>();
@@ -565,280 +689,402 @@
protected static readonly Benchmark.Models.Question.ClosedDetails.OriginalQuestion OriginalQuestionInput = ExpressionTreeFixture.Create<Benchmark.Models.Question.ClosedDetails.OriginalQuestion>();
- object SByteOutput;
- object ShortOutput;
- object IntOutput;
- object LongOutput;
- object ByteOutput;
- object UShortOutput;
- object UIntOutput;
- object ULongOutput;
- object BoolOutput;
- object StringOutput;
- object CharOutput;
- object DateTimeOutput;
- object GuidOutput;
- object BytesOutput;
-
- object AccessTokenOutput;
- object AccountMergeOutput;
- object AnswerOutput;
- object BadgeOutput;
- object CommentOutput;
- object ErrorOutput;
- object EventOutput;
- object MobileFeedOutput;
- object MobileQuestionOutput;
- object MobileRepChangeOutput;
- object MobileInboxItemOutput;
- object MobileBadgeAwardOutput;
- object MobilePrivilegeOutput;
- object MobileCommunityBulletinOutput;
- object MobileAssociationBonusOutput;
- object MobileCareersJobAdOutput;
- object MobileBannerAdOutput;
- object MobileUpdateNoticeOutput;
- object FlagOptionOutput;
- object InboxItemOutput;
- object InfoOutput;
- object NetworkUserOutput;
- object NotificationOutput;
- object PostOutput;
- object PrivilegeOutput;
- object QuestionOutput;
- object QuestionTimelineOutput;
- object ReputationOutput;
- object ReputationHistoryOutput;
- object RevisionOutput;
- object SearchExcerptOutput;
- object ShallowUserOutput;
- object SuggestedEditOutput;
- object TagOutput;
- object TagScoreOutput;
- object TagSynonymOutput;
- object TagWikiOutput;
- object TopTagOutput;
- object UserOutput;
- object UserTimelineOutput;
- object WritePermissionOutput;
- object MobileBannerAdImageOutput;
- object SiteOutput;
- object RelatedSiteOutput;
- object ClosedDetailsOutput;
- object NoticeOutput;
- object MigrationInfoOutput;
- object BadgeCountOutput;
- object StylingOutput;
- object OriginalQuestionOutput;
+ private object SByteOutput;
+ private object ShortOutput;
+ private object IntOutput;
+ private object LongOutput;
+ private object ByteOutput;
+ private object UShortOutput;
+ private object UIntOutput;
+ private object ULongOutput;
+ private object BoolOutput;
+ private object StringOutput;
+ private object CharOutput;
+ private object DateTimeOutput;
+ private object GuidOutput;
+ private object BytesOutput;
+
+ private object AccessTokenOutput;
+ private object AccountMergeOutput;
+ private object AnswerOutput;
+ private object BadgeOutput;
+ private object CommentOutput;
+ private object ErrorOutput;
+ private object EventOutput;
+ private object MobileFeedOutput;
+ private object MobileQuestionOutput;
+ private object MobileRepChangeOutput;
+ private object MobileInboxItemOutput;
+ private object MobileBadgeAwardOutput;
+ private object MobilePrivilegeOutput;
+ private object MobileCommunityBulletinOutput;
+ private object MobileAssociationBonusOutput;
+ private object MobileCareersJobAdOutput;
+ private object MobileBannerAdOutput;
+ private object MobileUpdateNoticeOutput;
+ private object FlagOptionOutput;
+ private object InboxItemOutput;
+ private object InfoOutput;
+ private object NetworkUserOutput;
+ private object NotificationOutput;
+ private object PostOutput;
+ private object PrivilegeOutput;
+ private object QuestionOutput;
+ private object QuestionTimelineOutput;
+ private object ReputationOutput;
+ private object ReputationHistoryOutput;
+ private object RevisionOutput;
+ private object SearchExcerptOutput;
+ private object ShallowUserOutput;
+ private object SuggestedEditOutput;
+ private object TagOutput;
+ private object TagScoreOutput;
+ private object TagSynonymOutput;
+ private object TagWikiOutput;
+ private object TopTagOutput;
+ private object UserOutput;
+ private object UserTimelineOutput;
+ private object WritePermissionOutput;
+ private object MobileBannerAdImageOutput;
+ private object SiteOutput;
+ private object RelatedSiteOutput;
+ private object ClosedDetailsOutput;
+ private object NoticeOutput;
+ private object MigrationInfoOutput;
+ private object BadgeCountOutput;
+ private object StylingOutput;
+ private object OriginalQuestionOutput;
[GlobalSetup]
public void Setup()
{
// primitives
- SByteOutput = Serializer.Serialize(SByteInput);
- ShortOutput = Serializer.Serialize(ShortInput);
- IntOutput = Serializer.Serialize(IntInput);
- LongOutput = Serializer.Serialize(LongInput);
- ByteOutput = Serializer.Serialize(ByteInput);
- UShortOutput = Serializer.Serialize(UShortInput);
- UIntOutput = Serializer.Serialize(UIntInput);
- ULongOutput = Serializer.Serialize(ULongInput);
- BoolOutput = Serializer.Serialize(BoolInput);
- StringOutput = Serializer.Serialize(StringInput);
- CharOutput = Serializer.Serialize(CharInput);
- DateTimeOutput = Serializer.Serialize(DateTimeInput);
- GuidOutput = Serializer.Serialize(GuidInput);
- BytesOutput = Serializer.Serialize(BytesInput);
+ this.SByteOutput = this.Serializer.Serialize(SByteInput);
+ this.ShortOutput = this.Serializer.Serialize(ShortInput);
+ this.IntOutput = this.Serializer.Serialize(IntInput);
+ this.LongOutput = this.Serializer.Serialize(LongInput);
+ this.ByteOutput = this.Serializer.Serialize(ByteInput);
+ this.UShortOutput = this.Serializer.Serialize(UShortInput);
+ this.UIntOutput = this.Serializer.Serialize(UIntInput);
+ this.ULongOutput = this.Serializer.Serialize(ULongInput);
+ this.BoolOutput = this.Serializer.Serialize(BoolInput);
+ this.StringOutput = this.Serializer.Serialize(StringInput);
+ this.CharOutput = this.Serializer.Serialize(CharInput);
+ this.DateTimeOutput = this.Serializer.Serialize(DateTimeInput);
+ this.GuidOutput = this.Serializer.Serialize(GuidInput);
+ this.BytesOutput = this.Serializer.Serialize(BytesInput);
// models
- AccessTokenOutput = Serializer.Serialize(AccessTokenInput);
- AccountMergeOutput = Serializer.Serialize(AccountMergeInput);
- AnswerOutput = Serializer.Serialize(AnswerInput);
- BadgeOutput = Serializer.Serialize(BadgeInput);
- CommentOutput = Serializer.Serialize(CommentInput);
- ErrorOutput = Serializer.Serialize(ErrorInput);
- EventOutput = Serializer.Serialize(EventInput);
- MobileFeedOutput = Serializer.Serialize(MobileFeedInput);
- MobileQuestionOutput = Serializer.Serialize(MobileQuestionInput);
- MobileRepChangeOutput = Serializer.Serialize(MobileRepChangeInput);
- MobileInboxItemOutput = Serializer.Serialize(MobileInboxItemInput);
- MobileBadgeAwardOutput = Serializer.Serialize(MobileBadgeAwardInput);
- MobilePrivilegeOutput = Serializer.Serialize(MobilePrivilegeInput);
- MobileCommunityBulletinOutput = Serializer.Serialize(MobileCommunityBulletinInput);
- MobileAssociationBonusOutput = Serializer.Serialize(MobileAssociationBonusInput);
- MobileCareersJobAdOutput = Serializer.Serialize(MobileCareersJobAdInput);
- MobileBannerAdOutput = Serializer.Serialize(MobileBannerAdInput);
- MobileUpdateNoticeOutput = Serializer.Serialize(MobileUpdateNoticeInput);
- FlagOptionOutput = Serializer.Serialize(FlagOptionInput);
- InboxItemOutput = Serializer.Serialize(InboxItemInput);
- InfoOutput = Serializer.Serialize(InfoInput);
- NetworkUserOutput = Serializer.Serialize(NetworkUserInput);
- NotificationOutput = Serializer.Serialize(NotificationInput);
- PostOutput = Serializer.Serialize(PostInput);
- PrivilegeOutput = Serializer.Serialize(PrivilegeInput);
- QuestionOutput = Serializer.Serialize(QuestionInput);
- QuestionTimelineOutput = Serializer.Serialize(QuestionTimelineInput);
- ReputationOutput = Serializer.Serialize(ReputationInput);
- ReputationHistoryOutput = Serializer.Serialize(ReputationHistoryInput);
- RevisionOutput = Serializer.Serialize(RevisionInput);
- SearchExcerptOutput = Serializer.Serialize(SearchExcerptInput);
- ShallowUserOutput = Serializer.Serialize(ShallowUserInput);
- SuggestedEditOutput = Serializer.Serialize(SuggestedEditInput);
- TagOutput = Serializer.Serialize(TagInput);
- TagScoreOutput = Serializer.Serialize(TagScoreInput);
- TagSynonymOutput = Serializer.Serialize(TagSynonymInput);
- TagWikiOutput = Serializer.Serialize(TagWikiInput);
- TopTagOutput = Serializer.Serialize(TopTagInput);
- UserOutput = Serializer.Serialize(UserInput);
- UserTimelineOutput = Serializer.Serialize(UserTimelineInput);
- WritePermissionOutput = Serializer.Serialize(WritePermissionInput);
- MobileBannerAdImageOutput = Serializer.Serialize(MobileBannerAdImageInput);
- SiteOutput = Serializer.Serialize(SiteInput);
- RelatedSiteOutput = Serializer.Serialize(RelatedSiteInput);
- ClosedDetailsOutput = Serializer.Serialize(ClosedDetailsInput);
- NoticeOutput = Serializer.Serialize(NoticeInput);
- MigrationInfoOutput = Serializer.Serialize(MigrationInfoInput);
- BadgeCountOutput = Serializer.Serialize(BadgeCountInput);
- StylingOutput = Serializer.Serialize(StylingInput);
- OriginalQuestionOutput = Serializer.Serialize(OriginalQuestionInput);
+ this.AccessTokenOutput = this.Serializer.Serialize(AccessTokenInput);
+ this.AccountMergeOutput = this.Serializer.Serialize(AccountMergeInput);
+ this.AnswerOutput = this.Serializer.Serialize(AnswerInput);
+ this.BadgeOutput = this.Serializer.Serialize(BadgeInput);
+ this.CommentOutput = this.Serializer.Serialize(CommentInput);
+ this.ErrorOutput = this.Serializer.Serialize(ErrorInput);
+ this.EventOutput = this.Serializer.Serialize(EventInput);
+ this.MobileFeedOutput = this.Serializer.Serialize(MobileFeedInput);
+ this.MobileQuestionOutput = this.Serializer.Serialize(MobileQuestionInput);
+ this.MobileRepChangeOutput = this.Serializer.Serialize(MobileRepChangeInput);
+ this.MobileInboxItemOutput = this.Serializer.Serialize(MobileInboxItemInput);
+ this.MobileBadgeAwardOutput = this.Serializer.Serialize(MobileBadgeAwardInput);
+ this.MobilePrivilegeOutput = this.Serializer.Serialize(MobilePrivilegeInput);
+ this.MobileCommunityBulletinOutput = this.Serializer.Serialize(MobileCommunityBulletinInput);
+ this.MobileAssociationBonusOutput = this.Serializer.Serialize(MobileAssociationBonusInput);
+ this.MobileCareersJobAdOutput = this.Serializer.Serialize(MobileCareersJobAdInput);
+ this.MobileBannerAdOutput = this.Serializer.Serialize(MobileBannerAdInput);
+ this.MobileUpdateNoticeOutput = this.Serializer.Serialize(MobileUpdateNoticeInput);
+ this.FlagOptionOutput = this.Serializer.Serialize(FlagOptionInput);
+ this.InboxItemOutput = this.Serializer.Serialize(InboxItemInput);
+ this.InfoOutput = this.Serializer.Serialize(InfoInput);
+ this.NetworkUserOutput = this.Serializer.Serialize(NetworkUserInput);
+ this.NotificationOutput = this.Serializer.Serialize(NotificationInput);
+ this.PostOutput = this.Serializer.Serialize(PostInput);
+ this.PrivilegeOutput = this.Serializer.Serialize(PrivilegeInput);
+ this.QuestionOutput = this.Serializer.Serialize(QuestionInput);
+ this.QuestionTimelineOutput = this.Serializer.Serialize(QuestionTimelineInput);
+ this.ReputationOutput = this.Serializer.Serialize(ReputationInput);
+ this.ReputationHistoryOutput = this.Serializer.Serialize(ReputationHistoryInput);
+ this.RevisionOutput = this.Serializer.Serialize(RevisionInput);
+ this.SearchExcerptOutput = this.Serializer.Serialize(SearchExcerptInput);
+ this.ShallowUserOutput = this.Serializer.Serialize(ShallowUserInput);
+ this.SuggestedEditOutput = this.Serializer.Serialize(SuggestedEditInput);
+ this.TagOutput = this.Serializer.Serialize(TagInput);
+ this.TagScoreOutput = this.Serializer.Serialize(TagScoreInput);
+ this.TagSynonymOutput = this.Serializer.Serialize(TagSynonymInput);
+ this.TagWikiOutput = this.Serializer.Serialize(TagWikiInput);
+ this.TopTagOutput = this.Serializer.Serialize(TopTagInput);
+ this.UserOutput = this.Serializer.Serialize(UserInput);
+ this.UserTimelineOutput = this.Serializer.Serialize(UserTimelineInput);
+ this.WritePermissionOutput = this.Serializer.Serialize(WritePermissionInput);
+ this.MobileBannerAdImageOutput = this.Serializer.Serialize(MobileBannerAdImageInput);
+ this.SiteOutput = this.Serializer.Serialize(SiteInput);
+ this.RelatedSiteOutput = this.Serializer.Serialize(RelatedSiteInput);
+ this.ClosedDetailsOutput = this.Serializer.Serialize(ClosedDetailsInput);
+ this.NoticeOutput = this.Serializer.Serialize(NoticeInput);
+ this.MigrationInfoOutput = this.Serializer.Serialize(MigrationInfoInput);
+ this.BadgeCountOutput = this.Serializer.Serialize(BadgeCountInput);
+ this.StylingOutput = this.Serializer.Serialize(StylingInput);
+ this.OriginalQuestionOutput = this.Serializer.Serialize(OriginalQuestionInput);
}
// Serialize
+ [Benchmark] public object _PrimitiveSByteSerialize() => this.Serializer.Serialize(SByteInput);
+
+ [Benchmark] public object _PrimitiveShortSerialize() => this.Serializer.Serialize(ShortInput);
+
+ [Benchmark] public object _PrimitiveIntSerialize() => this.Serializer.Serialize(IntInput);
- [Benchmark] public object _PrimitiveSByteSerialize() => Serializer.Serialize(SByteInput);
- [Benchmark] public object _PrimitiveShortSerialize() => Serializer.Serialize(ShortInput);
- [Benchmark] public object _PrimitiveIntSerialize() => Serializer.Serialize(IntInput);
- [Benchmark] public object _PrimitiveLongSerialize() => Serializer.Serialize(LongInput);
- [Benchmark] public object _PrimitiveByteSerialize() => Serializer.Serialize(ByteInput);
- [Benchmark] public object _PrimitiveUShortSerialize() => Serializer.Serialize(UShortInput);
- [Benchmark] public object _PrimitiveUIntSerialize() => Serializer.Serialize(UIntInput);
- [Benchmark] public object _PrimitiveULongSerialize() => Serializer.Serialize(ULongInput);
- [Benchmark] public object _PrimitiveBoolSerialize() => Serializer.Serialize(BoolInput);
- [Benchmark] public object _PrimitiveStringSerialize() => Serializer.Serialize(StringInput);
- [Benchmark] public object _PrimitiveCharSerialize() => Serializer.Serialize(CharInput);
- [Benchmark] public object _PrimitiveDateTimeSerialize() => Serializer.Serialize(DateTimeInput);
- [Benchmark] public object _PrimitiveGuidSerialize() => Serializer.Serialize(GuidInput);
- [Benchmark] public object _PrimitiveBytesSerialize() => Serializer.Serialize(BytesInput);
-
- [Benchmark] public object AccessTokenSerialize() => Serializer.Serialize(AccessTokenInput);
- [Benchmark] public object AccountMergeSerialize() => Serializer.Serialize(AccountMergeInput);
- [Benchmark] public object AnswerSerialize() => Serializer.Serialize(AnswerInput);
- [Benchmark] public object BadgeSerialize() => Serializer.Serialize(BadgeInput);
- [Benchmark] public object CommentSerialize() => Serializer.Serialize(CommentInput);
- [Benchmark] public object ErrorSerialize() => Serializer.Serialize(ErrorInput);
- [Benchmark] public object EventSerialize() => Serializer.Serialize(EventInput);
- [Benchmark] public object MobileFeedSerialize() => Serializer.Serialize(MobileFeedInput);
- [Benchmark] public object MobileQuestionSerialize() => Serializer.Serialize(MobileQuestionInput);
- [Benchmark] public object MobileRepChangeSerialize() => Serializer.Serialize(MobileRepChangeInput);
- [Benchmark] public object MobileInboxItemSerialize() => Serializer.Serialize(MobileInboxItemInput);
- [Benchmark] public object MobileBadgeAwardSerialize() => Serializer.Serialize(MobileBadgeAwardInput);
- [Benchmark] public object MobilePrivilegeSerialize() => Serializer.Serialize(MobilePrivilegeInput);
- [Benchmark] public object MobileCommunityBulletinSerialize() => Serializer.Serialize(MobileCommunityBulletinInput);
- [Benchmark] public object MobileAssociationBonusSerialize() => Serializer.Serialize(MobileAssociationBonusInput);
- [Benchmark] public object MobileCareersJobAdSerialize() => Serializer.Serialize(MobileCareersJobAdInput);
- [Benchmark] public object MobileBannerAdSerialize() => Serializer.Serialize(MobileBannerAdInput);
- [Benchmark] public object MobileUpdateNoticeSerialize() => Serializer.Serialize(MobileUpdateNoticeInput);
- [Benchmark] public object FlagOptionSerialize() => Serializer.Serialize(FlagOptionInput);
- [Benchmark] public object InboxItemSerialize() => Serializer.Serialize(InboxItemInput);
- [Benchmark] public object InfoSerialize() => Serializer.Serialize(InfoInput);
- [Benchmark] public object NetworkUserSerialize() => Serializer.Serialize(NetworkUserInput);
- [Benchmark] public object NotificationSerialize() => Serializer.Serialize(NotificationInput);
- [Benchmark] public object PostSerialize() => Serializer.Serialize(PostInput);
- [Benchmark] public object PrivilegeSerialize() => Serializer.Serialize(PrivilegeInput);
- [Benchmark] public object QuestionSerialize() => Serializer.Serialize(QuestionInput);
- [Benchmark] public object QuestionTimelineSerialize() => Serializer.Serialize(QuestionTimelineInput);
- [Benchmark] public object ReputationSerialize() => Serializer.Serialize(ReputationInput);
- [Benchmark] public object ReputationHistorySerialize() => Serializer.Serialize(ReputationHistoryInput);
- [Benchmark] public object RevisionSerialize() => Serializer.Serialize(RevisionInput);
- [Benchmark] public object SearchExcerptSerialize() => Serializer.Serialize(SearchExcerptInput);
- [Benchmark] public object ShallowUserSerialize() => Serializer.Serialize(ShallowUserInput);
- [Benchmark] public object SuggestedEditSerialize() => Serializer.Serialize(SuggestedEditInput);
- [Benchmark] public object TagSerialize() => Serializer.Serialize(TagInput);
- [Benchmark] public object TagScoreSerialize() => Serializer.Serialize(TagScoreInput);
- [Benchmark] public object TagSynonymSerialize() => Serializer.Serialize(TagSynonymInput);
- [Benchmark] public object TagWikiSerialize() => Serializer.Serialize(TagWikiInput);
- [Benchmark] public object TopTagSerialize() => Serializer.Serialize(TopTagInput);
- [Benchmark] public object UserSerialize() => Serializer.Serialize(UserInput);
- [Benchmark] public object UserTimelineSerialize() => Serializer.Serialize(UserTimelineInput);
- [Benchmark] public object WritePermissionSerialize() => Serializer.Serialize(WritePermissionInput);
- [Benchmark] public object MobileBannerAdImageSerialize() => Serializer.Serialize(MobileBannerAdImageInput);
- [Benchmark] public object SiteSerialize() => Serializer.Serialize(SiteInput);
- [Benchmark] public object RelatedSiteSerialize() => Serializer.Serialize(RelatedSiteInput);
- [Benchmark] public object ClosedDetailsSerialize() => Serializer.Serialize(ClosedDetailsInput);
- [Benchmark] public object NoticeSerialize() => Serializer.Serialize(NoticeInput);
- [Benchmark] public object MigrationInfoSerialize() => Serializer.Serialize(MigrationInfoInput);
- [Benchmark] public object BadgeCountSerialize() => Serializer.Serialize(BadgeCountInput);
- [Benchmark] public object StylingSerialize() => Serializer.Serialize(StylingInput);
- [Benchmark] public object OriginalQuestionSerialize() => Serializer.Serialize(OriginalQuestionInput);
+ [Benchmark] public object _PrimitiveLongSerialize() => this.Serializer.Serialize(LongInput);
+
+ [Benchmark] public object _PrimitiveByteSerialize() => this.Serializer.Serialize(ByteInput);
+
+ [Benchmark] public object _PrimitiveUShortSerialize() => this.Serializer.Serialize(UShortInput);
+
+ [Benchmark] public object _PrimitiveUIntSerialize() => this.Serializer.Serialize(UIntInput);
+
+ [Benchmark] public object _PrimitiveULongSerialize() => this.Serializer.Serialize(ULongInput);
+
+ [Benchmark] public object _PrimitiveBoolSerialize() => this.Serializer.Serialize(BoolInput);
+
+ [Benchmark] public object _PrimitiveStringSerialize() => this.Serializer.Serialize(StringInput);
+
+ [Benchmark] public object _PrimitiveCharSerialize() => this.Serializer.Serialize(CharInput);
+
+ [Benchmark] public object _PrimitiveDateTimeSerialize() => this.Serializer.Serialize(DateTimeInput);
+
+ [Benchmark] public object _PrimitiveGuidSerialize() => this.Serializer.Serialize(GuidInput);
+
+ [Benchmark] public object _PrimitiveBytesSerialize() => this.Serializer.Serialize(BytesInput);
+
+ [Benchmark] public object AccessTokenSerialize() => this.Serializer.Serialize(AccessTokenInput);
+
+ [Benchmark] public object AccountMergeSerialize() => this.Serializer.Serialize(AccountMergeInput);
+
+ [Benchmark] public object AnswerSerialize() => this.Serializer.Serialize(AnswerInput);
+
+ [Benchmark] public object BadgeSerialize() => this.Serializer.Serialize(BadgeInput);
+
+ [Benchmark] public object CommentSerialize() => this.Serializer.Serialize(CommentInput);
+
+ [Benchmark] public object ErrorSerialize() => this.Serializer.Serialize(ErrorInput);
+
+ [Benchmark] public object EventSerialize() => this.Serializer.Serialize(EventInput);
+
+ [Benchmark] public object MobileFeedSerialize() => this.Serializer.Serialize(MobileFeedInput);
+
+ [Benchmark] public object MobileQuestionSerialize() => this.Serializer.Serialize(MobileQuestionInput);
+
+ [Benchmark] public object MobileRepChangeSerialize() => this.Serializer.Serialize(MobileRepChangeInput);
+
+ [Benchmark] public object MobileInboxItemSerialize() => this.Serializer.Serialize(MobileInboxItemInput);
+
+ [Benchmark] public object MobileBadgeAwardSerialize() => this.Serializer.Serialize(MobileBadgeAwardInput);
+
+ [Benchmark] public object MobilePrivilegeSerialize() => this.Serializer.Serialize(MobilePrivilegeInput);
+
+ [Benchmark] public object MobileCommunityBulletinSerialize() => this.Serializer.Serialize(MobileCommunityBulletinInput);
+
+ [Benchmark] public object MobileAssociationBonusSerialize() => this.Serializer.Serialize(MobileAssociationBonusInput);
+
+ [Benchmark] public object MobileCareersJobAdSerialize() => this.Serializer.Serialize(MobileCareersJobAdInput);
+
+ [Benchmark] public object MobileBannerAdSerialize() => this.Serializer.Serialize(MobileBannerAdInput);
+
+ [Benchmark] public object MobileUpdateNoticeSerialize() => this.Serializer.Serialize(MobileUpdateNoticeInput);
+
+ [Benchmark] public object FlagOptionSerialize() => this.Serializer.Serialize(FlagOptionInput);
+
+ [Benchmark] public object InboxItemSerialize() => this.Serializer.Serialize(InboxItemInput);
+
+ [Benchmark] public object InfoSerialize() => this.Serializer.Serialize(InfoInput);
+
+ [Benchmark] public object NetworkUserSerialize() => this.Serializer.Serialize(NetworkUserInput);
+
+ [Benchmark] public object NotificationSerialize() => this.Serializer.Serialize(NotificationInput);
+
+ [Benchmark] public object PostSerialize() => this.Serializer.Serialize(PostInput);
+
+ [Benchmark] public object PrivilegeSerialize() => this.Serializer.Serialize(PrivilegeInput);
+
+ [Benchmark] public object QuestionSerialize() => this.Serializer.Serialize(QuestionInput);
+
+ [Benchmark] public object QuestionTimelineSerialize() => this.Serializer.Serialize(QuestionTimelineInput);
+
+ [Benchmark] public object ReputationSerialize() => this.Serializer.Serialize(ReputationInput);
+
+ [Benchmark] public object ReputationHistorySerialize() => this.Serializer.Serialize(ReputationHistoryInput);
+
+ [Benchmark] public object RevisionSerialize() => this.Serializer.Serialize(RevisionInput);
+
+ [Benchmark] public object SearchExcerptSerialize() => this.Serializer.Serialize(SearchExcerptInput);
+
+ [Benchmark] public object ShallowUserSerialize() => this.Serializer.Serialize(ShallowUserInput);
+
+ [Benchmark] public object SuggestedEditSerialize() => this.Serializer.Serialize(SuggestedEditInput);
+
+ [Benchmark] public object TagSerialize() => this.Serializer.Serialize(TagInput);
+
+ [Benchmark] public object TagScoreSerialize() => this.Serializer.Serialize(TagScoreInput);
+
+ [Benchmark] public object TagSynonymSerialize() => this.Serializer.Serialize(TagSynonymInput);
+
+ [Benchmark] public object TagWikiSerialize() => this.Serializer.Serialize(TagWikiInput);
+
+ [Benchmark] public object TopTagSerialize() => this.Serializer.Serialize(TopTagInput);
+
+ [Benchmark] public object UserSerialize() => this.Serializer.Serialize(UserInput);
+
+ [Benchmark] public object UserTimelineSerialize() => this.Serializer.Serialize(UserTimelineInput);
+
+ [Benchmark] public object WritePermissionSerialize() => this.Serializer.Serialize(WritePermissionInput);
+
+ [Benchmark] public object MobileBannerAdImageSerialize() => this.Serializer.Serialize(MobileBannerAdImageInput);
+
+ [Benchmark] public object SiteSerialize() => this.Serializer.Serialize(SiteInput);
+
+ [Benchmark] public object RelatedSiteSerialize() => this.Serializer.Serialize(RelatedSiteInput);
+
+ [Benchmark] public object ClosedDetailsSerialize() => this.Serializer.Serialize(ClosedDetailsInput);
+
+ [Benchmark] public object NoticeSerialize() => this.Serializer.Serialize(NoticeInput);
+
+ [Benchmark] public object MigrationInfoSerialize() => this.Serializer.Serialize(MigrationInfoInput);
+
+ [Benchmark] public object BadgeCountSerialize() => this.Serializer.Serialize(BadgeCountInput);
+
+ [Benchmark] public object StylingSerialize() => this.Serializer.Serialize(StylingInput);
+
+ [Benchmark] public object OriginalQuestionSerialize() => this.Serializer.Serialize(OriginalQuestionInput);
// Deserialize
+ [Benchmark] public SByte _PrimitiveSByteDeserialize() => this.Serializer.Deserialize<SByte>(this.SByteOutput);
- [Benchmark] public SByte _PrimitiveSByteDeserialize() => Serializer.Deserialize<SByte>(SByteOutput);
- [Benchmark] public short _PrimitiveShortDeserialize() => Serializer.Deserialize<short>(ShortOutput);
- [Benchmark] public Int32 _PrimitiveIntDeserialize() => Serializer.Deserialize<Int32>(IntOutput);
- [Benchmark] public Int64 _PrimitiveLongDeserialize() => Serializer.Deserialize<Int64>(LongOutput);
- [Benchmark] public Byte _PrimitiveByteDeserialize() => Serializer.Deserialize<Byte>(ByteOutput);
- [Benchmark] public ushort _PrimitiveUShortDeserialize() => Serializer.Deserialize<ushort>(UShortOutput);
- [Benchmark] public uint _PrimitiveUIntDeserialize() => Serializer.Deserialize<uint>(UIntOutput);
- [Benchmark] public ulong _PrimitiveULongDeserialize() => Serializer.Deserialize<ulong>(ULongOutput);
- [Benchmark] public bool _PrimitiveBoolDeserialize() => Serializer.Deserialize<bool>(BoolOutput);
- [Benchmark] public String _PrimitiveStringDeserialize() => Serializer.Deserialize<String>(StringOutput);
- [Benchmark] public Char _PrimitiveCharDeserialize() => Serializer.Deserialize<Char>(CharOutput);
- [Benchmark] public DateTime _PrimitiveDateTimeDeserialize() => Serializer.Deserialize<DateTime>(DateTimeOutput);
- [Benchmark] public Guid _PrimitiveGuidDeserialize() => Serializer.Deserialize<Guid>(GuidOutput);
- [Benchmark] public byte[] _PrimitiveBytesDeserialize() => Serializer.Deserialize<byte[]>(BytesOutput);
- [Benchmark] public AccessToken AccessTokenDeserialize() => Serializer.Deserialize<AccessToken>(AccessTokenOutput);
- [Benchmark] public AccountMerge AccountMergeDeserialize() => Serializer.Deserialize<AccountMerge>(AccountMergeOutput);
- [Benchmark] public Answer AnswerDeserialize() => Serializer.Deserialize<Answer>(AnswerOutput);
- [Benchmark] public Badge BadgeDeserialize() => Serializer.Deserialize<Badge>(BadgeOutput);
- [Benchmark] public Comment CommentDeserialize() => Serializer.Deserialize<Comment>(CommentOutput);
- [Benchmark] public Error ErrorDeserialize() => Serializer.Deserialize<Error>(ErrorOutput);
- [Benchmark] public Event EventDeserialize() => Serializer.Deserialize<Event>(EventOutput);
- [Benchmark] public MobileFeed MobileFeedDeserialize() => Serializer.Deserialize<MobileFeed>(MobileFeedOutput);
- [Benchmark] public MobileQuestion MobileQuestionDeserialize() => Serializer.Deserialize<MobileQuestion>(MobileQuestionOutput);
- [Benchmark] public MobileRepChange MobileRepChangeDeserialize() => Serializer.Deserialize<MobileRepChange>(MobileRepChangeOutput);
- [Benchmark] public MobileInboxItem MobileInboxItemDeserialize() => Serializer.Deserialize<MobileInboxItem>(MobileInboxItemOutput);
- [Benchmark] public MobileBadgeAward MobileBadgeAwardDeserialize() => Serializer.Deserialize<MobileBadgeAward>(MobileBadgeAwardOutput);
- [Benchmark] public MobilePrivilege MobilePrivilegeDeserialize() => Serializer.Deserialize<MobilePrivilege>(MobilePrivilegeOutput);
- [Benchmark] public MobileCommunityBulletin MobileCommunityBulletinDeserialize() => Serializer.Deserialize<MobileCommunityBulletin>(MobileCommunityBulletinOutput);
- [Benchmark] public MobileAssociationBonus MobileAssociationBonusDeserialize() => Serializer.Deserialize<MobileAssociationBonus>(MobileAssociationBonusOutput);
- [Benchmark] public MobileCareersJobAd MobileCareersJobAdDeserialize() => Serializer.Deserialize<MobileCareersJobAd>(MobileCareersJobAdOutput);
- [Benchmark] public MobileBannerAd MobileBannerAdDeserialize() => Serializer.Deserialize<MobileBannerAd>(MobileBannerAdOutput);
- [Benchmark] public MobileUpdateNotice MobileUpdateNoticeDeserialize() => Serializer.Deserialize<MobileUpdateNotice>(MobileUpdateNoticeOutput);
- [Benchmark] public FlagOption FlagOptionDeserialize() => Serializer.Deserialize<FlagOption>(FlagOptionOutput);
- [Benchmark] public InboxItem InboxItemDeserialize() => Serializer.Deserialize<InboxItem>(InboxItemOutput);
- [Benchmark] public Info InfoDeserialize() => Serializer.Deserialize<Info>(InfoOutput);
- [Benchmark] public NetworkUser NetworkUserDeserialize() => Serializer.Deserialize<NetworkUser>(NetworkUserOutput);
- [Benchmark] public Notification NotificationDeserialize() => Serializer.Deserialize<Notification>(NotificationOutput);
- [Benchmark] public Post PostDeserialize() => Serializer.Deserialize<Post>(PostOutput);
- [Benchmark] public Privilege PrivilegeDeserialize() => Serializer.Deserialize<Privilege>(PrivilegeOutput);
- [Benchmark] public Question QuestionDeserialize() => Serializer.Deserialize<Question>(QuestionOutput);
- [Benchmark] public QuestionTimeline QuestionTimelineDeserialize() => Serializer.Deserialize<QuestionTimeline>(QuestionTimelineOutput);
- [Benchmark] public Reputation ReputationDeserialize() => Serializer.Deserialize<Reputation>(ReputationOutput);
- [Benchmark] public ReputationHistory ReputationHistoryDeserialize() => Serializer.Deserialize<ReputationHistory>(ReputationHistoryOutput);
- [Benchmark] public Revision RevisionDeserialize() => Serializer.Deserialize<Revision>(RevisionOutput);
- [Benchmark] public SearchExcerpt SearchExcerptDeserialize() => Serializer.Deserialize<SearchExcerpt>(SearchExcerptOutput);
- [Benchmark] public ShallowUser ShallowUserDeserialize() => Serializer.Deserialize<ShallowUser>(ShallowUserOutput);
- [Benchmark] public SuggestedEdit SuggestedEditDeserialize() => Serializer.Deserialize<SuggestedEdit>(SuggestedEditOutput);
- [Benchmark] public Tag TagDeserialize() => Serializer.Deserialize<Tag>(TagOutput);
- [Benchmark] public TagScore TagScoreDeserialize() => Serializer.Deserialize<TagScore>(TagScoreOutput);
- [Benchmark] public TagSynonym TagSynonymDeserialize() => Serializer.Deserialize<TagSynonym>(TagSynonymOutput);
- [Benchmark] public TagWiki TagWikiDeserialize() => Serializer.Deserialize<TagWiki>(TagWikiOutput);
- [Benchmark] public TopTag TopTagDeserialize() => Serializer.Deserialize<TopTag>(TopTagOutput);
- [Benchmark] public User UserDeserialize() => Serializer.Deserialize<User>(UserOutput);
- [Benchmark] public UserTimeline UserTimelineDeserialize() => Serializer.Deserialize<UserTimeline>(UserTimelineOutput);
- [Benchmark] public WritePermission WritePermissionDeserialize() => Serializer.Deserialize<WritePermission>(WritePermissionOutput);
- [Benchmark] public MobileBannerAd.MobileBannerAdImage MobileBannerAdImageDeserialize() => Serializer.Deserialize<MobileBannerAd.MobileBannerAdImage>(MobileBannerAdImageOutput);
- [Benchmark] public Info.Site SiteDeserialize() => Serializer.Deserialize<Info.Site>(SiteOutput);
- [Benchmark] public Info.RelatedSite RelatedSiteDeserialize() => Serializer.Deserialize<Info.RelatedSite>(RelatedSiteOutput);
- [Benchmark] public Question.ClosedDetails ClosedDetailsDeserialize() => Serializer.Deserialize<Question.ClosedDetails>(ClosedDetailsOutput);
- [Benchmark] public Question.Notice NoticeDeserialize() => Serializer.Deserialize<Question.Notice>(NoticeOutput);
- [Benchmark] public Question.MigrationInfo MigrationInfoDeserialize() => Serializer.Deserialize<Question.MigrationInfo>(MigrationInfoOutput);
- [Benchmark] public User.BadgeCount BadgeCountDeserialize() => Serializer.Deserialize<User.BadgeCount>(BadgeCountOutput);
- [Benchmark] public Info.Site.Styling StylingDeserialize() => Serializer.Deserialize<Info.Site.Styling>(StylingOutput);
- [Benchmark] public Question.ClosedDetails.OriginalQuestion OriginalQuestionDeserialize() => Serializer.Deserialize<Question.ClosedDetails.OriginalQuestion>(OriginalQuestionOutput);
- }
+ [Benchmark] public short _PrimitiveShortDeserialize() => this.Serializer.Deserialize<short>(this.ShortOutput);
+
+ [Benchmark] public Int32 _PrimitiveIntDeserialize() => this.Serializer.Deserialize<Int32>(this.IntOutput);
+
+ [Benchmark] public Int64 _PrimitiveLongDeserialize() => this.Serializer.Deserialize<Int64>(this.LongOutput);
+
+ [Benchmark] public Byte _PrimitiveByteDeserialize() => this.Serializer.Deserialize<Byte>(this.ByteOutput);
+
+ [Benchmark] public ushort _PrimitiveUShortDeserialize() => this.Serializer.Deserialize<ushort>(this.UShortOutput);
+
+ [Benchmark] public uint _PrimitiveUIntDeserialize() => this.Serializer.Deserialize<uint>(this.UIntOutput);
+
+ [Benchmark] public ulong _PrimitiveULongDeserialize() => this.Serializer.Deserialize<ulong>(this.ULongOutput);
+ [Benchmark] public bool _PrimitiveBoolDeserialize() => this.Serializer.Deserialize<bool>(this.BoolOutput);
+
+ [Benchmark] public String _PrimitiveStringDeserialize() => this.Serializer.Deserialize<String>(this.StringOutput);
+
+ [Benchmark] public Char _PrimitiveCharDeserialize() => this.Serializer.Deserialize<Char>(this.CharOutput);
+
+ [Benchmark] public DateTime _PrimitiveDateTimeDeserialize() => this.Serializer.Deserialize<DateTime>(this.DateTimeOutput);
+
+ [Benchmark] public Guid _PrimitiveGuidDeserialize() => this.Serializer.Deserialize<Guid>(this.GuidOutput);
+
+ [Benchmark] public byte[] _PrimitiveBytesDeserialize() => this.Serializer.Deserialize<byte[]>(this.BytesOutput);
+
+ [Benchmark] public AccessToken AccessTokenDeserialize() => this.Serializer.Deserialize<AccessToken>(this.AccessTokenOutput);
+
+ [Benchmark] public AccountMerge AccountMergeDeserialize() => this.Serializer.Deserialize<AccountMerge>(this.AccountMergeOutput);
+
+ [Benchmark] public Answer AnswerDeserialize() => this.Serializer.Deserialize<Answer>(this.AnswerOutput);
+
+ [Benchmark] public Badge BadgeDeserialize() => this.Serializer.Deserialize<Badge>(this.BadgeOutput);
+
+ [Benchmark] public Comment CommentDeserialize() => this.Serializer.Deserialize<Comment>(this.CommentOutput);
+
+ [Benchmark] public Error ErrorDeserialize() => this.Serializer.Deserialize<Error>(this.ErrorOutput);
+
+ [Benchmark] public Event EventDeserialize() => this.Serializer.Deserialize<Event>(this.EventOutput);
+
+ [Benchmark] public MobileFeed MobileFeedDeserialize() => this.Serializer.Deserialize<MobileFeed>(this.MobileFeedOutput);
+
+ [Benchmark] public MobileQuestion MobileQuestionDeserialize() => this.Serializer.Deserialize<MobileQuestion>(this.MobileQuestionOutput);
+
+ [Benchmark] public MobileRepChange MobileRepChangeDeserialize() => this.Serializer.Deserialize<MobileRepChange>(this.MobileRepChangeOutput);
+
+ [Benchmark] public MobileInboxItem MobileInboxItemDeserialize() => this.Serializer.Deserialize<MobileInboxItem>(this.MobileInboxItemOutput);
+
+ [Benchmark] public MobileBadgeAward MobileBadgeAwardDeserialize() => this.Serializer.Deserialize<MobileBadgeAward>(this.MobileBadgeAwardOutput);
+
+ [Benchmark] public MobilePrivilege MobilePrivilegeDeserialize() => this.Serializer.Deserialize<MobilePrivilege>(this.MobilePrivilegeOutput);
+
+ [Benchmark] public MobileCommunityBulletin MobileCommunityBulletinDeserialize() => this.Serializer.Deserialize<MobileCommunityBulletin>(this.MobileCommunityBulletinOutput);
+
+ [Benchmark] public MobileAssociationBonus MobileAssociationBonusDeserialize() => this.Serializer.Deserialize<MobileAssociationBonus>(this.MobileAssociationBonusOutput);
+
+ [Benchmark] public MobileCareersJobAd MobileCareersJobAdDeserialize() => this.Serializer.Deserialize<MobileCareersJobAd>(this.MobileCareersJobAdOutput);
+
+ [Benchmark] public MobileBannerAd MobileBannerAdDeserialize() => this.Serializer.Deserialize<MobileBannerAd>(this.MobileBannerAdOutput);
+
+ [Benchmark] public MobileUpdateNotice MobileUpdateNoticeDeserialize() => this.Serializer.Deserialize<MobileUpdateNotice>(this.MobileUpdateNoticeOutput);
+
+ [Benchmark] public FlagOption FlagOptionDeserialize() => this.Serializer.Deserialize<FlagOption>(this.FlagOptionOutput);
+
+ [Benchmark] public InboxItem InboxItemDeserialize() => this.Serializer.Deserialize<InboxItem>(this.InboxItemOutput);
+
+ [Benchmark] public Info InfoDeserialize() => this.Serializer.Deserialize<Info>(this.InfoOutput);
+
+ [Benchmark] public NetworkUser NetworkUserDeserialize() => this.Serializer.Deserialize<NetworkUser>(this.NetworkUserOutput);
+
+ [Benchmark] public Notification NotificationDeserialize() => this.Serializer.Deserialize<Notification>(this.NotificationOutput);
+
+ [Benchmark] public Post PostDeserialize() => this.Serializer.Deserialize<Post>(this.PostOutput);
+
+ [Benchmark] public Privilege PrivilegeDeserialize() => this.Serializer.Deserialize<Privilege>(this.PrivilegeOutput);
+
+ [Benchmark] public Question QuestionDeserialize() => this.Serializer.Deserialize<Question>(this.QuestionOutput);
+
+ [Benchmark] public QuestionTimeline QuestionTimelineDeserialize() => this.Serializer.Deserialize<QuestionTimeline>(this.QuestionTimelineOutput);
+
+ [Benchmark] public Reputation ReputationDeserialize() => this.Serializer.Deserialize<Reputation>(this.ReputationOutput);
+
+ [Benchmark] public ReputationHistory ReputationHistoryDeserialize() => this.Serializer.Deserialize<ReputationHistory>(this.ReputationHistoryOutput);
+
+ [Benchmark] public Revision RevisionDeserialize() => this.Serializer.Deserialize<Revision>(this.RevisionOutput);
+
+ [Benchmark] public SearchExcerpt SearchExcerptDeserialize() => this.Serializer.Deserialize<SearchExcerpt>(this.SearchExcerptOutput);
+
+ [Benchmark] public ShallowUser ShallowUserDeserialize() => this.Serializer.Deserialize<ShallowUser>(this.ShallowUserOutput);
+
+ [Benchmark] public SuggestedEdit SuggestedEditDeserialize() => this.Serializer.Deserialize<SuggestedEdit>(this.SuggestedEditOutput);
+
+ [Benchmark] public Tag TagDeserialize() => this.Serializer.Deserialize<Tag>(this.TagOutput);
+
+ [Benchmark] public TagScore TagScoreDeserialize() => this.Serializer.Deserialize<TagScore>(this.TagScoreOutput);
+
+ [Benchmark] public TagSynonym TagSynonymDeserialize() => this.Serializer.Deserialize<TagSynonym>(this.TagSynonymOutput);
+
+ [Benchmark] public TagWiki TagWikiDeserialize() => this.Serializer.Deserialize<TagWiki>(this.TagWikiOutput);
+
+ [Benchmark] public TopTag TopTagDeserialize() => this.Serializer.Deserialize<TopTag>(this.TopTagOutput);
+
+ [Benchmark] public User UserDeserialize() => this.Serializer.Deserialize<User>(this.UserOutput);
+
+ [Benchmark] public UserTimeline UserTimelineDeserialize() => this.Serializer.Deserialize<UserTimeline>(this.UserTimelineOutput);
+
+ [Benchmark] public WritePermission WritePermissionDeserialize() => this.Serializer.Deserialize<WritePermission>(this.WritePermissionOutput);
+
+ [Benchmark] public MobileBannerAd.MobileBannerAdImage MobileBannerAdImageDeserialize() => this.Serializer.Deserialize<MobileBannerAd.MobileBannerAdImage>(this.MobileBannerAdImageOutput);
+
+ [Benchmark] public Info.Site SiteDeserialize() => this.Serializer.Deserialize<Info.Site>(this.SiteOutput);
+
+ [Benchmark] public Info.RelatedSite RelatedSiteDeserialize() => this.Serializer.Deserialize<Info.RelatedSite>(this.RelatedSiteOutput);
+
+ [Benchmark] public Question.ClosedDetails ClosedDetailsDeserialize() => this.Serializer.Deserialize<Question.ClosedDetails>(this.ClosedDetailsOutput);
+
+ [Benchmark] public Question.Notice NoticeDeserialize() => this.Serializer.Deserialize<Question.Notice>(this.NoticeOutput);
+
+ [Benchmark] public Question.MigrationInfo MigrationInfoDeserialize() => this.Serializer.Deserialize<Question.MigrationInfo>(this.MigrationInfoOutput);
+
+ [Benchmark] public User.BadgeCount BadgeCountDeserialize() => this.Serializer.Deserialize<User.BadgeCount>(this.BadgeCountOutput);
+
+ [Benchmark] public Info.Site.Styling StylingDeserialize() => this.Serializer.Deserialize<Info.Site.Styling>(this.StylingOutput);
+
+ [Benchmark] public Question.ClosedDetails.OriginalQuestion OriginalQuestionDeserialize() => this.Serializer.Deserialize<Question.ClosedDetails.OriginalQuestion>(this.OriginalQuestionOutput);
+ }
[Config(typeof(BenchmarkConfig))]
public class ShortRun_AllSerializerBenchmark_BytesInOut
@@ -847,7 +1093,6 @@
public SerializerBase Serializer;
// Currently BenchmarkdDotNet does not detect inherited ParamsSource so use copy and paste:)
-
public IEnumerable<SerializerBase> Serializers => new SerializerBase[]
{
new MessagePack_v1(),
@@ -870,37 +1115,33 @@
protected static readonly ExpressionTreeFixture ExpressionTreeFixture = new ExpressionTreeFixture();
// primitives
-
protected static readonly int IntInput = ExpressionTreeFixture.Create<int>();
// models
-
protected static readonly Benchmark.Models.Answer AnswerInput = ExpressionTreeFixture.Create<Benchmark.Models.Answer>();
- object IntOutput;
- object AnswerOutput;
-
+ private object IntOutput;
+ private object AnswerOutput;
[GlobalSetup]
public void Setup()
{
// primitives
- IntOutput = Serializer.Serialize(IntInput);
+ this.IntOutput = this.Serializer.Serialize(IntInput);
// models
- AnswerOutput = Serializer.Serialize(AnswerInput);
+ this.AnswerOutput = this.Serializer.Serialize(AnswerInput);
}
// Serialize
+ [Benchmark] public object _PrimitiveIntSerialize() => this.Serializer.Serialize(IntInput);
- [Benchmark] public object _PrimitiveIntSerialize() => Serializer.Serialize(IntInput);
- [Benchmark] public object AnswerSerialize() => Serializer.Serialize(AnswerInput);
+ [Benchmark] public object AnswerSerialize() => this.Serializer.Serialize(AnswerInput);
// Deserialize
+ [Benchmark] public Int32 _PrimitiveIntDeserialize() => this.Serializer.Deserialize<Int32>(this.IntOutput);
- [Benchmark] public Int32 _PrimitiveIntDeserialize() => Serializer.Deserialize<Int32>(IntOutput);
-
- [Benchmark] public Answer AnswerDeserialize() => Serializer.Deserialize<Answer>(AnswerOutput);
+ [Benchmark] public Answer AnswerDeserialize() => this.Serializer.Deserialize<Answer>(this.AnswerOutput);
}
[Config(typeof(BenchmarkConfig))]
@@ -910,7 +1151,6 @@
public SerializerBase Serializer;
// Currently BenchmarkdDotNet does not detect inherited ParamsSource so use copy and paste:)
-
public IEnumerable<SerializerBase> Serializers => new SerializerBase[]
{
new MessagePack_v1(),
@@ -920,36 +1160,32 @@
protected static readonly ExpressionTreeFixture ExpressionTreeFixture = new ExpressionTreeFixture();
// primitives
-
protected static readonly int IntInput = ExpressionTreeFixture.Create<int>();
// models
-
protected static readonly Benchmark.Models.Answer AnswerInput = ExpressionTreeFixture.Create<Benchmark.Models.Answer>();
- object IntOutput;
- object AnswerOutput;
-
+ private object IntOutput;
+ private object AnswerOutput;
[GlobalSetup]
public void Setup()
{
// primitives
- IntOutput = Serializer.Serialize(IntInput);
+ this.IntOutput = this.Serializer.Serialize(IntInput);
// models
- AnswerOutput = Serializer.Serialize(AnswerInput);
+ this.AnswerOutput = this.Serializer.Serialize(AnswerInput);
}
// Serialize
+ [Benchmark] public object _PrimitiveIntSerialize() => this.Serializer.Serialize(IntInput);
- [Benchmark] public object _PrimitiveIntSerialize() => Serializer.Serialize(IntInput);
- [Benchmark] public object AnswerSerialize() => Serializer.Serialize(AnswerInput);
+ [Benchmark] public object AnswerSerialize() => this.Serializer.Serialize(AnswerInput);
// Deserialize
+ [Benchmark] public Int32 _PrimitiveIntDeserialize() => this.Serializer.Deserialize<Int32>(this.IntOutput);
- [Benchmark] public Int32 _PrimitiveIntDeserialize() => Serializer.Deserialize<Int32>(IntOutput);
-
- [Benchmark] public Answer AnswerDeserialize() => Serializer.Deserialize<Answer>(AnswerOutput);
+ [Benchmark] public Answer AnswerDeserialize() => this.Serializer.Deserialize<Answer>(this.AnswerOutput);
}
}
diff --git a/benchmark/SerializerBenchmark/SerializerBenchmark.csproj b/benchmark/SerializerBenchmark/SerializerBenchmark.csproj
index ebcd6fe3..ab9bde9c 100644
--- a/benchmark/SerializerBenchmark/SerializerBenchmark.csproj
+++ b/benchmark/SerializerBenchmark/SerializerBenchmark.csproj
@@ -5,14 +5,8 @@
<TargetFramework>netcoreapp2.1</TargetFramework>
<AssemblyName>SerializerBenchmark</AssemblyName>
<RootNamespace>Benchmark</RootNamespace>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <CodeAnalysisRuleSet>SerializerBenchmark.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
diff --git a/benchmark/SerializerBenchmark/SerializerBenchmark.ruleset b/benchmark/SerializerBenchmark/SerializerBenchmark.ruleset
new file mode 100644
index 00000000..46e72a17
--- /dev/null
+++ b/benchmark/SerializerBenchmark/SerializerBenchmark.ruleset
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RuleSet Name="Microsoft Managed Recommended Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. It is recommended to include this rule set in any custom rule set you create for your projects." ToolsVersion="10.0">
+ <Include Path="..\..\MessagePack.ruleset" Action="Default" />
+ <Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
+ <Rule Id="SA1300" Action="Hidden" />
+ </Rules>
+</RuleSet>
diff --git a/benchmark/SerializerBenchmark/Serializers/BinaryFormatter.cs b/benchmark/SerializerBenchmark/Serializers/BinaryFormatter.cs
index 85065df9..b3981a89 100644
--- a/benchmark/SerializerBenchmark/Serializers/BinaryFormatter.cs
+++ b/benchmark/SerializerBenchmark/Serializers/BinaryFormatter.cs
@@ -1,6 +1,11 @@
-using Benchmark.Serializers;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
+using Benchmark.Serializers;
+
+#pragma warning disable SA1649 // File name should match first type name
public class BinaryFormatter_ : SerializerBase
{
diff --git a/benchmark/SerializerBenchmark/Serializers/CerasSerializer.cs b/benchmark/SerializerBenchmark/Serializers/CerasSerializer.cs
index a8fb7944..cfdd9be0 100644
--- a/benchmark/SerializerBenchmark/Serializers/CerasSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/CerasSerializer.cs
@@ -1,16 +1,21 @@
-using Benchmark.Serializers;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using Benchmark.Serializers;
+
+#pragma warning disable SA1649 // File name should match first type name
public class Ceras_ : SerializerBase
{
- Ceras.CerasSerializer ceras = new Ceras.CerasSerializer();
+ private Ceras.CerasSerializer ceras = new Ceras.CerasSerializer();
public override T Deserialize<T>(object input)
{
- return ceras.Deserialize<T>((byte[])input);
+ return this.ceras.Deserialize<T>((byte[])input);
}
public override object Serialize<T>(T input)
{
- return ceras.Serialize(input);
+ return this.ceras.Serialize(input);
}
}
diff --git a/benchmark/SerializerBenchmark/Serializers/DataContractSerializer.cs b/benchmark/SerializerBenchmark/Serializers/DataContractSerializer.cs
index 8ba0a1c2..eae1431f 100644
--- a/benchmark/SerializerBenchmark/Serializers/DataContractSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/DataContractSerializer.cs
@@ -1,6 +1,11 @@
-using Benchmark.Serializers;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System.IO;
using System.Runtime.Serialization;
+using Benchmark.Serializers;
+
+#pragma warning disable SA1649 // File name should match first type name
public class DataContract_ : SerializerBase
{
diff --git a/benchmark/SerializerBenchmark/Serializers/FsPicklerSerializer.cs b/benchmark/SerializerBenchmark/Serializers/FsPicklerSerializer.cs
index 778b3113..18b1c88e 100644
--- a/benchmark/SerializerBenchmark/Serializers/FsPicklerSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/FsPicklerSerializer.cs
@@ -1,16 +1,21 @@
-using Benchmark.Serializers;
-using MBrace.FsPickler;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System.IO;
+using Benchmark.Serializers;
+using MBrace.FsPickler;
+
+#pragma warning disable SA1649 // File name should match first type name
public class FsPickler_ : SerializerBase
{
- static readonly BinarySerializer serializer = MBrace.FsPickler.FsPickler.CreateBinarySerializer();
+ private static readonly BinarySerializer Serializer = MBrace.FsPickler.FsPickler.CreateBinarySerializer();
public override T Deserialize<T>(object input)
{
using (var ms = new MemoryStream((byte[])input))
{
- return serializer.Deserialize<T>(ms);
+ return Serializer.Deserialize<T>(ms);
}
}
@@ -18,7 +23,7 @@ public class FsPickler_ : SerializerBase
{
using (var ms = new MemoryStream())
{
- serializer.Serialize<T>(ms, input);
+ Serializer.Serialize<T>(ms, input);
ms.Flush();
return ms.ToArray();
}
diff --git a/benchmark/SerializerBenchmark/Serializers/HagarSerializer.cs b/benchmark/SerializerBenchmark/Serializers/HagarSerializer.cs
index 06ca15ee..9a33c7d0 100644
--- a/benchmark/SerializerBenchmark/Serializers/HagarSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/HagarSerializer.cs
@@ -1,56 +1,59 @@
-//using Benchmark.Serializers;
-//using System.Buffers;
-//using Hagar;
-//using Hagar.Buffers;
-//using Hagar.Session;
-//using Microsoft.Extensions.DependencyInjection;
-//using System.IO.Pipelines;
-
-//public class Hagar_ : SerializerBase
-//{
-// readonly ServiceProvider serviceProvider;
-
-// public Hagar_()
-// {
-// this.serviceProvider = new ServiceCollection()
-// .AddHagar()
-// .AddISerializableSupport()
-// .AddSerializers(typeof(Hagar_).Assembly) // this assembly
-// .BuildServiceProvider();
-// }
-
-// public override T Deserialize<T>(object input)
-// {
-// var serializer = serviceProvider.GetRequiredService<Serializer<T>>();
-// var sessionPool = serviceProvider.GetRequiredService<SessionPool>();
-
-// var pipe = new Pipe();
-// pipe.Writer.WriteAsync((byte[])input).GetAwaiter().GetResult();
-// pipe.Writer.Complete();
-
-// using (var session = sessionPool.GetSession())
-// {
-// pipe.Reader.TryRead(out var readResult);
-// var reader = new Reader(readResult.Buffer, session);
-// var result = serializer.Deserialize(ref reader);
-// return result;
-// }
-// }
-
-// public override object Serialize<T>(T input)
-// {
-// var serializer = serviceProvider.GetRequiredService<Serializer<T>>();
-// var sessionPool = serviceProvider.GetRequiredService<SessionPool>();
-
-// var pipe = new Pipe();
-
-// using (var session = sessionPool.GetSession())
-// {
-// var writer = pipe.Writer.CreateWriter(session);
-// serializer.Serialize(ref writer, input);
-// pipe.Writer.Complete();
-// pipe.Reader.TryRead(out var result);
-// return result.Buffer.ToArray();
-// }
-// }
-//}
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+////using Benchmark.Serializers;
+////using System.Buffers;
+////using Hagar;
+////using Hagar.Buffers;
+////using Hagar.Session;
+////using Microsoft.Extensions.DependencyInjection;
+////using System.IO.Pipelines;
+
+////public class Hagar_ : SerializerBase
+////{
+//// readonly ServiceProvider serviceProvider;
+
+//// public Hagar_()
+//// {
+//// this.serviceProvider = new ServiceCollection()
+//// .AddHagar()
+//// .AddISerializableSupport()
+//// .AddSerializers(typeof(Hagar_).Assembly) // this assembly
+//// .BuildServiceProvider();
+//// }
+
+//// public override T Deserialize<T>(object input)
+//// {
+//// var serializer = serviceProvider.GetRequiredService<Serializer<T>>();
+//// var sessionPool = serviceProvider.GetRequiredService<SessionPool>();
+
+//// var pipe = new Pipe();
+//// pipe.Writer.WriteAsync((byte[])input).GetAwaiter().GetResult();
+//// pipe.Writer.Complete();
+
+//// using (var session = sessionPool.GetSession())
+//// {
+//// pipe.Reader.TryRead(out var readResult);
+//// var reader = new Reader(readResult.Buffer, session);
+//// var result = serializer.Deserialize(ref reader);
+//// return result;
+//// }
+//// }
+
+//// public override object Serialize<T>(T input)
+//// {
+//// var serializer = serviceProvider.GetRequiredService<Serializer<T>>();
+//// var sessionPool = serviceProvider.GetRequiredService<SessionPool>();
+
+//// var pipe = new Pipe();
+
+//// using (var session = sessionPool.GetSession())
+//// {
+//// var writer = pipe.Writer.CreateWriter(session);
+//// serializer.Serialize(ref writer, input);
+//// pipe.Writer.Complete();
+//// pipe.Reader.TryRead(out var result);
+//// return result.Buffer.ToArray();
+//// }
+//// }
+////}
diff --git a/benchmark/SerializerBenchmark/Serializers/HyperionSerializer.cs b/benchmark/SerializerBenchmark/Serializers/HyperionSerializer.cs
index 517fbe3c..b38ef949 100644
--- a/benchmark/SerializerBenchmark/Serializers/HyperionSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/HyperionSerializer.cs
@@ -1,16 +1,21 @@
-using Benchmark.Serializers;
-using Hyperion;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System.IO;
+using Benchmark.Serializers;
+using Hyperion;
+
+#pragma warning disable SA1649 // File name should match first type name
public class Hyperion_ : SerializerBase
{
- static readonly Serializer serializer = new Hyperion.Serializer();
+ private static readonly Serializer Serializer = new Hyperion.Serializer();
public override T Deserialize<T>(object input)
{
using (var ms = new MemoryStream((byte[])input))
{
- return serializer.Deserialize<T>(ms);
+ return Serializer.Deserialize<T>(ms);
}
}
@@ -18,7 +23,7 @@ public class Hyperion_ : SerializerBase
{
using (var ms = new MemoryStream())
{
- serializer.Serialize(input, ms);
+ Serializer.Serialize(input, ms);
ms.Flush();
return ms.ToArray();
}
diff --git a/benchmark/SerializerBenchmark/Serializers/JilSerializer.cs b/benchmark/SerializerBenchmark/Serializers/JilSerializer.cs
index e0d14936..b68a0585 100644
--- a/benchmark/SerializerBenchmark/Serializers/JilSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/JilSerializer.cs
@@ -1,6 +1,11 @@
-using Benchmark.Serializers;
-using Jil;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System.Text;
+using Benchmark.Serializers;
+using Jil;
+
+#pragma warning disable SA1649 // File name should match first type name
public class Jil_ : SerializerBase
{
@@ -13,4 +18,4 @@ public class Jil_ : SerializerBase
{
return Jil.JSON.Deserialize<T>(Encoding.UTF8.GetString((byte[])input), Options.ISO8601);
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Serializers/JsonNetSerializer.cs b/benchmark/SerializerBenchmark/Serializers/JsonNetSerializer.cs
index bddffb30..80761c6a 100644
--- a/benchmark/SerializerBenchmark/Serializers/JsonNetSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/JsonNetSerializer.cs
@@ -1,11 +1,16 @@
-using Benchmark.Serializers;
-using Newtonsoft.Json;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System.IO;
using System.Text;
+using Benchmark.Serializers;
+using Newtonsoft.Json;
+
+#pragma warning disable SA1649 // File name should match first type name
public class JsonNet : SerializerBase
{
- static readonly JsonSerializer serializer = new JsonSerializer();
+ private static readonly JsonSerializer Serializer = new JsonSerializer();
public override T Deserialize<T>(object input)
{
@@ -13,7 +18,7 @@ public class JsonNet : SerializerBase
using (var sr = new StreamReader(ms, Encoding.UTF8))
using (var jr = new JsonTextReader(sr))
{
- return serializer.Deserialize<T>(jr);
+ return Serializer.Deserialize<T>(jr);
}
}
@@ -24,8 +29,9 @@ public class JsonNet : SerializerBase
using (var sw = new StreamWriter(ms, Encoding.UTF8))
using (var jw = new JsonTextWriter(sw))
{
- serializer.Serialize(jw, input);
+ Serializer.Serialize(jw, input);
}
+
ms.Flush();
return ms.ToArray();
}
diff --git a/benchmark/SerializerBenchmark/Serializers/MessagePackSerializer.cs b/benchmark/SerializerBenchmark/Serializers/MessagePackSerializer.cs
index a685c71d..4c84170d 100644
--- a/benchmark/SerializerBenchmark/Serializers/MessagePackSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/MessagePackSerializer.cs
@@ -1,8 +1,13 @@
-extern alias oldmsgpack;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+extern alias oldmsgpack;
extern alias newmsgpack;
using Benchmark.Serializers;
+#pragma warning disable SA1649 // File name should match first type name
+
public class MessagePack_v1 : SerializerBase
{
public override T Deserialize<T>(object input)
@@ -53,4 +58,4 @@ public class MessagePackLz4_v2 : SerializerBase
{
return newmsgpack::MessagePack.MessagePackSerializer.Serialize<T>(input, newmsgpack::MessagePack.MessagePackSerializerOptions.LZ4Default);
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Serializers/MsgPackCliSerializer.cs b/benchmark/SerializerBenchmark/Serializers/MsgPackCliSerializer.cs
index 77f97b9d..a03127ae 100644
--- a/benchmark/SerializerBenchmark/Serializers/MsgPackCliSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/MsgPackCliSerializer.cs
@@ -1,4 +1,9 @@
-using Benchmark.Serializers;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using Benchmark.Serializers;
+
+#pragma warning disable SA1649 // File name should match first type name
public class MsgPackCli : SerializerBase
{
diff --git a/benchmark/SerializerBenchmark/Serializers/ProtobufSerializer.cs b/benchmark/SerializerBenchmark/Serializers/ProtobufSerializer.cs
index 00381992..d0394065 100644
--- a/benchmark/SerializerBenchmark/Serializers/ProtobufSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/ProtobufSerializer.cs
@@ -1,8 +1,14 @@
-using Benchmark.Serializers;
-using ProtoBuf;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
using System.IO;
+using Benchmark.Serializers;
+using ProtoBuf;
+
+public class
+#pragma warning disable SA1649 // File name should match first type name
-public class ProtobufNet : SerializerBase
+ProtobufNet : SerializerBase
{
public override T Deserialize<T>(object input)
{
diff --git a/benchmark/SerializerBenchmark/Serializers/SerializerBase.cs b/benchmark/SerializerBenchmark/Serializers/SerializerBase.cs
index 340d6012..cd092a77 100644
--- a/benchmark/SerializerBenchmark/Serializers/SerializerBase.cs
+++ b/benchmark/SerializerBenchmark/Serializers/SerializerBase.cs
@@ -1,4 +1,7 @@
-using System;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
namespace Benchmark.Serializers
{
@@ -8,4 +11,4 @@ namespace Benchmark.Serializers
public abstract T Deserialize<T>(object input);
}
-} \ No newline at end of file
+}
diff --git a/benchmark/SerializerBenchmark/Serializers/SpanJsonSerializer.cs b/benchmark/SerializerBenchmark/Serializers/SpanJsonSerializer.cs
index 6407eb7e..a3a2f44d 100644
--- a/benchmark/SerializerBenchmark/Serializers/SpanJsonSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/SpanJsonSerializer.cs
@@ -1,4 +1,9 @@
-using Benchmark.Serializers;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using Benchmark.Serializers;
+
+#pragma warning disable SA1649 // File name should match first type name
public class SpanJson_ : SerializerBase
{
diff --git a/benchmark/SerializerBenchmark/Serializers/Utf8JsonSerializer.cs b/benchmark/SerializerBenchmark/Serializers/Utf8JsonSerializer.cs
index 70070b12..f52b0d9b 100644
--- a/benchmark/SerializerBenchmark/Serializers/Utf8JsonSerializer.cs
+++ b/benchmark/SerializerBenchmark/Serializers/Utf8JsonSerializer.cs
@@ -1,4 +1,9 @@
-using Benchmark.Serializers;
+// Copyright (c) All contributors. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using Benchmark.Serializers;
+
+#pragma warning disable SA1649 // File name should match first type name
public class Utf8Json_ : SerializerBase
{