Skip to content

Commit 0063c97

Browse files
committed
Regenerate generated serializers for testing.
1 parent 90759f9 commit 0063c97

252 files changed

Lines changed: 1309 additions & 7773 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

test/MsgPack.UnitTest/Serialization/GeneratedSerializers/ArrayBased/MsgPack_Serialization_AddOnlyCollection_1_MsgPack_MessagePackObjectArray_Serializer.cs

Lines changed: 16 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -13,72 +13,38 @@ namespace MsgPack.Serialization.GeneratedSerializers.ArrayBased {
1313

1414
[System.CodeDom.Compiler.GeneratedCodeAttribute("MsgPack.Serialization.CodeDomSerializers.CodeDomSerializerBuilder", "0.6.0.0")]
1515
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
16-
public class MsgPack_Serialization_AddOnlyCollection_1_MsgPack_MessagePackObjectArray_Serializer : MsgPack.Serialization.MessagePackSerializer<MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject[]>> {
17-
18-
private MsgPack.Serialization.MessagePackSerializer<MsgPack.MessagePackObject[][]> _serializer0;
19-
20-
private MsgPack.Serialization.MessagePackSerializer<MsgPack.MessagePackObject[]> _serializer1;
16+
public class MsgPack_Serialization_AddOnlyCollection_1_MsgPack_MessagePackObjectArray_Serializer : MsgPack.Serialization.CollectionSerializers.EnumerableMessagePackSerializer<MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject[]>, MsgPack.MessagePackObject[]> {
2117

2218
public MsgPack_Serialization_AddOnlyCollection_1_MsgPack_MessagePackObjectArray_Serializer(MsgPack.Serialization.SerializationContext context) :
23-
base(context) {
24-
MsgPack.Serialization.PolymorphismSchema schema0 = default(MsgPack.Serialization.PolymorphismSchema);
25-
schema0 = null;
26-
this._serializer0 = context.GetSerializer<MsgPack.MessagePackObject[][]>(schema0);
27-
MsgPack.Serialization.PolymorphismSchema schema1 = default(MsgPack.Serialization.PolymorphismSchema);
28-
schema1 = null;
29-
this._serializer1 = context.GetSerializer<MsgPack.MessagePackObject[]>(schema1);
19+
base(context, MsgPack_Serialization_AddOnlyCollection_1_MsgPack_MessagePackObjectArray_Serializer.RestoreSchema()) {
3020
}
3121

32-
protected internal override void PackToCore(MsgPack.Packer packer, MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject[]> objectTree) {
33-
this._serializer0.PackTo(packer, System.Linq.Enumerable.ToArray(objectTree));
22+
protected override void AddItem(MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject[]> collection, MsgPack.MessagePackObject[] item) {
23+
collection.Add(item);
3424
}
3525

3626
protected internal override MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject[]> UnpackFromCore(MsgPack.Unpacker unpacker) {
3727
if ((unpacker.IsArrayHeader == false)) {
3828
throw MsgPack.Serialization.SerializationExceptions.NewIsNotArrayHeader();
3929
}
30+
int itemsCount = default(int);
31+
itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker);
4032
MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject[]> collection = default(MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject[]>);
4133
collection = new MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject[]>();
4234
this.UnpackToCore(unpacker, collection);
4335
return collection;
4436
}
4537

46-
protected internal override void UnpackToCore(MsgPack.Unpacker unpacker, MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject[]> collection) {
47-
if ((unpacker.IsArrayHeader == false)) {
48-
throw MsgPack.Serialization.SerializationExceptions.NewIsNotArrayHeader();
49-
}
50-
int count = default(int);
51-
count = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker);
52-
for (int i = 0; (i < count); i = (i + 1)) {
53-
MsgPack.MessagePackObject[] nullable = default(MsgPack.MessagePackObject[]);
54-
if ((unpacker.Read() == false)) {
55-
throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i);
56-
}
57-
if (((unpacker.IsArrayHeader == false)
58-
&& (unpacker.IsMapHeader == false))) {
59-
nullable = this._serializer1.UnpackFrom(unpacker);
60-
}
61-
else {
62-
MsgPack.Unpacker disposable = default(MsgPack.Unpacker);
63-
disposable = unpacker.ReadSubtree();
64-
try {
65-
nullable = this._serializer1.UnpackFrom(disposable);
66-
}
67-
finally {
68-
if (((disposable == null)
69-
== false)) {
70-
disposable.Dispose();
71-
}
72-
}
73-
}
74-
if (((nullable == null)
75-
== false)) {
76-
collection.Add(nullable);
77-
}
78-
else {
79-
collection.Add(nullable);
80-
}
81-
}
38+
protected override MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject[]> CreateInstance(int initialCapacity) {
39+
MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject[]> collection = default(MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject[]>);
40+
collection = new MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject[]>();
41+
return collection;
42+
}
43+
44+
private static MsgPack.Serialization.PolymorphismSchema RestoreSchema() {
45+
MsgPack.Serialization.PolymorphismSchema schema = default(MsgPack.Serialization.PolymorphismSchema);
46+
schema = null;
47+
return schema;
8248
}
8349

8450
private static T @__Conditional<T>(bool condition, T whenTrue, T whenFalse)

test/MsgPack.UnitTest/Serialization/GeneratedSerializers/ArrayBased/MsgPack_Serialization_AddOnlyCollection_1_MsgPack_MessagePackObject_Serializer.cs

Lines changed: 16 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -13,56 +13,38 @@ namespace MsgPack.Serialization.GeneratedSerializers.ArrayBased {
1313

1414
[System.CodeDom.Compiler.GeneratedCodeAttribute("MsgPack.Serialization.CodeDomSerializers.CodeDomSerializerBuilder", "0.6.0.0")]
1515
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
16-
public class MsgPack_Serialization_AddOnlyCollection_1_MsgPack_MessagePackObject_Serializer : MsgPack.Serialization.MessagePackSerializer<MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject>> {
17-
18-
private MsgPack.Serialization.MessagePackSerializer<MsgPack.MessagePackObject[]> _serializer0;
16+
public class MsgPack_Serialization_AddOnlyCollection_1_MsgPack_MessagePackObject_Serializer : MsgPack.Serialization.CollectionSerializers.EnumerableMessagePackSerializer<MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject>, MsgPack.MessagePackObject> {
1917

2018
public MsgPack_Serialization_AddOnlyCollection_1_MsgPack_MessagePackObject_Serializer(MsgPack.Serialization.SerializationContext context) :
21-
base(context) {
22-
MsgPack.Serialization.PolymorphismSchema schema0 = default(MsgPack.Serialization.PolymorphismSchema);
23-
schema0 = null;
24-
this._serializer0 = context.GetSerializer<MsgPack.MessagePackObject[]>(schema0);
19+
base(context, MsgPack_Serialization_AddOnlyCollection_1_MsgPack_MessagePackObject_Serializer.RestoreSchema()) {
2520
}
2621

27-
protected internal override void PackToCore(MsgPack.Packer packer, MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject> objectTree) {
28-
this._serializer0.PackTo(packer, System.Linq.Enumerable.ToArray(objectTree));
22+
protected override void AddItem(MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject> collection, MsgPack.MessagePackObject item) {
23+
collection.Add(item);
2924
}
3025

3126
protected internal override MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject> UnpackFromCore(MsgPack.Unpacker unpacker) {
3227
if ((unpacker.IsArrayHeader == false)) {
3328
throw MsgPack.Serialization.SerializationExceptions.NewIsNotArrayHeader();
3429
}
30+
int itemsCount = default(int);
31+
itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker);
3532
MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject> collection = default(MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject>);
3633
collection = new MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject>();
3734
this.UnpackToCore(unpacker, collection);
3835
return collection;
3936
}
4037

41-
protected internal override void UnpackToCore(MsgPack.Unpacker unpacker, MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject> collection) {
42-
if ((unpacker.IsArrayHeader == false)) {
43-
throw MsgPack.Serialization.SerializationExceptions.NewIsNotArrayHeader();
44-
}
45-
int count = default(int);
46-
count = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker);
47-
for (int i = 0; (i < count); i = (i + 1)) {
48-
MsgPack.MessagePackObject nullable = default(MsgPack.MessagePackObject);
49-
if ((unpacker.Read() == false)) {
50-
throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i);
51-
}
52-
if (((unpacker.IsArrayHeader == false)
53-
&& (unpacker.IsMapHeader == false))) {
54-
nullable = unpacker.LastReadData;
55-
}
56-
else {
57-
nullable = unpacker.UnpackSubtreeData();
58-
}
59-
if ((nullable.IsNil == false)) {
60-
collection.Add(nullable);
61-
}
62-
else {
63-
collection.Add(nullable);
64-
}
65-
}
38+
protected override MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject> CreateInstance(int initialCapacity) {
39+
MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject> collection = default(MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject>);
40+
collection = new MsgPack.Serialization.AddOnlyCollection<MsgPack.MessagePackObject>();
41+
return collection;
42+
}
43+
44+
private static MsgPack.Serialization.PolymorphismSchema RestoreSchema() {
45+
MsgPack.Serialization.PolymorphismSchema schema = default(MsgPack.Serialization.PolymorphismSchema);
46+
schema = null;
47+
return schema;
6648
}
6749

6850
private static T @__Conditional<T>(bool condition, T whenTrue, T whenFalse)

test/MsgPack.UnitTest/Serialization/GeneratedSerializers/ArrayBased/MsgPack_Serialization_AddOnlyCollection_1_System_DateTimeArray_Serializer.cs

Lines changed: 16 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -13,72 +13,38 @@ namespace MsgPack.Serialization.GeneratedSerializers.ArrayBased {
1313

1414
[System.CodeDom.Compiler.GeneratedCodeAttribute("MsgPack.Serialization.CodeDomSerializers.CodeDomSerializerBuilder", "0.6.0.0")]
1515
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
16-
public class MsgPack_Serialization_AddOnlyCollection_1_System_DateTimeArray_Serializer : MsgPack.Serialization.MessagePackSerializer<MsgPack.Serialization.AddOnlyCollection<System.DateTime[]>> {
17-
18-
private MsgPack.Serialization.MessagePackSerializer<System.DateTime[][]> _serializer0;
19-
20-
private MsgPack.Serialization.MessagePackSerializer<System.DateTime[]> _serializer1;
16+
public class MsgPack_Serialization_AddOnlyCollection_1_System_DateTimeArray_Serializer : MsgPack.Serialization.CollectionSerializers.EnumerableMessagePackSerializer<MsgPack.Serialization.AddOnlyCollection<System.DateTime[]>, System.DateTime[]> {
2117

2218
public MsgPack_Serialization_AddOnlyCollection_1_System_DateTimeArray_Serializer(MsgPack.Serialization.SerializationContext context) :
23-
base(context) {
24-
MsgPack.Serialization.PolymorphismSchema schema0 = default(MsgPack.Serialization.PolymorphismSchema);
25-
schema0 = null;
26-
this._serializer0 = context.GetSerializer<System.DateTime[][]>(schema0);
27-
MsgPack.Serialization.PolymorphismSchema schema1 = default(MsgPack.Serialization.PolymorphismSchema);
28-
schema1 = null;
29-
this._serializer1 = context.GetSerializer<System.DateTime[]>(schema1);
19+
base(context, MsgPack_Serialization_AddOnlyCollection_1_System_DateTimeArray_Serializer.RestoreSchema()) {
3020
}
3121

32-
protected internal override void PackToCore(MsgPack.Packer packer, MsgPack.Serialization.AddOnlyCollection<System.DateTime[]> objectTree) {
33-
this._serializer0.PackTo(packer, System.Linq.Enumerable.ToArray(objectTree));
22+
protected override void AddItem(MsgPack.Serialization.AddOnlyCollection<System.DateTime[]> collection, System.DateTime[] item) {
23+
collection.Add(item);
3424
}
3525

3626
protected internal override MsgPack.Serialization.AddOnlyCollection<System.DateTime[]> UnpackFromCore(MsgPack.Unpacker unpacker) {
3727
if ((unpacker.IsArrayHeader == false)) {
3828
throw MsgPack.Serialization.SerializationExceptions.NewIsNotArrayHeader();
3929
}
30+
int itemsCount = default(int);
31+
itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker);
4032
MsgPack.Serialization.AddOnlyCollection<System.DateTime[]> collection = default(MsgPack.Serialization.AddOnlyCollection<System.DateTime[]>);
4133
collection = new MsgPack.Serialization.AddOnlyCollection<System.DateTime[]>();
4234
this.UnpackToCore(unpacker, collection);
4335
return collection;
4436
}
4537

46-
protected internal override void UnpackToCore(MsgPack.Unpacker unpacker, MsgPack.Serialization.AddOnlyCollection<System.DateTime[]> collection) {
47-
if ((unpacker.IsArrayHeader == false)) {
48-
throw MsgPack.Serialization.SerializationExceptions.NewIsNotArrayHeader();
49-
}
50-
int count = default(int);
51-
count = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker);
52-
for (int i = 0; (i < count); i = (i + 1)) {
53-
System.DateTime[] nullable = default(System.DateTime[]);
54-
if ((unpacker.Read() == false)) {
55-
throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i);
56-
}
57-
if (((unpacker.IsArrayHeader == false)
58-
&& (unpacker.IsMapHeader == false))) {
59-
nullable = this._serializer1.UnpackFrom(unpacker);
60-
}
61-
else {
62-
MsgPack.Unpacker disposable = default(MsgPack.Unpacker);
63-
disposable = unpacker.ReadSubtree();
64-
try {
65-
nullable = this._serializer1.UnpackFrom(disposable);
66-
}
67-
finally {
68-
if (((disposable == null)
69-
== false)) {
70-
disposable.Dispose();
71-
}
72-
}
73-
}
74-
if (((nullable == null)
75-
== false)) {
76-
collection.Add(nullable);
77-
}
78-
else {
79-
collection.Add(nullable);
80-
}
81-
}
38+
protected override MsgPack.Serialization.AddOnlyCollection<System.DateTime[]> CreateInstance(int initialCapacity) {
39+
MsgPack.Serialization.AddOnlyCollection<System.DateTime[]> collection = default(MsgPack.Serialization.AddOnlyCollection<System.DateTime[]>);
40+
collection = new MsgPack.Serialization.AddOnlyCollection<System.DateTime[]>();
41+
return collection;
42+
}
43+
44+
private static MsgPack.Serialization.PolymorphismSchema RestoreSchema() {
45+
MsgPack.Serialization.PolymorphismSchema schema = default(MsgPack.Serialization.PolymorphismSchema);
46+
schema = null;
47+
return schema;
8248
}
8349

8450
private static T @__Conditional<T>(bool condition, T whenTrue, T whenFalse)

0 commit comments

Comments
 (0)