From aa509a2ce0ac4fb58572bf484fc274ebb9f1c47f Mon Sep 17 00:00:00 2001 From: yfakariya Date: Mon, 18 Sep 2017 21:58:20 +0900 Subject: [PATCH 01/23] Fix new unpacker cannot unpack reserved ext types. --- CHANGES.txt | 1 + src/MsgPack/MessagePackByteArrayUnpacker.Unpack.cs | 2 +- src/MsgPack/MessagePackStreamUnpacker.Unpack.cs | 4 ++-- src/MsgPack/MessagePackUnpackerCommon.Read.ttinclude | 8 ++++---- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index b569bf562..0cd29b6c2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -706,6 +706,7 @@ Release 0.9.1 2017-8-30 BUG FIXES * Fix ByteArrayPacker throws IndexOutOfBoundException when the buffer remaining bytes is equal to packed scalar size. #252 + * Fix new unpacker cannot unpack reserved ext types. Release 1.0.0-beta1 T.B.D. diff --git a/src/MsgPack/MessagePackByteArrayUnpacker.Unpack.cs b/src/MsgPack/MessagePackByteArrayUnpacker.Unpack.cs index 56488b5a2..80678dbe4 100644 --- a/src/MsgPack/MessagePackByteArrayUnpacker.Unpack.cs +++ b/src/MsgPack/MessagePackByteArrayUnpacker.Unpack.cs @@ -3039,7 +3039,7 @@ private bool ReadMessagePackExtendedTypeObjectCore( int length, byte[] source, r return false; } - result = new MessagePackExtendedTypeObject( typeCode, body ); + result = MessagePackExtendedTypeObject.Unpack( typeCode, body ); return true; } diff --git a/src/MsgPack/MessagePackStreamUnpacker.Unpack.cs b/src/MsgPack/MessagePackStreamUnpacker.Unpack.cs index 23f5e1e6a..4cf5c65c4 100644 --- a/src/MsgPack/MessagePackStreamUnpacker.Unpack.cs +++ b/src/MsgPack/MessagePackStreamUnpacker.Unpack.cs @@ -8089,7 +8089,7 @@ private bool ReadMessagePackExtendedTypeObjectCore( int length, byte[] buffer, r return false; } - result = new MessagePackExtendedTypeObject( typeCode, body ); + result = MessagePackExtendedTypeObject.Unpack( typeCode, body ); return true; } @@ -8427,7 +8427,7 @@ private async Task>(); } - return AsyncReadResult.Success( new MessagePackExtendedTypeObject( typeCode, body ), offset ); + return AsyncReadResult.Success( MessagePackExtendedTypeObject.Unpack( typeCode, body ), offset ); } public sealed override async Task> ReadNullableMessagePackExtendedTypeObjectAsync( CancellationToken cancellationToken ) diff --git a/src/MsgPack/MessagePackUnpackerCommon.Read.ttinclude b/src/MsgPack/MessagePackUnpackerCommon.Read.ttinclude index c3fad269a..3a29d0d41 100644 --- a/src/MsgPack/MessagePackUnpackerCommon.Read.ttinclude +++ b/src/MsgPack/MessagePackUnpackerCommon.Read.ttinclude @@ -1,4 +1,4 @@ -<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.Collections.Generic" #> <#@ import namespace="System.Globalization" #> <#@ import namespace="System.Runtime.InteropServices" #><#+ // @@ -618,14 +618,14 @@ private void WriteReadExt( { #> - result = new MessagePackExtendedTypeObject( typeCode, body ); + result = MessagePackExtendedTypeObject.Unpack( typeCode, body ); return true; <#+ } else { #> - return AsyncReadResult.Success( new MessagePackExtendedTypeObject( typeCode, body ), <#= context.OffsetExpression #> ); + return AsyncReadResult.Success( MessagePackExtendedTypeObject.Unpack( typeCode, body ), <#= context.OffsetExpression #> ); <#+ } #> @@ -1494,4 +1494,4 @@ private string ToPrimitive( Type type ) .Replace( "Boolean", "bool ") .ToLowerInvariant(); } -#> \ No newline at end of file +#> From f4050bbc10725b27cd7ca221d1223e0b89eb280f Mon Sep 17 00:00:00 2001 From: yfakariya Date: Wed, 20 Sep 2017 21:52:12 +0900 Subject: [PATCH 02/23] Add UnpackMessagePackObject(byte[]) --- CHANGES.txt | 1 + .../MessagePackSerializer.Factories.cs | 21 ++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0cd29b6c2..df523d593 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -712,6 +712,7 @@ Release 1.0.0-beta1 T.B.D. NEW FEATURES * .NET Standard 2.0 which supports serializer source code generation on .NET Core. Note that serializer assembly generation is not supported. + * MessagePackSerializer.UnpackMessagePackObject(byte[]) utility method. BUG FIXES * Fix ByteArrayPacker throws IndexOutOfBoundException when the buffer remaining bytes is equal to packed scalar size. #252 diff --git a/src/MsgPack/Serialization/MessagePackSerializer.Factories.cs b/src/MsgPack/Serialization/MessagePackSerializer.Factories.cs index d48a27df6..a1a86a951 100644 --- a/src/MsgPack/Serialization/MessagePackSerializer.Factories.cs +++ b/src/MsgPack/Serialization/MessagePackSerializer.Factories.cs @@ -1,4 +1,4 @@ -#region -- License Terms -- +#region -- License Terms -- // // MessagePack for CLI // @@ -666,6 +666,25 @@ public static MessagePackObject UnpackMessagePackObject( Stream stream ) return _singleTonMpoDeserializer.Unpack( stream ); } + /// + /// Directly deserialize specified MessagePack byte array as tree. + /// + /// The stream which contains deserializing data. + /// A which is root of the deserialized MessagePack object tree. + /// + /// is null. + /// + /// + /// This method is convinient wrapper for for . + /// + /// You cannot override this method behavior because this method uses private instead of default context which is able to be accessed via . + /// + /// + public static MessagePackObject UnpackMessagePackObject( byte[] buffer ) + { + return _singleTonMpoDeserializer.UnpackSingleObject( buffer ); + } + /// /// Try to prepare specified type for some AOT(Ahead-Of-Time) compilation environment. /// If the type will be used in collection or dictionary, use and/or instead. From 8a6432478ad1aa88802a2c3b7ae00313d5c49df5 Mon Sep 17 00:00:00 2001 From: yfakariya Date: Mon, 14 Aug 2017 22:42:07 +0900 Subject: [PATCH 03/23] Add Timestamp struct This type implements MsgPack Timestamp specification with following utilities: * Arithmatic operations like System.DateTime. * Basic string conversion. Currently, exact parsing and ISO styles are only supported. * Date/time components properties like System.DateTime. * Type conversion between System.DateTime and System.DateTimeOffset. --- src/MsgPack/Timestamp.Calculation.cs | 221 ++++++++ src/MsgPack/Timestamp.Comparison.cs | 213 ++++++++ src/MsgPack/Timestamp.Conversion.cs | 289 ++++++++++ src/MsgPack/Timestamp.ParseExact.cs | 324 +++++++++++ src/MsgPack/Timestamp.Properties.cs | 502 ++++++++++++++++++ src/MsgPack/Timestamp.ToString.cs | 137 +++++ src/MsgPack/Timestamp.TryParseExact.cs | 195 +++++++ src/MsgPack/Timestamp.cs | 224 ++++++++ src/MsgPack/TimestampParseResult.cs | 88 +++ src/MsgPack/TimestampStringConverter.Parse.cs | 349 ++++++++++++ .../TimestampStringConverter.ToString.cs | 82 +++ src/MsgPack/TimestampStringConverter.cs | 37 ++ 12 files changed, 2661 insertions(+) create mode 100644 src/MsgPack/Timestamp.Calculation.cs create mode 100644 src/MsgPack/Timestamp.Comparison.cs create mode 100644 src/MsgPack/Timestamp.Conversion.cs create mode 100644 src/MsgPack/Timestamp.ParseExact.cs create mode 100644 src/MsgPack/Timestamp.Properties.cs create mode 100644 src/MsgPack/Timestamp.ToString.cs create mode 100644 src/MsgPack/Timestamp.TryParseExact.cs create mode 100644 src/MsgPack/Timestamp.cs create mode 100644 src/MsgPack/TimestampParseResult.cs create mode 100644 src/MsgPack/TimestampStringConverter.Parse.cs create mode 100644 src/MsgPack/TimestampStringConverter.ToString.cs create mode 100644 src/MsgPack/TimestampStringConverter.cs diff --git a/src/MsgPack/Timestamp.Calculation.cs b/src/MsgPack/Timestamp.Calculation.cs new file mode 100644 index 000000000..190f86c96 --- /dev/null +++ b/src/MsgPack/Timestamp.Calculation.cs @@ -0,0 +1,221 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#endregion -- License Terms -- + +#if UNITY_5 || UNITY_STANDALONE || UNITY_WEBPLAYER || UNITY_WII || UNITY_IPHONE || UNITY_ANDROID || UNITY_PS3 || UNITY_XBOX360 || UNITY_FLASH || UNITY_BKACKBERRY || UNITY_WINRT +#define UNITY +#endif + +using System; +#if CORE_CLR || UNITY || NETSTANDARD1_1 +using Contract = MsgPack.MPContract; +#else +using System.Diagnostics.Contracts; +#endif // CORE_CLR || UNITY || NETSTANDARD1_1 +#if !NET35 +using System.Numerics; +#endif // !NET35 + +namespace MsgPack +{ + partial struct Timestamp + { +#if !NET35 + private static readonly BigInteger NanoToSecondsAsBigInteger = new BigInteger( 1000 * 1000 * 1000 ); +#endif // !NET35 + + /// + /// Adds a specified to this instance. + /// + /// A which represents offset. Note that this value can be negative. + /// The result . + /// + /// The result of calculation overflows or underflows . + /// + public Timestamp Add( TimeSpan offset ) + { + long secondsOffset; + int nanosOffset; + FromOffsetTicks( offset.Ticks, out secondsOffset, out nanosOffset ); + var seconds = checked( this.unixEpochSeconds + secondsOffset ); + var nanos = this.nanoseconds + nanosOffset; + if ( nanos > MaxNanoSeconds ) + { + checked + { + seconds++; + } + nanos -= ( MaxNanoSeconds + 1 ); + } + else if ( nanos < 0 ) + { + checked + { + seconds--; + } + nanos = ( MaxNanoSeconds + 1 ) + nanos; + } + + return new Timestamp( seconds, unchecked(( int )nanos) ); + } + + /// + /// Subtracts a specified from this instance. + /// + /// A which represents offset. Note that this value can be negative. + /// The result . + /// + /// The result of calculation overflows or underflows . + /// + public Timestamp Subtract( TimeSpan offset ) + { + return this.Add( -offset ); + } + +#if !NET35 + /// + /// Adds a specified nanoseconds represented as a from this instance. + /// + /// A which represents offset. Note that this value can be negative. + /// The result . + /// + /// The result of calculation overflows or underflows . + /// + public Timestamp Add( BigInteger offsetNanoseconds ) + { + BigInteger nanosecondsOffset; + var secondsOffset = ( long )BigInteger.DivRem( offsetNanoseconds, NanoToSecondsAsBigInteger, out nanosecondsOffset ); + + var seconds = checked( this.unixEpochSeconds + secondsOffset ); + var nanos = this.nanoseconds + unchecked( ( int )nanosecondsOffset ); + if ( nanos > MaxNanoSeconds ) + { + checked + { + seconds++; + } + nanos -= ( MaxNanoSeconds + 1 ); + } + else if ( nanos < 0 ) + { + checked + { + seconds--; + } + nanos = ( MaxNanoSeconds + 1 ) + nanos; + } + + return new Timestamp( seconds, unchecked(( int )nanos) ); + } + + /// + /// Subtracts a specified nanoseconds represented as a from this instance. + /// + /// A which represents offset. Note that this value can be negative. + /// The result . + /// + /// The result of calculation overflows or underflows . + /// + public Timestamp Subtract( BigInteger offsetNanoseconds ) + { + return this.Add( -offsetNanoseconds ); + } + + /// + /// Calculates a difference this instance and a specified in nanoseconds. + /// + /// A to be differentiated. + /// A which represents difference in nanoseconds. + public BigInteger Subtract( Timestamp other ) + { + var seconds = new BigInteger( this.unixEpochSeconds ) - other.unixEpochSeconds; + var nanos = ( long )this.nanoseconds - other.nanoseconds; +#if DEBUG + Contract.Assert( nanos <= MaxNanoSeconds, nanos + " <= MaxNanoSeconds" ); +#endif // DEBUG + if ( nanos < 0 ) + { + // move down + seconds--; + nanos = ( MaxNanoSeconds + 1 ) + nanos; + } + + return seconds * SecondsToNanos + nanos; + } +#endif // !NET35 + + /// + /// Calculates a with specified and an offset represented as . + /// + /// A . + /// An offset in . This value can be negative. + /// A . + public static Timestamp operator +( Timestamp value, TimeSpan offset ) + { + return value.Add( offset ); + } + + /// + /// Calculates a with specified and an offset represented as . + /// + /// A . + /// An offset in . This value can be negative. + /// A . + public static Timestamp operator -( Timestamp value, TimeSpan offset ) + { + return value.Subtract( offset ); + } + +#if !NET35 + + /// + /// Calculates a with specified and a nanoseconds offset represented as . + /// + /// A . + /// An offset in nanoseconds as . This value can be negative. + /// A . + public static Timestamp operator +( Timestamp value, BigInteger offsetNanoseconds ) + { + return value.Add( offsetNanoseconds ); + } + + /// + /// Calculates a with specified and a nanoseconds represented as . + /// + /// A . + /// An offset in nanoseconds as . This value can be negative. + /// A . + public static Timestamp operator -( Timestamp value, BigInteger offsetNanoseconds ) + { + return value.Subtract( offsetNanoseconds ); + } + + /// + /// Calculates a difference between specified two s in nanoseconds. + /// + /// A . + /// A . + /// A which represents difference in nanoseconds. + public static BigInteger operator -( Timestamp left, Timestamp right ) + { + return left.Subtract( right ); + } +#endif // !NET35 + } +} diff --git a/src/MsgPack/Timestamp.Comparison.cs b/src/MsgPack/Timestamp.Comparison.cs new file mode 100644 index 000000000..79e9f0304 --- /dev/null +++ b/src/MsgPack/Timestamp.Comparison.cs @@ -0,0 +1,213 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#endregion -- License Terms -- + +using System; + +namespace MsgPack +{ + partial struct Timestamp : IComparable, IEquatable , IComparable + { + /// + /// Compares this instance to the specified . + /// + /// A to be compared. + /// + /// If this instance is greater than the , then 1. + /// If this instance is less than the , then -1. + /// Else, this instance is equal to the , then 0. + /// + public int CompareTo( Timestamp other ) + { + var result = this.unixEpochSeconds.CompareTo( other.unixEpochSeconds ); + if ( result != 0 ) + { + return result; + } + + return this.nanoseconds.CompareTo( other.nanoseconds ); + } + + /// + /// Compares two instances. + /// + /// A to be compared. + /// A to be compared. + /// + /// If the is greater than the , then 1. + /// If the is less than the , then -1. + /// Else, the is equal to the , then 0. + /// + public static int Compare( Timestamp left, Timestamp right ) + { + return left.CompareTo( right ); + } + + /// + /// Compares this instance to the specified object. + /// + /// An to be compared. + /// + /// If this instance is greater than the or the is null, then 1. + /// If this instance is less than the , then -1. + /// Else, this instance is equal to the , then 0. + /// + /// + /// is not a boxed . + /// + int IComparable.CompareTo( object obj ) + { + if ( obj == null ) + { + return 1; + } + + if ( !( obj is Timestamp ) ) + { + throw new ArgumentException( "obj is not MsgPack.Timestamp object.", "obj" ); + } + + return this.CompareTo( ( Timestamp )obj ); + } + + /// + /// Determines the specified is equal to this instance. + /// + /// An to be compared. + /// + /// true, if the is boxed and its value is equal to this instance; + /// otherwise, false. + /// + public override bool Equals( object obj ) + { + if ( !( obj is Timestamp ) ) + { + return false; + } + + return this.Equals( ( Timestamp )obj ); + } + + /// + /// Determines the specified is equal to this instance. + /// + /// A to be compared. + /// + /// true, if the is equal to this instance; + /// otherwise, false. + /// + public bool Equals( Timestamp other ) + { + return this.unixEpochSeconds == other.unixEpochSeconds && this.nanoseconds == other.nanoseconds; + } + + /// + /// Gets a hash code of this instance. + /// + /// A hash code of this instance. + public override int GetHashCode() + { + return this.unixEpochSeconds.GetHashCode() ^ this.nanoseconds.GetHashCode(); + } + + /// + /// Determines the is greater than the . + /// + /// A . + /// A . + /// + /// true, if is greater than the ; + /// Otherwise, false. + /// + public static bool operator >( Timestamp left, Timestamp right ) + { + return left.CompareTo( right ) > 0; + } + + /// + /// Determines the is less than the . + /// + /// A . + /// A . + /// + /// true, if is less than the ; + /// Otherwise, false. + /// + public static bool operator <( Timestamp left, Timestamp right ) + { + return left.CompareTo( right ) < 0; + } + + /// + /// Determines the is greater than or equal to the . + /// + /// A . + /// A . + /// + /// true, if is greater than or equal to the ; + /// Otherwise, false. + /// + public static bool operator >=( Timestamp left, Timestamp right ) + { + return left.CompareTo( right ) >= 0; + } + + /// + /// Determines the is less than or equal to the . + /// + /// A . + /// A . + /// + /// true, if is less than or equal to the ; + /// Otherwise, false. + /// + public static bool operator <=( Timestamp left, Timestamp right ) + { + return left.CompareTo( right ) <= 0; + } + + /// + /// Determines two instances are equal. + /// + /// A . + /// A . + /// + /// true, if is equal to ; + /// Otherwise, false. + /// + public static bool operator ==( Timestamp left, Timestamp right ) + { + return left.Equals( right ); + } + + /// + /// Determines two instances are not equal. + /// + /// A . + /// A . + /// + /// true, if is not equal to ; + /// Otherwise, false. + /// + public static bool operator !=( Timestamp left, Timestamp right ) + { + return !left.Equals( right ); + } + } +} diff --git a/src/MsgPack/Timestamp.Conversion.cs b/src/MsgPack/Timestamp.Conversion.cs new file mode 100644 index 000000000..8de883e09 --- /dev/null +++ b/src/MsgPack/Timestamp.Conversion.cs @@ -0,0 +1,289 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#endregion -- License Terms -- + +using System; +using System.Globalization; + +namespace MsgPack +{ + partial struct Timestamp + { + private long ToTicks( Type destination ) + { + if ( this.unixEpochSeconds < MinUnixEpochSecondsForTicks ) + { + throw new InvalidOperationException( String.Format( CultureInfo.CurrentCulture, "This value is too small for '{0}'.", destination ) ); + } + + if ( this.unixEpochSeconds > MaxUnixEpochSecondsForTicks ) + { + throw new InvalidOperationException( String.Format( CultureInfo.CurrentCulture, "This value is too large for '{0}'.", destination ) ); + } + + return ( UnixEpochInSeconds + this.unixEpochSeconds ) * SecondsToTicks + this.nanoseconds / NanoToTicks; + } + + /// + /// Converts this instance to equivalant instance with . + /// + /// An equivalant instance with . + /// + /// This instance represents before or after . + /// + public DateTime ToDateTime() + { + return new DateTime( this.ToTicks( typeof( DateTime ) ), DateTimeKind.Utc ); + } + + /// + /// Converts this instance to equivalant instance with offset 0. + /// + /// An equivalant instance with offset 0 + /// + /// This instance represents before or after . + /// + public DateTimeOffset ToDateTimeOffset() + { + return new DateTimeOffset( this.ToTicks( typeof( DateTimeOffset ) ), TimeSpan.Zero ); + } + + /// + /// Encodes this instance to a . + /// + /// A which equivalant to this instance. + public MessagePackExtendedTypeObject Encode() + { + if ( ( this.unixEpochSeconds >> 34 ) != 0 ) + { + // timestamp 96 + var value = this; + var body = new byte[ 12 ]; + body[ 0 ] = unchecked( ( byte )( ( this.nanoseconds >> 24 ) & 0xFF ) ); + body[ 1 ] = unchecked( ( byte )( ( this.nanoseconds >> 16 ) & 0xFF ) ); + body[ 2 ] = unchecked( ( byte )( ( this.nanoseconds >> 8 ) & 0xFF ) ); + body[ 3 ] = unchecked( ( byte )( ( this.nanoseconds ) & 0xFF ) ); + body[ 4 ] = unchecked( ( byte )( ( this.unixEpochSeconds >> 56 ) & 0xFF ) ); + body[ 5 ] = unchecked( ( byte )( ( this.unixEpochSeconds >> 48 ) & 0xFF ) ); + body[ 6 ] = unchecked( ( byte )( ( this.unixEpochSeconds >> 40 ) & 0xFF ) ); + body[ 7 ] = unchecked( ( byte )( ( this.unixEpochSeconds >> 32 ) & 0xFF ) ); + body[ 8 ] = unchecked( ( byte )( ( this.unixEpochSeconds >> 24 ) & 0xFF ) ); + body[ 9 ] = unchecked( ( byte )( ( this.unixEpochSeconds >> 16 ) & 0xFF ) ); + body[ 10 ] = unchecked( ( byte )( ( this.unixEpochSeconds >> 8 ) & 0xFF ) ); + body[ 11 ] = unchecked( ( byte )( this.unixEpochSeconds & 0xFF ) ); + + return MessagePackExtendedTypeObject.Unpack( TypeCode, body ); + } + else + { + var encoded = ( ( ( ulong )this.nanoseconds ) << 34 ) | unchecked( ( ulong )this.unixEpochSeconds ); + if ( ( encoded & 0xFFFFFFFF00000000L ) == 0 ) + { + // timestamp 32 + var value = unchecked( ( uint )encoded ); + var body = new byte[ 4 ]; + body[ 0 ] = unchecked( ( byte )( ( encoded >> 24 ) & 0xFF ) ); + body[ 1 ] = unchecked( ( byte )( ( encoded >> 16 ) & 0xFF ) ); + body[ 2 ] = unchecked( ( byte )( ( encoded >> 8 ) & 0xFF ) ); + body[ 3 ] = unchecked( ( byte )( encoded & 0xFF ) ); + + return MessagePackExtendedTypeObject.Unpack( TypeCode, body ); + } + else + { + // timestamp 64 + var body = new byte[ 8 ]; + body[ 0 ] = unchecked( ( byte )( ( encoded >> 56 ) & 0xFF ) ); + body[ 1 ] = unchecked( ( byte )( ( encoded >> 48 ) & 0xFF ) ); + body[ 2 ] = unchecked( ( byte )( ( encoded >> 40 ) & 0xFF ) ); + body[ 3 ] = unchecked( ( byte )( ( encoded >> 32 ) & 0xFF ) ); + body[ 4 ] = unchecked( ( byte )( ( encoded >> 24 ) & 0xFF ) ); + body[ 5 ] = unchecked( ( byte )( ( encoded >> 16 ) & 0xFF ) ); + body[ 6 ] = unchecked( ( byte )( ( encoded >> 8 ) & 0xFF ) ); + body[ 7 ] = unchecked( ( byte )( encoded & 0xFF ) ); + + return MessagePackExtendedTypeObject.Unpack( TypeCode, body ); + } + } + } + + private static void FromDateTimeTicks( long ticks, out long unixEpocSeconds, out int nanoSeconds ) + { + FromOffsetTicks( ticks - UnixEpochTicks, out unixEpocSeconds, out nanoSeconds ); + } + + private static void FromOffsetTicks( long ticks, out long unixEpocSeconds, out int nanoSeconds ) + { + long remaining; + unixEpocSeconds = DivRem( ticks, SecondsToTicks, out remaining ); + nanoSeconds = unchecked( ( int )remaining ) * 100; + } + + /// + /// Gets an equivalant to specified . + /// + /// A . + /// An equivalant to specified + public static Timestamp FromDateTime( DateTime value ) + { + long unixEpocSeconds; + int nanoSeconds; + FromDateTimeTicks( ( value.Kind == DateTimeKind.Local ? value.ToUniversalTime() : value ).Ticks, out unixEpocSeconds, out nanoSeconds ); + return new Timestamp( unixEpocSeconds, nanoSeconds ); + } + + /// + /// Gets an equivalant to specified . + /// + /// A . + /// An equivalant to specified + public static Timestamp FromDateTimeOffset( DateTimeOffset value ) + { + long unixEpocSeconds; + int nanoSeconds; + FromDateTimeTicks( value.UtcTicks, out unixEpocSeconds, out nanoSeconds ); + return new Timestamp( unixEpocSeconds, nanoSeconds ); + } + + /// + /// Decodes specified and returns an equivalant . + /// + /// which is native representation of . + /// . + /// + /// does not represent msgpack timestamp. Specifically, the type code is not equal to value. + /// Or, does not have valid msgpack timestamp structure. + /// + /// + /// have invalid nanoseconds value. + /// + /// + /// A definition of valid msgpack time stamp is: + /// + /// Its type code is 0xFF(-1). + /// Its length is 4, 8, or 12 bytes. + /// Its nanoseconds part is between 0 and 999,999,999. + /// + /// + public static Timestamp Decode( MessagePackExtendedTypeObject value ) + { + if ( value.TypeCode != TypeCode ) + { + throw new ArgumentException( "The value's type code must be 0xFF.", "value" ); + } + + switch( value.Body.Length ) + { + case 4: + { + // timespan32 format + return new Timestamp( BigEndianBinary.ToUInt32( value.Body, 0 ), 0 ); + } + case 8: + { + // timespan64 format + var payload = BigEndianBinary.ToUInt64( value.Body, 0 ); + return new Timestamp( unchecked( ( long )( payload & 0x00000003ffffffffL ) ), unchecked( ( int )( payload >> 34 ) ) ); + } + case 12: + { + // timespan96 format + return new Timestamp( BigEndianBinary.ToInt64( value.Body, sizeof( int ) ), unchecked( ( int )BigEndianBinary.ToUInt32( value.Body, 0 ) ) ); + } + default: + { + throw new ArgumentException( "The value's length is not valid.", "value" ); + } + } + } + + /// + /// Converts a value to a value with . + /// + /// A . + /// A with . + /// + /// This instance represents before or after . + /// + public static explicit operator DateTime( Timestamp value ) + { + return value.ToDateTime(); + } + + /// + /// Converts a value to a value with offset 0. + /// + /// A . + /// A value with offset 0. + /// + /// This instance represents before or after . + /// + public static explicit operator DateTimeOffset( Timestamp value ) + { + return value.ToDateTimeOffset(); + } + + /// + /// Converts a value to a . + /// + /// A . + /// A . + public static implicit operator MessagePackExtendedTypeObject( Timestamp value ) + { + return value.Encode(); + } + + /// + /// Converts a value to a . + /// + /// A . + /// A . + public static implicit operator Timestamp( DateTime value ) + { + return FromDateTime( value ); + } + + /// + /// Converts a value to a . + /// + /// A . + /// A . + public static implicit operator Timestamp( DateTimeOffset value ) + { + return FromDateTimeOffset( value ); + } + + /// + /// Converts a value to a . + /// + /// A . + /// A . + /// + /// does not represent msgpack timestamp. Specifically, the type code is not equal to value. + /// Or, does not have valid msgpack timestamp structure. + /// + /// + /// have invalid nanoseconds value. + /// + public static explicit operator Timestamp( MessagePackExtendedTypeObject value ) + { + return Decode( value ); + } + } +} diff --git a/src/MsgPack/Timestamp.ParseExact.cs b/src/MsgPack/Timestamp.ParseExact.cs new file mode 100644 index 000000000..43533b8a9 --- /dev/null +++ b/src/MsgPack/Timestamp.ParseExact.cs @@ -0,0 +1,324 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#endregion -- License Terms -- + +#if UNITY_5 || UNITY_STANDALONE || UNITY_WEBPLAYER || UNITY_WII || UNITY_IPHONE || UNITY_ANDROID || UNITY_PS3 || UNITY_XBOX360 || UNITY_FLASH || UNITY_BKACKBERRY || UNITY_WINRT +#define UNITY +#endif + +using System; +#if CORE_CLR || UNITY || NETSTANDARD1_1 +using Contract = MsgPack.MPContract; +#else +using System.Diagnostics.Contracts; +#endif // CORE_CLR || UNITY || NETSTANDARD1_1 +using System.Globalization; + +namespace MsgPack +{ + partial struct Timestamp + { + /// + /// Converts specified representation of a msgpack timestamp to its equivalant + /// with specified format and culture-specific format information provider. + /// + /// An input representation of a msgpack timestamp. The format must be match exactly to the . + /// An expected format string. + /// An to provide culture specific information to parse . + /// The converted . + /// + /// + /// Currently, supported date-time format is only 'o' and 'O' (round-trip) or 's' (sortable, ISO-8601). + /// Other any standard date-time formats and custom date-time formats are not supported. + /// + /// + /// The rount-trip format is yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffff which "fffffffff" is nanoseconds. + /// + /// + /// The sign mark can be culture-specific, and leading/trailing whitespaces can be allowed when specify appropriate . + /// + /// + /// + /// is null. + /// Or, is null. + /// + /// + /// The specified is not supported. + /// + /// + /// The specified is not valid for the specified and . + /// + public static Timestamp ParseExact( string input, string format, IFormatProvider formatProvider ) + { + return ParseExact( input, format, formatProvider, DateTimeStyles.None ); + } + + /// + /// Converts specified representation of a msgpack timestamp to its equivalant + /// with specified format, culture-specific format information provider, and . + /// + /// An input representation of a msgpack timestamp. The format must be match exactly to the . + /// An expected format string. + /// An to provide culture specific information to parse . + /// + /// Specify bitwise value combination of to control detailed parsing behavior. + /// The typical value is . + /// + /// The converted . + /// + /// + /// Currently, supported date-time format is only 'o' and 'O' (round-trip) or 's' (sortable, ISO-8601). + /// Other any standard date-time formats and custom date-time formats are not supported. + /// + /// + /// The rount-trip format is yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffff which "fffffffff" is nanoseconds. + /// + /// + /// The sign mark can be culture-specific, and leading/trailing whitespaces can be allowed when specify appropriate . + /// + /// + /// + /// is null. + /// Or, is null. + /// + /// + /// The specified is not supported. + /// Or the specified has invalid combination. + /// + /// + /// The specified is not valid for the specified , , and . + /// + public static Timestamp ParseExact( string input, string format, IFormatProvider formatProvider, DateTimeStyles styles ) + { + Timestamp result; + HandleParseResult( TryParseExactCore( input, format, formatProvider, styles, out result ), "Cannot parse specified input with specified format." ); + return result; + } + + /// + /// Converts specified representation of a msgpack timestamp to its equivalant + /// with specified format, culture-specific format information provider, and . + /// + /// The input representation of a msgpack timestamp. The format must be match exactly to one of the . + /// The array of expected format strings. Unsupported format will be ignored. + /// The culture specific information to control + /// + /// Specify bitwise value combination of to control detailed parsing behavior. + /// The typical value is . + /// + /// The converted . + /// + /// + /// Currently, supported date-time format is only 'o' and 'O' (round-trip) or 's' (sortable, ISO-8601). + /// Other any standard date-time formats and custom date-time formats are not supported. + /// + /// + /// The rount-trip format is yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffff which "fffffffff" is nanoseconds. + /// + /// + /// The sign mark can be culture-specific, and leading/trailing whitespaces can be allowed when specify appropriate . + /// + /// + /// + /// is null. + /// Or, is null. + /// + /// + /// The specified is empty. + /// Or the specified has invalid combination. + /// + /// + /// The specified is not valid for any specified , , and . + /// + public static Timestamp ParseExact( string input, string[] formats, IFormatProvider formatProvider, DateTimeStyles styles ) + { + Timestamp result; + HandleParseResult( TryParseExactCore( input, formats, formatProvider, styles, out result ), "Cannot parse specified input with any specified formats." ); + return result; + } + + private static void HandleParseResult( TimestampParseResult result, string messageForInvalidInput ) + { + if ( result == TimestampParseResult.Success ) + { + return; + } + + string parameterName; + string message; + + var parameter = result & TimestampParseResult.ParameterMask; + switch( parameter ) + { + case TimestampParseResult.ParameterFormat: + { + parameterName = "format"; + break; + } + default: + { + Contract.Assert( parameter == TimestampParseResult.ParameterInput, parameter + " == TimestampParseResult.Input" ); + parameterName = "input"; + break; + } + } + + var kind = result & TimestampParseResult.KindMask; + + switch ( kind ) + { + case TimestampParseResult.KindEmpty: + { + message = String.Format( CultureInfo.CurrentCulture, "'{0}' must not be empty.", parameterName ); + break; + } + case TimestampParseResult.KindExtraCharactors: + { + message = "The input contains extra charactors."; + break; + } + case TimestampParseResult.KindInvalidDateTimeDelimiter: + { + message = "A date-time delimiter of the input is not valid."; + break; + } + case TimestampParseResult.KindInvalidDay: + { + message = "Format of the day portion of the input is not valid."; + break; + } + case TimestampParseResult.KindInvalidHour: + { + message = "Format of the hour portion of the input is not valid."; + break; + } + case TimestampParseResult.KindInvalidHourMinuteDelimiter: + { + message = "A hour-miniute delimiter of the input is not valid."; + break; + } + case TimestampParseResult.KindInvalidMinute: + { + message = "Format of the minute portion of the input is not valid."; + break; + } + case TimestampParseResult.KindInvalidMinuteSecondDelimiter: + { + message = "A miniute-second delimiter of the input is not valid."; + break; + } + case TimestampParseResult.KindInvalidMonth: + { + message = "Format of the month portion of the input is not valid."; + break; + } + case TimestampParseResult.KindInvalidMonthDayDelimiter: + { + message = "A month-day delimiter of the input is not valid."; + break; + } + case TimestampParseResult.KindInvalidNanoSecond: + { + message = "Format of the nanosecond portion of the input is not valid."; + break; + } + case TimestampParseResult.KindInvalidSecond: + { + message = "Format of the second portion of the input is not valid."; + break; + } + case TimestampParseResult.KindInvalidSubsecondDelimiter: + { + message = "A second-nanosecond delimiter of the input is not valid."; + break; + } + case TimestampParseResult.KindInvalidYear: + { + message = "Format of the year portion of the input is not valid."; + break; + } + case TimestampParseResult.KindInvalidYearMonthDeilimiter: + { + message = "A year-month delimiter of the input is not valid."; + break; + } + case TimestampParseResult.KindLeadingWhitespaceNotSupported: + { + message = "Leading whitespaces in the input is not allowed."; + break; + } + case TimestampParseResult.KindMissingUtcSign: + { + message = "No time offset specifier 'Z' is missing in the input."; + break; + } + case TimestampParseResult.KindNull: + { + Contract.Assert( + ( result & TimestampParseResult.ExceptionTypeMask ) == TimestampParseResult.ArgumentNullException, + ( result & TimestampParseResult.ExceptionTypeMask ) + " == TimestampParseResult.ArgumentNullException" + ); + message = null; + break; + } + case TimestampParseResult.KindTrailingWhitespaceNotSupported: + { + message = "Trailing whitespaces in the input is not allowed."; + break; + } + case TimestampParseResult.KindUnsupported: + { + message = "The specified format is not supported."; + break; + } + case TimestampParseResult.KindYearOutOfRange: + { + message = "The specified year is too small or too large."; + break; + } + default: + { + Contract.Assert( kind == TimestampParseResult.KindNoMatchedFormats, kind + " == TimestampParseResult.KindNoMatchedFormats" ); + message = "The input is not valid Timestamp."; + break; + } + } + + switch( result & TimestampParseResult.ExceptionTypeMask ) + { + case TimestampParseResult.ArgumentNullException: + { + throw new ArgumentNullException( parameterName ); + } + case TimestampParseResult.ArgumentException: + { + throw new ArgumentException( message, parameterName ); + } + default: + { + Contract.Assert( + ( result & TimestampParseResult.ExceptionTypeMask ) == TimestampParseResult.FormatException, + ( result & TimestampParseResult.ExceptionTypeMask ) + " == TimestampParseResult.FormatException" + ); + throw new FormatException( message ); + } + } + } + } +} diff --git a/src/MsgPack/Timestamp.Properties.cs b/src/MsgPack/Timestamp.Properties.cs new file mode 100644 index 000000000..1f49e284e --- /dev/null +++ b/src/MsgPack/Timestamp.Properties.cs @@ -0,0 +1,502 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#endregion -- License Terms -- + +#if UNITY_5 || UNITY_STANDALONE || UNITY_WEBPLAYER || UNITY_WII || UNITY_IPHONE || UNITY_ANDROID || UNITY_PS3 || UNITY_XBOX360 || UNITY_FLASH || UNITY_BKACKBERRY || UNITY_WINRT +#define UNITY +#endif + +using System; +#if CORE_CLR || UNITY || NETSTANDARD1_1 +using Contract = MsgPack.MPContract; +#else +using System.Diagnostics.Contracts; +#endif // CORE_CLR || UNITY || NETSTANDARD1_1 + +namespace MsgPack +{ + partial struct Timestamp + { + private const int SecondsPerMinutes = 60; + private const int SecondsPerHours = SecondsPerMinutes * 60; + private const int SecondsPerDay = SecondsPerHours * 24; + + private const int DaysPerYear = 365; + private const int DaysPer4Years = DaysPerYear * 4 + 1; + private const int DaysPer100Years = DaysPer4Years * 25 - 1; + private const int DaysPer400Years = DaysPer100Years * 4 + 1; + + private const int DayOfWeekOfEpoc = 4; // day of week of 1970-01-01 + + private static readonly uint[] DaysToMonth365 = new uint[] { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }; + private static readonly uint[] DaysToMonth366 = new uint[] { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }; + private static readonly uint[] ReversedDaysToMonth365 = new uint[] { 0, 31, 61, 92, 122, 153, 184, 214, 245, 275, 306, 334, 365 }; + private static readonly uint[] ReversedDaysToMonth366 = new uint[] { 0, 31, 61, 92, 122, 153, 184, 214, 245, 275, 306, 335, 366 }; + + /// + /// Gets a unix epoch seconds part of msgpack timestamp spec. + /// + /// A value of unix epoch seconds part of msgpack timestamp spec. This value may be negative, BC dates, and dates after 9999-12-31. + /// + /// If you want to get "nanosecond" portion of this instance, use property instead. + /// + public long UnixEpochSecondsPart + { + get { return this.unixEpochSeconds; } + } + + /// + /// Gets a nanoseconds part of msgpack timestamp spec. + /// + /// A value of nanoseconds part of msgpack timestamp spec. This value will be between 0 to 999,999,999. + /// + /// If you want to get "nanosecond" portion of this instance, use property instead. + /// + public int NanosecondsPart + { + get { return unchecked( ( int )this.nanoseconds ); } + } + + /// + /// Gets an year portion of this instance. + /// + /// An year portion of this instance. The value may be zero or negative, and may exceed 9,999. + public long Year + { + get + { + long year; + int month, day, dayOfYear; + this.GetDatePart( out year, out month, out day, out dayOfYear ); + return year; + } + } + + /// + /// Gets a month portion of this instance. + /// + /// A month portion of this instance. The value will be between 1 and 12. + public int Month + { + get + { + long year; + int month, day, dayOfYear; + this.GetDatePart( out year, out month, out day, out dayOfYear ); + return month; + } + } + + /// + /// Gets a day portion of this instance. + /// + /// A day portion of this instance. The value will be valid day of . + public int Day + { + get + { + long year; + int month, day, dayOfYear; + this.GetDatePart( out year, out month, out day, out dayOfYear ); + return day; + } + } + + /// + /// Gets an hour portion of this instance. + /// + /// An hour portion of this instance. The value will be between 0 and 59. + public int Hour + { + get + { + long remainder; + var hour = DivRem( this.unixEpochSeconds, SecondsPerHours, out remainder ) % 24; + unchecked + { + return + ( int )( this.unixEpochSeconds < 0 + ? hour + ( remainder != 0 ? 23 : ( hour < 0 ? 24 : 0 ) ) + : hour + ); + } + } + } + + /// + /// Gets a minute portion of this instance. + /// + /// A minute portion of this instance. The value will be between 0 and 59. + public int Minute + { + get + { + long remainder; + var minute = DivRem( this.unixEpochSeconds, SecondsPerMinutes, out remainder ) % 60; + unchecked + { + return + ( int )( this.unixEpochSeconds < 0 + ? minute + ( remainder != 0 ? 59 : ( minute < 0 ? 60 : 0 ) ) + : minute + ); + } + } + } + + /// + /// Gets a second portion of this instance. + /// + /// A second portion of this instance. The value will be between 0 and 59. + public int Second + { + get + { + var second = unchecked( ( int )( this.unixEpochSeconds % 60 ) ); + return second < 0 ? second + 60 : second; + } + } + + /// + /// Gets a millisecond portion of this instance. + /// + /// A millisecond portion of this instance. The value will be between 0 and 999. + public int Millisecond + { + get { return this.NanosecondsPart / ( 1000 * 1000 ); } + } + + /// + /// Gets a microsecond portion of this instance. + /// + /// A microsecond portion of this instance. The value will be between 0 and 999. + public int Microsecond + { + get { return ( this.NanosecondsPart / 1000 ) % 1000; } + } + + /// + /// Gets a nanosecond portion of this instance. + /// + /// A nanosecond portion of this instance. The value will be between 0 and 999. + /// + /// If you want to get "nanoseconds" part of msgpack timestamp spec, use property instead. + /// + public int Nanosecond + { + get { return ( this.NanosecondsPart ) % 1000; } + } + + /// + /// Gets a which only contains date portion of this instance. + /// + /// A which only contains date portion of this instance. + public Timestamp Date + { + get + { + return new Timestamp( this.unixEpochSeconds - this.TimeOfDay.unixEpochSeconds, 0 ); + } + } + + /// + /// Gets a which only contains time portion of this instance. + /// + /// A which only contains time portion of this instance. + public Timestamp TimeOfDay + { + get + { + return + new Timestamp( + this.unixEpochSeconds < 0 ? ( this.unixEpochSeconds % SecondsPerDay + SecondsPerDay ) : ( this.unixEpochSeconds % SecondsPerDay ), + this.NanosecondsPart + ); + } + } + + /// + /// Gets a of this day. + /// + /// A of this day. + public DayOfWeek DayOfWeek + { + get + { + long remainder; + var divided = unchecked( ( int )DivRem( this.unixEpochSeconds, SecondsPerDay, out remainder )); + return + ( DayOfWeek )( + ( + ( this.unixEpochSeconds < 0 + ? ( ( divided + ( ( int )remainder < 0 ? -1 : 0 ) ) % 7 + 7 ) + : divided + ) + DayOfWeekOfEpoc + ) % 7 + ); + } + } + + /// + /// Gets a number of days of this year. + /// + /// A number of days of this year. + public int DayOfYear + { + get + { + long year; + int month, day, dayOfYear; + this.GetDatePart( out year, out month, out day, out dayOfYear ); + return dayOfYear; + } + } + + /// + /// Gets a value which indicates is leap year or not. + /// + /// + /// true, when is leap year; otherwise, false. + /// + /// + /// A of B.C.1 is 0, so if the is 0 then it is leap year. + /// In addition, B.C.3 (the is -3) is leap year, B.C.99 (the is -100) is not, + /// and B.C.399 (the is -400) is leap year. + /// + public bool IsLeapYear + { + get { return IsLeapYearInternal( this.Year ); } + } + + internal static bool IsLeapYearInternal( long year ) + { + // Note: This algorithm assumes that BC uses leap year same as AD and B.C.1 is 0. + // This algorithm avoids remainder operation as possible. + return !( year % 4 != 0 || ( year % 100 == 0 && year % 400 != 0 ) ); + } + + internal static int GetLastDay( int month, bool isLeapYear ) + { + var lastDay = LastDays[ month ]; + if ( month == 2 ) + { + lastDay = isLeapYear ? 29 : 28; + } + + return lastDay; + } + + private void GetDatePart( out long year, out int month, out int day, out int dayOfYear ) + { + if ( this.unixEpochSeconds < -UnixEpochInSeconds ) + { + this.GetDatePartBC( out year, out month, out day, out dayOfYear ); + } + else + { + this.GetDatePartAD( out year, out month, out day, out dayOfYear ); + } + } + + private void GetDatePartAD( out long year, out int month, out int day, out int dayOfYear ) + { + Contract.Assert( this.unixEpochSeconds >= -UnixEpochInSeconds, this.unixEpochSeconds + " > " + ( -UnixEpochInSeconds ) ); + + // From coreclr System.DateTime.cs + // https://github.com/dotnet/coreclr/blob/0825741447c14a6a70c60b7c429e16f95214e74e/src/mscorlib/shared/System/DateTime.cs#L863 + + // First, use 0001-01-01 as epoch to simplify leap year calculation + var seconds = unchecked( ( ulong )( this.unixEpochSeconds + UnixEpochInSeconds ) ); + + // number of days since 0001-01-01 + var daysOffset = seconds / SecondsPerDay; + + // number of whole 400-year periods since 0001-01-01 + var numberOf400Years = daysOffset / DaysPer400Years; + // day number within 400-year period + var daysIn400Years = unchecked( ( uint )( daysOffset - numberOf400Years * DaysPer400Years ) ); + + // number of whole 100-year periods within 400-year period + var numberOf100Years = daysIn400Years / DaysPer100Years; + // Last 100-year period has an extra day, so decrement result if 4 + if ( numberOf100Years == 4 ) + { + numberOf100Years = 3; + } + + // day number within 100-year period + var daysIn100Years = daysIn400Years - numberOf100Years * DaysPer100Years; + + // number of whole 4-year periods within 100-year period + var numberOf4years = daysIn100Years / DaysPer4Years; + // day number within 4-year period + var daysIn4Years = daysIn100Years - numberOf4years * DaysPer4Years; + + // number of whole years within 4-year period + var numberOf1Year = daysIn4Years / DaysPerYear; + // Last year has an extra day, so decrement result if 4 + if ( numberOf1Year == 4 ) + { + numberOf1Year = 3; + } + + // compute year + year = unchecked( ( long )( numberOf400Years * 400 + numberOf100Years * 100 + numberOf4years * 4 + numberOf1Year + 1 ) ); + // day number within year + var daysInYear = daysIn4Years - numberOf1Year * DaysPerYear; + dayOfYear = unchecked( ( int )( daysInYear + 1 ) ); + // Leap year calculation + var isLeapYear = numberOf1Year == 3 && ( numberOf4years != 24 || numberOf100Years == 3 ); + var days = isLeapYear ? DaysToMonth366 : DaysToMonth365; + // All months have less than 32 days, so n >> 5 is a good conservative + // estimate for the month + var numberOfMonth = ( daysInYear >> 5 ) + 1; +#if DEBUG + Contract.Assert( numberOfMonth <= 12, numberOfMonth + "<= 12, daysInYear = " + daysInYear ); +#endif // DEBUG + // m = 1-based month number + while ( daysInYear >= days[ numberOfMonth ] ) + { + numberOfMonth++; +#if DEBUG + Contract.Assert( numberOfMonth <= 12, numberOfMonth + "<= 12, daysInYear = " + daysInYear ); +#endif // DEBUG + } + // compute month and day + month = unchecked( ( int )numberOfMonth ); + day = unchecked( ( int )( daysInYear - days[ numberOfMonth - 1 ] + 1 ) ); + } + + private void GetDatePartBC( out long year, out int month, out int day, out int dayOfYear ) + { + Contract.Assert( this.unixEpochSeconds < -UnixEpochInSeconds, this.unixEpochSeconds + " > " + ( -UnixEpochInSeconds ) ); + + // From coreclr System.DateTime.cs + // https://github.com/dotnet/coreclr/blob/0825741447c14a6a70c60b7c429e16f95214e74e/src/mscorlib/shared/System/DateTime.cs#L863 + + // First, use 0001-01-01 as epoch to simplify leap year calculation. + // This method calculate negative offset from 0001-01-01. + var seconds = unchecked( ( ulong )( ( this.unixEpochSeconds + UnixEpochInSeconds ) * -1 ) ); + + // number of days since 0001-01-01 + var daysOffset = seconds / SecondsPerDay; + daysOffset += ( seconds % SecondsPerDay ) > 0 ? 1u : 0u; + + // number of whole 400-year periods since 0001-01-01 + var numberOf400Years = ( daysOffset - 1 ) / DaysPer400Years; // decrement offset 1 to adjust 1 to 12-31 + // day number within 400-year period + var daysIn400Years = unchecked( ( uint )( daysOffset - numberOf400Years * DaysPer400Years ) ); + + // number of whole 100-year periods within 400-year period + var numberOf100Years = + daysIn400Years <= ( DaysPer100Years + 1 ) // 1st year is leap year (power of 400) + ? 0 + : ( ( daysIn400Years - 2 ) / DaysPer100Years ); // decrement 1st leap year day and offset 1 to adjust 1 to 12-31 + + // day number within 100-year period + var daysIn100Years = daysIn400Years - numberOf100Years * DaysPer100Years; + + // number of whole 4-year periods within 100-year period + var numberOf4years = + daysIn100Years == 0 + ? 0 + : ( ( daysIn100Years - 1 ) / DaysPer4Years ); // decrement offset 1 to adjust 1 to 12-31 + + // day number within 4-year period + var daysIn4Years = daysIn100Years - numberOf4years * DaysPer4Years; + + // number of whole years within 4-year period + var numberOf1Year = + daysIn4Years <= ( DaysPerYear + ( numberOf4years != 0 ? 1 : 0 ) ) // is leap year in 4 years range? + ? 0 + : ( ( daysIn4Years - 2 ) / DaysPerYear ); // decrement 1st leap year day and offset 1 to adjust 1 to 12-31 + + // compute year, note that 0001 -1 is 0000 (=B.C.1) + year = -unchecked( ( long )( numberOf400Years * 400 + numberOf100Years * 100 + numberOf4years * 4 + numberOf1Year ) ); + var isLeapYear = numberOf1Year == 0 && ( numberOf4years != 0 || numberOf100Years == 0 ); + // day number within year + var daysInYear = + isLeapYear + ? ( 366 - daysIn4Years ) + : ( 365 - ( daysIn4Years - 1 - numberOf1Year * DaysPerYear ) ); + + dayOfYear = unchecked( ( int )( daysInYear + 1 ) ); + // Leap year calculation + var days = isLeapYear ? DaysToMonth366 : DaysToMonth365; + // All months have more than 32 days, so n >> 5 is a good conservative + // estimate for the month + var numberOfMonth = ( daysInYear >> 5 ) + 1; +#if DEBUG + Contract.Assert( numberOfMonth <= 12, numberOfMonth + "<= 12, daysInYear = " + daysInYear ); +#endif // DEBUG + // m = 1-based month number + while ( daysInYear >= days[ numberOfMonth ] ) + { + numberOfMonth++; +#if DEBUG + Contract.Assert( numberOfMonth <= 12, numberOfMonth + "<= 12, daysInYear = " + daysInYear ); +#endif // DEBUG + } + // compute month and day + month = unchecked( ( int )numberOfMonth ); + day = unchecked( ( int )( daysInYear - days[ numberOfMonth - 1 ] + 1 ) ); + } + + /// + /// Gets a instance which represents today on UTC. The result only contains date part. + /// + /// A instance which represents today on UTC. The result only contains date part. + /// + /// For underlying system API restriction, this method cannot work after 9999-12-31 in current implementation. + /// + public static Timestamp Today + { + get { return UtcNow.Date; } + } + + /// + /// Gets a instance of now on UTC. + /// + /// A instance of now on UTC. + /// + /// + /// For underlying system API restriction, this method cannot work after 9999-12-31T23:59:59.999999900 in current implementation. + /// + /// + /// In addition, the precision of the returned will be restricted by underlying platform. + /// In current implementation, the precision is 100 nano-seconds at most, and about 1/60 milliseconds on normal Windows platform. + /// + /// + public static Timestamp UtcNow + { + get + { + var now = DateTimeOffset.UtcNow; + return new Timestamp( +#if !NET35 && !NET45 && !NETSTANDARD1_1 + now.ToUnixTimeSeconds(), +#else // !NET35 && !NET45 && !NETSTANDARD1_1 + ( now.Ticks / TimeSpan.TicksPerSecond ) - UnixEpochInSeconds, +#endif // !NET35 && !NET45 && !NETSTANDARD1_1 + unchecked( ( int )( now.Ticks % 10000000 * 100 ) ) + ); + } + } + } +} diff --git a/src/MsgPack/Timestamp.ToString.cs b/src/MsgPack/Timestamp.ToString.cs new file mode 100644 index 000000000..95342e5f4 --- /dev/null +++ b/src/MsgPack/Timestamp.ToString.cs @@ -0,0 +1,137 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#endregion -- License Terms -- + +using System; +using System.Globalization; +using System.Text; + +namespace MsgPack +{ + partial struct Timestamp : IFormattable + { + /// + /// Returns a representation of this instance with the default format and the default format provider. + /// + /// + /// A representation of this instance. + /// + /// + /// + /// As of recommendation of the msgpack specification and consistency with and , + /// this overload uses "o" for the format parameter and null for formatProvider parameter. + /// + /// + /// The round trip format is yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffff'Z' which 'fffffffff' nanoseconds. + /// + /// + public override string ToString() + { + return this.ToString( null, null ); + } + + /// + /// Returns a representation of this instance with the default format and the specified format provider. + /// + /// + /// An to provide culture specific format information. + /// You can specify null for default behavior, which uses . + /// + /// + /// A representation of this instance. + /// + /// + /// + /// As of recommendation of the msgpack specification and consistency with and , + /// this overload uses "o" for format parameter. + /// + /// + /// The round trip format is yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffff'Z' which 'fffffffff' nanoseconds. + /// + /// + public string ToString( IFormatProvider formatProvider ) + { + return this.ToString( null, formatProvider ); + } + + /// + /// Returns a representation of this instance with the specified format and the default format provider. + /// + /// + /// A format string to specify output format. You can specify null for default behavior, which is interpreted as "o". + /// + /// + /// A representation of this instance. + /// + /// + /// + /// Currently, only "o" and "O" (ISO 8601 like round trip format) and "s" (ISO 8601 format) are supported. + /// Other standard date time format and any custom date time format are not supported. + /// + /// + /// The round trip format is yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffff'Z' which 'fffffffff' nanoseconds. + /// + /// + /// As of recommendation of the msgpack specification and consistency with and , + /// this overload uses null for formatProvider parameter. + /// + /// + public string ToString( string format ) + { + return this.ToString( format, null ); + } + + /// + /// Returns a representation of this instance with the default format and the specified format provider. + /// + /// + /// A format string to specify output format. You can specify null for default behavior, which is interpreted as "o". + /// + /// + /// An to provide culture specific format information. + /// You can specify null for default behavior, which uses . + /// + /// + /// A representation of this instance. + /// + /// + /// is not valid. + /// + /// + /// + /// Currently, only "o" and "O" (ISO 8601 like round trip format) and "s" (ISO 8601 format) are supported. + /// Other standard date time format and any custom date time format are not supported. + /// + /// + /// The round trip format is yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffff'Z' which 'fffffffff' nanoseconds. + /// + /// + /// As of recommendation of the msgpack specification and consistency with and , + /// the default value of the is "o" (ISO 8601 like round-trip format) + /// and the default value of the is null (. + /// If you want to ensure interoperability for other implementation, specify "s" and resepectively. + /// + /// + public string ToString( string format, IFormatProvider formatProvider ) + { + var value = new Value( this ); + return TimestampStringConverter.ToString( format, formatProvider, ref value ); + } + } +} diff --git a/src/MsgPack/Timestamp.TryParseExact.cs b/src/MsgPack/Timestamp.TryParseExact.cs new file mode 100644 index 000000000..568604ece --- /dev/null +++ b/src/MsgPack/Timestamp.TryParseExact.cs @@ -0,0 +1,195 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#endregion -- License Terms -- + +#if UNITY_5 || UNITY_STANDALONE || UNITY_WEBPLAYER || UNITY_WII || UNITY_IPHONE || UNITY_ANDROID || UNITY_PS3 || UNITY_XBOX360 || UNITY_FLASH || UNITY_BKACKBERRY || UNITY_WINRT +#define UNITY +#endif + +using System; +#if CORE_CLR || UNITY || NETSTANDARD1_1 +using Contract = MsgPack.MPContract; +#else +using System.Diagnostics.Contracts; +#endif // CORE_CLR || UNITY || NETSTANDARD1_1 +using System.Globalization; + +namespace MsgPack +{ + partial struct Timestamp + { + /// + /// Converts specified representation of a msgpack timestamp to its equivalant + /// with specified format, culture-specific format information provider, and . + /// + /// An input representation of a msgpack timestamp. The format must be match exactly to the . + /// An expected format string. + /// An to provide culture specific information to parse . + /// + /// Specify bitwise value combination of to control detailed parsing behavior. + /// The typical value is . + /// + /// If the conversion succeeded, the conversion result will be stored; otherwise, the default value will be stored. + /// true, if the conversion succeeded; otherwise, false. + /// + /// + /// Currently, supported date-time format is only 'o' and 'O' (round-trip) or 's' (sortable, ISO-8601). + /// Other any standard date-time formats and custom date-time formats are not supported. + /// + /// + /// The rount-trip format is yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffff'Z' which "fffffffff" is nanoseconds. + /// + /// + /// The sign mark can be culture-specific, and leading/trailing whitespaces can be allowed when specify appropriate . + /// + /// + /// + /// is null. + /// Or, is null. + /// + /// + /// The specified is not supported. + /// Or the specified has invalid combination. + /// + public static bool TryParseExact( string input, string format, IFormatProvider formatProvider, DateTimeStyles styles, out Timestamp result ) + { + return TryParseExactCore( input, format, formatProvider, styles, out result ) == TimestampParseResult.Success; + } + + /// + /// Converts specified representation of a msgpack timestamp to its equivalant + /// with specified format, culture-specific format information provider, and . + /// + /// The input representation of a msgpack timestamp. The format must be match exactly to one of the . + /// The array of expected format strings. Unsupported format will be ignored. + /// The culture specific information to control + /// + /// Specify bitwise value combination of to control detailed parsing behavior. + /// The typical value is . + /// + /// If the conversion succeeded, the conversion result will be stored; otherwise, the default value will be stored. + /// true, if the conversion succeeded; otherwise, false. + /// + /// + /// Currently, supported date-time format is only 'o' and 'O' (round-trip) or 's' (sortable, ISO-8601). + /// Other any standard date-time formats and custom date-time formats are not supported. + /// + /// + /// The rount-trip format is yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffff'Z' which "fffffffff" is nanoseconds. + /// + /// + /// The sign mark can be culture-specific, and leading/trailing whitespaces can be allowed when specify appropriate . + /// + /// + /// + /// is null. + /// Or, is null. + /// + /// + /// The specified is empty. + /// Or the specified has invalid combination. + /// + public static bool TryParseExact( string input, string[] formats, IFormatProvider formatProvider, DateTimeStyles styles, out Timestamp result ) + { + return TryParseExactCore( input, formats, formatProvider, styles, out result ) == TimestampParseResult.Success; + } + + private static TimestampParseResult TryParseExactCore( string input, string format, IFormatProvider formatProvider, DateTimeStyles styles, out Timestamp result ) + { + ValidateParseInput( input ); + + if ( input.Length == 0 ) + { + result = default( Timestamp ); + return TimestampParseResult.EmptyInput; + } + + if ( format == null ) + { + throw new ArgumentNullException( "format" ); + } + + if ( format.Length == 0 ) + { + throw new ArgumentException( "The 'format' must not be empty.", "format" ); + } + + ValidateParseStyles( styles ); + + var error = TimestampStringConverter.TryParseExact( input, format, formatProvider, styles, out result ); + if ( error == TimestampParseResult.UnsupportedFormat ) + { + // UnsupportedFormat should throw Exception instead of returning false. + HandleParseResult( error, "Cannot parse specified input with specified format." ); + } + + return error; + } + + private static TimestampParseResult TryParseExactCore( string input, string[] formats, IFormatProvider formatProvider, DateTimeStyles styles, out Timestamp result ) + { + ValidateParseInput( input ); + + if ( formats == null ) + { + throw new ArgumentNullException( "formats" ); + } + + if ( formats.Length == 0 ) + { + throw new ArgumentException( "The 'formats' must not be empty.", "formats" ); + } + + ValidateParseStyles( styles ); + + if ( input.Length == 0 ) + { + result = default( Timestamp ); + return TimestampParseResult.EmptyInput; + } + + foreach ( var format in formats ) + { + if ( TimestampStringConverter.TryParseExact( input, format, formatProvider, styles, out result ) == TimestampParseResult.Success ) + { + return TimestampParseResult.Success; + } + } + + result = default( Timestamp ); + return TimestampParseResult.NoMatchedFormats; + } + + private static void ValidateParseInput( string input ) + { + if ( input == null ) + { + throw new ArgumentNullException( "input" ); + } + } + + private static void ValidateParseStyles( DateTimeStyles styles ) + { + if ( styles != DateTimeStyles.None && ( styles & ~( DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite ) ) != 0 ) + { + throw new ArgumentException( "Timestamp currently only support DateTimeStyles.None, DateTimeStyles.AllowLeadingWhite, and DateTimeStyles.AllowTrailingWhite.", "styles" ); + } + } + } +} diff --git a/src/MsgPack/Timestamp.cs b/src/MsgPack/Timestamp.cs new file mode 100644 index 000000000..217651424 --- /dev/null +++ b/src/MsgPack/Timestamp.cs @@ -0,0 +1,224 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#endregion -- License Terms -- + +using System; + +namespace MsgPack +{ + /// + /// Represents high resolution timestamp for MessagePack eco-system. + /// + /// + /// The timestamp consists of 64bit Unix epoc seconds and 32bit unsigned nanoseconds offset from the calculated datetime with the epoc. + /// So this type supports wider range than and and supports 1 or 10 nano seconds precision. + /// However, this type does not support local date time and time zone information, so this type always represents UTC time. + /// +#if FEATURE_BINARY_SERIALIZATION + [Serializable] +#endif // FEATURE_BINARY_SERIALIZATION + public partial struct Timestamp + { + /// + /// MessagePack ext type code for msgpack timestamp type. + /// + public const byte TypeCode = 0xFF; + + /// + /// An instance represents zero. This is 1970-01-01T00:00:00.000000000. + /// + public static readonly Timestamp Zero = new Timestamp( 0, 0 ); + + /// + /// An instance represents minimum value of this instance. This is [, 0] in encoded format. + /// + public static readonly Timestamp MinValue = new Timestamp( Int64.MinValue, 0 ); + + /// + /// An instance represents maximum value of this instance. This is [, 999999999] in encoded format. + /// + public static readonly Timestamp MaxValue = new Timestamp( Int64.MaxValue, MaxNanoSeconds ); + + private static readonly int[] LastDays = + new[] + { + 0, // There are no month=0 + 31, + 0, // 28 or 29 + 31, + 30, + 31, + 30, + 31, + 31, + 30, + 31, + 30, + 31 + }; + + private const long MinUnixEpochSecondsForTicks = -62135596800L; + private const long MaxUnixEpochSecondsForTicks = 253402300799; + + private const int MaxNanoSeconds = 999999999; + + private const long UnixEpochTicks = 621355968000000000; + private const long UnixEpochInSeconds = 62135596800; + private const int SecondsToTicks = 10 * 1000 * 1000; + private const int NanoToTicks = 100; + private const int SecondsToNanos = 1000 * 1000 * 1000; + + private readonly long unixEpochSeconds; + private readonly uint nanoseconds; // 0 - 999,999,999 + + /// + /// Initializes a new instance of structure. + /// + /// A unit epoc seconds part of the msgpack timestamp. + /// A unit nanoseconds part of the msgpack timestamp. + /// + /// is negative or is greater than 999,999,999 exclusive. + /// + public Timestamp( long unixEpochSeconds, int nanoseconds ) + { + if ( nanoseconds > MaxNanoSeconds || nanoseconds < 0 ) + { + throw new ArgumentOutOfRangeException( "nanoseconds", "nanoseconds must be non negative value and lessor than 999,999,999." ); + } + + this.unixEpochSeconds = unixEpochSeconds; + this.nanoseconds = unchecked( ( uint )nanoseconds ); + } + + internal static Timestamp FromComponents( ref Value value, bool isLeapYear ) + { + long epoc; + checked + { + var days = YearsToDaysOfNewYear( value.Year ) + ToDaysOffsetFromNewYear( value.Month, value.Day, isLeapYear ) - Timestamp.UnixEpochInSeconds / Timestamp.SecondsPerDay; + // First set time offset to avoid overflow. + epoc = value.Hour * 60 * 60; + epoc += value.Minute * 60; + epoc += value.Second; + if ( days < 0 ) + { + // Avoid right side overflow. + epoc += ( days + 1 ) * Timestamp.SecondsPerDay; + epoc -= Timestamp.SecondsPerDay; + } + else + { + epoc += days * Timestamp.SecondsPerDay; + } + } + + return new Timestamp( epoc, unchecked( ( int )value.Nanoseconds ) ); + } + + private static long YearsToDaysOfNewYear( long years ) + { + long remainOf400Years, remainOf100Years, remainOf4Years; + + // For AD, uses offset from 0001, so decrement 1 at first. + var numberOf400Years = DivRem( years > 0 ? ( years - 1 ) : years, 400, out remainOf400Years ); + var numberOf100Years = DivRem( remainOf400Years, 100, out remainOf100Years ); + var numberOf4Years = DivRem( remainOf100Years, 4, out remainOf4Years ); + var days = + DaysPer400Years * numberOf400Years + + DaysPer100Years * numberOf100Years + + DaysPer4Years * numberOf4Years + + DaysPerYear * remainOf4Years; + if ( years <= 0 ) + { + // For BC, subtract year 0000 offset. + days -= ( DaysPerYear + 1 ); + } + + return days; + } + + private static int ToDaysOffsetFromNewYear( int month, int day, bool isLeapYear ) + { + var result = -1; // 01-01 should be 0, so starts with -1. + for ( var i = 1; i < month; i++ ) + { + result += LastDays[ i ]; + if ( i == 2 ) + { + result += isLeapYear ? 29 : 28; + } + } + + result += day; + return result; + } + +#if NETSTANDARD1_1 || NETSTANDARD1_3 + + // Slow alternative + internal static long DivRem( long dividend, long divisor, out long remainder ) + { + remainder = dividend % divisor; + return dividend / divisor; + } + +#else // NETSTANDARD1_1 || NETSTANDARD1_3 + + internal static long DivRem( long dividend, long divisor, out long remainder ) + { + return Math.DivRem( dividend, divisor, out remainder ); + } + +#endif // NETSTANDARD1_1 || NETSTANDARD1_3 + + internal struct Value + { + public long Year; + public int Month; + public int Day; + public int Hour; + public int Minute; + public int Second; + public uint Nanoseconds; + + public Value( Timestamp encoded ) + { + int dayOfYear; + encoded.GetDatePart( out this.Year, out this.Month, out this.Day, out dayOfYear ); + this.Hour = encoded.Hour; + this.Minute = encoded.Minute; + this.Second = encoded.Second; + this.Nanoseconds = encoded.nanoseconds; + } + +#if DEBUG + public Value( long year, int month, int day, int hour, int minute, int second, uint nanoseconds ) + { + this.Year = year; + this.Month = month; + this.Day = day; + this.Hour = hour; + this.Minute = minute; + this.Second = second; + this.Nanoseconds = nanoseconds; + } +#endif // DEBUG + } + } +} diff --git a/src/MsgPack/TimestampParseResult.cs b/src/MsgPack/TimestampParseResult.cs new file mode 100644 index 000000000..2fb17e844 --- /dev/null +++ b/src/MsgPack/TimestampParseResult.cs @@ -0,0 +1,88 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#endregion -- License Terms -- + +namespace MsgPack +{ + /// + /// Represents internal result. + /// + internal enum TimestampParseResult + { + Success = 0, + + KindMask = 0xFFFF, + KindNull = 1, + KindEmpty = 2, + KindUnsupported = 3, + KindLeadingWhitespaceNotSupported = 11, + KindTrailingWhitespaceNotSupported = 12, + KindMissingUtcSign = 13, + KindExtraCharactors = 14, + KindInvalidYear = 21, + KindInvalidMonth = 22, + KindInvalidDay = 23, + KindInvalidHour = 24, + KindInvalidMinute = 25, + KindInvalidSecond = 26, + KindInvalidNanoSecond = 27, + KindYearOutOfRange = 31, + KindInvalidYearMonthDeilimiter = 101, + KindInvalidMonthDayDelimiter = 102, + KindInvalidDateTimeDelimiter = 103, + KindInvalidHourMinuteDelimiter = 104, + KindInvalidMinuteSecondDelimiter = 105, + KindInvalidSubsecondDelimiter = 106, + KindNoMatchedFormats = 1001, + + ParameterMask = 0xFF << 16, + ParameterInput = 1 << 16, + ParameterFormat = 2 << 16, + + ExceptionTypeMask = 0xFF << 24, + ArgumentNullException = 1 << 24, + ArgumentException = 2 << 24, + FormatException = 3 << 24, + + NullInput = ArgumentNullException | ParameterInput | KindNull, + NullFormat = ArgumentNullException | ParameterFormat | KindNull, + EmptyInput = FormatException | ParameterInput | KindEmpty, + EmptyFormat = ArgumentException | ParameterFormat | KindEmpty, + UnsupportedFormat = ArgumentException | ParameterFormat | KindUnsupported, + LeadingWhitespaceNotAllowed = FormatException | ParameterInput | KindLeadingWhitespaceNotSupported, + TrailingWhitespaceNotAllowed = FormatException | ParameterInput | KindTrailingWhitespaceNotSupported, + MissingUtcSign = FormatException | ParameterInput | KindMissingUtcSign, + ExtraCharactors = FormatException | ParameterInput | KindExtraCharactors, + InvalidYear = FormatException | ParameterInput | KindInvalidYear, + InvalidMonth = FormatException | ParameterInput | KindInvalidMonth, + InvalidDay = FormatException | ParameterInput | KindInvalidDay, + InvalidHour = FormatException | ParameterInput | KindInvalidHour, + InvalidMinute = FormatException | ParameterInput | KindInvalidMinute, + InvalidSecond = FormatException | ParameterInput | KindInvalidSecond, + InvalidNanoSecond = FormatException | ParameterInput | KindInvalidNanoSecond, + YearOutOfRange = FormatException | ParameterInput | KindYearOutOfRange, + InvalidYearMonthDeilimiter = FormatException | ParameterInput | KindInvalidYearMonthDeilimiter, + InvalidMonthDayDelimiter = FormatException | ParameterInput | KindInvalidMonthDayDelimiter, + InvalidDateTimeDelimiter = FormatException | ParameterInput | KindInvalidDateTimeDelimiter, + InvalidHourMinuteDelimiter = FormatException | ParameterInput | KindInvalidHourMinuteDelimiter, + InvalidMinuteSecondDelimiter = FormatException | ParameterInput | KindInvalidMinuteSecondDelimiter, + InvalidSubsecondDelimiter = FormatException | ParameterInput | KindInvalidSubsecondDelimiter, + NoMatchedFormats = FormatException | ParameterInput | KindNoMatchedFormats + } +} diff --git a/src/MsgPack/TimestampStringConverter.Parse.cs b/src/MsgPack/TimestampStringConverter.Parse.cs new file mode 100644 index 000000000..c221c9069 --- /dev/null +++ b/src/MsgPack/TimestampStringConverter.Parse.cs @@ -0,0 +1,349 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#endregion -- License Terms -- + +using System; +using System.Globalization; + +namespace MsgPack +{ + partial class TimestampStringConverter + { + // Currently, custom format and normal date time format except 'o' or 'O' 's' are NOT supported. + public static TimestampParseResult TryParseExact( string input, string format, IFormatProvider formatProvider, DateTimeStyles styles, out Timestamp result ) + { + if ( format != "o" && format != "O" && format != "s" ) + { + result = default( Timestamp ); + return TimestampParseResult.UnsupportedFormat; + } + + var numberFormat = NumberFormatInfo.GetInstance( formatProvider ); + + var position = 0; + if ( !ParseWhitespace( input, ref position, ( styles & DateTimeStyles.AllowLeadingWhite ) != 0, /* isTrailing */false ) ) + { + result = default( Timestamp ); + return TimestampParseResult.LeadingWhitespaceNotAllowed; + } + + long year; + if ( !ParseYear( input, ref position, numberFormat, out year ) ) + { + result = default( Timestamp ); + return TimestampParseResult.InvalidYear; + } + + if ( !ParseDelimiter( input, ref position, DateDelimiter ) ) + { + result = default( Timestamp ); + return TimestampParseResult.InvalidYearMonthDeilimiter; + } + + var isLeapYear = Timestamp.IsLeapYearInternal( year ); + + int month; + if ( !ParseDigitRange( input, 2, ref position, 1, 12, out month ) ) + { + result = default( Timestamp ); + return TimestampParseResult.InvalidMonth; + } + + if ( !ParseDelimiter( input, ref position, DateDelimiter ) ) + { + result = default( Timestamp ); + return TimestampParseResult.InvalidMonthDayDelimiter; + } + + int day; + if ( !ParseDay( input, ref position, month, isLeapYear, out day ) ) + { + result = default( Timestamp ); + return TimestampParseResult.InvalidDay; + } + + if ( !ParseDelimiter( input, ref position, DateTimeDelimiter ) ) + { + result = default( Timestamp ); + return TimestampParseResult.InvalidDateTimeDelimiter; + } + + int hour; + if ( !ParseDigitRange( input, 2, ref position, 0, 23, out hour ) ) + { + result = default( Timestamp ); + return TimestampParseResult.InvalidHour; + } + + if ( !ParseDelimiter( input, ref position, TimeDelimiter ) ) + { + result = default( Timestamp ); + return TimestampParseResult.InvalidHourMinuteDelimiter; + } + + int minute; + if ( !ParseDigitRange( input, 2, ref position, 0, 59, out minute ) ) + { + result = default( Timestamp ); + return TimestampParseResult.InvalidMinute; + } + + if ( !ParseDelimiter( input, ref position, TimeDelimiter ) ) + { + result = default( Timestamp ); + return TimestampParseResult.InvalidMinuteSecondDelimiter; + } + + int second; + if ( !ParseDigitRange( input, 2, ref position, 0, 59, out second ) ) + { + result = default( Timestamp ); + return TimestampParseResult.InvalidSecond; + } + + var nanosecond = 0; + if ( format != "s" ) + { + // "o" or "O" + if ( !ParseDelimiter( input, ref position, SubsecondDelimiter ) ) + { + result = default( Timestamp ); + return TimestampParseResult.InvalidSubsecondDelimiter; + } + + if ( !ParseDigitRange( input, 9, ref position, 0, 999999999, out nanosecond ) ) + { + result = default( Timestamp ); + return TimestampParseResult.InvalidNanoSecond; + } + } + + if ( !ParseDelimiter( input, ref position, UtcSign ) ) + { + result = default( Timestamp ); + return TimestampParseResult.MissingUtcSign; + } + + if ( !ParseWhitespace( input, ref position, ( styles & DateTimeStyles.AllowTrailingWhite ) != 0, /* isTrailing */true ) ) + { + result = default( Timestamp ); + return TimestampParseResult.TrailingWhitespaceNotAllowed; + } + + if ( position != input.Length ) + { + result = default( Timestamp ); + return TimestampParseResult.ExtraCharactors; + } + + var components = new Timestamp.Value(); + components.Year = year; + components.Month = month; + components.Day = day; + components.Hour = hour; + components.Minute = minute; + components.Second = second; + components.Nanoseconds = unchecked( ( uint )nanosecond ); + + try + { + result = Timestamp.FromComponents( ref components, isLeapYear ); + } + catch ( OverflowException ) + { + result = default( Timestamp ); + return TimestampParseResult.YearOutOfRange; + } + + return TimestampParseResult.Success; + } + + private static bool ParseWhitespace( string input, ref int position, bool allowWhitespace, bool isTrailing ) + { + if ( input.Length <= position ) + { + return isTrailing; + } + + if ( !allowWhitespace ) + { + return !Char.IsWhiteSpace( input[ position ] ); + } + + while ( position < input.Length && Char.IsWhiteSpace( input[ position ] ) ) + { + position++; + } + + return true; + } + + private static bool ParseDelimiter( string input, ref int position, char delimiter ) + { + if ( input.Length <= position ) + { + return false; + } + + if ( input[ position ] != delimiter ) + { + return false; + } + + position++; + return true; + } + + private static bool ParseSign( string input, ref int position, NumberFormatInfo numberFormat, out int sign ) + { + if ( input.Length <= position ) + { + sign = default( int ); + return false; + } + + if ( IsDigit( input[ position ] ) ) + { + sign = 1; + return true; + } + + if ( StartsWith( input, position, numberFormat.NegativeSign ) ) + { + position += numberFormat.NegativeSign.Length; + sign = -1; + return true; + } + + if ( StartsWith( input, position, numberFormat.PositiveSign ) ) + { + position += numberFormat.NegativeSign.Length; + sign = 1; + return true; + } + + sign = default( int ); + return false; + } + + private static bool StartsWith( string input, int startIndex, string comparison ) + { + for ( var i = 0; i < comparison.Length; i++ ) + { + if ( i + startIndex >= input.Length ) + { + return false; + } + + if ( input[ i + startIndex ] != comparison[ i ] ) + { + return false; + } + } + + return true; + } + + private static bool ParseDigit( string input, int minLength, ref int position, out long digit ) + { + var startPosition = position; + var bits = 0L; + while ( position < input.Length ) + { + var c = input[ position ]; + if ( !IsDigit( c ) ) + { + break; + } + + bits = bits * 10 + ( c - '0' ); + position++; + } + + digit = bits; + return position >= startPosition + minLength; + } + + private static bool IsDigit( char c ) + { + return '0' <= c && c <= '9'; + } + + private static bool ParseDigitRange( string input, int minLength, ref int position, int min, int max, out int result ) + { + long digit; + if ( !ParseDigit( input, minLength, ref position, out digit ) ) + { + result = default( int ); + return false; + } + + if ( digit < min || max < digit ) + { + result = default( int ); + return false; + } + + result = unchecked( ( int )digit ); + return true; + } + + private static bool ParseYear( string input, ref int position, NumberFormatInfo numberFormat, out long year ) + { + int sign; + if ( !ParseSign( input, ref position, numberFormat, out sign ) ) + { + year = default( long ); + return false; + } + + long digit; + if ( !ParseDigit( input, 4, ref position, out digit ) ) + { + year = default( long ); + return false; + } + + // as of ISO 8601, 0001-01-01 -1 day is 0000-12-31. + year = digit * sign; + return true; + } + + private static bool ParseDay( string input, ref int position, int month, bool isLeapYear, out int day ) + { + long digit; + if ( !ParseDigit( input, 2, ref position, out digit ) ) + { + day = default( int ); + return false; + } + + var lastDay = Timestamp.GetLastDay( month, isLeapYear ); + + if ( digit < 1 || lastDay < digit ) + { + day = default( int ); + return false; + } + + day = unchecked( ( int )digit ); + return true; + } + } +} diff --git a/src/MsgPack/TimestampStringConverter.ToString.cs b/src/MsgPack/TimestampStringConverter.ToString.cs new file mode 100644 index 000000000..b21d6ed78 --- /dev/null +++ b/src/MsgPack/TimestampStringConverter.ToString.cs @@ -0,0 +1,82 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#endregion -- License Terms -- + +using System; +using System.Globalization; +using System.Text; + +namespace MsgPack +{ + partial class TimestampStringConverter + { + private const string DefaultFormat = "o"; + + public static string ToString( string format, IFormatProvider formatProvider, ref Timestamp.Value value ) + { + switch ( format ?? DefaultFormat ) + { + case "o": + case "O": + { + // round-trip + return ToIso8601String( formatProvider, /* containsNanoseconds */true, ref value ); + } + case "s": + { + // sortable(ISO-8601) + return ToIso8601String( formatProvider, /* containsNanoseconds */false, ref value ); + } + default: + { + throw new ArgumentException( "The specified format is not supported.", "format" ); + } + } + } + + private static string ToIso8601String( IFormatProvider formatProvider, bool containsNanosecons, ref Timestamp.Value value ) + { + var numberFormat = NumberFormatInfo.GetInstance( formatProvider ); + + // Most cases are yyyy-MM-ddTHH:mm:ss[.fffffffff]Z -- 50 or 60 chars. + var buffer = new StringBuilder( 49 + ( containsNanosecons ? 11 : 1 ) ); + buffer.Append( value.Year.ToString( "0000", formatProvider ) ); + buffer.Append( DateDelimiter ); + buffer.Append( value.Month.ToString( "00", formatProvider ) ); + buffer.Append( DateDelimiter ); + buffer.Append( value.Day.ToString( "00", formatProvider ) ); + buffer.Append( DateTimeDelimiter ); + buffer.Append( value.Hour.ToString( "00", formatProvider ) ); + buffer.Append( TimeDelimiter ); + buffer.Append( value.Minute.ToString( "00", formatProvider ) ); + buffer.Append( TimeDelimiter ); + buffer.Append( value.Second.ToString( "00", formatProvider ) ); + + if ( containsNanosecons ) + { + buffer.Append( SubsecondDelimiter ); + buffer.Append( value.Nanoseconds.ToString( "000000000", formatProvider ) ); + } + + buffer.Append( UtcSign ); + + return buffer.ToString(); + } + } +} diff --git a/src/MsgPack/TimestampStringConverter.cs b/src/MsgPack/TimestampStringConverter.cs new file mode 100644 index 000000000..be5efbe17 --- /dev/null +++ b/src/MsgPack/TimestampStringConverter.cs @@ -0,0 +1,37 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#endregion -- License Terms -- + +using System; +using System.Globalization; + +namespace MsgPack +{ + /// + /// An internal parser and stringifier. + /// + internal static partial class TimestampStringConverter + { + private const char DateDelimiter = '-'; + private const char TimeDelimiter = ':'; + private const char DateTimeDelimiter = 'T'; + private const char SubsecondDelimiter = '.'; + private const char UtcSign = 'Z'; + } +} From 70fd77961e893f340e8196a71edf1c73f8f6c45b Mon Sep 17 00:00:00 2001 From: yfakariya Date: Fri, 18 Aug 2017 23:09:02 +0900 Subject: [PATCH 04/23] Add Timestamp unit tests --- test/MsgPack.UnitTest/Augments.cs | 7 +- .../LegacyJapaneseCultureInfo.cs | 40 + test/MsgPack.UnitTest/MsgPack.UnitTest.csproj | 68 + .../TimestampTest.Calculation.cs | 988 ++++ .../TimestampTest.Calculation.tt | 238 + .../TimestampTest.Common.ttinclude | 150 + .../TimestampTest.Comparison.cs | 743 +++ .../TimestampTest.Comparison.tt | 188 + .../TimestampTest.Conversion.cs | 540 ++ .../TimestampTest.Conversion.tt | 178 + .../TimestampTest.EncodeDecode.cs | 219 + .../TimestampTest.EncodeDecode.tt | 132 + test/MsgPack.UnitTest/TimestampTest.Parse.cs | 4583 +++++++++++++++++ test/MsgPack.UnitTest/TimestampTest.Parse.tt | 625 +++ .../TimestampTest.Properties.cs | 893 ++++ .../TimestampTest.Properties.tt | 164 + .../TimestampTest.ToString.cs | 936 ++++ .../TimestampTest.ToString.tt | 304 ++ test/MsgPack.UnitTest/TimestampTest.cs | 136 + 19 files changed, 11131 insertions(+), 1 deletion(-) create mode 100644 test/MsgPack.UnitTest/LegacyJapaneseCultureInfo.cs create mode 100644 test/MsgPack.UnitTest/TimestampTest.Calculation.cs create mode 100644 test/MsgPack.UnitTest/TimestampTest.Calculation.tt create mode 100644 test/MsgPack.UnitTest/TimestampTest.Common.ttinclude create mode 100644 test/MsgPack.UnitTest/TimestampTest.Comparison.cs create mode 100644 test/MsgPack.UnitTest/TimestampTest.Comparison.tt create mode 100644 test/MsgPack.UnitTest/TimestampTest.Conversion.cs create mode 100644 test/MsgPack.UnitTest/TimestampTest.Conversion.tt create mode 100644 test/MsgPack.UnitTest/TimestampTest.EncodeDecode.cs create mode 100644 test/MsgPack.UnitTest/TimestampTest.EncodeDecode.tt create mode 100644 test/MsgPack.UnitTest/TimestampTest.Parse.cs create mode 100644 test/MsgPack.UnitTest/TimestampTest.Parse.tt create mode 100644 test/MsgPack.UnitTest/TimestampTest.Properties.cs create mode 100644 test/MsgPack.UnitTest/TimestampTest.Properties.tt create mode 100644 test/MsgPack.UnitTest/TimestampTest.ToString.cs create mode 100644 test/MsgPack.UnitTest/TimestampTest.ToString.tt create mode 100644 test/MsgPack.UnitTest/TimestampTest.cs diff --git a/test/MsgPack.UnitTest/Augments.cs b/test/MsgPack.UnitTest/Augments.cs index deb33139f..350e1bd08 100644 --- a/test/MsgPack.UnitTest/Augments.cs +++ b/test/MsgPack.UnitTest/Augments.cs @@ -1,4 +1,4 @@ -#region -- License Terms -- +#region -- License Terms -- // // MessagePack for CLI // @@ -34,5 +34,10 @@ public static T[] ToArray( this ArraySegment source ) return result; } + + public static long ToUnixTimeSeconds( this DateTimeOffset source ) + { + return source.UtcDateTime.Ticks / TimeSpan.TicksPerSecond - 62135596800; + } } } diff --git a/test/MsgPack.UnitTest/LegacyJapaneseCultureInfo.cs b/test/MsgPack.UnitTest/LegacyJapaneseCultureInfo.cs new file mode 100644 index 000000000..63c74bc5c --- /dev/null +++ b/test/MsgPack.UnitTest/LegacyJapaneseCultureInfo.cs @@ -0,0 +1,40 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#endregion -- License Terms -- + +using System; +using System.Globalization; + +namespace MsgPack +{ + /// + /// Custom which uses full width hiphen for negative sign.!-- + /// + internal sealed class LegacyJapaneseCultureInfo : CultureInfo + { + public LegacyJapaneseCultureInfo() + : base( "ja-NP" ) + { + var numberFormatInfo = CultureInfo.InvariantCulture.NumberFormat.Clone() as NumberFormatInfo; + numberFormatInfo.NegativeSign = "\uFF0D"; // Full width hiphen + this.NumberFormat = NumberFormatInfo.ReadOnly( numberFormatInfo ); + } + } +} diff --git a/test/MsgPack.UnitTest/MsgPack.UnitTest.csproj b/test/MsgPack.UnitTest/MsgPack.UnitTest.csproj index 8ea31ca86..03fbdab7b 100644 --- a/test/MsgPack.UnitTest/MsgPack.UnitTest.csproj +++ b/test/MsgPack.UnitTest/MsgPack.UnitTest.csproj @@ -243,6 +243,41 @@ True True + + True + True + TimestampTest.Calculation.tt + + + True + True + TimestampTest.Comparison.tt + + + True + True + TimestampTest.Conversion.tt + + + True + True + TimestampTest.EncodeDecode.tt + + + True + True + TimestampTest.Parse.tt + + + True + True + TimestampTest.Properties.tt + + + True + True + TimestampTest.ToString.tt + True True @@ -413,6 +448,11 @@ PreserveNewest + + True + True + TimestampTest.EncodeDecode.tt + TextTemplatingFileGenerator DirectConversionTest.Scalar.cs @@ -553,6 +593,34 @@ TextTemplatingFileGenerator TestRandom.cs + + TextTemplatingFileGenerator + TimestampTest.EncodeDecode.cs + + + TextTemplatingFileGenerator + TimestampTest.Calculation.cs + + + TextTemplatingFileGenerator + TimestampTest.Comparison.cs + + + TextTemplatingFileGenerator + TimestampTest.Conversion.cs + + + TextTemplatingFileGenerator + TimestampTest.Parse.cs + + + TextTemplatingFileGenerator + TimestampTest.Properties.cs + + + TextTemplatingFileGenerator + TimestampTest.ToString.cs + TextTemplatingFileGenerator UnpackerTest.Ext.cs diff --git a/test/MsgPack.UnitTest/TimestampTest.Calculation.cs b/test/MsgPack.UnitTest/TimestampTest.Calculation.cs new file mode 100644 index 000000000..f7dcbffa4 --- /dev/null +++ b/test/MsgPack.UnitTest/TimestampTest.Calculation.cs @@ -0,0 +1,988 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#endregion -- License Terms -- + +using System; +using System.Globalization; +#if !NET35 +using System.Numerics; +#endif // !NET35 +#if !MSTEST +using NUnit.Framework; +#else +using TestFixtureAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using TestAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +using TimeoutAttribute = NUnit.Framework.TimeoutAttribute; +using Assert = NUnit.Framework.Assert; +using Is = NUnit.Framework.Is; +#endif + +namespace MsgPack +{ + partial class TimestampTest + { + [Test] + public void TestAdd_TimeSpan_Same() + { + var @base = new Timestamp( 1L, 1 ); + var operand = TimeSpan.Zero; + var result = @base.Add( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestAdditionOperator_TimeSpan_Same() + { + var @base = new Timestamp( 1L, 1 ); + var operand = TimeSpan.Zero; + var result = @base + operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestAdd_TimeSpan_1Sec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = TimeSpan.FromSeconds( 1 ); + var result = @base.Add( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 2 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestAdditionOperator_TimeSpan_1Sec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = TimeSpan.FromSeconds( 1 ); + var result = @base + operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 2 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestAdd_TimeSpan_1Tick() + { + var @base = new Timestamp( 1L, 1 ); + var operand = TimeSpan.FromTicks( 1 ); + var result = @base.Add( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 101 ) ); + } + + [Test] + public void TestAdditionOperator_TimeSpan_1Tick() + { + var @base = new Timestamp( 1L, 1 ); + var operand = TimeSpan.FromTicks( 1 ); + var result = @base + operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 101 ) ); + } + + [Test] + public void TestAdd_TimeSpan_Minus1Sec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = TimeSpan.FromSeconds( -1 ); + var result = @base.Add( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestAdditionOperator_TimeSpan_Minus1Sec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = TimeSpan.FromSeconds( -1 ); + var result = @base + operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestAdd_TimeSpan_Minus1Tick() + { + var @base = new Timestamp( 1L, 101 ); + var operand = TimeSpan.FromTicks( -1 ); + var result = @base.Add( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestAdditionOperator_TimeSpan_Minus1Tick() + { + var @base = new Timestamp( 1L, 101 ); + var operand = TimeSpan.FromTicks( -1 ); + var result = @base + operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestAdd_TimeSpan_MoveUp() + { + var @base = new Timestamp( 1L, 999999900 ); + var operand = TimeSpan.FromTicks( 1 ); + var result = @base.Add( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 2 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 0 ) ); + } + + [Test] + public void TestAdditionOperator_TimeSpan_MoveUp() + { + var @base = new Timestamp( 1L, 999999900 ); + var operand = TimeSpan.FromTicks( 1 ); + var result = @base + operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 2 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 0 ) ); + } + + [Test] + public void TestAdd_TimeSpan_MoveDown() + { + var @base = new Timestamp( 1L, 99 ); + var operand = TimeSpan.FromTicks( -1 ); + var result = @base.Add( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 999999999 ) ); + } + + [Test] + public void TestAdditionOperator_TimeSpan_MoveDown() + { + var @base = new Timestamp( 1L, 99 ); + var operand = TimeSpan.FromTicks( -1 ); + var result = @base + operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 999999999 ) ); + } + + [Test] + public void TestAdd_TimeSpan_MaxPlus1Sec_Overflow() + { + var @base = new Timestamp( 9223372036854775807L, 0 ); + var operand = TimeSpan.FromSeconds( 1 ); + Assert.Throws( () => @base.Add( operand ) ); + } + + [Test] + public void TestAdditionOperator_TimeSpan_MaxPlus1Sec_Overflow() + { + var @base = new Timestamp( 9223372036854775807L, 0 ); + var operand = TimeSpan.FromSeconds( 1 ); + Assert.Throws( () => { var x = @base + operand; } ); + } + + [Test] + public void TestAdd_TimeSpan_MinMinus1Sec_Overflow() + { + var @base = new Timestamp( -9223372036854775808L, 999999999 ); + var operand = TimeSpan.FromSeconds( -1 ); + Assert.Throws( () => @base.Add( operand ) ); + } + + [Test] + public void TestAdditionOperator_TimeSpan_MinMinus1Sec_Overflow() + { + var @base = new Timestamp( -9223372036854775808L, 999999999 ); + var operand = TimeSpan.FromSeconds( -1 ); + Assert.Throws( () => { var x = @base + operand; } ); + } + + [Test] + public void TestAdd_TimeSpan_MaxPlus1Tick_Overflow() + { + var @base = new Timestamp( 9223372036854775807L, 999999900 ); + var operand = TimeSpan.FromTicks( 1 ); + Assert.Throws( () => @base.Add( operand ) ); + } + + [Test] + public void TestAdditionOperator_TimeSpan_MaxPlus1Tick_Overflow() + { + var @base = new Timestamp( 9223372036854775807L, 999999900 ); + var operand = TimeSpan.FromTicks( 1 ); + Assert.Throws( () => { var x = @base + operand; } ); + } + + [Test] + public void TestAdd_TimeSpan_MinMinus1ick_Overflow() + { + var @base = new Timestamp( -9223372036854775808L, 99 ); + var operand = TimeSpan.FromTicks( -1 ); + Assert.Throws( () => @base.Add( operand ) ); + } + + [Test] + public void TestAdditionOperator_TimeSpan_MinMinus1ick_Overflow() + { + var @base = new Timestamp( -9223372036854775808L, 99 ); + var operand = TimeSpan.FromTicks( -1 ); + Assert.Throws( () => { var x = @base + operand; } ); + } + + [Test] + public void TestSubtract_TimeSpan_Same() + { + var @base = new Timestamp( 1L, 1 ); + var operand = TimeSpan.Zero; + var result = @base.Subtract( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestSubtractionOperator_TimeSpan_Same() + { + var @base = new Timestamp( 1L, 1 ); + var operand = TimeSpan.Zero; + var result = @base - operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestSubtract_TimeSpan_1Sec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = TimeSpan.FromSeconds( 1 ); + var result = @base.Subtract( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestSubtractionOperator_TimeSpan_1Sec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = TimeSpan.FromSeconds( 1 ); + var result = @base - operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestSubtract_TimeSpan_1Tick() + { + var @base = new Timestamp( 1L, 101 ); + var operand = TimeSpan.FromTicks( 1 ); + var result = @base.Subtract( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestSubtractionOperator_TimeSpan_1Tick() + { + var @base = new Timestamp( 1L, 101 ); + var operand = TimeSpan.FromTicks( 1 ); + var result = @base - operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestSubtract_TimeSpan_Minus1Sec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = TimeSpan.FromSeconds( -1 ); + var result = @base.Subtract( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 2 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestSubtractionOperator_TimeSpan_Minus1Sec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = TimeSpan.FromSeconds( -1 ); + var result = @base - operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 2 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestSubtract_TimeSpan_Minus1Tick() + { + var @base = new Timestamp( 1L, 1 ); + var operand = TimeSpan.FromTicks( -1 ); + var result = @base.Subtract( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 101 ) ); + } + + [Test] + public void TestSubtractionOperator_TimeSpan_Minus1Tick() + { + var @base = new Timestamp( 1L, 1 ); + var operand = TimeSpan.FromTicks( -1 ); + var result = @base - operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 101 ) ); + } + + [Test] + public void TestSubtract_TimeSpan_MoveUp() + { + var @base = new Timestamp( 1L, 999999900 ); + var operand = TimeSpan.FromTicks( -1 ); + var result = @base.Subtract( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 2 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 0 ) ); + } + + [Test] + public void TestSubtractionOperator_TimeSpan_MoveUp() + { + var @base = new Timestamp( 1L, 999999900 ); + var operand = TimeSpan.FromTicks( -1 ); + var result = @base - operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 2 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 0 ) ); + } + + [Test] + public void TestSubtract_TimeSpan_MoveDown() + { + var @base = new Timestamp( 1L, 99 ); + var operand = TimeSpan.FromTicks( 1 ); + var result = @base.Subtract( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 999999999 ) ); + } + + [Test] + public void TestSubtractionOperator_TimeSpan_MoveDown() + { + var @base = new Timestamp( 1L, 99 ); + var operand = TimeSpan.FromTicks( 1 ); + var result = @base - operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 999999999 ) ); + } + + [Test] + public void TestSubtract_TimeSpan_MaxPlus1Sec_Overflow() + { + var @base = new Timestamp( 9223372036854775807L, 0 ); + var operand = TimeSpan.FromSeconds( -1 ); + Assert.Throws( () => @base.Subtract( operand ) ); + } + + [Test] + public void TestSubtractionOperator_TimeSpan_MaxPlus1Sec_Overflow() + { + var @base = new Timestamp( 9223372036854775807L, 0 ); + var operand = TimeSpan.FromSeconds( -1 ); + Assert.Throws( () => { var x = @base - operand; } ); + } + + [Test] + public void TestSubtract_TimeSpan_MinMinus1Sec_Overflow() + { + var @base = new Timestamp( -9223372036854775808L, 999999999 ); + var operand = TimeSpan.FromSeconds( 1 ); + Assert.Throws( () => @base.Subtract( operand ) ); + } + + [Test] + public void TestSubtractionOperator_TimeSpan_MinMinus1Sec_Overflow() + { + var @base = new Timestamp( -9223372036854775808L, 999999999 ); + var operand = TimeSpan.FromSeconds( 1 ); + Assert.Throws( () => { var x = @base - operand; } ); + } + + [Test] + public void TestSubtract_TimeSpan_MaxPlus1Tick_Overflow() + { + var @base = new Timestamp( 9223372036854775807L, 999999900 ); + var operand = TimeSpan.FromTicks( -1 ); + Assert.Throws( () => @base.Subtract( operand ) ); + } + + [Test] + public void TestSubtractionOperator_TimeSpan_MaxPlus1Tick_Overflow() + { + var @base = new Timestamp( 9223372036854775807L, 999999900 ); + var operand = TimeSpan.FromTicks( -1 ); + Assert.Throws( () => { var x = @base - operand; } ); + } + + [Test] + public void TestSubtract_TimeSpan_MinMinus1Tick_Overflow() + { + var @base = new Timestamp( -9223372036854775808L, 99 ); + var operand = TimeSpan.FromTicks( 1 ); + Assert.Throws( () => @base.Subtract( operand ) ); + } + + [Test] + public void TestSubtractionOperator_TimeSpan_MinMinus1Tick_Overflow() + { + var @base = new Timestamp( -9223372036854775808L, 99 ); + var operand = TimeSpan.FromTicks( 1 ); + Assert.Throws( () => { var x = @base - operand; } ); + } + +#if !NET35 + + [Test] + public void TestAdd_BigInteger_Same() + { + var @base = new Timestamp( 1L, 1 ); + var operand = BigInteger.Zero; + var result = @base.Add( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestAdditionOperator_BigInteger_Same() + { + var @base = new Timestamp( 1L, 1 ); + var operand = BigInteger.Zero; + var result = @base + operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestAdd_BigInteger_1Sec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = 1000000000; + var result = @base.Add( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 2 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestAdditionOperator_BigInteger_1Sec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = 1000000000; + var result = @base + operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 2 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestAdd_BigInteger_1Nsec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = 1; + var result = @base.Add( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 2 ) ); + } + + [Test] + public void TestAdditionOperator_BigInteger_1Nsec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = 1; + var result = @base + operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 2 ) ); + } + + [Test] + public void TestAdd_BigInteger_Minus1Sec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = -1000000000; + var result = @base.Add( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestAdditionOperator_BigInteger_Minus1Sec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = -1000000000; + var result = @base + operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestAdd_BigInteger_Minus1Nsec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = -1; + var result = @base.Add( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 0 ) ); + } + + [Test] + public void TestAdditionOperator_BigInteger_Minus1Nsec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = -1; + var result = @base + operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 0 ) ); + } + + [Test] + public void TestAdd_BigInteger_MoveUp() + { + var @base = new Timestamp( 1L, 999999999 ); + var operand = 2; + var result = @base.Add( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 2 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestAdditionOperator_BigInteger_MoveUp() + { + var @base = new Timestamp( 1L, 999999999 ); + var operand = 2; + var result = @base + operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 2 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestAdd_BigInteger_MoveDown() + { + var @base = new Timestamp( 1L, 0 ); + var operand = -2; + var result = @base.Add( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 999999998 ) ); + } + + [Test] + public void TestAdditionOperator_BigInteger_MoveDown() + { + var @base = new Timestamp( 1L, 0 ); + var operand = -2; + var result = @base + operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 999999998 ) ); + } + + [Test] + public void TestAdd_BigInteger_MaxPlus1Sec_Overflow() + { + var @base = new Timestamp( 9223372036854775807L, 0 ); + var operand = 1000000000; + Assert.Throws( () => @base.Add( operand ) ); + } + + [Test] + public void TestAdditionOperator_BigInteger_MaxPlus1Sec_Overflow() + { + var @base = new Timestamp( 9223372036854775807L, 0 ); + var operand = 1000000000; + Assert.Throws( () => { var x = @base + operand; } ); + } + + [Test] + public void TestAdd_BigInteger_MinMinus1Sec_Overflow() + { + var @base = new Timestamp( -9223372036854775808L, 999999999 ); + var operand = -1000000000; + Assert.Throws( () => @base.Add( operand ) ); + } + + [Test] + public void TestAdditionOperator_BigInteger_MinMinus1Sec_Overflow() + { + var @base = new Timestamp( -9223372036854775808L, 999999999 ); + var operand = -1000000000; + Assert.Throws( () => { var x = @base + operand; } ); + } + + [Test] + public void TestAdd_BigInteger_MaxPlus1Nsec_Overflow() + { + var @base = new Timestamp( 9223372036854775807L, 999999999 ); + var operand = 1; + Assert.Throws( () => @base.Add( operand ) ); + } + + [Test] + public void TestAdditionOperator_BigInteger_MaxPlus1Nsec_Overflow() + { + var @base = new Timestamp( 9223372036854775807L, 999999999 ); + var operand = 1; + Assert.Throws( () => { var x = @base + operand; } ); + } + + [Test] + public void TestAdd_BigInteger_MinMinus1Nsec_Overflow() + { + var @base = new Timestamp( -9223372036854775808L, 0 ); + var operand = -1; + Assert.Throws( () => @base.Add( operand ) ); + } + + [Test] + public void TestAdditionOperator_BigInteger_MinMinus1Nsec_Overflow() + { + var @base = new Timestamp( -9223372036854775808L, 0 ); + var operand = -1; + Assert.Throws( () => { var x = @base + operand; } ); + } + + [Test] + public void TestSubtract_BigInteger_Same() + { + var @base = new Timestamp( 1L, 1 ); + var operand = BigInteger.Zero; + var result = @base.Subtract( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestSubtractionOperator_BigInteger_Same() + { + var @base = new Timestamp( 1L, 1 ); + var operand = BigInteger.Zero; + var result = @base - operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestSubtract_BigInteger_1Sec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = 1000000000; + var result = @base.Subtract( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestSubtractionOperator_BigInteger_1Sec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = 1000000000; + var result = @base - operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestSubtract_BigInteger_1Nsec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = 1; + var result = @base.Subtract( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 0 ) ); + } + + [Test] + public void TestSubtractionOperator_BigInteger_1Nsec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = 1; + var result = @base - operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 0 ) ); + } + + [Test] + public void TestSubtract_BigInteger_Minus1Sec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = -1000000000; + var result = @base.Subtract( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 2 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestSubtractionOperator_BigInteger_Minus1Sec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = -1000000000; + var result = @base - operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 2 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestSubtract_BigInteger_Minus1Nsec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = -1; + var result = @base.Subtract( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 2 ) ); + } + + [Test] + public void TestSubtractionOperator_BigInteger_Minus1Nsec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = -1; + var result = @base - operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 2 ) ); + } + + [Test] + public void TestSubtract_BigInteger_MoveUp() + { + var @base = new Timestamp( 1L, 999999999 ); + var operand = -2; + var result = @base.Subtract( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 2 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestSubtractionOperator_BigInteger_MoveUp() + { + var @base = new Timestamp( 1L, 999999999 ); + var operand = -2; + var result = @base - operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 2 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + } + + [Test] + public void TestSubtract_BigInteger_MoveDown() + { + var @base = new Timestamp( 1L, 0 ); + var operand = 2; + var result = @base.Subtract( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 999999998 ) ); + } + + [Test] + public void TestSubtractionOperator_BigInteger_MoveDown() + { + var @base = new Timestamp( 1L, 0 ); + var operand = 2; + var result = @base - operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 999999998 ) ); + } + + [Test] + public void TestSubtract_BigInteger_MaxPlus1Sec_Overflow() + { + var @base = new Timestamp( 9223372036854775807L, 0 ); + var operand = -1000000000; + Assert.Throws( () => @base.Subtract( operand ) ); + } + + [Test] + public void TestSubtractionOperator_BigInteger_MaxPlus1Sec_Overflow() + { + var @base = new Timestamp( 9223372036854775807L, 0 ); + var operand = -1000000000; + Assert.Throws( () => { var x = @base - operand; } ); + } + + [Test] + public void TestSubtract_BigInteger_MinMinus1Sec_Overflow() + { + var @base = new Timestamp( -9223372036854775808L, 999999999 ); + var operand = 1000000000; + Assert.Throws( () => @base.Subtract( operand ) ); + } + + [Test] + public void TestSubtractionOperator_BigInteger_MinMinus1Sec_Overflow() + { + var @base = new Timestamp( -9223372036854775808L, 999999999 ); + var operand = 1000000000; + Assert.Throws( () => { var x = @base - operand; } ); + } + + [Test] + public void TestSubtract_BigInteger_MaxPlus1Nsec_Overflow() + { + var @base = new Timestamp( 9223372036854775807L, 999999999 ); + var operand = -1; + Assert.Throws( () => @base.Subtract( operand ) ); + } + + [Test] + public void TestSubtractionOperator_BigInteger_MaxPlus1Nsec_Overflow() + { + var @base = new Timestamp( 9223372036854775807L, 999999999 ); + var operand = -1; + Assert.Throws( () => { var x = @base - operand; } ); + } + + [Test] + public void TestSubtract_BigInteger_MinMinus1Nsec_Overflow() + { + var @base = new Timestamp( -9223372036854775808L, 0 ); + var operand = 1; + Assert.Throws( () => @base.Subtract( operand ) ); + } + + [Test] + public void TestSubtractionOperator_BigInteger_MinMinus1Nsec_Overflow() + { + var @base = new Timestamp( -9223372036854775808L, 0 ); + var operand = 1; + Assert.Throws( () => { var x = @base - operand; } ); + } + + [Test] + public void TestSubtract_Timestamp_Same() + { + var @base = new Timestamp( 1L, 1 ); + var operand = new Timestamp( 1L, 1 ); + var result = @base.Subtract( operand ); + Assert.That( result, Is.EqualTo( new BigInteger( 0 ) ) ); + } + + [Test] + public void TestSubtractionOperator_Timstamp_Same() + { + var @base = new Timestamp( 1, 1 ); + var operand = new Timestamp( 1, 1 ); + var result = @base - operand; + Assert.That( result, Is.EqualTo( new BigInteger( 0 ) ) ); + } + + [Test] + public void TestSubtract_Timestamp_1Sec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = new Timestamp( 1L, 0 ); + var result = @base.Subtract( operand ); + Assert.That( result, Is.EqualTo( new BigInteger( 1 ) ) ); + } + + [Test] + public void TestSubtractionOperator_Timstamp_1Sec() + { + var @base = new Timestamp( 1, 1 ); + var operand = new Timestamp( 1, 0 ); + var result = @base - operand; + Assert.That( result, Is.EqualTo( new BigInteger( 1 ) ) ); + } + + [Test] + public void TestSubtract_Timestamp_1Nsec() + { + var @base = new Timestamp( 1L, 1 ); + var operand = new Timestamp( 0L, 1 ); + var result = @base.Subtract( operand ); + Assert.That( result, Is.EqualTo( new BigInteger( 1000000000 ) ) ); + } + + [Test] + public void TestSubtractionOperator_Timstamp_1Nsec() + { + var @base = new Timestamp( 1, 1 ); + var operand = new Timestamp( 0, 1 ); + var result = @base - operand; + Assert.That( result, Is.EqualTo( new BigInteger( 1000000000 ) ) ); + } + + [Test] + public void TestSubtract_Timestamp_MoveDown() + { + var @base = new Timestamp( 2L, 1 ); + var operand = new Timestamp( 1L, 2 ); + var result = @base.Subtract( operand ); + Assert.That( result, Is.EqualTo( new BigInteger( 999999999 ) ) ); + } + + [Test] + public void TestSubtractionOperator_Timstamp_MoveDown() + { + var @base = new Timestamp( 2, 1 ); + var operand = new Timestamp( 1, 2 ); + var result = @base - operand; + Assert.That( result, Is.EqualTo( new BigInteger( 999999999 ) ) ); + } + + [Test] + public void TestSubtract_Timestamp_PositiveNegative() + { + var @base = new Timestamp( 1L, 2 ); + var operand = new Timestamp( -1L, 1 ); + var result = @base.Subtract( operand ); + Assert.That( result, Is.EqualTo( new BigInteger( 2000000001 ) ) ); + } + + [Test] + public void TestSubtractionOperator_Timstamp_PositiveNegative() + { + var @base = new Timestamp( 1, 2 ); + var operand = new Timestamp( -1, 1 ); + var result = @base - operand; + Assert.That( result, Is.EqualTo( new BigInteger( 2000000001 ) ) ); + } + + [Test] + public void TestSubtract_Timestamp_MaxMin() + { + var @base = new Timestamp( 9223372036854775807L, 999999999 ); + var operand = new Timestamp( -9223372036854775808L, 0 ); + var result = @base.Subtract( operand ); + Assert.That( result, Is.EqualTo( new BigInteger( Int64.MaxValue ) * 1000000000 + 999999999 - new BigInteger( Int64.MinValue ) * 1000000000 ) ); + } + + [Test] + public void TestSubtractionOperator_Timstamp_MaxMin() + { + var @base = new Timestamp( 9223372036854775807, 999999999 ); + var operand = new Timestamp( -9223372036854775808, 0 ); + var result = @base - operand; + Assert.That( result, Is.EqualTo( new BigInteger( Int64.MaxValue ) * 1000000000 + 999999999 - new BigInteger( Int64.MinValue ) * 1000000000 ) ); + } + + [Test] + public void TestSubtract_Timestamp_MinMax() + { + var @base = new Timestamp( -9223372036854775808L, 0 ); + var operand = new Timestamp( 9223372036854775807L, 999999999 ); + var result = @base.Subtract( operand ); + Assert.That( result, Is.EqualTo( new BigInteger( Int64.MinValue ) * 1000000000 - new BigInteger( Int64.MaxValue ) * 1000000000 - 999999999 ) ); + } + + [Test] + public void TestSubtractionOperator_Timstamp_MinMax() + { + var @base = new Timestamp( -9223372036854775808, 0 ); + var operand = new Timestamp( 9223372036854775807, 999999999 ); + var result = @base - operand; + Assert.That( result, Is.EqualTo( new BigInteger( Int64.MinValue ) * 1000000000 - new BigInteger( Int64.MaxValue ) * 1000000000 - 999999999 ) ); + } + + +#endif // !NET35 + } +} diff --git a/test/MsgPack.UnitTest/TimestampTest.Calculation.tt b/test/MsgPack.UnitTest/TimestampTest.Calculation.tt new file mode 100644 index 000000000..46a604cb8 --- /dev/null +++ b/test/MsgPack.UnitTest/TimestampTest.Calculation.tt @@ -0,0 +1,238 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ output extension=".cs" #> +<#@ assembly Name="System.Core" #> +<#@ include file="TimestampTest.Common.ttinclude" #> +<#@ import namespace="System" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.Globalization" #> +<#@ import namespace="System.Linq" #> +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#endregion -- License Terms -- + +using System; +using System.Globalization; +#if !NET35 +using System.Numerics; +#endif // !NET35 +#if !MSTEST +using NUnit.Framework; +#else +using TestFixtureAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using TestAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +using TimeoutAttribute = NUnit.Framework.TimeoutAttribute; +using Assert = NUnit.Framework.Assert; +using Is = NUnit.Framework.Is; +#endif + +namespace MsgPack +{ + partial class TimestampTest + { +<# +// Timestamp + TimeSpan -> Timestamp +WriteAddTests( "TimeSpan", "Same", 1, 1, "TimeSpan.Zero", 1, 1 ); +WriteAddTests( "TimeSpan", "1Sec", 1, 1, "TimeSpan.FromSeconds( 1 )", 2, 1 ); +WriteAddTests( "TimeSpan", "1Tick", 1, 1, "TimeSpan.FromTicks( 1 )", 1, 101 ); +WriteAddTests( "TimeSpan", "Minus1Sec", 1, 1, "TimeSpan.FromSeconds( -1 )", 0, 1 ); +WriteAddTests( "TimeSpan", "Minus1Tick", 1, 101, "TimeSpan.FromTicks( -1 )", 1, 1 ); +WriteAddTests( "TimeSpan", "MoveUp", 1, 999999900, "TimeSpan.FromTicks( 1 )", 2, 0 ); +WriteAddTests( "TimeSpan", "MoveDown", 1, 000000099, "TimeSpan.FromTicks( -1 )", 0, 999999999 ); +WriteAddTestsOverflow( "TimeSpan", "MaxPlus1Sec", Int64.MaxValue, 0, "TimeSpan.FromSeconds( 1 )" ); +WriteAddTestsOverflow( "TimeSpan", "MinMinus1Sec", Int64.MinValue, 999999999, "TimeSpan.FromSeconds( -1 )" ); +WriteAddTestsOverflow( "TimeSpan", "MaxPlus1Tick", Int64.MaxValue, 999999900, "TimeSpan.FromTicks( 1 )" ); +WriteAddTestsOverflow( "TimeSpan", "MinMinus1ick", Int64.MinValue, 000000099, "TimeSpan.FromTicks( -1 )" ); + +// Timestamp - TimeSpan -> Timestamp +WriteSubtractTests( "TimeSpan", "Same", 1, 1, "TimeSpan.Zero", 1, 1 ); +WriteSubtractTests( "TimeSpan", "1Sec", 1, 1, "TimeSpan.FromSeconds( 1 )", 0, 1 ); +WriteSubtractTests( "TimeSpan", "1Tick", 1, 101, "TimeSpan.FromTicks( 1 )", 1, 1 ); +WriteSubtractTests( "TimeSpan", "Minus1Sec", 1, 1, "TimeSpan.FromSeconds( -1 )", 2, 1 ); +WriteSubtractTests( "TimeSpan", "Minus1Tick", 1, 1, "TimeSpan.FromTicks( -1 )", 1, 101 ); +WriteSubtractTests( "TimeSpan", "MoveUp", 1, 999999900, "TimeSpan.FromTicks( -1 )", 2, 0 ); +WriteSubtractTests( "TimeSpan", "MoveDown", 1, 000000099, "TimeSpan.FromTicks( 1 )", 0, 999999999 ); +WriteSubtractTestsOverflow( "TimeSpan", "MaxPlus1Sec", Int64.MaxValue, 0, "TimeSpan.FromSeconds( -1 )" ); +WriteSubtractTestsOverflow( "TimeSpan", "MinMinus1Sec", Int64.MinValue, 999999999, "TimeSpan.FromSeconds( 1 )" ); +WriteSubtractTestsOverflow( "TimeSpan", "MaxPlus1Tick", Int64.MaxValue, 999999900, "TimeSpan.FromTicks( -1 )" ); +WriteSubtractTestsOverflow( "TimeSpan", "MinMinus1Tick", Int64.MinValue, 000000099, "TimeSpan.FromTicks( 1 )" ); +#> +#if !NET35 + +<# +// Timestamp + BigInteger -> Timestamp +WriteAddTests( "BigInteger", "Same", 1, 1, "BigInteger.Zero", 1, 1 ); +WriteAddTests( "BigInteger", "1Sec", 1, 1, "1000000000", 2, 1 ); +WriteAddTests( "BigInteger", "1Nsec", 1, 1, "1", 1, 2 ); +WriteAddTests( "BigInteger", "Minus1Sec", 1, 1, "-1000000000", 0, 1 ); +WriteAddTests( "BigInteger", "Minus1Nsec", 1, 1, "-1", 1, 0 ); +WriteAddTests( "BigInteger", "MoveUp", 1, 999999999, "2", 2, 1 ); +WriteAddTests( "BigInteger", "MoveDown", 1, 000000000, "-2", 0, 999999998 ); +WriteAddTestsOverflow( "BigInteger", "MaxPlus1Sec", Int64.MaxValue, 0, "1000000000" ); +WriteAddTestsOverflow( "BigInteger", "MinMinus1Sec", Int64.MinValue, 999999999, "-1000000000" ); +WriteAddTestsOverflow( "BigInteger", "MaxPlus1Nsec", Int64.MaxValue, 999999999, "1" ); +WriteAddTestsOverflow( "BigInteger", "MinMinus1Nsec", Int64.MinValue, 000000000, "-1" ); + +// Timestamp - BigInteger -> Timestamp +WriteSubtractTests( "BigInteger", "Same", 1, 1, "BigInteger.Zero", 1, 1 ); +WriteSubtractTests( "BigInteger", "1Sec", 1, 1, "1000000000", 0, 1 ); +WriteSubtractTests( "BigInteger", "1Nsec", 1, 1, "1", 1, 0 ); +WriteSubtractTests( "BigInteger", "Minus1Sec", 1, 1, "-1000000000", 2, 1 ); +WriteSubtractTests( "BigInteger", "Minus1Nsec", 1, 1, "-1", 1, 2 ); +WriteSubtractTests( "BigInteger", "MoveUp", 1, 999999999, "-2", 2, 1 ); +WriteSubtractTests( "BigInteger", "MoveDown", 1, 000000000, "2", 0, 999999998 ); +WriteSubtractTestsOverflow( "BigInteger", "MaxPlus1Sec", Int64.MaxValue, 0, "-1000000000" ); +WriteSubtractTestsOverflow( "BigInteger", "MinMinus1Sec", Int64.MinValue, 999999999, "1000000000" ); +WriteSubtractTestsOverflow( "BigInteger", "MaxPlus1Nsec", Int64.MaxValue, 999999999, "-1" ); +WriteSubtractTestsOverflow( "BigInteger", "MinMinus1Nsec", Int64.MinValue, 000000000, "1" ); + +// Timestamp - Timestamp -> BigInteger +WriteDifferentiateTests( "Same", 1, 1, 1, 1, "new BigInteger( 0 )" ); +WriteDifferentiateTests( "1Sec", 1, 1, 1, 0, "new BigInteger( 1 )" ); +WriteDifferentiateTests( "1Nsec", 1, 1, 0, 1, "new BigInteger( 1000000000 )" ); +WriteDifferentiateTests( "MoveDown", 2, 1, 1, 2, "new BigInteger( 999999999 )" ); +WriteDifferentiateTests( "PositiveNegative", 1, 2, -1, 1, "new BigInteger( 2000000001 )" ); +WriteDifferentiateTests( "MaxMin", Int64.MaxValue, 999999999, Int64.MinValue, 0, "new BigInteger( Int64.MaxValue ) * 1000000000 + 999999999 - new BigInteger( Int64.MinValue ) * 1000000000" ); +WriteDifferentiateTests( "MinMax", Int64.MinValue, 0, Int64.MaxValue, 999999999, "new BigInteger( Int64.MinValue ) * 1000000000 - new BigInteger( Int64.MaxValue ) * 1000000000 - 999999999" ); +#> + +#endif // !NET35 + } +} +<#+ +private void WriteAddTests( string type, string label, long baseSeconds, int baseNanoseconds, string operand, long resultSeconds, int resultNanoseconds ) +{ +#> + [Test] + public void TestAdd_<#= type #>_<#= label #>() + { + var @base = new Timestamp( <#= baseSeconds #>L, <#= baseNanoseconds #> ); + var operand = <#= operand #>; + var result = @base.Add( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( <#= resultSeconds #> ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( <#= resultNanoseconds #> ) ); + } + + [Test] + public void TestAdditionOperator_<#= type #>_<#= label #>() + { + var @base = new Timestamp( <#= baseSeconds #>L, <#= baseNanoseconds #> ); + var operand = <#= operand #>; + var result = @base + operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( <#= resultSeconds #> ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( <#= resultNanoseconds #> ) ); + } + +<#+ +} // WriteAddTests + +private void WriteAddTestsOverflow( string type, string label, long baseSeconds, int baseNanoseconds, string operand ) +{ +#> + [Test] + public void TestAdd_<#= type #>_<#= label #>_Overflow() + { + var @base = new Timestamp( <#= baseSeconds #>L, <#= baseNanoseconds #> ); + var operand = <#= operand #>; + Assert.Throws( () => @base.Add( operand ) ); + } + + [Test] + public void TestAdditionOperator_<#= type #>_<#= label #>_Overflow() + { + var @base = new Timestamp( <#= baseSeconds #>L, <#= baseNanoseconds #> ); + var operand = <#= operand #>; + Assert.Throws( () => { var x = @base + operand; } ); + } + +<#+ +} // WriteAddTestsOverflow + +private void WriteSubtractTests( string type, string label, long baseSeconds, int baseNanoseconds, string operand, long resultSeconds, int resultNanoseconds ) +{ +#> + [Test] + public void TestSubtract_<#= type #>_<#= label #>() + { + var @base = new Timestamp( <#= baseSeconds #>L, <#= baseNanoseconds #> ); + var operand = <#= operand #>; + var result = @base.Subtract( operand ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( <#= resultSeconds #> ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( <#= resultNanoseconds #> ) ); + } + + [Test] + public void TestSubtractionOperator_<#= type #>_<#= label #>() + { + var @base = new Timestamp( <#= baseSeconds #>L, <#= baseNanoseconds #> ); + var operand = <#= operand #>; + var result = @base - operand; + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( <#= resultSeconds #> ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( <#= resultNanoseconds #> ) ); + } + +<#+ +} // WriteSubtractTests + +private void WriteSubtractTestsOverflow( string type, string label, long baseSeconds, int baseNanoseconds, string operand ) +{ +#> + [Test] + public void TestSubtract_<#= type #>_<#= label #>_Overflow() + { + var @base = new Timestamp( <#= baseSeconds #>L, <#= baseNanoseconds #> ); + var operand = <#= operand #>; + Assert.Throws( () => @base.Subtract( operand ) ); + } + + [Test] + public void TestSubtractionOperator_<#= type #>_<#= label #>_Overflow() + { + var @base = new Timestamp( <#= baseSeconds #>L, <#= baseNanoseconds #> ); + var operand = <#= operand #>; + Assert.Throws( () => { var x = @base - operand; } ); + } + +<#+ +} // WriteSubtractTestsOverflow + +private void WriteDifferentiateTests( string label, long baseSeconds, int baseNanoseconds, long operandSeconds, int operandNanoseconds, string result ) +{ +#> + [Test] + public void TestSubtract_Timestamp_<#= label #>() + { + var @base = new Timestamp( <#= baseSeconds #>L, <#= baseNanoseconds #> ); + var operand = new Timestamp( <#= operandSeconds #>L, <#= operandNanoseconds #> ); + var result = @base.Subtract( operand ); + Assert.That( result, Is.EqualTo( <#= result #> ) ); + } + + [Test] + public void TestSubtractionOperator_Timstamp_<#= label #>() + { + var @base = new Timestamp( <#= baseSeconds #>, <#= baseNanoseconds #> ); + var operand = new Timestamp( <#= operandSeconds #>, <#= operandNanoseconds #> ); + var result = @base - operand; + Assert.That( result, Is.EqualTo( <#= result #> ) ); + } + +<#+ +} // WriteDifferentiateTests +#> diff --git a/test/MsgPack.UnitTest/TimestampTest.Common.ttinclude b/test/MsgPack.UnitTest/TimestampTest.Common.ttinclude new file mode 100644 index 000000000..bdf80aed8 --- /dev/null +++ b/test/MsgPack.UnitTest/TimestampTest.Common.ttinclude @@ -0,0 +1,150 @@ +<#+ +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +private static readonly DateTimeOffset MinDateTime = DateTimeOffset.MinValue; +private static readonly DateTimeOffset MaxDateTime = DateTimeOffset.MaxValue; +private static readonly DateTimeOffset DistinguishsableDateTime = new DateTimeOffset( 1234, 5, 6, 7, 8, 9, TimeSpan.Zero ); +private static readonly DateTimeOffset UnixEpoch = new DateTimeOffset( 1970, 1, 1, 0, 0, 0, TimeSpan.Zero ); +private static readonly long UnixEpochInSeconds = UnixEpoch.ToUnixTimeSeconds(); +private static readonly int DayOffsetOfUnixEpoch = TimeSpan.FromSeconds( new DateTime( 1970, 1, 1, 0, 0, 0, DateTimeKind.Utc ).Ticks / 10000000 ).Days; +// 2932897 +// 719162 + +private static readonly Dictionary StandardTestCases = + new [] + { + new TestCase { Label = "Zero", Seconds = 0, Nanoseconds = 0, Year = 1970, Month = 1, Day = 1, Hour = 0, Minute = 0, Second = 0, DayOfYear = 1, IsLeapYear = false, DayOfWeek = DayOfWeek.Thursday }, + new TestCase { Label = "Minus1Sec", Seconds = -1, Nanoseconds = 0, Year = 1969, Month = 12, Day = 31, Hour = 23, Minute = 59, Second = 59, DayOfYear = 365, IsLeapYear = false, DayOfWeek = DayOfWeek.Wednesday }, + new TestCase { Label = "Plus1Sec", Seconds = 1, Nanoseconds = 0, Year = 1970, Month = 1, Day = 1, Hour = 0, Minute = 0, Second = 1, DayOfYear = 1, IsLeapYear = false, DayOfWeek = DayOfWeek.Thursday }, + new TestCase { Label = "Minus1Nsec", Seconds = -1, Nanoseconds = 999999999, Year = 1969, Month = 12, Day = 31, Hour = 23, Minute = 59, Second = 59, DayOfYear = 365, IsLeapYear = false, DayOfWeek = DayOfWeek.Wednesday }, + new TestCase { Label = "Plus1Nsec", Seconds = 0, Nanoseconds = 1, Year = 1970, Month = 1, Day = 1, Hour = 0, Minute = 0, Second = 0, DayOfYear = 1, IsLeapYear = false, DayOfWeek = DayOfWeek.Thursday }, + new TestCase { Label = "DateTimeMin", Seconds = MinDateTime.ToUnixTimeSeconds(), Nanoseconds = 0, Year = 1, Month = 1, Day = 1, Hour = 0, Minute = 0, Second = 0, DayOfYear = 1, IsLeapYear = false, DayOfWeek = DayOfWeek.Monday }, + new TestCase { Label = "DateTimeMax", Seconds = MaxDateTime.ToUnixTimeSeconds(), Nanoseconds = 0, Year = 9999, Month = 12, Day = 31, Hour = 23, Minute = 59, Second = 59, DayOfYear = 365, IsLeapYear = false, DayOfWeek = DayOfWeek.Friday }, + // Note: this case is used in many location! + new TestCase { Label = "DateTimeMinMinus1Day", Seconds = MinDateTime.ToUnixTimeSeconds() - 86400, Nanoseconds = 0, Year = 0, Month = 12, Day = 31, Hour = 0, Minute = 0, Second = 0, DayOfYear = 366, IsLeapYear = true, DayOfWeek = DayOfWeek.Sunday }, + new TestCase { Label = "DateTimeMaxPlus1Day", Seconds = MaxDateTime.ToUnixTimeSeconds() + 86400, Nanoseconds = 0, Year = 10000, Month = 1, Day = 1, Hour = 23, Minute = 59, Second = 59, DayOfYear = 1, IsLeapYear = true, DayOfWeek = DayOfWeek.Saturday }, + new TestCase { Label = "DateTimeMinMinus1Sec", Seconds = MinDateTime.ToUnixTimeSeconds() - 1, Nanoseconds = 0, Year = 0, Month = 12, Day = 31, Hour = 23, Minute = 59, Second = 59, DayOfYear = 366, IsLeapYear = true, DayOfWeek = DayOfWeek.Sunday }, + new TestCase { Label = "DateTimeMaxPlus1Sec", Seconds = MaxDateTime.ToUnixTimeSeconds() + 1, Nanoseconds = 0, Year = 10000, Month = 1, Day = 1, Hour = 0, Minute = 0, Second = 0, DayOfYear = 1, IsLeapYear = true, DayOfWeek = DayOfWeek.Saturday }, + new TestCase { Label = "DateTimeMinMinus1Nsec", Seconds = MinDateTime.ToUnixTimeSeconds() - 1, Nanoseconds = 999999999, Year = 0, Month = 12, Day = 31, Hour = 23, Minute = 59, Second = 59, DayOfYear = 366, IsLeapYear = true, DayOfWeek = DayOfWeek.Sunday }, + new TestCase { Label = "DateTimeMaxPlus1Nsec", Seconds = MaxDateTime.ToUnixTimeSeconds(), Nanoseconds = 1, Year = 9999, Month = 12, Day = 31, Hour = 23, Minute = 59, Second = 59, DayOfYear = 365, IsLeapYear = false, DayOfWeek = DayOfWeek.Friday }, + new TestCase { Label = "TimestampMin", Seconds = Int64.MinValue, Nanoseconds = 0, Year = -584554047284, Month = 2, Day = 23, Hour = 16, Minute = 59, Second = 44, DayOfYear = 54, IsLeapYear = true, DayOfWeek = ( DayOfWeek )( int )Math.Abs( ( ( Int64.MinValue + UnixEpochInSeconds ) / 86400 + ( int )UnixEpoch.DayOfWeek ) % 7 ) }, + new TestCase { Label = "TimestampMax", Seconds = Int64.MaxValue, Nanoseconds = 999999999, Year = 584554051223, Month = 11, Day = 9, Hour = 7, Minute = 0, Second = 16, DayOfYear = 313, IsLeapYear = false, DayOfWeek = ( DayOfWeek )( int )Math.Abs( ( ( Int64.MaxValue + UnixEpochInSeconds ) / 86400 + ( int )UnixEpoch.DayOfWeek ) % 7 ) }, + new TestCase { Label = "Distinguishable", Seconds = DistinguishsableDateTime.ToUnixTimeSeconds(), Nanoseconds = 123456789, Year = 1234, Month = 5, Day = 6, Hour = 7, Minute = 8, Second = 9, DayOfYear = 126, IsLeapYear = false, DayOfWeek = DayOfWeek.Saturday }, + }.Concat( + new [] + { + // All data will be x-03-01 to test DayOfYear of leap year + new { Year = 0, DaysFromEpoch = -306 - DayOffsetOfUnixEpoch, IsLeapYear = true }, + new { Year = 1, DaysFromEpoch = 59 - DayOffsetOfUnixEpoch, IsLeapYear = false }, + new { Year = 4, DaysFromEpoch = 365 * 3 + 60 - DayOffsetOfUnixEpoch, IsLeapYear = true }, + new { Year = 100, DaysFromEpoch = 365 * 75 + 366 * 24 + 59 - DayOffsetOfUnixEpoch, IsLeapYear = false }, + new { Year = 400, DaysFromEpoch = 365 * 303 + 366 * 96 + 60 - DayOffsetOfUnixEpoch, IsLeapYear = true }, + new { Year = 10000, DaysFromEpoch = 3652059 + 60 - DayOffsetOfUnixEpoch, IsLeapYear = true }, + new { Year = 10001, DaysFromEpoch = 3652059 + 366 + 59 - DayOffsetOfUnixEpoch, IsLeapYear = false }, + new { Year = 10100, DaysFromEpoch = 3652059 + 365 * 75 + 366 * 25 + 59 - DayOffsetOfUnixEpoch, IsLeapYear = false }, + new { Year = 10400, DaysFromEpoch = 3652059 + 365 * 303 + 366 * 97 + 60 - DayOffsetOfUnixEpoch, IsLeapYear = true }, + new { Year = -1, DaysFromEpoch = -672 - DayOffsetOfUnixEpoch, IsLeapYear = false }, + new { Year = -3, DaysFromEpoch = -1402 - DayOffsetOfUnixEpoch, IsLeapYear = false }, + new { Year = -4, DaysFromEpoch = -1767 - DayOffsetOfUnixEpoch, IsLeapYear = true }, + new { Year = -99, DaysFromEpoch = -36466 - DayOffsetOfUnixEpoch, IsLeapYear = false }, + new { Year = -100, DaysFromEpoch = -36831 - DayOffsetOfUnixEpoch, IsLeapYear = false }, + new { Year = -399, DaysFromEpoch = -146038 - DayOffsetOfUnixEpoch, IsLeapYear = false }, + new { Year = -400, DaysFromEpoch = -146403 - DayOffsetOfUnixEpoch, IsLeapYear = true }, + }.Select( x => + new TestCase + { + Label = "Year" + x.Year.ToString().Replace( "-", "Minus" ), + Seconds = x.DaysFromEpoch * 86400L, + Nanoseconds = 0, + Year = x.Year, + Month = 3, + Day = 1, + Hour = 0, + Minute = 0, + Second = 0, + DayOfYear = x.IsLeapYear ? 61 : 60, + IsLeapYear = x.IsLeapYear, + DayOfWeek = ( DayOfWeek )Math.Abs( ( ( x.DaysFromEpoch % 7 ) + 7 + ( int )UnixEpoch.DayOfWeek ) % 7 ) + } + ) + ).Select( x => x.SetupStrings() ) + .ToDictionary( x => x.Label ); + +private static readonly Dictionary ParseToStringTestCases = + new [] + { + new TestCase { Label = "Zero", Seconds = -62167219200L, Year = 0, Month = 1, Day = 1, Hour = 0, Minute = 0, Second = 0, Nanoseconds = 0 }, + new TestCase { Label = "FullDigits", Seconds = -30585822590L, Year = 1000, Month = 10, Day = 10, Hour = 10, Minute = 10, Second = 10, Nanoseconds = 123456789 }, + new TestCase { Label = "YearMinus1", Seconds = -62167219200L - 31536000L, Year = -1, Month = 1, Day = 1, Hour = 0, Minute = 0, Second = 0, Nanoseconds = 0 }, + new TestCase { Label = "YearMinus1000", Seconds = -62167219200L - 31556908800L, Year = -1000, Month = 1, Day = 1, Hour = 0, Minute = 0, Second = 0, Nanoseconds = 0 }, + new TestCase { Label = "Year10000", Seconds = 253402300800 + 24487810, Year = 10000, Month = 10, Day = 10, Hour = 10, Minute = 10, Second = 10, Nanoseconds = 123456789 }, + new TestCase { Label = "YearMinus10000", Seconds = -62167219200L - 315569088000L + 24055810, Year = -10000, Month = 10, Day = 10, Hour = 10, Minute = 10, Second = 10, Nanoseconds = 123456789 }, + }.Select( x => x.SetupStrings() ) + .Concat( + new [] + { + StandardTestCases[ "TimestampMin" ], + StandardTestCases[ "TimestampMax" ] + } + ).ToDictionary( x => x.Label ); + +private sealed class TestCase +{ + public string Label { get; set; } + public long Seconds { get; set; } + public int Nanoseconds { get; set; } + public string SortableString { get; set; } + public string RoundTripString { get; set; } + + public long Year { get; set; } + public int Month { get; set; } + public int Day { get; set; } + public int Hour { get; set; } + public int Minute { get; set; } + public int Second { get; set; } + public int DayOfYear { get; set; } + public DayOfWeek DayOfWeek { get; set; } + + public bool IsLeapYear { get; set; } + + public TestCase() { } + + public TestCase SetupStrings() + { + this.SortableString = $"{this.Year:0000}-{this.Month:00}-{this.Day:00}T{this.Hour:00}:{this.Minute:00}:{this.Second:00}Z"; + this.RoundTripString = $"{this.Year:0000}-{this.Month:00}-{this.Day:00}T{this.Hour:00}:{this.Minute:00}:{this.Second:00}.{this.Nanoseconds:000000000}Z"; + return this; + } +} + +private static string ToFullWidthNegativeSign( string value ) +{ + if ( value.Length < 2 ) + { + return value; + } + + if ( value[ 0 ] != '-' ) + { + return value; + } + + return '\uFF0D' + value.Substring( 1 ); +} +#> diff --git a/test/MsgPack.UnitTest/TimestampTest.Comparison.cs b/test/MsgPack.UnitTest/TimestampTest.Comparison.cs new file mode 100644 index 000000000..059e33950 --- /dev/null +++ b/test/MsgPack.UnitTest/TimestampTest.Comparison.cs @@ -0,0 +1,743 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#endregion -- License Terms -- + +using System; +using System.Globalization; +#if !MSTEST +using NUnit.Framework; +#else +using TestFixtureAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using TestAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +using TimeoutAttribute = NUnit.Framework.TimeoutAttribute; +using Assert = NUnit.Framework.Assert; +using Is = NUnit.Framework.Is; +#endif + +namespace MsgPack +{ + partial class TimestampTest + { + [Test] + public void TestIEquatableEquals_Identical_True() + { + Assert.That( + new Timestamp( 1, 1 ).Equals( new Timestamp( 1, 1 ) ), + Is.True + ); + } + + [Test] + public void TestEquals_Identical_True() + { + Assert.That( + new Timestamp( 1, 1 ).Equals( ( object )new Timestamp( 1, 1 ) ), + Is.True + ); + } + + [Test] + public void TestCompareTo_Identical_0() + { + Assert.That( + new Timestamp( 1, 1 ).CompareTo( new Timestamp( 1, 1 ) ), + Is.EqualTo( 0 ) + ); + } + + [Test] + public void TestIComparableCompareTo_Identical_0() + { + Assert.That( + ( ( IComparable )new Timestamp( 1, 1 ) ).CompareTo( new Timestamp( 1, 1 ) ), + Is.EqualTo( 0 ) + ); + } + + [Test] + public void TestCompare_Identical_0() + { + Assert.That( + Timestamp.Compare( new Timestamp( 1, 1 ), new Timestamp( 1, 1 ) ), + Is.EqualTo( 0 ) + ); + } + + [Test] + public void TestEqualityOperator_Identical_True() + { + Assert.That( + new Timestamp( 1, 1 ) == new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestInequalityOperator_Identical_False() + { + Assert.That( + new Timestamp( 1, 1 ) != new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestGreaterThanOperator_Identical_False() + { + Assert.That( + new Timestamp( 1, 1 ) > new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestGreaterThanOrEqualOperator_Identical_True() + { + Assert.That( + new Timestamp( 1, 1 ) >= new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestLessThanOperator_Identical_False() + { + Assert.That( + new Timestamp( 1, 1 ) < new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestLessThanOrEqualOperator_Identical_True() + { + Assert.That( + new Timestamp( 1, 1 ) <= new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestIEquatableEquals_LargeBySecond_False() + { + Assert.That( + new Timestamp( 2, 1 ).Equals( new Timestamp( 1, 1 ) ), + Is.False + ); + } + + [Test] + public void TestEquals_LargeBySecond_False() + { + Assert.That( + new Timestamp( 2, 1 ).Equals( ( object )new Timestamp( 1, 1 ) ), + Is.False + ); + } + + [Test] + public void TestCompareTo_LargeBySecond_1() + { + Assert.That( + new Timestamp( 2, 1 ).CompareTo( new Timestamp( 1, 1 ) ), + Is.EqualTo( 1 ) + ); + } + + [Test] + public void TestIComparableCompareTo_LargeBySecond_1() + { + Assert.That( + ( ( IComparable )new Timestamp( 2, 1 ) ).CompareTo( new Timestamp( 1, 1 ) ), + Is.EqualTo( 1 ) + ); + } + + [Test] + public void TestCompare_LargeBySecond_1() + { + Assert.That( + Timestamp.Compare( new Timestamp( 2, 1 ), new Timestamp( 1, 1 ) ), + Is.EqualTo( 1 ) + ); + } + + [Test] + public void TestEqualityOperator_LargeBySecond_False() + { + Assert.That( + new Timestamp( 2, 1 ) == new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestInequalityOperator_LargeBySecond_True() + { + Assert.That( + new Timestamp( 2, 1 ) != new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestGreaterThanOperator_LargeBySecond_True() + { + Assert.That( + new Timestamp( 2, 1 ) > new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestGreaterThanOrEqualOperator_LargeBySecond_True() + { + Assert.That( + new Timestamp( 2, 1 ) >= new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestLessThanOperator_LargeBySecond_False() + { + Assert.That( + new Timestamp( 2, 1 ) < new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestLessThanOrEqualOperator_LargeBySecond_False() + { + Assert.That( + new Timestamp( 2, 1 ) <= new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestIEquatableEquals_LargeByNanosecond_False() + { + Assert.That( + new Timestamp( 1, 2 ).Equals( new Timestamp( 1, 1 ) ), + Is.False + ); + } + + [Test] + public void TestEquals_LargeByNanosecond_False() + { + Assert.That( + new Timestamp( 1, 2 ).Equals( ( object )new Timestamp( 1, 1 ) ), + Is.False + ); + } + + [Test] + public void TestCompareTo_LargeByNanosecond_1() + { + Assert.That( + new Timestamp( 1, 2 ).CompareTo( new Timestamp( 1, 1 ) ), + Is.EqualTo( 1 ) + ); + } + + [Test] + public void TestIComparableCompareTo_LargeByNanosecond_1() + { + Assert.That( + ( ( IComparable )new Timestamp( 1, 2 ) ).CompareTo( new Timestamp( 1, 1 ) ), + Is.EqualTo( 1 ) + ); + } + + [Test] + public void TestCompare_LargeByNanosecond_1() + { + Assert.That( + Timestamp.Compare( new Timestamp( 1, 2 ), new Timestamp( 1, 1 ) ), + Is.EqualTo( 1 ) + ); + } + + [Test] + public void TestEqualityOperator_LargeByNanosecond_False() + { + Assert.That( + new Timestamp( 1, 2 ) == new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestInequalityOperator_LargeByNanosecond_True() + { + Assert.That( + new Timestamp( 1, 2 ) != new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestGreaterThanOperator_LargeByNanosecond_True() + { + Assert.That( + new Timestamp( 1, 2 ) > new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestGreaterThanOrEqualOperator_LargeByNanosecond_True() + { + Assert.That( + new Timestamp( 1, 2 ) >= new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestLessThanOperator_LargeByNanosecond_False() + { + Assert.That( + new Timestamp( 1, 2 ) < new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestLessThanOrEqualOperator_LargeByNanosecond_False() + { + Assert.That( + new Timestamp( 1, 2 ) <= new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestIEquatableEquals_LargeBySecondEvenIfNanosecondIsSmall_False() + { + Assert.That( + new Timestamp( 2, 0 ).Equals( new Timestamp( 1, 1 ) ), + Is.False + ); + } + + [Test] + public void TestEquals_LargeBySecondEvenIfNanosecondIsSmall_False() + { + Assert.That( + new Timestamp( 2, 0 ).Equals( ( object )new Timestamp( 1, 1 ) ), + Is.False + ); + } + + [Test] + public void TestCompareTo_LargeBySecondEvenIfNanosecondIsSmall_1() + { + Assert.That( + new Timestamp( 2, 0 ).CompareTo( new Timestamp( 1, 1 ) ), + Is.EqualTo( 1 ) + ); + } + + [Test] + public void TestIComparableCompareTo_LargeBySecondEvenIfNanosecondIsSmall_1() + { + Assert.That( + ( ( IComparable )new Timestamp( 2, 0 ) ).CompareTo( new Timestamp( 1, 1 ) ), + Is.EqualTo( 1 ) + ); + } + + [Test] + public void TestCompare_LargeBySecondEvenIfNanosecondIsSmall_1() + { + Assert.That( + Timestamp.Compare( new Timestamp( 2, 0 ), new Timestamp( 1, 1 ) ), + Is.EqualTo( 1 ) + ); + } + + [Test] + public void TestEqualityOperator_LargeBySecondEvenIfNanosecondIsSmall_False() + { + Assert.That( + new Timestamp( 2, 0 ) == new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestInequalityOperator_LargeBySecondEvenIfNanosecondIsSmall_True() + { + Assert.That( + new Timestamp( 2, 0 ) != new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestGreaterThanOperator_LargeBySecondEvenIfNanosecondIsSmall_True() + { + Assert.That( + new Timestamp( 2, 0 ) > new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestGreaterThanOrEqualOperator_LargeBySecondEvenIfNanosecondIsSmall_True() + { + Assert.That( + new Timestamp( 2, 0 ) >= new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestLessThanOperator_LargeBySecondEvenIfNanosecondIsSmall_False() + { + Assert.That( + new Timestamp( 2, 0 ) < new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestLessThanOrEqualOperator_LargeBySecondEvenIfNanosecondIsSmall_False() + { + Assert.That( + new Timestamp( 2, 0 ) <= new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestIEquatableEquals_SmallBySecond_False() + { + Assert.That( + new Timestamp( 0, 1 ).Equals( new Timestamp( 1, 1 ) ), + Is.False + ); + } + + [Test] + public void TestEquals_SmallBySecond_False() + { + Assert.That( + new Timestamp( 0, 1 ).Equals( ( object )new Timestamp( 1, 1 ) ), + Is.False + ); + } + + [Test] + public void TestCompareTo_SmallBySecond_Minus1() + { + Assert.That( + new Timestamp( 0, 1 ).CompareTo( new Timestamp( 1, 1 ) ), + Is.EqualTo( -1 ) + ); + } + + [Test] + public void TestIComparableCompareTo_SmallBySecond_Minus1() + { + Assert.That( + ( ( IComparable )new Timestamp( 0, 1 ) ).CompareTo( new Timestamp( 1, 1 ) ), + Is.EqualTo( -1 ) + ); + } + + [Test] + public void TestCompare_SmallBySecond_Minus1() + { + Assert.That( + Timestamp.Compare( new Timestamp( 0, 1 ), new Timestamp( 1, 1 ) ), + Is.EqualTo( -1 ) + ); + } + + [Test] + public void TestEqualityOperator_SmallBySecond_False() + { + Assert.That( + new Timestamp( 0, 1 ) == new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestInequalityOperator_SmallBySecond_True() + { + Assert.That( + new Timestamp( 0, 1 ) != new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestGreaterThanOperator_SmallBySecond_False() + { + Assert.That( + new Timestamp( 0, 1 ) > new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestGreaterThanOrEqualOperator_SmallBySecond_False() + { + Assert.That( + new Timestamp( 0, 1 ) >= new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestLessThanOperator_SmallBySecond_True() + { + Assert.That( + new Timestamp( 0, 1 ) < new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestLessThanOrEqualOperator_SmallBySecond_True() + { + Assert.That( + new Timestamp( 0, 1 ) <= new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestIEquatableEquals_SmallByNanosecond_False() + { + Assert.That( + new Timestamp( 1, 0 ).Equals( new Timestamp( 1, 1 ) ), + Is.False + ); + } + + [Test] + public void TestEquals_SmallByNanosecond_False() + { + Assert.That( + new Timestamp( 1, 0 ).Equals( ( object )new Timestamp( 1, 1 ) ), + Is.False + ); + } + + [Test] + public void TestCompareTo_SmallByNanosecond_Minus1() + { + Assert.That( + new Timestamp( 1, 0 ).CompareTo( new Timestamp( 1, 1 ) ), + Is.EqualTo( -1 ) + ); + } + + [Test] + public void TestIComparableCompareTo_SmallByNanosecond_Minus1() + { + Assert.That( + ( ( IComparable )new Timestamp( 1, 0 ) ).CompareTo( new Timestamp( 1, 1 ) ), + Is.EqualTo( -1 ) + ); + } + + [Test] + public void TestCompare_SmallByNanosecond_Minus1() + { + Assert.That( + Timestamp.Compare( new Timestamp( 1, 0 ), new Timestamp( 1, 1 ) ), + Is.EqualTo( -1 ) + ); + } + + [Test] + public void TestEqualityOperator_SmallByNanosecond_False() + { + Assert.That( + new Timestamp( 1, 0 ) == new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestInequalityOperator_SmallByNanosecond_True() + { + Assert.That( + new Timestamp( 1, 0 ) != new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestGreaterThanOperator_SmallByNanosecond_False() + { + Assert.That( + new Timestamp( 1, 0 ) > new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestGreaterThanOrEqualOperator_SmallByNanosecond_False() + { + Assert.That( + new Timestamp( 1, 0 ) >= new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestLessThanOperator_SmallByNanosecond_True() + { + Assert.That( + new Timestamp( 1, 0 ) < new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestLessThanOrEqualOperator_SmallByNanosecond_True() + { + Assert.That( + new Timestamp( 1, 0 ) <= new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestIEquatableEquals_SmallBySecondEvenIfNanosecondIsLarge_False() + { + Assert.That( + new Timestamp( 0, 2 ).Equals( new Timestamp( 1, 1 ) ), + Is.False + ); + } + + [Test] + public void TestEquals_SmallBySecondEvenIfNanosecondIsLarge_False() + { + Assert.That( + new Timestamp( 0, 2 ).Equals( ( object )new Timestamp( 1, 1 ) ), + Is.False + ); + } + + [Test] + public void TestCompareTo_SmallBySecondEvenIfNanosecondIsLarge_Minus1() + { + Assert.That( + new Timestamp( 0, 2 ).CompareTo( new Timestamp( 1, 1 ) ), + Is.EqualTo( -1 ) + ); + } + + [Test] + public void TestIComparableCompareTo_SmallBySecondEvenIfNanosecondIsLarge_Minus1() + { + Assert.That( + ( ( IComparable )new Timestamp( 0, 2 ) ).CompareTo( new Timestamp( 1, 1 ) ), + Is.EqualTo( -1 ) + ); + } + + [Test] + public void TestCompare_SmallBySecondEvenIfNanosecondIsLarge_Minus1() + { + Assert.That( + Timestamp.Compare( new Timestamp( 0, 2 ), new Timestamp( 1, 1 ) ), + Is.EqualTo( -1 ) + ); + } + + [Test] + public void TestEqualityOperator_SmallBySecondEvenIfNanosecondIsLarge_False() + { + Assert.That( + new Timestamp( 0, 2 ) == new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestInequalityOperator_SmallBySecondEvenIfNanosecondIsLarge_True() + { + Assert.That( + new Timestamp( 0, 2 ) != new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestGreaterThanOperator_SmallBySecondEvenIfNanosecondIsLarge_False() + { + Assert.That( + new Timestamp( 0, 2 ) > new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestGreaterThanOrEqualOperator_SmallBySecondEvenIfNanosecondIsLarge_False() + { + Assert.That( + new Timestamp( 0, 2 ) >= new Timestamp( 1, 1 ), + Is.False + ); + } + + [Test] + public void TestLessThanOperator_SmallBySecondEvenIfNanosecondIsLarge_True() + { + Assert.That( + new Timestamp( 0, 2 ) < new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestLessThanOrEqualOperator_SmallBySecondEvenIfNanosecondIsLarge_True() + { + Assert.That( + new Timestamp( 0, 2 ) <= new Timestamp( 1, 1 ), + Is.True + ); + } + + [Test] + public void TestEquals_null_False() + { + Assert.That( new Timestamp( 1, 1 ).Equals( null ), Is.False ); + } + + [Test] + public void TestIComparableCompareTo_null_AlwaysLarge() + { + Assert.That( ( ( IComparable )Timestamp.MinValue ).CompareTo( null ), Is.EqualTo( 1 ) ); + } + } +} diff --git a/test/MsgPack.UnitTest/TimestampTest.Comparison.tt b/test/MsgPack.UnitTest/TimestampTest.Comparison.tt new file mode 100644 index 000000000..2ea49d4a4 --- /dev/null +++ b/test/MsgPack.UnitTest/TimestampTest.Comparison.tt @@ -0,0 +1,188 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ output extension=".cs" #> +<#@ assembly Name="System.Core" #> +<#@ include file="TimestampTest.Common.ttinclude" #> +<#@ import namespace="System" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.Globalization" #> +<#@ import namespace="System.Linq" #> +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#endregion -- License Terms -- + +using System; +using System.Globalization; +#if !MSTEST +using NUnit.Framework; +#else +using TestFixtureAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using TestAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +using TimeoutAttribute = NUnit.Framework.TimeoutAttribute; +using Assert = NUnit.Framework.Assert; +using Is = NUnit.Framework.Is; +#endif + +namespace MsgPack +{ + partial class TimestampTest + { +<# +foreach ( var @case in + new [] + { + new { Label = "Identical", Result = ComparisonResult.Equal, Seconds = 1, Nanoseconds = 1 }, + new { Label = "LargeBySecond", Result = ComparisonResult.Large, Seconds = 2, Nanoseconds = 1 }, + new { Label = "LargeByNanosecond", Result = ComparisonResult.Large, Seconds = 1, Nanoseconds = 2 }, + new { Label = "LargeBySecondEvenIfNanosecondIsSmall", Result = ComparisonResult.Large, Seconds = 2, Nanoseconds = 0 }, + new { Label = "SmallBySecond", Result = ComparisonResult.Small, Seconds = 0, Nanoseconds = 1 }, + new { Label = "SmallByNanosecond", Result = ComparisonResult.Small, Seconds = 1, Nanoseconds = 0 }, + new { Label = "SmallBySecondEvenIfNanosecondIsLarge", Result = ComparisonResult.Small, Seconds = 0, Nanoseconds = 2 }, + } +) +{ +#> + [Test] + public void TestIEquatableEquals_<#= @case.Label #>_<#= @case.Result == ComparisonResult.Equal #>() + { + Assert.That( + new Timestamp( <#= @case.Seconds #>, <#= @case.Nanoseconds #> ).Equals( new Timestamp( 1, 1 ) ), + Is.<#= @case.Result == ComparisonResult.Equal #> + ); + } + + [Test] + public void TestEquals_<#= @case.Label #>_<#= @case.Result == ComparisonResult.Equal #>() + { + Assert.That( + new Timestamp( <#= @case.Seconds #>, <#= @case.Nanoseconds #> ).Equals( ( object )new Timestamp( 1, 1 ) ), + Is.<#= @case.Result == ComparisonResult.Equal #> + ); + } + + [Test] + public void TestCompareTo_<#= @case.Label #>_<#= EncodeResult( @case.Result ) #>() + { + Assert.That( + new Timestamp( <#= @case.Seconds #>, <#= @case.Nanoseconds #> ).CompareTo( new Timestamp( 1, 1 ) ), + Is.EqualTo( <#= @case.Result.ToString( "D", CultureInfo.InvariantCulture ) #> ) + ); + } + + [Test] + public void TestIComparableCompareTo_<#= @case.Label #>_<#= EncodeResult( @case.Result ) #>() + { + Assert.That( + ( ( IComparable )new Timestamp( <#= @case.Seconds #>, <#= @case.Nanoseconds #> ) ).CompareTo( new Timestamp( 1, 1 ) ), + Is.EqualTo( <#= @case.Result.ToString( "D", CultureInfo.InvariantCulture ) #> ) + ); + } + + [Test] + public void TestCompare_<#= @case.Label #>_<#= EncodeResult( @case.Result ) #>() + { + Assert.That( + Timestamp.Compare( new Timestamp( <#= @case.Seconds #>, <#= @case.Nanoseconds #> ), new Timestamp( 1, 1 ) ), + Is.EqualTo( <#= @case.Result.ToString( "D", CultureInfo.InvariantCulture ) #> ) + ); + } + + [Test] + public void TestEqualityOperator_<#= @case.Label #>_<#= @case.Result == ComparisonResult.Equal #>() + { + Assert.That( + new Timestamp( <#= @case.Seconds #>, <#= @case.Nanoseconds #> ) == new Timestamp( 1, 1 ), + Is.<#= @case.Result == ComparisonResult.Equal #> + ); + } + + [Test] + public void TestInequalityOperator_<#= @case.Label #>_<#= @case.Result != ComparisonResult.Equal #>() + { + Assert.That( + new Timestamp( <#= @case.Seconds #>, <#= @case.Nanoseconds #> ) != new Timestamp( 1, 1 ), + Is.<#= @case.Result != ComparisonResult.Equal #> + ); + } + + [Test] + public void TestGreaterThanOperator_<#= @case.Label #>_<#= @case.Result == ComparisonResult.Large #>() + { + Assert.That( + new Timestamp( <#= @case.Seconds #>, <#= @case.Nanoseconds #> ) > new Timestamp( 1, 1 ), + Is.<#= @case.Result == ComparisonResult.Large #> + ); + } + + [Test] + public void TestGreaterThanOrEqualOperator_<#= @case.Label #>_<#= @case.Result != ComparisonResult.Small #>() + { + Assert.That( + new Timestamp( <#= @case.Seconds #>, <#= @case.Nanoseconds #> ) >= new Timestamp( 1, 1 ), + Is.<#= @case.Result != ComparisonResult.Small #> + ); + } + + [Test] + public void TestLessThanOperator_<#= @case.Label #>_<#= @case.Result == ComparisonResult.Small #>() + { + Assert.That( + new Timestamp( <#= @case.Seconds #>, <#= @case.Nanoseconds #> ) < new Timestamp( 1, 1 ), + Is.<#= @case.Result == ComparisonResult.Small #> + ); + } + + [Test] + public void TestLessThanOrEqualOperator_<#= @case.Label #>_<#= @case.Result != ComparisonResult.Large #>() + { + Assert.That( + new Timestamp( <#= @case.Seconds #>, <#= @case.Nanoseconds #> ) <= new Timestamp( 1, 1 ), + Is.<#= @case.Result != ComparisonResult.Large #> + ); + } + +<# +} +#> + [Test] + public void TestEquals_null_False() + { + Assert.That( new Timestamp( 1, 1 ).Equals( null ), Is.False ); + } + + [Test] + public void TestIComparableCompareTo_null_AlwaysLarge() + { + Assert.That( ( ( IComparable )Timestamp.MinValue ).CompareTo( null ), Is.EqualTo( 1 ) ); + } + } +} +<#+ +private static string EncodeResult( ComparisonResult result ) +{ + return ( ( int )result ).ToString( CultureInfo.InvariantCulture ).Replace( "-", "Minus" ); +} + +private enum ComparisonResult +{ + Equal = 0, + Large = 1, + Small = -1 +} +#> diff --git a/test/MsgPack.UnitTest/TimestampTest.Conversion.cs b/test/MsgPack.UnitTest/TimestampTest.Conversion.cs new file mode 100644 index 000000000..37eb4c0a9 --- /dev/null +++ b/test/MsgPack.UnitTest/TimestampTest.Conversion.cs @@ -0,0 +1,540 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#endregion -- License Terms -- + +using System; +#if !MSTEST +using NUnit.Framework; +#else +using TestFixtureAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using TestAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +using TimeoutAttribute = NUnit.Framework.TimeoutAttribute; +using Assert = NUnit.Framework.Assert; +using Is = NUnit.Framework.Is; +#endif + +namespace MsgPack +{ + partial class TimestampTest + { + [Test] + public void TestFromDateTime_UtcNow_OK() + { + var source = DateTime.UtcNow; + var target = Timestamp.FromDateTime( source ); + var expected = source; + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + } + + [Test] + public void TestImplicitDateTime_UtcNow_OK() + { + var source = DateTime.UtcNow; + var target = ( Timestamp )source; + var expected = source; + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + } + + [Test] + public void TestFromDateTime_MinValue_OK() + { + var source = DateTime.MinValue; + var target = Timestamp.FromDateTime( source ); + var expected = source; + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + } + + [Test] + public void TestImplicitDateTime_MinValue_OK() + { + var source = DateTime.MinValue; + var target = ( Timestamp )source; + var expected = source; + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + } + + [Test] + public void TestFromDateTime_MaxValue_OK() + { + var source = DateTime.MaxValue; + var target = Timestamp.FromDateTime( source ); + var expected = source; + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + } + + [Test] + public void TestImplicitDateTime_MaxValue_OK() + { + var source = DateTime.MaxValue; + var target = ( Timestamp )source; + var expected = source; + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + } + + [Test] + public void TestToDateTime_UtcNow_OK() + { + var source = Timestamp.UtcNow; + var target = source.ToDateTime(); + var expected = source; + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + AssertUtc( target ); + } + + [Test] + public void TestExplicitDateTime_UtcNow_OK() + { + var source = Timestamp.UtcNow; + var target = ( DateTime )source; + var expected = source; + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + AssertUtc( target ); + } + + [Test] + public void TestFromDateTime_Now_AsUtc() + { + var source = DateTime.Now; + var target = Timestamp.FromDateTime( source ); + var expected = source.ToUniversalTime(); + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + } + + [Test] + public void TestImplicitDateTime_Now_AsUtc() + { + var source = DateTime.Now; + var target = ( Timestamp )source; + var expected = source.ToUniversalTime(); + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + } + + [Test] + public void TestToDateTime_OverflowSeconds() + { + var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1L, checked( ( int )( DateTimeOffset.MaxValue.Ticks % 10000000 * 100 ) ) ); + Assert.Throws( () => source.ToDateTime() ); + } + + [Test] + public void TestToDateTime_OverflowNanoseconds() + { + var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1, 0 ); + Assert.Throws( () => source.ToDateTime() ); + } + + [Test] + public void TestExplicitDateTime_OverflowSeconds() + { + var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1L, checked( ( int )( DateTimeOffset.MaxValue.Ticks % 10000000 * 100 ) ) ); + Assert.Throws( () => { var x = ( DateTime )source; } ); + } + + [Test] + public void TestExplicitDateTime_OverflowNanoseconds() + { + var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1, 0 ); + Assert.Throws( () => { var x = ( DateTime )source; } ); + } + + [Test] + public void TestToDateTime_UnderflowSeconds() + { + var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() - 1L, checked( ( int )( DateTimeOffset.MinValue.Ticks % 10000000 * 100 ) ) ); + Assert.Throws( () => source.ToDateTime() ); + } + + [Test] + public void TestToDateTime_UnderflowNanoseconds() + { + var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() -1L, 999999999 ); + Assert.Throws( () => source.ToDateTime() ); + } + + [Test] + public void TestExplicitDateTime_UnderflowSeconds() + { + var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() - 1L, checked( ( int )( DateTimeOffset.MinValue.Ticks % 10000000 * 100 ) ) ); + Assert.Throws( () => { var x = ( DateTime )source; } ); + } + + [Test] + public void TestExplicitDateTime_UnderflowNanoseconds() + { + var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() - 1, 999999999 ); + Assert.Throws( () => { var x = ( DateTime )source; } ); + } + + private static void AssertSubseconds( DateTime target, Timestamp expected ) + { + var ticks = target.Ticks % 10000; + Assert.That( ticks / 10, Is.EqualTo( expected.Microsecond ), "Microsecond" ); + Assert.That( ticks % 10, Is.EqualTo( expected.Nanosecond / 100 ), "Nanosecond" ); + } + + private static void AssertSubseconds( Timestamp target, DateTime expected ) + { + var ticks = expected.Ticks % 10000; + Assert.That( target.Microsecond, Is.EqualTo( ticks / 10 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( ( ticks % 10 ) * 100 ), "Nanosecond" ); + } + [Test] + public void TestFromDateTimeOffset_UtcNow_OK() + { + var source = DateTimeOffset.UtcNow; + var target = Timestamp.FromDateTimeOffset( source ); + var expected = source; + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + } + + [Test] + public void TestImplicitDateTimeOffset_UtcNow_OK() + { + var source = DateTimeOffset.UtcNow; + var target = ( Timestamp )source; + var expected = source; + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + } + + [Test] + public void TestFromDateTimeOffset_MinValue_OK() + { + var source = DateTimeOffset.MinValue; + var target = Timestamp.FromDateTimeOffset( source ); + var expected = source; + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + } + + [Test] + public void TestImplicitDateTimeOffset_MinValue_OK() + { + var source = DateTimeOffset.MinValue; + var target = ( Timestamp )source; + var expected = source; + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + } + + [Test] + public void TestFromDateTimeOffset_MaxValue_OK() + { + var source = DateTimeOffset.MaxValue; + var target = Timestamp.FromDateTimeOffset( source ); + var expected = source; + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + } + + [Test] + public void TestImplicitDateTimeOffset_MaxValue_OK() + { + var source = DateTimeOffset.MaxValue; + var target = ( Timestamp )source; + var expected = source; + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + } + + [Test] + public void TestToDateTimeOffset_UtcNow_OK() + { + var source = Timestamp.UtcNow; + var target = source.ToDateTimeOffset(); + var expected = source; + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + AssertUtc( target ); + } + + [Test] + public void TestExplicitDateTimeOffset_UtcNow_OK() + { + var source = Timestamp.UtcNow; + var target = ( DateTimeOffset )source; + var expected = source; + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + AssertUtc( target ); + } + + [Test] + public void TestFromDateTimeOffset_Now_AsUtc() + { + var source = DateTimeOffset.Now; + var target = Timestamp.FromDateTimeOffset( source ); + var expected = source.ToUniversalTime(); + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + } + + [Test] + public void TestImplicitDateTimeOffset_Now_AsUtc() + { + var source = DateTimeOffset.Now; + var target = ( Timestamp )source; + var expected = source.ToUniversalTime(); + Assert.That( target.Year, Is.EqualTo( expected.Year ), "Year" ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "Month" ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "Day" ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "DayOfWeek" ); + Assert.That( target.Hour, Is.EqualTo( expected.Hour ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( expected.Minute ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( expected.Second ), "Second" ); + Assert.That( target.Millisecond, Is.EqualTo( expected.Millisecond ), "Millisecond" ); + AssertSubseconds( target, expected ); + } + + [Test] + public void TestToDateTimeOffset_OverflowSeconds() + { + var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1L, checked( ( int )( DateTimeOffset.MaxValue.Ticks % 10000000 * 100 ) ) ); + Assert.Throws( () => source.ToDateTimeOffset() ); + } + + [Test] + public void TestToDateTimeOffset_OverflowNanoseconds() + { + var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1, 0 ); + Assert.Throws( () => source.ToDateTimeOffset() ); + } + + [Test] + public void TestExplicitDateTimeOffset_OverflowSeconds() + { + var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1L, checked( ( int )( DateTimeOffset.MaxValue.Ticks % 10000000 * 100 ) ) ); + Assert.Throws( () => { var x = ( DateTimeOffset )source; } ); + } + + [Test] + public void TestExplicitDateTimeOffset_OverflowNanoseconds() + { + var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1, 0 ); + Assert.Throws( () => { var x = ( DateTimeOffset )source; } ); + } + + [Test] + public void TestToDateTimeOffset_UnderflowSeconds() + { + var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() - 1L, checked( ( int )( DateTimeOffset.MinValue.Ticks % 10000000 * 100 ) ) ); + Assert.Throws( () => source.ToDateTimeOffset() ); + } + + [Test] + public void TestToDateTimeOffset_UnderflowNanoseconds() + { + var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() -1L, 999999999 ); + Assert.Throws( () => source.ToDateTimeOffset() ); + } + + [Test] + public void TestExplicitDateTimeOffset_UnderflowSeconds() + { + var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() - 1L, checked( ( int )( DateTimeOffset.MinValue.Ticks % 10000000 * 100 ) ) ); + Assert.Throws( () => { var x = ( DateTimeOffset )source; } ); + } + + [Test] + public void TestExplicitDateTimeOffset_UnderflowNanoseconds() + { + var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() - 1, 999999999 ); + Assert.Throws( () => { var x = ( DateTimeOffset )source; } ); + } + + private static void AssertSubseconds( DateTimeOffset target, Timestamp expected ) + { + var ticks = target.Ticks % 10000; + Assert.That( ticks / 10, Is.EqualTo( expected.Microsecond ), "Microsecond" ); + Assert.That( ticks % 10, Is.EqualTo( expected.Nanosecond / 100 ), "Nanosecond" ); + } + + private static void AssertSubseconds( Timestamp target, DateTimeOffset expected ) + { + var ticks = expected.Ticks % 10000; + Assert.That( target.Microsecond, Is.EqualTo( ticks / 10 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( ( ticks % 10 ) * 100 ), "Nanosecond" ); + } + } +} diff --git a/test/MsgPack.UnitTest/TimestampTest.Conversion.tt b/test/MsgPack.UnitTest/TimestampTest.Conversion.tt new file mode 100644 index 000000000..6890394a5 --- /dev/null +++ b/test/MsgPack.UnitTest/TimestampTest.Conversion.tt @@ -0,0 +1,178 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ output extension=".cs" #> +<#@ assembly Name="System.Core" #> +<#@ include file="TimestampTest.Common.ttinclude" #> +<#@ import namespace="System" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.Globalization" #> +<#@ import namespace="System.Linq" #> +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#endregion -- License Terms -- + +using System; +#if !MSTEST +using NUnit.Framework; +#else +using TestFixtureAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using TestAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +using TimeoutAttribute = NUnit.Framework.TimeoutAttribute; +using Assert = NUnit.Framework.Assert; +using Is = NUnit.Framework.Is; +#endif + +namespace MsgPack +{ + partial class TimestampTest + { +<# +foreach ( var type in new [] { "DateTime", "DateTimeOffset" } ) +{ + foreach ( var @case in new [] { "UtcNow", "MinValue", "MaxValue" } ) + { + WriteConversionTest( $"From{type}_{@case}_OK", $"{type}.{@case}", $"Timestamp.From{type}( {{0}} )", null, null ); + WriteConversionTest( $"Implicit{type}_{@case}_OK", $"{type}.{@case}", $"( Timestamp ){{0}}", null, null ); + } + + WriteConversionTest( $"To{type}_UtcNow_OK", $"Timestamp.UtcNow", $"{{0}}.To{type}()", null, "AssertUtc( {0} )" ); + WriteConversionTest( $"Explicit{type}_UtcNow_OK", $"Timestamp.UtcNow", $"( {type} ){{0}}", null, "AssertUtc( {0} )" ); + + WriteConversionTest( $"From{type}_Now_AsUtc", $"{type}.Now", $"Timestamp.From{type}( {{0}} )", x => x + ".ToUniversalTime()", null ); + WriteConversionTest( $"Implicit{type}_Now_AsUtc", $"{type}.Now", $"( Timestamp ){{0}}", x => x + ".ToUniversalTime()", null ); +#> + [Test] + public void TestTo<#= type #>_OverflowSeconds() + { + var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1L, checked( ( int )( DateTimeOffset.MaxValue.Ticks % 10000000 * 100 ) ) ); + Assert.Throws( () => source.To<#= type #>() ); + } + + [Test] + public void TestTo<#= type #>_OverflowNanoseconds() + { + var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1, 0 ); + Assert.Throws( () => source.To<#= type #>() ); + } + + [Test] + public void TestExplicit<#= type #>_OverflowSeconds() + { + var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1L, checked( ( int )( DateTimeOffset.MaxValue.Ticks % 10000000 * 100 ) ) ); + Assert.Throws( () => { var x = ( <#= type #> )source; } ); + } + + [Test] + public void TestExplicit<#= type #>_OverflowNanoseconds() + { + var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1, 0 ); + Assert.Throws( () => { var x = ( <#= type #> )source; } ); + } + + [Test] + public void TestTo<#= type #>_UnderflowSeconds() + { + var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() - 1L, checked( ( int )( DateTimeOffset.MinValue.Ticks % 10000000 * 100 ) ) ); + Assert.Throws( () => source.To<#= type #>() ); + } + + [Test] + public void TestTo<#= type #>_UnderflowNanoseconds() + { + var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() -1L, 999999999 ); + Assert.Throws( () => source.To<#= type #>() ); + } + + [Test] + public void TestExplicit<#= type #>_UnderflowSeconds() + { + var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() - 1L, checked( ( int )( DateTimeOffset.MinValue.Ticks % 10000000 * 100 ) ) ); + Assert.Throws( () => { var x = ( <#= type #> )source; } ); + } + + [Test] + public void TestExplicit<#= type #>_UnderflowNanoseconds() + { + var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() - 1, 999999999 ); + Assert.Throws( () => { var x = ( <#= type #> )source; } ); + } + + private static void AssertSubseconds( <#= type #> target, Timestamp expected ) + { + var ticks = target.Ticks % 10000; + Assert.That( ticks / 10, Is.EqualTo( expected.Microsecond ), "Microsecond" ); + Assert.That( ticks % 10, Is.EqualTo( expected.Nanosecond / 100 ), "Nanosecond" ); + } + + private static void AssertSubseconds( Timestamp target, <#= type #> expected ) + { + var ticks = expected.Ticks % 10000; + Assert.That( target.Microsecond, Is.EqualTo( ticks / 10 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( ( ticks % 10 ) * 100 ), "Nanosecond" ); + } +<# +} +#> + } +} +<#+ +private void WriteConversionTest( string name, string sourceExpression, string convesionExpression, Func expectedExpressionProvider, string extraAssertion ) +{ +#> + [Test] + public void Test<#= name #>() + { + var source = <#= sourceExpression #>; + var target = <#= String.Format( convesionExpression, "source" ) #>; + var expected = <#= expectedExpressionProvider?.Invoke( "source" ) ?? "source" #>; +<#+ + foreach ( var property in + new [] + { + "Year", + "Month", + "Day", + "DayOfYear", + "DayOfWeek", + "Hour", + "Minute", + "Second", + "Millisecond" + } + ) + { +#> + Assert.That( target.<#= property #>, Is.EqualTo( expected.<#= property #> ), "<#= property #>" ); +<#+ + } +#> + AssertSubseconds( target, expected ); +<#+ + if ( extraAssertion != null ) + { +#> + <#= String.Format( extraAssertion, "target" ) #>; +<#+ + } +#> + } + +<#+ +} +#> diff --git a/test/MsgPack.UnitTest/TimestampTest.EncodeDecode.cs b/test/MsgPack.UnitTest/TimestampTest.EncodeDecode.cs new file mode 100644 index 000000000..cc4f231db --- /dev/null +++ b/test/MsgPack.UnitTest/TimestampTest.EncodeDecode.cs @@ -0,0 +1,219 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#endregion -- License Terms -- + +using System; +using System.Globalization; +using System.Linq; +#if !NET35 +using System.Numerics; +#endif // !NET35 + +using MsgPack.Serialization; + +#if !MSTEST +using NUnit.Framework; +#else +using TestFixtureAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using TestAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +using TimeoutAttribute = NUnit.Framework.TimeoutAttribute; +using Assert = NUnit.Framework.Assert; +using Is = NUnit.Framework.Is; +#endif + +namespace MsgPack +{ + partial class TimestampTest + { + [Test] + public void TestEncode_Min32() + { + Assert.That( + new Timestamp( 0L, 0 ).Encode(), + Is.EqualTo( MessagePackExtendedTypeObject.Unpack( 0xFF, new byte[]{ 0, 0, 0, 0 } ) ) + ); + } + + [Test] + public void TestEncode_Max32() + { + Assert.That( + new Timestamp( 4294967295L, 0 ).Encode(), + Is.EqualTo( MessagePackExtendedTypeObject.Unpack( 0xFF, new byte[]{ 0xFF, 0xFF, 0xFF, 0xFF } ) ) + ); + } + + [Test] + public void TestEncode_Min64() + { + Assert.That( + new Timestamp( 0L, 1 ).Encode(), + Is.EqualTo( MessagePackExtendedTypeObject.Unpack( 0xFF, new byte[]{ 0, 0, 0, 0x4, 0, 0, 0, 0 } ) ) + ); + } + + [Test] + public void TestEncode_Max64() + { + Assert.That( + new Timestamp( 17179869183L, 999999999 ).Encode(), + Is.EqualTo( MessagePackExtendedTypeObject.Unpack( 0xFF, new byte[]{ 0xEE, 0x6B, 0x27, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } ) ) + ); + } + + [Test] + public void TestEncode_Min96() + { + Assert.That( + new Timestamp( -9223372036854775808L, 0 ).Encode(), + Is.EqualTo( MessagePackExtendedTypeObject.Unpack( 0xFF, new byte[] { 0, 0, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } ) ) + ); + } + + [Test] + public void TestEncode_Max96() + { + Assert.That( + new Timestamp( 9223372036854775807L, 999999999 ).Encode(), + Is.EqualTo( MessagePackExtendedTypeObject.Unpack( 0xFF, new byte[] { 0x3B, 0x9A, 0xC9, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } ) ) + ); + } + + [Test] + public void TestDecode_Min32() + { + var result = Timestamp.Decode( MessagePackSerializer.UnpackMessagePackObject( new byte[] { 0xD6, 0xFF }.Concat( new byte[]{ 0, 0, 0, 0 } ).ToArray() ).AsMessagePackExtendedTypeObject() ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0L ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.ToString(), Is.EqualTo( "1970-01-01T00:00:00.000000000Z" ) ); + } + + [Test] + public void TestDecode_Max32() + { + var result = Timestamp.Decode( MessagePackSerializer.UnpackMessagePackObject( new byte[] { 0xD6, 0xFF }.Concat( new byte[]{ 0xFF, 0xFF, 0xFF, 0xFF } ).ToArray() ).AsMessagePackExtendedTypeObject() ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 4294967295L ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.ToString(), Is.EqualTo( "2106-02-07T06:28:15.000000000Z" ) ); + } + + [Test] + public void TestDecode_Min64() + { + var result = Timestamp.Decode( MessagePackSerializer.UnpackMessagePackObject( new byte[] { 0xD7, 0xFF }.Concat( new byte[]{ 0, 0, 0, 0x4, 0, 0, 0, 0 } ).ToArray() ).AsMessagePackExtendedTypeObject() ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0L ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 1 ) ); + Assert.That( result.ToString(), Is.EqualTo( "1970-01-01T00:00:00.000000001Z" ) ); + } + + [Test] + public void TestDecode_Max64() + { + var result = Timestamp.Decode( MessagePackSerializer.UnpackMessagePackObject( new byte[] { 0xD7, 0xFF }.Concat( new byte[]{ 0xEE, 0x6B, 0x27, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } ).ToArray() ).AsMessagePackExtendedTypeObject() ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 17179869183L ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 999999999 ) ); + Assert.That( result.ToString(), Is.EqualTo( "2514-05-30T01:53:03.999999999Z" ) ); + } + + [Test] + public void TestDecode_Min96() + { + var result = Timestamp.Decode( MessagePackSerializer.UnpackMessagePackObject( new byte[] { 0xC7, 12, 0xFF }.Concat( new byte[] { 0, 0, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } ).ToArray() ).AsMessagePackExtendedTypeObject() ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( -9223372036854775808L ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.ToString(), Is.EqualTo( "-292277022657-01-27T08:29:52.000000000Z" ) ); + } + + [Test] + public void TestDecode_Max96() + { + var result = Timestamp.Decode( MessagePackSerializer.UnpackMessagePackObject( new byte[] { 0xC7, 12, 0xFF }.Concat( new byte[] { 0x3B, 0x9A, 0xC9, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } ).ToArray() ).AsMessagePackExtendedTypeObject() ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 9223372036854775807L ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 999999999 ) ); + Assert.That( result.ToString(), Is.EqualTo( "292277026596-12-04T15:30:07.999999999Z" ) ); + } + + [Test] + public void TestDecode_Min64_AllZero() + { + var result = Timestamp.Decode( MessagePackSerializer.UnpackMessagePackObject( new byte[] { 0xD7, 0xFF, 0, 0, 0, 0, 0, 0, 0, 0 } ).AsMessagePackExtendedTypeObject() ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.ToString(), Is.EqualTo( "1970-01-01T00:00:00.000000000Z" ) ); + } + + [Test] + public void TestDecode_Min64_MinSeconds() + { + var result = Timestamp.Decode( MessagePackSerializer.UnpackMessagePackObject( new byte[] { 0xD7, 0xFF, 0, 0, 0, 0x1, 0, 0, 0, 0 } ).AsMessagePackExtendedTypeObject() ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0x100000000L ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.ToString(), Is.EqualTo( "2106-02-07T06:28:16.000000000Z" ) ); + } + + [Test] + public void TestDecode_InvalidLength_0() + { + Assert.Throws( () => Timestamp.Decode( MessagePackExtendedTypeObject.Unpack( 0xFF, new byte [ 0 ] ) ) ); + } + + [Test] + public void TestDecode_InvalidLength_3() + { + Assert.Throws( () => Timestamp.Decode( MessagePackExtendedTypeObject.Unpack( 0xFF, new byte [ 3 ] ) ) ); + } + + [Test] + public void TestDecode_InvalidLength_5() + { + Assert.Throws( () => Timestamp.Decode( MessagePackExtendedTypeObject.Unpack( 0xFF, new byte [ 5 ] ) ) ); + } + + [Test] + public void TestDecode_InvalidLength_7() + { + Assert.Throws( () => Timestamp.Decode( MessagePackExtendedTypeObject.Unpack( 0xFF, new byte [ 7 ] ) ) ); + } + + [Test] + public void TestDecode_InvalidLength_9() + { + Assert.Throws( () => Timestamp.Decode( MessagePackExtendedTypeObject.Unpack( 0xFF, new byte [ 9 ] ) ) ); + } + + [Test] + public void TestDecode_InvalidLength_11() + { + Assert.Throws( () => Timestamp.Decode( MessagePackExtendedTypeObject.Unpack( 0xFF, new byte [ 11 ] ) ) ); + } + + [Test] + public void TestDecode_InvalidLength_13() + { + Assert.Throws( () => Timestamp.Decode( MessagePackExtendedTypeObject.Unpack( 0xFF, new byte [ 13 ] ) ) ); + } + + [Test] + public void TestDecode_InvalidTypeCode() + { + Assert.Throws( () => Timestamp.Decode( default( MessagePackExtendedTypeObject ) ) ); + } + } +} diff --git a/test/MsgPack.UnitTest/TimestampTest.EncodeDecode.tt b/test/MsgPack.UnitTest/TimestampTest.EncodeDecode.tt new file mode 100644 index 000000000..ce56ab60d --- /dev/null +++ b/test/MsgPack.UnitTest/TimestampTest.EncodeDecode.tt @@ -0,0 +1,132 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ output extension=".cs" #> +<#@ assembly Name="System.Core" #> +<#@ include file="TimestampTest.Common.ttinclude" #> +<#@ import namespace="System" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.Globalization" #> +<#@ import namespace="System.Linq" #> +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#endregion -- License Terms -- + +using System; +using System.Globalization; +using System.Linq; +#if !NET35 +using System.Numerics; +#endif // !NET35 + +using MsgPack.Serialization; + +#if !MSTEST +using NUnit.Framework; +#else +using TestFixtureAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using TestAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +using TimeoutAttribute = NUnit.Framework.TimeoutAttribute; +using Assert = NUnit.Framework.Assert; +using Is = NUnit.Framework.Is; +#endif + +namespace MsgPack +{ + partial class TimestampTest + { +<# +var cases = + new [] + { + new { Label = "Min32", Seconds = 0L, Nanoseconds = 0, String = "1970-01-01T00:00:00.000000000Z", Header = "new byte[] { 0xD6, 0xFF }", Body = "new byte[]{ 0, 0, 0, 0 }" }, + new { Label = "Max32", Seconds = ( long )UInt32.MaxValue, Nanoseconds = 0, String = "2106-02-07T06:28:15.000000000Z", Header = "new byte[] { 0xD6, 0xFF }", Body = "new byte[]{ 0xFF, 0xFF, 0xFF, 0xFF }" }, + new { Label = "Min64", Seconds = 0L, Nanoseconds = 1, String = "1970-01-01T00:00:00.000000001Z", Header = "new byte[] { 0xD7, 0xFF }", Body = "new byte[]{ 0, 0, 0, 0x4, 0, 0, 0, 0 }" }, + new { Label = "Max64", Seconds = 0x3FFFFFFFFL, Nanoseconds = 999999999, String = "2514-05-30T01:53:03.999999999Z", Header = "new byte[] { 0xD7, 0xFF }", Body = "new byte[]{ 0xEE, 0x6B, 0x27, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }" }, + new { Label = "Min96", Seconds = Int64.MinValue, Nanoseconds = 0, String = "-292277022657-01-27T08:29:52.000000000Z", Header = "new byte[] { 0xC7, 12, 0xFF }", Body = "new byte[] { 0, 0, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 }" }, + new { Label = "Max96", Seconds = Int64.MaxValue, Nanoseconds = 999999999, String = "292277026596-12-04T15:30:07.999999999Z", Header = "new byte[] { 0xC7, 12, 0xFF }", Body = "new byte[] { 0x3B, 0x9A, 0xC9, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }" }, + }; + +foreach ( var @case in cases ) +{ +#> + [Test] + public void TestEncode_<#= @case.Label #>() + { + Assert.That( + new Timestamp( <#= @case.Seconds #>L, <#= @case.Nanoseconds #> ).Encode(), + Is.EqualTo( MessagePackExtendedTypeObject.Unpack( 0xFF, <#= @case.Body #> ) ) + ); + } + +<# +} + +foreach ( var @case in cases ) +{ +#> + [Test] + public void TestDecode_<#= @case.Label #>() + { + var result = Timestamp.Decode( MessagePackSerializer.UnpackMessagePackObject( <#= @case.Header #>.Concat( <#= @case.Body #> ).ToArray() ).AsMessagePackExtendedTypeObject() ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( <#= @case.Seconds #>L ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( <#= @case.Nanoseconds #> ) ); + Assert.That( result.ToString(), Is.EqualTo( "<#= @case.String #>" ) ); + } + +<# +} +#> + [Test] + public void TestDecode_Min64_AllZero() + { + var result = Timestamp.Decode( MessagePackSerializer.UnpackMessagePackObject( new byte[] { 0xD7, 0xFF, 0, 0, 0, 0, 0, 0, 0, 0 } ).AsMessagePackExtendedTypeObject() ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.ToString(), Is.EqualTo( "1970-01-01T00:00:00.000000000Z" ) ); + } + + [Test] + public void TestDecode_Min64_MinSeconds() + { + var result = Timestamp.Decode( MessagePackSerializer.UnpackMessagePackObject( new byte[] { 0xD7, 0xFF, 0, 0, 0, 0x1, 0, 0, 0, 0 } ).AsMessagePackExtendedTypeObject() ); + Assert.That( result.UnixEpochSecondsPart, Is.EqualTo( 0x100000000L ) ); + Assert.That( result.NanosecondsPart, Is.EqualTo( 0 ) ); + Assert.That( result.ToString(), Is.EqualTo( "2106-02-07T06:28:16.000000000Z" ) ); + } + +<# +foreach ( var length in new [] { 0, 3, 5, 7, 9, 11, 13 } ) +{ +#> + [Test] + public void TestDecode_InvalidLength_<#= length #>() + { + Assert.Throws( () => Timestamp.Decode( MessagePackExtendedTypeObject.Unpack( 0xFF, new byte [ <#= length #> ] ) ) ); + } + +<# +} +#> + [Test] + public void TestDecode_InvalidTypeCode() + { + Assert.Throws( () => Timestamp.Decode( default( MessagePackExtendedTypeObject ) ) ); + } + } +} diff --git a/test/MsgPack.UnitTest/TimestampTest.Parse.cs b/test/MsgPack.UnitTest/TimestampTest.Parse.cs new file mode 100644 index 000000000..6bff3e832 --- /dev/null +++ b/test/MsgPack.UnitTest/TimestampTest.Parse.cs @@ -0,0 +1,4583 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#endregion -- License Terms -- + +using System; +using System.Globalization; +using System.Linq; +#if NET35 +using System.Threading; +#endif // NET35 +#if !MSTEST +using NUnit.Framework; +#else +using TestFixtureAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using TestAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +using TimeoutAttribute = NUnit.Framework.TimeoutAttribute; +using Assert = NUnit.Framework.Assert; +using Is = NUnit.Framework.Is; +#endif + +namespace MsgPack +{ + partial class TimestampTest + { + [Test] + public void TestParseExact_WithDateTimeStyles_Zero_LowerO() + { + Assert.That( + Timestamp.ParseExact( + "0000-01-01T00:00:00.000000000Z", + "o", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -62167219200, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_Zero_LowerO() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "0000-01-01T00:00:00.000000000Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -62167219200, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_Zero_UpperO() + { + Assert.That( + Timestamp.ParseExact( + "0000-01-01T00:00:00.000000000Z", + "O", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -62167219200, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_Zero_UpperO() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "0000-01-01T00:00:00.000000000Z", + "O", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -62167219200, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_Zero_LowerS() + { + Assert.That( + Timestamp.ParseExact( + "0000-01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -62167219200, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_Zero_LowerS() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "0000-01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -62167219200, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_FullDigits_LowerO() + { + Assert.That( + Timestamp.ParseExact( + "1000-10-10T10:10:10.123456789Z", + "o", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -30585822590, 123456789 ) ) + ); + } + + [Test] + public void TestTryParseExact_FullDigits_LowerO() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1000-10-10T10:10:10.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -30585822590, 123456789 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_FullDigits_UpperO() + { + Assert.That( + Timestamp.ParseExact( + "1000-10-10T10:10:10.123456789Z", + "O", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -30585822590, 123456789 ) ) + ); + } + + [Test] + public void TestTryParseExact_FullDigits_UpperO() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1000-10-10T10:10:10.123456789Z", + "O", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -30585822590, 123456789 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_FullDigits_LowerS() + { + Assert.That( + Timestamp.ParseExact( + "1000-10-10T10:10:10Z", + "s", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -30585822590, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_FullDigits_LowerS() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1000-10-10T10:10:10Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -30585822590, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_YearMinus1_LowerO() + { + Assert.That( + Timestamp.ParseExact( + "-0001-01-01T00:00:00.000000000Z", + "o", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -62198755200, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_YearMinus1_LowerO() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "-0001-01-01T00:00:00.000000000Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -62198755200, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_YearMinus1_UpperO() + { + Assert.That( + Timestamp.ParseExact( + "-0001-01-01T00:00:00.000000000Z", + "O", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -62198755200, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_YearMinus1_UpperO() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "-0001-01-01T00:00:00.000000000Z", + "O", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -62198755200, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_YearMinus1_LowerS() + { + Assert.That( + Timestamp.ParseExact( + "-0001-01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -62198755200, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_YearMinus1_LowerS() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "-0001-01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -62198755200, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_YearMinus1000_LowerO() + { + Assert.That( + Timestamp.ParseExact( + "-1000-01-01T00:00:00.000000000Z", + "o", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -93724128000, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_YearMinus1000_LowerO() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "-1000-01-01T00:00:00.000000000Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -93724128000, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_YearMinus1000_UpperO() + { + Assert.That( + Timestamp.ParseExact( + "-1000-01-01T00:00:00.000000000Z", + "O", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -93724128000, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_YearMinus1000_UpperO() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "-1000-01-01T00:00:00.000000000Z", + "O", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -93724128000, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_YearMinus1000_LowerS() + { + Assert.That( + Timestamp.ParseExact( + "-1000-01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -93724128000, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_YearMinus1000_LowerS() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "-1000-01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -93724128000, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_Year10000_LowerO() + { + Assert.That( + Timestamp.ParseExact( + "10000-10-10T10:10:10.123456789Z", + "o", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( 253426788610, 123456789 ) ) + ); + } + + [Test] + public void TestTryParseExact_Year10000_LowerO() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "10000-10-10T10:10:10.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 253426788610, 123456789 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_Year10000_UpperO() + { + Assert.That( + Timestamp.ParseExact( + "10000-10-10T10:10:10.123456789Z", + "O", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( 253426788610, 123456789 ) ) + ); + } + + [Test] + public void TestTryParseExact_Year10000_UpperO() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "10000-10-10T10:10:10.123456789Z", + "O", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 253426788610, 123456789 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_Year10000_LowerS() + { + Assert.That( + Timestamp.ParseExact( + "10000-10-10T10:10:10Z", + "s", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( 253426788610, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_Year10000_LowerS() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "10000-10-10T10:10:10Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 253426788610, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_YearMinus10000_LowerO() + { + Assert.That( + Timestamp.ParseExact( + "-10000-10-10T10:10:10.123456789Z", + "o", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -377712251390, 123456789 ) ) + ); + } + + [Test] + public void TestTryParseExact_YearMinus10000_LowerO() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "-10000-10-10T10:10:10.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -377712251390, 123456789 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_YearMinus10000_UpperO() + { + Assert.That( + Timestamp.ParseExact( + "-10000-10-10T10:10:10.123456789Z", + "O", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -377712251390, 123456789 ) ) + ); + } + + [Test] + public void TestTryParseExact_YearMinus10000_UpperO() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "-10000-10-10T10:10:10.123456789Z", + "O", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -377712251390, 123456789 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_YearMinus10000_LowerS() + { + Assert.That( + Timestamp.ParseExact( + "-10000-10-10T10:10:10Z", + "s", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -377712251390, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_YearMinus10000_LowerS() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "-10000-10-10T10:10:10Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -377712251390, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_TimestampMin_LowerO() + { + Assert.That( + Timestamp.ParseExact( + "-584554047284-02-23T16:59:44.000000000Z", + "o", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -9223372036854775808, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_TimestampMin_LowerO() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "-584554047284-02-23T16:59:44.000000000Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -9223372036854775808, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_TimestampMin_UpperO() + { + Assert.That( + Timestamp.ParseExact( + "-584554047284-02-23T16:59:44.000000000Z", + "O", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -9223372036854775808, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_TimestampMin_UpperO() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "-584554047284-02-23T16:59:44.000000000Z", + "O", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -9223372036854775808, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_TimestampMin_LowerS() + { + Assert.That( + Timestamp.ParseExact( + "-584554047284-02-23T16:59:44Z", + "s", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -9223372036854775808, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_TimestampMin_LowerS() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "-584554047284-02-23T16:59:44Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -9223372036854775808, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_TimestampMax_LowerO() + { + Assert.That( + Timestamp.ParseExact( + "584554051223-11-09T07:00:16.999999999Z", + "o", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( 9223372036854775807, 999999999 ) ) + ); + } + + [Test] + public void TestTryParseExact_TimestampMax_LowerO() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "584554051223-11-09T07:00:16.999999999Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 9223372036854775807, 999999999 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_TimestampMax_UpperO() + { + Assert.That( + Timestamp.ParseExact( + "584554051223-11-09T07:00:16.999999999Z", + "O", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( 9223372036854775807, 999999999 ) ) + ); + } + + [Test] + public void TestTryParseExact_TimestampMax_UpperO() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "584554051223-11-09T07:00:16.999999999Z", + "O", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 9223372036854775807, 999999999 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_TimestampMax_LowerS() + { + Assert.That( + Timestamp.ParseExact( + "584554051223-11-09T07:00:16Z", + "s", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( 9223372036854775807, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_TimestampMax_LowerS() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "584554051223-11-09T07:00:16Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 9223372036854775807, 0 ) ) ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_None_FormatLowerO_LeadingWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01.000000000Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_None_FormatLowerO_LeadingWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + " 1970-01-01T00:00:01.000000000Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_None_FormatUpperO_LeadingWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01.000000000Z", + "O", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_None_FormatUpperO_LeadingWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + " 1970-01-01T00:00:01.000000000Z", + "O", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_None_FormatLowerS_LeadingWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_None_FormatLowerS_LeadingWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + " 1970-01-01T00:00:01Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowLeadingWhite_FormatLowerO_LeadingWhiteIsAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01.000000000Z", + "o", + null, + DateTimeStyles.AllowLeadingWhite, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 1, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowLeadingWhite_FormatLowerO_LeadingWhiteIsAllowed() + { + Assert.That( + Timestamp.ParseExact( + " 1970-01-01T00:00:01.000000000Z", + "o", + null, + DateTimeStyles.AllowLeadingWhite + ) + , Is.EqualTo( new Timestamp( 1, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowLeadingWhite_FormatUpperO_LeadingWhiteIsAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01.000000000Z", + "O", + null, + DateTimeStyles.AllowLeadingWhite, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 1, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowLeadingWhite_FormatUpperO_LeadingWhiteIsAllowed() + { + Assert.That( + Timestamp.ParseExact( + " 1970-01-01T00:00:01.000000000Z", + "O", + null, + DateTimeStyles.AllowLeadingWhite + ) + , Is.EqualTo( new Timestamp( 1, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowLeadingWhite_FormatLowerS_LeadingWhiteIsAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01Z", + "s", + null, + DateTimeStyles.AllowLeadingWhite, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 1, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowLeadingWhite_FormatLowerS_LeadingWhiteIsAllowed() + { + Assert.That( + Timestamp.ParseExact( + " 1970-01-01T00:00:01Z", + "s", + null, + DateTimeStyles.AllowLeadingWhite + ) + , Is.EqualTo( new Timestamp( 1, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowTrailingWhite_FormatLowerO_LeadingWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01.000000000Z", + "o", + null, + DateTimeStyles.AllowTrailingWhite, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowTrailingWhite_FormatLowerO_LeadingWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + " 1970-01-01T00:00:01.000000000Z", + "o", + null, + DateTimeStyles.AllowTrailingWhite + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowTrailingWhite_FormatUpperO_LeadingWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01.000000000Z", + "O", + null, + DateTimeStyles.AllowTrailingWhite, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowTrailingWhite_FormatUpperO_LeadingWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + " 1970-01-01T00:00:01.000000000Z", + "O", + null, + DateTimeStyles.AllowTrailingWhite + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowTrailingWhite_FormatLowerS_LeadingWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01Z", + "s", + null, + DateTimeStyles.AllowTrailingWhite, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowTrailingWhite_FormatLowerS_LeadingWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + " 1970-01-01T00:00:01Z", + "s", + null, + DateTimeStyles.AllowTrailingWhite + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowLeadingWhiteOrAllowTrailingWhite_FormatLowerO_LeadingWhiteIsAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01.000000000Z", + "o", + null, + DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 1, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowLeadingWhiteOrAllowTrailingWhite_FormatLowerO_LeadingWhiteIsAllowed() + { + Assert.That( + Timestamp.ParseExact( + " 1970-01-01T00:00:01.000000000Z", + "o", + null, + DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite + ) + , Is.EqualTo( new Timestamp( 1, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowLeadingWhiteOrAllowTrailingWhite_FormatUpperO_LeadingWhiteIsAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01.000000000Z", + "O", + null, + DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 1, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowLeadingWhiteOrAllowTrailingWhite_FormatUpperO_LeadingWhiteIsAllowed() + { + Assert.That( + Timestamp.ParseExact( + " 1970-01-01T00:00:01.000000000Z", + "O", + null, + DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite + ) + , Is.EqualTo( new Timestamp( 1, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowLeadingWhiteOrAllowTrailingWhite_FormatLowerS_LeadingWhiteIsAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01Z", + "s", + null, + DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 1, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowLeadingWhiteOrAllowTrailingWhite_FormatLowerS_LeadingWhiteIsAllowed() + { + Assert.That( + Timestamp.ParseExact( + " 1970-01-01T00:00:01Z", + "s", + null, + DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite + ) + , Is.EqualTo( new Timestamp( 1, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_None_FormatLowerO_TrailingWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:01.000000000Z ", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_None_FormatLowerO_TrailingWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + "1970-01-01T00:00:01.000000000Z ", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_None_FormatUpperO_TrailingWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:01.000000000Z ", + "O", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_None_FormatUpperO_TrailingWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + "1970-01-01T00:00:01.000000000Z ", + "O", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_None_FormatLowerS_TrailingWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:01Z ", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_None_FormatLowerS_TrailingWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + "1970-01-01T00:00:01Z ", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowLeadingWhite_FormatLowerO_TrailingWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:01.000000000Z ", + "o", + null, + DateTimeStyles.AllowLeadingWhite, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowLeadingWhite_FormatLowerO_TrailingWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + "1970-01-01T00:00:01.000000000Z ", + "o", + null, + DateTimeStyles.AllowLeadingWhite + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowLeadingWhite_FormatUpperO_TrailingWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:01.000000000Z ", + "O", + null, + DateTimeStyles.AllowLeadingWhite, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowLeadingWhite_FormatUpperO_TrailingWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + "1970-01-01T00:00:01.000000000Z ", + "O", + null, + DateTimeStyles.AllowLeadingWhite + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowLeadingWhite_FormatLowerS_TrailingWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:01Z ", + "s", + null, + DateTimeStyles.AllowLeadingWhite, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowLeadingWhite_FormatLowerS_TrailingWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + "1970-01-01T00:00:01Z ", + "s", + null, + DateTimeStyles.AllowLeadingWhite + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowTrailingWhite_FormatLowerO_TrailingWhiteIsAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:01.000000000Z ", + "o", + null, + DateTimeStyles.AllowTrailingWhite, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 1, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowTrailingWhite_FormatLowerO_TrailingWhiteIsAllowed() + { + Assert.That( + Timestamp.ParseExact( + "1970-01-01T00:00:01.000000000Z ", + "o", + null, + DateTimeStyles.AllowTrailingWhite + ) + , Is.EqualTo( new Timestamp( 1, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowTrailingWhite_FormatUpperO_TrailingWhiteIsAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:01.000000000Z ", + "O", + null, + DateTimeStyles.AllowTrailingWhite, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 1, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowTrailingWhite_FormatUpperO_TrailingWhiteIsAllowed() + { + Assert.That( + Timestamp.ParseExact( + "1970-01-01T00:00:01.000000000Z ", + "O", + null, + DateTimeStyles.AllowTrailingWhite + ) + , Is.EqualTo( new Timestamp( 1, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowTrailingWhite_FormatLowerS_TrailingWhiteIsAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:01Z ", + "s", + null, + DateTimeStyles.AllowTrailingWhite, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 1, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowTrailingWhite_FormatLowerS_TrailingWhiteIsAllowed() + { + Assert.That( + Timestamp.ParseExact( + "1970-01-01T00:00:01Z ", + "s", + null, + DateTimeStyles.AllowTrailingWhite + ) + , Is.EqualTo( new Timestamp( 1, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowLeadingWhiteOrAllowTrailingWhite_FormatLowerO_TrailingWhiteIsAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:01.000000000Z ", + "o", + null, + DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 1, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowLeadingWhiteOrAllowTrailingWhite_FormatLowerO_TrailingWhiteIsAllowed() + { + Assert.That( + Timestamp.ParseExact( + "1970-01-01T00:00:01.000000000Z ", + "o", + null, + DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite + ) + , Is.EqualTo( new Timestamp( 1, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowLeadingWhiteOrAllowTrailingWhite_FormatUpperO_TrailingWhiteIsAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:01.000000000Z ", + "O", + null, + DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 1, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowLeadingWhiteOrAllowTrailingWhite_FormatUpperO_TrailingWhiteIsAllowed() + { + Assert.That( + Timestamp.ParseExact( + "1970-01-01T00:00:01.000000000Z ", + "O", + null, + DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite + ) + , Is.EqualTo( new Timestamp( 1, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowLeadingWhiteOrAllowTrailingWhite_FormatLowerS_TrailingWhiteIsAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:01Z ", + "s", + null, + DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 1, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowLeadingWhiteOrAllowTrailingWhite_FormatLowerS_TrailingWhiteIsAllowed() + { + Assert.That( + Timestamp.ParseExact( + "1970-01-01T00:00:01Z ", + "s", + null, + DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite + ) + , Is.EqualTo( new Timestamp( 1, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_None_FormatLowerO_BothWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01.000000000Z ", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_None_FormatLowerO_BothWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + " 1970-01-01T00:00:01.000000000Z ", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_None_FormatUpperO_BothWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01.000000000Z ", + "O", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_None_FormatUpperO_BothWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + " 1970-01-01T00:00:01.000000000Z ", + "O", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_None_FormatLowerS_BothWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01Z ", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_None_FormatLowerS_BothWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + " 1970-01-01T00:00:01Z ", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowLeadingWhite_FormatLowerO_BothWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01.000000000Z ", + "o", + null, + DateTimeStyles.AllowLeadingWhite, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowLeadingWhite_FormatLowerO_BothWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + " 1970-01-01T00:00:01.000000000Z ", + "o", + null, + DateTimeStyles.AllowLeadingWhite + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowLeadingWhite_FormatUpperO_BothWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01.000000000Z ", + "O", + null, + DateTimeStyles.AllowLeadingWhite, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowLeadingWhite_FormatUpperO_BothWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + " 1970-01-01T00:00:01.000000000Z ", + "O", + null, + DateTimeStyles.AllowLeadingWhite + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowLeadingWhite_FormatLowerS_BothWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01Z ", + "s", + null, + DateTimeStyles.AllowLeadingWhite, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowLeadingWhite_FormatLowerS_BothWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + " 1970-01-01T00:00:01Z ", + "s", + null, + DateTimeStyles.AllowLeadingWhite + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowTrailingWhite_FormatLowerO_BothWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01.000000000Z ", + "o", + null, + DateTimeStyles.AllowTrailingWhite, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowTrailingWhite_FormatLowerO_BothWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + " 1970-01-01T00:00:01.000000000Z ", + "o", + null, + DateTimeStyles.AllowTrailingWhite + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowTrailingWhite_FormatUpperO_BothWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01.000000000Z ", + "O", + null, + DateTimeStyles.AllowTrailingWhite, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowTrailingWhite_FormatUpperO_BothWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + " 1970-01-01T00:00:01.000000000Z ", + "O", + null, + DateTimeStyles.AllowTrailingWhite + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowTrailingWhite_FormatLowerS_BothWhiteIsNotAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01Z ", + "s", + null, + DateTimeStyles.AllowTrailingWhite, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowTrailingWhite_FormatLowerS_BothWhiteIsNotAllowed() + { + Assert.Throws( () => + Timestamp.ParseExact( + " 1970-01-01T00:00:01Z ", + "s", + null, + DateTimeStyles.AllowTrailingWhite + ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowLeadingWhiteOrAllowTrailingWhite_FormatLowerO_BothWhiteIsAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01.000000000Z ", + "o", + null, + DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 1, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowLeadingWhiteOrAllowTrailingWhite_FormatLowerO_BothWhiteIsAllowed() + { + Assert.That( + Timestamp.ParseExact( + " 1970-01-01T00:00:01.000000000Z ", + "o", + null, + DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite + ) + , Is.EqualTo( new Timestamp( 1, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowLeadingWhiteOrAllowTrailingWhite_FormatUpperO_BothWhiteIsAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01.000000000Z ", + "O", + null, + DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 1, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowLeadingWhiteOrAllowTrailingWhite_FormatUpperO_BothWhiteIsAllowed() + { + Assert.That( + Timestamp.ParseExact( + " 1970-01-01T00:00:01.000000000Z ", + "O", + null, + DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite + ) + , Is.EqualTo( new Timestamp( 1, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_WithDateTimeStyles_AllowLeadingWhiteOrAllowTrailingWhite_FormatLowerS_BothWhiteIsAllowed() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + " 1970-01-01T00:00:01Z ", + "s", + null, + DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 1, 0 ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_AllowLeadingWhiteOrAllowTrailingWhite_FormatLowerS_BothWhiteIsAllowed() + { + Assert.That( + Timestamp.ParseExact( + " 1970-01-01T00:00:01Z ", + "s", + null, + DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite + ) + , Is.EqualTo( new Timestamp( 1, 0 ) ) + ); + } + + [Test] + public void TestParseExact_WithoutDateTimeStyles_AsNone() + { + Assert.Throws( + () => Timestamp.ParseExact( + " 1970-01-01T00:00:00.123456789Z", + "o", + null + ) + ); + } + + [Test] + public void TestParseExact_IFormatProvider_Zero_o_InvariantCulture() + { + Assert.That( + Timestamp.ParseExact( + "1970-01-01T00:00:00.000000000Z", + "o", + CultureInfo.InvariantCulture, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( 0, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_IFormatProvider_Zero_o_InvariantCulture() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:00.000000000Z", + "o", + CultureInfo.InvariantCulture, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 0, 0 ) ) ); + } + + [Test] + public void TestParseExact_IFormatProvider_Zero_s_InvariantCulture() + { + Assert.That( + Timestamp.ParseExact( + "1970-01-01T00:00:00Z", + "s", + CultureInfo.InvariantCulture, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( 0, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_IFormatProvider_Zero_s_InvariantCulture() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:00Z", + "s", + CultureInfo.InvariantCulture, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( 0, 0 ) ) ); + } + + [Test] + public void TestParseExact_IFormatProvider_YearMinus1_o_InvariantCulture() + { + Assert.That( + Timestamp.ParseExact( + "-0001-03-01T00:00:00.000000000Z", + "o", + CultureInfo.InvariantCulture, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -62193657600, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_IFormatProvider_YearMinus1_o_InvariantCulture() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "-0001-03-01T00:00:00.000000000Z", + "o", + CultureInfo.InvariantCulture, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -62193657600, 0 ) ) ); + } + + [Test] + public void TestParseExact_IFormatProvider_YearMinus1_s_InvariantCulture() + { + Assert.That( + Timestamp.ParseExact( + "-0001-03-01T00:00:00Z", + "s", + CultureInfo.InvariantCulture, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -62193657600, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_IFormatProvider_YearMinus1_s_InvariantCulture() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "-0001-03-01T00:00:00Z", + "s", + CultureInfo.InvariantCulture, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -62193657600, 0 ) ) ); + } + + [Test] + public void TestParseExact_Distinguishable_o_CustomCulture_UsedForNegativeSign() + { + Assert.That( + Timestamp.ParseExact( + "1234-05-06T07:08:09.123456789Z", + "o", + new LegacyJapaneseCultureInfo(), + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -23215049511, 123456789 ) ) + ); + } + + [Test] + public void TestTryParseExact_Distinguishable_o_CustomCulture_UsedForNegativeSign() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1234-05-06T07:08:09.123456789Z", + "o", + new LegacyJapaneseCultureInfo(), + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -23215049511, 123456789 ) ) ); + } + + [Test] + public void TestParseExact_Distinguishable_o_null_CurrentCultureIsUsed() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Assert.That( + Timestamp.ParseExact( + "1234-05-06T07:08:09.123456789Z", + "o", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -23215049511, 123456789 ) ) + ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + + [Test] + public void TestTryParseExact_Distinguishable_o_null_CurrentCultureIsUsed() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1234-05-06T07:08:09.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -23215049511, 123456789 ) ) ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + + [Test] + public void TestParseExact_Distinguishable_s_CustomCulture_UsedForNegativeSign() + { + Assert.That( + Timestamp.ParseExact( + "1234-05-06T07:08:09Z", + "s", + new LegacyJapaneseCultureInfo(), + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -23215049511, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_Distinguishable_s_CustomCulture_UsedForNegativeSign() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1234-05-06T07:08:09Z", + "s", + new LegacyJapaneseCultureInfo(), + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -23215049511, 0 ) ) ); + } + + [Test] + public void TestParseExact_Distinguishable_s_null_CurrentCultureIsUsed() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Assert.That( + Timestamp.ParseExact( + "1234-05-06T07:08:09Z", + "s", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -23215049511, 0 ) ) + ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + + [Test] + public void TestTryParseExact_Distinguishable_s_null_CurrentCultureIsUsed() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1234-05-06T07:08:09Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -23215049511, 0 ) ) ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + + [Test] + public void TestParseExact_YearMinus1_o_CustomCulture_UsedForNegativeSign() + { + Assert.That( + Timestamp.ParseExact( + "|0001-03-01T00:00:00.000000000Z", + "o", + new LegacyJapaneseCultureInfo(), + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -62193657600, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_YearMinus1_o_CustomCulture_UsedForNegativeSign() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "|0001-03-01T00:00:00.000000000Z", + "o", + new LegacyJapaneseCultureInfo(), + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -62193657600, 0 ) ) ); + } + + [Test] + public void TestParseExact_YearMinus1_o_null_CurrentCultureIsUsed() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Assert.That( + Timestamp.ParseExact( + "|0001-03-01T00:00:00.000000000Z", + "o", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -62193657600, 0 ) ) + ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + + [Test] + public void TestTryParseExact_YearMinus1_o_null_CurrentCultureIsUsed() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "|0001-03-01T00:00:00.000000000Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -62193657600, 0 ) ) ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + + [Test] + public void TestParseExact_YearMinus1_s_CustomCulture_UsedForNegativeSign() + { + Assert.That( + Timestamp.ParseExact( + "|0001-03-01T00:00:00Z", + "s", + new LegacyJapaneseCultureInfo(), + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -62193657600, 0 ) ) + ); + } + + [Test] + public void TestTryParseExact_YearMinus1_s_CustomCulture_UsedForNegativeSign() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "|0001-03-01T00:00:00Z", + "s", + new LegacyJapaneseCultureInfo(), + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -62193657600, 0 ) ) ); + } + + [Test] + public void TestParseExact_YearMinus1_s_null_CurrentCultureIsUsed() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Assert.That( + Timestamp.ParseExact( + "|0001-03-01T00:00:00Z", + "s", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( -62193657600, 0 ) ) + ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + + [Test] + public void TestTryParseExact_YearMinus1_s_null_CurrentCultureIsUsed() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "|0001-03-01T00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( -62193657600, 0 ) ) ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + + [Test] + public void TestParseExact_ParseError_EmptyValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_EmptyValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_EmptyValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_EmptyValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidYearValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "AAAA-01-01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidYearValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "AAAA-01-01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidYearValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "AAAA-01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidYearValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "AAAA-01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooShortYearDigit_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "001-01-01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooShortYearDigit_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "001-01-01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooShortYearDigit_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "001-01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooShortYearDigit_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "001-01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooSmallYearValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "-584554047285-01-01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooSmallYearValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "-584554047285-01-01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooSmallYearValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "-584554047285-01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooSmallYearValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "-584554047285-01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooLargeYearValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "584554051224-01-01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooLargeYearValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "584554051224-01-01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooLargeYearValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "584554051224-01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooLargeYearValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "584554051224-01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidYearMonthDelimiter_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970/01-01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidYearMonthDelimiter_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970/01-01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidYearMonthDelimiter_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970/01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidYearMonthDelimiter_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970/01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidMonthValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-AA-01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidMonthValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-AA-01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidMonthValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-AA-01T00:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidMonthValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-AA-01T00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooShortMonthDigit_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-1-01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooShortMonthDigit_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-1-01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooShortMonthDigit_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-1-01T00:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooShortMonthDigit_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-1-01T00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooSmallMonthValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "A-01-01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooSmallMonthValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "A-01-01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooSmallMonthValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "A-01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooSmallMonthValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "A-01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooLargeMonthValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "A-01-01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooLargeMonthValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "A-01-01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooLargeMonthValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "A-01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooLargeMonthValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "A-01-01T00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidMonthDayDelimiter_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01/01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidMonthDayDelimiter_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01/01T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidMonthDayDelimiter_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01/01T00:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidMonthDayDelimiter_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01/01T00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidDayValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-AAT00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidDayValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-AAT00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidDayValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-AAT00:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidDayValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-AAT00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooShortDayDigit_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-1T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooShortDayDigit_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-1T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooShortDayDigit_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-1T00:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooShortDayDigit_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-1T00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooLargeDayValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-32T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooLargeDayValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-32T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooLargeDayValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-32T00:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooLargeDayValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-32T00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooSmallDayValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-00T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooSmallDayValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-00T00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooSmallDayValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-00T00:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooSmallDayValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-00T00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidDayHourDelimiter_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01_00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidDayHourDelimiter_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01_00:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidDayHourDelimiter_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01_00:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidDayHourDelimiter_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01_00:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidHourValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01TAA:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidHourValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01TAA:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidHourValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01TAA:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidHourValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01TAA:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooShortHourDigit_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T0:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooShortHourDigit_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T0:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooShortHourDigit_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T0:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooShortHourDigit_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T0:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooLargeHourValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T24:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooLargeHourValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T24:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooLargeHourValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T24:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooLargeHourValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T24:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooSmallHourValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T-01:00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooSmallHourValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T-01:00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooSmallHourValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T-01:00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooSmallHourValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T-01:00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidHourMinuteDelimiter_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00-00:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidHourMinuteDelimiter_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00-00:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidHourMinuteDelimiter_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00-00:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidHourMinuteDelimiter_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00-00:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidMinuteValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:AA:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidMinuteValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:AA:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidMinuteValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:AA:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidMinuteValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:AA:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooShortMinuteDigit_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:0:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooShortMinuteDigit_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:0:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooShortMinuteDigit_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:0:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooShortMinuteDigit_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:0:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooLargeMinuteValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:60:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooLargeMinuteValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:60:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooLargeMinuteValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:60:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooLargeMinuteValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:60:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooSmallMinuteValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:-01:00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooSmallMinuteValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:-01:00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooSmallMinuteValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:-01:00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooSmallMinuteValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:-01:00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidMinuteSecondDelimiter_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:00-00.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidMinuteSecondDelimiter_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00-00.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidMinuteSecondDelimiter_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:00-00Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidMinuteSecondDelimiter_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00-00Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidSecondValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:00:AA.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidSecondValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:AA.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidSecondValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:00:AAZ", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidSecondValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:AAZ", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooShortSecondDigit_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:00:0.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooShortSecondDigit_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:0.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooShortSecondDigit_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:00:0Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooShortSecondDigit_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:0Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooLargeSecondValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:00:60.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooLargeSecondValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:60.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooLargeSecondValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:00:60Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooLargeSecondValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:60Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooSmallSecondValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:00:-01.123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooSmallSecondValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:-01.123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooSmallSecondValue_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:00:-01Z", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooSmallSecondValue_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:-01Z", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidNanosecondDelimiter_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:00:00_123456789Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidNanosecondDelimiter_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:00_123456789Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_InvalidNanosecondValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:00:00.AAABBBCCCZ", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_InvalidNanosecondValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:00.AAABBBCCCZ", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooShortNanosecondDigit_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:00:00.12345678Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooShortNanosecondDigit_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:00.12345678Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooLargeNanosecondValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:00:00.1000000000Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooLargeNanosecondValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:00.1000000000Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_ParseError_TooSmallNanosecondValue_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:00:00.-000000001Z", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_TooSmallNanosecondValue_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:00.-000000001Z", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + + [Test] + public void TestParseExact_ParseError_MissingUtcSign_o() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:00:00.123456789", + "o", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_MissingUtcSign_o() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:00.123456789", + "o", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + + [Test] + public void TestParseExact_ParseError_MissingUtcSign_s() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:00:00", + "s", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_MissingUtcSign_s() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:00", + "s", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_NullValue() + { + Assert.Throws( + () => Timestamp.ParseExact( null, "o", CultureInfo.InvariantCulture, DateTimeStyles.None ) + ); + } + + [Test] + public void TestParseExact_WithoutDateTimeStyles_NullValue() + { + Assert.Throws( + () => Timestamp.ParseExact( null, "o", CultureInfo.InvariantCulture ) + ); + } + + [Test] + public void TestTryParseExact_NullValue() + { + Timestamp result; + Assert.Throws( + () => Timestamp.TryParseExact( null, "o", CultureInfo.InvariantCulture, DateTimeStyles.None, out result ) + ); + } + [Test] + public void TestParseExact_WithDateTimeStyles_NullFormat() + { + Assert.Throws( + () => Timestamp.ParseExact( null, "o", CultureInfo.InvariantCulture, DateTimeStyles.None ) + ); + } + + [Test] + public void TestParseExact_WithoutDateTimeStyles_NullFormat() + { + Assert.Throws( + () => Timestamp.ParseExact( null, "o", CultureInfo.InvariantCulture ) + ); + } + + [Test] + public void TestTryParseExact_NullFormat() + { + Timestamp result; + Assert.Throws( + () => Timestamp.TryParseExact( null, "o", CultureInfo.InvariantCulture, DateTimeStyles.None, out result ) + ); + } + [Test] + public void TestParseExact_WithDateTimeStyles_UnsupportedFormat() + { + Assert.Throws( + () => Timestamp.ParseExact( "1970-01-01T00:00:00", "G", CultureInfo.InvariantCulture, DateTimeStyles.None ) + ); + } + + [Test] + public void TestParseExact_WithoutDateTimeStyles_UnsupportedFormat() + { + Assert.Throws( + () => Timestamp.ParseExact( "1970-01-01T00:00:00", "G", CultureInfo.InvariantCulture ) + ); + } + + [Test] + public void TestTryParseExact_UnsupportedFormat() + { + Timestamp result; + Assert.Throws( + () => Timestamp.TryParseExact( "1970-01-01T00:00:00", "G", CultureInfo.InvariantCulture, DateTimeStyles.None, out result ) + ); + } + [Test] + public void TestParseExact_WithDateTimeStyles_InvalidStyles() + { + Assert.Throws( + () => Timestamp.ParseExact( "1970-01-01T00:00:00", "o", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal ) + ); + } + + [Test] + public void TestTryParseExact_InvalidStyles() + { + Timestamp result; + Assert.Throws( + () => Timestamp.TryParseExact( "1970-01-01T00:00:00", "o", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal, out result ) + ); + } + + [Test] + public void TestParseExact_DatesAD() + { + var seconds = -62135596800L; + foreach ( var year in Enumerable.Range( 1, 802 ) ) + { + var isLeapYear = year % 400 == 0 || ( year % 4 == 0 && year % 100 != 0 ); + foreach ( var dayOfYear in Enumerable.Range( 1, isLeapYear ? 366 : 365 ) ) + { + var expected = new DateTimeOffset( year, 1, 1, 0, 0, 0, TimeSpan.Zero ).AddDays( dayOfYear - 1 ); + var target = Timestamp.ParseExact( String.Format( CultureInfo.InvariantCulture, "{0:yyyy-MM-dd'T'HH:mm:ss}.000000000Z", expected ), "o", null ); + Assert.That( expected.DayOfYear, Is.EqualTo( dayOfYear ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.Year, Is.EqualTo( expected.Year ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "{0:yyyy-MM-dd}", expected ); + + seconds += 24 * 60 * 60; + } + } + } + + [Test] + public void TestParseExact_DatesBC() + { + var seconds = -62135596800L; + var dayOfWeek = ( long )DateTimeOffset.MinValue.DayOfWeek; + + foreach ( var year in Enumerable.Range( 1, 802 ).Select( x => 1 - x ) ) + { + var isLeapYear = year % 400 == 0 || ( year % 4 == 0 && year % 100 != 0 ); + var month = 12; + var day = 31; + var daysInMonths = isLeapYear ? DaysInMonthsInLeapYear : DaysInMonthsInNonLeapYear; + + foreach ( var dayOfYear in Enumerable.Range( 1, isLeapYear ? 366 : 365 ).Reverse() ) + { + seconds -= 24 * 60 * 60; + dayOfWeek--; + if ( dayOfWeek < 0 ) + { + dayOfWeek = 6; + } + + var target = Timestamp.ParseExact( String.Format( CultureInfo.InvariantCulture, "{0:0000}-{1:00}-{2:00}T00:00:00.000000000Z", year, month, day ), "o", null ); + Assert.That( target.DayOfYear, Is.EqualTo( dayOfYear ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + Assert.That( target.Year, Is.EqualTo( year ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + Assert.That( target.Month, Is.EqualTo( month ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + Assert.That( target.Day, Is.EqualTo( day ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + Assert.That( target.DayOfWeek, Is.EqualTo( ( DayOfWeek )dayOfWeek ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + + if ( day == 1 ) + { + month--; + day = daysInMonths[ month ]; + } + else + { + day--; + } + } + } + } + } +} diff --git a/test/MsgPack.UnitTest/TimestampTest.Parse.tt b/test/MsgPack.UnitTest/TimestampTest.Parse.tt new file mode 100644 index 000000000..b3060319a --- /dev/null +++ b/test/MsgPack.UnitTest/TimestampTest.Parse.tt @@ -0,0 +1,625 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ output extension=".cs" #> +<#@ assembly Name="System.Core" #> +<#@ include file="TimestampTest.Common.ttinclude" #> +<#@ import namespace="System" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.Globalization" #> +<#@ import namespace="System.Linq" #> +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#endregion -- License Terms -- + +using System; +using System.Globalization; +using System.Linq; +#if NET35 +using System.Threading; +#endif // NET35 +#if !MSTEST +using NUnit.Framework; +#else +using TestFixtureAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using TestAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +using TimeoutAttribute = NUnit.Framework.TimeoutAttribute; +using Assert = NUnit.Framework.Assert; +using Is = NUnit.Framework.Is; +#endif + +namespace MsgPack +{ + partial class TimestampTest + { +<# +// Success +foreach ( var @case in ParseToStringTestCases.Values ) +{ + foreach ( var variation in + new [] + { + new { FormatLabel = "LowerO", Format = "o", Value = @case.RoundTripString, HasSubseconds = true }, + new { FormatLabel = "UpperO", Format = "O", Value = @case.RoundTripString, HasSubseconds = true }, + new { FormatLabel = "LowerS", Format = "s", Value = @case.SortableString, HasSubseconds = false }, + } + ) + { +#> + [Test] + public void TestParseExact_WithDateTimeStyles_<#= @case.Label #>_<#= variation.FormatLabel #>() + { + Assert.That( + Timestamp.ParseExact( + "<#= @variation.Value #>", + "<#= @variation.Format #>", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( <#= @case.Seconds #>, <#= variation.HasSubseconds ? @case.Nanoseconds : 0 #> ) ) + ); + } + + [Test] + public void TestTryParseExact_<#= @case.Label #>_<#= variation.FormatLabel #>() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "<#= @variation.Value #>", + "<#= @variation.Format #>", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( <#= @case.Seconds #>, <#= variation.HasSubseconds ? @case.Nanoseconds : 0 #> ) ) ); + } + +<# + } +} // Success + +// DateTimeStyles +foreach ( var @case in + new [] + { + new { Kind = "LeadingWhite", AdjustValue = new Func( x => " " + x ), ShouldSuccess = new Func( x => x.Contains( "AllowLeadingWhite" ) ) }, + new { Kind = "TrailingWhite", AdjustValue = new Func( x => x + " " ), ShouldSuccess = new Func( x => x.Contains( "AllowTrailingWhite" ) ) }, + new { Kind = "BothWhite", AdjustValue = new Func( x => " " + x + " " ), ShouldSuccess = new Func( x => x.Contains( "AllowLeadingWhite" ) && x.Contains( "AllowTrailingWhite" ) ) }, + } +) +{ + foreach ( var styles in + new [] + { + new [] { "None" }, + new [] { "AllowLeadingWhite" }, + new [] { "AllowTrailingWhite" }, + new [] { "AllowLeadingWhite", "AllowTrailingWhite" } + } + ) + { + foreach ( var variation in + new [] + { + new { FormatLabel = "LowerO", Format = "o", Value = "1970-01-01T00:00:01.000000000Z" }, + new { FormatLabel = "UpperO", Format = "O", Value = "1970-01-01T00:00:01.000000000Z" }, + new { FormatLabel = "LowerS", Format = "s", Value = "1970-01-01T00:00:01Z" }, + } + ) + { + var shouldSuccess = @case.ShouldSuccess( styles ); + var suffix = $"{String.Join( "Or", styles )}_Format{variation.FormatLabel}_{@case.Kind}Is{( shouldSuccess ? String.Empty : "Not" )}Allowed"; +#> + [Test] + public void TestTryParseExact_WithDateTimeStyles_<#= suffix #>() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "<#= @case.AdjustValue( variation.Value ) #>", + "<#= variation.Format #>", + null, + <#= String.Join( " | ", styles.Select( x => "DateTimeStyles." + x ) ) #>, + out result + ), + Is.<#= shouldSuccess #> + ); + Assert.That( result, Is.EqualTo( <#= shouldSuccess ? "new Timestamp( 1, 0 )" : "default( Timestamp )" #> ) ); + } + + [Test] + public void TestParseExact_WithDateTimeStyles_<#= suffix #>() + { +<# + if ( shouldSuccess ) + { +#> + Assert.That( +<# + } + else // if shouldSuccess + { +#> + Assert.Throws( () => +<# + } // if shouldSuccess +#> + Timestamp.ParseExact( + "<#= @case.AdjustValue( variation.Value ) #>", + "<#= variation.Format #>", + null, + <#= String.Join( " | ", styles.Select( x => "DateTimeStyles." + x ) ) #> + ) +<# + if ( shouldSuccess ) + { +#> + , Is.EqualTo( <#= shouldSuccess ? "new Timestamp( 1, 0 )" : "default( Timestamp )" #> ) +<# + } // if shouldSuccess +#> + ); + } + +<# + } + } +} // DateTimeStyles + +// Overload +#> + [Test] + public void TestParseExact_WithoutDateTimeStyles_AsNone() + { + Assert.Throws( + () => Timestamp.ParseExact( + " 1970-01-01T00:00:00.123456789Z", + "o", + null + ) + ); + } + +<# + +// Invariant +foreach ( var @case in + new [] + { + StandardTestCases[ "Zero" ], + StandardTestCases[ "YearMinus1" ] + } +) +{ + foreach ( var variation in + new [] + { + new { Format = "o", Value = @case.RoundTripString, HasSubseconds = true }, + new { Format = "s", Value = @case.SortableString, HasSubseconds = false }, + } + ) + { +#> + [Test] + public void TestParseExact_IFormatProvider_<#= @case.Label #>_<#= variation.Format #>_InvariantCulture() + { + Assert.That( + Timestamp.ParseExact( + "<#= variation.Value #>", + "<#= variation.Format #>", + CultureInfo.InvariantCulture, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( <#= @case.Seconds #>, <#= variation.HasSubseconds ? @case.Nanoseconds : 0 #> ) ) + ); + } + + [Test] + public void TestTryParseExact_IFormatProvider_<#= @case.Label #>_<#= variation.Format #>_InvariantCulture() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "<#= variation.Value #>", + "<#= variation.Format #>", + CultureInfo.InvariantCulture, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( <#= @case.Seconds #>, <#= variation.HasSubseconds ? @case.Nanoseconds : 0 #> ) ) ); + } + +<# + } +} // Invariant + +// Current/Custom +foreach ( var @case in + new [] + { + StandardTestCases[ "Distinguishable" ], + StandardTestCases[ "YearMinus1" ] + } +) +{ + foreach ( var variation in + new [] + { + new { Format = "o", Value = ToFullWidthNegativeSign( @case.RoundTripString ), HasSubseconds = true }, + new { Format = "s", Value = ToFullWidthNegativeSign( @case.SortableString ), HasSubseconds = false }, + } + ) + { +#> + [Test] + public void TestParseExact_<#= @case.Label #>_<#= variation.Format #>_CustomCulture_UsedForNegativeSign() + { + Assert.That( + Timestamp.ParseExact( + "<#= variation.Value #>", + "<#= variation.Format #>", + new LegacyJapaneseCultureInfo(), + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( <#= @case.Seconds #>, <#= variation.HasSubseconds ? @case.Nanoseconds : 0 #> ) ) + ); + } + + [Test] + public void TestTryParseExact_<#= @case.Label #>_<#= variation.Format #>_CustomCulture_UsedForNegativeSign() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "<#= variation.Value #>", + "<#= variation.Format #>", + new LegacyJapaneseCultureInfo(), + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( <#= @case.Seconds #>, <#= variation.HasSubseconds ? @case.Nanoseconds : 0 #> ) ) ); + } + + [Test] + public void TestParseExact_<#= @case.Label #>_<#= variation.Format #>_null_CurrentCultureIsUsed() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Assert.That( + Timestamp.ParseExact( + "<#= variation.Value #>", + "<#= variation.Format #>", + null, + DateTimeStyles.None + ), + Is.EqualTo( new Timestamp( <#= @case.Seconds #>, <#= variation.HasSubseconds ? @case.Nanoseconds : 0 #> ) ) + ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + + [Test] + public void TestTryParseExact_<#= @case.Label #>_<#= variation.Format #>_null_CurrentCultureIsUsed() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "<#= variation.Value #>", + "<#= variation.Format #>", + null, + DateTimeStyles.None, + out result + ), + Is.True + ); + Assert.That( result, Is.EqualTo( new Timestamp( <#= @case.Seconds #>, <#= variation.HasSubseconds ? @case.Nanoseconds : 0 #> ) ) ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + +<# + } +} // Current/Custom + +// ParseErrors +foreach ( var @case in + new [] + { + new { Kind = "EmptyValue", Seconds = String.Empty, Nanoseconds = String.Empty, IsNanosecondsCase = false }, + new { Kind = "InvalidYearValue", Seconds = "AAAA-01-01T00:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "TooShortYearDigit", Seconds = "001-01-01T00:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "TooSmallYearValue", Seconds = "-584554047285-01-01T00:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "TooLargeYearValue", Seconds = "584554051224-01-01T00:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "InvalidYearMonthDelimiter", Seconds = "1970/01-01T00:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "InvalidMonthValue", Seconds = "1970-AA-01T00:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "TooShortMonthDigit", Seconds = "1970-1-01T00:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "TooSmallMonthValue", Seconds = "A-01-01T00:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "TooLargeMonthValue", Seconds = "A-01-01T00:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "InvalidMonthDayDelimiter", Seconds = "1970-01/01T00:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "InvalidDayValue", Seconds = "1970-01-AAT00:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "TooShortDayDigit", Seconds = "1970-01-1T00:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "TooLargeDayValue", Seconds = "1970-01-32T00:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "TooSmallDayValue", Seconds = "1970-01-00T00:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "InvalidDayHourDelimiter", Seconds = "1970-01-01_00:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "InvalidHourValue", Seconds = "1970-01-01TAA:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "TooShortHourDigit", Seconds = "1970-01-01T0:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "TooLargeHourValue", Seconds = "1970-01-01T24:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "TooSmallHourValue", Seconds = "1970-01-01T-01:00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "InvalidHourMinuteDelimiter", Seconds = "1970-01-01T00-00:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "InvalidMinuteValue", Seconds = "1970-01-01T00:AA:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "TooShortMinuteDigit", Seconds = "1970-01-01T00:0:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "TooLargeMinuteValue", Seconds = "1970-01-01T00:60:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "TooSmallMinuteValue", Seconds = "1970-01-01T00:-01:00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "InvalidMinuteSecondDelimiter", Seconds = "1970-01-01T00:00-00", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "InvalidSecondValue", Seconds = "1970-01-01T00:00:AA", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "TooShortSecondDigit", Seconds = "1970-01-01T00:00:0", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "TooLargeSecondValue", Seconds = "1970-01-01T00:00:60", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "TooSmallSecondValue", Seconds = "1970-01-01T00:00:-01", Nanoseconds = ".123456789", IsNanosecondsCase = false }, + new { Kind = "InvalidNanosecondDelimiter", Seconds = "1970-01-01T00:00:00", Nanoseconds = "_123456789", IsNanosecondsCase = true }, + new { Kind = "InvalidNanosecondValue", Seconds = "1970-01-01T00:00:00", Nanoseconds = ".AAABBBCCC", IsNanosecondsCase = true }, + new { Kind = "TooShortNanosecondDigit", Seconds = "1970-01-01T00:00:00", Nanoseconds = ".12345678", IsNanosecondsCase = true }, + new { Kind = "TooLargeNanosecondValue", Seconds = "1970-01-01T00:00:00", Nanoseconds = ".1000000000", IsNanosecondsCase = true }, + new { Kind = "TooSmallNanosecondValue", Seconds = "1970-01-01T00:00:00", Nanoseconds = ".-000000001", IsNanosecondsCase = true } + } +) +{ + foreach ( var variation in + new [] + { + new { Format = "o", HasNanoseconds = true }, + new { Format = "s", HasNanoseconds = false } + } + ) + { + if ( @case.IsNanosecondsCase && !variation.HasNanoseconds ) + { + // skip + continue; + } + +#> + [Test] + public void TestParseExact_ParseError_<#= @case.Kind #>_<#= variation.Format #>() + { + Assert.Throws( + () => Timestamp.ParseExact( + "<#= @case.Seconds #><#= variation.HasNanoseconds ? @case.Nanoseconds : String.Empty #>Z", + "<#= variation.Format #>", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_<#= @case.Kind #>_<#= variation.Format #>() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "<#= @case.Seconds #><#= variation.HasNanoseconds ? @case.Nanoseconds : String.Empty #>Z", + "<#= variation.Format #>", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + +<# + } +} // ParseErrors + +// ParseError - MissingUtcSign +foreach ( var variation in + new [] + { + new { Format = "o", HasNanoseconds = true }, + new { Format = "s", HasNanoseconds = false } + } +) +{ +#> + + [Test] + public void TestParseExact_ParseError_MissingUtcSign_<#= variation.Format #>() + { + Assert.Throws( + () => Timestamp.ParseExact( + "1970-01-01T00:00:00<#= variation.HasNanoseconds ? ".123456789" : String.Empty #>", + "<#= variation.Format #>", + null, + DateTimeStyles.None + ) + ); + } + + [Test] + public void TestTryParseExact_ParseError_MissingUtcSign_<#= variation.Format #>() + { + Timestamp result; + Assert.That( + Timestamp.TryParseExact( + "1970-01-01T00:00:00<#= variation.HasNanoseconds ? ".123456789" : String.Empty #>", + "<#= variation.Format #>", + null, + DateTimeStyles.None, + out result + ), + Is.False + ); + Assert.That( result, Is.EqualTo( default( Timestamp ) ) ); + } + +<# +} // ParseErrors - MissingUtcSign + +// Argument Errors +foreach ( var @case in + new [] + { + new { Label = "NullValue", Arguments = "null, \"o\"", Styles = "DateTimeStyles.None", IsStylesCase = false, Exception = "ArgumentNullException" }, + new { Label = "NullFormat", Arguments = "null, \"o\"", Styles = "DateTimeStyles.None", IsStylesCase = false, Exception = "ArgumentNullException" }, + new { Label = "UnsupportedFormat", Arguments = "\"1970-01-01T00:00:00\", \"G\"", Styles = "DateTimeStyles.None", IsStylesCase = false, Exception = "ArgumentException" }, + new { Label = "InvalidStyles", Arguments = "\"1970-01-01T00:00:00\", \"o\"", Styles = "DateTimeStyles.AdjustToUniversal", IsStylesCase = true, Exception = "ArgumentException" }, + } +) +{ +#> + [Test] + public void TestParseExact_WithDateTimeStyles_<#= @case.Label #>() + { + Assert.Throws<<#= @case.Exception #>>( + () => Timestamp.ParseExact( <#= @case.Arguments #>, CultureInfo.InvariantCulture, <#= @case.Styles #> ) + ); + } + +<# + if ( !@case.IsStylesCase ) + { +#> + [Test] + public void TestParseExact_WithoutDateTimeStyles_<#= @case.Label #>() + { + Assert.Throws<<#= @case.Exception #>>( + () => Timestamp.ParseExact( <#= @case.Arguments #>, CultureInfo.InvariantCulture ) + ); + } + +<# + } // if !@case.IsStylesCase +#> + [Test] + public void TestTryParseExact_<#= @case.Label #>() + { + Timestamp result; + Assert.Throws<<#= @case.Exception #>>( + () => Timestamp.TryParseExact( <#= @case.Arguments #>, CultureInfo.InvariantCulture, <#= @case.Styles #>, out result ) + ); + } +<# +} // Argument Errors +#> + + [Test] + public void TestParseExact_DatesAD() + { + var seconds = <#= DateTimeOffset.MinValue.ToUnixTimeSeconds() #>L; + foreach ( var year in Enumerable.Range( 1, 802 ) ) + { + var isLeapYear = year % 400 == 0 || ( year % 4 == 0 && year % 100 != 0 ); + foreach ( var dayOfYear in Enumerable.Range( 1, isLeapYear ? 366 : 365 ) ) + { + var expected = new DateTimeOffset( year, 1, 1, 0, 0, 0, TimeSpan.Zero ).AddDays( dayOfYear - 1 ); + var target = Timestamp.ParseExact( String.Format( CultureInfo.InvariantCulture, "{0:yyyy-MM-dd'T'HH:mm:ss}.000000000Z", expected ), "o", null ); + Assert.That( expected.DayOfYear, Is.EqualTo( dayOfYear ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.Year, Is.EqualTo( expected.Year ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "{0:yyyy-MM-dd}", expected ); + + seconds += 24 * 60 * 60; + } + } + } + + [Test] + public void TestParseExact_DatesBC() + { + var seconds = <#= DateTimeOffset.MinValue.ToUnixTimeSeconds() #>L; + var dayOfWeek = ( long )DateTimeOffset.MinValue.DayOfWeek; + + foreach ( var year in Enumerable.Range( 1, 802 ).Select( x => 1 - x ) ) + { + var isLeapYear = year % 400 == 0 || ( year % 4 == 0 && year % 100 != 0 ); + var month = 12; + var day = 31; + var daysInMonths = isLeapYear ? DaysInMonthsInLeapYear : DaysInMonthsInNonLeapYear; + + foreach ( var dayOfYear in Enumerable.Range( 1, isLeapYear ? 366 : 365 ).Reverse() ) + { + seconds -= 24 * 60 * 60; + dayOfWeek--; + if ( dayOfWeek < 0 ) + { + dayOfWeek = 6; + } + + var target = Timestamp.ParseExact( String.Format( CultureInfo.InvariantCulture, "{0:0000}-{1:00}-{2:00}T00:00:00.000000000Z", year, month, day ), "o", null ); + Assert.That( target.DayOfYear, Is.EqualTo( dayOfYear ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + Assert.That( target.Year, Is.EqualTo( year ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + Assert.That( target.Month, Is.EqualTo( month ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + Assert.That( target.Day, Is.EqualTo( day ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + Assert.That( target.DayOfWeek, Is.EqualTo( ( DayOfWeek )dayOfWeek ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + + if ( day == 1 ) + { + month--; + day = daysInMonths[ month ]; + } + else + { + day--; + } + } + } + } + } +} diff --git a/test/MsgPack.UnitTest/TimestampTest.Properties.cs b/test/MsgPack.UnitTest/TimestampTest.Properties.cs new file mode 100644 index 000000000..8fdb4af00 --- /dev/null +++ b/test/MsgPack.UnitTest/TimestampTest.Properties.cs @@ -0,0 +1,893 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#endregion -- License Terms -- + +using System; +using System.Linq; +#if !MSTEST +using NUnit.Framework; +#else +using TestFixtureAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using TestAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +using TimeoutAttribute = NUnit.Framework.TimeoutAttribute; +using Assert = NUnit.Framework.Assert; +using Is = NUnit.Framework.Is; +#endif + +namespace MsgPack +{ + partial class TimestampTest + { + [Test] + public void TestProperties_Zero() + { + // 1970-01-01T00:00:00.000000000Z + var target = new Timestamp( 0, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( 0 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 1970 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 1 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 1 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Thursday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_Minus1Sec() + { + // 1969-12-31T23:59:59.000000000Z + var target = new Timestamp( -1, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -1 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 1969 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 12 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 31 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 23 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 59 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 59 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 365 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Wednesday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_Plus1Sec() + { + // 1970-01-01T00:00:01.000000000Z + var target = new Timestamp( 1, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( 1 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 1970 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 1 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 1 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 1 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Thursday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_Minus1Nsec() + { + // 1969-12-31T23:59:59.999999999Z + var target = new Timestamp( -1, 999999999 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -1 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 999999999 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 1969 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 12 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 31 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 23 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 59 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 59 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 999 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 999 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 999 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 365 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Wednesday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_Plus1Nsec() + { + // 1970-01-01T00:00:00.000000001Z + var target = new Timestamp( 0, 1 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( 0 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 1 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 1970 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 1 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 1 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 1 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Thursday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_DateTimeMin() + { + // 0001-01-01T00:00:00.000000000Z + var target = new Timestamp( -62135596800, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -62135596800 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 1 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 1 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 1 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Monday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_DateTimeMax() + { + // 9999-12-31T23:59:59.000000000Z + var target = new Timestamp( 253402300799, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( 253402300799 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 9999 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 12 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 31 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 23 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 59 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 59 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 365 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Friday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_DateTimeMinMinus1Day() + { + // 0000-12-31T00:00:00.000000000Z + var target = new Timestamp( -62135683200, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -62135683200 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 0 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 12 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 31 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 366 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Sunday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( true ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_DateTimeMaxPlus1Day() + { + // 10000-01-01T23:59:59.000000000Z + var target = new Timestamp( 253402387199, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( 253402387199 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 10000 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 1 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 23 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 59 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 59 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 1 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Saturday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( true ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_DateTimeMinMinus1Sec() + { + // 0000-12-31T23:59:59.000000000Z + var target = new Timestamp( -62135596801, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -62135596801 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 0 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 12 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 31 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 23 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 59 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 59 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 366 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Sunday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( true ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_DateTimeMaxPlus1Sec() + { + // 10000-01-01T00:00:00.000000000Z + var target = new Timestamp( 253402300800, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( 253402300800 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 10000 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 1 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 1 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Saturday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( true ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_DateTimeMinMinus1Nsec() + { + // 0000-12-31T23:59:59.999999999Z + var target = new Timestamp( -62135596801, 999999999 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -62135596801 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 999999999 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 0 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 12 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 31 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 23 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 59 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 59 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 999 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 999 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 999 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 366 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Sunday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( true ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_DateTimeMaxPlus1Nsec() + { + // 9999-12-31T23:59:59.000000001Z + var target = new Timestamp( 253402300799, 1 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( 253402300799 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 1 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 9999 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 12 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 31 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 23 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 59 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 59 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 1 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 365 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Friday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_TimestampMin() + { + // -584554047284-02-23T16:59:44.000000000Z + var target = new Timestamp( -9223372036854775808, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -9223372036854775808 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( -584554047284 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 2 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 23 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 16 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 59 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 44 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 54 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Saturday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( true ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_TimestampMax() + { + // 584554051223-11-09T07:00:16.999999999Z + var target = new Timestamp( 9223372036854775807, 999999999 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( 9223372036854775807 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 999999999 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 584554051223 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 11 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 9 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 7 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 16 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 999 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 999 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 999 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 313 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Sunday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_Distinguishable() + { + // 1234-05-06T07:08:09.123456789Z + var target = new Timestamp( -23215049511, 123456789 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -23215049511 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 123456789 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 1234 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 5 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 6 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 7 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 8 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 9 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 123 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 456 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 789 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 126 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Saturday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_Year0() + { + // 0000-03-01T00:00:00.000000000Z + var target = new Timestamp( -62162035200, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -62162035200 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 0 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 3 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 61 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Wednesday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( true ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_Year1() + { + // 0001-03-01T00:00:00.000000000Z + var target = new Timestamp( -62130499200, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -62130499200 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 1 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 3 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 60 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Thursday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_Year4() + { + // 0004-03-01T00:00:00.000000000Z + var target = new Timestamp( -62035804800, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -62035804800 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 4 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 3 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 61 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Monday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( true ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_Year100() + { + // 0100-03-01T00:00:00.000000000Z + var target = new Timestamp( -59006361600, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -59006361600 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 100 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 3 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 60 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Monday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_Year400() + { + // 0400-03-01T00:00:00.000000000Z + var target = new Timestamp( -49539254400, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -49539254400 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 400 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 3 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 61 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Wednesday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( true ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_Year10000() + { + // 10000-03-01T00:00:00.000000000Z + var target = new Timestamp( 253407484800, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( 253407484800 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 10000 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 3 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 61 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Wednesday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( true ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_Year10001() + { + // 10001-03-01T00:00:00.000000000Z + var target = new Timestamp( 253439020800, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( 253439020800 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 10001 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 3 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 60 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Thursday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_Year10100() + { + // 10100-03-01T00:00:00.000000000Z + var target = new Timestamp( 256563158400, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( 256563158400 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 10100 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 3 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 60 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Monday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_Year10400() + { + // 10400-03-01T00:00:00.000000000Z + var target = new Timestamp( 266030265600, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( 266030265600 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( 10400 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 3 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 61 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Wednesday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( true ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_YearMinus1() + { + // -0001-03-01T00:00:00.000000000Z + var target = new Timestamp( -62193657600, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -62193657600 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( -1 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 3 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 60 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Monday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_YearMinus3() + { + // -0003-03-01T00:00:00.000000000Z + var target = new Timestamp( -62256729600, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -62256729600 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( -3 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 3 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 60 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Saturday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_YearMinus4() + { + // -0004-03-01T00:00:00.000000000Z + var target = new Timestamp( -62288265600, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -62288265600 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( -4 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 3 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 61 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Friday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( true ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_YearMinus99() + { + // -0099-03-01T00:00:00.000000000Z + var target = new Timestamp( -65286259200, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -65286259200 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( -99 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 3 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 60 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Friday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_YearMinus100() + { + // -0100-03-01T00:00:00.000000000Z + var target = new Timestamp( -65317795200, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -65317795200 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( -100 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 3 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 60 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Thursday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_YearMinus399() + { + // -0399-03-01T00:00:00.000000000Z + var target = new Timestamp( -74753280000, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -74753280000 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( -399 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 3 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 60 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Thursday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + } + + [Test] + public void TestProperties_YearMinus400() + { + // -0400-03-01T00:00:00.000000000Z + var target = new Timestamp( -74784816000, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -74784816000 ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( -400 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 3 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 1 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 0 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 0 ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( 61 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Wednesday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( true ), "IsLeapYear" ); + } + + [Test] + public void TestUtcNow() + { + var before = DateTimeOffset.UtcNow; + var target = Timestamp.UtcNow; + var after = DateTimeOffset.UtcNow; + // Assert before <= now <= after + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( before.ToUnixTimeSeconds() ).Or.GreaterThan( before.ToUnixTimeSeconds() ) ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( after.ToUnixTimeSeconds() ).Or.LessThan( after.ToUnixTimeSeconds() ) ); + } + + [Test] + public void TestToday() + { + var before = new DateTimeOffset( DateTimeOffset.UtcNow.Date, TimeSpan.Zero ); + var target = Timestamp.Today; + var after = new DateTimeOffset( DateTimeOffset.UtcNow.Date, TimeSpan.Zero ); + // Assert before <= today <= after + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( before.ToUnixTimeSeconds() ).Or.GreaterThan( before.ToUnixTimeSeconds() ) ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( after.ToUnixTimeSeconds() ).Or.LessThan( after.ToUnixTimeSeconds() ) ); + } + + [Test] + public void TestProperties_DatesAD() + { + var seconds = -62135596800L; + foreach ( var year in Enumerable.Range( 1, 802 ) ) + { + var isLeapYear = year % 400 == 0 || ( year % 4 == 0 && year % 100 != 0 ); + foreach ( var dayOfYear in Enumerable.Range( 1, isLeapYear ? 366 : 365 ) ) + { + var target = new Timestamp( seconds, 0 ); + var expected = new DateTimeOffset( year, 1, 1, 0, 0, 0, TimeSpan.Zero ).AddDays( dayOfYear - 1 ); + Assert.That( expected.DayOfYear, Is.EqualTo( dayOfYear ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.Year, Is.EqualTo( expected.Year ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "{0:yyyy-MM-dd}", expected ); + + seconds += 24 * 60 * 60; + } + } + } + + [Test] + public void TestProperties_DatesBC() + { + var seconds = -62135596800L; + var dayOfWeek = ( long )DateTimeOffset.MinValue.DayOfWeek; + + foreach ( var year in Enumerable.Range( 1, 802 ).Select( x => 1 - x ) ) + { + var isLeapYear = year % 400 == 0 || ( year % 4 == 0 && year % 100 != 0 ); + var month = 12; + var day = 31; + var daysInMonths = isLeapYear ? DaysInMonthsInLeapYear : DaysInMonthsInNonLeapYear; + + foreach ( var dayOfYear in Enumerable.Range( 1, isLeapYear ? 366 : 365 ).Reverse() ) + { + seconds -= 24 * 60 * 60; + dayOfWeek--; + if ( dayOfWeek < 0 ) + { + dayOfWeek = 6; + } + + var target = new Timestamp( seconds, 0 ); + Assert.That( target.DayOfYear, Is.EqualTo( dayOfYear ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + Assert.That( target.Year, Is.EqualTo( year ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + Assert.That( target.Month, Is.EqualTo( month ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + Assert.That( target.Day, Is.EqualTo( day ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + Assert.That( target.DayOfWeek, Is.EqualTo( ( DayOfWeek )dayOfWeek ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + + if ( day == 1 ) + { + month--; + day = daysInMonths[ month ]; + } + else + { + day--; + } + } + } + } + } +} diff --git a/test/MsgPack.UnitTest/TimestampTest.Properties.tt b/test/MsgPack.UnitTest/TimestampTest.Properties.tt new file mode 100644 index 000000000..c8c65ec22 --- /dev/null +++ b/test/MsgPack.UnitTest/TimestampTest.Properties.tt @@ -0,0 +1,164 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ output extension=".cs" #> +<#@ assembly Name="System.Core" #> +<#@ include file="TimestampTest.Common.ttinclude" #> +<#@ import namespace="System" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.Globalization" #> +<#@ import namespace="System.Linq" #> +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#endregion -- License Terms -- + +using System; +using System.Linq; +#if !MSTEST +using NUnit.Framework; +#else +using TestFixtureAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using TestAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +using TimeoutAttribute = NUnit.Framework.TimeoutAttribute; +using Assert = NUnit.Framework.Assert; +using Is = NUnit.Framework.Is; +#endif + +namespace MsgPack +{ + partial class TimestampTest + { +<# +foreach ( var @case in StandardTestCases.Values ) +{ +#> + [Test] + public void TestProperties_<#= @case.Label #>() + { + // <#= @case.RoundTripString #> + var target = new Timestamp( <#= @case.Seconds #>, <#= @case.Nanoseconds #> ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( <#= @case.Seconds #> ), "UnixEpochSecondsPart" ); + Assert.That( target.NanosecondsPart, Is.EqualTo( <#= @case.Nanoseconds #> ), "NanosecondsPart" ); + + Assert.That( target.Year, Is.EqualTo( <#= @case.Year #> ), "Year" ); + Assert.That( target.Month, Is.EqualTo( <#= @case.Month #> ), "Month" ); + Assert.That( target.Day, Is.EqualTo( <#= @case.Day #> ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( <#= @case.Hour #> ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( <#= @case.Minute #> ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( <#= @case.Second #> ), "Second" ); + + Assert.That( target.Millisecond, Is.EqualTo( <#= @case.Nanoseconds / 1000000 #> ), "Millisecond" ); + Assert.That( target.Microsecond, Is.EqualTo( <#= @case.Nanoseconds / 1000 % 1000 #> ), "Microsecond" ); + Assert.That( target.Nanosecond, Is.EqualTo( <#= @case.Nanoseconds % 1000 #> ), "Nanosecond" ); + + Assert.That( target.DayOfYear, Is.EqualTo( <#= @case.DayOfYear #> ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.<#= @case.DayOfWeek #> ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( <#= @case.IsLeapYear ? "true" : "false" #> ), "IsLeapYear" ); + } + +<# +} +#> + [Test] + public void TestUtcNow() + { + var before = DateTimeOffset.UtcNow; + var target = Timestamp.UtcNow; + var after = DateTimeOffset.UtcNow; + // Assert before <= now <= after + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( before.ToUnixTimeSeconds() ).Or.GreaterThan( before.ToUnixTimeSeconds() ) ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( after.ToUnixTimeSeconds() ).Or.LessThan( after.ToUnixTimeSeconds() ) ); + } + + [Test] + public void TestToday() + { + var before = new DateTimeOffset( DateTimeOffset.UtcNow.Date, TimeSpan.Zero ); + var target = Timestamp.Today; + var after = new DateTimeOffset( DateTimeOffset.UtcNow.Date, TimeSpan.Zero ); + // Assert before <= today <= after + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( before.ToUnixTimeSeconds() ).Or.GreaterThan( before.ToUnixTimeSeconds() ) ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( after.ToUnixTimeSeconds() ).Or.LessThan( after.ToUnixTimeSeconds() ) ); + } + + [Test] + public void TestProperties_DatesAD() + { + var seconds = <#= DateTimeOffset.MinValue.ToUnixTimeSeconds() #>L; + foreach ( var year in Enumerable.Range( 1, 802 ) ) + { + var isLeapYear = year % 400 == 0 || ( year % 4 == 0 && year % 100 != 0 ); + foreach ( var dayOfYear in Enumerable.Range( 1, isLeapYear ? 366 : 365 ) ) + { + var target = new Timestamp( seconds, 0 ); + var expected = new DateTimeOffset( year, 1, 1, 0, 0, 0, TimeSpan.Zero ).AddDays( dayOfYear - 1 ); + Assert.That( expected.DayOfYear, Is.EqualTo( dayOfYear ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.DayOfYear, Is.EqualTo( expected.DayOfYear ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.Year, Is.EqualTo( expected.Year ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.Month, Is.EqualTo( expected.Month ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.Day, Is.EqualTo( expected.Day ), "{0:yyyy-MM-dd}", expected ); + Assert.That( target.DayOfWeek, Is.EqualTo( expected.DayOfWeek ), "{0:yyyy-MM-dd}", expected ); + + seconds += 24 * 60 * 60; + } + } + } + + [Test] + public void TestProperties_DatesBC() + { + var seconds = <#= DateTimeOffset.MinValue.ToUnixTimeSeconds() #>L; + var dayOfWeek = ( long )DateTimeOffset.MinValue.DayOfWeek; + + foreach ( var year in Enumerable.Range( 1, 802 ).Select( x => 1 - x ) ) + { + var isLeapYear = year % 400 == 0 || ( year % 4 == 0 && year % 100 != 0 ); + var month = 12; + var day = 31; + var daysInMonths = isLeapYear ? DaysInMonthsInLeapYear : DaysInMonthsInNonLeapYear; + + foreach ( var dayOfYear in Enumerable.Range( 1, isLeapYear ? 366 : 365 ).Reverse() ) + { + seconds -= 24 * 60 * 60; + dayOfWeek--; + if ( dayOfWeek < 0 ) + { + dayOfWeek = 6; + } + + var target = new Timestamp( seconds, 0 ); + Assert.That( target.DayOfYear, Is.EqualTo( dayOfYear ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + Assert.That( target.Year, Is.EqualTo( year ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + Assert.That( target.Month, Is.EqualTo( month ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + Assert.That( target.Day, Is.EqualTo( day ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + Assert.That( target.DayOfWeek, Is.EqualTo( ( DayOfWeek )dayOfWeek ), "{0:0000}-{1:00}-{2:00}", year, month, day ); + + if ( day == 1 ) + { + month--; + day = daysInMonths[ month ]; + } + else + { + day--; + } + } + } + } + } +} diff --git a/test/MsgPack.UnitTest/TimestampTest.ToString.cs b/test/MsgPack.UnitTest/TimestampTest.ToString.cs new file mode 100644 index 000000000..3defcc20c --- /dev/null +++ b/test/MsgPack.UnitTest/TimestampTest.ToString.cs @@ -0,0 +1,936 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#endregion -- License Terms -- + +using System; +using System.Globalization; +#if NET35 +using System.Threading; +#endif // NET35 +#if !MSTEST +using NUnit.Framework; +#else +using TestFixtureAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using TestAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +using TimeoutAttribute = NUnit.Framework.TimeoutAttribute; +using Assert = NUnit.Framework.Assert; +using Is = NUnit.Framework.Is; +#endif + +namespace MsgPack +{ + partial class TimestampTest + { + [Test] + public void TestToStringCore_Zero_LowerO() + { + var value = + new Timestamp.Value( + 0, + 1, + 1, + 0, + 0, + 0, + 0 + ); + Assert.That( + TimestampStringConverter.ToString( + "o", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "0000-01-01T00:00:00.000000000Z" ) + ); + } + + [Test] + public void TestToStringCore_Zero_UpperO() + { + var value = + new Timestamp.Value( + 0, + 1, + 1, + 0, + 0, + 0, + 0 + ); + Assert.That( + TimestampStringConverter.ToString( + "O", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "0000-01-01T00:00:00.000000000Z" ) + ); + } + + [Test] + public void TestToStringCore_Zero_LowerS() + { + var value = + new Timestamp.Value( + 0, + 1, + 1, + 0, + 0, + 0, + 0 + ); + Assert.That( + TimestampStringConverter.ToString( + "s", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "0000-01-01T00:00:00Z" ) + ); + } + + [Test] + public void TestToStringCore_FullDigits_LowerO() + { + var value = + new Timestamp.Value( + 1000, + 10, + 10, + 10, + 10, + 10, + 123456789 + ); + Assert.That( + TimestampStringConverter.ToString( + "o", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "1000-10-10T10:10:10.123456789Z" ) + ); + } + + [Test] + public void TestToStringCore_FullDigits_UpperO() + { + var value = + new Timestamp.Value( + 1000, + 10, + 10, + 10, + 10, + 10, + 123456789 + ); + Assert.That( + TimestampStringConverter.ToString( + "O", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "1000-10-10T10:10:10.123456789Z" ) + ); + } + + [Test] + public void TestToStringCore_FullDigits_LowerS() + { + var value = + new Timestamp.Value( + 1000, + 10, + 10, + 10, + 10, + 10, + 123456789 + ); + Assert.That( + TimestampStringConverter.ToString( + "s", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "1000-10-10T10:10:10Z" ) + ); + } + + [Test] + public void TestToStringCore_YearMinus1_LowerO() + { + var value = + new Timestamp.Value( + -1, + 1, + 1, + 0, + 0, + 0, + 0 + ); + Assert.That( + TimestampStringConverter.ToString( + "o", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "-0001-01-01T00:00:00.000000000Z" ) + ); + } + + [Test] + public void TestToStringCore_YearMinus1_UpperO() + { + var value = + new Timestamp.Value( + -1, + 1, + 1, + 0, + 0, + 0, + 0 + ); + Assert.That( + TimestampStringConverter.ToString( + "O", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "-0001-01-01T00:00:00.000000000Z" ) + ); + } + + [Test] + public void TestToStringCore_YearMinus1_LowerS() + { + var value = + new Timestamp.Value( + -1, + 1, + 1, + 0, + 0, + 0, + 0 + ); + Assert.That( + TimestampStringConverter.ToString( + "s", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "-0001-01-01T00:00:00Z" ) + ); + } + + [Test] + public void TestToStringCore_YearMinus1000_LowerO() + { + var value = + new Timestamp.Value( + -1000, + 1, + 1, + 0, + 0, + 0, + 0 + ); + Assert.That( + TimestampStringConverter.ToString( + "o", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "-1000-01-01T00:00:00.000000000Z" ) + ); + } + + [Test] + public void TestToStringCore_YearMinus1000_UpperO() + { + var value = + new Timestamp.Value( + -1000, + 1, + 1, + 0, + 0, + 0, + 0 + ); + Assert.That( + TimestampStringConverter.ToString( + "O", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "-1000-01-01T00:00:00.000000000Z" ) + ); + } + + [Test] + public void TestToStringCore_YearMinus1000_LowerS() + { + var value = + new Timestamp.Value( + -1000, + 1, + 1, + 0, + 0, + 0, + 0 + ); + Assert.That( + TimestampStringConverter.ToString( + "s", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "-1000-01-01T00:00:00Z" ) + ); + } + + [Test] + public void TestToStringCore_Year10000_LowerO() + { + var value = + new Timestamp.Value( + 10000, + 10, + 10, + 10, + 10, + 10, + 123456789 + ); + Assert.That( + TimestampStringConverter.ToString( + "o", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "10000-10-10T10:10:10.123456789Z" ) + ); + } + + [Test] + public void TestToStringCore_Year10000_UpperO() + { + var value = + new Timestamp.Value( + 10000, + 10, + 10, + 10, + 10, + 10, + 123456789 + ); + Assert.That( + TimestampStringConverter.ToString( + "O", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "10000-10-10T10:10:10.123456789Z" ) + ); + } + + [Test] + public void TestToStringCore_Year10000_LowerS() + { + var value = + new Timestamp.Value( + 10000, + 10, + 10, + 10, + 10, + 10, + 123456789 + ); + Assert.That( + TimestampStringConverter.ToString( + "s", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "10000-10-10T10:10:10Z" ) + ); + } + + [Test] + public void TestToStringCore_YearMinus10000_LowerO() + { + var value = + new Timestamp.Value( + -10000, + 10, + 10, + 10, + 10, + 10, + 123456789 + ); + Assert.That( + TimestampStringConverter.ToString( + "o", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "-10000-10-10T10:10:10.123456789Z" ) + ); + } + + [Test] + public void TestToStringCore_YearMinus10000_UpperO() + { + var value = + new Timestamp.Value( + -10000, + 10, + 10, + 10, + 10, + 10, + 123456789 + ); + Assert.That( + TimestampStringConverter.ToString( + "O", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "-10000-10-10T10:10:10.123456789Z" ) + ); + } + + [Test] + public void TestToStringCore_YearMinus10000_LowerS() + { + var value = + new Timestamp.Value( + -10000, + 10, + 10, + 10, + 10, + 10, + 123456789 + ); + Assert.That( + TimestampStringConverter.ToString( + "s", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "-10000-10-10T10:10:10Z" ) + ); + } + + [Test] + public void TestToStringCore_TimestampMin_LowerO() + { + var value = + new Timestamp.Value( + -584554047284, + 2, + 23, + 16, + 59, + 44, + 0 + ); + Assert.That( + TimestampStringConverter.ToString( + "o", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "-584554047284-02-23T16:59:44.000000000Z" ) + ); + } + + [Test] + public void TestToStringCore_TimestampMin_UpperO() + { + var value = + new Timestamp.Value( + -584554047284, + 2, + 23, + 16, + 59, + 44, + 0 + ); + Assert.That( + TimestampStringConverter.ToString( + "O", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "-584554047284-02-23T16:59:44.000000000Z" ) + ); + } + + [Test] + public void TestToStringCore_TimestampMin_LowerS() + { + var value = + new Timestamp.Value( + -584554047284, + 2, + 23, + 16, + 59, + 44, + 0 + ); + Assert.That( + TimestampStringConverter.ToString( + "s", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "-584554047284-02-23T16:59:44Z" ) + ); + } + + [Test] + public void TestToStringCore_TimestampMax_LowerO() + { + var value = + new Timestamp.Value( + 584554051223, + 11, + 9, + 7, + 0, + 16, + 999999999 + ); + Assert.That( + TimestampStringConverter.ToString( + "o", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "584554051223-11-09T07:00:16.999999999Z" ) + ); + } + + [Test] + public void TestToStringCore_TimestampMax_UpperO() + { + var value = + new Timestamp.Value( + 584554051223, + 11, + 9, + 7, + 0, + 16, + 999999999 + ); + Assert.That( + TimestampStringConverter.ToString( + "O", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "584554051223-11-09T07:00:16.999999999Z" ) + ); + } + + [Test] + public void TestToStringCore_TimestampMax_LowerS() + { + var value = + new Timestamp.Value( + 584554051223, + 11, + 9, + 7, + 0, + 16, + 999999999 + ); + Assert.That( + TimestampStringConverter.ToString( + "s", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "584554051223-11-09T07:00:16Z" ) + ); + } + + [Test] + public void TestToString_String_IFormatProvider_Distinguishable_o_InvariantCulture() + { + Assert.That( + new Timestamp( + -23215049511, + 123456789 + ).ToString( "o", CultureInfo.InvariantCulture ), + Is.EqualTo( "1234-05-06T07:08:09.123456789Z" ) + ); + } + + [Test] + public void TestToString_String_IFormatProvider_Distinguishable_s_InvariantCulture() + { + Assert.That( + new Timestamp( + -23215049511, + 123456789 + ).ToString( "s", CultureInfo.InvariantCulture ), + Is.EqualTo( "1234-05-06T07:08:09Z" ) + ); + } + + [Test] + public void TestToString_String_IFormatProvider_Distinguishable_null_InvariantCulture_FormatIsO() + { + Assert.That( + new Timestamp( + -23215049511, + 123456789 + ).ToString( null, CultureInfo.InvariantCulture ), + Is.EqualTo( "1234-05-06T07:08:09.123456789Z" ) + ); + } + + [Test] + public void TestToString_String_IFormatProvider_YearMinus1_o_InvariantCulture() + { + Assert.That( + new Timestamp( + -62193657600, + 0 + ).ToString( "o", CultureInfo.InvariantCulture ), + Is.EqualTo( "-0001-03-01T00:00:00.000000000Z" ) + ); + } + + [Test] + public void TestToString_String_IFormatProvider_YearMinus1_s_InvariantCulture() + { + Assert.That( + new Timestamp( + -62193657600, + 0 + ).ToString( "s", CultureInfo.InvariantCulture ), + Is.EqualTo( "-0001-03-01T00:00:00Z" ) + ); + } + + [Test] + public void TestToString_String_IFormatProvider_YearMinus1_null_InvariantCulture_FormatIsO() + { + Assert.That( + new Timestamp( + -62193657600, + 0 + ).ToString( null, CultureInfo.InvariantCulture ), + Is.EqualTo( "-0001-03-01T00:00:00.000000000Z" ) + ); + } + + [Test] + public void TestToString_String_IFormatProvider_Distinguishable_o_CustomCulture_UsedForNegativeSign() + { + Assert.That( + new Timestamp( + -23215049511, + 123456789 + ).ToString( "o", new LegacyJapaneseCultureInfo() ), + Is.EqualTo( "1234-05-06T07:08:09.123456789Z" ) + ); + } + + [Test] + public void TestToString_String_IFormatProvider_Distinguishable_o_null_CurrentCultureIsUsed() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Assert.That( + new Timestamp( + -23215049511, + 123456789 + ).ToString( "o", null ), + Is.EqualTo( "1234-05-06T07:08:09.123456789Z" ) + ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + + [Test] + public void TestToString_String_IFormatProvider_Distinguishable_s_CustomCulture_UsedForNegativeSign() + { + Assert.That( + new Timestamp( + -23215049511, + 123456789 + ).ToString( "s", new LegacyJapaneseCultureInfo() ), + Is.EqualTo( "1234-05-06T07:08:09Z" ) + ); + } + + [Test] + public void TestToString_String_IFormatProvider_Distinguishable_s_null_CurrentCultureIsUsed() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Assert.That( + new Timestamp( + -23215049511, + 123456789 + ).ToString( "s", null ), + Is.EqualTo( "1234-05-06T07:08:09Z" ) + ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + + [Test] + public void TestToString_String_IFormatProvider_YearMinus1_o_CustomCulture_UsedForNegativeSign() + { + Assert.That( + new Timestamp( + -62193657600, + 0 + ).ToString( "o", new LegacyJapaneseCultureInfo() ), + Is.EqualTo( "|0001-03-01T00:00:00.000000000Z" ) + ); + } + + [Test] + public void TestToString_String_IFormatProvider_YearMinus1_o_null_CurrentCultureIsUsed() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Assert.That( + new Timestamp( + -62193657600, + 0 + ).ToString( "o", null ), + Is.EqualTo( "|0001-03-01T00:00:00.000000000Z" ) + ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + + [Test] + public void TestToString_String_IFormatProvider_YearMinus1_s_CustomCulture_UsedForNegativeSign() + { + Assert.That( + new Timestamp( + -62193657600, + 0 + ).ToString( "s", new LegacyJapaneseCultureInfo() ), + Is.EqualTo( "|0001-03-01T00:00:00Z" ) + ); + } + + [Test] + public void TestToString_String_IFormatProvider_YearMinus1_s_null_CurrentCultureIsUsed() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Assert.That( + new Timestamp( + -62193657600, + 0 + ).ToString( "s", null ), + Is.EqualTo( "|0001-03-01T00:00:00Z" ) + ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + + [Test] + public void TestToString_String_IFormatProvider_DefaultIsOk() + { + Assert.That( + default( Timestamp ).ToString( null, null ), + Is.EqualTo( "1970-01-01T00:00:00.000000000Z" ) + ); + } + + [Test] + public void TestToString_String_IFormatProvider_EmptyFormat() + { + Assert.Throws( + () => default( Timestamp ).ToString( String.Empty, null ) + ); + } + + [Test] + public void TestToString_String_IFormatProvider_UnsupportedFormat() + { + Assert.Throws( + () => default( Timestamp ).ToString( "G", null ) + ); + } + + [Test] + public void TestToString_AsOFormatAndNullIFormatProvider() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Assert.That( + new Timestamp( + -62193657600, + 0 + ).ToString(), + Is.EqualTo( "|0001-03-01T00:00:00.000000000Z" ) + ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + + [Test] + public void TestToString_IFormatProvider_AsOFormat() + { + Assert.That( + new Timestamp( + -62193657600, + 0 + ).ToString( new LegacyJapaneseCultureInfo() ), + Is.EqualTo( "|0001-03-01T00:00:00.000000000Z" ) + ); + } + + [Test] + public void TestToString_String_AsNullIFormatProvider() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Assert.That( + new Timestamp( + -62193657600, + 0 + ).ToString( "s" ), + Is.EqualTo( "|0001-03-01T00:00:00Z" ) + ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + } +} diff --git a/test/MsgPack.UnitTest/TimestampTest.ToString.tt b/test/MsgPack.UnitTest/TimestampTest.ToString.tt new file mode 100644 index 000000000..ef649e312 --- /dev/null +++ b/test/MsgPack.UnitTest/TimestampTest.ToString.tt @@ -0,0 +1,304 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ output extension=".cs" #> +<#@ assembly Name="System.Core" #> +<#@ include file="TimestampTest.Common.ttinclude" #> +<#@ import namespace="System" #> +<#@ import namespace="System.Collections.Generic" #> +<#@ import namespace="System.Globalization" #> +<#@ import namespace="System.Linq" #> +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#endregion -- License Terms -- + +using System; +using System.Globalization; +#if NET35 +using System.Threading; +#endif // NET35 +#if !MSTEST +using NUnit.Framework; +#else +using TestFixtureAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using TestAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +using TimeoutAttribute = NUnit.Framework.TimeoutAttribute; +using Assert = NUnit.Framework.Assert; +using Is = NUnit.Framework.Is; +#endif + +namespace MsgPack +{ + partial class TimestampTest + { +<# +// Success +foreach ( var @case in ParseToStringTestCases.Values ) +{ + foreach ( var variation in + new [] + { + new { FormatLabel = "LowerO", Format = "o", Expected = @case.RoundTripString }, + new { FormatLabel = "UpperO", Format = "O", Expected = @case.RoundTripString }, + new { FormatLabel = "LowerS", Format = "s", Expected = @case.SortableString }, + } + ) + { +#> + [Test] + public void TestToStringCore_<#= @case.Label #>_<#= variation.FormatLabel #>() + { + var value = + new Timestamp.Value( + <#= @case.Year #>, + <#= @case.Month #>, + <#= @case.Day #>, + <#= @case.Hour #>, + <#= @case.Minute #>, + <#= @case.Second #>, + <#= @case.Nanoseconds #> + ); + Assert.That( + TimestampStringConverter.ToString( + "<#= variation.Format #>", + CultureInfo.InvariantCulture, + ref value + ), + Is.EqualTo( "<#= variation.Expected #>" ) + ); + } + +<# + } +} // Success + +// Invariant +foreach ( var @case in + new [] + { + StandardTestCases[ "Distinguishable" ], + StandardTestCases[ "YearMinus1" ] + } +) +{ + foreach ( var variation in + new [] + { + new { Format = "o", Expected = @case.RoundTripString }, + new { Format = "s", Expected = @case.SortableString }, + } + ) + { +#> + [Test] + public void TestToString_String_IFormatProvider_<#= @case.Label #>_<#= variation.Format #>_InvariantCulture() + { + Assert.That( + new Timestamp( + <#= @case.Seconds #>, + <#= @case.Nanoseconds #> + ).ToString( "<#= variation.Format #>", CultureInfo.InvariantCulture ), + Is.EqualTo( "<#= variation.Expected #>" ) + ); + } + +<# + } +#> + [Test] + public void TestToString_String_IFormatProvider_<#= @case.Label #>_null_InvariantCulture_FormatIsO() + { + Assert.That( + new Timestamp( + <#= @case.Seconds #>, + <#= @case.Nanoseconds #> + ).ToString( null, CultureInfo.InvariantCulture ), + Is.EqualTo( "<#= @case.RoundTripString #>" ) + ); + } + +<# +} // Invariant + +// Current/Custom +foreach ( var @case in + new [] + { + StandardTestCases[ "Distinguishable" ], + StandardTestCases[ "YearMinus1" ] + } +) +{ + foreach ( var variation in + new [] + { + new { Format = "o", Expected = ToFullWidthNegativeSign( @case.RoundTripString ) }, + new { Format = "s", Expected = ToFullWidthNegativeSign( @case.SortableString ) }, + } + ) + { +#> + [Test] + public void TestToString_String_IFormatProvider_<#= @case.Label #>_<#= variation.Format #>_CustomCulture_UsedForNegativeSign() + { + Assert.That( + new Timestamp( + <#= @case.Seconds #>, + <#= @case.Nanoseconds #> + ).ToString( "<#= variation.Format #>", new LegacyJapaneseCultureInfo() ), + Is.EqualTo( "<#= variation.Expected #>" ) + ); + } + + [Test] + public void TestToString_String_IFormatProvider_<#= @case.Label #>_<#= variation.Format #>_null_CurrentCultureIsUsed() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Assert.That( + new Timestamp( + <#= @case.Seconds #>, + <#= @case.Nanoseconds #> + ).ToString( "<#= variation.Format #>", null ), + Is.EqualTo( "<#= variation.Expected #>" ) + ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + +<# + } +} // // Current/Custom + +// Overloads +#> + [Test] + public void TestToString_String_IFormatProvider_DefaultIsOk() + { + Assert.That( + default( Timestamp ).ToString( null, null ), + Is.EqualTo( "1970-01-01T00:00:00.000000000Z" ) + ); + } + + [Test] + public void TestToString_String_IFormatProvider_EmptyFormat() + { + Assert.Throws( + () => default( Timestamp ).ToString( String.Empty, null ) + ); + } + + [Test] + public void TestToString_String_IFormatProvider_UnsupportedFormat() + { + Assert.Throws( + () => default( Timestamp ).ToString( "G", null ) + ); + } + + [Test] + public void TestToString_AsOFormatAndNullIFormatProvider() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Assert.That( + new Timestamp( + <#= StandardTestCases[ "YearMinus1" ].Seconds #>, + <#= StandardTestCases[ "YearMinus1" ].Nanoseconds #> + ).ToString(), + Is.EqualTo( "<#= ToFullWidthNegativeSign( StandardTestCases[ "YearMinus1" ].RoundTripString ) #>" ) + ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + + [Test] + public void TestToString_IFormatProvider_AsOFormat() + { + Assert.That( + new Timestamp( + <#= StandardTestCases[ "YearMinus1" ].Seconds #>, + <#= StandardTestCases[ "YearMinus1" ].Nanoseconds #> + ).ToString( new LegacyJapaneseCultureInfo() ), + Is.EqualTo( "<#= ToFullWidthNegativeSign( StandardTestCases[ "YearMinus1" ].RoundTripString ) #>" ) + ); + } + + [Test] + public void TestToString_String_AsNullIFormatProvider() + { + var originalCurrentCulture = CultureInfo.CurrentCulture; + try + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + new LegacyJapaneseCultureInfo(); + Assert.That( + new Timestamp( + <#= StandardTestCases[ "YearMinus1" ].Seconds #>, + <#= StandardTestCases[ "YearMinus1" ].Nanoseconds #> + ).ToString( "s" ), + Is.EqualTo( "<#= ToFullWidthNegativeSign( StandardTestCases[ "YearMinus1" ].SortableString ) #>" ) + ); + } + finally + { +#if !NET35 + CultureInfo.CurrentCulture = +#else // !NET35 + Thread.CurrentThread.CurrentCulture = +#endif // !NET35 + originalCurrentCulture; + } + } + } +} diff --git a/test/MsgPack.UnitTest/TimestampTest.cs b/test/MsgPack.UnitTest/TimestampTest.cs new file mode 100644 index 000000000..bd0a3ec6b --- /dev/null +++ b/test/MsgPack.UnitTest/TimestampTest.cs @@ -0,0 +1,136 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#endregion -- License Terms -- + +using System; +#if !MSTEST +using NUnit.Framework; +#else +using TestFixtureAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using TestAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +using TimeoutAttribute = NUnit.Framework.TimeoutAttribute; +using Assert = NUnit.Framework.Assert; +using Is = NUnit.Framework.Is; +#endif + +namespace MsgPack +{ + [TestFixture] + public partial class TimestampTest + { + private static readonly int[] DaysInMonthsInNonLeapYear = + new[] { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; + private static readonly int[] DaysInMonthsInLeapYear = + new[] { 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; + + [Test] + public void TestZero_AllZero() + { + var target = Timestamp.Zero; + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( 0 ) ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ) ); + } + + [Test] + public void TestMaxValue_AllMax() + { + var target = Timestamp.MaxValue; + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( Int64.MaxValue ) ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 999999999 ) ); + } + + [Test] + public void TestMinValue_AllMin() + { + var target = Timestamp.MinValue; + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( Int64.MinValue ) ); + Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ) ); + } + + [Test] + public void TestConstractor_AsIs() + { + var unixEpochSeconds = DateTime.UtcNow.Ticks; + var nanoseconds = DateTime.UtcNow.Millisecond; + var target = new Timestamp( unixEpochSeconds, nanoseconds ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( unixEpochSeconds ) ); + Assert.That( target.NanosecondsPart, Is.EqualTo( nanoseconds ) ); + } + + [Test] + public void TestConstractor_Max_Ok() + { + var target = new Timestamp( Int64.MaxValue, 999999999 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( Timestamp.MaxValue.UnixEpochSecondsPart ) ); + Assert.That( target.NanosecondsPart, Is.EqualTo( Timestamp.MaxValue.NanosecondsPart ) ); + } + + [Test] + public void TestConstractor_Min_Ok() + { + var target = new Timestamp( Int64.MinValue, 0 ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( Timestamp.MinValue.UnixEpochSecondsPart ) ); + Assert.That( target.NanosecondsPart, Is.EqualTo( Timestamp.MinValue.NanosecondsPart ) ); + } + + [Test] + public void TestConstractor_TooLargeNanoseconds_Exception() + { + Assert.Throws( () => new Timestamp( 0, 999999999 + 1 ) ); + } + + [Test] + public void TestConstractor_TooSmallNanoseconds_Exception() + { + Assert.Throws( () => new Timestamp( 0, -1 ) ); + } + + [Test] + public void TestGetHashCode_Zero() + { + // Just check no exceptions thrown. + Timestamp.Zero.GetHashCode(); + } + + [Test] + public void TestGetHashCode_MaxValue() + { + // Just check no exceptions thrown. + Timestamp.MaxValue.GetHashCode(); + } + + [Test] + public void TestGetHashCode_MinValue() + { + // Just check no exceptions thrown. + Timestamp.MinValue.GetHashCode(); + } + + private static void AssertUtc( DateTime value ) + { + Assert.That( value.Kind, Is.EqualTo( DateTimeKind.Utc ) ); + } + + private static void AssertUtc( DateTimeOffset value ) + { + Assert.That( value.Offset, Is.EqualTo( TimeSpan.Zero ) ); + } + } +} From aab77e8446c53a61bc730e39ed847ca51ec257d8 Mon Sep 17 00:00:00 2001 From: yfakariya Date: Fri, 15 Sep 2017 09:44:19 +0900 Subject: [PATCH 05/23] Fix min/max expected value. These are borrowed from the PR of Timestamp spec, but they looks UInt64.MaxValue and UInt64.MaxValue * -1. --- .../TimestampTest.Common.ttinclude | 4 +- test/MsgPack.UnitTest/TimestampTest.Parse.cs | 24 +++--- .../TimestampTest.Properties.cs | 38 ++++----- .../TimestampTest.ToString.cs | 78 +++++++++---------- 4 files changed, 72 insertions(+), 72 deletions(-) diff --git a/test/MsgPack.UnitTest/TimestampTest.Common.ttinclude b/test/MsgPack.UnitTest/TimestampTest.Common.ttinclude index bdf80aed8..a247a9771 100644 --- a/test/MsgPack.UnitTest/TimestampTest.Common.ttinclude +++ b/test/MsgPack.UnitTest/TimestampTest.Common.ttinclude @@ -43,8 +43,8 @@ private static readonly Dictionary StandardTestCases = new TestCase { Label = "DateTimeMaxPlus1Sec", Seconds = MaxDateTime.ToUnixTimeSeconds() + 1, Nanoseconds = 0, Year = 10000, Month = 1, Day = 1, Hour = 0, Minute = 0, Second = 0, DayOfYear = 1, IsLeapYear = true, DayOfWeek = DayOfWeek.Saturday }, new TestCase { Label = "DateTimeMinMinus1Nsec", Seconds = MinDateTime.ToUnixTimeSeconds() - 1, Nanoseconds = 999999999, Year = 0, Month = 12, Day = 31, Hour = 23, Minute = 59, Second = 59, DayOfYear = 366, IsLeapYear = true, DayOfWeek = DayOfWeek.Sunday }, new TestCase { Label = "DateTimeMaxPlus1Nsec", Seconds = MaxDateTime.ToUnixTimeSeconds(), Nanoseconds = 1, Year = 9999, Month = 12, Day = 31, Hour = 23, Minute = 59, Second = 59, DayOfYear = 365, IsLeapYear = false, DayOfWeek = DayOfWeek.Friday }, - new TestCase { Label = "TimestampMin", Seconds = Int64.MinValue, Nanoseconds = 0, Year = -584554047284, Month = 2, Day = 23, Hour = 16, Minute = 59, Second = 44, DayOfYear = 54, IsLeapYear = true, DayOfWeek = ( DayOfWeek )( int )Math.Abs( ( ( Int64.MinValue + UnixEpochInSeconds ) / 86400 + ( int )UnixEpoch.DayOfWeek ) % 7 ) }, - new TestCase { Label = "TimestampMax", Seconds = Int64.MaxValue, Nanoseconds = 999999999, Year = 584554051223, Month = 11, Day = 9, Hour = 7, Minute = 0, Second = 16, DayOfYear = 313, IsLeapYear = false, DayOfWeek = ( DayOfWeek )( int )Math.Abs( ( ( Int64.MaxValue + UnixEpochInSeconds ) / 86400 + ( int )UnixEpoch.DayOfWeek ) % 7 ) }, + new TestCase { Label = "TimestampMin", Seconds = Int64.MinValue, Nanoseconds = 0, Year = -292277022657, Month = 1, Day = 27, Hour = 8, Minute = 29, Second = 52, DayOfYear = 27, IsLeapYear = false, DayOfWeek = DayOfWeek.Saturday }, + new TestCase { Label = "TimestampMax", Seconds = Int64.MaxValue, Nanoseconds = 999999999, Year = 292277026596, Month = 12, Day = 4, Hour = 15, Minute = 30, Second = 7, DayOfYear = 339, IsLeapYear = true, DayOfWeek = DayOfWeek.Monday }, new TestCase { Label = "Distinguishable", Seconds = DistinguishsableDateTime.ToUnixTimeSeconds(), Nanoseconds = 123456789, Year = 1234, Month = 5, Day = 6, Hour = 7, Minute = 8, Second = 9, DayOfYear = 126, IsLeapYear = false, DayOfWeek = DayOfWeek.Saturday }, }.Concat( new [] diff --git a/test/MsgPack.UnitTest/TimestampTest.Parse.cs b/test/MsgPack.UnitTest/TimestampTest.Parse.cs index 6bff3e832..0f5be71fe 100644 --- a/test/MsgPack.UnitTest/TimestampTest.Parse.cs +++ b/test/MsgPack.UnitTest/TimestampTest.Parse.cs @@ -602,7 +602,7 @@ public void TestParseExact_WithDateTimeStyles_TimestampMin_LowerO() { Assert.That( Timestamp.ParseExact( - "-584554047284-02-23T16:59:44.000000000Z", + "-292277022657-01-27T08:29:52.000000000Z", "o", null, DateTimeStyles.None @@ -617,7 +617,7 @@ public void TestTryParseExact_TimestampMin_LowerO() Timestamp result; Assert.That( Timestamp.TryParseExact( - "-584554047284-02-23T16:59:44.000000000Z", + "-292277022657-01-27T08:29:52.000000000Z", "o", null, DateTimeStyles.None, @@ -633,7 +633,7 @@ public void TestParseExact_WithDateTimeStyles_TimestampMin_UpperO() { Assert.That( Timestamp.ParseExact( - "-584554047284-02-23T16:59:44.000000000Z", + "-292277022657-01-27T08:29:52.000000000Z", "O", null, DateTimeStyles.None @@ -648,7 +648,7 @@ public void TestTryParseExact_TimestampMin_UpperO() Timestamp result; Assert.That( Timestamp.TryParseExact( - "-584554047284-02-23T16:59:44.000000000Z", + "-292277022657-01-27T08:29:52.000000000Z", "O", null, DateTimeStyles.None, @@ -664,7 +664,7 @@ public void TestParseExact_WithDateTimeStyles_TimestampMin_LowerS() { Assert.That( Timestamp.ParseExact( - "-584554047284-02-23T16:59:44Z", + "-292277022657-01-27T08:29:52Z", "s", null, DateTimeStyles.None @@ -679,7 +679,7 @@ public void TestTryParseExact_TimestampMin_LowerS() Timestamp result; Assert.That( Timestamp.TryParseExact( - "-584554047284-02-23T16:59:44Z", + "-292277022657-01-27T08:29:52Z", "s", null, DateTimeStyles.None, @@ -695,7 +695,7 @@ public void TestParseExact_WithDateTimeStyles_TimestampMax_LowerO() { Assert.That( Timestamp.ParseExact( - "584554051223-11-09T07:00:16.999999999Z", + "292277026596-12-04T15:30:07.999999999Z", "o", null, DateTimeStyles.None @@ -710,7 +710,7 @@ public void TestTryParseExact_TimestampMax_LowerO() Timestamp result; Assert.That( Timestamp.TryParseExact( - "584554051223-11-09T07:00:16.999999999Z", + "292277026596-12-04T15:30:07.999999999Z", "o", null, DateTimeStyles.None, @@ -726,7 +726,7 @@ public void TestParseExact_WithDateTimeStyles_TimestampMax_UpperO() { Assert.That( Timestamp.ParseExact( - "584554051223-11-09T07:00:16.999999999Z", + "292277026596-12-04T15:30:07.999999999Z", "O", null, DateTimeStyles.None @@ -741,7 +741,7 @@ public void TestTryParseExact_TimestampMax_UpperO() Timestamp result; Assert.That( Timestamp.TryParseExact( - "584554051223-11-09T07:00:16.999999999Z", + "292277026596-12-04T15:30:07.999999999Z", "O", null, DateTimeStyles.None, @@ -757,7 +757,7 @@ public void TestParseExact_WithDateTimeStyles_TimestampMax_LowerS() { Assert.That( Timestamp.ParseExact( - "584554051223-11-09T07:00:16Z", + "292277026596-12-04T15:30:07Z", "s", null, DateTimeStyles.None @@ -772,7 +772,7 @@ public void TestTryParseExact_TimestampMax_LowerS() Timestamp result; Assert.That( Timestamp.TryParseExact( - "584554051223-11-09T07:00:16Z", + "292277026596-12-04T15:30:07Z", "s", null, DateTimeStyles.None, diff --git a/test/MsgPack.UnitTest/TimestampTest.Properties.cs b/test/MsgPack.UnitTest/TimestampTest.Properties.cs index 8fdb4af00..572b054b8 100644 --- a/test/MsgPack.UnitTest/TimestampTest.Properties.cs +++ b/test/MsgPack.UnitTest/TimestampTest.Properties.cs @@ -350,49 +350,49 @@ public void TestProperties_DateTimeMaxPlus1Nsec() [Test] public void TestProperties_TimestampMin() { - // -584554047284-02-23T16:59:44.000000000Z + // -292277022657-01-27T08:29:52.000000000Z var target = new Timestamp( -9223372036854775808, 0 ); Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( -9223372036854775808 ), "UnixEpochSecondsPart" ); Assert.That( target.NanosecondsPart, Is.EqualTo( 0 ), "NanosecondsPart" ); - Assert.That( target.Year, Is.EqualTo( -584554047284 ), "Year" ); - Assert.That( target.Month, Is.EqualTo( 2 ), "Month" ); - Assert.That( target.Day, Is.EqualTo( 23 ), "Day" ); - Assert.That( target.Hour, Is.EqualTo( 16 ), "Hour" ); - Assert.That( target.Minute, Is.EqualTo( 59 ), "Minute" ); - Assert.That( target.Second, Is.EqualTo( 44 ), "Second" ); + Assert.That( target.Year, Is.EqualTo( -292277022657 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 1 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 27 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 8 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 29 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 52 ), "Second" ); Assert.That( target.Millisecond, Is.EqualTo( 0 ), "Millisecond" ); Assert.That( target.Microsecond, Is.EqualTo( 0 ), "Microsecond" ); Assert.That( target.Nanosecond, Is.EqualTo( 0 ), "Nanosecond" ); - Assert.That( target.DayOfYear, Is.EqualTo( 54 ), "DayOfYear" ); + Assert.That( target.DayOfYear, Is.EqualTo( 27 ), "DayOfYear" ); Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Saturday ), "DayOfWeek" ); - Assert.That( target.IsLeapYear, Is.EqualTo( true ), "IsLeapYear" ); + Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); } [Test] public void TestProperties_TimestampMax() { - // 584554051223-11-09T07:00:16.999999999Z + // 292277026596-12-04T15:30:07.999999999Z var target = new Timestamp( 9223372036854775807, 999999999 ); Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( 9223372036854775807 ), "UnixEpochSecondsPart" ); Assert.That( target.NanosecondsPart, Is.EqualTo( 999999999 ), "NanosecondsPart" ); - Assert.That( target.Year, Is.EqualTo( 584554051223 ), "Year" ); - Assert.That( target.Month, Is.EqualTo( 11 ), "Month" ); - Assert.That( target.Day, Is.EqualTo( 9 ), "Day" ); - Assert.That( target.Hour, Is.EqualTo( 7 ), "Hour" ); - Assert.That( target.Minute, Is.EqualTo( 0 ), "Minute" ); - Assert.That( target.Second, Is.EqualTo( 16 ), "Second" ); + Assert.That( target.Year, Is.EqualTo( 292277026596 ), "Year" ); + Assert.That( target.Month, Is.EqualTo( 12 ), "Month" ); + Assert.That( target.Day, Is.EqualTo( 4 ), "Day" ); + Assert.That( target.Hour, Is.EqualTo( 15 ), "Hour" ); + Assert.That( target.Minute, Is.EqualTo( 30 ), "Minute" ); + Assert.That( target.Second, Is.EqualTo( 7 ), "Second" ); Assert.That( target.Millisecond, Is.EqualTo( 999 ), "Millisecond" ); Assert.That( target.Microsecond, Is.EqualTo( 999 ), "Microsecond" ); Assert.That( target.Nanosecond, Is.EqualTo( 999 ), "Nanosecond" ); - Assert.That( target.DayOfYear, Is.EqualTo( 313 ), "DayOfYear" ); - Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Sunday ), "DayOfWeek" ); - Assert.That( target.IsLeapYear, Is.EqualTo( false ), "IsLeapYear" ); + Assert.That( target.DayOfYear, Is.EqualTo( 339 ), "DayOfYear" ); + Assert.That( target.DayOfWeek, Is.EqualTo( DayOfWeek.Monday ), "DayOfWeek" ); + Assert.That( target.IsLeapYear, Is.EqualTo( true ), "IsLeapYear" ); } [Test] diff --git a/test/MsgPack.UnitTest/TimestampTest.ToString.cs b/test/MsgPack.UnitTest/TimestampTest.ToString.cs index 3defcc20c..e71819114 100644 --- a/test/MsgPack.UnitTest/TimestampTest.ToString.cs +++ b/test/MsgPack.UnitTest/TimestampTest.ToString.cs @@ -457,12 +457,12 @@ public void TestToStringCore_TimestampMin_LowerO() { var value = new Timestamp.Value( - -584554047284, - 2, - 23, - 16, - 59, - 44, + -292277022657, + 1, + 27, + 8, + 29, + 52, 0 ); Assert.That( @@ -471,7 +471,7 @@ public void TestToStringCore_TimestampMin_LowerO() CultureInfo.InvariantCulture, ref value ), - Is.EqualTo( "-584554047284-02-23T16:59:44.000000000Z" ) + Is.EqualTo( "-292277022657-01-27T08:29:52.000000000Z" ) ); } @@ -480,12 +480,12 @@ public void TestToStringCore_TimestampMin_UpperO() { var value = new Timestamp.Value( - -584554047284, - 2, - 23, - 16, - 59, - 44, + -292277022657, + 1, + 27, + 8, + 29, + 52, 0 ); Assert.That( @@ -494,7 +494,7 @@ public void TestToStringCore_TimestampMin_UpperO() CultureInfo.InvariantCulture, ref value ), - Is.EqualTo( "-584554047284-02-23T16:59:44.000000000Z" ) + Is.EqualTo( "-292277022657-01-27T08:29:52.000000000Z" ) ); } @@ -503,12 +503,12 @@ public void TestToStringCore_TimestampMin_LowerS() { var value = new Timestamp.Value( - -584554047284, - 2, - 23, - 16, - 59, - 44, + -292277022657, + 1, + 27, + 8, + 29, + 52, 0 ); Assert.That( @@ -517,7 +517,7 @@ public void TestToStringCore_TimestampMin_LowerS() CultureInfo.InvariantCulture, ref value ), - Is.EqualTo( "-584554047284-02-23T16:59:44Z" ) + Is.EqualTo( "-292277022657-01-27T08:29:52Z" ) ); } @@ -526,12 +526,12 @@ public void TestToStringCore_TimestampMax_LowerO() { var value = new Timestamp.Value( - 584554051223, - 11, - 9, + 292277026596, + 12, + 4, + 15, + 30, 7, - 0, - 16, 999999999 ); Assert.That( @@ -540,7 +540,7 @@ public void TestToStringCore_TimestampMax_LowerO() CultureInfo.InvariantCulture, ref value ), - Is.EqualTo( "584554051223-11-09T07:00:16.999999999Z" ) + Is.EqualTo( "292277026596-12-04T15:30:07.999999999Z" ) ); } @@ -549,12 +549,12 @@ public void TestToStringCore_TimestampMax_UpperO() { var value = new Timestamp.Value( - 584554051223, - 11, - 9, + 292277026596, + 12, + 4, + 15, + 30, 7, - 0, - 16, 999999999 ); Assert.That( @@ -563,7 +563,7 @@ public void TestToStringCore_TimestampMax_UpperO() CultureInfo.InvariantCulture, ref value ), - Is.EqualTo( "584554051223-11-09T07:00:16.999999999Z" ) + Is.EqualTo( "292277026596-12-04T15:30:07.999999999Z" ) ); } @@ -572,12 +572,12 @@ public void TestToStringCore_TimestampMax_LowerS() { var value = new Timestamp.Value( - 584554051223, - 11, - 9, + 292277026596, + 12, + 4, + 15, + 30, 7, - 0, - 16, 999999999 ); Assert.That( @@ -586,7 +586,7 @@ public void TestToStringCore_TimestampMax_LowerS() CultureInfo.InvariantCulture, ref value ), - Is.EqualTo( "584554051223-11-09T07:00:16Z" ) + Is.EqualTo( "292277026596-12-04T15:30:07Z" ) ); } From 3e4111de20b1812d0389bb74b0e479ed9eae9d95 Mon Sep 17 00:00:00 2001 From: yfakariya Date: Mon, 18 Sep 2017 21:38:13 +0900 Subject: [PATCH 06/23] Add Timestamp serialization test cases. --- .../TimestampSerializationTest.cs | 288 ++++++++++++++++++ 1 file changed, 288 insertions(+) create mode 100644 test/MsgPack.UnitTest/Serialization/TimestampSerializationTest.cs diff --git a/test/MsgPack.UnitTest/Serialization/TimestampSerializationTest.cs b/test/MsgPack.UnitTest/Serialization/TimestampSerializationTest.cs new file mode 100644 index 000000000..cb7d34031 --- /dev/null +++ b/test/MsgPack.UnitTest/Serialization/TimestampSerializationTest.cs @@ -0,0 +1,288 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#endregion -- License Terms -- + +using System; +using System.IO; +using System.Runtime.InteropServices.ComTypes; + +using MsgPack.Serialization.DefaultSerializers; + +#if !MSTEST +using NUnit.Framework; +#else +using TestFixtureAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using TestAttribute = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +using TimeoutAttribute = NUnit.Framework.TimeoutAttribute; +using Assert = NUnit.Framework.Assert; +using Is = NUnit.Framework.Is; +#endif + +namespace MsgPack.Serialization +{ + [TestFixture] + public class TimestampSerializationTest + { + private static void TestSerializationCore( SerializationContext context, DateTimeConversionMethod expected ) + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( expected ) ); + + var now = Timestamp.UtcNow; + var dateTimeNow = now.ToDateTimeOffset(); + var source = + new ClassHasTimestamp + { + Timestamp = now, + DateTime = dateTimeNow.AddSeconds( 1 ).UtcDateTime, + DateTimeOffset = dateTimeNow.AddSeconds( 2 ), + FileTime = now.Add( TimeSpan.FromSeconds( 3 ) ).ToDateTime().ToWin32FileTimeUtc() + }; + + using ( var buffer = new MemoryStream() ) + { + var serializer = context.GetSerializer(); + serializer.Pack( + buffer, + source + ); + + // Test representation + buffer.Position = 0; + var native = MessagePackSerializer.UnpackMessagePackObject( buffer ); + Assert.That( native.IsArray, Is.True ); + var nativeMembers = native.AsList(); + Assert.That( nativeMembers.Count, Is.EqualTo( ClassHasTimestamp.MemberCount ) ); + + for ( var i = 0; i < ClassHasTimestamp.MemberCount; i++ ) + { + switch ( expected ) + { + case DateTimeConversionMethod.Native: + { + if ( i == 2 ) + { + // DateTimeOffset -> [long, shourt] + Assert.That( nativeMembers[ i ].IsArray, Is.True ); + var dtoComponents = nativeMembers[ i ].AsList(); + Assert.That( dtoComponents.Count, Is.EqualTo( 2 ) ); + Assert.That( dtoComponents[ 0 ].IsTypeOf(), Is.True ); + Assert.That( dtoComponents[ 1 ].IsTypeOf(), Is.True ); + } + else + { + Assert.That( nativeMembers[ i ].IsTypeOf(), Is.True ); + } + break; + } + case DateTimeConversionMethod.UnixEpoc: + { + Assert.That( nativeMembers[ i ].IsTypeOf(), Is.True ); + break; + } + case DateTimeConversionMethod.Timestamp: + { + Assert.That( nativeMembers[ i ].IsTypeOf(), Is.True ); + var asExt = nativeMembers[ i ].AsMessagePackExtendedTypeObject(); + Assert.That( asExt.TypeCode, Is.EqualTo( 0xFF ) ); + // Actual encoding should be tested in Timestamp tests. + break; + } + } + } + + // Test round trip + buffer.Position = 0; + + var result = serializer.Unpack( buffer ); + switch ( expected ) + { + case DateTimeConversionMethod.Native: + { + Assert.That( result.Timestamp, Is.EqualTo( new Timestamp( now.UnixEpochSecondsPart, now.NanosecondsPart / 100 * 100 ) ) ); + Assert.That( result.DateTime, Is.EqualTo( now.ToDateTime().AddSeconds( 1 ) ) ); + Assert.That( result.DateTimeOffset, Is.EqualTo( now.ToDateTimeOffset().AddSeconds( 2 ) ) ); + Assert.That( result.FileTime, Is.EqualTo( now.Add( TimeSpan.FromSeconds( 3 ).Subtract( TimeSpan.FromTicks( now.NanosecondsPart % 100 ) ) ).ToDateTime().ToWin32FileTimeUtc() ) ); + break; + } + case DateTimeConversionMethod.UnixEpoc: + { + Assert.That( result.Timestamp, Is.EqualTo( new Timestamp( now.UnixEpochSecondsPart, now.NanosecondsPart / 1000000 * 1000000 ) ) ); + Assert.That( result.DateTime, Is.EqualTo( now.ToDateTime().AddSeconds( 1 ).Subtract( TimeSpan.FromTicks( now.NanosecondsPart / 100 % 10000 ) ) ) ); + Assert.That( result.DateTimeOffset, Is.EqualTo( now.ToDateTimeOffset().AddSeconds( 2 ).Subtract( TimeSpan.FromTicks( now.NanosecondsPart / 100 % 10000 ) ) ) ); + Assert.That( result.FileTime, Is.EqualTo( now.Add( TimeSpan.FromSeconds( 3 ).Subtract( TimeSpan.FromTicks( now.NanosecondsPart / 100 % 10000 ) ) ).ToDateTime().ToWin32FileTimeUtc() ) ); + break; + } + case DateTimeConversionMethod.Timestamp: + { + Assert.That( result.Timestamp, Is.EqualTo( now ) ); + Assert.That( result.DateTime, Is.EqualTo( now.ToDateTime().AddSeconds( 1 ) ) ); + Assert.That( result.DateTimeOffset, Is.EqualTo( now.ToDateTimeOffset().AddSeconds( 2 ) ) ); + Assert.That( result.FileTime, Is.EqualTo( now.Add( TimeSpan.FromSeconds( 3 ) ).ToDateTime().ToWin32FileTimeUtc() ) ); + break; + } + } + } + } + + [Test] + public void TestSerialization_DefaultTimestamp() + { + TestSerializationCore( new SerializationContext(), DateTimeConversionMethod.Timestamp ); + } + + [Test] + public void TestSerialization_ClassicUnixEpoc() + { + TestSerializationCore( SerializationContext.CreateClassicContext(), DateTimeConversionMethod.UnixEpoc ); + } + + [Test] + public void TestSerialization_Timestamp() + { + TestSerializationCore( new SerializationContext() { DefaultDateTimeConversionMethod = DateTimeConversionMethod.Timestamp }, DateTimeConversionMethod.Timestamp ); + } + + [Test] + public void TestSerialization_Native() + { + TestSerializationCore( new SerializationContext() { DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native }, DateTimeConversionMethod.Native ); + } + + [Test] + public void TestSerialization_UnixEpoc() + { + TestSerializationCore( new SerializationContext() { DefaultDateTimeConversionMethod = DateTimeConversionMethod.UnixEpoc }, DateTimeConversionMethod.UnixEpoc ); + } + + private static void TestDeserializationCore( DateTimeConversionMethod kind ) + { + var now = Timestamp.UtcNow; + var dateTimeNow = now.ToDateTimeOffset(); + using ( var buffer = new MemoryStream() ) + using ( var packer = Packer.Create( buffer, PackerCompatibilityOptions.None ) ) + { + packer.PackArrayHeader( ClassHasTimestamp.MemberCount ); + for ( var i = 0; i < ClassHasTimestamp.MemberCount; i++ ) + { + switch ( kind ) + { + case DateTimeConversionMethod.Native: + { + if ( i == 2 ) + { + // DateTimeOffset -> [long, shourt] + packer.PackArrayHeader( 2 ); + packer.Pack( dateTimeNow.AddSeconds( i ).Ticks ); + packer.Pack( ( short )0 ); + } + else + { + packer.Pack( dateTimeNow.AddSeconds( i ).Ticks ); + } + + break; + } + case DateTimeConversionMethod.UnixEpoc: + { + packer.Pack( MessagePackConvert.FromDateTimeOffset( dateTimeNow.AddSeconds( i ) ) ); + break; + } + case DateTimeConversionMethod.Timestamp: + { + packer.PackExtendedTypeValue( ( now.Add( TimeSpan.FromSeconds( i ) ).Encode() ) ); + break; + } + default: + { + Assert.Fail( "Unexpected Kind" ); + break; + } + } + } + + var context = new SerializationContext(); + context.DefaultDateTimeConversionMethod = kind; + + var serializer = context.GetSerializer(); + buffer.Position = 0; + + var result = serializer.Unpack( buffer ); + switch ( kind ) + { + case DateTimeConversionMethod.Native: + { + Assert.That( result.Timestamp, Is.EqualTo( new Timestamp( now.UnixEpochSecondsPart, now.NanosecondsPart / 100 * 100 ) ) ); + Assert.That( result.DateTime, Is.EqualTo( now.ToDateTime().AddSeconds( 1 ) ) ); + Assert.That( result.DateTimeOffset, Is.EqualTo( now.ToDateTimeOffset().AddSeconds( 2 )) ); + Assert.That( result.FileTime, Is.EqualTo( now.Add( TimeSpan.FromSeconds( 3 ).Subtract( TimeSpan.FromTicks( now.NanosecondsPart % 100 ) ) ).ToDateTime().ToWin32FileTimeUtc() ) ); + break; + } + case DateTimeConversionMethod.UnixEpoc: + { + Assert.That( result.Timestamp, Is.EqualTo( new Timestamp( now.UnixEpochSecondsPart, now.NanosecondsPart / 1000000 * 1000000 ) ) ); + Assert.That( result.DateTime, Is.EqualTo( now.ToDateTime().AddSeconds( 1 ).Subtract( TimeSpan.FromTicks( now.NanosecondsPart / 100 % 10000 ) ) ) ); + Assert.That( result.DateTimeOffset, Is.EqualTo( now.ToDateTimeOffset().AddSeconds( 2 ).Subtract( TimeSpan.FromTicks( now.NanosecondsPart / 100 % 10000 ) ) ) ); + Assert.That( result.FileTime, Is.EqualTo( now.Add( TimeSpan.FromSeconds( 3 ).Subtract( TimeSpan.FromTicks( now.NanosecondsPart / 100 % 10000 ) ) ).ToDateTime().ToWin32FileTimeUtc() ) ); + break; + } + case DateTimeConversionMethod.Timestamp: + { + Assert.That( result.Timestamp, Is.EqualTo( now ) ); + Assert.That( result.DateTime, Is.EqualTo( now.ToDateTime().AddSeconds( 1 ) ) ); + Assert.That( result.DateTimeOffset, Is.EqualTo( now.ToDateTimeOffset().AddSeconds( 2 ) ) ); + Assert.That( result.FileTime, Is.EqualTo( now.Add( TimeSpan.FromSeconds( 3 ) ).ToDateTime().ToWin32FileTimeUtc() ) ); + break; + } + } + } + } + + [Test] + public void TestDeserialization_FromTimestamp() + { + TestDeserializationCore( DateTimeConversionMethod.Timestamp ); + } + + [Test] + public void TestDeserialization_FromNative() + { + TestDeserializationCore( DateTimeConversionMethod.Native ); + } + + [Test] + public void TestDeserialization_FromUnixEpoc() + { + TestDeserializationCore( DateTimeConversionMethod.UnixEpoc ); + } + } + + public class ClassHasTimestamp + { + internal const int MemberCount = 4; + + [MessagePackMember( 0 )] + public Timestamp Timestamp { get; set; } + [MessagePackMember( 1 )] + public DateTime DateTime { get; set; } + [MessagePackMember( 2 )] + public DateTimeOffset DateTimeOffset { get; set; } + [MessagePackMember( 3 )] + public FILETIME FileTime { get; set; } + } +} From 898888018ff9c012d68d4860ca4bb163b46a0fc4 Mon Sep 17 00:00:00 2001 From: yfakariya Date: Mon, 18 Sep 2017 21:38:43 +0900 Subject: [PATCH 07/23] Add Timestamp related serializers. --- CHANGES.txt | 1 + src/MsgPack/KnownExtTypeCode.cs | 15 +- src/MsgPack/KnownExtTypeName.cs | 15 +- src/MsgPack/MessagePackObject.Utilities.cs | 21 ++- src/MsgPack/MsgPack.csproj | 1 + .../Serialization/DateTimeConversionMethod.cs | 26 +++- .../DateTimeMemberConversionMethod.cs | 22 ++- .../DateTimeMessagePackSerializerHelpers.cs | 15 +- .../DateTimeMessagePackSerializerProvider.cs | 18 ++- .../DateTimeOffsetMessagePackSerializer.cs | 22 ++- ...TimeOffsetMessagePackSerializerProvider.cs | 20 ++- .../FileTimeMessagePackSerializerProvider.cs | 18 ++- .../MessagePackObjectExtensions.cs | 20 ++- .../TimestampDateTimeMessagePackSerializer.cs | 75 ++++++++++ .../TimestampFileTimeMessagePackSerializer.cs | 75 ++++++++++ .../TimestampMessagePackSerializer.cs | 128 ++++++++++++++++++ .../TimestampMessagePackSerializerProvider.cs | 116 ++++++++++++++++ .../Serialization/ExtTypeCodeMapping.cs | 7 +- .../Serialization/SerializationContext.cs | 5 +- .../SerializerRepository.defaults.cs | 6 +- .../SerializerRepository.defaults.tt | 24 +++- 21 files changed, 611 insertions(+), 39 deletions(-) create mode 100644 src/MsgPack/Serialization/DefaultSerializers/TimestampDateTimeMessagePackSerializer.cs create mode 100644 src/MsgPack/Serialization/DefaultSerializers/TimestampFileTimeMessagePackSerializer.cs create mode 100644 src/MsgPack/Serialization/DefaultSerializers/TimestampMessagePackSerializer.cs create mode 100644 src/MsgPack/Serialization/DefaultSerializers/TimestampMessagePackSerializerProvider.cs diff --git a/CHANGES.txt b/CHANGES.txt index df523d593..56132e997 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -713,6 +713,7 @@ Release 1.0.0-beta1 T.B.D. NEW FEATURES * .NET Standard 2.0 which supports serializer source code generation on .NET Core. Note that serializer assembly generation is not supported. * MessagePackSerializer.UnpackMessagePackObject(byte[]) utility method. + * MessagePack timestamp type support. This includes interoperability with DateTime/DateTimeOffset as well as MsgPack.Timespan type with basic arithmatics, properties, and conversions. BUG FIXES * Fix ByteArrayPacker throws IndexOutOfBoundException when the buffer remaining bytes is equal to packed scalar size. #252 diff --git a/src/MsgPack/KnownExtTypeCode.cs b/src/MsgPack/KnownExtTypeCode.cs index b5466e4cd..3724f8182 100644 --- a/src/MsgPack/KnownExtTypeCode.cs +++ b/src/MsgPack/KnownExtTypeCode.cs @@ -2,7 +2,7 @@ // // MessagePack for CLI // -// Copyright (C) 2015 FUJIWARA, Yusuke +// Copyright (C) 2015-2017 FUJIWARA, Yusuke // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -31,6 +31,17 @@ namespace MsgPack /// public static class KnownExtTypeCode { + /// + /// Gets the ext type code which represents MsgPack timestamp. + /// + /// + /// 0xFF(-1). + /// + public static byte Timestamp + { + get { return 0xFF; } + } + /// /// Gets the ext type code which represents multidimensional array. /// @@ -42,4 +53,4 @@ public static byte MultidimensionalArray get { return 0x71; } } } -} \ No newline at end of file +} diff --git a/src/MsgPack/KnownExtTypeName.cs b/src/MsgPack/KnownExtTypeName.cs index a14833950..629fef805 100644 --- a/src/MsgPack/KnownExtTypeName.cs +++ b/src/MsgPack/KnownExtTypeName.cs @@ -1,8 +1,8 @@ -#region -- License Terms -- +#region -- License Terms -- // // MessagePack for CLI // -// Copyright (C) 2015 FUJIWARA, Yusuke +// Copyright (C) 2015-2017 FUJIWARA, Yusuke // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -31,6 +31,17 @@ namespace MsgPack /// public static class KnownExtTypeName { + /// + /// Gets the ext type name which represents MsgPack timestamp. + /// + /// + /// "Timestamp". + /// + public static string Timestamp + { + get { return "Timestamp"; } + } + /// /// Gets the ext type name which represents multidimensional array. /// diff --git a/src/MsgPack/MessagePackObject.Utilities.cs b/src/MsgPack/MessagePackObject.Utilities.cs index 85d21c8a1..d67b3165c 100644 --- a/src/MsgPack/MessagePackObject.Utilities.cs +++ b/src/MsgPack/MessagePackObject.Utilities.cs @@ -1,8 +1,8 @@ -#region -- License Terms -- +#region -- License Terms -- // // MessagePack for CLI // -// Copyright (C) 2010-2016 FUJIWARA, Yusuke +// Copyright (C) 2010-2017 FUJIWARA, Yusuke // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -1785,6 +1785,23 @@ public object ToObject() } } + /// + /// Gets a this object as a value. + /// + /// A value. + /// This object does not represent value. + public Timestamp AsTimestamp() + { + try + { + return Timestamp.Decode( this.AsMessagePackExtendedTypeObject() ); + } + catch(ArgumentException ex) + { + throw new InvalidOperationException( ex.Message, ex ); + } + } + #region -- Structure Operator Overloads -- /// diff --git a/src/MsgPack/MsgPack.csproj b/src/MsgPack/MsgPack.csproj index fc6197cb3..0b015b48f 100644 --- a/src/MsgPack/MsgPack.csproj +++ b/src/MsgPack/MsgPack.csproj @@ -504,6 +504,7 @@ + diff --git a/src/MsgPack/Serialization/DateTimeConversionMethod.cs b/src/MsgPack/Serialization/DateTimeConversionMethod.cs index 41c93c845..47e82fac8 100644 --- a/src/MsgPack/Serialization/DateTimeConversionMethod.cs +++ b/src/MsgPack/Serialization/DateTimeConversionMethod.cs @@ -31,7 +31,7 @@ public enum DateTimeConversionMethod /// Uses context, that is, Gregorian 0000-01-01 based, 100 nano seconds resolution. This value also preserves . /// /// - /// As of 0.6, this value has been become default. This option prevents accidental data loss. + /// As of 0.6 to 0.9, this value became default. This option prevents accidental data loss. /// Native = 0, @@ -39,8 +39,26 @@ public enum DateTimeConversionMethod /// Uses Unix epoc context, that is, Gregirian 1970-01-01 based, milliseconds resolution. /// /// - /// Many binding such as Java uses this resolution, so this option gives maximom interoperability. + /// Many binding such as Java uses this resolution, so this option gives maximum interoperability. /// - UnixEpoc = 1 + UnixEpoc = 1, + + /// + /// Uses MsgPack timestamp format, that is, Gregirian 1970-01-01 based, nanoseconds resolution, with reserved ext type format. + /// + /// + /// + /// As of 1.0, this value became default. + /// + /// + /// This is best choice for interoperability and prevents accidental data loss, but old implementation does not recognize this type. + /// For backward compability purposes, use or instead. + /// + /// + /// Note that and cannot hold nanoseconds value. + /// If you can depend on this assembly, consider for date-time typed members to maximize interoperability for other languages. + /// + /// + Timestamp = 2 } -} \ No newline at end of file +} diff --git a/src/MsgPack/Serialization/DateTimeMemberConversionMethod.cs b/src/MsgPack/Serialization/DateTimeMemberConversionMethod.cs index 5a0dce695..27dd26a69 100644 --- a/src/MsgPack/Serialization/DateTimeMemberConversionMethod.cs +++ b/src/MsgPack/Serialization/DateTimeMemberConversionMethod.cs @@ -49,6 +49,24 @@ public enum DateTimeMemberConversionMethod /// /// Many binding such as Java uses this resolution, so this option gives maximom interoperability. /// - UnixEpoc = 2 + UnixEpoc = 2, + + /// + /// Uses MsgPack timestamp format, that is, Gregirian 1970-01-01 based, nanoseconds resolution, with reserved ext type format. + /// + /// + /// + /// As of 1.0, this value became default. + /// + /// + /// This is best choice for interoperability and prevents accidental data loss, but old implementation does not recognize this type. + /// For backward compability purposes, use or instead. + /// + /// + /// Note that and cannot hold nanoseconds value. + /// If you can depend on this assembly, consider for date-time typed members to maximize interoperability for other languages. + /// + /// + Timestamp = 3 } -} \ No newline at end of file +} diff --git a/src/MsgPack/Serialization/DateTimeMessagePackSerializerHelpers.cs b/src/MsgPack/Serialization/DateTimeMessagePackSerializerHelpers.cs index c64894444..e72b569e2 100644 --- a/src/MsgPack/Serialization/DateTimeMessagePackSerializerHelpers.cs +++ b/src/MsgPack/Serialization/DateTimeMessagePackSerializerHelpers.cs @@ -1,8 +1,8 @@ -#region -- License Terms -- +#region -- License Terms -- // // MessagePack for CLI // -// Copyright (C) 2015 FUJIWARA, Yusuke +// Copyright (C) 2015-2017 FUJIWARA, Yusuke // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -73,6 +73,10 @@ DateTimeMemberConversionMethod dateTimeMemberConversionMethod { return DateTimeConversionMethod.UnixEpoc; } + case DateTimeMemberConversionMethod.Timestamp: + { + return DateTimeConversionMethod.Timestamp; + } default: { return context.DefaultDateTimeConversionMethod; @@ -89,8 +93,9 @@ internal static bool IsDateTime( Type dateTimeType ) || dateTimeType == typeof( FILETIME ) || dateTimeType == typeof( FILETIME? ) #endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY - // DateTimeOffset? is not have to be treat specially. - || dateTimeType == typeof( DateTimeOffset ); + // DateTimeOffset? and Timestamp? do not have to be treat specially. + || dateTimeType == typeof( DateTimeOffset ) + || dateTimeType == typeof( Timestamp ); } } -} \ No newline at end of file +} diff --git a/src/MsgPack/Serialization/DefaultSerializers/DateTimeMessagePackSerializerProvider.cs b/src/MsgPack/Serialization/DefaultSerializers/DateTimeMessagePackSerializerProvider.cs index dbcec5fa9..fa7f11779 100644 --- a/src/MsgPack/Serialization/DefaultSerializers/DateTimeMessagePackSerializerProvider.cs +++ b/src/MsgPack/Serialization/DefaultSerializers/DateTimeMessagePackSerializerProvider.cs @@ -2,7 +2,7 @@ // // MessagePack for CLI // -// Copyright (C) 2015 FUJIWARA, Yusuke +// Copyright (C) 2015-2017 FUJIWARA, Yusuke // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,6 +34,7 @@ internal class DateTimeMessagePackSerializerProvider : MessagePackSerializerProv { private readonly MessagePackSerializer _unixEpoc; private readonly MessagePackSerializer _native; + private readonly MessagePackSerializer _timestamp; public DateTimeMessagePackSerializerProvider( SerializationContext context, bool isNullable ) { @@ -44,17 +45,22 @@ public DateTimeMessagePackSerializerProvider( SerializationContext context, bool new NullableMessagePackSerializer( context, new UnixEpocDateTimeMessagePackSerializer( context ) ); this._native = new NullableMessagePackSerializer( context, new NativeDateTimeMessagePackSerializer( context ) ); + this._timestamp = + new NullableMessagePackSerializer( context, new TimestampDateTimeMessagePackSerializer( context ) ); #else this._unixEpoc = new NullableMessagePackSerializer( context, typeof( DateTime? ), new UnixEpocDateTimeMessagePackSerializer( context ) ); this._native = new NullableMessagePackSerializer( context, typeof( DateTime? ), new NativeDateTimeMessagePackSerializer( context ) ); + this._timestamp = + new NullableMessagePackSerializer( context, typeof( DateTime? ), new TimestampDateTimeMessagePackSerializer( context ) ); #endif // !UNITY } else { this._unixEpoc = new UnixEpocDateTimeMessagePackSerializer( context ); this._native = new NativeDateTimeMessagePackSerializer( context ); + this._timestamp = new TimestampDateTimeMessagePackSerializer( context ); } } @@ -72,6 +78,10 @@ public override object Get( SerializationContext context, object providerParamet { return this._unixEpoc; } + case DateTimeConversionMethod.Timestamp: + { + return this._timestamp; + } } } @@ -85,6 +95,10 @@ public override object Get( SerializationContext context, object providerParamet { return this._unixEpoc; } + case DateTimeConversionMethod.Timestamp: + { + return this._timestamp; + } default: { throw new NotSupportedException( @@ -99,4 +113,4 @@ public override object Get( SerializationContext context, object providerParamet } } } -} \ No newline at end of file +} diff --git a/src/MsgPack/Serialization/DefaultSerializers/DateTimeOffsetMessagePackSerializer.cs b/src/MsgPack/Serialization/DefaultSerializers/DateTimeOffsetMessagePackSerializer.cs index c1c22a81e..f7c52b328 100644 --- a/src/MsgPack/Serialization/DefaultSerializers/DateTimeOffsetMessagePackSerializer.cs +++ b/src/MsgPack/Serialization/DefaultSerializers/DateTimeOffsetMessagePackSerializer.cs @@ -2,7 +2,7 @@ // // MessagePack for CLI // -// Copyright (C) 2015-2016 FUJIWARA, Yusuke +// Copyright (C) 2015-2017 FUJIWARA, Yusuke // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -52,7 +52,11 @@ public DateTimeOffsetMessagePackSerializer( SerializationContext ownerContext, D [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", MessageId = "0", Justification = "Validated by caller in base class" )] protected internal override void PackToCore( Packer packer, DateTimeOffset objectTree ) { - if ( this._conversion == DateTimeConversionMethod.Native ) + if ( this._conversion == DateTimeConversionMethod.Timestamp ) + { + packer.Pack( Timestamp.FromDateTimeOffset( objectTree ).Encode() ); + } + else if ( this._conversion == DateTimeConversionMethod.Native ) { packer.PackArrayHeader( 2 ); packer.Pack( objectTree.DateTime.ToBinary() ); @@ -73,7 +77,11 @@ protected internal override void PackToCore( Packer packer, DateTimeOffset objec [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", MessageId = "0", Justification = "Validated by caller in base class" )] protected internal override DateTimeOffset UnpackFromCore( Unpacker unpacker ) { - if ( unpacker.IsArrayHeader ) + if ( unpacker.LastReadData.IsTypeOf().GetValueOrDefault() ) + { + return Timestamp.Decode( unpacker.LastReadData.DeserializeAsMessagePackExtendedTypeObject() ).ToDateTimeOffset(); + } + else if ( unpacker.IsArrayHeader ) { if ( UnpackHelpers.GetItemsCount( unpacker ) != 2 ) { @@ -104,7 +112,11 @@ protected internal override DateTimeOffset UnpackFromCore( Unpacker unpacker ) protected internal override async Task PackToAsyncCore( Packer packer, DateTimeOffset objectTree, CancellationToken cancellationToken ) { - if ( this._conversion == DateTimeConversionMethod.Native ) + if ( this._conversion == DateTimeConversionMethod.Timestamp ) + { + await packer.PackAsync( Timestamp.FromDateTimeOffset( objectTree ).Encode(), cancellationToken ).ConfigureAwait( false ); + } + else if ( this._conversion == DateTimeConversionMethod.Native ) { await packer.PackArrayHeaderAsync( 2, cancellationToken ).ConfigureAwait( false ); await packer.PackAsync( objectTree.DateTime.ToBinary(), cancellationToken ).ConfigureAwait( false ); @@ -141,4 +153,4 @@ protected internal override Task UnpackFromAsyncCore( Unpacker u #endif // FEATURE_TAP } -} \ No newline at end of file +} diff --git a/src/MsgPack/Serialization/DefaultSerializers/DateTimeOffsetMessagePackSerializerProvider.cs b/src/MsgPack/Serialization/DefaultSerializers/DateTimeOffsetMessagePackSerializerProvider.cs index cdfddeaa7..f66b16b66 100644 --- a/src/MsgPack/Serialization/DefaultSerializers/DateTimeOffsetMessagePackSerializerProvider.cs +++ b/src/MsgPack/Serialization/DefaultSerializers/DateTimeOffsetMessagePackSerializerProvider.cs @@ -1,8 +1,8 @@ -#region -- License Terms -- +#region -- License Terms -- // // MessagePack for CLI // -// Copyright (C) 2015 FUJIWARA, Yusuke +// Copyright (C) 2015-2017 FUJIWARA, Yusuke // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,6 +34,7 @@ internal class DateTimeOffsetMessagePackSerializerProvider : MessagePackSerializ { private readonly MessagePackSerializer _unixEpoc; private readonly MessagePackSerializer _native; + private readonly MessagePackSerializer _timestamp; public DateTimeOffsetMessagePackSerializerProvider( SerializationContext context, bool isNullable ) { @@ -44,17 +45,22 @@ public DateTimeOffsetMessagePackSerializerProvider( SerializationContext context new NullableMessagePackSerializer( context, new DateTimeOffsetMessagePackSerializer( context, DateTimeConversionMethod.UnixEpoc ) ); this._native = new NullableMessagePackSerializer( context, new DateTimeOffsetMessagePackSerializer( context, DateTimeConversionMethod.Native ) ); + this._timestamp = + new NullableMessagePackSerializer( context, new DateTimeOffsetMessagePackSerializer( context, DateTimeConversionMethod.Timestamp ) ); #else this._unixEpoc = new NullableMessagePackSerializer( context, typeof( DateTimeOffset? ), new DateTimeOffsetMessagePackSerializer( context, DateTimeConversionMethod.UnixEpoc ) ); this._native = new NullableMessagePackSerializer( context, typeof( DateTimeOffset? ), new DateTimeOffsetMessagePackSerializer( context, DateTimeConversionMethod.Native ) ); + this._timestamp = + new NullableMessagePackSerializer( context, typeof( DateTimeOffset? ), new DateTimeOffsetMessagePackSerializer( context, DateTimeConversionMethod.Timestamp ) ); #endif // !UNITY } else { this._unixEpoc = new DateTimeOffsetMessagePackSerializer( context, DateTimeConversionMethod.UnixEpoc ); this._native = new DateTimeOffsetMessagePackSerializer( context, DateTimeConversionMethod.Native ); + this._timestamp = new DateTimeOffsetMessagePackSerializer( context, DateTimeConversionMethod.Timestamp ); } } @@ -72,6 +78,10 @@ public override object Get( SerializationContext context, object providerParamet { return this._unixEpoc; } + case DateTimeConversionMethod.Timestamp: + { + return this._timestamp; + } } } @@ -85,6 +95,10 @@ public override object Get( SerializationContext context, object providerParamet { return this._unixEpoc; } + case DateTimeConversionMethod.Timestamp: + { + return this._timestamp; + } default: { throw new NotSupportedException( @@ -99,4 +113,4 @@ public override object Get( SerializationContext context, object providerParamet } } } -} \ No newline at end of file +} diff --git a/src/MsgPack/Serialization/DefaultSerializers/FileTimeMessagePackSerializerProvider.cs b/src/MsgPack/Serialization/DefaultSerializers/FileTimeMessagePackSerializerProvider.cs index 1ec3e36a3..f10869b3d 100644 --- a/src/MsgPack/Serialization/DefaultSerializers/FileTimeMessagePackSerializerProvider.cs +++ b/src/MsgPack/Serialization/DefaultSerializers/FileTimeMessagePackSerializerProvider.cs @@ -2,7 +2,7 @@ // // MessagePack for CLI // -// Copyright (C) 2010-2014 FUJIWARA, Yusuke +// Copyright (C) 2010-2017 FUJIWARA, Yusuke // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -35,6 +35,7 @@ internal class FileTimeMessagePackSerializerProvider : MessagePackSerializerProv { private readonly MessagePackSerializer _unixEpoc; private readonly MessagePackSerializer _native; + private readonly MessagePackSerializer _timestamp; public FileTimeMessagePackSerializerProvider( SerializationContext context, bool isNullable ) { @@ -45,17 +46,22 @@ public FileTimeMessagePackSerializerProvider( SerializationContext context, bool new NullableMessagePackSerializer( context, new UnixEpocFileTimeMessagePackSerializer( context ) ); this._native = new NullableMessagePackSerializer( context, new NativeFileTimeMessagePackSerializer( context ) ); + this._timestamp = + new NullableMessagePackSerializer( context, new TimestampFileTimeMessagePackSerializer( context ) ); #else this._unixEpoc = new NullableMessagePackSerializer( context, typeof( FILETIME? ), new UnixEpocFileTimeMessagePackSerializer( context ) ); this._native = new NullableMessagePackSerializer( context, typeof( FILETIME? ), new NativeFileTimeMessagePackSerializer( context ) ); + this._timestamp = + new NullableMessagePackSerializer( context, typeof( FILETIME? ), new TimestampFileTimeMessagePackSerializer( context ) ); #endif // !UNITY } else { this._unixEpoc = new UnixEpocFileTimeMessagePackSerializer( context ); this._native = new NativeFileTimeMessagePackSerializer( context ); + this._timestamp = new TimestampFileTimeMessagePackSerializer( context ); } } @@ -73,6 +79,10 @@ public override object Get( SerializationContext context, object providerParamet { return this._unixEpoc; } + case DateTimeConversionMethod.Timestamp: + { + return this._timestamp; + } } } @@ -86,6 +96,10 @@ public override object Get( SerializationContext context, object providerParamet { return this._unixEpoc; } + case DateTimeConversionMethod.Timestamp: + { + return this._timestamp; + } default: { throw new NotSupportedException( @@ -100,4 +114,4 @@ public override object Get( SerializationContext context, object providerParamet } } } -} \ No newline at end of file +} diff --git a/src/MsgPack/Serialization/DefaultSerializers/MessagePackObjectExtensions.cs b/src/MsgPack/Serialization/DefaultSerializers/MessagePackObjectExtensions.cs index 3d153bf27..4336e25bf 100644 --- a/src/MsgPack/Serialization/DefaultSerializers/MessagePackObjectExtensions.cs +++ b/src/MsgPack/Serialization/DefaultSerializers/MessagePackObjectExtensions.cs @@ -1,4 +1,4 @@ -#region -- License Terms -- +#region -- License Terms -- // // MessagePack for CLI // @@ -61,5 +61,23 @@ public static string DeserializeAsString( this MessagePackObject source ) throw new SerializationException( String.Format( CultureInfo.CurrentCulture, "The unpacked value is not expected type. {0}", ex.Message ), ex ); } } + + /// + /// Invokes in deserializaton manner. + /// + /// . + /// A deserialized value. + /// is not expected type. + public static MessagePackExtendedTypeObject DeserializeAsMessagePackExtendedTypeObject( this MessagePackObject source ) + { + try + { + return source.AsMessagePackExtendedTypeObject(); + } + catch ( InvalidOperationException ex ) + { + throw new SerializationException( String.Format( CultureInfo.CurrentCulture, "The unpacked value is not expected type. {0}", ex.Message ), ex ); + } + } } } diff --git a/src/MsgPack/Serialization/DefaultSerializers/TimestampDateTimeMessagePackSerializer.cs b/src/MsgPack/Serialization/DefaultSerializers/TimestampDateTimeMessagePackSerializer.cs new file mode 100644 index 000000000..ada00df8a --- /dev/null +++ b/src/MsgPack/Serialization/DefaultSerializers/TimestampDateTimeMessagePackSerializer.cs @@ -0,0 +1,75 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#endregion -- License Terms -- + +using System; +#if FEATURE_TAP +using System.Threading; +using System.Threading.Tasks; +#endif // FEATURE_TAP + +namespace MsgPack.Serialization.DefaultSerializers +{ + /// + /// serializer using timestamp representation. + /// + internal class TimestampDateTimeMessagePackSerializer : MessagePackSerializer + { + public TimestampDateTimeMessagePackSerializer( SerializationContext ownerContext ) : base( ownerContext, SerializerCapabilities.PackTo | SerializerCapabilities.UnpackFrom ) { } + + [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", MessageId = "0", Justification = "Validated by caller in base class" )] + protected internal override void PackToCore( Packer packer, DateTime objectTree ) + { + packer.Pack( Timestamp.FromDateTime( objectTree ).Encode() ); + } + + [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", MessageId = "0", Justification = "Validated by caller in base class" )] + protected internal override DateTime UnpackFromCore( Unpacker unpacker ) + { + return Timestamp.Decode( unpacker.LastReadData.DeserializeAsMessagePackExtendedTypeObject() ).ToDateTime(); + } + +#if FEATURE_TAP + + [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", MessageId = "0", Justification = "Validated by caller in base class" )] + protected internal override Task PackToAsyncCore( Packer packer, DateTime objectTree, CancellationToken cancellationToken ) + { + return packer.PackAsync( Timestamp.FromDateTime( objectTree ).Encode(), cancellationToken ); + } + + [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Transfers all catched exceptions." )] + protected internal override Task UnpackFromAsyncCore( Unpacker unpacker, CancellationToken cancellationToken ) + { + var tcs = new TaskCompletionSource(); + try + { + tcs.SetResult( this.UnpackFromCore( unpacker ) ); + } + catch ( Exception ex ) + { + tcs.SetException( ex ); + } + + return tcs.Task; + } + +#endif // FEATURE_TAP + + } +} diff --git a/src/MsgPack/Serialization/DefaultSerializers/TimestampFileTimeMessagePackSerializer.cs b/src/MsgPack/Serialization/DefaultSerializers/TimestampFileTimeMessagePackSerializer.cs new file mode 100644 index 000000000..d538f1514 --- /dev/null +++ b/src/MsgPack/Serialization/DefaultSerializers/TimestampFileTimeMessagePackSerializer.cs @@ -0,0 +1,75 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#endregion -- License Terms -- + +using System; +using System.Runtime.InteropServices.ComTypes; +#if FEATURE_TAP +using System.Threading; +using System.Threading.Tasks; +#endif // FEATURE_TAP + +namespace MsgPack.Serialization.DefaultSerializers +{ + /// + /// serializer using timestamp representation. + /// + internal sealed class TimestampFileTimeMessagePackSerializer : MessagePackSerializer + { + public TimestampFileTimeMessagePackSerializer( SerializationContext ownerContext ) : base( ownerContext, SerializerCapabilities.PackTo | SerializerCapabilities.UnpackFrom ) { } + + [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", MessageId = "0", Justification = "Validated by caller in base class" )] + protected internal override void PackToCore( Packer packer, FILETIME objectTree ) + { + packer.Pack( Timestamp.FromDateTime( objectTree.ToDateTime() ).Encode() ); + } + + [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", MessageId = "0", Justification = "Validated by caller in base class" )] + protected internal override FILETIME UnpackFromCore( Unpacker unpacker ) + { + return Timestamp.Decode( unpacker.LastReadData.DeserializeAsMessagePackExtendedTypeObject() ).ToDateTime().ToWin32FileTimeUtc(); + } + +#if FEATURE_TAP + + [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", MessageId = "0", Justification = "Validated by caller in base class" )] + protected internal override Task PackToAsyncCore( Packer packer, FILETIME objectTree, CancellationToken cancellationToken ) + { + return packer.PackAsync( Timestamp.FromDateTime( objectTree.ToDateTime() ).Encode(), cancellationToken ); + } + + [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Transfers all catched exceptions." )] + protected internal override Task UnpackFromAsyncCore( Unpacker unpacker, CancellationToken cancellationToken ) + { + var tcs = new TaskCompletionSource(); + try + { + tcs.SetResult( this.UnpackFromCore( unpacker ) ); + } + catch ( Exception ex ) + { + tcs.SetException( ex ); + } + + return tcs.Task; + } + +#endif // FEATURE_TAP + } +} diff --git a/src/MsgPack/Serialization/DefaultSerializers/TimestampMessagePackSerializer.cs b/src/MsgPack/Serialization/DefaultSerializers/TimestampMessagePackSerializer.cs new file mode 100644 index 000000000..6c896866c --- /dev/null +++ b/src/MsgPack/Serialization/DefaultSerializers/TimestampMessagePackSerializer.cs @@ -0,0 +1,128 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2015-2016 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#endregion -- License Terms -- + +#if UNITY_5 || UNITY_STANDALONE || UNITY_WEBPLAYER || UNITY_WII || UNITY_IPHONE || UNITY_ANDROID || UNITY_PS3 || UNITY_XBOX360 || UNITY_FLASH || UNITY_BKACKBERRY || UNITY_WINRT +#define UNITY +#endif + +using System; +#if CORE_CLR || UNITY || NETSTANDARD1_1 +using Contract = MsgPack.MPContract; +#else +using System.Diagnostics.Contracts; +#endif // CORE_CLR || UNITY || NETSTANDARD1_1 +#if FEATURE_TAP +using System.Threading; +using System.Threading.Tasks; +#endif // FEATURE_TAP + +namespace MsgPack.Serialization.DefaultSerializers +{ + /// + /// serializer using Unix Epoc or native representation. + /// + internal class TimestampMessagePackSerializer : MessagePackSerializer + { + private readonly DateTimeConversionMethod _conversion; + + public TimestampMessagePackSerializer( SerializationContext ownerContext, DateTimeConversionMethod conversion ) + : base( ownerContext, SerializerCapabilities.PackTo | SerializerCapabilities.UnpackFrom ) + { + this._conversion = conversion; + } + + [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", MessageId = "0", Justification = "Validated by caller in base class" )] + protected internal override void PackToCore( Packer packer, Timestamp objectTree ) + { + if ( this._conversion == DateTimeConversionMethod.Timestamp ) + { + packer.Pack( objectTree.Encode() ); + } + else if ( this._conversion == DateTimeConversionMethod.Native ) + { + packer.Pack( objectTree.ToDateTime().ToBinary() ); + } + else + { +#if DEBUG + Contract.Assert( this._conversion == DateTimeConversionMethod.UnixEpoc ); +#endif // DEBUG + packer.Pack( MessagePackConvert.FromDateTimeOffset( objectTree.ToDateTimeOffset() ) ); + } + } + + [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", MessageId = "0", Justification = "Validated by caller in base class" )] + protected internal override Timestamp UnpackFromCore( Unpacker unpacker ) + { + if ( unpacker.LastReadData.IsTypeOf().GetValueOrDefault() ) + { + return Timestamp.Decode( unpacker.LastReadData.AsMessagePackExtendedTypeObject() ); + } + else if ( this._conversion == DateTimeConversionMethod.UnixEpoc ) + { + return MessagePackConvert.ToDateTimeOffset( unpacker.LastReadData.DeserializeAsInt64() ); + } + else + { + return new DateTimeOffset( DateTime.FromBinary( unpacker.LastReadData.DeserializeAsInt64() ), TimeSpan.Zero ); + } + } + +#if FEATURE_TAP + + protected internal override async Task PackToAsyncCore( Packer packer, Timestamp objectTree, CancellationToken cancellationToken ) + { + if ( this._conversion == DateTimeConversionMethod.Timestamp ) + { + await packer.PackAsync( objectTree.Encode(), cancellationToken ).ConfigureAwait( false ); + } + else if ( this._conversion == DateTimeConversionMethod.Native ) + { + await packer.PackAsync( objectTree.ToDateTime().ToBinary(), cancellationToken ).ConfigureAwait( false ); + } + else + { +#if DEBUG + Contract.Assert( this._conversion == DateTimeConversionMethod.UnixEpoc ); +#endif // DEBUG + await packer.PackAsync( MessagePackConvert.FromDateTimeOffset( objectTree.ToDateTimeOffset() ), cancellationToken ).ConfigureAwait( false ); + } + } + + [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Transfers all catched exceptions." )] + protected internal override Task UnpackFromAsyncCore( Unpacker unpacker, CancellationToken cancellationToken ) + { + var tcs = new TaskCompletionSource(); + try + { + tcs.SetResult( this.UnpackFromCore( unpacker ) ); + } + catch ( Exception ex ) + { + tcs.SetException( ex ); + } + + return tcs.Task; + } + +#endif // FEATURE_TAP + + } +} diff --git a/src/MsgPack/Serialization/DefaultSerializers/TimestampMessagePackSerializerProvider.cs b/src/MsgPack/Serialization/DefaultSerializers/TimestampMessagePackSerializerProvider.cs new file mode 100644 index 000000000..13fa60997 --- /dev/null +++ b/src/MsgPack/Serialization/DefaultSerializers/TimestampMessagePackSerializerProvider.cs @@ -0,0 +1,116 @@ +#region -- License Terms -- +// +// MessagePack for CLI +// +// Copyright (C) 2017 FUJIWARA, Yusuke +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +#endregion -- License Terms -- + +#if UNITY_5 || UNITY_STANDALONE || UNITY_WEBPLAYER || UNITY_WII || UNITY_IPHONE || UNITY_ANDROID || UNITY_PS3 || UNITY_XBOX360 || UNITY_FLASH || UNITY_BKACKBERRY || UNITY_WINRT +#define UNITY +#endif + +using System; +using System.Globalization; + +namespace MsgPack.Serialization.DefaultSerializers +{ + /// + /// Provides runtime selection ability for serialization. + /// + internal class TimestampMessagePackSerializerProvider : MessagePackSerializerProvider + { + private readonly MessagePackSerializer _unixEpoc; + private readonly MessagePackSerializer _native; + private readonly MessagePackSerializer _timestamp; + + public TimestampMessagePackSerializerProvider( SerializationContext context, bool isNullable ) + { + if ( isNullable ) + { +#if !UNITY + this._unixEpoc = + new NullableMessagePackSerializer( context, new TimestampMessagePackSerializer( context, DateTimeConversionMethod.UnixEpoc ) ); + this._native = + new NullableMessagePackSerializer( context, new TimestampMessagePackSerializer( context, DateTimeConversionMethod.Native ) ); + this._timestamp = + new NullableMessagePackSerializer( context, new TimestampMessagePackSerializer( context, DateTimeConversionMethod.Timestamp ) ); +#else + this._unixEpoc = + new NullableMessagePackSerializer( context, typeof( Timestamp? ), new TimestampMessagePackSerializer( context, DateTimeConversionMethod.UnixEpoc ) ); + this._native = + new NullableMessagePackSerializer( context, typeof( Timestamp? ), new TimestampMessagePackSerializer( context, DateTimeConversionMethod.Native ) ); + this._timestamp = + new NullableMessagePackSerializer( context, typeof( Timestamp? ), new TimestampMessagePackSerializer( context, DateTimeConversionMethod.Timestamp ) ); +#endif // !UNITY + } + else + { + this._unixEpoc = new TimestampMessagePackSerializer( context, DateTimeConversionMethod.UnixEpoc ); + this._native = new TimestampMessagePackSerializer( context, DateTimeConversionMethod.Native ); + this._timestamp = new TimestampMessagePackSerializer( context, DateTimeConversionMethod.Timestamp ); + } + } + + public override object Get( SerializationContext context, object providerParameter ) + { + if ( providerParameter is DateTimeConversionMethod ) + { + switch ( ( DateTimeConversionMethod )providerParameter ) + { + case DateTimeConversionMethod.Native: + { + return this._native; + } + case DateTimeConversionMethod.UnixEpoc: + { + return this._unixEpoc; + } + case DateTimeConversionMethod.Timestamp: + { + return this._timestamp; + } + } + } + + switch ( context.DefaultDateTimeConversionMethod ) + { + case DateTimeConversionMethod.Native: + { + return this._native; + } + case DateTimeConversionMethod.UnixEpoc: + { + return this._unixEpoc; + } + case DateTimeConversionMethod.Timestamp: + { + return this._timestamp; + } + default: + { + throw new NotSupportedException( + String.Format( + CultureInfo.CurrentCulture, + "Unknown {0} value '{1:G}'({1:D})", + typeof( DateTimeConversionMethod ), + context.DefaultDateTimeConversionMethod + ) + ); + } + } + } + } +} diff --git a/src/MsgPack/Serialization/ExtTypeCodeMapping.cs b/src/MsgPack/Serialization/ExtTypeCodeMapping.cs index 969faafe4..f8122efa3 100644 --- a/src/MsgPack/Serialization/ExtTypeCodeMapping.cs +++ b/src/MsgPack/Serialization/ExtTypeCodeMapping.cs @@ -89,6 +89,7 @@ internal ExtTypeCodeMapping() this._syncRoot = new object(); this._index = new Dictionary( 2 ); this._types = new Dictionary( 2 ); + this.AddInternal( KnownExtTypeName.Timestamp, KnownExtTypeCode.Timestamp ); this.Add( KnownExtTypeName.MultidimensionalArray, KnownExtTypeCode.MultidimensionalArray ); } @@ -107,7 +108,11 @@ public bool Add( string name, byte typeCode ) { ValidateName( name ); ValidateTypeCode( typeCode ); + return this.AddInternal( name, typeCode ); + } + private bool AddInternal( string name, byte typeCode ) + { lock ( this._syncRoot ) { try @@ -244,4 +249,4 @@ private static void ValidateTypeCode( byte typeCode ) } } } -} \ No newline at end of file +} diff --git a/src/MsgPack/Serialization/SerializationContext.cs b/src/MsgPack/Serialization/SerializationContext.cs index c06d65893..cb8047b1c 100644 --- a/src/MsgPack/Serialization/SerializationContext.cs +++ b/src/MsgPack/Serialization/SerializationContext.cs @@ -2,7 +2,7 @@ // // MessagePack for CLI // -// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// Copyright (C) 2010-2017 FUJIWARA, Yusuke // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -313,7 +313,7 @@ public DefaultConcreteTypeRepository DefaultCollectionTypes get { return this._defaultCollectionTypes; } } - private int _defaultDateTimeConversionMethod; + private int _defaultDateTimeConversionMethod = ( int )DateTimeConversionMethod.Timestamp; /// /// Gets or sets the default conversion methods of built-in serializers. @@ -336,6 +336,7 @@ public DateTimeConversionMethod DefaultDateTimeConversionMethod { case DateTimeConversionMethod.Native: case DateTimeConversionMethod.UnixEpoc: + case DateTimeConversionMethod.Timestamp: { break; } diff --git a/src/MsgPack/Serialization/SerializerRepository.defaults.cs b/src/MsgPack/Serialization/SerializerRepository.defaults.cs index 03064679a..d0582deaa 100644 --- a/src/MsgPack/Serialization/SerializerRepository.defaults.cs +++ b/src/MsgPack/Serialization/SerializerRepository.defaults.cs @@ -1,4 +1,4 @@ -#region -- License Terms -- +#region -- License Terms -- // // MessagePack for CLI // @@ -45,7 +45,7 @@ namespace MsgPack.Serialization // ReSharper disable RedundantNameQualifier partial class SerializerRepository { - internal const int DefaultTableCapacity = 56; + internal const int DefaultTableCapacity = 58; [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling", Justification = "This API is naturally coupled with many types" )] internal static Dictionary InitializeDefaultTable( SerializationContext ownerContext ) @@ -66,12 +66,14 @@ internal static Dictionary InitializeDefaultTable( Se dictionary.Add( typeof( Byte[] ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.System_ByteArrayMessagePackSerializer( ownerContext ) ); dictionary.Add( typeof( DateTime ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.DateTimeMessagePackSerializerProvider( ownerContext, false ) ); dictionary.Add( typeof( DateTimeOffset ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.DateTimeOffsetMessagePackSerializerProvider( ownerContext, false ) ); + dictionary.Add( typeof( Timestamp ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.TimestampMessagePackSerializerProvider( ownerContext, false ) ); #if ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY dictionary.Add( typeof( System.Runtime.InteropServices.ComTypes.FILETIME ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.FileTimeMessagePackSerializerProvider( ownerContext, false ) ); #endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY // DateTime, DateTimeOffset, and FILETIME must have nullable providers. dictionary.Add( typeof( DateTime? ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.DateTimeMessagePackSerializerProvider( ownerContext, true ) ); dictionary.Add( typeof( DateTimeOffset? ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.DateTimeOffsetMessagePackSerializerProvider( ownerContext, true ) ); + dictionary.Add( typeof( Timestamp? ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.TimestampMessagePackSerializerProvider( ownerContext, true ) ); #if ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY dictionary.Add( typeof( System.Runtime.InteropServices.ComTypes.FILETIME? ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.FileTimeMessagePackSerializerProvider( ownerContext, true ) ); #endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY diff --git a/src/MsgPack/Serialization/SerializerRepository.defaults.tt b/src/MsgPack/Serialization/SerializerRepository.defaults.tt index adbc6460c..58884213b 100644 --- a/src/MsgPack/Serialization/SerializerRepository.defaults.tt +++ b/src/MsgPack/Serialization/SerializerRepository.defaults.tt @@ -1,8 +1,8 @@ -<# +<# // // MessagePack for CLI // -// Copyright (C) 2010-2016 FUJIWARA, Yusuke +// Copyright (C) 2010-2017 FUJIWARA, Yusuke // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -135,6 +135,20 @@ var excludes = // .NET 4.6 Types -- comment out when you face T4Template problems typeof( System.Diagnostics.Tracing.EventSourceOptions ), typeof( System.Threading.AsyncLocalValueChangedArgs<> ), + // .NET 4.7 Types -- comment out when you face T4Template problems + typeof( System.Security.Cryptography.ECCurve ), + typeof( System.Security.Cryptography.ECParameters ), + typeof( System.Security.Cryptography.ECPoint ), + // ValueTuples -- should be supported via tuple support + typeof( System.ValueTuple ), + typeof( System.ValueTuple<> ), + typeof( System.ValueTuple<,> ), + typeof( System.ValueTuple<,,> ), + typeof( System.ValueTuple<,,,> ), + typeof( System.ValueTuple<,,,,> ), + typeof( System.ValueTuple<,,,,,> ), + typeof( System.ValueTuple<,,,,,,> ), + typeof( System.ValueTuple<,,,,,,,> ), }; var structTypes = typeof( object ).Assembly.GetTypes() @@ -270,7 +284,7 @@ namespace MsgPack.Serialization // ReSharper disable RedundantNameQualifier partial class <#= typeName #> { - internal const int DefaultTableCapacity = <#= structTypes.Where( t => !t.IsEnum ).Count() + classTypes.Length + 19 #>; + internal const int DefaultTableCapacity = <#= structTypes.Where( t => !t.IsEnum ).Count() + classTypes.Length + 21 #>; [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling", Justification = "This API is naturally coupled with many types" )] internal static Dictionary InitializeDefaultTable( SerializationContext ownerContext ) @@ -291,12 +305,14 @@ namespace MsgPack.Serialization dictionary.Add( typeof( Byte[] ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.<#= typeof( Byte ).FullName.Replace( Type.Delimiter, '_' ).Replace( '`', '_' ) #>ArrayMessagePackSerializer( ownerContext ) ); dictionary.Add( typeof( DateTime ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.DateTimeMessagePackSerializerProvider( ownerContext, false ) ); dictionary.Add( typeof( DateTimeOffset ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.DateTimeOffsetMessagePackSerializerProvider( ownerContext, false ) ); + dictionary.Add( typeof( Timestamp ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.TimestampMessagePackSerializerProvider( ownerContext, false ) ); #if ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY dictionary.Add( typeof( System.Runtime.InteropServices.ComTypes.FILETIME ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.FileTimeMessagePackSerializerProvider( ownerContext, false ) ); #endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY // DateTime, DateTimeOffset, and FILETIME must have nullable providers. dictionary.Add( typeof( DateTime? ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.DateTimeMessagePackSerializerProvider( ownerContext, true ) ); dictionary.Add( typeof( DateTimeOffset? ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.DateTimeOffsetMessagePackSerializerProvider( ownerContext, true ) ); + dictionary.Add( typeof( Timestamp? ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.TimestampMessagePackSerializerProvider( ownerContext, true ) ); #if ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY dictionary.Add( typeof( System.Runtime.InteropServices.ComTypes.FILETIME? ).TypeHandle, new MsgPack.Serialization.DefaultSerializers.FileTimeMessagePackSerializerProvider( ownerContext, true ) ); #endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY @@ -583,4 +599,4 @@ private static string ToCSharpToken( Type type ) return buffer.ToString(); } -#> \ No newline at end of file +#> From 7b32c3a2741fcee54561604b3a2c5659ec88813f Mon Sep 17 00:00:00 2001 From: yfakariya Date: Wed, 20 Sep 2017 22:57:07 +0900 Subject: [PATCH 08/23] Synchronize project files. --- Sync.json | 2 + .../MsgPack.Silverlight.5.csproj | 45 +++++++++++++++++ .../MsgPack.Silverlight.WindowsPhone.csproj | 48 +++++++++++++++++++ .../MsgPack.Unity.Full.csproj | 45 +++++++++++++++++ src/MsgPack.Unity/MsgPack.Unity.csproj | 45 +++++++++++++++++ src/MsgPack.Uwp/MsgPack.Uwp.csproj | 48 +++++++++++++++++++ .../MsgPack.UnitTest.Mono.csproj | 30 ++++++++++++ ...ck.UnitTest.Silverlight.5.FullTrust.csproj | 30 ++++++++++++ .../MsgPack.UnitTest.Silverlight.5.csproj | 30 ++++++++++++ ...k.UnitTest.Silverlight.WindowsPhone.csproj | 30 ++++++++++++ ....UnitTest.Unity.Il2cpp.Full.Desktop.csproj | 30 ++++++++++++ .../MsgPack.UnitTest.Uwp.Aot.csproj | 30 ++++++++++++ .../MsgPack.UnitTest.Uwp.csproj | 30 ++++++++++++ ...MsgPack.UnitTest.WinRT.WindowsPhone.csproj | 30 ++++++++++++ .../MsgPack.UnitTest.WinRT.csproj | 30 ++++++++++++ .../MsgPack.UnitTest.Xamarin.Android.csproj | 30 ++++++++++++ .../MsgPack.UnitTest.Xamarin.iOS.csproj | 30 ++++++++++++ 17 files changed, 563 insertions(+) diff --git a/Sync.json b/Sync.json index ddada6d03..3ad947057 100644 --- a/Sync.json +++ b/Sync.json @@ -67,6 +67,7 @@ {"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/SimdTypeSerializers.cs"}, {"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/System_Numerics_ComplexMessagePackSerializer.cs"}, {"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/System_Security_Cryptography_HashAlgorithmNameMessagePackSerializer.cs"}, + {"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/TimestampFileTimeMessagePackSerializer.cs"}, {"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/UnixEpocFileTimeMessagePackSerializer.cs"}, {"type": "remove", "path": "../MsgPack/Serialization/ReflectionSerializers/ReflectionTupleMessagePackSerializer`1.cs"}, {"type": "remove", "path": "../MsgPack/Serialization/ReflectionExtensions.ConstructorDelegate.cs"}, @@ -117,6 +118,7 @@ {"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/System_Collections_StackMessagePackSerializer.cs"}, {"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/System_Collections_Specialized_NameValueCollectionMessagePackSerializer.cs"}, {"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/System_Security_Cryptography_HashAlgorithmNameMessagePackSerializer.cs"}, + {"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/TimestampFileTimeMessagePackSerializer.cs"}, {"type": "remove", "path": "../MsgPack/Serialization/DefaultSerializers/UnixEpocFileTimeMessagePackSerializer.cs"}, {"type": "remove", "path": "../MsgPack/BufferedStream.cs"}, {"type": "remove", "path": "../MsgPack/NetStandardCompatibility.cs"}, diff --git a/src/MsgPack.Silverlight.5/MsgPack.Silverlight.5.csproj b/src/MsgPack.Silverlight.5/MsgPack.Silverlight.5.csproj index ce4905f1d..10ca68581 100644 --- a/src/MsgPack.Silverlight.5/MsgPack.Silverlight.5.csproj +++ b/src/MsgPack.Silverlight.5/MsgPack.Silverlight.5.csproj @@ -446,6 +446,15 @@ Serialization\DefaultSerializers\System_VersionMessagePackSerializer.cs + + Serialization\DefaultSerializers\TimestampDateTimeMessagePackSerializer.cs + + + Serialization\DefaultSerializers\TimestampMessagePackSerializer.cs + + + Serialization\DefaultSerializers\TimestampMessagePackSerializerProvider.cs + Serialization\DefaultSerializers\UnixEpocDateTimeMessagePackSerializer.cs @@ -743,6 +752,42 @@ SubtreeUnpacker.Unpacking.cs + + Timestamp.Calculation.cs + + + Timestamp.Comparison.cs + + + Timestamp.Conversion.cs + + + Timestamp.cs + + + Timestamp.ParseExact.cs + + + Timestamp.Properties.cs + + + Timestamp.ToString.cs + + + Timestamp.TryParseExact.cs + + + TimestampParseResult.cs + + + TimestampStringConverter.cs + + + TimestampStringConverter.Parse.cs + + + TimestampStringConverter.ToString.cs + TupleItems.cs diff --git a/src/MsgPack.Silverlight.WindowsPhone/MsgPack.Silverlight.WindowsPhone.csproj b/src/MsgPack.Silverlight.WindowsPhone/MsgPack.Silverlight.WindowsPhone.csproj index a1a010c92..dcd604b53 100644 --- a/src/MsgPack.Silverlight.WindowsPhone/MsgPack.Silverlight.WindowsPhone.csproj +++ b/src/MsgPack.Silverlight.WindowsPhone/MsgPack.Silverlight.WindowsPhone.csproj @@ -441,6 +441,18 @@ Serialization\DefaultSerializers\System_VersionMessagePackSerializer.cs + + Serialization\DefaultSerializers\TimestampDateTimeMessagePackSerializer.cs + + + Serialization\DefaultSerializers\TimestampFileTimeMessagePackSerializer.cs + + + Serialization\DefaultSerializers\TimestampMessagePackSerializer.cs + + + Serialization\DefaultSerializers\TimestampMessagePackSerializerProvider.cs + Serialization\DefaultSerializers\UnixEpocDateTimeMessagePackSerializer.cs @@ -741,6 +753,42 @@ SubtreeUnpacker.Unpacking.cs + + Timestamp.Calculation.cs + + + Timestamp.Comparison.cs + + + Timestamp.Conversion.cs + + + Timestamp.cs + + + Timestamp.ParseExact.cs + + + Timestamp.Properties.cs + + + Timestamp.ToString.cs + + + Timestamp.TryParseExact.cs + + + TimestampParseResult.cs + + + TimestampStringConverter.cs + + + TimestampStringConverter.Parse.cs + + + TimestampStringConverter.ToString.cs + TupleItems.cs diff --git a/src/MsgPack.Unity.Full/MsgPack.Unity.Full.csproj b/src/MsgPack.Unity.Full/MsgPack.Unity.Full.csproj index 866d3290e..f447a9044 100644 --- a/src/MsgPack.Unity.Full/MsgPack.Unity.Full.csproj +++ b/src/MsgPack.Unity.Full/MsgPack.Unity.Full.csproj @@ -418,6 +418,15 @@ Serialization\DefaultSerializers\System_VersionMessagePackSerializer.cs + + Serialization\DefaultSerializers\TimestampDateTimeMessagePackSerializer.cs + + + Serialization\DefaultSerializers\TimestampMessagePackSerializer.cs + + + Serialization\DefaultSerializers\TimestampMessagePackSerializerProvider.cs + Serialization\DefaultSerializers\UnixEpocDateTimeMessagePackSerializer.cs @@ -712,6 +721,42 @@ SubtreeUnpacker.Unpacking.cs + + Timestamp.Calculation.cs + + + Timestamp.Comparison.cs + + + Timestamp.Conversion.cs + + + Timestamp.cs + + + Timestamp.ParseExact.cs + + + Timestamp.Properties.cs + + + Timestamp.ToString.cs + + + Timestamp.TryParseExact.cs + + + TimestampParseResult.cs + + + TimestampStringConverter.cs + + + TimestampStringConverter.Parse.cs + + + TimestampStringConverter.ToString.cs + TupleItems.cs diff --git a/src/MsgPack.Unity/MsgPack.Unity.csproj b/src/MsgPack.Unity/MsgPack.Unity.csproj index 9295d30b0..999754ed8 100644 --- a/src/MsgPack.Unity/MsgPack.Unity.csproj +++ b/src/MsgPack.Unity/MsgPack.Unity.csproj @@ -424,6 +424,15 @@ Serialization\DefaultSerializers\System_VersionMessagePackSerializer.cs + + Serialization\DefaultSerializers\TimestampDateTimeMessagePackSerializer.cs + + + Serialization\DefaultSerializers\TimestampMessagePackSerializer.cs + + + Serialization\DefaultSerializers\TimestampMessagePackSerializerProvider.cs + Serialization\DefaultSerializers\UnixEpocDateTimeMessagePackSerializer.cs @@ -718,6 +727,42 @@ SubtreeUnpacker.Unpacking.cs + + Timestamp.Calculation.cs + + + Timestamp.Comparison.cs + + + Timestamp.Conversion.cs + + + Timestamp.cs + + + Timestamp.ParseExact.cs + + + Timestamp.Properties.cs + + + Timestamp.ToString.cs + + + Timestamp.TryParseExact.cs + + + TimestampParseResult.cs + + + TimestampStringConverter.cs + + + TimestampStringConverter.Parse.cs + + + TimestampStringConverter.ToString.cs + TupleItems.cs diff --git a/src/MsgPack.Uwp/MsgPack.Uwp.csproj b/src/MsgPack.Uwp/MsgPack.Uwp.csproj index 61f0a7247..df83e84ab 100644 --- a/src/MsgPack.Uwp/MsgPack.Uwp.csproj +++ b/src/MsgPack.Uwp/MsgPack.Uwp.csproj @@ -484,6 +484,18 @@ Serialization\DefaultSerializers\System_VersionMessagePackSerializer.cs + + Serialization\DefaultSerializers\TimestampDateTimeMessagePackSerializer.cs + + + Serialization\DefaultSerializers\TimestampFileTimeMessagePackSerializer.cs + + + Serialization\DefaultSerializers\TimestampMessagePackSerializer.cs + + + Serialization\DefaultSerializers\TimestampMessagePackSerializerProvider.cs + Serialization\DefaultSerializers\UnixEpocDateTimeMessagePackSerializer.cs @@ -787,6 +799,42 @@ TaskAugument.cs + + Timestamp.Calculation.cs + + + Timestamp.Comparison.cs + + + Timestamp.Conversion.cs + + + Timestamp.cs + + + Timestamp.ParseExact.cs + + + Timestamp.Properties.cs + + + Timestamp.ToString.cs + + + Timestamp.TryParseExact.cs + + + TimestampParseResult.cs + + + TimestampStringConverter.cs + + + TimestampStringConverter.Parse.cs + + + TimestampStringConverter.ToString.cs + TupleItems.cs diff --git a/test/MsgPack.UnitTest.Mono/MsgPack.UnitTest.Mono.csproj b/test/MsgPack.UnitTest.Mono/MsgPack.UnitTest.Mono.csproj index b14432250..2caac76c5 100644 --- a/test/MsgPack.UnitTest.Mono/MsgPack.UnitTest.Mono.csproj +++ b/test/MsgPack.UnitTest.Mono/MsgPack.UnitTest.Mono.csproj @@ -1511,6 +1511,9 @@ Image.cs + + LegacyJapaneseCultureInfo.cs + MessagePackConvertTest.cs @@ -1781,6 +1784,9 @@ Serialization\TestValueType.cs + + Serialization\TimestampSerializationTest.cs + Serialization\TypeWithDuplicatedMessagePackMemberAttributeMember.cs @@ -1820,6 +1826,30 @@ TestSuite.cs + + TimestampTest.Calculation.cs + + + TimestampTest.Comparison.cs + + + TimestampTest.Conversion.cs + + + TimestampTest.cs + + + TimestampTest.EncodeDecode.cs + + + TimestampTest.Parse.cs + + + TimestampTest.Properties.cs + + + TimestampTest.ToString.cs + UnpackerFactoryTest.cs diff --git a/test/MsgPack.UnitTest.Silverlight.5.FullTrust/MsgPack.UnitTest.Silverlight.5.FullTrust.csproj b/test/MsgPack.UnitTest.Silverlight.5.FullTrust/MsgPack.UnitTest.Silverlight.5.FullTrust.csproj index f7e74dc1b..2822d9641 100644 --- a/test/MsgPack.UnitTest.Silverlight.5.FullTrust/MsgPack.UnitTest.Silverlight.5.FullTrust.csproj +++ b/test/MsgPack.UnitTest.Silverlight.5.FullTrust/MsgPack.UnitTest.Silverlight.5.FullTrust.csproj @@ -127,6 +127,9 @@ Image.cs + + LegacyJapaneseCultureInfo.cs + MessagePackConvertTest.cs @@ -337,6 +340,9 @@ Serialization\TestValueType.cs + + Serialization\TimestampSerializationTest.cs + Serialization\TypeWithDuplicatedMessagePackMemberAttributeMember.cs @@ -373,6 +379,30 @@ TestRandom.cs + + TimestampTest.Calculation.cs + + + TimestampTest.Comparison.cs + + + TimestampTest.Conversion.cs + + + TimestampTest.cs + + + TimestampTest.EncodeDecode.cs + + + TimestampTest.Parse.cs + + + TimestampTest.Properties.cs + + + TimestampTest.ToString.cs + UnpackerFactoryTest.cs diff --git a/test/MsgPack.UnitTest.Silverlight.5/MsgPack.UnitTest.Silverlight.5.csproj b/test/MsgPack.UnitTest.Silverlight.5/MsgPack.UnitTest.Silverlight.5.csproj index cc3e23d15..0c4c68f19 100644 --- a/test/MsgPack.UnitTest.Silverlight.5/MsgPack.UnitTest.Silverlight.5.csproj +++ b/test/MsgPack.UnitTest.Silverlight.5/MsgPack.UnitTest.Silverlight.5.csproj @@ -112,6 +112,9 @@ Image.cs + + LegacyJapaneseCultureInfo.cs + MessagePackConvertTest.cs @@ -322,6 +325,9 @@ Serialization\TestValueType.cs + + Serialization\TimestampSerializationTest.cs + Serialization\TypeWithDuplicatedMessagePackMemberAttributeMember.cs @@ -358,6 +364,30 @@ TestRandom.cs + + TimestampTest.Calculation.cs + + + TimestampTest.Comparison.cs + + + TimestampTest.Conversion.cs + + + TimestampTest.cs + + + TimestampTest.EncodeDecode.cs + + + TimestampTest.Parse.cs + + + TimestampTest.Properties.cs + + + TimestampTest.ToString.cs + UnpackerFactoryTest.cs diff --git a/test/MsgPack.UnitTest.Silverlight.WindowsPhone/MsgPack.UnitTest.Silverlight.WindowsPhone.csproj b/test/MsgPack.UnitTest.Silverlight.WindowsPhone/MsgPack.UnitTest.Silverlight.WindowsPhone.csproj index d2d418737..2e7e4ae0d 100644 --- a/test/MsgPack.UnitTest.Silverlight.WindowsPhone/MsgPack.UnitTest.Silverlight.WindowsPhone.csproj +++ b/test/MsgPack.UnitTest.Silverlight.WindowsPhone/MsgPack.UnitTest.Silverlight.WindowsPhone.csproj @@ -90,6 +90,9 @@ Image.cs + + LegacyJapaneseCultureInfo.cs + MessagePackConvertTest.cs @@ -306,6 +309,9 @@ Serialization\TestValueType.cs + + Serialization\TimestampSerializationTest.cs + Serialization\TypeWithDuplicatedMessagePackMemberAttributeMember.cs @@ -345,6 +351,30 @@ TestSuite.cs + + TimestampTest.Calculation.cs + + + TimestampTest.Comparison.cs + + + TimestampTest.Conversion.cs + + + TimestampTest.cs + + + TimestampTest.EncodeDecode.cs + + + TimestampTest.Parse.cs + + + TimestampTest.Properties.cs + + + TimestampTest.ToString.cs + UnpackerFactoryTest.cs diff --git a/test/MsgPack.UnitTest.Unity.Il2cpp.Full.Desktop/MsgPack.UnitTest.Unity.Il2cpp.Full.Desktop.csproj b/test/MsgPack.UnitTest.Unity.Il2cpp.Full.Desktop/MsgPack.UnitTest.Unity.Il2cpp.Full.Desktop.csproj index e5fd3e184..de962ff4e 100644 --- a/test/MsgPack.UnitTest.Unity.Il2cpp.Full.Desktop/MsgPack.UnitTest.Unity.Il2cpp.Full.Desktop.csproj +++ b/test/MsgPack.UnitTest.Unity.Il2cpp.Full.Desktop/MsgPack.UnitTest.Unity.Il2cpp.Full.Desktop.csproj @@ -433,6 +433,9 @@ Image.cs + + LegacyJapaneseCultureInfo.cs + MessagePackConvertTest.cs @@ -676,6 +679,9 @@ Serialization\TestValueType.cs + + Serialization\TimestampSerializationTest.cs + Serialization\TypeWithDuplicatedMessagePackMemberAttributeMember.cs @@ -712,6 +718,30 @@ TestRandom.cs + + TimestampTest.Calculation.cs + + + TimestampTest.Comparison.cs + + + TimestampTest.Conversion.cs + + + TimestampTest.cs + + + TimestampTest.EncodeDecode.cs + + + TimestampTest.Parse.cs + + + TimestampTest.Properties.cs + + + TimestampTest.ToString.cs + UnpackerFactoryTest.cs diff --git a/test/MsgPack.UnitTest.Uwp.Aot/MsgPack.UnitTest.Uwp.Aot.csproj b/test/MsgPack.UnitTest.Uwp.Aot/MsgPack.UnitTest.Uwp.Aot.csproj index 23b77ea7d..f75da80da 100644 --- a/test/MsgPack.UnitTest.Uwp.Aot/MsgPack.UnitTest.Uwp.Aot.csproj +++ b/test/MsgPack.UnitTest.Uwp.Aot/MsgPack.UnitTest.Uwp.Aot.csproj @@ -1542,6 +1542,9 @@ Image.cs + + LegacyJapaneseCultureInfo.cs + MessagePackConvertTest.cs @@ -1770,6 +1773,9 @@ Serialization\TestValueType.cs + + Serialization\TimestampSerializationTest.cs + Serialization\TypeWithDuplicatedMessagePackMemberAttributeMember.cs @@ -1806,6 +1812,30 @@ TestRandom.cs + + TimestampTest.Calculation.cs + + + TimestampTest.Comparison.cs + + + TimestampTest.Conversion.cs + + + TimestampTest.cs + + + TimestampTest.EncodeDecode.cs + + + TimestampTest.Parse.cs + + + TimestampTest.Properties.cs + + + TimestampTest.ToString.cs + UnpackerFactoryTest.cs diff --git a/test/MsgPack.UnitTest.Uwp/MsgPack.UnitTest.Uwp.csproj b/test/MsgPack.UnitTest.Uwp/MsgPack.UnitTest.Uwp.csproj index 96fd1b963..e514390bf 100644 --- a/test/MsgPack.UnitTest.Uwp/MsgPack.UnitTest.Uwp.csproj +++ b/test/MsgPack.UnitTest.Uwp/MsgPack.UnitTest.Uwp.csproj @@ -1524,6 +1524,9 @@ Image.cs + + LegacyJapaneseCultureInfo.cs + MessagePackConvertTest.cs @@ -1752,6 +1755,9 @@ Serialization\TestValueType.cs + + Serialization\TimestampSerializationTest.cs + Serialization\TypeWithDuplicatedMessagePackMemberAttributeMember.cs @@ -1788,6 +1794,30 @@ TestRandom.cs + + TimestampTest.Calculation.cs + + + TimestampTest.Comparison.cs + + + TimestampTest.Conversion.cs + + + TimestampTest.cs + + + TimestampTest.EncodeDecode.cs + + + TimestampTest.Parse.cs + + + TimestampTest.Properties.cs + + + TimestampTest.ToString.cs + UnpackerFactoryTest.cs diff --git a/test/MsgPack.UnitTest.WinRT.WindowsPhone/MsgPack.UnitTest.WinRT.WindowsPhone.csproj b/test/MsgPack.UnitTest.WinRT.WindowsPhone/MsgPack.UnitTest.WinRT.WindowsPhone.csproj index a24f1ec98..5c893843d 100644 --- a/test/MsgPack.UnitTest.WinRT.WindowsPhone/MsgPack.UnitTest.WinRT.WindowsPhone.csproj +++ b/test/MsgPack.UnitTest.WinRT.WindowsPhone/MsgPack.UnitTest.WinRT.WindowsPhone.csproj @@ -112,6 +112,9 @@ Image.cs + + LegacyJapaneseCultureInfo.cs + MessagePackConvertTest.cs @@ -328,6 +331,9 @@ Serialization\TestValueType.cs + + Serialization\TimestampSerializationTest.cs + Serialization\TypeWithDuplicatedMessagePackMemberAttributeMember.cs @@ -367,6 +373,30 @@ TestSuite.cs + + TimestampTest.Calculation.cs + + + TimestampTest.Comparison.cs + + + TimestampTest.Conversion.cs + + + TimestampTest.cs + + + TimestampTest.EncodeDecode.cs + + + TimestampTest.Parse.cs + + + TimestampTest.Properties.cs + + + TimestampTest.ToString.cs + UnpackerFactoryTest.cs diff --git a/test/MsgPack.UnitTest.WinRT/MsgPack.UnitTest.WinRT.csproj b/test/MsgPack.UnitTest.WinRT/MsgPack.UnitTest.WinRT.csproj index dcf3f9e24..61db5ccc5 100644 --- a/test/MsgPack.UnitTest.WinRT/MsgPack.UnitTest.WinRT.csproj +++ b/test/MsgPack.UnitTest.WinRT/MsgPack.UnitTest.WinRT.csproj @@ -118,6 +118,9 @@ Image.cs + + LegacyJapaneseCultureInfo.cs + MessagePackConvertTest.cs @@ -334,6 +337,9 @@ Serialization\TestValueType.cs + + Serialization\TimestampSerializationTest.cs + Serialization\TypeWithDuplicatedMessagePackMemberAttributeMember.cs @@ -373,6 +379,30 @@ TestSuite.cs + + TimestampTest.Calculation.cs + + + TimestampTest.Comparison.cs + + + TimestampTest.Conversion.cs + + + TimestampTest.cs + + + TimestampTest.EncodeDecode.cs + + + TimestampTest.Parse.cs + + + TimestampTest.Properties.cs + + + TimestampTest.ToString.cs + UnpackerFactoryTest.cs diff --git a/test/MsgPack.UnitTest.Xamarin.Android/MsgPack.UnitTest.Xamarin.Android.csproj b/test/MsgPack.UnitTest.Xamarin.Android/MsgPack.UnitTest.Xamarin.Android.csproj index 2b39cbe4e..a8b5be292 100644 --- a/test/MsgPack.UnitTest.Xamarin.Android/MsgPack.UnitTest.Xamarin.Android.csproj +++ b/test/MsgPack.UnitTest.Xamarin.Android/MsgPack.UnitTest.Xamarin.Android.csproj @@ -1516,6 +1516,9 @@ Image.cs + + LegacyJapaneseCultureInfo.cs + MessagePackConvertTest.cs @@ -1744,6 +1747,9 @@ Serialization\TestValueType.cs + + Serialization\TimestampSerializationTest.cs + Serialization\TypeWithDuplicatedMessagePackMemberAttributeMember.cs @@ -1780,6 +1786,30 @@ TestRandom.cs + + TimestampTest.Calculation.cs + + + TimestampTest.Comparison.cs + + + TimestampTest.Conversion.cs + + + TimestampTest.cs + + + TimestampTest.EncodeDecode.cs + + + TimestampTest.Parse.cs + + + TimestampTest.Properties.cs + + + TimestampTest.ToString.cs + UnpackerFactoryTest.cs diff --git a/test/MsgPack.UnitTest.Xamarin.iOS/MsgPack.UnitTest.Xamarin.iOS.csproj b/test/MsgPack.UnitTest.Xamarin.iOS/MsgPack.UnitTest.Xamarin.iOS.csproj index e3285e612..3da12faab 100644 --- a/test/MsgPack.UnitTest.Xamarin.iOS/MsgPack.UnitTest.Xamarin.iOS.csproj +++ b/test/MsgPack.UnitTest.Xamarin.iOS/MsgPack.UnitTest.Xamarin.iOS.csproj @@ -1547,6 +1547,9 @@ Image.cs + + LegacyJapaneseCultureInfo.cs + MessagePackConvertTest.cs @@ -1775,6 +1778,9 @@ Serialization\TestValueType.cs + + Serialization\TimestampSerializationTest.cs + Serialization\TypeWithDuplicatedMessagePackMemberAttributeMember.cs @@ -1811,6 +1817,30 @@ TestRandom.cs + + TimestampTest.Calculation.cs + + + TimestampTest.Comparison.cs + + + TimestampTest.Conversion.cs + + + TimestampTest.cs + + + TimestampTest.EncodeDecode.cs + + + TimestampTest.Parse.cs + + + TimestampTest.Properties.cs + + + TimestampTest.ToString.cs + UnpackerFactoryTest.cs From f1dc27861c7bf3419de959373d2767f473b54f6e Mon Sep 17 00:00:00 2001 From: yfakariya Date: Fri, 22 Sep 2017 16:47:43 +0900 Subject: [PATCH 09/23] Fix build error for some platforms. --- src/MsgPack/Timestamp.Calculation.cs | 35 ++++-- src/MsgPack/Timestamp.Properties.cs | 6 +- src/MsgPack/Timestamp.cs | 6 +- .../TimestampSerializationTest.cs | 22 ++++ .../TimestampTest.Calculation.cs | 17 ++- .../TimestampTest.Calculation.tt | 17 ++- .../TimestampTest.Conversion.cs | 32 ++--- .../TimestampTest.Conversion.tt | 16 +-- .../TimestampTest.EncodeDecode.cs | 3 - .../TimestampTest.EncodeDecode.tt | 3 - test/MsgPack.UnitTest/TimestampTest.Parse.cs | 116 ++++++++++-------- test/MsgPack.UnitTest/TimestampTest.Parse.tt | 32 ++--- .../TimestampTest.Properties.cs | 8 +- .../TimestampTest.Properties.tt | 8 +- .../TimestampTest.ToString.cs | 101 +++++++++------ .../TimestampTest.ToString.tt | 53 +++++--- 16 files changed, 293 insertions(+), 182 deletions(-) diff --git a/src/MsgPack/Timestamp.Calculation.cs b/src/MsgPack/Timestamp.Calculation.cs index 190f86c96..7d4d95886 100644 --- a/src/MsgPack/Timestamp.Calculation.cs +++ b/src/MsgPack/Timestamp.Calculation.cs @@ -28,17 +28,25 @@ #else using System.Diagnostics.Contracts; #endif // CORE_CLR || UNITY || NETSTANDARD1_1 -#if !NET35 +#if !NET35 && !UNITY +#if !WINDOWS_PHONE +#if !UNITY || MSGPACK_UNITY_FULL using System.Numerics; -#endif // !NET35 +#endif // !WINDOWS_PHONE +#endif // !UNITY || MSGPACK_UNITY_FULL +#endif // !NET35 && !UNITY namespace MsgPack { partial struct Timestamp { -#if !NET35 +#if !NET35 && !UNITY +#if !WINDOWS_PHONE +#if !UNITY || MSGPACK_UNITY_FULL private static readonly BigInteger NanoToSecondsAsBigInteger = new BigInteger( 1000 * 1000 * 1000 ); -#endif // !NET35 +#endif // !WINDOWS_PHONE +#endif // !UNITY || MSGPACK_UNITY_FULL +#endif // !NET35 && !UNITY /// /// Adds a specified to this instance. @@ -88,7 +96,10 @@ public Timestamp Subtract( TimeSpan offset ) return this.Add( -offset ); } -#if !NET35 +#if !NET35 && !UNITY +#if !WINDOWS_PHONE +#if !UNITY || MSGPACK_UNITY_FULL + /// /// Adds a specified nanoseconds represented as a from this instance. /// @@ -158,7 +169,10 @@ public BigInteger Subtract( Timestamp other ) return seconds * SecondsToNanos + nanos; } -#endif // !NET35 + +#endif // !WINDOWS_PHONE +#endif // !UNITY || MSGPACK_UNITY_FULL +#endif // !NET35 && !UNITY /// /// Calculates a with specified and an offset represented as . @@ -182,7 +196,9 @@ public BigInteger Subtract( Timestamp other ) return value.Subtract( offset ); } -#if !NET35 +#if !NET35 && !UNITY +#if !WINDOWS_PHONE +#if !UNITY || MSGPACK_UNITY_FULL /// /// Calculates a with specified and a nanoseconds offset represented as . @@ -216,6 +232,9 @@ public BigInteger Subtract( Timestamp other ) { return left.Subtract( right ); } -#endif // !NET35 + +#endif // !WINDOWS_PHONE +#endif // !UNITY || MSGPACK_UNITY_FULL +#endif // !NET35 && !UNITY } } diff --git a/src/MsgPack/Timestamp.Properties.cs b/src/MsgPack/Timestamp.Properties.cs index 1f49e284e..86d1aa8b4 100644 --- a/src/MsgPack/Timestamp.Properties.cs +++ b/src/MsgPack/Timestamp.Properties.cs @@ -489,11 +489,11 @@ public static Timestamp UtcNow { var now = DateTimeOffset.UtcNow; return new Timestamp( -#if !NET35 && !NET45 && !NETSTANDARD1_1 +#if !NET35 && !NET45 && !NETSTANDARD1_1 && !UNITY && !SILVERLIGHT now.ToUnixTimeSeconds(), -#else // !NET35 && !NET45 && !NETSTANDARD1_1 +#else // !NET35 && !NET45 && !NETSTANDARD1_1 && !UNITY && !SILVERLIGHT ( now.Ticks / TimeSpan.TicksPerSecond ) - UnixEpochInSeconds, -#endif // !NET35 && !NET45 && !NETSTANDARD1_1 +#endif // !NET35 && !NET45 && !NETSTANDARD1_1 && !UNITY && !SILVERLIGHT unchecked( ( int )( now.Ticks % 10000000 * 100 ) ) ); } diff --git a/src/MsgPack/Timestamp.cs b/src/MsgPack/Timestamp.cs index 217651424..1a79c21e2 100644 --- a/src/MsgPack/Timestamp.cs +++ b/src/MsgPack/Timestamp.cs @@ -169,7 +169,7 @@ private static int ToDaysOffsetFromNewYear( int month, int day, bool isLeapYear return result; } -#if NETSTANDARD1_1 || NETSTANDARD1_3 +#if NETSTANDARD1_1 || NETSTANDARD1_3 || SILVERLIGHT // Slow alternative internal static long DivRem( long dividend, long divisor, out long remainder ) @@ -178,14 +178,14 @@ internal static long DivRem( long dividend, long divisor, out long remainder ) return dividend / divisor; } -#else // NETSTANDARD1_1 || NETSTANDARD1_3 +#else // NETSTANDARD1_1 || NETSTANDARD1_3 || SILVERLIGHT internal static long DivRem( long dividend, long divisor, out long remainder ) { return Math.DivRem( dividend, divisor, out remainder ); } -#endif // NETSTANDARD1_1 || NETSTANDARD1_3 +#endif // NETSTANDARD1_1 || NETSTANDARD1_3 || SILVERLIGHT internal struct Value { diff --git a/test/MsgPack.UnitTest/Serialization/TimestampSerializationTest.cs b/test/MsgPack.UnitTest/Serialization/TimestampSerializationTest.cs index cb7d34031..2c5314f6a 100644 --- a/test/MsgPack.UnitTest/Serialization/TimestampSerializationTest.cs +++ b/test/MsgPack.UnitTest/Serialization/TimestampSerializationTest.cs @@ -20,7 +20,9 @@ using System; using System.IO; +#if ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY using System.Runtime.InteropServices.ComTypes; +#endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY using MsgPack.Serialization.DefaultSerializers; @@ -51,7 +53,9 @@ private static void TestSerializationCore( SerializationContext context, DateTim Timestamp = now, DateTime = dateTimeNow.AddSeconds( 1 ).UtcDateTime, DateTimeOffset = dateTimeNow.AddSeconds( 2 ), +#if ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY FileTime = now.Add( TimeSpan.FromSeconds( 3 ) ).ToDateTime().ToWin32FileTimeUtc() +#endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY }; using ( var buffer = new MemoryStream() ) @@ -117,7 +121,9 @@ private static void TestSerializationCore( SerializationContext context, DateTim Assert.That( result.Timestamp, Is.EqualTo( new Timestamp( now.UnixEpochSecondsPart, now.NanosecondsPart / 100 * 100 ) ) ); Assert.That( result.DateTime, Is.EqualTo( now.ToDateTime().AddSeconds( 1 ) ) ); Assert.That( result.DateTimeOffset, Is.EqualTo( now.ToDateTimeOffset().AddSeconds( 2 ) ) ); +#if ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY Assert.That( result.FileTime, Is.EqualTo( now.Add( TimeSpan.FromSeconds( 3 ).Subtract( TimeSpan.FromTicks( now.NanosecondsPart % 100 ) ) ).ToDateTime().ToWin32FileTimeUtc() ) ); +#endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY break; } case DateTimeConversionMethod.UnixEpoc: @@ -125,7 +131,9 @@ private static void TestSerializationCore( SerializationContext context, DateTim Assert.That( result.Timestamp, Is.EqualTo( new Timestamp( now.UnixEpochSecondsPart, now.NanosecondsPart / 1000000 * 1000000 ) ) ); Assert.That( result.DateTime, Is.EqualTo( now.ToDateTime().AddSeconds( 1 ).Subtract( TimeSpan.FromTicks( now.NanosecondsPart / 100 % 10000 ) ) ) ); Assert.That( result.DateTimeOffset, Is.EqualTo( now.ToDateTimeOffset().AddSeconds( 2 ).Subtract( TimeSpan.FromTicks( now.NanosecondsPart / 100 % 10000 ) ) ) ); +#if ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY Assert.That( result.FileTime, Is.EqualTo( now.Add( TimeSpan.FromSeconds( 3 ).Subtract( TimeSpan.FromTicks( now.NanosecondsPart / 100 % 10000 ) ) ).ToDateTime().ToWin32FileTimeUtc() ) ); +#endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY break; } case DateTimeConversionMethod.Timestamp: @@ -133,7 +141,9 @@ private static void TestSerializationCore( SerializationContext context, DateTim Assert.That( result.Timestamp, Is.EqualTo( now ) ); Assert.That( result.DateTime, Is.EqualTo( now.ToDateTime().AddSeconds( 1 ) ) ); Assert.That( result.DateTimeOffset, Is.EqualTo( now.ToDateTimeOffset().AddSeconds( 2 ) ) ); +#if ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY Assert.That( result.FileTime, Is.EqualTo( now.Add( TimeSpan.FromSeconds( 3 ) ).ToDateTime().ToWin32FileTimeUtc() ) ); +#endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY break; } } @@ -230,7 +240,9 @@ private static void TestDeserializationCore( DateTimeConversionMethod kind ) Assert.That( result.Timestamp, Is.EqualTo( new Timestamp( now.UnixEpochSecondsPart, now.NanosecondsPart / 100 * 100 ) ) ); Assert.That( result.DateTime, Is.EqualTo( now.ToDateTime().AddSeconds( 1 ) ) ); Assert.That( result.DateTimeOffset, Is.EqualTo( now.ToDateTimeOffset().AddSeconds( 2 )) ); +#if ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY Assert.That( result.FileTime, Is.EqualTo( now.Add( TimeSpan.FromSeconds( 3 ).Subtract( TimeSpan.FromTicks( now.NanosecondsPart % 100 ) ) ).ToDateTime().ToWin32FileTimeUtc() ) ); +#endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY break; } case DateTimeConversionMethod.UnixEpoc: @@ -238,7 +250,9 @@ private static void TestDeserializationCore( DateTimeConversionMethod kind ) Assert.That( result.Timestamp, Is.EqualTo( new Timestamp( now.UnixEpochSecondsPart, now.NanosecondsPart / 1000000 * 1000000 ) ) ); Assert.That( result.DateTime, Is.EqualTo( now.ToDateTime().AddSeconds( 1 ).Subtract( TimeSpan.FromTicks( now.NanosecondsPart / 100 % 10000 ) ) ) ); Assert.That( result.DateTimeOffset, Is.EqualTo( now.ToDateTimeOffset().AddSeconds( 2 ).Subtract( TimeSpan.FromTicks( now.NanosecondsPart / 100 % 10000 ) ) ) ); +#if ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY Assert.That( result.FileTime, Is.EqualTo( now.Add( TimeSpan.FromSeconds( 3 ).Subtract( TimeSpan.FromTicks( now.NanosecondsPart / 100 % 10000 ) ) ).ToDateTime().ToWin32FileTimeUtc() ) ); +#endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY break; } case DateTimeConversionMethod.Timestamp: @@ -246,7 +260,9 @@ private static void TestDeserializationCore( DateTimeConversionMethod kind ) Assert.That( result.Timestamp, Is.EqualTo( now ) ); Assert.That( result.DateTime, Is.EqualTo( now.ToDateTime().AddSeconds( 1 ) ) ); Assert.That( result.DateTimeOffset, Is.EqualTo( now.ToDateTimeOffset().AddSeconds( 2 ) ) ); +#if ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY Assert.That( result.FileTime, Is.EqualTo( now.Add( TimeSpan.FromSeconds( 3 ) ).ToDateTime().ToWin32FileTimeUtc() ) ); +#endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY break; } } @@ -274,7 +290,11 @@ public void TestDeserialization_FromUnixEpoc() public class ClassHasTimestamp { +#if ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY internal const int MemberCount = 4; +#else // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY + internal const int MemberCount = 3; +#endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY [MessagePackMember( 0 )] public Timestamp Timestamp { get; set; } @@ -282,7 +302,9 @@ public class ClassHasTimestamp public DateTime DateTime { get; set; } [MessagePackMember( 2 )] public DateTimeOffset DateTimeOffset { get; set; } +#if ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY [MessagePackMember( 3 )] public FILETIME FileTime { get; set; } +#endif // ( !SILVERLIGHT || WINDOWS_PHONE ) && !XAMARIN && !UNITY && !UNITY } } diff --git a/test/MsgPack.UnitTest/TimestampTest.Calculation.cs b/test/MsgPack.UnitTest/TimestampTest.Calculation.cs index f7dcbffa4..3ba88fb5a 100644 --- a/test/MsgPack.UnitTest/TimestampTest.Calculation.cs +++ b/test/MsgPack.UnitTest/TimestampTest.Calculation.cs @@ -21,9 +21,14 @@ using System; using System.Globalization; -#if !NET35 +#if !NET35 && !UNITY +#if !WINDOWS_PHONE +#if !UNITY || MSGPACK_UNITY_FULL using System.Numerics; -#endif // !NET35 +#endif // !NET35 && !UNITY +#endif // !WINDOWS_PHONE +#endif // !UNITY || MSGPACK_UNITY_FULL + #if !MSTEST using NUnit.Framework; #else @@ -446,7 +451,9 @@ public void TestSubtractionOperator_TimeSpan_MinMinus1Tick_Overflow() Assert.Throws( () => { var x = @base - operand; } ); } -#if !NET35 +#if !NET35 && !UNITY +#if !WINDOWS_PHONE +#if !UNITY || MSGPACK_UNITY_FULL [Test] public void TestAdd_BigInteger_Same() @@ -983,6 +990,8 @@ public void TestSubtractionOperator_Timstamp_MinMax() } -#endif // !NET35 +#endif // !NET35 && !UNITY +#endif // !WINDOWS_PHONE +#endif // !UNITY || MSGPACK_UNITY_FULL } } diff --git a/test/MsgPack.UnitTest/TimestampTest.Calculation.tt b/test/MsgPack.UnitTest/TimestampTest.Calculation.tt index 46a604cb8..9e2163b0c 100644 --- a/test/MsgPack.UnitTest/TimestampTest.Calculation.tt +++ b/test/MsgPack.UnitTest/TimestampTest.Calculation.tt @@ -29,9 +29,14 @@ using System; using System.Globalization; -#if !NET35 +#if !NET35 && !UNITY +#if !WINDOWS_PHONE +#if !UNITY || MSGPACK_UNITY_FULL using System.Numerics; -#endif // !NET35 +#endif // !NET35 && !UNITY +#endif // !WINDOWS_PHONE +#endif // !UNITY || MSGPACK_UNITY_FULL + #if !MSTEST using NUnit.Framework; #else @@ -73,7 +78,9 @@ WriteSubtractTestsOverflow( "TimeSpan", "MinMinus1Sec", Int64.MinValue, 9999999 WriteSubtractTestsOverflow( "TimeSpan", "MaxPlus1Tick", Int64.MaxValue, 999999900, "TimeSpan.FromTicks( -1 )" ); WriteSubtractTestsOverflow( "TimeSpan", "MinMinus1Tick", Int64.MinValue, 000000099, "TimeSpan.FromTicks( 1 )" ); #> -#if !NET35 +#if !NET35 && !UNITY +#if !WINDOWS_PHONE +#if !UNITY || MSGPACK_UNITY_FULL <# // Timestamp + BigInteger -> Timestamp @@ -112,7 +119,9 @@ WriteDifferentiateTests( "MaxMin", Int64.MaxValue, 999999999, Int64.MinValue, WriteDifferentiateTests( "MinMax", Int64.MinValue, 0, Int64.MaxValue, 999999999, "new BigInteger( Int64.MinValue ) * 1000000000 - new BigInteger( Int64.MaxValue ) * 1000000000 - 999999999" ); #> -#endif // !NET35 +#endif // !NET35 && !UNITY +#endif // !WINDOWS_PHONE +#endif // !UNITY || MSGPACK_UNITY_FULL } } <#+ diff --git a/test/MsgPack.UnitTest/TimestampTest.Conversion.cs b/test/MsgPack.UnitTest/TimestampTest.Conversion.cs index 37eb4c0a9..e57acad2f 100644 --- a/test/MsgPack.UnitTest/TimestampTest.Conversion.cs +++ b/test/MsgPack.UnitTest/TimestampTest.Conversion.cs @@ -219,56 +219,56 @@ public void TestImplicitDateTime_Now_AsUtc() [Test] public void TestToDateTime_OverflowSeconds() { - var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1L, checked( ( int )( DateTimeOffset.MaxValue.Ticks % 10000000 * 100 ) ) ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MaxValue ) + 1L, checked( ( int )( DateTimeOffset.MaxValue.Ticks % 10000000 * 100 ) ) ); Assert.Throws( () => source.ToDateTime() ); } [Test] public void TestToDateTime_OverflowNanoseconds() { - var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1, 0 ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MaxValue ) + 1, 0 ); Assert.Throws( () => source.ToDateTime() ); } [Test] public void TestExplicitDateTime_OverflowSeconds() { - var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1L, checked( ( int )( DateTimeOffset.MaxValue.Ticks % 10000000 * 100 ) ) ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MaxValue ) + 1L, checked( ( int )( DateTimeOffset.MaxValue.Ticks % 10000000 * 100 ) ) ); Assert.Throws( () => { var x = ( DateTime )source; } ); } [Test] public void TestExplicitDateTime_OverflowNanoseconds() { - var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1, 0 ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MaxValue ) + 1, 0 ); Assert.Throws( () => { var x = ( DateTime )source; } ); } [Test] public void TestToDateTime_UnderflowSeconds() { - var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() - 1L, checked( ( int )( DateTimeOffset.MinValue.Ticks % 10000000 * 100 ) ) ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MinValue ) - 1L, checked( ( int )( DateTimeOffset.MinValue.Ticks % 10000000 * 100 ) ) ); Assert.Throws( () => source.ToDateTime() ); } [Test] public void TestToDateTime_UnderflowNanoseconds() { - var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() -1L, 999999999 ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MinValue ) -1L, 999999999 ); Assert.Throws( () => source.ToDateTime() ); } [Test] public void TestExplicitDateTime_UnderflowSeconds() { - var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() - 1L, checked( ( int )( DateTimeOffset.MinValue.Ticks % 10000000 * 100 ) ) ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MinValue ) - 1L, checked( ( int )( DateTimeOffset.MinValue.Ticks % 10000000 * 100 ) ) ); Assert.Throws( () => { var x = ( DateTime )source; } ); } [Test] public void TestExplicitDateTime_UnderflowNanoseconds() { - var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() - 1, 999999999 ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MinValue ) - 1, 999999999 ); Assert.Throws( () => { var x = ( DateTime )source; } ); } @@ -470,56 +470,56 @@ public void TestImplicitDateTimeOffset_Now_AsUtc() [Test] public void TestToDateTimeOffset_OverflowSeconds() { - var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1L, checked( ( int )( DateTimeOffset.MaxValue.Ticks % 10000000 * 100 ) ) ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MaxValue ) + 1L, checked( ( int )( DateTimeOffset.MaxValue.Ticks % 10000000 * 100 ) ) ); Assert.Throws( () => source.ToDateTimeOffset() ); } [Test] public void TestToDateTimeOffset_OverflowNanoseconds() { - var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1, 0 ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MaxValue ) + 1, 0 ); Assert.Throws( () => source.ToDateTimeOffset() ); } [Test] public void TestExplicitDateTimeOffset_OverflowSeconds() { - var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1L, checked( ( int )( DateTimeOffset.MaxValue.Ticks % 10000000 * 100 ) ) ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MaxValue ) + 1L, checked( ( int )( DateTimeOffset.MaxValue.Ticks % 10000000 * 100 ) ) ); Assert.Throws( () => { var x = ( DateTimeOffset )source; } ); } [Test] public void TestExplicitDateTimeOffset_OverflowNanoseconds() { - var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1, 0 ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MaxValue ) + 1, 0 ); Assert.Throws( () => { var x = ( DateTimeOffset )source; } ); } [Test] public void TestToDateTimeOffset_UnderflowSeconds() { - var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() - 1L, checked( ( int )( DateTimeOffset.MinValue.Ticks % 10000000 * 100 ) ) ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MinValue ) - 1L, checked( ( int )( DateTimeOffset.MinValue.Ticks % 10000000 * 100 ) ) ); Assert.Throws( () => source.ToDateTimeOffset() ); } [Test] public void TestToDateTimeOffset_UnderflowNanoseconds() { - var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() -1L, 999999999 ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MinValue ) -1L, 999999999 ); Assert.Throws( () => source.ToDateTimeOffset() ); } [Test] public void TestExplicitDateTimeOffset_UnderflowSeconds() { - var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() - 1L, checked( ( int )( DateTimeOffset.MinValue.Ticks % 10000000 * 100 ) ) ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MinValue ) - 1L, checked( ( int )( DateTimeOffset.MinValue.Ticks % 10000000 * 100 ) ) ); Assert.Throws( () => { var x = ( DateTimeOffset )source; } ); } [Test] public void TestExplicitDateTimeOffset_UnderflowNanoseconds() { - var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() - 1, 999999999 ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MinValue ) - 1, 999999999 ); Assert.Throws( () => { var x = ( DateTimeOffset )source; } ); } diff --git a/test/MsgPack.UnitTest/TimestampTest.Conversion.tt b/test/MsgPack.UnitTest/TimestampTest.Conversion.tt index 6890394a5..d0030d8a3 100644 --- a/test/MsgPack.UnitTest/TimestampTest.Conversion.tt +++ b/test/MsgPack.UnitTest/TimestampTest.Conversion.tt @@ -60,56 +60,56 @@ foreach ( var type in new [] { "DateTime", "DateTimeOffset" } ) [Test] public void TestTo<#= type #>_OverflowSeconds() { - var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1L, checked( ( int )( DateTimeOffset.MaxValue.Ticks % 10000000 * 100 ) ) ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MaxValue ) + 1L, checked( ( int )( DateTimeOffset.MaxValue.Ticks % 10000000 * 100 ) ) ); Assert.Throws( () => source.To<#= type #>() ); } [Test] public void TestTo<#= type #>_OverflowNanoseconds() { - var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1, 0 ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MaxValue ) + 1, 0 ); Assert.Throws( () => source.To<#= type #>() ); } [Test] public void TestExplicit<#= type #>_OverflowSeconds() { - var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1L, checked( ( int )( DateTimeOffset.MaxValue.Ticks % 10000000 * 100 ) ) ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MaxValue ) + 1L, checked( ( int )( DateTimeOffset.MaxValue.Ticks % 10000000 * 100 ) ) ); Assert.Throws( () => { var x = ( <#= type #> )source; } ); } [Test] public void TestExplicit<#= type #>_OverflowNanoseconds() { - var source = new Timestamp( DateTimeOffset.MaxValue.ToUnixTimeSeconds() + 1, 0 ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MaxValue ) + 1, 0 ); Assert.Throws( () => { var x = ( <#= type #> )source; } ); } [Test] public void TestTo<#= type #>_UnderflowSeconds() { - var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() - 1L, checked( ( int )( DateTimeOffset.MinValue.Ticks % 10000000 * 100 ) ) ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MinValue ) - 1L, checked( ( int )( DateTimeOffset.MinValue.Ticks % 10000000 * 100 ) ) ); Assert.Throws( () => source.To<#= type #>() ); } [Test] public void TestTo<#= type #>_UnderflowNanoseconds() { - var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() -1L, 999999999 ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MinValue ) -1L, 999999999 ); Assert.Throws( () => source.To<#= type #>() ); } [Test] public void TestExplicit<#= type #>_UnderflowSeconds() { - var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() - 1L, checked( ( int )( DateTimeOffset.MinValue.Ticks % 10000000 * 100 ) ) ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MinValue ) - 1L, checked( ( int )( DateTimeOffset.MinValue.Ticks % 10000000 * 100 ) ) ); Assert.Throws( () => { var x = ( <#= type #> )source; } ); } [Test] public void TestExplicit<#= type #>_UnderflowNanoseconds() { - var source = new Timestamp( DateTimeOffset.MinValue.ToUnixTimeSeconds() - 1, 999999999 ); + var source = new Timestamp( MessagePackConvert.FromDateTimeOffset( DateTimeOffset.MinValue ) - 1, 999999999 ); Assert.Throws( () => { var x = ( <#= type #> )source; } ); } diff --git a/test/MsgPack.UnitTest/TimestampTest.EncodeDecode.cs b/test/MsgPack.UnitTest/TimestampTest.EncodeDecode.cs index cc4f231db..7217dd4d0 100644 --- a/test/MsgPack.UnitTest/TimestampTest.EncodeDecode.cs +++ b/test/MsgPack.UnitTest/TimestampTest.EncodeDecode.cs @@ -22,9 +22,6 @@ using System; using System.Globalization; using System.Linq; -#if !NET35 -using System.Numerics; -#endif // !NET35 using MsgPack.Serialization; diff --git a/test/MsgPack.UnitTest/TimestampTest.EncodeDecode.tt b/test/MsgPack.UnitTest/TimestampTest.EncodeDecode.tt index ce56ab60d..b562167f6 100644 --- a/test/MsgPack.UnitTest/TimestampTest.EncodeDecode.tt +++ b/test/MsgPack.UnitTest/TimestampTest.EncodeDecode.tt @@ -30,9 +30,6 @@ using System; using System.Globalization; using System.Linq; -#if !NET35 -using System.Numerics; -#endif // !NET35 using MsgPack.Serialization; diff --git a/test/MsgPack.UnitTest/TimestampTest.Parse.cs b/test/MsgPack.UnitTest/TimestampTest.Parse.cs index 0f5be71fe..d0b88127c 100644 --- a/test/MsgPack.UnitTest/TimestampTest.Parse.cs +++ b/test/MsgPack.UnitTest/TimestampTest.Parse.cs @@ -22,9 +22,9 @@ using System; using System.Globalization; using System.Linq; -#if NET35 +#if ( NET35 || SILVERLIGHT ) && !WINDOWS_UWP using System.Threading; -#endif // NET35 +#endif // ( NET35 || SILVERLIGHT ) && !WINDOWS_UWP #if !MSTEST using NUnit.Framework; #else @@ -2045,17 +2045,19 @@ out result Assert.That( result, Is.EqualTo( new Timestamp( -23215049511, 123456789 ) ) ); } +#if !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestParseExact_Distinguishable_o_null_CurrentCultureIsUsed() { var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Assert.That( Timestamp.ParseExact( @@ -2069,11 +2071,11 @@ public void TestParseExact_Distinguishable_o_null_CurrentCultureIsUsed() } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } @@ -2084,11 +2086,11 @@ public void TestTryParseExact_Distinguishable_o_null_CurrentCultureIsUsed() var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Timestamp result; Assert.That( @@ -2105,15 +2107,17 @@ out result } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } +#endif // !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestParseExact_Distinguishable_s_CustomCulture_UsedForNegativeSign() { @@ -2145,17 +2149,19 @@ out result Assert.That( result, Is.EqualTo( new Timestamp( -23215049511, 0 ) ) ); } +#if !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestParseExact_Distinguishable_s_null_CurrentCultureIsUsed() { var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Assert.That( Timestamp.ParseExact( @@ -2169,11 +2175,11 @@ public void TestParseExact_Distinguishable_s_null_CurrentCultureIsUsed() } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } @@ -2184,11 +2190,11 @@ public void TestTryParseExact_Distinguishable_s_null_CurrentCultureIsUsed() var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Timestamp result; Assert.That( @@ -2205,15 +2211,17 @@ out result } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } +#endif // !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestParseExact_YearMinus1_o_CustomCulture_UsedForNegativeSign() { @@ -2245,17 +2253,19 @@ out result Assert.That( result, Is.EqualTo( new Timestamp( -62193657600, 0 ) ) ); } +#if !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestParseExact_YearMinus1_o_null_CurrentCultureIsUsed() { var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Assert.That( Timestamp.ParseExact( @@ -2269,11 +2279,11 @@ public void TestParseExact_YearMinus1_o_null_CurrentCultureIsUsed() } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } @@ -2284,11 +2294,11 @@ public void TestTryParseExact_YearMinus1_o_null_CurrentCultureIsUsed() var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Timestamp result; Assert.That( @@ -2305,15 +2315,17 @@ out result } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } +#endif // !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestParseExact_YearMinus1_s_CustomCulture_UsedForNegativeSign() { @@ -2345,17 +2357,19 @@ out result Assert.That( result, Is.EqualTo( new Timestamp( -62193657600, 0 ) ) ); } +#if !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestParseExact_YearMinus1_s_null_CurrentCultureIsUsed() { var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Assert.That( Timestamp.ParseExact( @@ -2369,11 +2383,11 @@ public void TestParseExact_YearMinus1_s_null_CurrentCultureIsUsed() } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } @@ -2384,11 +2398,11 @@ public void TestTryParseExact_YearMinus1_s_null_CurrentCultureIsUsed() var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Timestamp result; Assert.That( @@ -2405,15 +2419,17 @@ out result } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } +#endif // !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestParseExact_ParseError_EmptyValue_o() { diff --git a/test/MsgPack.UnitTest/TimestampTest.Parse.tt b/test/MsgPack.UnitTest/TimestampTest.Parse.tt index b3060319a..a2198e275 100644 --- a/test/MsgPack.UnitTest/TimestampTest.Parse.tt +++ b/test/MsgPack.UnitTest/TimestampTest.Parse.tt @@ -30,9 +30,9 @@ using System; using System.Globalization; using System.Linq; -#if NET35 +#if ( NET35 || SILVERLIGHT ) && !WINDOWS_UWP using System.Threading; -#endif // NET35 +#endif // ( NET35 || SILVERLIGHT ) && !WINDOWS_UWP #if !MSTEST using NUnit.Framework; #else @@ -302,17 +302,19 @@ foreach ( var @case in Assert.That( result, Is.EqualTo( new Timestamp( <#= @case.Seconds #>, <#= variation.HasSubseconds ? @case.Nanoseconds : 0 #> ) ) ); } +#if !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestParseExact_<#= @case.Label #>_<#= variation.Format #>_null_CurrentCultureIsUsed() { var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Assert.That( Timestamp.ParseExact( @@ -326,11 +328,11 @@ foreach ( var @case in } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } @@ -341,11 +343,11 @@ foreach ( var @case in var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Timestamp result; Assert.That( @@ -362,15 +364,17 @@ foreach ( var @case in } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } +#endif // !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + <# } } // Current/Custom diff --git a/test/MsgPack.UnitTest/TimestampTest.Properties.cs b/test/MsgPack.UnitTest/TimestampTest.Properties.cs index 572b054b8..9dfc2dd94 100644 --- a/test/MsgPack.UnitTest/TimestampTest.Properties.cs +++ b/test/MsgPack.UnitTest/TimestampTest.Properties.cs @@ -810,8 +810,8 @@ public void TestUtcNow() var target = Timestamp.UtcNow; var after = DateTimeOffset.UtcNow; // Assert before <= now <= after - Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( before.ToUnixTimeSeconds() ).Or.GreaterThan( before.ToUnixTimeSeconds() ) ); - Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( after.ToUnixTimeSeconds() ).Or.LessThan( after.ToUnixTimeSeconds() ) ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( MessagePackConvert.FromDateTimeOffset( before ) / 1000 ).Or.GreaterThan( MessagePackConvert.FromDateTimeOffset( before ) ) ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( MessagePackConvert.FromDateTimeOffset( after ) / 1000 ).Or.LessThan( MessagePackConvert.FromDateTimeOffset( after ) ) ); } [Test] @@ -821,8 +821,8 @@ public void TestToday() var target = Timestamp.Today; var after = new DateTimeOffset( DateTimeOffset.UtcNow.Date, TimeSpan.Zero ); // Assert before <= today <= after - Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( before.ToUnixTimeSeconds() ).Or.GreaterThan( before.ToUnixTimeSeconds() ) ); - Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( after.ToUnixTimeSeconds() ).Or.LessThan( after.ToUnixTimeSeconds() ) ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( MessagePackConvert.FromDateTimeOffset( before ) / 1000 ).Or.GreaterThan( MessagePackConvert.FromDateTimeOffset( before ) ) ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( MessagePackConvert.FromDateTimeOffset( after ) / 1000 ).Or.LessThan( MessagePackConvert.FromDateTimeOffset( after ) ) ); } [Test] diff --git a/test/MsgPack.UnitTest/TimestampTest.Properties.tt b/test/MsgPack.UnitTest/TimestampTest.Properties.tt index c8c65ec22..53fdb16a2 100644 --- a/test/MsgPack.UnitTest/TimestampTest.Properties.tt +++ b/test/MsgPack.UnitTest/TimestampTest.Properties.tt @@ -81,8 +81,8 @@ foreach ( var @case in StandardTestCases.Values ) var target = Timestamp.UtcNow; var after = DateTimeOffset.UtcNow; // Assert before <= now <= after - Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( before.ToUnixTimeSeconds() ).Or.GreaterThan( before.ToUnixTimeSeconds() ) ); - Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( after.ToUnixTimeSeconds() ).Or.LessThan( after.ToUnixTimeSeconds() ) ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( MessagePackConvert.FromDateTimeOffset( before ) / 1000 ).Or.GreaterThan( MessagePackConvert.FromDateTimeOffset( before ) ) ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( MessagePackConvert.FromDateTimeOffset( after ) / 1000 ).Or.LessThan( MessagePackConvert.FromDateTimeOffset( after ) ) ); } [Test] @@ -92,8 +92,8 @@ foreach ( var @case in StandardTestCases.Values ) var target = Timestamp.Today; var after = new DateTimeOffset( DateTimeOffset.UtcNow.Date, TimeSpan.Zero ); // Assert before <= today <= after - Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( before.ToUnixTimeSeconds() ).Or.GreaterThan( before.ToUnixTimeSeconds() ) ); - Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( after.ToUnixTimeSeconds() ).Or.LessThan( after.ToUnixTimeSeconds() ) ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( MessagePackConvert.FromDateTimeOffset( before ) / 1000 ).Or.GreaterThan( MessagePackConvert.FromDateTimeOffset( before ) ) ); + Assert.That( target.UnixEpochSecondsPart, Is.EqualTo( MessagePackConvert.FromDateTimeOffset( after ) / 1000 ).Or.LessThan( MessagePackConvert.FromDateTimeOffset( after ) ) ); } [Test] diff --git a/test/MsgPack.UnitTest/TimestampTest.ToString.cs b/test/MsgPack.UnitTest/TimestampTest.ToString.cs index e71819114..92bd1f18d 100644 --- a/test/MsgPack.UnitTest/TimestampTest.ToString.cs +++ b/test/MsgPack.UnitTest/TimestampTest.ToString.cs @@ -21,9 +21,9 @@ using System; using System.Globalization; -#if NET35 +#if ( NET35 || SILVERLIGHT ) && !WINDOWS_UWP using System.Threading; -#endif // NET35 +#endif // ( NET35 || SILVERLIGHT ) && !WINDOWS_UWP #if !MSTEST using NUnit.Framework; #else @@ -674,17 +674,19 @@ public void TestToString_String_IFormatProvider_Distinguishable_o_CustomCulture_ ); } +#if !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestToString_String_IFormatProvider_Distinguishable_o_null_CurrentCultureIsUsed() { var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Assert.That( new Timestamp( @@ -696,15 +698,17 @@ public void TestToString_String_IFormatProvider_Distinguishable_o_null_CurrentCu } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } +#endif // !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestToString_String_IFormatProvider_Distinguishable_s_CustomCulture_UsedForNegativeSign() { @@ -717,17 +721,19 @@ public void TestToString_String_IFormatProvider_Distinguishable_s_CustomCulture_ ); } +#if !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestToString_String_IFormatProvider_Distinguishable_s_null_CurrentCultureIsUsed() { var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Assert.That( new Timestamp( @@ -739,15 +745,17 @@ public void TestToString_String_IFormatProvider_Distinguishable_s_null_CurrentCu } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } +#endif // !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestToString_String_IFormatProvider_YearMinus1_o_CustomCulture_UsedForNegativeSign() { @@ -760,17 +768,19 @@ public void TestToString_String_IFormatProvider_YearMinus1_o_CustomCulture_UsedF ); } +#if !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestToString_String_IFormatProvider_YearMinus1_o_null_CurrentCultureIsUsed() { var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Assert.That( new Timestamp( @@ -782,15 +792,17 @@ public void TestToString_String_IFormatProvider_YearMinus1_o_null_CurrentCulture } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } +#endif // !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestToString_String_IFormatProvider_YearMinus1_s_CustomCulture_UsedForNegativeSign() { @@ -803,17 +815,19 @@ public void TestToString_String_IFormatProvider_YearMinus1_s_CustomCulture_UsedF ); } +#if !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestToString_String_IFormatProvider_YearMinus1_s_null_CurrentCultureIsUsed() { var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Assert.That( new Timestamp( @@ -825,15 +839,17 @@ public void TestToString_String_IFormatProvider_YearMinus1_s_null_CurrentCulture } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } +#endif // !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestToString_String_IFormatProvider_DefaultIsOk() { @@ -859,17 +875,19 @@ public void TestToString_String_IFormatProvider_UnsupportedFormat() ); } +#if !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestToString_AsOFormatAndNullIFormatProvider() { var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Assert.That( new Timestamp( @@ -881,15 +899,17 @@ public void TestToString_AsOFormatAndNullIFormatProvider() } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } +#endif // !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestToString_IFormatProvider_AsOFormat() { @@ -902,17 +922,19 @@ public void TestToString_IFormatProvider_AsOFormat() ); } +#if !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestToString_String_AsNullIFormatProvider() { var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Assert.That( new Timestamp( @@ -924,13 +946,16 @@ public void TestToString_String_AsNullIFormatProvider() } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } + +#endif // !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + } } diff --git a/test/MsgPack.UnitTest/TimestampTest.ToString.tt b/test/MsgPack.UnitTest/TimestampTest.ToString.tt index ef649e312..818d99501 100644 --- a/test/MsgPack.UnitTest/TimestampTest.ToString.tt +++ b/test/MsgPack.UnitTest/TimestampTest.ToString.tt @@ -29,9 +29,9 @@ using System; using System.Globalization; -#if NET35 +#if ( NET35 || SILVERLIGHT ) && !WINDOWS_UWP using System.Threading; -#endif // NET35 +#endif // ( NET35 || SILVERLIGHT ) && !WINDOWS_UWP #if !MSTEST using NUnit.Framework; #else @@ -165,17 +165,19 @@ foreach ( var @case in ); } +#if !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestToString_String_IFormatProvider_<#= @case.Label #>_<#= variation.Format #>_null_CurrentCultureIsUsed() { var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Assert.That( new Timestamp( @@ -187,15 +189,17 @@ foreach ( var @case in } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } +#endif // !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + <# } } // // Current/Custom @@ -227,17 +231,19 @@ foreach ( var @case in ); } +#if !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestToString_AsOFormatAndNullIFormatProvider() { var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Assert.That( new Timestamp( @@ -249,15 +255,17 @@ foreach ( var @case in } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } +#endif // !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestToString_IFormatProvider_AsOFormat() { @@ -270,17 +278,19 @@ foreach ( var @case in ); } +#if !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + [Test] public void TestToString_String_AsNullIFormatProvider() { var originalCurrentCulture = CultureInfo.CurrentCulture; try { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP new LegacyJapaneseCultureInfo(); Assert.That( new Timestamp( @@ -292,13 +302,16 @@ foreach ( var @case in } finally { -#if !NET35 +#if ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP CultureInfo.CurrentCulture = -#else // !NET35 +#else // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP Thread.CurrentThread.CurrentCulture = -#endif // !NET35 +#endif // ( !NET35 && !SILVERLIGHT ) || WINDOWS_UWP originalCurrentCulture; } } + +#endif // !WINDOWS_PHONE && !WINDOWS_PHONE_APP && !NETFX_CORE + } } From b6cfa70f2664de24bcb22ab9cd9fe22ec3921c40 Mon Sep 17 00:00:00 2001 From: yfakariya Date: Sat, 23 Sep 2017 20:49:11 +0900 Subject: [PATCH 10/23] Update NUnit --- samples/Samples/Samples.csproj | 4 ++-- samples/Samples/packages.config | 2 +- .../MsgPack.UnitTest.BclExtensions.csproj | 2 +- .../MsgPack.UnitTest.CodeDom.Net35.csproj | 2 +- test/MsgPack.UnitTest.CodeDom/MsgPack.UnitTest.CodeDom.csproj | 2 +- test/MsgPack.UnitTest.Net35/MsgPack.UnitTest.Net35.csproj | 2 +- test/MsgPack.UnitTest/MsgPack.UnitTest.csproj | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/samples/Samples/Samples.csproj b/samples/Samples/Samples.csproj index d8277b439..6e669d52e 100644 --- a/samples/Samples/Samples.csproj +++ b/samples/Samples/Samples.csproj @@ -33,8 +33,8 @@ 4 - - ..\..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll + + ..\..\packages\NUnit.3.8.1\lib\net45\nunit.framework.dll diff --git a/samples/Samples/packages.config b/samples/Samples/packages.config index 4b26cc066..0ee860b3f 100644 --- a/samples/Samples/packages.config +++ b/samples/Samples/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/test/MsgPack.UnitTest.BclExtensions/MsgPack.UnitTest.BclExtensions.csproj b/test/MsgPack.UnitTest.BclExtensions/MsgPack.UnitTest.BclExtensions.csproj index ab7063f84..65af1b477 100644 --- a/test/MsgPack.UnitTest.BclExtensions/MsgPack.UnitTest.BclExtensions.csproj +++ b/test/MsgPack.UnitTest.BclExtensions/MsgPack.UnitTest.BclExtensions.csproj @@ -19,7 +19,7 @@ $(DefineConstants);NETSTANDARD2_0 - + diff --git a/test/MsgPack.UnitTest.CodeDom.Net35/MsgPack.UnitTest.CodeDom.Net35.csproj b/test/MsgPack.UnitTest.CodeDom.Net35/MsgPack.UnitTest.CodeDom.Net35.csproj index 2cd1e4fd1..daefcc905 100644 --- a/test/MsgPack.UnitTest.CodeDom.Net35/MsgPack.UnitTest.CodeDom.Net35.csproj +++ b/test/MsgPack.UnitTest.CodeDom.Net35/MsgPack.UnitTest.CodeDom.Net35.csproj @@ -11,7 +11,7 @@ - + diff --git a/test/MsgPack.UnitTest.CodeDom/MsgPack.UnitTest.CodeDom.csproj b/test/MsgPack.UnitTest.CodeDom/MsgPack.UnitTest.CodeDom.csproj index a766526b6..73d951e20 100644 --- a/test/MsgPack.UnitTest.CodeDom/MsgPack.UnitTest.CodeDom.csproj +++ b/test/MsgPack.UnitTest.CodeDom/MsgPack.UnitTest.CodeDom.csproj @@ -15,7 +15,7 @@ $(DefineConstants);NETSTANDARD2_0 - + diff --git a/test/MsgPack.UnitTest.Net35/MsgPack.UnitTest.Net35.csproj b/test/MsgPack.UnitTest.Net35/MsgPack.UnitTest.Net35.csproj index aeb32dd55..4dd22dba6 100644 --- a/test/MsgPack.UnitTest.Net35/MsgPack.UnitTest.Net35.csproj +++ b/test/MsgPack.UnitTest.Net35/MsgPack.UnitTest.Net35.csproj @@ -11,7 +11,7 @@ - + diff --git a/test/MsgPack.UnitTest/MsgPack.UnitTest.csproj b/test/MsgPack.UnitTest/MsgPack.UnitTest.csproj index 03fbdab7b..aabd7e325 100644 --- a/test/MsgPack.UnitTest/MsgPack.UnitTest.csproj +++ b/test/MsgPack.UnitTest/MsgPack.UnitTest.csproj @@ -19,7 +19,7 @@ $(DefineConstants);NETSTANDARD2_0 - + From 3a0a1159bfbd952ad4c0c4ca674cb238569babbb Mon Sep 17 00:00:00 2001 From: yfakariya Date: Sat, 23 Sep 2017 20:49:34 +0900 Subject: [PATCH 11/23] Fix unit tests for default DateTime serialization behavior change. --- CHANGES.txt | 3 + ...deDomBasedAutoMessagePackSerializerTest.cs | 990 ++++++++--------- ...deDomBasedAutoMessagePackSerializerTest.cs | 991 +++++++++--------- ...FieldBasedAutoMessagePackSerializerTest.cs | 990 ++++++++--------- ...ationBasedAutoMessagePackSerializerTest.cs | 965 +++++++++-------- ...ctionBasedAutoMessagePackSerializerTest.cs | 978 ++++++++--------- ...ePackSerializerTest.Polymorphism.ttinclude | 30 +- .../AutoMessagePackSerializerTest.Types.cs | 18 +- .../AutoMessagePackSerializerTest.Types.tt | 18 +- .../AutoMessagePackSerializerTest.ttinclude | 91 +- .../Serialization/ComplexType.cs | 10 +- .../ComplexTypeWithDataContract.cs | 8 +- .../ComplexTypeWithDataContractWithOrder.cs | 6 +- .../ComplexTypeWithNonSerialized.cs | 8 +- .../ComplexTypeWithoutAnyAttribute.cs | 6 +- ...FieldBasedAutoMessagePackSerializerTest.cs | 991 +++++++++--------- ...ationBasedAutoMessagePackSerializerTest.cs | 966 +++++++++-------- ...ctionBasedAutoMessagePackSerializerTest.cs | 979 ++++++++--------- .../Serialization/SerializationContextTest.cs | 10 +- 19 files changed, 4199 insertions(+), 3859 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 56132e997..3c3fe77dd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -710,6 +710,9 @@ Release 0.9.1 2017-8-30 Release 1.0.0-beta1 T.B.D. + BREAKING CHANGES + * Default DateTime, DateTimeOffset, FILETIME serialization now use msgpack timestamp type instead of native .NET representation. You can disable this behavior via setting SerializationContext.DefaultDateTimeConversionMethod to DateTimeConversionMethod.Native. + NEW FEATURES * .NET Standard 2.0 which supports serializer source code generation on .NET Core. Note that serializer assembly generation is not supported. * MessagePackSerializer.UnpackMessagePackObject(byte[]) utility method. diff --git a/test/MsgPack.UnitTest.CodeDom/Serialization/ArrayCodeDomBasedAutoMessagePackSerializerTest.cs b/test/MsgPack.UnitTest.CodeDom/Serialization/ArrayCodeDomBasedAutoMessagePackSerializerTest.cs index 1b84b4cd4..49e097f0a 100644 --- a/test/MsgPack.UnitTest.CodeDom/Serialization/ArrayCodeDomBasedAutoMessagePackSerializerTest.cs +++ b/test/MsgPack.UnitTest.CodeDom/Serialization/ArrayCodeDomBasedAutoMessagePackSerializerTest.cs @@ -88,9 +88,15 @@ private static SerializationContext GetSerializationContext() return context; } - private static SerializationContext NewSerializationContext( PackerCompatibilityOptions compatibilityOptions ) + private static SerializationContext NewSerializationContext() + { + return NewSerializationContext( PackerCompatibilityOptions.None, DateTimeConversionMethod.Timestamp ); + } + + private static SerializationContext NewSerializationContext( PackerCompatibilityOptions compatibilityOptions, DateTimeConversionMethod dateTimeConversionMethod ) { var context = new SerializationContext( compatibilityOptions ) { SerializationMethod = SerializationMethod.Array }; + context.DefaultDateTimeConversionMethod = dateTimeConversionMethod; context.SerializerOptions.EmitterFlavor = EmitterFlavor.CodeDomBased; #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED context.SerializerOptions.DisablePrivilegedAccess = true; @@ -243,6 +249,34 @@ public void TestString() [Test] public void TestDateTime() + { + TestCore( + DateTime.UtcNow, + stream => MessagePackSerializer.UnpackMessagePackObject( stream ).AsTimestamp().ToDateTime(), + ( x, y ) => x.Equals( y ), + context => + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); + } + ); + } + + [Test] + public void TestDateTimeOffset() + { + TestCore( + DateTimeOffset.UtcNow, + stream => MessagePackSerializer.UnpackMessagePackObject( stream ).AsTimestamp().ToDateTimeOffset(), + ( x, y ) => x.Equals( y ), + context => + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); + } + ); + } + + [Test] + public void TestDateTimeNative() { TestCore( DateTime.Now, @@ -250,13 +284,13 @@ public void TestDateTime() ( x, y ) => x.Equals( y ), context => { - Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + context.DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native; } ); } [Test] - public void TestDateTimeOffset() + public void TestDateTimeOffsetNative() { TestCore( DateTimeOffset.Now, @@ -268,7 +302,7 @@ public void TestDateTimeOffset() ( x, y ) => x.Equals( y ), context => { - Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + context.DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native; } ); } @@ -1203,7 +1237,7 @@ public void TestEmptyBytes() [Test] public void TestEmptyBytes_Classic() { - var context = NewSerializationContext( PackerCompatibilityOptions.Classic ); + var context = NewSerializationContext( PackerCompatibilityOptions.Classic, DateTimeConversionMethod.Native ); var serializer = this.CreateTarget( context ); using ( var stream = new MemoryStream() ) { @@ -4104,7 +4138,7 @@ public void TestFullPackableUnpackable_PackToMessageAndUnpackFromMessageUsed() [Test] public void TestBinary_ClassicContext() { - var context = NewSerializationContext( PackerCompatibilityOptions.Classic ); + var context = NewSerializationContext( PackerCompatibilityOptions.Classic, DateTimeConversionMethod.Native ); var serializer = context.GetSerializer(); using ( var stream = new MemoryStream() ) @@ -4117,7 +4151,7 @@ public void TestBinary_ClassicContext() [Test] public void TestBinary_ContextWithPackerCompatilibyOptionsNone() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext( PackerCompatibilityOptions.None, DateTimeConversionMethod.Timestamp ); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -4129,8 +4163,8 @@ public void TestBinary_ContextWithPackerCompatilibyOptionsNone() [Test] public void TestExt_ClassicContext() { - var context = NewSerializationContext( SerializationContext.CreateClassicContext().CompatibilityOptions.PackerCompatibilityOptions ); - context.Serializers.Register( new CustomDateTimeSerealizer() ); + var context = NewSerializationContext( SerializationContext.CreateClassicContext().CompatibilityOptions.PackerCompatibilityOptions, SerializationContext.CreateClassicContext().DefaultDateTimeConversionMethod ); + context.Serializers.RegisterOverride( new CustomDateTimeSerealizer() ); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -4146,7 +4180,7 @@ public void TestExt_ClassicContext() [Test] public void TestExt_DefaultContext() { - var context = NewSerializationContext( SerializationContext.Default.CompatibilityOptions.PackerCompatibilityOptions ); + var context = NewSerializationContext( SerializationContext.Default.CompatibilityOptions.PackerCompatibilityOptions, SerializationContext.Default.DefaultDateTimeConversionMethod ); context.Serializers.Register( new CustomDateTimeSerealizer() ); var serializer = CreateTarget( context ); @@ -4163,7 +4197,7 @@ public void TestExt_DefaultContext() [Test] public void TestExt_ContextWithPackerCompatilibyOptionsNone() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.Serializers.Register( new CustomDateTimeSerealizer() ); context.CompatibilityOptions.PackerCompatibilityOptions = PackerCompatibilityOptions.None; var serializer = CreateTarget( context ); @@ -4181,7 +4215,7 @@ public void TestExt_ContextWithPackerCompatilibyOptionsNone() [Test] public void TestAbstractTypes_KnownCollections_Default_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -4199,7 +4233,7 @@ public void TestAbstractTypes_KnownCollections_Default_Success() [Test] public void TestAbstractTypes_KnownCollections_WithoutRegistration_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Unregister( typeof( IList<> ) ); Assert.Throws( () => DoKnownCollectionTest( context ) ); } @@ -4207,7 +4241,7 @@ public void TestAbstractTypes_KnownCollections_WithoutRegistration_Fail() [Test] public void TestAbstractTypes_KnownCollections_ExplicitRegistration_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList<> ), typeof( Collection<> ) ); var serializer = CreateTarget( context ); @@ -4226,7 +4260,7 @@ public void TestAbstractTypes_KnownCollections_ExplicitRegistration_Success() [Test] public void TestAbstractTypes_KnownCollections_ExplicitRegistrationForSpecific_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( Collection ) ); var serializer1 = CreateTarget( context ); @@ -4259,7 +4293,7 @@ public void TestAbstractTypes_KnownCollections_ExplicitRegistrationForSpecific_S [Test] public void TestAbstractTypes_NotACollection_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); Assert.Throws( () => DoKnownCollectionTest( context ) ); } @@ -4341,7 +4375,7 @@ private static void TestCollectionInterfaceCore( byte[] data, Action asser { using ( var buffer = new MemoryStream(data) ) { - var serializer = MessagePackSerializer.Get( NewSerializationContext( PackerCompatibilityOptions.None ) ); + var serializer = MessagePackSerializer.Get( NewSerializationContext() ); var result = serializer.Unpack( buffer ); assertion( result ); } @@ -7750,7 +7784,7 @@ public class ExclusionAndInclusionSimulatously [Test] public void TestGenericDerived_Value_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericValueClass { @@ -7777,7 +7811,7 @@ public void TestGenericDerived_Value_Success() [Test] public void TestGenericDerived_Reference_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericReferenceClass { @@ -7804,7 +7838,7 @@ public void TestGenericDerived_Reference_Success() [Test] public void TestGenericRecordDerived_Value_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericRecordValueClass( 1, 2 ); var serializer = context.GetSerializer(); @@ -7823,7 +7857,7 @@ public void TestGenericRecordDerived_Value_Success() [Test] public void TestGenericRecordDerived_Reference_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericRecordReferenceClass( "1", "2" ); var serializer = context.GetSerializer(); @@ -7847,7 +7881,7 @@ public void TestGenericRecordDerived_Reference_Success() [Test] public void TestNullable_Primitive_NonNull_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = DateTime.UtcNow.Millisecond; var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -7863,7 +7897,7 @@ public void TestNullable_Primitive_NonNull_Success() [Test] public void TestNullable_Primitive_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = default( int? ); var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -7879,7 +7913,7 @@ public void TestNullable_Primitive_Null_Success() [Test] public void TestNullable_Complex_NonNull_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = TimeSpan.FromSeconds( DateTime.UtcNow.Millisecond ); var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -7895,7 +7929,7 @@ public void TestNullable_Complex_NonNull_Success() [Test] public void TestNullable_Complex_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = default( TimeSpan? ); var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -7911,7 +7945,7 @@ public void TestNullable_Complex_Null_Success() [Test] public void TestNullable_Enum_NonNull_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = DayOfWeek.Monday; var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -7927,7 +7961,7 @@ public void TestNullable_Enum_NonNull_Success() [Test] public void TestNullable_Enum_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = default( DayOfWeek? ); var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -8936,11 +8970,13 @@ public void TestToFromMessagePackObject_Complex() Assert.That( asList[ 1 ].IsTypeOf().Value ); Assert.That( asList[ 1 ].AsBinary(), Is.EqualTo( target.Data ) ); - Assert.That( asList[ 2 ].IsTypeOf().Value ); - Assert.That( asList[ 2 ].AsInt64(), Is.EqualTo( target.TimeStamp.ToBinary() ) ); + Assert.That( asList[ 2 ].IsTypeOf().Value ); + var timestamp = asList[ 2 ].AsTimestamp(); + Assert.That( timestamp.ToDateTime(), Is.EqualTo( target.TimeStamp.ToUniversalTime() ) ); Assert.That( asList[ 3 ].IsDictionary ); - Assert.That( asList[ 3 ].AsDictionary().Single().Key.AsInt64(), Is.EqualTo( target.History.Single().Key.ToBinary() ) ); + var historyKey = asList[ 3 ].AsDictionary().Single().Key.AsTimestamp(); + Assert.That( historyKey.ToDateTime(), Is.EqualTo( target.History.Single().Key.ToUniversalTime() ) ); Assert.That( asList[ 3 ].AsDictionary().Single().Value.AsString(), Is.EqualTo( target.History.Single().Value ) ); Assert.That( asList[ 4 ].IsArray ); @@ -9371,7 +9407,7 @@ public void TestNoMembers_Fail() [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9397,7 +9433,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9422,7 +9458,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObjec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9448,7 +9484,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9473,7 +9509,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9499,7 +9535,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9524,7 +9560,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9550,7 +9586,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9575,7 +9611,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9601,7 +9637,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9626,7 +9662,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9652,7 +9688,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty_Suc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9677,7 +9713,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject_As [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ValueReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9703,7 +9739,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteField_Succes [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9728,7 +9764,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject_AsMpo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9754,7 +9790,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9779,7 +9815,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9805,7 +9841,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9830,7 +9866,7 @@ public void TestPolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9856,7 +9892,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConst [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9881,7 +9917,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9907,7 +9943,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9932,7 +9968,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObjec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9958,7 +9994,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9983,7 +10019,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -10009,7 +10045,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -10034,7 +10070,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -10060,7 +10096,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -10085,7 +10121,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -10111,7 +10147,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -10136,7 +10172,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10162,7 +10198,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10187,7 +10223,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_StringReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10213,7 +10249,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteField_Succe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10238,7 +10274,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject_AsMp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -10264,7 +10300,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -10289,7 +10325,7 @@ public void TestPolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstruct [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -10315,7 +10351,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropert [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -10340,7 +10376,7 @@ public void TestPolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -10366,7 +10402,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -10391,7 +10427,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructor [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10417,7 +10453,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10443,7 +10479,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10469,7 +10505,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10495,7 +10531,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10521,7 +10557,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10547,7 +10583,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10573,7 +10609,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10599,7 +10635,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10625,7 +10661,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10654,7 +10690,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10680,7 +10716,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWritePrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10706,7 +10742,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10732,7 +10768,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollect [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10758,7 +10794,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -10784,7 +10820,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10810,7 +10846,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10836,7 +10872,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10862,7 +10898,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10888,7 +10924,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -10914,7 +10950,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10940,7 +10976,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWritePrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10966,7 +11002,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10992,7 +11028,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollect [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11018,7 +11054,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11044,7 +11080,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11070,7 +11106,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11096,7 +11132,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11122,7 +11158,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11148,7 +11184,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11174,7 +11210,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11200,7 +11236,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11226,7 +11262,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -11240,7 +11276,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -11270,7 +11306,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -11287,7 +11323,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11313,7 +11349,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11339,7 +11375,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11365,7 +11401,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11391,7 +11427,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11417,7 +11453,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11443,7 +11479,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11469,7 +11505,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11495,7 +11531,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11521,7 +11557,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11547,7 +11583,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11573,7 +11609,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11599,7 +11635,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11625,7 +11661,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11651,7 +11687,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11677,7 +11713,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11703,7 +11739,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11729,7 +11765,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11755,7 +11791,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11781,7 +11817,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11807,7 +11843,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11833,7 +11869,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11859,7 +11895,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11885,7 +11921,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11911,7 +11947,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11937,7 +11973,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11963,7 +11999,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11989,7 +12025,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12015,7 +12051,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12041,7 +12077,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12067,7 +12103,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12093,7 +12129,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12119,7 +12155,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12145,7 +12181,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12171,7 +12207,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateS [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12197,7 +12233,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12223,7 +12259,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12249,7 +12285,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12275,7 +12311,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12301,7 +12337,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12327,7 +12363,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12353,7 +12389,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12379,7 +12415,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -12393,7 +12429,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -12423,7 +12459,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -12441,7 +12477,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12467,7 +12503,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12493,7 +12529,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -12519,7 +12555,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -12545,7 +12581,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -12571,7 +12607,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12597,7 +12633,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12623,7 +12659,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -12649,7 +12685,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -12675,7 +12711,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -12701,7 +12737,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12727,7 +12763,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWritePr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12753,7 +12789,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -12779,7 +12815,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -12805,7 +12841,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSett [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -12831,7 +12867,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12857,7 +12893,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12883,7 +12919,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -12909,7 +12945,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -12935,7 +12971,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -12961,7 +12997,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12987,7 +13023,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13013,7 +13049,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -13039,7 +13075,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -13065,7 +13101,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -13091,7 +13127,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13117,7 +13153,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13143,7 +13179,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13169,7 +13205,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13195,7 +13231,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13221,7 +13257,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13247,7 +13283,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13273,7 +13309,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13299,7 +13335,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13325,7 +13361,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13351,7 +13387,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13377,7 +13413,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13403,7 +13439,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13429,7 +13465,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13455,7 +13491,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13481,7 +13517,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13507,7 +13543,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13533,7 +13569,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13559,7 +13595,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13585,7 +13621,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13611,7 +13647,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13637,7 +13673,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13663,7 +13699,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -13689,7 +13725,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -13715,7 +13751,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -13741,7 +13777,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13767,7 +13803,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13793,7 +13829,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13819,7 +13855,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13845,7 +13881,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13871,7 +13907,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13897,7 +13933,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13923,7 +13959,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13949,7 +13985,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13975,7 +14011,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14008,7 +14044,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14034,7 +14070,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14059,7 +14095,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14085,7 +14121,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14110,7 +14146,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14136,7 +14172,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14161,7 +14197,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14187,7 +14223,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14212,7 +14248,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14238,7 +14274,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14263,7 +14299,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14289,7 +14325,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty_S [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14314,7 +14350,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14340,7 +14376,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField_Succ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14365,7 +14401,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject_AsM [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14391,7 +14427,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14416,7 +14452,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14442,7 +14478,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14467,7 +14503,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14493,7 +14529,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14518,7 +14554,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14544,7 +14580,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14569,7 +14605,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14595,7 +14631,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14620,7 +14656,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -14646,7 +14682,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -14671,7 +14707,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -14697,7 +14733,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -14722,7 +14758,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -14748,7 +14784,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -14773,7 +14809,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14799,7 +14835,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14824,7 +14860,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14850,7 +14886,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField_Suc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14875,7 +14911,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject_As [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -14901,7 +14937,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -14926,7 +14962,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstru [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -14952,7 +14988,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -14977,7 +15013,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -15003,7 +15039,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -15028,7 +15064,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstruct [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15054,7 +15090,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -15080,7 +15116,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15106,7 +15142,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -15132,7 +15168,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObje [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15158,7 +15194,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15184,7 +15220,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetterPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15210,7 +15246,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetter [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15236,7 +15272,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropert [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyFieldAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15262,7 +15298,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15291,7 +15327,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15317,7 +15353,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15343,7 +15379,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15369,7 +15405,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15395,7 +15431,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15421,7 +15457,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15447,7 +15483,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15473,7 +15509,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15499,7 +15535,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15525,7 +15561,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15551,7 +15587,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15577,7 +15613,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15603,7 +15639,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15629,7 +15665,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15655,7 +15691,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15681,7 +15717,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15707,7 +15743,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15733,7 +15769,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15759,7 +15795,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15785,7 +15821,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15811,7 +15847,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15837,7 +15873,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15863,7 +15899,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -15877,7 +15913,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCol [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -15907,7 +15943,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -15924,7 +15960,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15950,7 +15986,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15976,7 +16012,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16002,7 +16038,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16028,7 +16064,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16054,7 +16090,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16080,7 +16116,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16106,7 +16142,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16132,7 +16168,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16158,7 +16194,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16184,7 +16220,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16210,7 +16246,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16236,7 +16272,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16262,7 +16298,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16288,7 +16324,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16314,7 +16350,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16340,7 +16376,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16366,7 +16402,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16392,7 +16428,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16418,7 +16454,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16444,7 +16480,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16470,7 +16506,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16496,7 +16532,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16522,7 +16558,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16548,7 +16584,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16574,7 +16610,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16600,7 +16636,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16626,7 +16662,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16652,7 +16688,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemG [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16678,7 +16714,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16704,7 +16740,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16730,7 +16766,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16756,7 +16792,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16782,7 +16818,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16808,7 +16844,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16834,7 +16870,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16860,7 +16896,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16886,7 +16922,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16912,7 +16948,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16938,7 +16974,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16964,7 +17000,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16990,7 +17026,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17016,7 +17052,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -17030,7 +17066,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCol [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -17060,7 +17096,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -17078,7 +17114,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17104,7 +17140,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17130,7 +17166,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -17156,7 +17192,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -17182,7 +17218,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetter [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -17208,7 +17244,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17234,7 +17270,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17260,7 +17296,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17286,7 +17322,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17312,7 +17348,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateS [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17338,7 +17374,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17364,7 +17400,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17390,7 +17426,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -17416,7 +17452,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -17442,7 +17478,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -17468,7 +17504,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17494,7 +17530,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17520,7 +17556,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -17546,7 +17582,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -17572,7 +17608,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -17598,7 +17634,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17624,7 +17660,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17650,7 +17686,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -17676,7 +17712,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -17702,7 +17738,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -17728,7 +17764,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17754,7 +17790,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17780,7 +17816,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -17806,7 +17842,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -17832,7 +17868,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -17858,7 +17894,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17884,7 +17920,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17910,7 +17946,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17936,7 +17972,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17962,7 +17998,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPriv [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17988,7 +18024,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18014,7 +18050,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18040,7 +18076,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18066,7 +18102,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18092,7 +18128,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18118,7 +18154,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18144,7 +18180,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18170,7 +18206,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18196,7 +18232,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18222,7 +18258,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18248,7 +18284,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18274,7 +18310,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18300,7 +18336,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -18326,7 +18362,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -18352,7 +18388,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -18378,7 +18414,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18404,7 +18440,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18430,7 +18466,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18456,7 +18492,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18482,7 +18518,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPriv [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18508,7 +18544,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18534,7 +18570,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18560,7 +18596,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18586,7 +18622,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18612,7 +18648,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18640,7 +18676,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeMixed_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeMixed(); target.NormalVanilla = "ABC"; target.NormalRuntime = new FileEntry { Name = "File", Size = 1 }; @@ -18705,7 +18741,7 @@ public void TestPolymorphicMemberTypeMixed_Success() [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeMixed_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeMixed(); var serializer = context.GetSerializer(); @@ -18740,7 +18776,7 @@ public void TestPolymorphicMemberTypeMixed_Null_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberNoAttribute { Value = new FileEntry { Name = "file", Size = 1 } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -18750,7 +18786,7 @@ public void TestAbstractClassMemberNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberKnownType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -18772,7 +18808,7 @@ public void TestAbstractClassMemberKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberRuntimeType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -18794,7 +18830,7 @@ public void TestAbstractClassMemberRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemNoAttribute { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -18804,7 +18840,7 @@ public void TestAbstractClassListItemNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemKnownType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -18827,7 +18863,7 @@ public void TestAbstractClassListItemKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemRuntimeType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -18850,7 +18886,7 @@ public void TestAbstractClassListItemRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyNoAttribute { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -18860,7 +18896,7 @@ public void TestAbstractClassDictKeyNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyKnownType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -18883,7 +18919,7 @@ public void TestAbstractClassDictKeyKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyRuntimeType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -18906,7 +18942,7 @@ public void TestAbstractClassDictKeyRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberNoAttribute { Value = new FileEntry { Name = "file", Size = 1 } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -18916,7 +18952,7 @@ public void TestInterfaceMemberNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberKnownType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -18938,7 +18974,7 @@ public void TestInterfaceMemberKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberRuntimeType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -18960,7 +18996,7 @@ public void TestInterfaceMemberRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemNoAttribute { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -18970,7 +19006,7 @@ public void TestInterfaceListItemNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemKnownType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -18993,7 +19029,7 @@ public void TestInterfaceListItemKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemRuntimeType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -19016,7 +19052,7 @@ public void TestInterfaceListItemRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyNoAttribute { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19026,7 +19062,7 @@ public void TestInterfaceDictKeyNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyKnownType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -19049,7 +19085,7 @@ public void TestInterfaceDictKeyKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyRuntimeType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -19072,7 +19108,7 @@ public void TestInterfaceDictKeyRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionNoAttribute_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionNoAttribute { Value = new EchoKeyedCollection { "ABC" } }; @@ -19096,7 +19132,7 @@ public void TestAbstractClassCollectionNoAttribute_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionKnownType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19120,7 +19156,7 @@ public void TestAbstractClassCollectionKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionRuntimeType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19144,7 +19180,7 @@ public void TestAbstractClassCollectionRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionNoAttribute_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionNoAttribute { Value = new EchoKeyedCollection { "ABC" } }; @@ -19168,7 +19204,7 @@ public void TestInterfaceCollectionNoAttribute_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionKnownType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19192,7 +19228,7 @@ public void TestInterfaceCollectionKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionRuntimeType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19216,7 +19252,7 @@ public void TestInterfaceCollectionRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestTupleAbstractType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new TupleAbstractType { Value = Tuple.Create( new FileEntry { Name = "1", Size = 1 } as AbstractFileSystemEntry, new FileEntry { Name = "2", Size = 2 } as IFileSystemEntry, new FileEntry { Name = "3", Size = 3 } as AbstractFileSystemEntry, new FileEntry { Name = "4", Size = 4 } as IFileSystemEntry ) }; var serializer = context.GetSerializer(); @@ -19238,7 +19274,7 @@ public void TestTupleAbstractType_Success() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownMember_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownMember(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19247,7 +19283,7 @@ public void TestAttribute_DuplicatedKnownMember_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownCollectionItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownCollectionItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19256,7 +19292,7 @@ public void TestAttribute_DuplicatedKnownCollectionItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownDictionaryKey_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownDictionaryKey(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19266,7 +19302,7 @@ public void TestAttribute_DuplicatedKnownDictionaryKey_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownTupleItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownTupleItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19276,7 +19312,7 @@ public void TestAttribute_DuplicatedKnownTupleItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeMember_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeMember(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19285,7 +19321,7 @@ public void TestAttribute_KnownAndRuntimeMember_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeCollectionItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeCollectionItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19294,7 +19330,7 @@ public void TestAttribute_KnownAndRuntimeCollectionItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeDictionaryKey_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeDictionaryKey(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19304,7 +19340,7 @@ public void TestAttribute_KnownAndRuntimeDictionaryKey_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeTupleItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeTupleItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19314,7 +19350,7 @@ public void TestAttribute_KnownAndRuntimeTupleItem_Fail() [Category( "PolymorphicSerialization" )] public void TestGlobalNamespace() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new HasGlobalNamespaceType { GlobalType = new TypeInGlobalNamespace { Value = "ABC" } }; var serializer = context.GetSerializer(); @@ -19337,7 +19373,7 @@ public void TestGlobalNamespace() [Category( "PolymorphicSerialization" )] public async Task TestGlobalNamespaceAsync() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new HasGlobalNamespaceType { GlobalType = new TypeInGlobalNamespace { Value = "ABC" } }; var serializer = context.GetSerializer(); @@ -19371,7 +19407,7 @@ private static void SetUpDefaultCollectionsForPolymorphism( SerializationContext [Category( "PolymorphicSerialization" )] public void TestPolymorphismAttributesInType() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); context.GetSerializer(); context.GetSerializer(); @@ -19384,7 +19420,7 @@ public void TestPolymorphismAttributesInType() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19410,7 +19446,7 @@ public void TestKnownType_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19436,7 +19472,7 @@ public void TestKnownType_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19464,7 +19500,7 @@ public void TestKnownType_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19492,7 +19528,7 @@ public void TestKnownType_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19519,7 +19555,7 @@ public void TestKnownType_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19546,7 +19582,7 @@ public void TestKnownType_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19573,7 +19609,7 @@ public void TestRuntimeType_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19600,7 +19636,7 @@ public void TestRuntimeType_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19623,7 +19659,7 @@ public void TestRuntimeType_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19646,7 +19682,7 @@ public void TestRuntimeType_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19673,7 +19709,7 @@ public void TestRuntimeType_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19700,7 +19736,7 @@ public void TestRuntimeType_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19726,7 +19762,7 @@ public void TestKnownTypeCollection_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19752,7 +19788,7 @@ public void TestKnownTypeCollection_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19780,7 +19816,7 @@ public void TestKnownTypeCollection_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19808,7 +19844,7 @@ public void TestKnownTypeCollection_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19835,7 +19871,7 @@ public void TestKnownTypeCollection_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19862,7 +19898,7 @@ public void TestKnownTypeCollection_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19889,7 +19925,7 @@ public void TestRuntimeTypeCollection_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19916,7 +19952,7 @@ public void TestRuntimeTypeCollection_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19939,7 +19975,7 @@ public void TestRuntimeTypeCollection_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19962,7 +19998,7 @@ public void TestRuntimeTypeCollection_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19989,7 +20025,7 @@ public void TestRuntimeTypeCollection_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20016,7 +20052,7 @@ public void TestRuntimeTypeCollection_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20042,7 +20078,7 @@ public void TestKnownTypeDictionary_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20068,7 +20104,7 @@ public void TestKnownTypeDictionary_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20096,7 +20132,7 @@ public void TestKnownTypeDictionary_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20124,7 +20160,7 @@ public void TestKnownTypeDictionary_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20151,7 +20187,7 @@ public void TestKnownTypeDictionary_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20178,7 +20214,7 @@ public void TestKnownTypeDictionary_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20205,7 +20241,7 @@ public void TestRuntimeTypeDictionary_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20232,7 +20268,7 @@ public void TestRuntimeTypeDictionary_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20255,7 +20291,7 @@ public void TestRuntimeTypeDictionary_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20278,7 +20314,7 @@ public void TestRuntimeTypeDictionary_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20305,7 +20341,7 @@ public void TestRuntimeTypeDictionary_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20337,7 +20373,7 @@ public void TestRuntimeTypeDictionary_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_PublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPublicStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20356,7 +20392,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_PublicStaticMethod_OK() [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_NonPublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPrivateStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20375,7 +20411,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_NonPublicStaticMethod_O [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_PublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPublicInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20394,7 +20430,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_PublicInstanceMethod_OK [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_NonPublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPrivateInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20413,7 +20449,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_NonPublicInstanceMethod [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_PublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPublicStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20432,7 +20468,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_PublicStaticMethod_O [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPrivateStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20451,7 +20487,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicStaticMetho [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_PublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPublicInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20470,7 +20506,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_PublicInstanceMethod [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPrivateInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20489,7 +20525,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicInstanceMet [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoMethods_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierNoMethods { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20504,7 +20540,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoMethods_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseVoidReturnMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierVoidReturnMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20519,7 +20555,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseVoidReturnMethod_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoParametersMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierNoParametersMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20534,7 +20570,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoParametersMethod_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseExtraParametersMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierExtraParametersMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20549,7 +20585,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseExtraParametersMethod_Fai [Category( "PolymorphicSerialization" )] public void TestTypeVerifierDoesNotLoadTypeItself() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var serializer = context.GetSerializer(); using ( var buffer = new MemoryStream() ) diff --git a/test/MsgPack.UnitTest.CodeDom/Serialization/MapCodeDomBasedAutoMessagePackSerializerTest.cs b/test/MsgPack.UnitTest.CodeDom/Serialization/MapCodeDomBasedAutoMessagePackSerializerTest.cs index fcc28adec..3277e12f8 100644 --- a/test/MsgPack.UnitTest.CodeDom/Serialization/MapCodeDomBasedAutoMessagePackSerializerTest.cs +++ b/test/MsgPack.UnitTest.CodeDom/Serialization/MapCodeDomBasedAutoMessagePackSerializerTest.cs @@ -89,9 +89,15 @@ private static SerializationContext GetSerializationContext() return context; } - private static SerializationContext NewSerializationContext( PackerCompatibilityOptions compatibilityOptions ) + private static SerializationContext NewSerializationContext() + { + return NewSerializationContext( PackerCompatibilityOptions.None, DateTimeConversionMethod.Timestamp ); + } + + private static SerializationContext NewSerializationContext( PackerCompatibilityOptions compatibilityOptions, DateTimeConversionMethod dateTimeConversionMethod ) { var context = new SerializationContext( compatibilityOptions ) { SerializationMethod = SerializationMethod.Map }; + context.DefaultDateTimeConversionMethod = dateTimeConversionMethod; context.SerializerOptions.EmitterFlavor = EmitterFlavor.CodeDomBased; #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED context.SerializerOptions.DisablePrivilegedAccess = true; @@ -244,6 +250,34 @@ public void TestString() [Test] public void TestDateTime() + { + TestCore( + DateTime.UtcNow, + stream => MessagePackSerializer.UnpackMessagePackObject( stream ).AsTimestamp().ToDateTime(), + ( x, y ) => x.Equals( y ), + context => + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); + } + ); + } + + [Test] + public void TestDateTimeOffset() + { + TestCore( + DateTimeOffset.UtcNow, + stream => MessagePackSerializer.UnpackMessagePackObject( stream ).AsTimestamp().ToDateTimeOffset(), + ( x, y ) => x.Equals( y ), + context => + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); + } + ); + } + + [Test] + public void TestDateTimeNative() { TestCore( DateTime.Now, @@ -251,13 +285,13 @@ public void TestDateTime() ( x, y ) => x.Equals( y ), context => { - Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + context.DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native; } ); } [Test] - public void TestDateTimeOffset() + public void TestDateTimeOffsetNative() { TestCore( DateTimeOffset.Now, @@ -269,7 +303,7 @@ public void TestDateTimeOffset() ( x, y ) => x.Equals( y ), context => { - Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + context.DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native; } ); } @@ -1204,7 +1238,7 @@ public void TestEmptyBytes() [Test] public void TestEmptyBytes_Classic() { - var context = NewSerializationContext( PackerCompatibilityOptions.Classic ); + var context = NewSerializationContext( PackerCompatibilityOptions.Classic, DateTimeConversionMethod.Native ); var serializer = this.CreateTarget( context ); using ( var stream = new MemoryStream() ) { @@ -4181,7 +4215,7 @@ public void TestFullPackableUnpackable_PackToMessageAndUnpackFromMessageUsed() [Test] public void TestBinary_ClassicContext() { - var context = NewSerializationContext( PackerCompatibilityOptions.Classic ); + var context = NewSerializationContext( PackerCompatibilityOptions.Classic, DateTimeConversionMethod.Native ); var serializer = context.GetSerializer(); using ( var stream = new MemoryStream() ) @@ -4194,7 +4228,7 @@ public void TestBinary_ClassicContext() [Test] public void TestBinary_ContextWithPackerCompatilibyOptionsNone() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext( PackerCompatibilityOptions.None, DateTimeConversionMethod.Timestamp ); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -4206,8 +4240,8 @@ public void TestBinary_ContextWithPackerCompatilibyOptionsNone() [Test] public void TestExt_ClassicContext() { - var context = NewSerializationContext( SerializationContext.CreateClassicContext().CompatibilityOptions.PackerCompatibilityOptions ); - context.Serializers.Register( new CustomDateTimeSerealizer() ); + var context = NewSerializationContext( SerializationContext.CreateClassicContext().CompatibilityOptions.PackerCompatibilityOptions, SerializationContext.CreateClassicContext().DefaultDateTimeConversionMethod ); + context.Serializers.RegisterOverride( new CustomDateTimeSerealizer() ); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -4223,7 +4257,7 @@ public void TestExt_ClassicContext() [Test] public void TestExt_DefaultContext() { - var context = NewSerializationContext( SerializationContext.Default.CompatibilityOptions.PackerCompatibilityOptions ); + var context = NewSerializationContext( SerializationContext.Default.CompatibilityOptions.PackerCompatibilityOptions, SerializationContext.Default.DefaultDateTimeConversionMethod ); context.Serializers.Register( new CustomDateTimeSerealizer() ); var serializer = CreateTarget( context ); @@ -4240,7 +4274,7 @@ public void TestExt_DefaultContext() [Test] public void TestExt_ContextWithPackerCompatilibyOptionsNone() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.Serializers.Register( new CustomDateTimeSerealizer() ); context.CompatibilityOptions.PackerCompatibilityOptions = PackerCompatibilityOptions.None; var serializer = CreateTarget( context ); @@ -4258,7 +4292,7 @@ public void TestExt_ContextWithPackerCompatilibyOptionsNone() [Test] public void TestAbstractTypes_KnownCollections_Default_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -4276,7 +4310,7 @@ public void TestAbstractTypes_KnownCollections_Default_Success() [Test] public void TestAbstractTypes_KnownCollections_WithoutRegistration_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Unregister( typeof( IList<> ) ); Assert.Throws( () => DoKnownCollectionTest( context ) ); } @@ -4284,7 +4318,7 @@ public void TestAbstractTypes_KnownCollections_WithoutRegistration_Fail() [Test] public void TestAbstractTypes_KnownCollections_ExplicitRegistration_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList<> ), typeof( Collection<> ) ); var serializer = CreateTarget( context ); @@ -4303,7 +4337,7 @@ public void TestAbstractTypes_KnownCollections_ExplicitRegistration_Success() [Test] public void TestAbstractTypes_KnownCollections_ExplicitRegistrationForSpecific_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( Collection ) ); var serializer1 = CreateTarget( context ); @@ -4336,7 +4370,7 @@ public void TestAbstractTypes_KnownCollections_ExplicitRegistrationForSpecific_S [Test] public void TestAbstractTypes_NotACollection_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); Assert.Throws( () => DoKnownCollectionTest( context ) ); } @@ -4418,7 +4452,7 @@ private static void TestCollectionInterfaceCore( byte[] data, Action asser { using ( var buffer = new MemoryStream(data) ) { - var serializer = MessagePackSerializer.Get( NewSerializationContext( PackerCompatibilityOptions.None ) ); + var serializer = MessagePackSerializer.Get( NewSerializationContext() ); var result = serializer.Unpack( buffer ); assertion( result ); } @@ -7827,7 +7861,7 @@ public class ExclusionAndInclusionSimulatously [Test] public void TestGenericDerived_Value_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericValueClass { @@ -7854,7 +7888,7 @@ public void TestGenericDerived_Value_Success() [Test] public void TestGenericDerived_Reference_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericReferenceClass { @@ -7881,7 +7915,7 @@ public void TestGenericDerived_Reference_Success() [Test] public void TestGenericRecordDerived_Value_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericRecordValueClass( 1, 2 ); var serializer = context.GetSerializer(); @@ -7900,7 +7934,7 @@ public void TestGenericRecordDerived_Value_Success() [Test] public void TestGenericRecordDerived_Reference_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericRecordReferenceClass( "1", "2" ); var serializer = context.GetSerializer(); @@ -7924,7 +7958,7 @@ public void TestGenericRecordDerived_Reference_Success() [Test] public void TestNullable_Primitive_NonNull_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = DateTime.UtcNow.Millisecond; var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -7940,7 +7974,7 @@ public void TestNullable_Primitive_NonNull_Success() [Test] public void TestNullable_Primitive_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = default( int? ); var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -7956,7 +7990,7 @@ public void TestNullable_Primitive_Null_Success() [Test] public void TestNullable_Complex_NonNull_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = TimeSpan.FromSeconds( DateTime.UtcNow.Millisecond ); var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -7972,7 +8006,7 @@ public void TestNullable_Complex_NonNull_Success() [Test] public void TestNullable_Complex_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = default( TimeSpan? ); var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -7988,7 +8022,7 @@ public void TestNullable_Complex_Null_Success() [Test] public void TestNullable_Enum_NonNull_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = DayOfWeek.Monday; var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -8004,7 +8038,7 @@ public void TestNullable_Enum_NonNull_Success() [Test] public void TestNullable_Enum_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = default( DayOfWeek? ); var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -9248,10 +9282,13 @@ public void TestToFromMessagePackObject_Complex() Assert.That( asDictionary[ "Data" ].IsTypeOf().Value ); Assert.That( asDictionary[ "Data" ].AsBinary(), Is.EqualTo( target.Data ) ); - Assert.That( asDictionary[ "TimeStamp" ].IsTypeOf().Value ); - Assert.That( asDictionary[ "TimeStamp" ].AsInt64(), Is.EqualTo( target.TimeStamp.ToBinary() ) ); + Assert.That( asDictionary[ "TimeStamp" ].IsTypeOf().Value ); + var timestamp = asDictionary[ "TimeStamp" ].AsTimestamp(); + Assert.That( timestamp.ToDateTime(), Is.EqualTo( target.TimeStamp.ToUniversalTime() ) ); - Assert.That( asDictionary[ "History" ].AsDictionary().Single().Key.AsInt64(), Is.EqualTo( target.History.Single().Key.ToBinary() ) ); + Assert.That( asDictionary[ "History" ].IsDictionary ); + var historyKey = asDictionary[ "History" ].AsDictionary().Single().Key.AsTimestamp(); + Assert.That( historyKey.ToDateTime(), Is.EqualTo( target.History.Single().Key.ToUniversalTime() ) ); Assert.That( asDictionary[ "History" ].AsDictionary().Single().Value.AsString(), Is.EqualTo( target.History.Single().Value ) ); Assert.That( asDictionary[ "Points" ].IsArray ); @@ -9684,7 +9721,7 @@ public void TestNoMembers_Fail() [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9710,7 +9747,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9735,7 +9772,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObjec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9761,7 +9798,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9786,7 +9823,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9812,7 +9849,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9837,7 +9874,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9863,7 +9900,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9888,7 +9925,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9914,7 +9951,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9939,7 +9976,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9965,7 +10002,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty_Suc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9990,7 +10027,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject_As [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ValueReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10016,7 +10053,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteField_Succes [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10041,7 +10078,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject_AsMpo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10067,7 +10104,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10092,7 +10129,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10118,7 +10155,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10143,7 +10180,7 @@ public void TestPolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10169,7 +10206,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConst [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10194,7 +10231,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10220,7 +10257,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10245,7 +10282,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObjec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10271,7 +10308,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10296,7 +10333,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -10322,7 +10359,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -10347,7 +10384,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -10373,7 +10410,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -10398,7 +10435,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -10424,7 +10461,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -10449,7 +10486,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10475,7 +10512,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10500,7 +10537,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_StringReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10526,7 +10563,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteField_Succe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10551,7 +10588,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject_AsMp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -10577,7 +10614,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -10602,7 +10639,7 @@ public void TestPolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstruct [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -10628,7 +10665,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropert [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -10653,7 +10690,7 @@ public void TestPolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -10679,7 +10716,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -10704,7 +10741,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructor [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10730,7 +10767,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10756,7 +10793,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10782,7 +10819,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10808,7 +10845,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10834,7 +10871,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10860,7 +10897,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10886,7 +10923,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10912,7 +10949,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10938,7 +10975,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10967,7 +11004,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10993,7 +11030,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWritePrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11019,7 +11056,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11045,7 +11082,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollect [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11071,7 +11108,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11097,7 +11134,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11123,7 +11160,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11149,7 +11186,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11175,7 +11212,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11201,7 +11238,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11227,7 +11264,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11253,7 +11290,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWritePrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11279,7 +11316,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11305,7 +11342,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollect [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11331,7 +11368,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11357,7 +11394,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11383,7 +11420,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11409,7 +11446,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11435,7 +11472,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11461,7 +11498,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11487,7 +11524,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11513,7 +11550,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11539,7 +11576,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -11553,7 +11590,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -11583,7 +11620,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -11600,7 +11637,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11626,7 +11663,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11652,7 +11689,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11678,7 +11715,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11704,7 +11741,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11730,7 +11767,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11756,7 +11793,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11782,7 +11819,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11808,7 +11845,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11834,7 +11871,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11860,7 +11897,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11886,7 +11923,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11912,7 +11949,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11938,7 +11975,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11964,7 +12001,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11990,7 +12027,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12016,7 +12053,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12042,7 +12079,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12068,7 +12105,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12094,7 +12131,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12120,7 +12157,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12146,7 +12183,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12172,7 +12209,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12198,7 +12235,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12224,7 +12261,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12250,7 +12287,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12276,7 +12313,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12302,7 +12339,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12328,7 +12365,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12354,7 +12391,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12380,7 +12417,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12406,7 +12443,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12432,7 +12469,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12458,7 +12495,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12484,7 +12521,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateS [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12510,7 +12547,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12536,7 +12573,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12562,7 +12599,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12588,7 +12625,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12614,7 +12651,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12640,7 +12677,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12666,7 +12703,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12692,7 +12729,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -12706,7 +12743,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -12736,7 +12773,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -12754,7 +12791,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12780,7 +12817,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12806,7 +12843,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -12832,7 +12869,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -12858,7 +12895,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -12884,7 +12921,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12910,7 +12947,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12936,7 +12973,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -12962,7 +12999,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -12988,7 +13025,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13014,7 +13051,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13040,7 +13077,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWritePr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13066,7 +13103,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -13092,7 +13129,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -13118,7 +13155,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSett [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -13144,7 +13181,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13170,7 +13207,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13196,7 +13233,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -13222,7 +13259,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -13248,7 +13285,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -13274,7 +13311,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13300,7 +13337,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13326,7 +13363,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -13352,7 +13389,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -13378,7 +13415,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -13404,7 +13441,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13430,7 +13467,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13456,7 +13493,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13482,7 +13519,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13508,7 +13545,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13534,7 +13571,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13560,7 +13597,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13586,7 +13623,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13612,7 +13649,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13638,7 +13675,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13664,7 +13701,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13690,7 +13727,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13716,7 +13753,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13742,7 +13779,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13768,7 +13805,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13794,7 +13831,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13820,7 +13857,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13846,7 +13883,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13872,7 +13909,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13898,7 +13935,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13924,7 +13961,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13950,7 +13987,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13976,7 +14013,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -14002,7 +14039,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -14028,7 +14065,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -14054,7 +14091,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14080,7 +14117,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14106,7 +14143,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14132,7 +14169,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14158,7 +14195,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14184,7 +14221,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14210,7 +14247,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14236,7 +14273,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14262,7 +14299,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14288,7 +14325,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14321,7 +14358,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14347,7 +14384,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14372,7 +14409,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14398,7 +14435,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14423,7 +14460,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14449,7 +14486,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14474,7 +14511,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14500,7 +14537,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14525,7 +14562,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14551,7 +14588,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14576,7 +14613,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14602,7 +14639,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty_S [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14627,7 +14664,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14653,7 +14690,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField_Succ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14678,7 +14715,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject_AsM [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14704,7 +14741,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14729,7 +14766,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14755,7 +14792,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14780,7 +14817,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14806,7 +14843,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14831,7 +14868,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14857,7 +14894,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14882,7 +14919,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14908,7 +14945,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14933,7 +14970,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -14959,7 +14996,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -14984,7 +15021,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -15010,7 +15047,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -15035,7 +15072,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -15061,7 +15098,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -15086,7 +15123,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15112,7 +15149,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -15137,7 +15174,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15163,7 +15200,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField_Suc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -15188,7 +15225,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject_As [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -15214,7 +15251,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -15239,7 +15276,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstru [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -15265,7 +15302,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -15290,7 +15327,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -15316,7 +15353,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -15341,7 +15378,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstruct [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15367,7 +15404,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -15393,7 +15430,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15419,7 +15456,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -15445,7 +15482,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObje [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15471,7 +15508,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15497,7 +15534,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetterPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15523,7 +15560,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetter [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15549,7 +15586,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropert [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyFieldAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15575,7 +15612,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15604,7 +15641,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15630,7 +15667,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15656,7 +15693,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15682,7 +15719,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15708,7 +15745,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15734,7 +15771,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15760,7 +15797,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15786,7 +15823,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15812,7 +15849,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15838,7 +15875,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15864,7 +15901,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15890,7 +15927,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15916,7 +15953,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15942,7 +15979,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15968,7 +16005,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15994,7 +16031,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16020,7 +16057,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16046,7 +16083,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16072,7 +16109,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16098,7 +16135,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16124,7 +16161,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16150,7 +16187,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16176,7 +16213,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -16190,7 +16227,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCol [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -16220,7 +16257,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -16237,7 +16274,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16263,7 +16300,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16289,7 +16326,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16315,7 +16352,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16341,7 +16378,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16367,7 +16404,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16393,7 +16430,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16419,7 +16456,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16445,7 +16482,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16471,7 +16508,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16497,7 +16534,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16523,7 +16560,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16549,7 +16586,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16575,7 +16612,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16601,7 +16638,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16627,7 +16664,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16653,7 +16690,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16679,7 +16716,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16705,7 +16742,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16731,7 +16768,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16757,7 +16794,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16783,7 +16820,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16809,7 +16846,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16835,7 +16872,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16861,7 +16898,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16887,7 +16924,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16913,7 +16950,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16939,7 +16976,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16965,7 +17002,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemG [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16991,7 +17028,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -17017,7 +17054,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17043,7 +17080,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17069,7 +17106,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17095,7 +17132,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17121,7 +17158,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -17147,7 +17184,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17173,7 +17210,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17199,7 +17236,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17225,7 +17262,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17251,7 +17288,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -17277,7 +17314,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17303,7 +17340,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17329,7 +17366,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -17343,7 +17380,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCol [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -17373,7 +17410,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -17391,7 +17428,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17417,7 +17454,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17443,7 +17480,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -17469,7 +17506,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -17495,7 +17532,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetter [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -17521,7 +17558,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17547,7 +17584,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17573,7 +17610,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17599,7 +17636,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17625,7 +17662,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateS [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17651,7 +17688,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17677,7 +17714,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17703,7 +17740,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -17729,7 +17766,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -17755,7 +17792,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -17781,7 +17818,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17807,7 +17844,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17833,7 +17870,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -17859,7 +17896,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -17885,7 +17922,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -17911,7 +17948,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17937,7 +17974,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17963,7 +18000,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -17989,7 +18026,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -18015,7 +18052,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -18041,7 +18078,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18067,7 +18104,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18093,7 +18130,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18119,7 +18156,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18145,7 +18182,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18171,7 +18208,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18197,7 +18234,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18223,7 +18260,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18249,7 +18286,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18275,7 +18312,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPriv [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18301,7 +18338,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18327,7 +18364,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18353,7 +18390,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18379,7 +18416,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18405,7 +18442,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18431,7 +18468,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18457,7 +18494,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18483,7 +18520,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18509,7 +18546,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18535,7 +18572,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18561,7 +18598,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18587,7 +18624,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18613,7 +18650,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -18639,7 +18676,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -18665,7 +18702,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -18691,7 +18728,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18717,7 +18754,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18743,7 +18780,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18769,7 +18806,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18795,7 +18832,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPriv [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18821,7 +18858,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18847,7 +18884,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18873,7 +18910,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18899,7 +18936,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18925,7 +18962,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18953,7 +18990,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeMixed_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeMixed(); target.NormalVanilla = "ABC"; target.NormalRuntime = new FileEntry { Name = "File", Size = 1 }; @@ -19018,7 +19055,7 @@ public void TestPolymorphicMemberTypeMixed_Success() [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeMixed_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeMixed(); var serializer = context.GetSerializer(); @@ -19053,7 +19090,7 @@ public void TestPolymorphicMemberTypeMixed_Null_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberNoAttribute { Value = new FileEntry { Name = "file", Size = 1 } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19063,7 +19100,7 @@ public void TestAbstractClassMemberNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberKnownType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -19085,7 +19122,7 @@ public void TestAbstractClassMemberKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberRuntimeType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -19107,7 +19144,7 @@ public void TestAbstractClassMemberRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemNoAttribute { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19117,7 +19154,7 @@ public void TestAbstractClassListItemNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemKnownType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -19140,7 +19177,7 @@ public void TestAbstractClassListItemKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemRuntimeType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -19163,7 +19200,7 @@ public void TestAbstractClassListItemRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyNoAttribute { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19173,7 +19210,7 @@ public void TestAbstractClassDictKeyNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyKnownType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -19196,7 +19233,7 @@ public void TestAbstractClassDictKeyKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyRuntimeType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -19219,7 +19256,7 @@ public void TestAbstractClassDictKeyRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberNoAttribute { Value = new FileEntry { Name = "file", Size = 1 } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19229,7 +19266,7 @@ public void TestInterfaceMemberNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberKnownType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -19251,7 +19288,7 @@ public void TestInterfaceMemberKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberRuntimeType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -19273,7 +19310,7 @@ public void TestInterfaceMemberRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemNoAttribute { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19283,7 +19320,7 @@ public void TestInterfaceListItemNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemKnownType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -19306,7 +19343,7 @@ public void TestInterfaceListItemKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemRuntimeType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -19329,7 +19366,7 @@ public void TestInterfaceListItemRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyNoAttribute { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19339,7 +19376,7 @@ public void TestInterfaceDictKeyNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyKnownType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -19362,7 +19399,7 @@ public void TestInterfaceDictKeyKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyRuntimeType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -19385,7 +19422,7 @@ public void TestInterfaceDictKeyRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionNoAttribute_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionNoAttribute { Value = new EchoKeyedCollection { "ABC" } }; @@ -19409,7 +19446,7 @@ public void TestAbstractClassCollectionNoAttribute_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionKnownType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19433,7 +19470,7 @@ public void TestAbstractClassCollectionKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionRuntimeType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19457,7 +19494,7 @@ public void TestAbstractClassCollectionRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionNoAttribute_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionNoAttribute { Value = new EchoKeyedCollection { "ABC" } }; @@ -19481,7 +19518,7 @@ public void TestInterfaceCollectionNoAttribute_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionKnownType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19505,7 +19542,7 @@ public void TestInterfaceCollectionKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionRuntimeType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19529,7 +19566,7 @@ public void TestInterfaceCollectionRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestTupleAbstractType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new TupleAbstractType { Value = Tuple.Create( new FileEntry { Name = "1", Size = 1 } as AbstractFileSystemEntry, new FileEntry { Name = "2", Size = 2 } as IFileSystemEntry, new FileEntry { Name = "3", Size = 3 } as AbstractFileSystemEntry, new FileEntry { Name = "4", Size = 4 } as IFileSystemEntry ) }; var serializer = context.GetSerializer(); @@ -19551,7 +19588,7 @@ public void TestTupleAbstractType_Success() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownMember_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownMember(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19560,7 +19597,7 @@ public void TestAttribute_DuplicatedKnownMember_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownCollectionItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownCollectionItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19569,7 +19606,7 @@ public void TestAttribute_DuplicatedKnownCollectionItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownDictionaryKey_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownDictionaryKey(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19579,7 +19616,7 @@ public void TestAttribute_DuplicatedKnownDictionaryKey_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownTupleItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownTupleItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19589,7 +19626,7 @@ public void TestAttribute_DuplicatedKnownTupleItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeMember_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeMember(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19598,7 +19635,7 @@ public void TestAttribute_KnownAndRuntimeMember_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeCollectionItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeCollectionItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19607,7 +19644,7 @@ public void TestAttribute_KnownAndRuntimeCollectionItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeDictionaryKey_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeDictionaryKey(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19617,7 +19654,7 @@ public void TestAttribute_KnownAndRuntimeDictionaryKey_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeTupleItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeTupleItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19627,7 +19664,7 @@ public void TestAttribute_KnownAndRuntimeTupleItem_Fail() [Category( "PolymorphicSerialization" )] public void TestGlobalNamespace() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new HasGlobalNamespaceType { GlobalType = new TypeInGlobalNamespace { Value = "ABC" } }; var serializer = context.GetSerializer(); @@ -19650,7 +19687,7 @@ public void TestGlobalNamespace() [Category( "PolymorphicSerialization" )] public async Task TestGlobalNamespaceAsync() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new HasGlobalNamespaceType { GlobalType = new TypeInGlobalNamespace { Value = "ABC" } }; var serializer = context.GetSerializer(); @@ -19684,7 +19721,7 @@ private static void SetUpDefaultCollectionsForPolymorphism( SerializationContext [Category( "PolymorphicSerialization" )] public void TestPolymorphismAttributesInType() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); context.GetSerializer(); context.GetSerializer(); @@ -19697,7 +19734,7 @@ public void TestPolymorphismAttributesInType() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19723,7 +19760,7 @@ public void TestKnownType_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19749,7 +19786,7 @@ public void TestKnownType_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19777,7 +19814,7 @@ public void TestKnownType_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19805,7 +19842,7 @@ public void TestKnownType_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19832,7 +19869,7 @@ public void TestKnownType_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19859,7 +19896,7 @@ public void TestKnownType_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19886,7 +19923,7 @@ public void TestRuntimeType_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19913,7 +19950,7 @@ public void TestRuntimeType_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19936,7 +19973,7 @@ public void TestRuntimeType_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19959,7 +19996,7 @@ public void TestRuntimeType_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19986,7 +20023,7 @@ public void TestRuntimeType_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20013,7 +20050,7 @@ public void TestRuntimeType_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20039,7 +20076,7 @@ public void TestKnownTypeCollection_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20065,7 +20102,7 @@ public void TestKnownTypeCollection_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20093,7 +20130,7 @@ public void TestKnownTypeCollection_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20121,7 +20158,7 @@ public void TestKnownTypeCollection_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20148,7 +20185,7 @@ public void TestKnownTypeCollection_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20175,7 +20212,7 @@ public void TestKnownTypeCollection_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20202,7 +20239,7 @@ public void TestRuntimeTypeCollection_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20229,7 +20266,7 @@ public void TestRuntimeTypeCollection_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20252,7 +20289,7 @@ public void TestRuntimeTypeCollection_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20275,7 +20312,7 @@ public void TestRuntimeTypeCollection_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20302,7 +20339,7 @@ public void TestRuntimeTypeCollection_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20329,7 +20366,7 @@ public void TestRuntimeTypeCollection_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20355,7 +20392,7 @@ public void TestKnownTypeDictionary_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20381,7 +20418,7 @@ public void TestKnownTypeDictionary_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20409,7 +20446,7 @@ public void TestKnownTypeDictionary_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20437,7 +20474,7 @@ public void TestKnownTypeDictionary_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20464,7 +20501,7 @@ public void TestKnownTypeDictionary_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20491,7 +20528,7 @@ public void TestKnownTypeDictionary_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20518,7 +20555,7 @@ public void TestRuntimeTypeDictionary_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20545,7 +20582,7 @@ public void TestRuntimeTypeDictionary_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20568,7 +20605,7 @@ public void TestRuntimeTypeDictionary_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20591,7 +20628,7 @@ public void TestRuntimeTypeDictionary_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20618,7 +20655,7 @@ public void TestRuntimeTypeDictionary_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20650,7 +20687,7 @@ public void TestRuntimeTypeDictionary_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_PublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPublicStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20669,7 +20706,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_PublicStaticMethod_OK() [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_NonPublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPrivateStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20688,7 +20725,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_NonPublicStaticMethod_O [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_PublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPublicInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20707,7 +20744,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_PublicInstanceMethod_OK [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_NonPublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPrivateInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20726,7 +20763,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_NonPublicInstanceMethod [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_PublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPublicStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20745,7 +20782,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_PublicStaticMethod_O [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPrivateStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20764,7 +20801,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicStaticMetho [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_PublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPublicInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20783,7 +20820,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_PublicInstanceMethod [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPrivateInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20802,7 +20839,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicInstanceMet [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoMethods_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierNoMethods { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20817,7 +20854,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoMethods_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseVoidReturnMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierVoidReturnMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20832,7 +20869,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseVoidReturnMethod_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoParametersMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierNoParametersMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20847,7 +20884,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoParametersMethod_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseExtraParametersMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierExtraParametersMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20862,7 +20899,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseExtraParametersMethod_Fai [Category( "PolymorphicSerialization" )] public void TestTypeVerifierDoesNotLoadTypeItself() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var serializer = context.GetSerializer(); using ( var buffer = new MemoryStream() ) diff --git a/test/MsgPack.UnitTest/Serialization/ArrayFieldBasedAutoMessagePackSerializerTest.cs b/test/MsgPack.UnitTest/Serialization/ArrayFieldBasedAutoMessagePackSerializerTest.cs index d4aa44e3d..84a9cf815 100644 --- a/test/MsgPack.UnitTest/Serialization/ArrayFieldBasedAutoMessagePackSerializerTest.cs +++ b/test/MsgPack.UnitTest/Serialization/ArrayFieldBasedAutoMessagePackSerializerTest.cs @@ -88,9 +88,15 @@ private static SerializationContext GetSerializationContext() return context; } - private static SerializationContext NewSerializationContext( PackerCompatibilityOptions compatibilityOptions ) + private static SerializationContext NewSerializationContext() + { + return NewSerializationContext( PackerCompatibilityOptions.None, DateTimeConversionMethod.Timestamp ); + } + + private static SerializationContext NewSerializationContext( PackerCompatibilityOptions compatibilityOptions, DateTimeConversionMethod dateTimeConversionMethod ) { var context = new SerializationContext( compatibilityOptions ) { SerializationMethod = SerializationMethod.Array }; + context.DefaultDateTimeConversionMethod = dateTimeConversionMethod; context.SerializerOptions.EmitterFlavor = EmitterFlavor.FieldBased; #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED context.SerializerOptions.DisablePrivilegedAccess = true; @@ -243,6 +249,34 @@ public void TestString() [Test] public void TestDateTime() + { + TestCore( + DateTime.UtcNow, + stream => MessagePackSerializer.UnpackMessagePackObject( stream ).AsTimestamp().ToDateTime(), + ( x, y ) => x.Equals( y ), + context => + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); + } + ); + } + + [Test] + public void TestDateTimeOffset() + { + TestCore( + DateTimeOffset.UtcNow, + stream => MessagePackSerializer.UnpackMessagePackObject( stream ).AsTimestamp().ToDateTimeOffset(), + ( x, y ) => x.Equals( y ), + context => + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); + } + ); + } + + [Test] + public void TestDateTimeNative() { TestCore( DateTime.Now, @@ -250,13 +284,13 @@ public void TestDateTime() ( x, y ) => x.Equals( y ), context => { - Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + context.DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native; } ); } [Test] - public void TestDateTimeOffset() + public void TestDateTimeOffsetNative() { TestCore( DateTimeOffset.Now, @@ -268,7 +302,7 @@ public void TestDateTimeOffset() ( x, y ) => x.Equals( y ), context => { - Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + context.DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native; } ); } @@ -1203,7 +1237,7 @@ public void TestEmptyBytes() [Test] public void TestEmptyBytes_Classic() { - var context = NewSerializationContext( PackerCompatibilityOptions.Classic ); + var context = NewSerializationContext( PackerCompatibilityOptions.Classic, DateTimeConversionMethod.Native ); var serializer = this.CreateTarget( context ); using ( var stream = new MemoryStream() ) { @@ -4104,7 +4138,7 @@ public void TestFullPackableUnpackable_PackToMessageAndUnpackFromMessageUsed() [Test] public void TestBinary_ClassicContext() { - var context = NewSerializationContext( PackerCompatibilityOptions.Classic ); + var context = NewSerializationContext( PackerCompatibilityOptions.Classic, DateTimeConversionMethod.Native ); var serializer = context.GetSerializer(); using ( var stream = new MemoryStream() ) @@ -4117,7 +4151,7 @@ public void TestBinary_ClassicContext() [Test] public void TestBinary_ContextWithPackerCompatilibyOptionsNone() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext( PackerCompatibilityOptions.None, DateTimeConversionMethod.Timestamp ); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -4129,8 +4163,8 @@ public void TestBinary_ContextWithPackerCompatilibyOptionsNone() [Test] public void TestExt_ClassicContext() { - var context = NewSerializationContext( SerializationContext.CreateClassicContext().CompatibilityOptions.PackerCompatibilityOptions ); - context.Serializers.Register( new CustomDateTimeSerealizer() ); + var context = NewSerializationContext( SerializationContext.CreateClassicContext().CompatibilityOptions.PackerCompatibilityOptions, SerializationContext.CreateClassicContext().DefaultDateTimeConversionMethod ); + context.Serializers.RegisterOverride( new CustomDateTimeSerealizer() ); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -4146,7 +4180,7 @@ public void TestExt_ClassicContext() [Test] public void TestExt_DefaultContext() { - var context = NewSerializationContext( SerializationContext.Default.CompatibilityOptions.PackerCompatibilityOptions ); + var context = NewSerializationContext( SerializationContext.Default.CompatibilityOptions.PackerCompatibilityOptions, SerializationContext.Default.DefaultDateTimeConversionMethod ); context.Serializers.Register( new CustomDateTimeSerealizer() ); var serializer = CreateTarget( context ); @@ -4163,7 +4197,7 @@ public void TestExt_DefaultContext() [Test] public void TestExt_ContextWithPackerCompatilibyOptionsNone() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.Serializers.Register( new CustomDateTimeSerealizer() ); context.CompatibilityOptions.PackerCompatibilityOptions = PackerCompatibilityOptions.None; var serializer = CreateTarget( context ); @@ -4181,7 +4215,7 @@ public void TestExt_ContextWithPackerCompatilibyOptionsNone() [Test] public void TestAbstractTypes_KnownCollections_Default_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -4199,7 +4233,7 @@ public void TestAbstractTypes_KnownCollections_Default_Success() [Test] public void TestAbstractTypes_KnownCollections_WithoutRegistration_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Unregister( typeof( IList<> ) ); Assert.Throws( () => DoKnownCollectionTest( context ) ); } @@ -4207,7 +4241,7 @@ public void TestAbstractTypes_KnownCollections_WithoutRegistration_Fail() [Test] public void TestAbstractTypes_KnownCollections_ExplicitRegistration_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList<> ), typeof( Collection<> ) ); var serializer = CreateTarget( context ); @@ -4226,7 +4260,7 @@ public void TestAbstractTypes_KnownCollections_ExplicitRegistration_Success() [Test] public void TestAbstractTypes_KnownCollections_ExplicitRegistrationForSpecific_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( Collection ) ); var serializer1 = CreateTarget( context ); @@ -4259,7 +4293,7 @@ public void TestAbstractTypes_KnownCollections_ExplicitRegistrationForSpecific_S [Test] public void TestAbstractTypes_NotACollection_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); Assert.Throws( () => DoKnownCollectionTest( context ) ); } @@ -4341,7 +4375,7 @@ private static void TestCollectionInterfaceCore( byte[] data, Action asser { using ( var buffer = new MemoryStream(data) ) { - var serializer = MessagePackSerializer.Get( NewSerializationContext( PackerCompatibilityOptions.None ) ); + var serializer = MessagePackSerializer.Get( NewSerializationContext() ); var result = serializer.Unpack( buffer ); assertion( result ); } @@ -7750,7 +7784,7 @@ public class ExclusionAndInclusionSimulatously [Test] public void TestGenericDerived_Value_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericValueClass { @@ -7777,7 +7811,7 @@ public void TestGenericDerived_Value_Success() [Test] public void TestGenericDerived_Reference_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericReferenceClass { @@ -7804,7 +7838,7 @@ public void TestGenericDerived_Reference_Success() [Test] public void TestGenericRecordDerived_Value_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericRecordValueClass( 1, 2 ); var serializer = context.GetSerializer(); @@ -7823,7 +7857,7 @@ public void TestGenericRecordDerived_Value_Success() [Test] public void TestGenericRecordDerived_Reference_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericRecordReferenceClass( "1", "2" ); var serializer = context.GetSerializer(); @@ -7847,7 +7881,7 @@ public void TestGenericRecordDerived_Reference_Success() [Test] public void TestNullable_Primitive_NonNull_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = DateTime.UtcNow.Millisecond; var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -7863,7 +7897,7 @@ public void TestNullable_Primitive_NonNull_Success() [Test] public void TestNullable_Primitive_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = default( int? ); var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -7879,7 +7913,7 @@ public void TestNullable_Primitive_Null_Success() [Test] public void TestNullable_Complex_NonNull_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = TimeSpan.FromSeconds( DateTime.UtcNow.Millisecond ); var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -7895,7 +7929,7 @@ public void TestNullable_Complex_NonNull_Success() [Test] public void TestNullable_Complex_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = default( TimeSpan? ); var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -7911,7 +7945,7 @@ public void TestNullable_Complex_Null_Success() [Test] public void TestNullable_Enum_NonNull_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = DayOfWeek.Monday; var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -7927,7 +7961,7 @@ public void TestNullable_Enum_NonNull_Success() [Test] public void TestNullable_Enum_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = default( DayOfWeek? ); var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -8936,11 +8970,13 @@ public void TestToFromMessagePackObject_Complex() Assert.That( asList[ 1 ].IsTypeOf().Value ); Assert.That( asList[ 1 ].AsBinary(), Is.EqualTo( target.Data ) ); - Assert.That( asList[ 2 ].IsTypeOf().Value ); - Assert.That( asList[ 2 ].AsInt64(), Is.EqualTo( target.TimeStamp.ToBinary() ) ); + Assert.That( asList[ 2 ].IsTypeOf().Value ); + var timestamp = asList[ 2 ].AsTimestamp(); + Assert.That( timestamp.ToDateTime(), Is.EqualTo( target.TimeStamp.ToUniversalTime() ) ); Assert.That( asList[ 3 ].IsDictionary ); - Assert.That( asList[ 3 ].AsDictionary().Single().Key.AsInt64(), Is.EqualTo( target.History.Single().Key.ToBinary() ) ); + var historyKey = asList[ 3 ].AsDictionary().Single().Key.AsTimestamp(); + Assert.That( historyKey.ToDateTime(), Is.EqualTo( target.History.Single().Key.ToUniversalTime() ) ); Assert.That( asList[ 3 ].AsDictionary().Single().Value.AsString(), Is.EqualTo( target.History.Single().Value ) ); Assert.That( asList[ 4 ].IsArray ); @@ -9371,7 +9407,7 @@ public void TestNoMembers_Fail() [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9397,7 +9433,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9422,7 +9458,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObjec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9448,7 +9484,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9473,7 +9509,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9499,7 +9535,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9524,7 +9560,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9550,7 +9586,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9575,7 +9611,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9601,7 +9637,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9626,7 +9662,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9652,7 +9688,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty_Suc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9677,7 +9713,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject_As [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ValueReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9703,7 +9739,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteField_Succes [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9728,7 +9764,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject_AsMpo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9754,7 +9790,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9779,7 +9815,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9805,7 +9841,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9830,7 +9866,7 @@ public void TestPolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9856,7 +9892,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConst [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9881,7 +9917,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9907,7 +9943,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9932,7 +9968,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObjec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9958,7 +9994,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9983,7 +10019,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -10009,7 +10045,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -10034,7 +10070,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -10060,7 +10096,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -10085,7 +10121,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -10111,7 +10147,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -10136,7 +10172,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10162,7 +10198,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10187,7 +10223,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_StringReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10213,7 +10249,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteField_Succe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10238,7 +10274,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject_AsMp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -10264,7 +10300,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -10289,7 +10325,7 @@ public void TestPolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstruct [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -10315,7 +10351,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropert [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -10340,7 +10376,7 @@ public void TestPolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -10366,7 +10402,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -10391,7 +10427,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructor [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10417,7 +10453,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10443,7 +10479,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10469,7 +10505,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10495,7 +10531,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10521,7 +10557,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10547,7 +10583,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10573,7 +10609,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10599,7 +10635,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10625,7 +10661,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10654,7 +10690,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10680,7 +10716,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWritePrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10706,7 +10742,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10732,7 +10768,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollect [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10758,7 +10794,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -10784,7 +10820,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10810,7 +10846,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10836,7 +10872,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10862,7 +10898,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10888,7 +10924,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -10914,7 +10950,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10940,7 +10976,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWritePrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10966,7 +11002,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10992,7 +11028,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollect [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11018,7 +11054,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11044,7 +11080,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11070,7 +11106,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11096,7 +11132,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11122,7 +11158,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11148,7 +11184,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11174,7 +11210,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11200,7 +11236,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11226,7 +11262,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -11240,7 +11276,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -11270,7 +11306,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -11287,7 +11323,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11313,7 +11349,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11339,7 +11375,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11365,7 +11401,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11391,7 +11427,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11417,7 +11453,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11443,7 +11479,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11469,7 +11505,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11495,7 +11531,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11521,7 +11557,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11547,7 +11583,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11573,7 +11609,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11599,7 +11635,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11625,7 +11661,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11651,7 +11687,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11677,7 +11713,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11703,7 +11739,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11729,7 +11765,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11755,7 +11791,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11781,7 +11817,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11807,7 +11843,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11833,7 +11869,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11859,7 +11895,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11885,7 +11921,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11911,7 +11947,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11937,7 +11973,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11963,7 +11999,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11989,7 +12025,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12015,7 +12051,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12041,7 +12077,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12067,7 +12103,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12093,7 +12129,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12119,7 +12155,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12145,7 +12181,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12171,7 +12207,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateS [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12197,7 +12233,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12223,7 +12259,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12249,7 +12285,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12275,7 +12311,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12301,7 +12337,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12327,7 +12363,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12353,7 +12389,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12379,7 +12415,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -12393,7 +12429,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -12423,7 +12459,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -12441,7 +12477,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12467,7 +12503,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12493,7 +12529,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -12519,7 +12555,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -12545,7 +12581,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -12571,7 +12607,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12597,7 +12633,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12623,7 +12659,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -12649,7 +12685,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -12675,7 +12711,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -12701,7 +12737,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12727,7 +12763,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWritePr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12753,7 +12789,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -12779,7 +12815,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -12805,7 +12841,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSett [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -12831,7 +12867,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12857,7 +12893,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12883,7 +12919,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -12909,7 +12945,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -12935,7 +12971,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -12961,7 +12997,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12987,7 +13023,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13013,7 +13049,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -13039,7 +13075,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -13065,7 +13101,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -13091,7 +13127,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13117,7 +13153,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13143,7 +13179,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13169,7 +13205,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13195,7 +13231,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13221,7 +13257,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13247,7 +13283,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13273,7 +13309,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13299,7 +13335,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13325,7 +13361,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13351,7 +13387,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13377,7 +13413,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13403,7 +13439,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13429,7 +13465,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13455,7 +13491,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13481,7 +13517,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13507,7 +13543,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13533,7 +13569,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13559,7 +13595,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13585,7 +13621,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13611,7 +13647,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13637,7 +13673,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13663,7 +13699,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -13689,7 +13725,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -13715,7 +13751,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -13741,7 +13777,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13767,7 +13803,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13793,7 +13829,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13819,7 +13855,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13845,7 +13881,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13871,7 +13907,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13897,7 +13933,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13923,7 +13959,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13949,7 +13985,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13975,7 +14011,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14008,7 +14044,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14034,7 +14070,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14059,7 +14095,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14085,7 +14121,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14110,7 +14146,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14136,7 +14172,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14161,7 +14197,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14187,7 +14223,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14212,7 +14248,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14238,7 +14274,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14263,7 +14299,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14289,7 +14325,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty_S [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14314,7 +14350,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14340,7 +14376,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField_Succ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14365,7 +14401,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject_AsM [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14391,7 +14427,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14416,7 +14452,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14442,7 +14478,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14467,7 +14503,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14493,7 +14529,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14518,7 +14554,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14544,7 +14580,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14569,7 +14605,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14595,7 +14631,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14620,7 +14656,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -14646,7 +14682,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -14671,7 +14707,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -14697,7 +14733,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -14722,7 +14758,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -14748,7 +14784,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -14773,7 +14809,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14799,7 +14835,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14824,7 +14860,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14850,7 +14886,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField_Suc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14875,7 +14911,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject_As [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -14901,7 +14937,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -14926,7 +14962,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstru [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -14952,7 +14988,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -14977,7 +15013,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -15003,7 +15039,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -15028,7 +15064,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstruct [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15054,7 +15090,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -15080,7 +15116,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15106,7 +15142,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -15132,7 +15168,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObje [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15158,7 +15194,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15184,7 +15220,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetterPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15210,7 +15246,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetter [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15236,7 +15272,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropert [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyFieldAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15262,7 +15298,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15291,7 +15327,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15317,7 +15353,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15343,7 +15379,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15369,7 +15405,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15395,7 +15431,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15421,7 +15457,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15447,7 +15483,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15473,7 +15509,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15499,7 +15535,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15525,7 +15561,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15551,7 +15587,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15577,7 +15613,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15603,7 +15639,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15629,7 +15665,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15655,7 +15691,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15681,7 +15717,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15707,7 +15743,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15733,7 +15769,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15759,7 +15795,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15785,7 +15821,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15811,7 +15847,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15837,7 +15873,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15863,7 +15899,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -15877,7 +15913,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCol [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -15907,7 +15943,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -15924,7 +15960,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15950,7 +15986,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15976,7 +16012,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16002,7 +16038,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16028,7 +16064,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16054,7 +16090,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16080,7 +16116,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16106,7 +16142,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16132,7 +16168,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16158,7 +16194,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16184,7 +16220,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16210,7 +16246,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16236,7 +16272,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16262,7 +16298,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16288,7 +16324,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16314,7 +16350,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16340,7 +16376,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16366,7 +16402,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16392,7 +16428,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16418,7 +16454,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16444,7 +16480,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16470,7 +16506,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16496,7 +16532,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16522,7 +16558,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16548,7 +16584,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16574,7 +16610,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16600,7 +16636,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16626,7 +16662,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16652,7 +16688,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemG [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16678,7 +16714,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16704,7 +16740,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16730,7 +16766,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16756,7 +16792,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16782,7 +16818,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16808,7 +16844,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16834,7 +16870,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16860,7 +16896,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16886,7 +16922,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16912,7 +16948,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16938,7 +16974,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16964,7 +17000,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16990,7 +17026,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17016,7 +17052,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -17030,7 +17066,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCol [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -17060,7 +17096,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -17078,7 +17114,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17104,7 +17140,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17130,7 +17166,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -17156,7 +17192,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -17182,7 +17218,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetter [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -17208,7 +17244,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17234,7 +17270,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17260,7 +17296,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17286,7 +17322,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17312,7 +17348,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateS [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17338,7 +17374,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17364,7 +17400,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17390,7 +17426,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -17416,7 +17452,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -17442,7 +17478,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -17468,7 +17504,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17494,7 +17530,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17520,7 +17556,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -17546,7 +17582,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -17572,7 +17608,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -17598,7 +17634,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17624,7 +17660,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17650,7 +17686,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -17676,7 +17712,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -17702,7 +17738,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -17728,7 +17764,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17754,7 +17790,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17780,7 +17816,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -17806,7 +17842,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -17832,7 +17868,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -17858,7 +17894,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17884,7 +17920,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17910,7 +17946,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17936,7 +17972,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17962,7 +17998,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPriv [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17988,7 +18024,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18014,7 +18050,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18040,7 +18076,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18066,7 +18102,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18092,7 +18128,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18118,7 +18154,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18144,7 +18180,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18170,7 +18206,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18196,7 +18232,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18222,7 +18258,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18248,7 +18284,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18274,7 +18310,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18300,7 +18336,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -18326,7 +18362,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -18352,7 +18388,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -18378,7 +18414,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18404,7 +18440,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18430,7 +18466,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18456,7 +18492,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18482,7 +18518,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPriv [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18508,7 +18544,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18534,7 +18570,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18560,7 +18596,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18586,7 +18622,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18612,7 +18648,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18640,7 +18676,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeMixed_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeMixed(); target.NormalVanilla = "ABC"; target.NormalRuntime = new FileEntry { Name = "File", Size = 1 }; @@ -18705,7 +18741,7 @@ public void TestPolymorphicMemberTypeMixed_Success() [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeMixed_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeMixed(); var serializer = context.GetSerializer(); @@ -18740,7 +18776,7 @@ public void TestPolymorphicMemberTypeMixed_Null_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberNoAttribute { Value = new FileEntry { Name = "file", Size = 1 } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -18750,7 +18786,7 @@ public void TestAbstractClassMemberNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberKnownType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -18772,7 +18808,7 @@ public void TestAbstractClassMemberKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberRuntimeType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -18794,7 +18830,7 @@ public void TestAbstractClassMemberRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemNoAttribute { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -18804,7 +18840,7 @@ public void TestAbstractClassListItemNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemKnownType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -18827,7 +18863,7 @@ public void TestAbstractClassListItemKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemRuntimeType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -18850,7 +18886,7 @@ public void TestAbstractClassListItemRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyNoAttribute { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -18860,7 +18896,7 @@ public void TestAbstractClassDictKeyNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyKnownType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -18883,7 +18919,7 @@ public void TestAbstractClassDictKeyKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyRuntimeType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -18906,7 +18942,7 @@ public void TestAbstractClassDictKeyRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberNoAttribute { Value = new FileEntry { Name = "file", Size = 1 } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -18916,7 +18952,7 @@ public void TestInterfaceMemberNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberKnownType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -18938,7 +18974,7 @@ public void TestInterfaceMemberKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberRuntimeType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -18960,7 +18996,7 @@ public void TestInterfaceMemberRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemNoAttribute { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -18970,7 +19006,7 @@ public void TestInterfaceListItemNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemKnownType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -18993,7 +19029,7 @@ public void TestInterfaceListItemKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemRuntimeType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -19016,7 +19052,7 @@ public void TestInterfaceListItemRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyNoAttribute { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19026,7 +19062,7 @@ public void TestInterfaceDictKeyNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyKnownType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -19049,7 +19085,7 @@ public void TestInterfaceDictKeyKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyRuntimeType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -19072,7 +19108,7 @@ public void TestInterfaceDictKeyRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionNoAttribute_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionNoAttribute { Value = new EchoKeyedCollection { "ABC" } }; @@ -19096,7 +19132,7 @@ public void TestAbstractClassCollectionNoAttribute_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionKnownType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19120,7 +19156,7 @@ public void TestAbstractClassCollectionKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionRuntimeType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19144,7 +19180,7 @@ public void TestAbstractClassCollectionRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionNoAttribute_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionNoAttribute { Value = new EchoKeyedCollection { "ABC" } }; @@ -19168,7 +19204,7 @@ public void TestInterfaceCollectionNoAttribute_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionKnownType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19192,7 +19228,7 @@ public void TestInterfaceCollectionKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionRuntimeType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19216,7 +19252,7 @@ public void TestInterfaceCollectionRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestTupleAbstractType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new TupleAbstractType { Value = Tuple.Create( new FileEntry { Name = "1", Size = 1 } as AbstractFileSystemEntry, new FileEntry { Name = "2", Size = 2 } as IFileSystemEntry, new FileEntry { Name = "3", Size = 3 } as AbstractFileSystemEntry, new FileEntry { Name = "4", Size = 4 } as IFileSystemEntry ) }; var serializer = context.GetSerializer(); @@ -19238,7 +19274,7 @@ public void TestTupleAbstractType_Success() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownMember_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownMember(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19247,7 +19283,7 @@ public void TestAttribute_DuplicatedKnownMember_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownCollectionItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownCollectionItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19256,7 +19292,7 @@ public void TestAttribute_DuplicatedKnownCollectionItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownDictionaryKey_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownDictionaryKey(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19266,7 +19302,7 @@ public void TestAttribute_DuplicatedKnownDictionaryKey_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownTupleItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownTupleItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19276,7 +19312,7 @@ public void TestAttribute_DuplicatedKnownTupleItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeMember_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeMember(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19285,7 +19321,7 @@ public void TestAttribute_KnownAndRuntimeMember_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeCollectionItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeCollectionItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19294,7 +19330,7 @@ public void TestAttribute_KnownAndRuntimeCollectionItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeDictionaryKey_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeDictionaryKey(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19304,7 +19340,7 @@ public void TestAttribute_KnownAndRuntimeDictionaryKey_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeTupleItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeTupleItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19314,7 +19350,7 @@ public void TestAttribute_KnownAndRuntimeTupleItem_Fail() [Category( "PolymorphicSerialization" )] public void TestGlobalNamespace() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new HasGlobalNamespaceType { GlobalType = new TypeInGlobalNamespace { Value = "ABC" } }; var serializer = context.GetSerializer(); @@ -19337,7 +19373,7 @@ public void TestGlobalNamespace() [Category( "PolymorphicSerialization" )] public async Task TestGlobalNamespaceAsync() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new HasGlobalNamespaceType { GlobalType = new TypeInGlobalNamespace { Value = "ABC" } }; var serializer = context.GetSerializer(); @@ -19371,7 +19407,7 @@ private static void SetUpDefaultCollectionsForPolymorphism( SerializationContext [Category( "PolymorphicSerialization" )] public void TestPolymorphismAttributesInType() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); context.GetSerializer(); context.GetSerializer(); @@ -19384,7 +19420,7 @@ public void TestPolymorphismAttributesInType() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19410,7 +19446,7 @@ public void TestKnownType_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19436,7 +19472,7 @@ public void TestKnownType_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19464,7 +19500,7 @@ public void TestKnownType_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19492,7 +19528,7 @@ public void TestKnownType_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19519,7 +19555,7 @@ public void TestKnownType_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19546,7 +19582,7 @@ public void TestKnownType_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19573,7 +19609,7 @@ public void TestRuntimeType_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19600,7 +19636,7 @@ public void TestRuntimeType_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19623,7 +19659,7 @@ public void TestRuntimeType_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19646,7 +19682,7 @@ public void TestRuntimeType_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19673,7 +19709,7 @@ public void TestRuntimeType_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19700,7 +19736,7 @@ public void TestRuntimeType_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19726,7 +19762,7 @@ public void TestKnownTypeCollection_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19752,7 +19788,7 @@ public void TestKnownTypeCollection_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19780,7 +19816,7 @@ public void TestKnownTypeCollection_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19808,7 +19844,7 @@ public void TestKnownTypeCollection_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19835,7 +19871,7 @@ public void TestKnownTypeCollection_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19862,7 +19898,7 @@ public void TestKnownTypeCollection_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19889,7 +19925,7 @@ public void TestRuntimeTypeCollection_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19916,7 +19952,7 @@ public void TestRuntimeTypeCollection_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19939,7 +19975,7 @@ public void TestRuntimeTypeCollection_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19962,7 +19998,7 @@ public void TestRuntimeTypeCollection_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19989,7 +20025,7 @@ public void TestRuntimeTypeCollection_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20016,7 +20052,7 @@ public void TestRuntimeTypeCollection_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20042,7 +20078,7 @@ public void TestKnownTypeDictionary_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20068,7 +20104,7 @@ public void TestKnownTypeDictionary_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20096,7 +20132,7 @@ public void TestKnownTypeDictionary_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20124,7 +20160,7 @@ public void TestKnownTypeDictionary_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20151,7 +20187,7 @@ public void TestKnownTypeDictionary_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20178,7 +20214,7 @@ public void TestKnownTypeDictionary_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20205,7 +20241,7 @@ public void TestRuntimeTypeDictionary_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20232,7 +20268,7 @@ public void TestRuntimeTypeDictionary_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20255,7 +20291,7 @@ public void TestRuntimeTypeDictionary_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20278,7 +20314,7 @@ public void TestRuntimeTypeDictionary_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20305,7 +20341,7 @@ public void TestRuntimeTypeDictionary_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20337,7 +20373,7 @@ public void TestRuntimeTypeDictionary_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_PublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPublicStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20356,7 +20392,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_PublicStaticMethod_OK() [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_NonPublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPrivateStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20375,7 +20411,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_NonPublicStaticMethod_O [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_PublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPublicInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20394,7 +20430,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_PublicInstanceMethod_OK [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_NonPublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPrivateInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20413,7 +20449,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_NonPublicInstanceMethod [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_PublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPublicStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20432,7 +20468,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_PublicStaticMethod_O [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPrivateStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20451,7 +20487,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicStaticMetho [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_PublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPublicInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20470,7 +20506,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_PublicInstanceMethod [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPrivateInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20489,7 +20525,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicInstanceMet [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoMethods_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierNoMethods { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20504,7 +20540,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoMethods_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseVoidReturnMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierVoidReturnMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20519,7 +20555,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseVoidReturnMethod_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoParametersMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierNoParametersMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20534,7 +20570,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoParametersMethod_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseExtraParametersMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierExtraParametersMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20549,7 +20585,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseExtraParametersMethod_Fai [Category( "PolymorphicSerialization" )] public void TestTypeVerifierDoesNotLoadTypeItself() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var serializer = context.GetSerializer(); using ( var buffer = new MemoryStream() ) diff --git a/test/MsgPack.UnitTest/Serialization/ArrayGenerationBasedAutoMessagePackSerializerTest.cs b/test/MsgPack.UnitTest/Serialization/ArrayGenerationBasedAutoMessagePackSerializerTest.cs index 09cbe862b..e78446e05 100644 --- a/test/MsgPack.UnitTest/Serialization/ArrayGenerationBasedAutoMessagePackSerializerTest.cs +++ b/test/MsgPack.UnitTest/Serialization/ArrayGenerationBasedAutoMessagePackSerializerTest.cs @@ -88,7 +88,12 @@ private static SerializationContext GetSerializationContext() return context; } - private static SerializationContext NewSerializationContext( PackerCompatibilityOptions compatibilityOptions ) + private static SerializationContext NewSerializationContext() + { + return NewSerializationContext( PackerCompatibilityOptions.None, DateTimeConversionMethod.Timestamp ); + } + + private static SerializationContext NewSerializationContext( PackerCompatibilityOptions compatibilityOptions, DateTimeConversionMethod dateTimeConversionMethod ) { var context = PreGeneratedSerializerActivator.CreateContext( SerializationMethod.Array, compatibilityOptions ); // Register serializers for abstract class testing @@ -170,6 +175,34 @@ public void TestString() [Test] public void TestDateTime() + { + TestCore( + DateTime.UtcNow, + stream => MessagePackSerializer.UnpackMessagePackObject( stream ).AsTimestamp().ToDateTime(), + ( x, y ) => x.Equals( y ), + context => + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); + } + ); + } + + [Test] + public void TestDateTimeOffset() + { + TestCore( + DateTimeOffset.UtcNow, + stream => MessagePackSerializer.UnpackMessagePackObject( stream ).AsTimestamp().ToDateTimeOffset(), + ( x, y ) => x.Equals( y ), + context => + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); + } + ); + } + + [Test] + public void TestDateTimeNative() { TestCore( DateTime.Now, @@ -177,13 +210,13 @@ public void TestDateTime() ( x, y ) => x.Equals( y ), context => { - Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + context.DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native; } ); } [Test] - public void TestDateTimeOffset() + public void TestDateTimeOffsetNative() { TestCore( DateTimeOffset.Now, @@ -195,7 +228,7 @@ public void TestDateTimeOffset() ( x, y ) => x.Equals( y ), context => { - Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + context.DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native; } ); } @@ -541,7 +574,7 @@ public void TestEmptyBytes() [Test] public void TestEmptyBytes_Classic() { - var context = NewSerializationContext( PackerCompatibilityOptions.Classic ); + var context = NewSerializationContext( PackerCompatibilityOptions.Classic, DateTimeConversionMethod.Native ); var serializer = this.CreateTarget( context ); using ( var stream = new MemoryStream() ) { @@ -978,8 +1011,8 @@ public void TestIDictionaryValueType_Success() [Test] public void TestExt_ClassicContext() { - var context = NewSerializationContext( SerializationContext.CreateClassicContext().CompatibilityOptions.PackerCompatibilityOptions ); - context.Serializers.Register( new CustomDateTimeSerealizer() ); + var context = NewSerializationContext( SerializationContext.CreateClassicContext().CompatibilityOptions.PackerCompatibilityOptions, SerializationContext.CreateClassicContext().DefaultDateTimeConversionMethod ); + context.Serializers.RegisterOverride( new CustomDateTimeSerealizer() ); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -995,7 +1028,7 @@ public void TestExt_ClassicContext() [Test] public void TestExt_DefaultContext() { - var context = NewSerializationContext( SerializationContext.Default.CompatibilityOptions.PackerCompatibilityOptions ); + var context = NewSerializationContext( SerializationContext.Default.CompatibilityOptions.PackerCompatibilityOptions, SerializationContext.Default.DefaultDateTimeConversionMethod ); context.Serializers.Register( new CustomDateTimeSerealizer() ); var serializer = CreateTarget( context ); @@ -1012,7 +1045,7 @@ public void TestExt_DefaultContext() [Test] public void TestExt_ContextWithPackerCompatilibyOptionsNone() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.Serializers.Register( new CustomDateTimeSerealizer() ); context.CompatibilityOptions.PackerCompatibilityOptions = PackerCompatibilityOptions.None; var serializer = CreateTarget( context ); @@ -1030,7 +1063,7 @@ public void TestExt_ContextWithPackerCompatilibyOptionsNone() [Test] public void TestAbstractTypes_KnownCollections_Default_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -1048,7 +1081,7 @@ public void TestAbstractTypes_KnownCollections_Default_Success() [Test] public void TestAbstractTypes_KnownCollections_WithoutRegistration_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Unregister( typeof( IList<> ) ); Assert.Throws( () => DoKnownCollectionTest( context ) ); } @@ -1056,7 +1089,7 @@ public void TestAbstractTypes_KnownCollections_WithoutRegistration_Fail() [Test] public void TestAbstractTypes_KnownCollections_ExplicitRegistration_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList<> ), typeof( Collection<> ) ); var serializer = CreateTarget( context ); @@ -1075,7 +1108,7 @@ public void TestAbstractTypes_KnownCollections_ExplicitRegistration_Success() [Test] public void TestAbstractTypes_KnownCollections_ExplicitRegistrationForSpecific_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( Collection ) ); var serializer1 = CreateTarget( context ); @@ -1108,7 +1141,7 @@ public void TestAbstractTypes_KnownCollections_ExplicitRegistrationForSpecific_S [Test] public void TestAbstractTypes_NotACollection_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); Assert.Throws( () => DoKnownCollectionTest( context ) ); } @@ -1190,7 +1223,7 @@ private static void TestCollectionInterfaceCore( byte[] data, Action asser { using ( var buffer = new MemoryStream(data) ) { - var serializer = MessagePackSerializer.Get( NewSerializationContext( PackerCompatibilityOptions.None ) ); + var serializer = MessagePackSerializer.Get( NewSerializationContext() ); var result = serializer.Unpack( buffer ); assertion( result ); } @@ -5451,11 +5484,13 @@ public void TestToFromMessagePackObject_Complex() Assert.That( asList[ 1 ].IsTypeOf().Value ); Assert.That( asList[ 1 ].AsBinary(), Is.EqualTo( target.Data ) ); - Assert.That( asList[ 2 ].IsTypeOf().Value ); - Assert.That( asList[ 2 ].AsInt64(), Is.EqualTo( target.TimeStamp.ToBinary() ) ); + Assert.That( asList[ 2 ].IsTypeOf().Value ); + var timestamp = asList[ 2 ].AsTimestamp(); + Assert.That( timestamp.ToDateTime(), Is.EqualTo( target.TimeStamp.ToUniversalTime() ) ); Assert.That( asList[ 3 ].IsDictionary ); - Assert.That( asList[ 3 ].AsDictionary().Single().Key.AsInt64(), Is.EqualTo( target.History.Single().Key.ToBinary() ) ); + var historyKey = asList[ 3 ].AsDictionary().Single().Key.AsTimestamp(); + Assert.That( historyKey.ToDateTime(), Is.EqualTo( target.History.Single().Key.ToUniversalTime() ) ); Assert.That( asList[ 3 ].AsDictionary().Single().Value.AsString(), Is.EqualTo( target.History.Single().Value ) ); Assert.That( asList[ 4 ].IsArray ); @@ -5886,7 +5921,7 @@ public void TestNoMembers_Fail() [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -5912,7 +5947,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -5937,7 +5972,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObjec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -5963,7 +5998,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -5988,7 +6023,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -6014,7 +6049,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -6039,7 +6074,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -6065,7 +6100,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -6090,7 +6125,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -6116,7 +6151,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -6141,7 +6176,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -6167,7 +6202,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty_Suc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -6192,7 +6227,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject_As [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ValueReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -6218,7 +6253,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteField_Succes [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -6243,7 +6278,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject_AsMpo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -6269,7 +6304,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -6294,7 +6329,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -6320,7 +6355,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -6345,7 +6380,7 @@ public void TestPolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -6371,7 +6406,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConst [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -6396,7 +6431,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -6422,7 +6457,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -6447,7 +6482,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObjec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -6473,7 +6508,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -6498,7 +6533,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -6524,7 +6559,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -6549,7 +6584,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -6575,7 +6610,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -6600,7 +6635,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -6626,7 +6661,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -6651,7 +6686,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -6677,7 +6712,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -6702,7 +6737,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_StringReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -6728,7 +6763,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteField_Succe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -6753,7 +6788,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject_AsMp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -6779,7 +6814,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -6804,7 +6839,7 @@ public void TestPolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstruct [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -6830,7 +6865,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropert [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -6855,7 +6890,7 @@ public void TestPolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -6881,7 +6916,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -6906,7 +6941,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructor [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -6932,7 +6967,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -6958,7 +6993,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -6984,7 +7019,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -7010,7 +7045,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -7036,7 +7071,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -7062,7 +7097,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -7088,7 +7123,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -7114,7 +7149,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -7140,7 +7175,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -7169,7 +7204,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7195,7 +7230,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWritePrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -7221,7 +7256,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7247,7 +7282,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollect [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7273,7 +7308,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -7299,7 +7334,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7325,7 +7360,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -7351,7 +7386,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7377,7 +7412,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7403,7 +7438,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -7429,7 +7464,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7455,7 +7490,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWritePrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -7481,7 +7516,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7507,7 +7542,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollect [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7533,7 +7568,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -7559,7 +7594,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7585,7 +7620,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -7611,7 +7646,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7637,7 +7672,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7663,7 +7698,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -7689,7 +7724,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7715,7 +7750,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -7741,7 +7776,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -7755,7 +7790,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -7785,7 +7820,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -7802,7 +7837,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7828,7 +7863,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -7854,7 +7889,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7880,7 +7915,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7906,7 +7941,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -7932,7 +7967,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7958,7 +7993,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -7984,7 +8019,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8010,7 +8045,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8036,7 +8071,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -8062,7 +8097,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8088,7 +8123,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -8114,7 +8149,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8140,7 +8175,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8166,7 +8201,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -8192,7 +8227,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8218,7 +8253,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -8244,7 +8279,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8270,7 +8305,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8296,7 +8331,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -8322,7 +8357,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8348,7 +8383,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -8374,7 +8409,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8400,7 +8435,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8426,7 +8461,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -8452,7 +8487,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8478,7 +8513,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -8504,7 +8539,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8530,7 +8565,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8556,7 +8591,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -8582,7 +8617,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8608,7 +8643,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -8634,7 +8669,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8660,7 +8695,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8686,7 +8721,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateS [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -8712,7 +8747,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8738,7 +8773,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -8764,7 +8799,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8790,7 +8825,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8816,7 +8851,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -8842,7 +8877,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8868,7 +8903,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -8894,7 +8929,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -8908,7 +8943,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -8938,7 +8973,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -8956,7 +8991,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8982,7 +9017,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9008,7 +9043,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -9034,7 +9069,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -9060,7 +9095,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -9086,7 +9121,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9112,7 +9147,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9138,7 +9173,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -9164,7 +9199,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -9190,7 +9225,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -9216,7 +9251,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9242,7 +9277,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWritePr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9268,7 +9303,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -9294,7 +9329,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -9320,7 +9355,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSett [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -9346,7 +9381,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9372,7 +9407,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9398,7 +9433,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -9424,7 +9459,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -9450,7 +9485,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -9476,7 +9511,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9502,7 +9537,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9528,7 +9563,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -9554,7 +9589,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -9580,7 +9615,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -9606,7 +9641,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9632,7 +9667,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9658,7 +9693,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -9684,7 +9719,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -9710,7 +9745,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -9736,7 +9771,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9762,7 +9797,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9788,7 +9823,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -9814,7 +9849,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -9840,7 +9875,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -9866,7 +9901,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9892,7 +9927,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9918,7 +9953,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -9944,7 +9979,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -9970,7 +10005,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -9996,7 +10031,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10022,7 +10057,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10048,7 +10083,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -10074,7 +10109,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -10100,7 +10135,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -10126,7 +10161,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10152,7 +10187,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10178,7 +10213,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -10204,7 +10239,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -10230,7 +10265,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -10256,7 +10291,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10282,7 +10317,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10308,7 +10343,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -10334,7 +10369,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -10360,7 +10395,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -10386,7 +10421,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10412,7 +10447,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10438,7 +10473,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -10464,7 +10499,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -10490,7 +10525,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -10523,7 +10558,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10549,7 +10584,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10574,7 +10609,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10600,7 +10635,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10625,7 +10660,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -10651,7 +10686,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -10676,7 +10711,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -10702,7 +10737,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -10727,7 +10762,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -10753,7 +10788,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -10778,7 +10813,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10804,7 +10839,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty_S [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10829,7 +10864,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10855,7 +10890,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField_Succ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10880,7 +10915,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject_AsM [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10906,7 +10941,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10931,7 +10966,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10957,7 +10992,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10982,7 +11017,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -11008,7 +11043,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -11033,7 +11068,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11059,7 +11094,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -11084,7 +11119,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11110,7 +11145,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -11135,7 +11170,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -11161,7 +11196,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -11186,7 +11221,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -11212,7 +11247,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -11237,7 +11272,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -11263,7 +11298,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -11288,7 +11323,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11314,7 +11349,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -11339,7 +11374,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11365,7 +11400,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField_Suc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -11390,7 +11425,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject_As [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -11416,7 +11451,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -11441,7 +11476,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstru [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -11467,7 +11502,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -11492,7 +11527,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -11518,7 +11553,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -11543,7 +11578,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstruct [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11569,7 +11604,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -11595,7 +11630,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11621,7 +11656,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -11647,7 +11682,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObje [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -11673,7 +11708,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -11699,7 +11734,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetterPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -11725,7 +11760,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetter [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -11751,7 +11786,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropert [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyFieldAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -11777,7 +11812,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -11806,7 +11841,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11832,7 +11867,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11858,7 +11893,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11884,7 +11919,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11910,7 +11945,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11936,7 +11971,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11962,7 +11997,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11988,7 +12023,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12014,7 +12049,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12040,7 +12075,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12066,7 +12101,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12092,7 +12127,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12118,7 +12153,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12144,7 +12179,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12170,7 +12205,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12196,7 +12231,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12222,7 +12257,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12248,7 +12283,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12274,7 +12309,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12300,7 +12335,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12326,7 +12361,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12352,7 +12387,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12378,7 +12413,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -12392,7 +12427,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCol [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -12422,7 +12457,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -12439,7 +12474,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12465,7 +12500,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12491,7 +12526,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12517,7 +12552,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12543,7 +12578,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12569,7 +12604,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12595,7 +12630,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12621,7 +12656,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12647,7 +12682,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12673,7 +12708,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12699,7 +12734,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12725,7 +12760,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12751,7 +12786,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12777,7 +12812,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12803,7 +12838,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12829,7 +12864,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12855,7 +12890,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12881,7 +12916,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12907,7 +12942,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12933,7 +12968,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12959,7 +12994,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12985,7 +13020,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13011,7 +13046,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13037,7 +13072,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13063,7 +13098,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -13089,7 +13124,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13115,7 +13150,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13141,7 +13176,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13167,7 +13202,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemG [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13193,7 +13228,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -13219,7 +13254,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13245,7 +13280,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13271,7 +13306,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13297,7 +13332,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13323,7 +13358,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -13349,7 +13384,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13375,7 +13410,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13401,7 +13436,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13427,7 +13462,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13453,7 +13488,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -13479,7 +13514,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13505,7 +13540,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13531,7 +13566,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -13545,7 +13580,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCol [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -13575,7 +13610,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -13593,7 +13628,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13619,7 +13654,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13645,7 +13680,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -13671,7 +13706,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -13697,7 +13732,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetter [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -13723,7 +13758,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13749,7 +13784,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13775,7 +13810,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13801,7 +13836,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13827,7 +13862,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateS [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13853,7 +13888,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13879,7 +13914,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13905,7 +13940,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -13931,7 +13966,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -13957,7 +13992,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -13983,7 +14018,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14009,7 +14044,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14035,7 +14070,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -14061,7 +14096,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -14087,7 +14122,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -14113,7 +14148,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14139,7 +14174,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14165,7 +14200,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -14191,7 +14226,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -14217,7 +14252,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -14243,7 +14278,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14269,7 +14304,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14295,7 +14330,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -14321,7 +14356,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -14347,7 +14382,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -14373,7 +14408,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14399,7 +14434,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14425,7 +14460,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14451,7 +14486,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14477,7 +14512,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPriv [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14503,7 +14538,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14529,7 +14564,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14555,7 +14590,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -14581,7 +14616,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -14607,7 +14642,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -14633,7 +14668,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14659,7 +14694,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14685,7 +14720,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14711,7 +14746,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14737,7 +14772,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14763,7 +14798,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14789,7 +14824,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14815,7 +14850,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -14841,7 +14876,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -14867,7 +14902,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -14893,7 +14928,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14919,7 +14954,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14945,7 +14980,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14971,7 +15006,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14997,7 +15032,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPriv [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -15023,7 +15058,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15049,7 +15084,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15075,7 +15110,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -15101,7 +15136,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -15127,7 +15162,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -15155,7 +15190,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeMixed_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeMixed(); target.NormalVanilla = "ABC"; target.NormalRuntime = new FileEntry { Name = "File", Size = 1 }; @@ -15220,7 +15255,7 @@ public void TestPolymorphicMemberTypeMixed_Success() [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeMixed_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeMixed(); var serializer = context.GetSerializer(); @@ -15255,7 +15290,7 @@ public void TestPolymorphicMemberTypeMixed_Null_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberNoAttribute { Value = new FileEntry { Name = "file", Size = 1 } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -15265,7 +15300,7 @@ public void TestAbstractClassMemberNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberKnownType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -15287,7 +15322,7 @@ public void TestAbstractClassMemberKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberRuntimeType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -15309,7 +15344,7 @@ public void TestAbstractClassMemberRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemNoAttribute { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -15319,7 +15354,7 @@ public void TestAbstractClassListItemNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemKnownType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -15342,7 +15377,7 @@ public void TestAbstractClassListItemKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemRuntimeType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -15365,7 +15400,7 @@ public void TestAbstractClassListItemRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyNoAttribute { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -15375,7 +15410,7 @@ public void TestAbstractClassDictKeyNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyKnownType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -15398,7 +15433,7 @@ public void TestAbstractClassDictKeyKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyRuntimeType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -15421,7 +15456,7 @@ public void TestAbstractClassDictKeyRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberNoAttribute { Value = new FileEntry { Name = "file", Size = 1 } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -15431,7 +15466,7 @@ public void TestInterfaceMemberNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberKnownType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -15453,7 +15488,7 @@ public void TestInterfaceMemberKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberRuntimeType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -15475,7 +15510,7 @@ public void TestInterfaceMemberRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemNoAttribute { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -15485,7 +15520,7 @@ public void TestInterfaceListItemNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemKnownType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -15508,7 +15543,7 @@ public void TestInterfaceListItemKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemRuntimeType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -15531,7 +15566,7 @@ public void TestInterfaceListItemRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyNoAttribute { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -15541,7 +15576,7 @@ public void TestInterfaceDictKeyNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyKnownType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -15564,7 +15599,7 @@ public void TestInterfaceDictKeyKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyRuntimeType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -15587,7 +15622,7 @@ public void TestInterfaceDictKeyRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionNoAttribute_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionNoAttribute { Value = new EchoKeyedCollection { "ABC" } }; @@ -15611,7 +15646,7 @@ public void TestAbstractClassCollectionNoAttribute_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionKnownType { Value = new EchoKeyedCollection { "ABC" } }; @@ -15635,7 +15670,7 @@ public void TestAbstractClassCollectionKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionRuntimeType { Value = new EchoKeyedCollection { "ABC" } }; @@ -15659,7 +15694,7 @@ public void TestAbstractClassCollectionRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionNoAttribute_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionNoAttribute { Value = new EchoKeyedCollection { "ABC" } }; @@ -15683,7 +15718,7 @@ public void TestInterfaceCollectionNoAttribute_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionKnownType { Value = new EchoKeyedCollection { "ABC" } }; @@ -15707,7 +15742,7 @@ public void TestInterfaceCollectionKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionRuntimeType { Value = new EchoKeyedCollection { "ABC" } }; @@ -15731,7 +15766,7 @@ public void TestInterfaceCollectionRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestTupleAbstractType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new TupleAbstractType { Value = Tuple.Create( new FileEntry { Name = "1", Size = 1 } as AbstractFileSystemEntry, new FileEntry { Name = "2", Size = 2 } as IFileSystemEntry, new FileEntry { Name = "3", Size = 3 } as AbstractFileSystemEntry, new FileEntry { Name = "4", Size = 4 } as IFileSystemEntry ) }; var serializer = context.GetSerializer(); @@ -15753,7 +15788,7 @@ public void TestTupleAbstractType_Success() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownMember_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownMember(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -15762,7 +15797,7 @@ public void TestAttribute_DuplicatedKnownMember_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownCollectionItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownCollectionItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -15771,7 +15806,7 @@ public void TestAttribute_DuplicatedKnownCollectionItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownDictionaryKey_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownDictionaryKey(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -15781,7 +15816,7 @@ public void TestAttribute_DuplicatedKnownDictionaryKey_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownTupleItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownTupleItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -15791,7 +15826,7 @@ public void TestAttribute_DuplicatedKnownTupleItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeMember_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeMember(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -15800,7 +15835,7 @@ public void TestAttribute_KnownAndRuntimeMember_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeCollectionItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeCollectionItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -15809,7 +15844,7 @@ public void TestAttribute_KnownAndRuntimeCollectionItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeDictionaryKey_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeDictionaryKey(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -15819,7 +15854,7 @@ public void TestAttribute_KnownAndRuntimeDictionaryKey_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeTupleItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeTupleItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -15829,7 +15864,7 @@ public void TestAttribute_KnownAndRuntimeTupleItem_Fail() [Category( "PolymorphicSerialization" )] public void TestGlobalNamespace() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new HasGlobalNamespaceType { GlobalType = new TypeInGlobalNamespace { Value = "ABC" } }; var serializer = context.GetSerializer(); @@ -15852,7 +15887,7 @@ public void TestGlobalNamespace() [Category( "PolymorphicSerialization" )] public async Task TestGlobalNamespaceAsync() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new HasGlobalNamespaceType { GlobalType = new TypeInGlobalNamespace { Value = "ABC" } }; var serializer = context.GetSerializer(); @@ -15886,7 +15921,7 @@ private static void SetUpDefaultCollectionsForPolymorphism( SerializationContext [Category( "PolymorphicSerialization" )] public void TestPolymorphismAttributesInType() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); context.GetSerializer(); context.GetSerializer(); @@ -15899,7 +15934,7 @@ public void TestPolymorphismAttributesInType() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -15925,7 +15960,7 @@ public void TestKnownType_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -15951,7 +15986,7 @@ public void TestKnownType_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -15979,7 +16014,7 @@ public void TestKnownType_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16007,7 +16042,7 @@ public void TestKnownType_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16034,7 +16069,7 @@ public void TestKnownType_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16061,7 +16096,7 @@ public void TestKnownType_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16088,7 +16123,7 @@ public void TestRuntimeType_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16115,7 +16150,7 @@ public void TestRuntimeType_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16138,7 +16173,7 @@ public void TestRuntimeType_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16161,7 +16196,7 @@ public void TestRuntimeType_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16188,7 +16223,7 @@ public void TestRuntimeType_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16215,7 +16250,7 @@ public void TestRuntimeType_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16241,7 +16276,7 @@ public void TestKnownTypeCollection_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16267,7 +16302,7 @@ public void TestKnownTypeCollection_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16295,7 +16330,7 @@ public void TestKnownTypeCollection_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16323,7 +16358,7 @@ public void TestKnownTypeCollection_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16350,7 +16385,7 @@ public void TestKnownTypeCollection_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16377,7 +16412,7 @@ public void TestKnownTypeCollection_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16404,7 +16439,7 @@ public void TestRuntimeTypeCollection_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16431,7 +16466,7 @@ public void TestRuntimeTypeCollection_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16454,7 +16489,7 @@ public void TestRuntimeTypeCollection_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16477,7 +16512,7 @@ public void TestRuntimeTypeCollection_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16504,7 +16539,7 @@ public void TestRuntimeTypeCollection_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16531,7 +16566,7 @@ public void TestRuntimeTypeCollection_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16557,7 +16592,7 @@ public void TestKnownTypeDictionary_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16583,7 +16618,7 @@ public void TestKnownTypeDictionary_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16611,7 +16646,7 @@ public void TestKnownTypeDictionary_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16639,7 +16674,7 @@ public void TestKnownTypeDictionary_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16666,7 +16701,7 @@ public void TestKnownTypeDictionary_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16693,7 +16728,7 @@ public void TestKnownTypeDictionary_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16720,7 +16755,7 @@ public void TestRuntimeTypeDictionary_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16747,7 +16782,7 @@ public void TestRuntimeTypeDictionary_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16770,7 +16805,7 @@ public void TestRuntimeTypeDictionary_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16793,7 +16828,7 @@ public void TestRuntimeTypeDictionary_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16820,7 +16855,7 @@ public void TestRuntimeTypeDictionary_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16852,7 +16887,7 @@ public void TestRuntimeTypeDictionary_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_PublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPublicStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -16871,7 +16906,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_PublicStaticMethod_OK() [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_NonPublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPrivateStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -16890,7 +16925,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_NonPublicStaticMethod_O [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_PublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPublicInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -16909,7 +16944,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_PublicInstanceMethod_OK [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_NonPublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPrivateInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -16928,7 +16963,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_NonPublicInstanceMethod [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_PublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPublicStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -16947,7 +16982,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_PublicStaticMethod_O [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPrivateStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -16966,7 +17001,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicStaticMetho [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_PublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPublicInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -16985,7 +17020,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_PublicInstanceMethod [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPrivateInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -17004,7 +17039,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicInstanceMet [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoMethods_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierNoMethods { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -17019,7 +17054,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoMethods_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseVoidReturnMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierVoidReturnMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -17034,7 +17069,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseVoidReturnMethod_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoParametersMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierNoParametersMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -17049,7 +17084,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoParametersMethod_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseExtraParametersMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierExtraParametersMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -17064,7 +17099,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseExtraParametersMethod_Fai [Category( "PolymorphicSerialization" )] public void TestTypeVerifierDoesNotLoadTypeItself() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var serializer = context.GetSerializer(); using ( var buffer = new MemoryStream() ) diff --git a/test/MsgPack.UnitTest/Serialization/ArrayReflectionBasedAutoMessagePackSerializerTest.cs b/test/MsgPack.UnitTest/Serialization/ArrayReflectionBasedAutoMessagePackSerializerTest.cs index ba0495ab7..5c9dcbd8f 100644 --- a/test/MsgPack.UnitTest/Serialization/ArrayReflectionBasedAutoMessagePackSerializerTest.cs +++ b/test/MsgPack.UnitTest/Serialization/ArrayReflectionBasedAutoMessagePackSerializerTest.cs @@ -88,9 +88,15 @@ private static SerializationContext GetSerializationContext() return context; } - private static SerializationContext NewSerializationContext( PackerCompatibilityOptions compatibilityOptions ) + private static SerializationContext NewSerializationContext() + { + return NewSerializationContext( PackerCompatibilityOptions.None, DateTimeConversionMethod.Timestamp ); + } + + private static SerializationContext NewSerializationContext( PackerCompatibilityOptions compatibilityOptions, DateTimeConversionMethod dateTimeConversionMethod ) { var context = new SerializationContext( compatibilityOptions ) { SerializationMethod = SerializationMethod.Array }; + context.DefaultDateTimeConversionMethod = dateTimeConversionMethod; context.SerializerOptions.EmitterFlavor = EmitterFlavor.ReflectionBased; #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED context.SerializerOptions.DisablePrivilegedAccess = true; @@ -243,6 +249,34 @@ public void TestString() [Test] public void TestDateTime() + { + TestCore( + DateTime.UtcNow, + stream => MessagePackSerializer.UnpackMessagePackObject( stream ).AsTimestamp().ToDateTime(), + ( x, y ) => x.Equals( y ), + context => + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); + } + ); + } + + [Test] + public void TestDateTimeOffset() + { + TestCore( + DateTimeOffset.UtcNow, + stream => MessagePackSerializer.UnpackMessagePackObject( stream ).AsTimestamp().ToDateTimeOffset(), + ( x, y ) => x.Equals( y ), + context => + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); + } + ); + } + + [Test] + public void TestDateTimeNative() { TestCore( DateTime.Now, @@ -250,13 +284,13 @@ public void TestDateTime() ( x, y ) => x.Equals( y ), context => { - Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + context.DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native; } ); } [Test] - public void TestDateTimeOffset() + public void TestDateTimeOffsetNative() { TestCore( DateTimeOffset.Now, @@ -268,7 +302,7 @@ public void TestDateTimeOffset() ( x, y ) => x.Equals( y ), context => { - Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + context.DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native; } ); } @@ -1203,7 +1237,7 @@ public void TestEmptyBytes() [Test] public void TestEmptyBytes_Classic() { - var context = NewSerializationContext( PackerCompatibilityOptions.Classic ); + var context = NewSerializationContext( PackerCompatibilityOptions.Classic, DateTimeConversionMethod.Native ); var serializer = this.CreateTarget( context ); using ( var stream = new MemoryStream() ) { @@ -4104,7 +4138,7 @@ public void TestFullPackableUnpackable_PackToMessageAndUnpackFromMessageUsed() [Test] public void TestBinary_ClassicContext() { - var context = NewSerializationContext( PackerCompatibilityOptions.Classic ); + var context = NewSerializationContext( PackerCompatibilityOptions.Classic, DateTimeConversionMethod.Native ); var serializer = context.GetSerializer(); using ( var stream = new MemoryStream() ) @@ -4117,7 +4151,7 @@ public void TestBinary_ClassicContext() [Test] public void TestBinary_ContextWithPackerCompatilibyOptionsNone() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext( PackerCompatibilityOptions.None, DateTimeConversionMethod.Timestamp ); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -4129,8 +4163,8 @@ public void TestBinary_ContextWithPackerCompatilibyOptionsNone() [Test] public void TestExt_ClassicContext() { - var context = NewSerializationContext( SerializationContext.CreateClassicContext().CompatibilityOptions.PackerCompatibilityOptions ); - context.Serializers.Register( new CustomDateTimeSerealizer() ); + var context = NewSerializationContext( SerializationContext.CreateClassicContext().CompatibilityOptions.PackerCompatibilityOptions, SerializationContext.CreateClassicContext().DefaultDateTimeConversionMethod ); + context.Serializers.RegisterOverride( new CustomDateTimeSerealizer() ); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -4146,7 +4180,7 @@ public void TestExt_ClassicContext() [Test] public void TestExt_DefaultContext() { - var context = NewSerializationContext( SerializationContext.Default.CompatibilityOptions.PackerCompatibilityOptions ); + var context = NewSerializationContext( SerializationContext.Default.CompatibilityOptions.PackerCompatibilityOptions, SerializationContext.Default.DefaultDateTimeConversionMethod ); context.Serializers.Register( new CustomDateTimeSerealizer() ); var serializer = CreateTarget( context ); @@ -4163,7 +4197,7 @@ public void TestExt_DefaultContext() [Test] public void TestExt_ContextWithPackerCompatilibyOptionsNone() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.Serializers.Register( new CustomDateTimeSerealizer() ); context.CompatibilityOptions.PackerCompatibilityOptions = PackerCompatibilityOptions.None; var serializer = CreateTarget( context ); @@ -4181,7 +4215,7 @@ public void TestExt_ContextWithPackerCompatilibyOptionsNone() [Test] public void TestAbstractTypes_KnownCollections_Default_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -4199,7 +4233,7 @@ public void TestAbstractTypes_KnownCollections_Default_Success() [Test] public void TestAbstractTypes_KnownCollections_WithoutRegistration_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Unregister( typeof( IList<> ) ); Assert.Throws( () => DoKnownCollectionTest( context ) ); } @@ -4207,7 +4241,7 @@ public void TestAbstractTypes_KnownCollections_WithoutRegistration_Fail() [Test] public void TestAbstractTypes_KnownCollections_ExplicitRegistration_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList<> ), typeof( Collection<> ) ); var serializer = CreateTarget( context ); @@ -4226,7 +4260,7 @@ public void TestAbstractTypes_KnownCollections_ExplicitRegistration_Success() [Test] public void TestAbstractTypes_KnownCollections_ExplicitRegistrationForSpecific_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( Collection ) ); var serializer1 = CreateTarget( context ); @@ -4259,7 +4293,7 @@ public void TestAbstractTypes_KnownCollections_ExplicitRegistrationForSpecific_S [Test] public void TestAbstractTypes_NotACollection_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); Assert.Throws( () => DoKnownCollectionTest( context ) ); } @@ -4341,7 +4375,7 @@ private static void TestCollectionInterfaceCore( byte[] data, Action asser { using ( var buffer = new MemoryStream(data) ) { - var serializer = MessagePackSerializer.Get( NewSerializationContext( PackerCompatibilityOptions.None ) ); + var serializer = MessagePackSerializer.Get( NewSerializationContext() ); var result = serializer.Unpack( buffer ); assertion( result ); } @@ -7750,7 +7784,7 @@ public class ExclusionAndInclusionSimulatously [Test] public void TestGenericDerived_Value_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericValueClass { @@ -7777,7 +7811,7 @@ public void TestGenericDerived_Value_Success() [Test] public void TestGenericDerived_Reference_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericReferenceClass { @@ -7804,7 +7838,7 @@ public void TestGenericDerived_Reference_Success() [Test] public void TestGenericRecordDerived_Value_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericRecordValueClass( 1, 2 ); var serializer = context.GetSerializer(); @@ -7823,7 +7857,7 @@ public void TestGenericRecordDerived_Value_Success() [Test] public void TestGenericRecordDerived_Reference_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericRecordReferenceClass( "1", "2" ); var serializer = context.GetSerializer(); @@ -8837,11 +8871,13 @@ public void TestToFromMessagePackObject_Complex() Assert.That( asList[ 1 ].IsTypeOf().Value ); Assert.That( asList[ 1 ].AsBinary(), Is.EqualTo( target.Data ) ); - Assert.That( asList[ 2 ].IsTypeOf().Value ); - Assert.That( asList[ 2 ].AsInt64(), Is.EqualTo( target.TimeStamp.ToBinary() ) ); + Assert.That( asList[ 2 ].IsTypeOf().Value ); + var timestamp = asList[ 2 ].AsTimestamp(); + Assert.That( timestamp.ToDateTime(), Is.EqualTo( target.TimeStamp.ToUniversalTime() ) ); Assert.That( asList[ 3 ].IsDictionary ); - Assert.That( asList[ 3 ].AsDictionary().Single().Key.AsInt64(), Is.EqualTo( target.History.Single().Key.ToBinary() ) ); + var historyKey = asList[ 3 ].AsDictionary().Single().Key.AsTimestamp(); + Assert.That( historyKey.ToDateTime(), Is.EqualTo( target.History.Single().Key.ToUniversalTime() ) ); Assert.That( asList[ 3 ].AsDictionary().Single().Value.AsString(), Is.EqualTo( target.History.Single().Value ) ); Assert.That( asList[ 4 ].IsArray ); @@ -9272,7 +9308,7 @@ public void TestNoMembers_Fail() [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9298,7 +9334,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9323,7 +9359,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObjec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9349,7 +9385,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9374,7 +9410,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9400,7 +9436,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9425,7 +9461,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9451,7 +9487,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9476,7 +9512,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9502,7 +9538,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9527,7 +9563,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9553,7 +9589,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty_Suc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9578,7 +9614,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject_As [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ValueReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9604,7 +9640,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteField_Succes [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9629,7 +9665,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject_AsMpo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9655,7 +9691,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9680,7 +9716,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9706,7 +9742,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9731,7 +9767,7 @@ public void TestPolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9757,7 +9793,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConst [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9782,7 +9818,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9808,7 +9844,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9833,7 +9869,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObjec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9859,7 +9895,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9884,7 +9920,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -9910,7 +9946,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -9935,7 +9971,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -9961,7 +9997,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -9986,7 +10022,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -10012,7 +10048,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -10037,7 +10073,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10063,7 +10099,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10088,7 +10124,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_StringReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10114,7 +10150,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteField_Succe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10139,7 +10175,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject_AsMp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -10165,7 +10201,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -10190,7 +10226,7 @@ public void TestPolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstruct [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -10216,7 +10252,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropert [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -10241,7 +10277,7 @@ public void TestPolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -10267,7 +10303,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -10292,7 +10328,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructor [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10318,7 +10354,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10344,7 +10380,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10370,7 +10406,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10396,7 +10432,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10422,7 +10458,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10448,7 +10484,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10474,7 +10510,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10500,7 +10536,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10526,7 +10562,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10555,7 +10591,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10581,7 +10617,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWritePrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10607,7 +10643,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10633,7 +10669,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollect [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10659,7 +10695,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -10685,7 +10721,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10711,7 +10747,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10737,7 +10773,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10763,7 +10799,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10789,7 +10825,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -10815,7 +10851,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10841,7 +10877,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWritePrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10867,7 +10903,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10893,7 +10929,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollect [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10919,7 +10955,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -10945,7 +10981,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10971,7 +11007,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10997,7 +11033,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11023,7 +11059,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11049,7 +11085,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11075,7 +11111,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11101,7 +11137,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11127,7 +11163,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -11141,7 +11177,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -11171,7 +11207,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -11188,7 +11224,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11214,7 +11250,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11240,7 +11276,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11266,7 +11302,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11292,7 +11328,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11318,7 +11354,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11344,7 +11380,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11370,7 +11406,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11396,7 +11432,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11422,7 +11458,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11448,7 +11484,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11474,7 +11510,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11500,7 +11536,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11526,7 +11562,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11552,7 +11588,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11578,7 +11614,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11604,7 +11640,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11630,7 +11666,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11656,7 +11692,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11682,7 +11718,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11708,7 +11744,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11734,7 +11770,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11760,7 +11796,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11786,7 +11822,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11812,7 +11848,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11838,7 +11874,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11864,7 +11900,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11890,7 +11926,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11916,7 +11952,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11942,7 +11978,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11968,7 +12004,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11994,7 +12030,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12020,7 +12056,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12046,7 +12082,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12072,7 +12108,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateS [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12098,7 +12134,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12124,7 +12160,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12150,7 +12186,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12176,7 +12212,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12202,7 +12238,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12228,7 +12264,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12254,7 +12290,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12280,7 +12316,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -12294,7 +12330,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -12324,7 +12360,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -12342,7 +12378,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12368,7 +12404,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12394,7 +12430,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -12420,7 +12456,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -12446,7 +12482,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -12472,7 +12508,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12498,7 +12534,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12524,7 +12560,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -12550,7 +12586,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -12576,7 +12612,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -12602,7 +12638,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12628,7 +12664,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWritePr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12654,7 +12690,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -12680,7 +12716,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -12706,7 +12742,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSett [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -12732,7 +12768,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12758,7 +12794,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12784,7 +12820,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -12810,7 +12846,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -12836,7 +12872,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -12862,7 +12898,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12888,7 +12924,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12914,7 +12950,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -12940,7 +12976,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -12966,7 +13002,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -12992,7 +13028,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13018,7 +13054,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13044,7 +13080,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13070,7 +13106,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13096,7 +13132,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13122,7 +13158,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13148,7 +13184,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13174,7 +13210,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13200,7 +13236,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13226,7 +13262,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13252,7 +13288,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13278,7 +13314,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13304,7 +13340,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13330,7 +13366,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13356,7 +13392,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13382,7 +13418,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13408,7 +13444,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13434,7 +13470,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13460,7 +13496,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13486,7 +13522,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13512,7 +13548,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13538,7 +13574,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13564,7 +13600,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -13590,7 +13626,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -13616,7 +13652,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -13642,7 +13678,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13668,7 +13704,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13694,7 +13730,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13720,7 +13756,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13746,7 +13782,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13772,7 +13808,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13798,7 +13834,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13824,7 +13860,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13850,7 +13886,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13876,7 +13912,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13909,7 +13945,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13935,7 +13971,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -13960,7 +13996,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13986,7 +14022,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14011,7 +14047,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14037,7 +14073,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14062,7 +14098,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14088,7 +14124,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14113,7 +14149,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14139,7 +14175,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14164,7 +14200,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14190,7 +14226,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty_S [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14215,7 +14251,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14241,7 +14277,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField_Succ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14266,7 +14302,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject_AsM [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14292,7 +14328,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14317,7 +14353,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14343,7 +14379,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14368,7 +14404,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14394,7 +14430,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14419,7 +14455,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14445,7 +14481,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14470,7 +14506,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14496,7 +14532,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14521,7 +14557,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -14547,7 +14583,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -14572,7 +14608,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -14598,7 +14634,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -14623,7 +14659,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -14649,7 +14685,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -14674,7 +14710,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14700,7 +14736,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14725,7 +14761,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14751,7 +14787,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField_Suc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14776,7 +14812,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject_As [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -14802,7 +14838,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -14827,7 +14863,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstru [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -14853,7 +14889,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -14878,7 +14914,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -14904,7 +14940,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -14929,7 +14965,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstruct [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14955,7 +14991,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14981,7 +15017,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15007,7 +15043,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -15033,7 +15069,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObje [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15059,7 +15095,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15085,7 +15121,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetterPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15111,7 +15147,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetter [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15137,7 +15173,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropert [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyFieldAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15163,7 +15199,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15192,7 +15228,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15218,7 +15254,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15244,7 +15280,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15270,7 +15306,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15296,7 +15332,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15322,7 +15358,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15348,7 +15384,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15374,7 +15410,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15400,7 +15436,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15426,7 +15462,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15452,7 +15488,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15478,7 +15514,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15504,7 +15540,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15530,7 +15566,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15556,7 +15592,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15582,7 +15618,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15608,7 +15644,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15634,7 +15670,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15660,7 +15696,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15686,7 +15722,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15712,7 +15748,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15738,7 +15774,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15764,7 +15800,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -15778,7 +15814,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCol [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -15808,7 +15844,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -15825,7 +15861,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15851,7 +15887,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15877,7 +15913,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15903,7 +15939,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15929,7 +15965,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15955,7 +15991,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15981,7 +16017,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16007,7 +16043,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16033,7 +16069,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16059,7 +16095,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16085,7 +16121,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16111,7 +16147,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16137,7 +16173,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16163,7 +16199,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16189,7 +16225,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16215,7 +16251,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16241,7 +16277,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16267,7 +16303,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16293,7 +16329,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16319,7 +16355,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16345,7 +16381,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16371,7 +16407,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16397,7 +16433,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16423,7 +16459,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16449,7 +16485,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16475,7 +16511,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16501,7 +16537,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16527,7 +16563,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16553,7 +16589,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemG [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16579,7 +16615,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16605,7 +16641,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16631,7 +16667,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16657,7 +16693,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16683,7 +16719,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16709,7 +16745,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16735,7 +16771,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16761,7 +16797,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16787,7 +16823,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16813,7 +16849,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16839,7 +16875,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16865,7 +16901,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16891,7 +16927,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16917,7 +16953,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -16931,7 +16967,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCol [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -16961,7 +16997,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -16979,7 +17015,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17005,7 +17041,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17031,7 +17067,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -17057,7 +17093,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -17083,7 +17119,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetter [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -17109,7 +17145,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17135,7 +17171,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17161,7 +17197,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17187,7 +17223,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17213,7 +17249,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateS [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17239,7 +17275,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17265,7 +17301,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17291,7 +17327,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -17317,7 +17353,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -17343,7 +17379,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -17369,7 +17405,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17395,7 +17431,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17421,7 +17457,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -17447,7 +17483,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -17473,7 +17509,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -17499,7 +17535,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17525,7 +17561,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17551,7 +17587,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -17577,7 +17613,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -17603,7 +17639,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -17629,7 +17665,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17655,7 +17691,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17681,7 +17717,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -17707,7 +17743,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -17733,7 +17769,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -17759,7 +17795,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17785,7 +17821,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17811,7 +17847,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17837,7 +17873,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17863,7 +17899,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPriv [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17889,7 +17925,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17915,7 +17951,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17941,7 +17977,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -17967,7 +18003,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -17993,7 +18029,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18019,7 +18055,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18045,7 +18081,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18071,7 +18107,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18097,7 +18133,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18123,7 +18159,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18149,7 +18185,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18175,7 +18211,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18201,7 +18237,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -18227,7 +18263,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -18253,7 +18289,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -18279,7 +18315,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18305,7 +18341,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18331,7 +18367,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18357,7 +18393,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18383,7 +18419,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPriv [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18409,7 +18445,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18435,7 +18471,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18461,7 +18497,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18487,7 +18523,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18513,7 +18549,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18541,7 +18577,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeMixed_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeMixed(); target.NormalVanilla = "ABC"; target.NormalRuntime = new FileEntry { Name = "File", Size = 1 }; @@ -18606,7 +18642,7 @@ public void TestPolymorphicMemberTypeMixed_Success() [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeMixed_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeMixed(); var serializer = context.GetSerializer(); @@ -18641,7 +18677,7 @@ public void TestPolymorphicMemberTypeMixed_Null_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberNoAttribute { Value = new FileEntry { Name = "file", Size = 1 } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -18651,7 +18687,7 @@ public void TestAbstractClassMemberNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberKnownType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -18673,7 +18709,7 @@ public void TestAbstractClassMemberKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberRuntimeType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -18695,7 +18731,7 @@ public void TestAbstractClassMemberRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemNoAttribute { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -18705,7 +18741,7 @@ public void TestAbstractClassListItemNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemKnownType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -18728,7 +18764,7 @@ public void TestAbstractClassListItemKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemRuntimeType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -18751,7 +18787,7 @@ public void TestAbstractClassListItemRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyNoAttribute { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -18761,7 +18797,7 @@ public void TestAbstractClassDictKeyNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyKnownType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -18784,7 +18820,7 @@ public void TestAbstractClassDictKeyKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyRuntimeType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -18807,7 +18843,7 @@ public void TestAbstractClassDictKeyRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberNoAttribute { Value = new FileEntry { Name = "file", Size = 1 } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -18817,7 +18853,7 @@ public void TestInterfaceMemberNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberKnownType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -18839,7 +18875,7 @@ public void TestInterfaceMemberKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberRuntimeType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -18861,7 +18897,7 @@ public void TestInterfaceMemberRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemNoAttribute { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -18871,7 +18907,7 @@ public void TestInterfaceListItemNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemKnownType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -18894,7 +18930,7 @@ public void TestInterfaceListItemKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemRuntimeType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -18917,7 +18953,7 @@ public void TestInterfaceListItemRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyNoAttribute { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -18927,7 +18963,7 @@ public void TestInterfaceDictKeyNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyKnownType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -18950,7 +18986,7 @@ public void TestInterfaceDictKeyKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyRuntimeType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -18973,7 +19009,7 @@ public void TestInterfaceDictKeyRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionNoAttribute_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionNoAttribute { Value = new EchoKeyedCollection { "ABC" } }; @@ -18997,7 +19033,7 @@ public void TestAbstractClassCollectionNoAttribute_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionKnownType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19021,7 +19057,7 @@ public void TestAbstractClassCollectionKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionRuntimeType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19045,7 +19081,7 @@ public void TestAbstractClassCollectionRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionNoAttribute_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionNoAttribute { Value = new EchoKeyedCollection { "ABC" } }; @@ -19069,7 +19105,7 @@ public void TestInterfaceCollectionNoAttribute_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionKnownType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19093,7 +19129,7 @@ public void TestInterfaceCollectionKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionRuntimeType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19117,7 +19153,7 @@ public void TestInterfaceCollectionRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestTupleAbstractType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new TupleAbstractType { Value = Tuple.Create( new FileEntry { Name = "1", Size = 1 } as AbstractFileSystemEntry, new FileEntry { Name = "2", Size = 2 } as IFileSystemEntry, new FileEntry { Name = "3", Size = 3 } as AbstractFileSystemEntry, new FileEntry { Name = "4", Size = 4 } as IFileSystemEntry ) }; var serializer = context.GetSerializer(); @@ -19139,7 +19175,7 @@ public void TestTupleAbstractType_Success() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownMember_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownMember(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19148,7 +19184,7 @@ public void TestAttribute_DuplicatedKnownMember_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownCollectionItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownCollectionItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19157,7 +19193,7 @@ public void TestAttribute_DuplicatedKnownCollectionItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownDictionaryKey_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownDictionaryKey(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19167,7 +19203,7 @@ public void TestAttribute_DuplicatedKnownDictionaryKey_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownTupleItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownTupleItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19177,7 +19213,7 @@ public void TestAttribute_DuplicatedKnownTupleItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeMember_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeMember(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19186,7 +19222,7 @@ public void TestAttribute_KnownAndRuntimeMember_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeCollectionItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeCollectionItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19195,7 +19231,7 @@ public void TestAttribute_KnownAndRuntimeCollectionItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeDictionaryKey_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeDictionaryKey(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19205,7 +19241,7 @@ public void TestAttribute_KnownAndRuntimeDictionaryKey_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeTupleItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeTupleItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19215,7 +19251,7 @@ public void TestAttribute_KnownAndRuntimeTupleItem_Fail() [Category( "PolymorphicSerialization" )] public void TestGlobalNamespace() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new HasGlobalNamespaceType { GlobalType = new TypeInGlobalNamespace { Value = "ABC" } }; var serializer = context.GetSerializer(); @@ -19238,7 +19274,7 @@ public void TestGlobalNamespace() [Category( "PolymorphicSerialization" )] public async Task TestGlobalNamespaceAsync() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new HasGlobalNamespaceType { GlobalType = new TypeInGlobalNamespace { Value = "ABC" } }; var serializer = context.GetSerializer(); @@ -19272,7 +19308,7 @@ private static void SetUpDefaultCollectionsForPolymorphism( SerializationContext [Category( "PolymorphicSerialization" )] public void TestPolymorphismAttributesInType() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); context.GetSerializer(); context.GetSerializer(); @@ -19285,7 +19321,7 @@ public void TestPolymorphismAttributesInType() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19311,7 +19347,7 @@ public void TestKnownType_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19337,7 +19373,7 @@ public void TestKnownType_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19365,7 +19401,7 @@ public void TestKnownType_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19393,7 +19429,7 @@ public void TestKnownType_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19420,7 +19456,7 @@ public void TestKnownType_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19447,7 +19483,7 @@ public void TestKnownType_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19474,7 +19510,7 @@ public void TestRuntimeType_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19501,7 +19537,7 @@ public void TestRuntimeType_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19524,7 +19560,7 @@ public void TestRuntimeType_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19547,7 +19583,7 @@ public void TestRuntimeType_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19574,7 +19610,7 @@ public void TestRuntimeType_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19601,7 +19637,7 @@ public void TestRuntimeType_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19627,7 +19663,7 @@ public void TestKnownTypeCollection_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19653,7 +19689,7 @@ public void TestKnownTypeCollection_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19681,7 +19717,7 @@ public void TestKnownTypeCollection_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19709,7 +19745,7 @@ public void TestKnownTypeCollection_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19736,7 +19772,7 @@ public void TestKnownTypeCollection_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19763,7 +19799,7 @@ public void TestKnownTypeCollection_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19790,7 +19826,7 @@ public void TestRuntimeTypeCollection_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19817,7 +19853,7 @@ public void TestRuntimeTypeCollection_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19840,7 +19876,7 @@ public void TestRuntimeTypeCollection_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19863,7 +19899,7 @@ public void TestRuntimeTypeCollection_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19890,7 +19926,7 @@ public void TestRuntimeTypeCollection_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19917,7 +19953,7 @@ public void TestRuntimeTypeCollection_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19943,7 +19979,7 @@ public void TestKnownTypeDictionary_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19969,7 +20005,7 @@ public void TestKnownTypeDictionary_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19997,7 +20033,7 @@ public void TestKnownTypeDictionary_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20025,7 +20061,7 @@ public void TestKnownTypeDictionary_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20052,7 +20088,7 @@ public void TestKnownTypeDictionary_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20079,7 +20115,7 @@ public void TestKnownTypeDictionary_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20106,7 +20142,7 @@ public void TestRuntimeTypeDictionary_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20133,7 +20169,7 @@ public void TestRuntimeTypeDictionary_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20156,7 +20192,7 @@ public void TestRuntimeTypeDictionary_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20179,7 +20215,7 @@ public void TestRuntimeTypeDictionary_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20206,7 +20242,7 @@ public void TestRuntimeTypeDictionary_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20238,7 +20274,7 @@ public void TestRuntimeTypeDictionary_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_PublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPublicStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20257,7 +20293,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_PublicStaticMethod_OK() [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_NonPublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPrivateStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20276,7 +20312,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_NonPublicStaticMethod_O [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_PublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPublicInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20295,7 +20331,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_PublicInstanceMethod_OK [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_NonPublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPrivateInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20314,7 +20350,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_NonPublicInstanceMethod [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_PublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPublicStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20333,7 +20369,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_PublicStaticMethod_O [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPrivateStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20352,7 +20388,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicStaticMetho [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_PublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPublicInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20371,7 +20407,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_PublicInstanceMethod [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPrivateInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20390,7 +20426,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicInstanceMet [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoMethods_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierNoMethods { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20405,7 +20441,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoMethods_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseVoidReturnMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierVoidReturnMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20420,7 +20456,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseVoidReturnMethod_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoParametersMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierNoParametersMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20435,7 +20471,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoParametersMethod_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseExtraParametersMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierExtraParametersMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20450,7 +20486,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseExtraParametersMethod_Fai [Category( "PolymorphicSerialization" )] public void TestTypeVerifierDoesNotLoadTypeItself() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var serializer = context.GetSerializer(); using ( var buffer = new MemoryStream() ) diff --git a/test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.Polymorphism.ttinclude b/test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.Polymorphism.ttinclude index f6dcc8165..1e8cace1d 100644 --- a/test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.Polymorphism.ttinclude +++ b/test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.Polymorphism.ttinclude @@ -1,4 +1,4 @@ -<#@ import namespace="System" #> +<#@ import namespace="System" #> <#@ import namespace="System.Collections.Generic" #> <#@ import namespace="System.Globalization" #> <#@ import namespace="System.Linq" #> @@ -7,7 +7,7 @@ // // MessagePack for CLI // -// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// Copyright (C) 2010-2017 FUJIWARA, Yusuke // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -489,7 +489,7 @@ private IEnumerable GeneratePolymorphismTestPartsCore( bool gene [Category( "PolymorphicSerialization" )] public void TestGlobalNamespace() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new HasGlobalNamespaceType { GlobalType = new TypeInGlobalNamespace { Value = "ABC" } }; var serializer = context.GetSerializer(); @@ -512,7 +512,7 @@ private IEnumerable GeneratePolymorphismTestPartsCore( bool gene [Category( "PolymorphicSerialization" )] public async Task TestGlobalNamespaceAsync() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new HasGlobalNamespaceType { GlobalType = new TypeInGlobalNamespace { Value = "ABC" } }; var serializer = context.GetSerializer(); @@ -720,7 +720,7 @@ private void GeneratePolymorphicTestMethods( string targetType, TypeKind kind, M [Category( "PolymorphicSerialization" )] public void Test<#= targetType + "_" + label #>() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); <#+ if ( ( kind & TypeKind.HasConstructor ) == TypeKind.HasConstructor ) { @@ -887,7 +887,7 @@ private void GeneratePolymorphicTestsForMixed( bool generateTypes, bool generate [Category( "PolymorphicSerialization" )] public void Test<#= typeName #>_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new <#= typeName #>(); <#+ foreach ( var member in members ) @@ -947,7 +947,7 @@ private void GeneratePolymorphicTestsForMixed( bool generateTypes, bool generate [Category( "PolymorphicSerialization" )] public void Test<#= typeName #>_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new <#= typeName #>(); var serializer = context.GetSerializer<#= "<" + typeName + ">" #>(); @@ -1127,7 +1127,7 @@ private void GenerateErrorPatterns( bool generateTypes, bool generateMethods, IC [Category( "PolymorphicSerialization" )] public void TestTupleAbstractType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new TupleAbstractType { Value = Tuple.Create( <#= String.Join( ", ", Enumerable.Range( 1, 4 ).Select( i => String.Format( CultureInfo.InvariantCulture, "new FileEntry {{ Name = \"{0}\", Size = {0} }} as {1}FileSystemEntry", i, i % 2 == 1 ? "Abstract" : "I" ) ) ) #> ) }; var serializer = context.GetSerializer(); @@ -1265,7 +1265,7 @@ private void GenerateAbstractTypeTestMethod( string typeName, string initializer [Category( "PolymorphicSerialization" )] public void Test<#= typeName #>_<#= success ? "Success" : "Fail" #>() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); <#+ if ( abstractCollectionType != null && concreteCollectionType != null ) { @@ -1357,7 +1357,7 @@ private void GenerateAttributeErrorTestMethod( string testCaseName, string type [Category( "PolymorphicSerialization" )] public void TestAttribute_<#= testCaseName #>_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new <#= typeName #>(); Assert.Throws( ()=> context.GetSerializer<#= "<" + typeName + ">" #>() ); } @@ -1671,7 +1671,7 @@ private void GeneratePolymorohismExtensionTests( bool generateTypes, bool genera [Category( "PolymorphicSerialization" )] public void TestPolymorphismAttributesInType() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); context.GetSerializer(); context.GetSerializer(); @@ -1691,7 +1691,7 @@ private void GeneratePolymorohismExtensionTests( bool generateTypes, bool genera [Category( "PolymorphicSerialization" )] public void Test<#= testCase.PolymorphismKind #>Type<#= testCase.TypeKind #>_AttributeIs<#= testCase.Result ?? "Nothing" #>_<#= suffix #>_<#= testCase.Result ?? testCase.PolymorphismKind #><#= failsOnPack ? "_Fail" : String.Empty #>() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -1772,7 +1772,7 @@ private void GeneratePolymorohismExtensionTests( bool generateTypes, bool genera [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_<#= typeSpec.IsPublicType ? "Public" : "NonPublic" #>VerifierType_<#= methodSpec.IsPublicMethod ? "Public" : "NonPublic" #><#= methodSpec.IsStaticMethod ? "Static" : "Instance" #>Method_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { For<#= typeSpec.VerifierTypeName #><#= methodSpec.VerifierMethodName #> = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -1807,7 +1807,7 @@ private void GeneratePolymorohismExtensionTests( bool generateTypes, bool genera [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_Because<#= reason #>_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new <#= typeName #> { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer<<#= typeName #>>() ); @@ -1826,7 +1826,7 @@ private void GeneratePolymorohismExtensionTests( bool generateTypes, bool genera [Category( "PolymorphicSerialization" )] public void TestTypeVerifierDoesNotLoadTypeItself() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var serializer = context.GetSerializer(); using ( var buffer = new MemoryStream() ) diff --git a/test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.Types.cs b/test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.Types.cs index 13faf696f..f833c1a60 100644 --- a/test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.Types.cs +++ b/test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.Types.cs @@ -1,4 +1,4 @@ - + #region -- License Terms -- // // MessagePack for CLI @@ -657,7 +657,7 @@ public ComplexTypeGenerated Initialize() #endif // !SILVERLIGHT this._TimeSpanField = TimeSpan.FromMilliseconds( 123456789 ); this._GuidField = Guid.NewGuid(); - this._CharField = ' '; + this._CharField = '@'; this._DecimalField = 123456789.0987654321m; #if !NET35 && !WINDOWS_PHONE this._BigIntegerField = new BigInteger( UInt64.MaxValue ) + UInt64.MaxValue; @@ -1105,10 +1105,10 @@ internal static void Verify( T expected, T actual ) if ( expected is DateTime ) { Assert.That( - ( DateTime )( object )expected == ( DateTime )( object )actual, + ( ( DateTime )( object )expected ).ToUniversalTime() == ( DateTime )( object )actual, "Expected:{1:O}({2},{3}){0}Actual :{4:O}({5},{6})", Environment.NewLine, - expected, + expected == null ? null : ( object )( ( DateTime )( object )expected ).ToUniversalTime(), expected == null ? "(null)" : expected.GetType().FullName, ( ( DateTime )( object )expected ).Kind, actual, @@ -1136,8 +1136,12 @@ internal static void Verify( T expected, T actual ) var actuals = ( IDictionary )actual; foreach ( DictionaryEntry entry in ( ( IDictionary )expected ) ) { - Assert.That( actuals.Contains( entry.Key ), "'{0}' is not in '[{1}]'", entry.Key, String.Join( ", ", actuals.Keys.OfType().Select( o => o == null ? String.Empty : o.ToString() ).ToArray() ) ); - Verify( entry.Value, actuals[ entry.Key ] ); + var key = + entry.Key is DateTime + ? ( object )( ( DateTime )entry.Key ).ToUniversalTime() + : entry.Key; + Assert.That( actuals.Contains( key ), "'{0}' is not in '[{1}]'", key, String.Join( ", ", actuals.Keys.OfType().Select( o => o == null ? String.Empty : o.ToString() ).ToArray() ) ); + Verify( entry.Value, actuals[ key ] ); } return; } @@ -13666,7 +13670,7 @@ protected internal override DateTime UnpackFromCore( Unpacker unpacker ) { var ext = unpacker.LastReadData.AsMessagePackExtendedTypeObject(); Assert.That( ext.TypeCode, Is.EqualTo( 1 ) ); - return new DateTime( BigEndianBinary.ToInt64( ext.Body, 0 ) ).ToUniversalTime(); + return new DateTime( BigEndianBinary.ToInt64( ext.Body, 0 ), DateTimeKind.Utc ); } } diff --git a/test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.Types.tt b/test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.Types.tt index 345b741e5..1ef4d33de 100644 --- a/test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.Types.tt +++ b/test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.Types.tt @@ -1,4 +1,4 @@ -<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ template debug="false" hostspecific="false" language="C#" #> <#@ output extension=".cs" #> <#@ include file="AutoMessagePackSerializerTest.Polymorphism.ttinclude" #> <#@ assembly name="System.Core.dll" #> @@ -736,10 +736,10 @@ foreach( Tuple item in fields ) if ( expected is DateTime ) { Assert.That( - ( DateTime )( object )expected == ( DateTime )( object )actual, + ( ( DateTime )( object )expected ).ToUniversalTime() == ( DateTime )( object )actual, "Expected:{1:O}({2},{3}){0}Actual :{4:O}({5},{6})", Environment.NewLine, - expected, + expected == null ? null : ( object )( ( DateTime )( object )expected ).ToUniversalTime(), expected == null ? "(null)" : expected.GetType().FullName, ( ( DateTime )( object )expected ).Kind, actual, @@ -767,8 +767,12 @@ foreach( Tuple item in fields ) var actuals = ( IDictionary )actual; foreach ( DictionaryEntry entry in ( ( IDictionary )expected ) ) { - Assert.That( actuals.Contains( entry.Key ), "'{0}' is not in '[{1}]'", entry.Key, String.Join( ", ", actuals.Keys.OfType().Select( o => o == null ? String.Empty : o.ToString() ).ToArray() ) ); - Verify( entry.Value, actuals[ entry.Key ] ); + var key = + entry.Key is DateTime + ? ( object )( ( DateTime )entry.Key ).ToUniversalTime() + : entry.Key; + Assert.That( actuals.Contains( key ), "'{0}' is not in '[{1}]'", key, String.Join( ", ", actuals.Keys.OfType().Select( o => o == null ? String.Empty : o.ToString() ).ToArray() ) ); + Verify( entry.Value, actuals[ key ] ); } return; } @@ -1990,7 +1994,7 @@ foreach ( var item in constructorParamterSpecs ) { var ext = unpacker.LastReadData.AsMessagePackExtendedTypeObject(); Assert.That( ext.TypeCode, Is.EqualTo( 1 ) ); - return new DateTime( BigEndianBinary.ToInt64( ext.Body, 0 ) ).ToUniversalTime(); + return new DateTime( BigEndianBinary.ToInt64( ext.Body, 0 ), DateTimeKind.Utc ); } } @@ -2590,4 +2594,4 @@ private static string GetSimpleInitializer( Tuple return tuple.Item3.Remove( index ); } } -#> \ No newline at end of file +#> diff --git a/test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.ttinclude b/test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.ttinclude index 3f543ff6c..2bc1d79c3 100644 --- a/test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.ttinclude +++ b/test/MsgPack.UnitTest/Serialization/AutoMessagePackSerializerTest.ttinclude @@ -146,13 +146,19 @@ namespace MsgPack.Serialization #> } - private static SerializationContext NewSerializationContext( PackerCompatibilityOptions compatibilityOptions ) + private static SerializationContext NewSerializationContext() + { + return NewSerializationContext( PackerCompatibilityOptions.None, DateTimeConversionMethod.Timestamp ); + } + + private static SerializationContext NewSerializationContext( PackerCompatibilityOptions compatibilityOptions, DateTimeConversionMethod dateTimeConversionMethod ) { <#+ if ( !forIos ) { #> var context = new SerializationContext( compatibilityOptions ) { SerializationMethod = SerializationMethod.<#= serializationMethod #> }; + context.DefaultDateTimeConversionMethod = dateTimeConversionMethod; context.SerializerOptions.EmitterFlavor = EmitterFlavor.<#= emitterFlavor #>; #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED context.SerializerOptions.DisablePrivilegedAccess = true; @@ -335,6 +341,34 @@ namespace MsgPack.Serialization [Test] public void TestDateTime() + { + TestCore( + DateTime.UtcNow, + stream => MessagePackSerializer.UnpackMessagePackObject( stream ).AsTimestamp().ToDateTime(), + ( x, y ) => x.Equals( y ), + context => + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); + } + ); + } + + [Test] + public void TestDateTimeOffset() + { + TestCore( + DateTimeOffset.UtcNow, + stream => MessagePackSerializer.UnpackMessagePackObject( stream ).AsTimestamp().ToDateTimeOffset(), + ( x, y ) => x.Equals( y ), + context => + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); + } + ); + } + + [Test] + public void TestDateTimeNative() { TestCore( DateTime.Now, @@ -342,13 +376,13 @@ namespace MsgPack.Serialization ( x, y ) => x.Equals( y ), context => { - Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + context.DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native; } ); } [Test] - public void TestDateTimeOffset() + public void TestDateTimeOffsetNative() { TestCore( DateTimeOffset.Now, @@ -360,7 +394,7 @@ namespace MsgPack.Serialization ( x, y ) => x.Equals( y ), context => { - Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + context.DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native; } ); } @@ -1252,7 +1286,7 @@ namespace MsgPack.Serialization [Test] public void TestEmptyBytes_Classic() { - var context = NewSerializationContext( PackerCompatibilityOptions.Classic ); + var context = NewSerializationContext( PackerCompatibilityOptions.Classic, DateTimeConversionMethod.Native ); var serializer = this.CreateTarget( context ); using ( var stream = new MemoryStream() ) { @@ -2324,7 +2358,7 @@ namespace MsgPack.Serialization [Test] public void TestBinary_ClassicContext() { - var context = NewSerializationContext( PackerCompatibilityOptions.Classic ); + var context = NewSerializationContext( PackerCompatibilityOptions.Classic, DateTimeConversionMethod.Native ); var serializer = context.GetSerializer(); using ( var stream = new MemoryStream() ) @@ -2337,7 +2371,7 @@ namespace MsgPack.Serialization [Test] public void TestBinary_ContextWithPackerCompatilibyOptionsNone() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext( PackerCompatibilityOptions.None, DateTimeConversionMethod.Timestamp ); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -2352,8 +2386,8 @@ namespace MsgPack.Serialization [Test] public void TestExt_ClassicContext() { - var context = NewSerializationContext( SerializationContext.CreateClassicContext().CompatibilityOptions.PackerCompatibilityOptions ); - context.Serializers.Register( new CustomDateTimeSerealizer() ); + var context = NewSerializationContext( SerializationContext.CreateClassicContext().CompatibilityOptions.PackerCompatibilityOptions, SerializationContext.CreateClassicContext().DefaultDateTimeConversionMethod ); + context.Serializers.RegisterOverride( new CustomDateTimeSerealizer() ); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -2369,7 +2403,7 @@ namespace MsgPack.Serialization [Test] public void TestExt_DefaultContext() { - var context = NewSerializationContext( SerializationContext.Default.CompatibilityOptions.PackerCompatibilityOptions ); + var context = NewSerializationContext( SerializationContext.Default.CompatibilityOptions.PackerCompatibilityOptions, SerializationContext.Default.DefaultDateTimeConversionMethod ); context.Serializers.Register( new CustomDateTimeSerealizer() ); var serializer = CreateTarget( context ); @@ -2386,7 +2420,7 @@ namespace MsgPack.Serialization [Test] public void TestExt_ContextWithPackerCompatilibyOptionsNone() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.Serializers.Register( new CustomDateTimeSerealizer() ); context.CompatibilityOptions.PackerCompatibilityOptions = PackerCompatibilityOptions.None; var serializer = CreateTarget( context ); @@ -2404,7 +2438,7 @@ namespace MsgPack.Serialization [Test] public void TestAbstractTypes_KnownCollections_Default_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -2422,7 +2456,7 @@ namespace MsgPack.Serialization [Test] public void TestAbstractTypes_KnownCollections_WithoutRegistration_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Unregister( typeof( IList<> ) ); Assert.Throws( () => DoKnownCollectionTest( context ) ); } @@ -2430,7 +2464,7 @@ namespace MsgPack.Serialization [Test] public void TestAbstractTypes_KnownCollections_ExplicitRegistration_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList<> ), typeof( Collection<> ) ); var serializer = CreateTarget( context ); @@ -2449,7 +2483,7 @@ namespace MsgPack.Serialization [Test] public void TestAbstractTypes_KnownCollections_ExplicitRegistrationForSpecific_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( Collection ) ); var serializer1 = CreateTarget( context ); @@ -2482,7 +2516,7 @@ namespace MsgPack.Serialization [Test] public void TestAbstractTypes_NotACollection_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); Assert.Throws( () => DoKnownCollectionTest( context ) ); } @@ -2574,7 +2608,7 @@ namespace MsgPack.Serialization { using ( var buffer = new MemoryStream(data) ) { - var serializer = MessagePackSerializer.Get( NewSerializationContext( PackerCompatibilityOptions.None ) ); + var serializer = MessagePackSerializer.Get( NewSerializationContext() ); var result = serializer.Unpack( buffer ); assertion( result ); } @@ -3240,7 +3274,7 @@ namespace MsgPack.Serialization [Test] public void Test<#= target #>Derived_<#= type #>_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = <#+ var field = type == "Value" ? "1" : "\"1\""; @@ -3323,7 +3357,7 @@ namespace MsgPack.Serialization [Test] public void TestNullable_<#= testCase.Label #>_NonNull_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = <#= testCase.Value #>; var serializer = MessagePackSerializer.CreateInternal<#= "<" + testCase.Type + "?>" #>( context, null ); @@ -3339,7 +3373,7 @@ namespace MsgPack.Serialization [Test] public void TestNullable_<#= testCase.Label #>_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = default( <#= testCase.Type #>? ); var serializer = MessagePackSerializer.CreateInternal<#= "<" + testCase.Type + "?>" #>( context, null ); @@ -3933,11 +3967,13 @@ namespace MsgPack.Serialization Assert.That( asList[ 1 ].IsTypeOf().Value ); Assert.That( asList[ 1 ].AsBinary(), Is.EqualTo( target.Data ) ); - Assert.That( asList[ 2 ].IsTypeOf().Value ); - Assert.That( asList[ 2 ].AsInt64(), Is.EqualTo( target.TimeStamp.ToBinary() ) ); + Assert.That( asList[ 2 ].IsTypeOf().Value ); + var timestamp = asList[ 2 ].AsTimestamp(); + Assert.That( timestamp.ToDateTime(), Is.EqualTo( target.TimeStamp.ToUniversalTime() ) ); Assert.That( asList[ 3 ].IsDictionary ); - Assert.That( asList[ 3 ].AsDictionary().Single().Key.AsInt64(), Is.EqualTo( target.History.Single().Key.ToBinary() ) ); + var historyKey = asList[ 3 ].AsDictionary().Single().Key.AsTimestamp(); + Assert.That( historyKey.ToDateTime(), Is.EqualTo( target.History.Single().Key.ToUniversalTime() ) ); Assert.That( asList[ 3 ].AsDictionary().Single().Value.AsString(), Is.EqualTo( target.History.Single().Value ) ); Assert.That( asList[ 4 ].IsArray ); @@ -3957,10 +3993,13 @@ namespace MsgPack.Serialization Assert.That( asDictionary[ "Data" ].IsTypeOf().Value ); Assert.That( asDictionary[ "Data" ].AsBinary(), Is.EqualTo( target.Data ) ); - Assert.That( asDictionary[ "TimeStamp" ].IsTypeOf().Value ); - Assert.That( asDictionary[ "TimeStamp" ].AsInt64(), Is.EqualTo( target.TimeStamp.ToBinary() ) ); + Assert.That( asDictionary[ "TimeStamp" ].IsTypeOf().Value ); + var timestamp = asDictionary[ "TimeStamp" ].AsTimestamp(); + Assert.That( timestamp.ToDateTime(), Is.EqualTo( target.TimeStamp.ToUniversalTime() ) ); - Assert.That( asDictionary[ "History" ].AsDictionary().Single().Key.AsInt64(), Is.EqualTo( target.History.Single().Key.ToBinary() ) ); + Assert.That( asDictionary[ "History" ].IsDictionary ); + var historyKey = asDictionary[ "History" ].AsDictionary().Single().Key.AsTimestamp(); + Assert.That( historyKey.ToDateTime(), Is.EqualTo( target.History.Single().Key.ToUniversalTime() ) ); Assert.That( asDictionary[ "History" ].AsDictionary().Single().Value.AsString(), Is.EqualTo( target.History.Single().Value ) ); Assert.That( asDictionary[ "Points" ].IsArray ); diff --git a/test/MsgPack.UnitTest/Serialization/ComplexType.cs b/test/MsgPack.UnitTest/Serialization/ComplexType.cs index d46a1368e..01b980102 100644 --- a/test/MsgPack.UnitTest/Serialization/ComplexType.cs +++ b/test/MsgPack.UnitTest/Serialization/ComplexType.cs @@ -1,8 +1,8 @@ -#region -- License Terms -- +#region -- License Terms -- // // MessagePack for CLI // -// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// Copyright (C) 2010-2017 FUJIWARA, Yusuke // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -76,7 +76,7 @@ public void Verify( Stream stream ) NUnit.Framework.Assert.That( this.Source, Is.Not.Null ); NUnit.Framework.Assert.That( map[ "Source" ].AsString(), Is.EqualTo( this.Source.ToString() ) ); NUnit.Framework.Assert.That( map.ContainsKey( "TimeStamp" ) ); - NUnit.Framework.Assert.That( DateTime.FromBinary( map[ "TimeStamp" ].AsInt64() ), Is.EqualTo( this.TimeStamp ) ); + NUnit.Framework.Assert.That( map[ "TimeStamp" ].AsTimestamp().ToDateTime(), Is.EqualTo( this.TimeStamp.ToUniversalTime() ) ); NUnit.Framework.Assert.That( map.ContainsKey( "Data" ) ); NUnit.Framework.Assert.That( map[ "Data" ].AsBinary(), Is.EqualTo( this.Data ) ); NUnit.Framework.Assert.That( map.ContainsKey( "History" ) ); @@ -89,7 +89,7 @@ public void Verify( Stream stream ) var array = data.AsList(); NUnit.Framework.Assert.That( this.Source, Is.Not.Null ); NUnit.Framework.Assert.That( array[ 0 ].AsString(), Is.EqualTo( this.Source.ToString() ) ); - NUnit.Framework.Assert.That( DateTime.FromBinary( array[ 2 ].AsInt64() ), Is.EqualTo( this.TimeStamp ) ); + NUnit.Framework.Assert.That( array[ 2 ].AsTimestamp().ToDateTime(), Is.EqualTo( this.TimeStamp.ToUniversalTime() ) ); NUnit.Framework.Assert.That( array[ 1 ].AsBinary(), Is.EqualTo( this.Data ) ); NUnit.Framework.Assert.That( array[ 3 ].AsDictionary().Count, Is.EqualTo( this.History.Count ) ); NUnit.Framework.Assert.That( array[ 4 ].AsList().Count, Is.EqualTo( this.Points.Count ) ); @@ -105,4 +105,4 @@ public void Verify( ComplexType expected ) AutoMessagePackSerializerTest.Verify( expected.Points, this.Points ); } } -} \ No newline at end of file +} diff --git a/test/MsgPack.UnitTest/Serialization/ComplexTypeWithDataContract.cs b/test/MsgPack.UnitTest/Serialization/ComplexTypeWithDataContract.cs index 51c706a2b..9ec5f0b0e 100644 --- a/test/MsgPack.UnitTest/Serialization/ComplexTypeWithDataContract.cs +++ b/test/MsgPack.UnitTest/Serialization/ComplexTypeWithDataContract.cs @@ -1,8 +1,8 @@ -#region -- License Terms -- +#region -- License Terms -- // // MessagePack for CLI // -// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// Copyright (C) 2010-2017 FUJIWARA, Yusuke // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -68,7 +68,7 @@ public void Verify( Stream stream ) NUnit.Framework.Assert.That( map.ContainsKey( "Source" ) ); NUnit.Framework.Assert.That( map[ "Source" ].AsString(), Is.EqualTo( this.Source.ToString() ) ); NUnit.Framework.Assert.That( map.ContainsKey( "TimeStamp" ) ); - NUnit.Framework.Assert.That( DateTime.FromBinary( map[ "TimeStamp" ].AsInt64() ), Is.EqualTo( this.TimeStamp ) ); + NUnit.Framework.Assert.That( map[ "TimeStamp" ].AsTimestamp().ToDateTime(), Is.EqualTo( this.TimeStamp.ToUniversalTime() ) ); NUnit.Framework.Assert.That( map.ContainsKey( "Data" ) ); NUnit.Framework.Assert.That( map[ "Data" ].AsBinary(), Is.EqualTo( this.Data ) ); NUnit.Framework.Assert.That( map.ContainsKey( "History" ) ); @@ -83,7 +83,7 @@ public void Verify( Stream stream ) NUnit.Framework.Assert.That( array[ 0 ].AsBinary(), Is.EqualTo( this.Data ) ); NUnit.Framework.Assert.That( array[ 1 ].AsDictionary().Count, Is.EqualTo( this.History.Count ) ); NUnit.Framework.Assert.That( array[ 2 ].AsString(), Is.EqualTo( this.Source.ToString() ) ); - NUnit.Framework.Assert.That( DateTime.FromBinary( array[ 3 ].AsInt64() ), Is.EqualTo( this.TimeStamp ) ); + NUnit.Framework.Assert.That( array[ 3 ].AsTimestamp().ToDateTime(), Is.EqualTo( this.TimeStamp.ToUniversalTime() ) ); } } } diff --git a/test/MsgPack.UnitTest/Serialization/ComplexTypeWithDataContractWithOrder.cs b/test/MsgPack.UnitTest/Serialization/ComplexTypeWithDataContractWithOrder.cs index 2d1577d86..f5c16d22e 100644 --- a/test/MsgPack.UnitTest/Serialization/ComplexTypeWithDataContractWithOrder.cs +++ b/test/MsgPack.UnitTest/Serialization/ComplexTypeWithDataContractWithOrder.cs @@ -2,7 +2,7 @@ // // MessagePack for CLI // -// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// Copyright (C) 2010-2017 FUJIWARA, Yusuke // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -65,7 +65,7 @@ public void Verify( Stream stream ) NUnit.Framework.Assert.That( map.ContainsKey( "Source" ) ); NUnit.Framework.Assert.That( map[ "Source" ].AsString(), Is.EqualTo( this.Source.ToString() ) ); NUnit.Framework.Assert.That( map.ContainsKey( "TimeStamp" ) ); - NUnit.Framework.Assert.That( DateTime.FromBinary( map[ "TimeStamp" ].AsInt64() ), Is.EqualTo( this.TimeStamp ) ); + NUnit.Framework.Assert.That( map[ "TimeStamp" ].AsTimestamp().ToDateTime(), Is.EqualTo( this.TimeStamp.ToUniversalTime() ) ); NUnit.Framework.Assert.That( map.ContainsKey( "Data" ) ); NUnit.Framework.Assert.That( map[ "Data" ].AsBinary(), Is.EqualTo( this.Data ) ); NUnit.Framework.Assert.That( map.ContainsKey( "History" ) ); @@ -77,7 +77,7 @@ public void Verify( Stream stream ) var array = data.AsList(); NUnit.Framework.Assert.That( array.Count, Is.EqualTo( 4 ) ); NUnit.Framework.Assert.That( array[ 0 ].AsString(), Is.EqualTo( this.Source.ToString() ) ); - NUnit.Framework.Assert.That( DateTime.FromBinary( array[ 2 ].AsInt64() ), Is.EqualTo( this.TimeStamp ) ); + NUnit.Framework.Assert.That( array[ 2 ].AsTimestamp().ToDateTime(), Is.EqualTo( this.TimeStamp.ToUniversalTime() ) ); NUnit.Framework.Assert.That( array[ 1 ].AsBinary(), Is.EqualTo( this.Data ) ); NUnit.Framework.Assert.That( array[ 3 ].AsDictionary().Count, Is.EqualTo( this.History.Count ) ); } diff --git a/test/MsgPack.UnitTest/Serialization/ComplexTypeWithNonSerialized.cs b/test/MsgPack.UnitTest/Serialization/ComplexTypeWithNonSerialized.cs index b7896d87b..bf9a8bb53 100644 --- a/test/MsgPack.UnitTest/Serialization/ComplexTypeWithNonSerialized.cs +++ b/test/MsgPack.UnitTest/Serialization/ComplexTypeWithNonSerialized.cs @@ -1,8 +1,8 @@ -#region -- License Terms -- +#region -- License Terms -- // // MessagePack for CLI // -// Copyright (C) 2010-2012 FUJIWARA, Yusuke +// Copyright (C) 2010-2017 FUJIWARA, Yusuke // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -71,7 +71,7 @@ public void Verify( Stream stream ) NUnit.Framework.Assert.That( map.ContainsKey( "Source" ) ); NUnit.Framework.Assert.That( map[ "Source" ].AsString(), Is.EqualTo( this.Source.ToString() ) ); NUnit.Framework.Assert.That( map.ContainsKey( "TimeStamp" ) ); - NUnit.Framework.Assert.That( DateTime.FromBinary( map[ "TimeStamp" ].AsInt64() ), Is.EqualTo( this.TimeStamp ) ); + NUnit.Framework.Assert.That( map[ "TimeStamp" ].AsTimestamp().ToDateTime(), Is.EqualTo( this.TimeStamp.ToUniversalTime() ) ); NUnit.Framework.Assert.That( map.ContainsKey( "Data" ) ); NUnit.Framework.Assert.That( map[ "Data" ].AsBinary(), Is.EqualTo( this.Data ) ); NUnit.Framework.Assert.That( map.ContainsKey( "History" ) ); @@ -87,7 +87,7 @@ public void Verify( Stream stream ) NUnit.Framework.Assert.That( array[ 0 ].AsBinary(), Is.EqualTo( this.Data ) ); NUnit.Framework.Assert.That( array[ 1 ].AsDictionary().Count, Is.EqualTo( this.History.Count ) ); NUnit.Framework.Assert.That( array[ 2 ].AsString(), Is.EqualTo( this.Source.ToString() ) ); - NUnit.Framework.Assert.That( DateTime.FromBinary( array[ 3 ].AsInt64() ), Is.EqualTo( this.TimeStamp ) ); + NUnit.Framework.Assert.That( array[ 3 ].AsTimestamp().ToDateTime(), Is.EqualTo( this.TimeStamp.ToUniversalTime() ) ); } } } diff --git a/test/MsgPack.UnitTest/Serialization/ComplexTypeWithoutAnyAttribute.cs b/test/MsgPack.UnitTest/Serialization/ComplexTypeWithoutAnyAttribute.cs index 649c90eeb..7e471c338 100644 --- a/test/MsgPack.UnitTest/Serialization/ComplexTypeWithoutAnyAttribute.cs +++ b/test/MsgPack.UnitTest/Serialization/ComplexTypeWithoutAnyAttribute.cs @@ -2,7 +2,7 @@ // // MessagePack for CLI // -// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// Copyright (C) 2010-2017 FUJIWARA, Yusuke // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -58,7 +58,7 @@ public void Verify( Stream stream ) NUnit.Framework.Assert.That( this.Source, Is.Not.Null ); NUnit.Framework.Assert.That( map[ "Source" ].AsString(), Is.EqualTo( this.Source.ToString() ) ); NUnit.Framework.Assert.That( map.ContainsKey( "TimeStamp" ) ); - NUnit.Framework.Assert.That( DateTime.FromBinary( map[ "TimeStamp" ].AsInt64() ), Is.EqualTo( this.TimeStamp ) ); + NUnit.Framework.Assert.That( map[ "TimeStamp" ].AsTimestamp().ToDateTime(), Is.EqualTo( this.TimeStamp.ToUniversalTime() ) ); NUnit.Framework.Assert.That( map.ContainsKey( "Data" ) ); NUnit.Framework.Assert.That( map[ "Data" ].AsBinary(), Is.EqualTo( this.Data ) ); NUnit.Framework.Assert.That( map.ContainsKey( "History" ) ); @@ -72,7 +72,7 @@ public void Verify( Stream stream ) NUnit.Framework.Assert.That( array[ 0 ].AsBinary(), Is.EqualTo( this.Data ) ); NUnit.Framework.Assert.That( array[ 1 ].AsDictionary().Count, Is.EqualTo( this.History.Count ) ); NUnit.Framework.Assert.That( array[ 2 ].AsString(), Is.EqualTo( this.Source.ToString() ) ); - NUnit.Framework.Assert.That( DateTime.FromBinary( array[ 3 ].AsInt64() ), Is.EqualTo( this.TimeStamp ) ); + NUnit.Framework.Assert.That( array[ 3 ].AsTimestamp().ToDateTime(), Is.EqualTo( this.TimeStamp.ToUniversalTime() ) ); } } } diff --git a/test/MsgPack.UnitTest/Serialization/MapFieldBasedAutoMessagePackSerializerTest.cs b/test/MsgPack.UnitTest/Serialization/MapFieldBasedAutoMessagePackSerializerTest.cs index 46671feac..26d12855e 100644 --- a/test/MsgPack.UnitTest/Serialization/MapFieldBasedAutoMessagePackSerializerTest.cs +++ b/test/MsgPack.UnitTest/Serialization/MapFieldBasedAutoMessagePackSerializerTest.cs @@ -89,9 +89,15 @@ private static SerializationContext GetSerializationContext() return context; } - private static SerializationContext NewSerializationContext( PackerCompatibilityOptions compatibilityOptions ) + private static SerializationContext NewSerializationContext() + { + return NewSerializationContext( PackerCompatibilityOptions.None, DateTimeConversionMethod.Timestamp ); + } + + private static SerializationContext NewSerializationContext( PackerCompatibilityOptions compatibilityOptions, DateTimeConversionMethod dateTimeConversionMethod ) { var context = new SerializationContext( compatibilityOptions ) { SerializationMethod = SerializationMethod.Map }; + context.DefaultDateTimeConversionMethod = dateTimeConversionMethod; context.SerializerOptions.EmitterFlavor = EmitterFlavor.FieldBased; #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED context.SerializerOptions.DisablePrivilegedAccess = true; @@ -244,6 +250,34 @@ public void TestString() [Test] public void TestDateTime() + { + TestCore( + DateTime.UtcNow, + stream => MessagePackSerializer.UnpackMessagePackObject( stream ).AsTimestamp().ToDateTime(), + ( x, y ) => x.Equals( y ), + context => + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); + } + ); + } + + [Test] + public void TestDateTimeOffset() + { + TestCore( + DateTimeOffset.UtcNow, + stream => MessagePackSerializer.UnpackMessagePackObject( stream ).AsTimestamp().ToDateTimeOffset(), + ( x, y ) => x.Equals( y ), + context => + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); + } + ); + } + + [Test] + public void TestDateTimeNative() { TestCore( DateTime.Now, @@ -251,13 +285,13 @@ public void TestDateTime() ( x, y ) => x.Equals( y ), context => { - Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + context.DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native; } ); } [Test] - public void TestDateTimeOffset() + public void TestDateTimeOffsetNative() { TestCore( DateTimeOffset.Now, @@ -269,7 +303,7 @@ public void TestDateTimeOffset() ( x, y ) => x.Equals( y ), context => { - Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + context.DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native; } ); } @@ -1204,7 +1238,7 @@ public void TestEmptyBytes() [Test] public void TestEmptyBytes_Classic() { - var context = NewSerializationContext( PackerCompatibilityOptions.Classic ); + var context = NewSerializationContext( PackerCompatibilityOptions.Classic, DateTimeConversionMethod.Native ); var serializer = this.CreateTarget( context ); using ( var stream = new MemoryStream() ) { @@ -4181,7 +4215,7 @@ public void TestFullPackableUnpackable_PackToMessageAndUnpackFromMessageUsed() [Test] public void TestBinary_ClassicContext() { - var context = NewSerializationContext( PackerCompatibilityOptions.Classic ); + var context = NewSerializationContext( PackerCompatibilityOptions.Classic, DateTimeConversionMethod.Native ); var serializer = context.GetSerializer(); using ( var stream = new MemoryStream() ) @@ -4194,7 +4228,7 @@ public void TestBinary_ClassicContext() [Test] public void TestBinary_ContextWithPackerCompatilibyOptionsNone() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext( PackerCompatibilityOptions.None, DateTimeConversionMethod.Timestamp ); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -4206,8 +4240,8 @@ public void TestBinary_ContextWithPackerCompatilibyOptionsNone() [Test] public void TestExt_ClassicContext() { - var context = NewSerializationContext( SerializationContext.CreateClassicContext().CompatibilityOptions.PackerCompatibilityOptions ); - context.Serializers.Register( new CustomDateTimeSerealizer() ); + var context = NewSerializationContext( SerializationContext.CreateClassicContext().CompatibilityOptions.PackerCompatibilityOptions, SerializationContext.CreateClassicContext().DefaultDateTimeConversionMethod ); + context.Serializers.RegisterOverride( new CustomDateTimeSerealizer() ); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -4223,7 +4257,7 @@ public void TestExt_ClassicContext() [Test] public void TestExt_DefaultContext() { - var context = NewSerializationContext( SerializationContext.Default.CompatibilityOptions.PackerCompatibilityOptions ); + var context = NewSerializationContext( SerializationContext.Default.CompatibilityOptions.PackerCompatibilityOptions, SerializationContext.Default.DefaultDateTimeConversionMethod ); context.Serializers.Register( new CustomDateTimeSerealizer() ); var serializer = CreateTarget( context ); @@ -4240,7 +4274,7 @@ public void TestExt_DefaultContext() [Test] public void TestExt_ContextWithPackerCompatilibyOptionsNone() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.Serializers.Register( new CustomDateTimeSerealizer() ); context.CompatibilityOptions.PackerCompatibilityOptions = PackerCompatibilityOptions.None; var serializer = CreateTarget( context ); @@ -4258,7 +4292,7 @@ public void TestExt_ContextWithPackerCompatilibyOptionsNone() [Test] public void TestAbstractTypes_KnownCollections_Default_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -4276,7 +4310,7 @@ public void TestAbstractTypes_KnownCollections_Default_Success() [Test] public void TestAbstractTypes_KnownCollections_WithoutRegistration_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Unregister( typeof( IList<> ) ); Assert.Throws( () => DoKnownCollectionTest( context ) ); } @@ -4284,7 +4318,7 @@ public void TestAbstractTypes_KnownCollections_WithoutRegistration_Fail() [Test] public void TestAbstractTypes_KnownCollections_ExplicitRegistration_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList<> ), typeof( Collection<> ) ); var serializer = CreateTarget( context ); @@ -4303,7 +4337,7 @@ public void TestAbstractTypes_KnownCollections_ExplicitRegistration_Success() [Test] public void TestAbstractTypes_KnownCollections_ExplicitRegistrationForSpecific_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( Collection ) ); var serializer1 = CreateTarget( context ); @@ -4336,7 +4370,7 @@ public void TestAbstractTypes_KnownCollections_ExplicitRegistrationForSpecific_S [Test] public void TestAbstractTypes_NotACollection_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); Assert.Throws( () => DoKnownCollectionTest( context ) ); } @@ -4418,7 +4452,7 @@ private static void TestCollectionInterfaceCore( byte[] data, Action asser { using ( var buffer = new MemoryStream(data) ) { - var serializer = MessagePackSerializer.Get( NewSerializationContext( PackerCompatibilityOptions.None ) ); + var serializer = MessagePackSerializer.Get( NewSerializationContext() ); var result = serializer.Unpack( buffer ); assertion( result ); } @@ -7827,7 +7861,7 @@ public class ExclusionAndInclusionSimulatously [Test] public void TestGenericDerived_Value_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericValueClass { @@ -7854,7 +7888,7 @@ public void TestGenericDerived_Value_Success() [Test] public void TestGenericDerived_Reference_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericReferenceClass { @@ -7881,7 +7915,7 @@ public void TestGenericDerived_Reference_Success() [Test] public void TestGenericRecordDerived_Value_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericRecordValueClass( 1, 2 ); var serializer = context.GetSerializer(); @@ -7900,7 +7934,7 @@ public void TestGenericRecordDerived_Value_Success() [Test] public void TestGenericRecordDerived_Reference_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericRecordReferenceClass( "1", "2" ); var serializer = context.GetSerializer(); @@ -7924,7 +7958,7 @@ public void TestGenericRecordDerived_Reference_Success() [Test] public void TestNullable_Primitive_NonNull_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = DateTime.UtcNow.Millisecond; var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -7940,7 +7974,7 @@ public void TestNullable_Primitive_NonNull_Success() [Test] public void TestNullable_Primitive_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = default( int? ); var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -7956,7 +7990,7 @@ public void TestNullable_Primitive_Null_Success() [Test] public void TestNullable_Complex_NonNull_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = TimeSpan.FromSeconds( DateTime.UtcNow.Millisecond ); var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -7972,7 +8006,7 @@ public void TestNullable_Complex_NonNull_Success() [Test] public void TestNullable_Complex_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = default( TimeSpan? ); var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -7988,7 +8022,7 @@ public void TestNullable_Complex_Null_Success() [Test] public void TestNullable_Enum_NonNull_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = DayOfWeek.Monday; var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -8004,7 +8038,7 @@ public void TestNullable_Enum_NonNull_Success() [Test] public void TestNullable_Enum_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = default( DayOfWeek? ); var serializer = MessagePackSerializer.CreateInternal( context, null ); @@ -9248,10 +9282,13 @@ public void TestToFromMessagePackObject_Complex() Assert.That( asDictionary[ "Data" ].IsTypeOf().Value ); Assert.That( asDictionary[ "Data" ].AsBinary(), Is.EqualTo( target.Data ) ); - Assert.That( asDictionary[ "TimeStamp" ].IsTypeOf().Value ); - Assert.That( asDictionary[ "TimeStamp" ].AsInt64(), Is.EqualTo( target.TimeStamp.ToBinary() ) ); + Assert.That( asDictionary[ "TimeStamp" ].IsTypeOf().Value ); + var timestamp = asDictionary[ "TimeStamp" ].AsTimestamp(); + Assert.That( timestamp.ToDateTime(), Is.EqualTo( target.TimeStamp.ToUniversalTime() ) ); - Assert.That( asDictionary[ "History" ].AsDictionary().Single().Key.AsInt64(), Is.EqualTo( target.History.Single().Key.ToBinary() ) ); + Assert.That( asDictionary[ "History" ].IsDictionary ); + var historyKey = asDictionary[ "History" ].AsDictionary().Single().Key.AsTimestamp(); + Assert.That( historyKey.ToDateTime(), Is.EqualTo( target.History.Single().Key.ToUniversalTime() ) ); Assert.That( asDictionary[ "History" ].AsDictionary().Single().Value.AsString(), Is.EqualTo( target.History.Single().Value ) ); Assert.That( asDictionary[ "Points" ].IsArray ); @@ -9684,7 +9721,7 @@ public void TestNoMembers_Fail() [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9710,7 +9747,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9735,7 +9772,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObjec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9761,7 +9798,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9786,7 +9823,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9812,7 +9849,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9837,7 +9874,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9863,7 +9900,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9888,7 +9925,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9914,7 +9951,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9939,7 +9976,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9965,7 +10002,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty_Suc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9990,7 +10027,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject_As [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ValueReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10016,7 +10053,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteField_Succes [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10041,7 +10078,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject_AsMpo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10067,7 +10104,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10092,7 +10129,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10118,7 +10155,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10143,7 +10180,7 @@ public void TestPolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10169,7 +10206,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConst [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10194,7 +10231,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10220,7 +10257,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10245,7 +10282,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObjec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10271,7 +10308,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10296,7 +10333,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -10322,7 +10359,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -10347,7 +10384,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -10373,7 +10410,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -10398,7 +10435,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -10424,7 +10461,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -10449,7 +10486,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10475,7 +10512,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10500,7 +10537,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_StringReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10526,7 +10563,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteField_Succe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10551,7 +10588,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject_AsMp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -10577,7 +10614,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -10602,7 +10639,7 @@ public void TestPolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstruct [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -10628,7 +10665,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropert [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -10653,7 +10690,7 @@ public void TestPolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -10679,7 +10716,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -10704,7 +10741,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructor [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10730,7 +10767,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10756,7 +10793,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10782,7 +10819,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10808,7 +10845,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10834,7 +10871,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10860,7 +10897,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10886,7 +10923,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10912,7 +10949,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10938,7 +10975,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10967,7 +11004,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10993,7 +11030,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWritePrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11019,7 +11056,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11045,7 +11082,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollect [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11071,7 +11108,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11097,7 +11134,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11123,7 +11160,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11149,7 +11186,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11175,7 +11212,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11201,7 +11238,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11227,7 +11264,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11253,7 +11290,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWritePrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11279,7 +11316,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11305,7 +11342,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollect [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11331,7 +11368,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11357,7 +11394,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11383,7 +11420,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11409,7 +11446,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11435,7 +11472,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11461,7 +11498,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11487,7 +11524,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11513,7 +11550,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11539,7 +11576,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -11553,7 +11590,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -11583,7 +11620,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -11600,7 +11637,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11626,7 +11663,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11652,7 +11689,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11678,7 +11715,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11704,7 +11741,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11730,7 +11767,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11756,7 +11793,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11782,7 +11819,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11808,7 +11845,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11834,7 +11871,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11860,7 +11897,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11886,7 +11923,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11912,7 +11949,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11938,7 +11975,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11964,7 +12001,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11990,7 +12027,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12016,7 +12053,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12042,7 +12079,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12068,7 +12105,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12094,7 +12131,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12120,7 +12157,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12146,7 +12183,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12172,7 +12209,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12198,7 +12235,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12224,7 +12261,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12250,7 +12287,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12276,7 +12313,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12302,7 +12339,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12328,7 +12365,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12354,7 +12391,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12380,7 +12417,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12406,7 +12443,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12432,7 +12469,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12458,7 +12495,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12484,7 +12521,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateS [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12510,7 +12547,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12536,7 +12573,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12562,7 +12599,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12588,7 +12625,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12614,7 +12651,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12640,7 +12677,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12666,7 +12703,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12692,7 +12729,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -12706,7 +12743,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -12736,7 +12773,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -12754,7 +12791,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12780,7 +12817,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12806,7 +12843,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -12832,7 +12869,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -12858,7 +12895,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -12884,7 +12921,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12910,7 +12947,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12936,7 +12973,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -12962,7 +12999,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -12988,7 +13025,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13014,7 +13051,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13040,7 +13077,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWritePr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13066,7 +13103,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -13092,7 +13129,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -13118,7 +13155,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSett [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -13144,7 +13181,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13170,7 +13207,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13196,7 +13233,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -13222,7 +13259,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -13248,7 +13285,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -13274,7 +13311,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13300,7 +13337,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13326,7 +13363,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -13352,7 +13389,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -13378,7 +13415,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -13404,7 +13441,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13430,7 +13467,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13456,7 +13493,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13482,7 +13519,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13508,7 +13545,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13534,7 +13571,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13560,7 +13597,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13586,7 +13623,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13612,7 +13649,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13638,7 +13675,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13664,7 +13701,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13690,7 +13727,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13716,7 +13753,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13742,7 +13779,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13768,7 +13805,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13794,7 +13831,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13820,7 +13857,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13846,7 +13883,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13872,7 +13909,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13898,7 +13935,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13924,7 +13961,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13950,7 +13987,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13976,7 +14013,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -14002,7 +14039,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -14028,7 +14065,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -14054,7 +14091,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14080,7 +14117,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14106,7 +14143,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14132,7 +14169,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14158,7 +14195,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14184,7 +14221,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14210,7 +14247,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14236,7 +14273,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14262,7 +14299,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14288,7 +14325,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14321,7 +14358,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14347,7 +14384,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14372,7 +14409,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14398,7 +14435,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14423,7 +14460,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14449,7 +14486,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14474,7 +14511,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14500,7 +14537,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14525,7 +14562,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14551,7 +14588,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14576,7 +14613,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14602,7 +14639,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty_S [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14627,7 +14664,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14653,7 +14690,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField_Succ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14678,7 +14715,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject_AsM [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14704,7 +14741,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14729,7 +14766,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14755,7 +14792,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14780,7 +14817,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14806,7 +14843,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14831,7 +14868,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14857,7 +14894,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14882,7 +14919,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14908,7 +14945,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14933,7 +14970,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -14959,7 +14996,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -14984,7 +15021,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -15010,7 +15047,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -15035,7 +15072,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -15061,7 +15098,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -15086,7 +15123,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15112,7 +15149,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -15137,7 +15174,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15163,7 +15200,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField_Suc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -15188,7 +15225,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject_As [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -15214,7 +15251,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -15239,7 +15276,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstru [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -15265,7 +15302,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -15290,7 +15327,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -15316,7 +15353,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -15341,7 +15378,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstruct [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15367,7 +15404,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -15393,7 +15430,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15419,7 +15456,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -15445,7 +15482,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObje [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15471,7 +15508,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15497,7 +15534,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetterPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15523,7 +15560,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetter [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15549,7 +15586,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropert [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyFieldAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15575,7 +15612,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15604,7 +15641,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15630,7 +15667,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15656,7 +15693,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15682,7 +15719,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15708,7 +15745,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15734,7 +15771,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15760,7 +15797,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15786,7 +15823,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15812,7 +15849,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15838,7 +15875,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15864,7 +15901,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15890,7 +15927,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15916,7 +15953,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15942,7 +15979,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15968,7 +16005,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15994,7 +16031,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16020,7 +16057,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16046,7 +16083,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16072,7 +16109,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16098,7 +16135,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16124,7 +16161,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16150,7 +16187,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16176,7 +16213,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -16190,7 +16227,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCol [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -16220,7 +16257,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -16237,7 +16274,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16263,7 +16300,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16289,7 +16326,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16315,7 +16352,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16341,7 +16378,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16367,7 +16404,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16393,7 +16430,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16419,7 +16456,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16445,7 +16482,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16471,7 +16508,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16497,7 +16534,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16523,7 +16560,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16549,7 +16586,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16575,7 +16612,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16601,7 +16638,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16627,7 +16664,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16653,7 +16690,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16679,7 +16716,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16705,7 +16742,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16731,7 +16768,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16757,7 +16794,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16783,7 +16820,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16809,7 +16846,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16835,7 +16872,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16861,7 +16898,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16887,7 +16924,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16913,7 +16950,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16939,7 +16976,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16965,7 +17002,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemG [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16991,7 +17028,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -17017,7 +17054,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17043,7 +17080,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17069,7 +17106,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17095,7 +17132,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17121,7 +17158,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -17147,7 +17184,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17173,7 +17210,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17199,7 +17236,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17225,7 +17262,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17251,7 +17288,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -17277,7 +17314,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17303,7 +17340,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17329,7 +17366,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -17343,7 +17380,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCol [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -17373,7 +17410,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -17391,7 +17428,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17417,7 +17454,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17443,7 +17480,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -17469,7 +17506,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -17495,7 +17532,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetter [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -17521,7 +17558,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17547,7 +17584,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17573,7 +17610,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17599,7 +17636,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17625,7 +17662,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateS [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17651,7 +17688,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17677,7 +17714,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17703,7 +17740,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -17729,7 +17766,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -17755,7 +17792,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -17781,7 +17818,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17807,7 +17844,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17833,7 +17870,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -17859,7 +17896,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -17885,7 +17922,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -17911,7 +17948,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17937,7 +17974,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17963,7 +18000,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -17989,7 +18026,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -18015,7 +18052,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -18041,7 +18078,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18067,7 +18104,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18093,7 +18130,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18119,7 +18156,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18145,7 +18182,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18171,7 +18208,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18197,7 +18234,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18223,7 +18260,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18249,7 +18286,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18275,7 +18312,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPriv [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18301,7 +18338,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18327,7 +18364,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18353,7 +18390,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18379,7 +18416,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18405,7 +18442,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18431,7 +18468,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18457,7 +18494,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18483,7 +18520,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18509,7 +18546,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18535,7 +18572,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18561,7 +18598,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18587,7 +18624,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18613,7 +18650,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -18639,7 +18676,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -18665,7 +18702,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -18691,7 +18728,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18717,7 +18754,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18743,7 +18780,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18769,7 +18806,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18795,7 +18832,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPriv [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18821,7 +18858,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18847,7 +18884,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18873,7 +18910,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18899,7 +18936,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18925,7 +18962,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18953,7 +18990,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeMixed_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeMixed(); target.NormalVanilla = "ABC"; target.NormalRuntime = new FileEntry { Name = "File", Size = 1 }; @@ -19018,7 +19055,7 @@ public void TestPolymorphicMemberTypeMixed_Success() [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeMixed_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeMixed(); var serializer = context.GetSerializer(); @@ -19053,7 +19090,7 @@ public void TestPolymorphicMemberTypeMixed_Null_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberNoAttribute { Value = new FileEntry { Name = "file", Size = 1 } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19063,7 +19100,7 @@ public void TestAbstractClassMemberNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberKnownType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -19085,7 +19122,7 @@ public void TestAbstractClassMemberKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberRuntimeType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -19107,7 +19144,7 @@ public void TestAbstractClassMemberRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemNoAttribute { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19117,7 +19154,7 @@ public void TestAbstractClassListItemNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemKnownType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -19140,7 +19177,7 @@ public void TestAbstractClassListItemKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemRuntimeType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -19163,7 +19200,7 @@ public void TestAbstractClassListItemRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyNoAttribute { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19173,7 +19210,7 @@ public void TestAbstractClassDictKeyNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyKnownType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -19196,7 +19233,7 @@ public void TestAbstractClassDictKeyKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyRuntimeType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -19219,7 +19256,7 @@ public void TestAbstractClassDictKeyRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberNoAttribute { Value = new FileEntry { Name = "file", Size = 1 } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19229,7 +19266,7 @@ public void TestInterfaceMemberNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberKnownType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -19251,7 +19288,7 @@ public void TestInterfaceMemberKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberRuntimeType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -19273,7 +19310,7 @@ public void TestInterfaceMemberRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemNoAttribute { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19283,7 +19320,7 @@ public void TestInterfaceListItemNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemKnownType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -19306,7 +19343,7 @@ public void TestInterfaceListItemKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemRuntimeType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -19329,7 +19366,7 @@ public void TestInterfaceListItemRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyNoAttribute { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19339,7 +19376,7 @@ public void TestInterfaceDictKeyNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyKnownType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -19362,7 +19399,7 @@ public void TestInterfaceDictKeyKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyRuntimeType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -19385,7 +19422,7 @@ public void TestInterfaceDictKeyRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionNoAttribute_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionNoAttribute { Value = new EchoKeyedCollection { "ABC" } }; @@ -19409,7 +19446,7 @@ public void TestAbstractClassCollectionNoAttribute_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionKnownType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19433,7 +19470,7 @@ public void TestAbstractClassCollectionKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionRuntimeType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19457,7 +19494,7 @@ public void TestAbstractClassCollectionRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionNoAttribute_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionNoAttribute { Value = new EchoKeyedCollection { "ABC" } }; @@ -19481,7 +19518,7 @@ public void TestInterfaceCollectionNoAttribute_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionKnownType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19505,7 +19542,7 @@ public void TestInterfaceCollectionKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionRuntimeType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19529,7 +19566,7 @@ public void TestInterfaceCollectionRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestTupleAbstractType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new TupleAbstractType { Value = Tuple.Create( new FileEntry { Name = "1", Size = 1 } as AbstractFileSystemEntry, new FileEntry { Name = "2", Size = 2 } as IFileSystemEntry, new FileEntry { Name = "3", Size = 3 } as AbstractFileSystemEntry, new FileEntry { Name = "4", Size = 4 } as IFileSystemEntry ) }; var serializer = context.GetSerializer(); @@ -19551,7 +19588,7 @@ public void TestTupleAbstractType_Success() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownMember_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownMember(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19560,7 +19597,7 @@ public void TestAttribute_DuplicatedKnownMember_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownCollectionItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownCollectionItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19569,7 +19606,7 @@ public void TestAttribute_DuplicatedKnownCollectionItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownDictionaryKey_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownDictionaryKey(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19579,7 +19616,7 @@ public void TestAttribute_DuplicatedKnownDictionaryKey_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownTupleItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownTupleItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19589,7 +19626,7 @@ public void TestAttribute_DuplicatedKnownTupleItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeMember_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeMember(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19598,7 +19635,7 @@ public void TestAttribute_KnownAndRuntimeMember_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeCollectionItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeCollectionItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19607,7 +19644,7 @@ public void TestAttribute_KnownAndRuntimeCollectionItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeDictionaryKey_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeDictionaryKey(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19617,7 +19654,7 @@ public void TestAttribute_KnownAndRuntimeDictionaryKey_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeTupleItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeTupleItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19627,7 +19664,7 @@ public void TestAttribute_KnownAndRuntimeTupleItem_Fail() [Category( "PolymorphicSerialization" )] public void TestGlobalNamespace() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new HasGlobalNamespaceType { GlobalType = new TypeInGlobalNamespace { Value = "ABC" } }; var serializer = context.GetSerializer(); @@ -19650,7 +19687,7 @@ public void TestGlobalNamespace() [Category( "PolymorphicSerialization" )] public async Task TestGlobalNamespaceAsync() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new HasGlobalNamespaceType { GlobalType = new TypeInGlobalNamespace { Value = "ABC" } }; var serializer = context.GetSerializer(); @@ -19684,7 +19721,7 @@ private static void SetUpDefaultCollectionsForPolymorphism( SerializationContext [Category( "PolymorphicSerialization" )] public void TestPolymorphismAttributesInType() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); context.GetSerializer(); context.GetSerializer(); @@ -19697,7 +19734,7 @@ public void TestPolymorphismAttributesInType() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19723,7 +19760,7 @@ public void TestKnownType_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19749,7 +19786,7 @@ public void TestKnownType_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19777,7 +19814,7 @@ public void TestKnownType_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19805,7 +19842,7 @@ public void TestKnownType_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19832,7 +19869,7 @@ public void TestKnownType_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19859,7 +19896,7 @@ public void TestKnownType_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19886,7 +19923,7 @@ public void TestRuntimeType_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19913,7 +19950,7 @@ public void TestRuntimeType_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19936,7 +19973,7 @@ public void TestRuntimeType_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19959,7 +19996,7 @@ public void TestRuntimeType_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19986,7 +20023,7 @@ public void TestRuntimeType_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20013,7 +20050,7 @@ public void TestRuntimeType_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20039,7 +20076,7 @@ public void TestKnownTypeCollection_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20065,7 +20102,7 @@ public void TestKnownTypeCollection_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20093,7 +20130,7 @@ public void TestKnownTypeCollection_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20121,7 +20158,7 @@ public void TestKnownTypeCollection_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20148,7 +20185,7 @@ public void TestKnownTypeCollection_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20175,7 +20212,7 @@ public void TestKnownTypeCollection_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20202,7 +20239,7 @@ public void TestRuntimeTypeCollection_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20229,7 +20266,7 @@ public void TestRuntimeTypeCollection_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20252,7 +20289,7 @@ public void TestRuntimeTypeCollection_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20275,7 +20312,7 @@ public void TestRuntimeTypeCollection_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20302,7 +20339,7 @@ public void TestRuntimeTypeCollection_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20329,7 +20366,7 @@ public void TestRuntimeTypeCollection_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20355,7 +20392,7 @@ public void TestKnownTypeDictionary_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20381,7 +20418,7 @@ public void TestKnownTypeDictionary_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20409,7 +20446,7 @@ public void TestKnownTypeDictionary_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20437,7 +20474,7 @@ public void TestKnownTypeDictionary_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20464,7 +20501,7 @@ public void TestKnownTypeDictionary_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20491,7 +20528,7 @@ public void TestKnownTypeDictionary_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20518,7 +20555,7 @@ public void TestRuntimeTypeDictionary_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20545,7 +20582,7 @@ public void TestRuntimeTypeDictionary_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20568,7 +20605,7 @@ public void TestRuntimeTypeDictionary_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20591,7 +20628,7 @@ public void TestRuntimeTypeDictionary_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20618,7 +20655,7 @@ public void TestRuntimeTypeDictionary_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20650,7 +20687,7 @@ public void TestRuntimeTypeDictionary_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_PublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPublicStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20669,7 +20706,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_PublicStaticMethod_OK() [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_NonPublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPrivateStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20688,7 +20725,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_NonPublicStaticMethod_O [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_PublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPublicInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20707,7 +20744,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_PublicInstanceMethod_OK [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_NonPublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPrivateInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20726,7 +20763,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_NonPublicInstanceMethod [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_PublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPublicStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20745,7 +20782,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_PublicStaticMethod_O [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPrivateStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20764,7 +20801,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicStaticMetho [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_PublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPublicInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20783,7 +20820,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_PublicInstanceMethod [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPrivateInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20802,7 +20839,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicInstanceMet [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoMethods_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierNoMethods { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20817,7 +20854,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoMethods_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseVoidReturnMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierVoidReturnMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20832,7 +20869,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseVoidReturnMethod_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoParametersMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierNoParametersMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20847,7 +20884,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoParametersMethod_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseExtraParametersMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierExtraParametersMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20862,7 +20899,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseExtraParametersMethod_Fai [Category( "PolymorphicSerialization" )] public void TestTypeVerifierDoesNotLoadTypeItself() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var serializer = context.GetSerializer(); using ( var buffer = new MemoryStream() ) diff --git a/test/MsgPack.UnitTest/Serialization/MapGenerationBasedAutoMessagePackSerializerTest.cs b/test/MsgPack.UnitTest/Serialization/MapGenerationBasedAutoMessagePackSerializerTest.cs index 383aa252f..e7e6f4462 100644 --- a/test/MsgPack.UnitTest/Serialization/MapGenerationBasedAutoMessagePackSerializerTest.cs +++ b/test/MsgPack.UnitTest/Serialization/MapGenerationBasedAutoMessagePackSerializerTest.cs @@ -88,7 +88,12 @@ private static SerializationContext GetSerializationContext() return context; } - private static SerializationContext NewSerializationContext( PackerCompatibilityOptions compatibilityOptions ) + private static SerializationContext NewSerializationContext() + { + return NewSerializationContext( PackerCompatibilityOptions.None, DateTimeConversionMethod.Timestamp ); + } + + private static SerializationContext NewSerializationContext( PackerCompatibilityOptions compatibilityOptions, DateTimeConversionMethod dateTimeConversionMethod ) { var context = PreGeneratedSerializerActivator.CreateContext( SerializationMethod.Array, compatibilityOptions ); // Register serializers for abstract class testing @@ -170,6 +175,34 @@ public void TestString() [Test] public void TestDateTime() + { + TestCore( + DateTime.UtcNow, + stream => MessagePackSerializer.UnpackMessagePackObject( stream ).AsTimestamp().ToDateTime(), + ( x, y ) => x.Equals( y ), + context => + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); + } + ); + } + + [Test] + public void TestDateTimeOffset() + { + TestCore( + DateTimeOffset.UtcNow, + stream => MessagePackSerializer.UnpackMessagePackObject( stream ).AsTimestamp().ToDateTimeOffset(), + ( x, y ) => x.Equals( y ), + context => + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); + } + ); + } + + [Test] + public void TestDateTimeNative() { TestCore( DateTime.Now, @@ -177,13 +210,13 @@ public void TestDateTime() ( x, y ) => x.Equals( y ), context => { - Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + context.DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native; } ); } [Test] - public void TestDateTimeOffset() + public void TestDateTimeOffsetNative() { TestCore( DateTimeOffset.Now, @@ -195,7 +228,7 @@ public void TestDateTimeOffset() ( x, y ) => x.Equals( y ), context => { - Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + context.DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native; } ); } @@ -541,7 +574,7 @@ public void TestEmptyBytes() [Test] public void TestEmptyBytes_Classic() { - var context = NewSerializationContext( PackerCompatibilityOptions.Classic ); + var context = NewSerializationContext( PackerCompatibilityOptions.Classic, DateTimeConversionMethod.Native ); var serializer = this.CreateTarget( context ); using ( var stream = new MemoryStream() ) { @@ -978,8 +1011,8 @@ public void TestIDictionaryValueType_Success() [Test] public void TestExt_ClassicContext() { - var context = NewSerializationContext( SerializationContext.CreateClassicContext().CompatibilityOptions.PackerCompatibilityOptions ); - context.Serializers.Register( new CustomDateTimeSerealizer() ); + var context = NewSerializationContext( SerializationContext.CreateClassicContext().CompatibilityOptions.PackerCompatibilityOptions, SerializationContext.CreateClassicContext().DefaultDateTimeConversionMethod ); + context.Serializers.RegisterOverride( new CustomDateTimeSerealizer() ); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -995,7 +1028,7 @@ public void TestExt_ClassicContext() [Test] public void TestExt_DefaultContext() { - var context = NewSerializationContext( SerializationContext.Default.CompatibilityOptions.PackerCompatibilityOptions ); + var context = NewSerializationContext( SerializationContext.Default.CompatibilityOptions.PackerCompatibilityOptions, SerializationContext.Default.DefaultDateTimeConversionMethod ); context.Serializers.Register( new CustomDateTimeSerealizer() ); var serializer = CreateTarget( context ); @@ -1012,7 +1045,7 @@ public void TestExt_DefaultContext() [Test] public void TestExt_ContextWithPackerCompatilibyOptionsNone() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.Serializers.Register( new CustomDateTimeSerealizer() ); context.CompatibilityOptions.PackerCompatibilityOptions = PackerCompatibilityOptions.None; var serializer = CreateTarget( context ); @@ -1030,7 +1063,7 @@ public void TestExt_ContextWithPackerCompatilibyOptionsNone() [Test] public void TestAbstractTypes_KnownCollections_Default_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -1048,7 +1081,7 @@ public void TestAbstractTypes_KnownCollections_Default_Success() [Test] public void TestAbstractTypes_KnownCollections_WithoutRegistration_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Unregister( typeof( IList<> ) ); Assert.Throws( () => DoKnownCollectionTest( context ) ); } @@ -1056,7 +1089,7 @@ public void TestAbstractTypes_KnownCollections_WithoutRegistration_Fail() [Test] public void TestAbstractTypes_KnownCollections_ExplicitRegistration_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList<> ), typeof( Collection<> ) ); var serializer = CreateTarget( context ); @@ -1075,7 +1108,7 @@ public void TestAbstractTypes_KnownCollections_ExplicitRegistration_Success() [Test] public void TestAbstractTypes_KnownCollections_ExplicitRegistrationForSpecific_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( Collection ) ); var serializer1 = CreateTarget( context ); @@ -1108,7 +1141,7 @@ public void TestAbstractTypes_KnownCollections_ExplicitRegistrationForSpecific_S [Test] public void TestAbstractTypes_NotACollection_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); Assert.Throws( () => DoKnownCollectionTest( context ) ); } @@ -1190,7 +1223,7 @@ private static void TestCollectionInterfaceCore( byte[] data, Action asser { using ( var buffer = new MemoryStream(data) ) { - var serializer = MessagePackSerializer.Get( NewSerializationContext( PackerCompatibilityOptions.None ) ); + var serializer = MessagePackSerializer.Get( NewSerializationContext() ); var result = serializer.Unpack( buffer ); assertion( result ); } @@ -5451,10 +5484,13 @@ public void TestToFromMessagePackObject_Complex() Assert.That( asDictionary[ "Data" ].IsTypeOf().Value ); Assert.That( asDictionary[ "Data" ].AsBinary(), Is.EqualTo( target.Data ) ); - Assert.That( asDictionary[ "TimeStamp" ].IsTypeOf().Value ); - Assert.That( asDictionary[ "TimeStamp" ].AsInt64(), Is.EqualTo( target.TimeStamp.ToBinary() ) ); + Assert.That( asDictionary[ "TimeStamp" ].IsTypeOf().Value ); + var timestamp = asDictionary[ "TimeStamp" ].AsTimestamp(); + Assert.That( timestamp.ToDateTime(), Is.EqualTo( target.TimeStamp.ToUniversalTime() ) ); - Assert.That( asDictionary[ "History" ].AsDictionary().Single().Key.AsInt64(), Is.EqualTo( target.History.Single().Key.ToBinary() ) ); + Assert.That( asDictionary[ "History" ].IsDictionary ); + var historyKey = asDictionary[ "History" ].AsDictionary().Single().Key.AsTimestamp(); + Assert.That( historyKey.ToDateTime(), Is.EqualTo( target.History.Single().Key.ToUniversalTime() ) ); Assert.That( asDictionary[ "History" ].AsDictionary().Single().Value.AsString(), Is.EqualTo( target.History.Single().Value ) ); Assert.That( asDictionary[ "Points" ].IsArray ); @@ -5887,7 +5923,7 @@ public void TestNoMembers_Fail() [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -5913,7 +5949,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -5938,7 +5974,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObjec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -5964,7 +6000,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -5989,7 +6025,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -6015,7 +6051,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -6040,7 +6076,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -6066,7 +6102,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -6091,7 +6127,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -6117,7 +6153,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -6142,7 +6178,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -6168,7 +6204,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty_Suc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -6193,7 +6229,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject_As [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ValueReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -6219,7 +6255,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteField_Succes [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -6244,7 +6280,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject_AsMpo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -6270,7 +6306,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -6295,7 +6331,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -6321,7 +6357,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -6346,7 +6382,7 @@ public void TestPolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -6372,7 +6408,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConst [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -6397,7 +6433,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -6423,7 +6459,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -6448,7 +6484,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObjec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -6474,7 +6510,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -6499,7 +6535,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -6525,7 +6561,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -6550,7 +6586,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -6576,7 +6612,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -6601,7 +6637,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -6627,7 +6663,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -6652,7 +6688,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -6678,7 +6714,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -6703,7 +6739,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_StringReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -6729,7 +6765,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteField_Succe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -6754,7 +6790,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject_AsMp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -6780,7 +6816,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -6805,7 +6841,7 @@ public void TestPolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstruct [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -6831,7 +6867,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropert [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -6856,7 +6892,7 @@ public void TestPolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -6882,7 +6918,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -6907,7 +6943,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructor [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -6933,7 +6969,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -6959,7 +6995,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -6985,7 +7021,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -7011,7 +7047,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -7037,7 +7073,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -7063,7 +7099,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -7089,7 +7125,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -7115,7 +7151,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -7141,7 +7177,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -7170,7 +7206,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7196,7 +7232,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWritePrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -7222,7 +7258,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7248,7 +7284,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollect [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7274,7 +7310,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -7300,7 +7336,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7326,7 +7362,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -7352,7 +7388,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7378,7 +7414,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7404,7 +7440,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -7430,7 +7466,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7456,7 +7492,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWritePrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -7482,7 +7518,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7508,7 +7544,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollect [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7534,7 +7570,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -7560,7 +7596,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7586,7 +7622,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -7612,7 +7648,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7638,7 +7674,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7664,7 +7700,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -7690,7 +7726,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7716,7 +7752,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -7742,7 +7778,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -7756,7 +7792,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -7786,7 +7822,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -7803,7 +7839,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7829,7 +7865,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -7855,7 +7891,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7881,7 +7917,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7907,7 +7943,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -7933,7 +7969,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -7959,7 +7995,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -7985,7 +8021,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8011,7 +8047,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8037,7 +8073,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -8063,7 +8099,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8089,7 +8125,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -8115,7 +8151,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8141,7 +8177,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8167,7 +8203,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -8193,7 +8229,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8219,7 +8255,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -8245,7 +8281,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8271,7 +8307,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8297,7 +8333,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -8323,7 +8359,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8349,7 +8385,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -8375,7 +8411,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8401,7 +8437,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8427,7 +8463,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -8453,7 +8489,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8479,7 +8515,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -8505,7 +8541,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8531,7 +8567,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8557,7 +8593,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -8583,7 +8619,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8609,7 +8645,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -8635,7 +8671,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8661,7 +8697,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8687,7 +8723,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateS [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -8713,7 +8749,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8739,7 +8775,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -8765,7 +8801,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8791,7 +8827,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8817,7 +8853,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -8843,7 +8879,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8869,7 +8905,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -8895,7 +8931,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -8909,7 +8945,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -8939,7 +8975,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -8957,7 +8993,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -8983,7 +9019,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9009,7 +9045,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -9035,7 +9071,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -9061,7 +9097,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -9087,7 +9123,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9113,7 +9149,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9139,7 +9175,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -9165,7 +9201,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -9191,7 +9227,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -9217,7 +9253,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9243,7 +9279,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWritePr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9269,7 +9305,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -9295,7 +9331,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -9321,7 +9357,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSett [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -9347,7 +9383,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9373,7 +9409,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9399,7 +9435,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -9425,7 +9461,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -9451,7 +9487,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -9477,7 +9513,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9503,7 +9539,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9529,7 +9565,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -9555,7 +9591,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -9581,7 +9617,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -9607,7 +9643,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9633,7 +9669,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9659,7 +9695,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -9685,7 +9721,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -9711,7 +9747,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -9737,7 +9773,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9763,7 +9799,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9789,7 +9825,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -9815,7 +9851,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -9841,7 +9877,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -9867,7 +9903,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9893,7 +9929,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9919,7 +9955,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -9945,7 +9981,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -9971,7 +10007,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -9997,7 +10033,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10023,7 +10059,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10049,7 +10085,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -10075,7 +10111,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -10101,7 +10137,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -10127,7 +10163,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10153,7 +10189,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10179,7 +10215,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -10205,7 +10241,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -10231,7 +10267,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -10257,7 +10293,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10283,7 +10319,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10309,7 +10345,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -10335,7 +10371,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -10361,7 +10397,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -10387,7 +10423,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10413,7 +10449,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10439,7 +10475,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -10465,7 +10501,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -10491,7 +10527,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -10524,7 +10560,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10550,7 +10586,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10575,7 +10611,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10601,7 +10637,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10626,7 +10662,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -10652,7 +10688,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -10677,7 +10713,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -10703,7 +10739,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -10728,7 +10764,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -10754,7 +10790,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -10779,7 +10815,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10805,7 +10841,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty_S [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10830,7 +10866,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10856,7 +10892,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField_Succ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10881,7 +10917,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject_AsM [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10907,7 +10943,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10932,7 +10968,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10958,7 +10994,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10983,7 +11019,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -11009,7 +11045,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -11034,7 +11070,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11060,7 +11096,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -11085,7 +11121,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11111,7 +11147,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -11136,7 +11172,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -11162,7 +11198,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -11187,7 +11223,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -11213,7 +11249,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -11238,7 +11274,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -11264,7 +11300,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -11289,7 +11325,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11315,7 +11351,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -11340,7 +11376,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11366,7 +11402,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField_Suc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -11391,7 +11427,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject_As [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -11417,7 +11453,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -11442,7 +11478,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstru [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -11468,7 +11504,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -11493,7 +11529,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -11519,7 +11555,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -11544,7 +11580,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstruct [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11570,7 +11606,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -11596,7 +11632,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11622,7 +11658,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -11648,7 +11684,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObje [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -11674,7 +11710,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -11700,7 +11736,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetterPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -11726,7 +11762,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetter [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -11752,7 +11788,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropert [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyFieldAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -11778,7 +11814,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -11807,7 +11843,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11833,7 +11869,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11859,7 +11895,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11885,7 +11921,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11911,7 +11947,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11937,7 +11973,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11963,7 +11999,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11989,7 +12025,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12015,7 +12051,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12041,7 +12077,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12067,7 +12103,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12093,7 +12129,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12119,7 +12155,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12145,7 +12181,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12171,7 +12207,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12197,7 +12233,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12223,7 +12259,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12249,7 +12285,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12275,7 +12311,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12301,7 +12337,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12327,7 +12363,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12353,7 +12389,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12379,7 +12415,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -12393,7 +12429,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCol [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -12423,7 +12459,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -12440,7 +12476,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12466,7 +12502,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12492,7 +12528,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12518,7 +12554,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12544,7 +12580,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12570,7 +12606,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12596,7 +12632,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12622,7 +12658,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12648,7 +12684,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12674,7 +12710,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12700,7 +12736,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12726,7 +12762,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12752,7 +12788,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12778,7 +12814,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12804,7 +12840,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12830,7 +12866,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12856,7 +12892,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12882,7 +12918,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12908,7 +12944,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12934,7 +12970,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12960,7 +12996,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12986,7 +13022,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13012,7 +13048,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13038,7 +13074,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13064,7 +13100,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -13090,7 +13126,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13116,7 +13152,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13142,7 +13178,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13168,7 +13204,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemG [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13194,7 +13230,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -13220,7 +13256,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13246,7 +13282,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13272,7 +13308,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13298,7 +13334,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13324,7 +13360,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -13350,7 +13386,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13376,7 +13412,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13402,7 +13438,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13428,7 +13464,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13454,7 +13490,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -13480,7 +13516,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13506,7 +13542,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13532,7 +13568,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -13546,7 +13582,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCol [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -13576,7 +13612,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -13594,7 +13630,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13620,7 +13656,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13646,7 +13682,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -13672,7 +13708,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -13698,7 +13734,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetter [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -13724,7 +13760,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13750,7 +13786,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13776,7 +13812,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13802,7 +13838,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13828,7 +13864,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateS [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13854,7 +13890,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13880,7 +13916,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13906,7 +13942,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -13932,7 +13968,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -13958,7 +13994,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -13984,7 +14020,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14010,7 +14046,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14036,7 +14072,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -14062,7 +14098,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -14088,7 +14124,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -14114,7 +14150,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14140,7 +14176,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14166,7 +14202,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -14192,7 +14228,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -14218,7 +14254,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -14244,7 +14280,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14270,7 +14306,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14296,7 +14332,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -14322,7 +14358,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -14348,7 +14384,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -14374,7 +14410,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14400,7 +14436,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14426,7 +14462,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14452,7 +14488,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14478,7 +14514,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPriv [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14504,7 +14540,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14530,7 +14566,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14556,7 +14592,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -14582,7 +14618,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -14608,7 +14644,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -14634,7 +14670,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14660,7 +14696,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14686,7 +14722,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14712,7 +14748,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14738,7 +14774,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14764,7 +14800,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14790,7 +14826,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14816,7 +14852,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -14842,7 +14878,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -14868,7 +14904,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -14894,7 +14930,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14920,7 +14956,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14946,7 +14982,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14972,7 +15008,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14998,7 +15034,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPriv [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -15024,7 +15060,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15050,7 +15086,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15076,7 +15112,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -15102,7 +15138,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -15128,7 +15164,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -15156,7 +15192,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeMixed_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeMixed(); target.NormalVanilla = "ABC"; target.NormalRuntime = new FileEntry { Name = "File", Size = 1 }; @@ -15221,7 +15257,7 @@ public void TestPolymorphicMemberTypeMixed_Success() [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeMixed_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeMixed(); var serializer = context.GetSerializer(); @@ -15256,7 +15292,7 @@ public void TestPolymorphicMemberTypeMixed_Null_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberNoAttribute { Value = new FileEntry { Name = "file", Size = 1 } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -15266,7 +15302,7 @@ public void TestAbstractClassMemberNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberKnownType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -15288,7 +15324,7 @@ public void TestAbstractClassMemberKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberRuntimeType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -15310,7 +15346,7 @@ public void TestAbstractClassMemberRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemNoAttribute { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -15320,7 +15356,7 @@ public void TestAbstractClassListItemNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemKnownType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -15343,7 +15379,7 @@ public void TestAbstractClassListItemKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemRuntimeType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -15366,7 +15402,7 @@ public void TestAbstractClassListItemRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyNoAttribute { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -15376,7 +15412,7 @@ public void TestAbstractClassDictKeyNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyKnownType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -15399,7 +15435,7 @@ public void TestAbstractClassDictKeyKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyRuntimeType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -15422,7 +15458,7 @@ public void TestAbstractClassDictKeyRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberNoAttribute { Value = new FileEntry { Name = "file", Size = 1 } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -15432,7 +15468,7 @@ public void TestInterfaceMemberNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberKnownType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -15454,7 +15490,7 @@ public void TestInterfaceMemberKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberRuntimeType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -15476,7 +15512,7 @@ public void TestInterfaceMemberRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemNoAttribute { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -15486,7 +15522,7 @@ public void TestInterfaceListItemNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemKnownType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -15509,7 +15545,7 @@ public void TestInterfaceListItemKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemRuntimeType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -15532,7 +15568,7 @@ public void TestInterfaceListItemRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyNoAttribute { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -15542,7 +15578,7 @@ public void TestInterfaceDictKeyNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyKnownType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -15565,7 +15601,7 @@ public void TestInterfaceDictKeyKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyRuntimeType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -15588,7 +15624,7 @@ public void TestInterfaceDictKeyRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionNoAttribute_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionNoAttribute { Value = new EchoKeyedCollection { "ABC" } }; @@ -15612,7 +15648,7 @@ public void TestAbstractClassCollectionNoAttribute_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionKnownType { Value = new EchoKeyedCollection { "ABC" } }; @@ -15636,7 +15672,7 @@ public void TestAbstractClassCollectionKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionRuntimeType { Value = new EchoKeyedCollection { "ABC" } }; @@ -15660,7 +15696,7 @@ public void TestAbstractClassCollectionRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionNoAttribute_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionNoAttribute { Value = new EchoKeyedCollection { "ABC" } }; @@ -15684,7 +15720,7 @@ public void TestInterfaceCollectionNoAttribute_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionKnownType { Value = new EchoKeyedCollection { "ABC" } }; @@ -15708,7 +15744,7 @@ public void TestInterfaceCollectionKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionRuntimeType { Value = new EchoKeyedCollection { "ABC" } }; @@ -15732,7 +15768,7 @@ public void TestInterfaceCollectionRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestTupleAbstractType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new TupleAbstractType { Value = Tuple.Create( new FileEntry { Name = "1", Size = 1 } as AbstractFileSystemEntry, new FileEntry { Name = "2", Size = 2 } as IFileSystemEntry, new FileEntry { Name = "3", Size = 3 } as AbstractFileSystemEntry, new FileEntry { Name = "4", Size = 4 } as IFileSystemEntry ) }; var serializer = context.GetSerializer(); @@ -15754,7 +15790,7 @@ public void TestTupleAbstractType_Success() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownMember_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownMember(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -15763,7 +15799,7 @@ public void TestAttribute_DuplicatedKnownMember_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownCollectionItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownCollectionItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -15772,7 +15808,7 @@ public void TestAttribute_DuplicatedKnownCollectionItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownDictionaryKey_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownDictionaryKey(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -15782,7 +15818,7 @@ public void TestAttribute_DuplicatedKnownDictionaryKey_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownTupleItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownTupleItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -15792,7 +15828,7 @@ public void TestAttribute_DuplicatedKnownTupleItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeMember_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeMember(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -15801,7 +15837,7 @@ public void TestAttribute_KnownAndRuntimeMember_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeCollectionItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeCollectionItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -15810,7 +15846,7 @@ public void TestAttribute_KnownAndRuntimeCollectionItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeDictionaryKey_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeDictionaryKey(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -15820,7 +15856,7 @@ public void TestAttribute_KnownAndRuntimeDictionaryKey_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeTupleItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeTupleItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -15830,7 +15866,7 @@ public void TestAttribute_KnownAndRuntimeTupleItem_Fail() [Category( "PolymorphicSerialization" )] public void TestGlobalNamespace() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new HasGlobalNamespaceType { GlobalType = new TypeInGlobalNamespace { Value = "ABC" } }; var serializer = context.GetSerializer(); @@ -15853,7 +15889,7 @@ public void TestGlobalNamespace() [Category( "PolymorphicSerialization" )] public async Task TestGlobalNamespaceAsync() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new HasGlobalNamespaceType { GlobalType = new TypeInGlobalNamespace { Value = "ABC" } }; var serializer = context.GetSerializer(); @@ -15887,7 +15923,7 @@ private static void SetUpDefaultCollectionsForPolymorphism( SerializationContext [Category( "PolymorphicSerialization" )] public void TestPolymorphismAttributesInType() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); context.GetSerializer(); context.GetSerializer(); @@ -15900,7 +15936,7 @@ public void TestPolymorphismAttributesInType() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -15926,7 +15962,7 @@ public void TestKnownType_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -15952,7 +15988,7 @@ public void TestKnownType_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -15980,7 +16016,7 @@ public void TestKnownType_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16008,7 +16044,7 @@ public void TestKnownType_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16035,7 +16071,7 @@ public void TestKnownType_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16062,7 +16098,7 @@ public void TestKnownType_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16089,7 +16125,7 @@ public void TestRuntimeType_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16116,7 +16152,7 @@ public void TestRuntimeType_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16139,7 +16175,7 @@ public void TestRuntimeType_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16162,7 +16198,7 @@ public void TestRuntimeType_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16189,7 +16225,7 @@ public void TestRuntimeType_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16216,7 +16252,7 @@ public void TestRuntimeType_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16242,7 +16278,7 @@ public void TestKnownTypeCollection_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16268,7 +16304,7 @@ public void TestKnownTypeCollection_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16296,7 +16332,7 @@ public void TestKnownTypeCollection_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16324,7 +16360,7 @@ public void TestKnownTypeCollection_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16351,7 +16387,7 @@ public void TestKnownTypeCollection_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16378,7 +16414,7 @@ public void TestKnownTypeCollection_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16405,7 +16441,7 @@ public void TestRuntimeTypeCollection_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16432,7 +16468,7 @@ public void TestRuntimeTypeCollection_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16455,7 +16491,7 @@ public void TestRuntimeTypeCollection_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16478,7 +16514,7 @@ public void TestRuntimeTypeCollection_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16505,7 +16541,7 @@ public void TestRuntimeTypeCollection_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16532,7 +16568,7 @@ public void TestRuntimeTypeCollection_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16558,7 +16594,7 @@ public void TestKnownTypeDictionary_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16584,7 +16620,7 @@ public void TestKnownTypeDictionary_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16612,7 +16648,7 @@ public void TestKnownTypeDictionary_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16640,7 +16676,7 @@ public void TestKnownTypeDictionary_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16667,7 +16703,7 @@ public void TestKnownTypeDictionary_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16694,7 +16730,7 @@ public void TestKnownTypeDictionary_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16721,7 +16757,7 @@ public void TestRuntimeTypeDictionary_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16748,7 +16784,7 @@ public void TestRuntimeTypeDictionary_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16771,7 +16807,7 @@ public void TestRuntimeTypeDictionary_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16794,7 +16830,7 @@ public void TestRuntimeTypeDictionary_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16821,7 +16857,7 @@ public void TestRuntimeTypeDictionary_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -16853,7 +16889,7 @@ public void TestRuntimeTypeDictionary_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_PublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPublicStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -16872,7 +16908,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_PublicStaticMethod_OK() [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_NonPublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPrivateStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -16891,7 +16927,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_NonPublicStaticMethod_O [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_PublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPublicInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -16910,7 +16946,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_PublicInstanceMethod_OK [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_NonPublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPrivateInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -16929,7 +16965,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_NonPublicInstanceMethod [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_PublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPublicStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -16948,7 +16984,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_PublicStaticMethod_O [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPrivateStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -16967,7 +17003,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicStaticMetho [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_PublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPublicInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -16986,7 +17022,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_PublicInstanceMethod [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPrivateInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -17005,7 +17041,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicInstanceMet [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoMethods_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierNoMethods { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -17020,7 +17056,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoMethods_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseVoidReturnMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierVoidReturnMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -17035,7 +17071,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseVoidReturnMethod_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoParametersMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierNoParametersMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -17050,7 +17086,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoParametersMethod_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseExtraParametersMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierExtraParametersMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -17065,7 +17101,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseExtraParametersMethod_Fai [Category( "PolymorphicSerialization" )] public void TestTypeVerifierDoesNotLoadTypeItself() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var serializer = context.GetSerializer(); using ( var buffer = new MemoryStream() ) diff --git a/test/MsgPack.UnitTest/Serialization/MapReflectionBasedAutoMessagePackSerializerTest.cs b/test/MsgPack.UnitTest/Serialization/MapReflectionBasedAutoMessagePackSerializerTest.cs index c7f78f332..5218e5f4b 100644 --- a/test/MsgPack.UnitTest/Serialization/MapReflectionBasedAutoMessagePackSerializerTest.cs +++ b/test/MsgPack.UnitTest/Serialization/MapReflectionBasedAutoMessagePackSerializerTest.cs @@ -89,9 +89,15 @@ private static SerializationContext GetSerializationContext() return context; } - private static SerializationContext NewSerializationContext( PackerCompatibilityOptions compatibilityOptions ) + private static SerializationContext NewSerializationContext() + { + return NewSerializationContext( PackerCompatibilityOptions.None, DateTimeConversionMethod.Timestamp ); + } + + private static SerializationContext NewSerializationContext( PackerCompatibilityOptions compatibilityOptions, DateTimeConversionMethod dateTimeConversionMethod ) { var context = new SerializationContext( compatibilityOptions ) { SerializationMethod = SerializationMethod.Map }; + context.DefaultDateTimeConversionMethod = dateTimeConversionMethod; context.SerializerOptions.EmitterFlavor = EmitterFlavor.ReflectionBased; #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED context.SerializerOptions.DisablePrivilegedAccess = true; @@ -244,6 +250,34 @@ public void TestString() [Test] public void TestDateTime() + { + TestCore( + DateTime.UtcNow, + stream => MessagePackSerializer.UnpackMessagePackObject( stream ).AsTimestamp().ToDateTime(), + ( x, y ) => x.Equals( y ), + context => + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); + } + ); + } + + [Test] + public void TestDateTimeOffset() + { + TestCore( + DateTimeOffset.UtcNow, + stream => MessagePackSerializer.UnpackMessagePackObject( stream ).AsTimestamp().ToDateTimeOffset(), + ( x, y ) => x.Equals( y ), + context => + { + Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); + } + ); + } + + [Test] + public void TestDateTimeNative() { TestCore( DateTime.Now, @@ -251,13 +285,13 @@ public void TestDateTime() ( x, y ) => x.Equals( y ), context => { - Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + context.DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native; } ); } [Test] - public void TestDateTimeOffset() + public void TestDateTimeOffsetNative() { TestCore( DateTimeOffset.Now, @@ -269,7 +303,7 @@ public void TestDateTimeOffset() ( x, y ) => x.Equals( y ), context => { - Assert.That( context.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + context.DefaultDateTimeConversionMethod = DateTimeConversionMethod.Native; } ); } @@ -1204,7 +1238,7 @@ public void TestEmptyBytes() [Test] public void TestEmptyBytes_Classic() { - var context = NewSerializationContext( PackerCompatibilityOptions.Classic ); + var context = NewSerializationContext( PackerCompatibilityOptions.Classic, DateTimeConversionMethod.Native ); var serializer = this.CreateTarget( context ); using ( var stream = new MemoryStream() ) { @@ -4181,7 +4215,7 @@ public void TestFullPackableUnpackable_PackToMessageAndUnpackFromMessageUsed() [Test] public void TestBinary_ClassicContext() { - var context = NewSerializationContext( PackerCompatibilityOptions.Classic ); + var context = NewSerializationContext( PackerCompatibilityOptions.Classic, DateTimeConversionMethod.Native ); var serializer = context.GetSerializer(); using ( var stream = new MemoryStream() ) @@ -4194,7 +4228,7 @@ public void TestBinary_ClassicContext() [Test] public void TestBinary_ContextWithPackerCompatilibyOptionsNone() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext( PackerCompatibilityOptions.None, DateTimeConversionMethod.Timestamp ); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -4206,8 +4240,8 @@ public void TestBinary_ContextWithPackerCompatilibyOptionsNone() [Test] public void TestExt_ClassicContext() { - var context = NewSerializationContext( SerializationContext.CreateClassicContext().CompatibilityOptions.PackerCompatibilityOptions ); - context.Serializers.Register( new CustomDateTimeSerealizer() ); + var context = NewSerializationContext( SerializationContext.CreateClassicContext().CompatibilityOptions.PackerCompatibilityOptions, SerializationContext.CreateClassicContext().DefaultDateTimeConversionMethod ); + context.Serializers.RegisterOverride( new CustomDateTimeSerealizer() ); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -4223,7 +4257,7 @@ public void TestExt_ClassicContext() [Test] public void TestExt_DefaultContext() { - var context = NewSerializationContext( SerializationContext.Default.CompatibilityOptions.PackerCompatibilityOptions ); + var context = NewSerializationContext( SerializationContext.Default.CompatibilityOptions.PackerCompatibilityOptions, SerializationContext.Default.DefaultDateTimeConversionMethod ); context.Serializers.Register( new CustomDateTimeSerealizer() ); var serializer = CreateTarget( context ); @@ -4240,7 +4274,7 @@ public void TestExt_DefaultContext() [Test] public void TestExt_ContextWithPackerCompatilibyOptionsNone() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.Serializers.Register( new CustomDateTimeSerealizer() ); context.CompatibilityOptions.PackerCompatibilityOptions = PackerCompatibilityOptions.None; var serializer = CreateTarget( context ); @@ -4258,7 +4292,7 @@ public void TestExt_ContextWithPackerCompatilibyOptionsNone() [Test] public void TestAbstractTypes_KnownCollections_Default_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var serializer = CreateTarget( context ); using ( var stream = new MemoryStream() ) @@ -4276,7 +4310,7 @@ public void TestAbstractTypes_KnownCollections_Default_Success() [Test] public void TestAbstractTypes_KnownCollections_WithoutRegistration_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Unregister( typeof( IList<> ) ); Assert.Throws( () => DoKnownCollectionTest( context ) ); } @@ -4284,7 +4318,7 @@ public void TestAbstractTypes_KnownCollections_WithoutRegistration_Fail() [Test] public void TestAbstractTypes_KnownCollections_ExplicitRegistration_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList<> ), typeof( Collection<> ) ); var serializer = CreateTarget( context ); @@ -4303,7 +4337,7 @@ public void TestAbstractTypes_KnownCollections_ExplicitRegistration_Success() [Test] public void TestAbstractTypes_KnownCollections_ExplicitRegistrationForSpecific_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( Collection ) ); var serializer1 = CreateTarget( context ); @@ -4336,7 +4370,7 @@ public void TestAbstractTypes_KnownCollections_ExplicitRegistrationForSpecific_S [Test] public void TestAbstractTypes_NotACollection_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); Assert.Throws( () => DoKnownCollectionTest( context ) ); } @@ -4418,7 +4452,7 @@ private static void TestCollectionInterfaceCore( byte[] data, Action asser { using ( var buffer = new MemoryStream(data) ) { - var serializer = MessagePackSerializer.Get( NewSerializationContext( PackerCompatibilityOptions.None ) ); + var serializer = MessagePackSerializer.Get( NewSerializationContext() ); var result = serializer.Unpack( buffer ); assertion( result ); } @@ -7827,7 +7861,7 @@ public class ExclusionAndInclusionSimulatously [Test] public void TestGenericDerived_Value_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericValueClass { @@ -7854,7 +7888,7 @@ public void TestGenericDerived_Value_Success() [Test] public void TestGenericDerived_Reference_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericReferenceClass { @@ -7881,7 +7915,7 @@ public void TestGenericDerived_Reference_Success() [Test] public void TestGenericRecordDerived_Value_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericRecordValueClass( 1, 2 ); var serializer = context.GetSerializer(); @@ -7900,7 +7934,7 @@ public void TestGenericRecordDerived_Value_Success() [Test] public void TestGenericRecordDerived_Reference_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new GenericRecordReferenceClass( "1", "2" ); var serializer = context.GetSerializer(); @@ -9149,10 +9183,13 @@ public void TestToFromMessagePackObject_Complex() Assert.That( asDictionary[ "Data" ].IsTypeOf().Value ); Assert.That( asDictionary[ "Data" ].AsBinary(), Is.EqualTo( target.Data ) ); - Assert.That( asDictionary[ "TimeStamp" ].IsTypeOf().Value ); - Assert.That( asDictionary[ "TimeStamp" ].AsInt64(), Is.EqualTo( target.TimeStamp.ToBinary() ) ); + Assert.That( asDictionary[ "TimeStamp" ].IsTypeOf().Value ); + var timestamp = asDictionary[ "TimeStamp" ].AsTimestamp(); + Assert.That( timestamp.ToDateTime(), Is.EqualTo( target.TimeStamp.ToUniversalTime() ) ); - Assert.That( asDictionary[ "History" ].AsDictionary().Single().Key.AsInt64(), Is.EqualTo( target.History.Single().Key.ToBinary() ) ); + Assert.That( asDictionary[ "History" ].IsDictionary ); + var historyKey = asDictionary[ "History" ].AsDictionary().Single().Key.AsTimestamp(); + Assert.That( historyKey.ToDateTime(), Is.EqualTo( target.History.Single().Key.ToUniversalTime() ) ); Assert.That( asDictionary[ "History" ].AsDictionary().Single().Value.AsString(), Is.EqualTo( target.History.Single().Value ) ); Assert.That( asDictionary[ "Points" ].IsArray ); @@ -9585,7 +9622,7 @@ public void TestNoMembers_Fail() [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9611,7 +9648,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9636,7 +9673,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadWritePropertyAsObjec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9662,7 +9699,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteField_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9687,7 +9724,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadWriteFieldAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9713,7 +9750,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceGetOnlyPropertyAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9738,7 +9775,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceGetOnlyPropertyAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9764,7 +9801,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferencePrivateSetterProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9789,7 +9826,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferencePrivateSetterPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9815,7 +9852,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ReferenceReadOnlyFieldAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -9840,7 +9877,7 @@ public void TestPolymorphicMemberTypeKnownType_ReferenceReadOnlyFieldAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -9866,7 +9903,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteProperty_Suc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9891,7 +9928,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadWritePropertyAsObject_As [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_ValueReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -9917,7 +9954,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadWriteField_Succes [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -9942,7 +9979,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadWriteFieldAsObject_AsMpo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9968,7 +10005,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueGetOnlyPropertyAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -9993,7 +10030,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueGetOnlyPropertyAndConstructo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10019,7 +10056,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValuePrivateSetterProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10044,7 +10081,7 @@ public void TestPolymorphicMemberTypeKnownType_ValuePrivateSetterPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10070,7 +10107,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_ValueReadOnlyFieldAndConst [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -10095,7 +10132,7 @@ public void TestPolymorphicMemberTypeKnownType_ValueReadOnlyFieldAndConstructorA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10121,7 +10158,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10146,7 +10183,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWritePropertyAsObjec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10172,7 +10209,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadWriteField_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10197,7 +10234,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadWriteFieldAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -10223,7 +10260,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveGetOnlyPropertyAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -10248,7 +10285,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveGetOnlyPropertyAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -10274,7 +10311,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitivePrivateSetterProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -10299,7 +10336,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitivePrivateSetterPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -10325,7 +10362,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PrimitiveReadOnlyFieldAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -10350,7 +10387,7 @@ public void TestPolymorphicMemberTypeKnownType_PrimitiveReadOnlyFieldAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10376,7 +10413,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteProperty_Su [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10401,7 +10438,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadWritePropertyAsObject_A [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_StringReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10427,7 +10464,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadWriteField_Succe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10452,7 +10489,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadWriteFieldAsObject_AsMp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -10478,7 +10515,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringGetOnlyPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -10503,7 +10540,7 @@ public void TestPolymorphicMemberTypeKnownType_StringGetOnlyPropertyAndConstruct [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -10529,7 +10566,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringPrivateSetterPropert [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -10554,7 +10591,7 @@ public void TestPolymorphicMemberTypeKnownType_StringPrivateSetterPropertyAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -10580,7 +10617,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_StringReadOnlyFieldAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -10605,7 +10642,7 @@ public void TestPolymorphicMemberTypeKnownType_StringReadOnlyFieldAndConstructor [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10631,7 +10668,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10657,7 +10694,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10683,7 +10720,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -10709,7 +10746,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10735,7 +10772,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10761,7 +10798,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10787,7 +10824,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicPrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10813,7 +10850,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicPrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10839,7 +10876,7 @@ public void TestPolymorphicMemberTypeKnownType_Normal_PolymorphicReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -10868,7 +10905,7 @@ public void TestPolymorphicMemberTypeKnownType_PolymorphicReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10894,7 +10931,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWritePrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -10920,7 +10957,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadWriteField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10946,7 +10983,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemGetOnlyCollect [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -10972,7 +11009,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemPrivateSetterC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -10998,7 +11035,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListStaticItemReadOnlyCollec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11024,7 +11061,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11050,7 +11087,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11076,7 +11113,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemGetOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11102,7 +11139,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11128,7 +11165,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItemReadOnlyC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11154,7 +11191,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWritePrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11180,7 +11217,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadWriteField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11206,7 +11243,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemGetOnlyCollect [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11232,7 +11269,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemPrivateSetterC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11258,7 +11295,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItemReadOnlyCollec [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11284,7 +11321,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11310,7 +11347,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11336,7 +11373,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11362,7 +11399,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11388,7 +11425,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListPolymorphicItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11414,7 +11451,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11440,7 +11477,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -11454,7 +11491,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -11484,7 +11521,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -11501,7 +11538,7 @@ public void TestPolymorphicMemberTypeKnownType_List_ListObjectItselfReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11527,7 +11564,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11553,7 +11590,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11579,7 +11616,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11605,7 +11642,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11631,7 +11668,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11657,7 +11694,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11683,7 +11720,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11709,7 +11746,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11735,7 +11772,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11761,7 +11798,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndStaticI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11787,7 +11824,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11813,7 +11850,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11839,7 +11876,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11865,7 +11902,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -11891,7 +11928,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11917,7 +11954,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -11943,7 +11980,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11969,7 +12006,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -11995,7 +12032,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12021,7 +12058,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndPolymorphicI [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12047,7 +12084,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12073,7 +12110,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12099,7 +12136,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemGe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12125,7 +12162,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12151,7 +12188,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictStaticKeyAndObjectItemRe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12177,7 +12214,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12203,7 +12240,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12229,7 +12266,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemGet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12255,7 +12292,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemPri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12281,7 +12318,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicKeyAndItemRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12307,7 +12344,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12333,7 +12370,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12359,7 +12396,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemGetOnlyC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12385,7 +12422,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemPrivateS [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12411,7 +12448,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndItemReadOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12437,7 +12474,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12463,7 +12500,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12489,7 +12526,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12515,7 +12552,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -12541,7 +12578,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictPolymorphicItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12567,7 +12604,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12593,7 +12630,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -12607,7 +12644,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -12637,7 +12674,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -12655,7 +12692,7 @@ public void TestPolymorphicMemberTypeKnownType_Dict_DictObjectItselfReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12681,7 +12718,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12707,7 +12744,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -12733,7 +12770,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -12759,7 +12796,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticPrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -12785,7 +12822,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1StaticReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12811,7 +12848,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12837,7 +12874,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -12863,7 +12900,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -12889,7 +12926,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -12915,7 +12952,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1PolymorphicReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -12941,7 +12978,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWritePr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -12967,7 +13004,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadWriteFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -12993,7 +13030,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemGetOnlyProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -13019,7 +13056,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemPrivateSett [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -13045,7 +13082,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItemReadOnlyFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13071,7 +13108,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13097,7 +13134,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -13123,7 +13160,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfGetOnlyPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -13149,7 +13186,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -13175,7 +13212,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple1ObjectItselfReadOnlyF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13201,7 +13238,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13227,7 +13264,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -13253,7 +13290,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticGetOnlyPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -13279,7 +13316,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -13305,7 +13342,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllStaticReadOnlyFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13331,7 +13368,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13357,7 +13394,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13383,7 +13420,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13409,7 +13446,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13435,7 +13472,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7FirstPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13461,7 +13498,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13487,7 +13524,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13513,7 +13550,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13539,7 +13576,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13565,7 +13602,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7LastPolymorphicReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13591,7 +13628,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13617,7 +13654,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13643,7 +13680,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13669,7 +13706,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -13695,7 +13732,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7MidPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13721,7 +13758,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13747,7 +13784,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13773,7 +13810,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13799,7 +13836,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -13825,7 +13862,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple7AllPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13851,7 +13888,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -13877,7 +13914,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -13903,7 +13940,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticGetOnlyPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -13929,7 +13966,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -13955,7 +13992,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllStaticReadOnlyFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -13981,7 +14018,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14007,7 +14044,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14033,7 +14070,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14059,7 +14096,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14085,7 +14122,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8LastPolymorphicReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14111,7 +14148,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14137,7 +14174,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14163,7 +14200,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14189,7 +14226,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -14222,7 +14259,7 @@ public void TestPolymorphicMemberTypeKnownType_Tuple_Tuple8AllPolymorphicReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14248,7 +14285,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14273,7 +14310,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14299,7 +14336,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14324,7 +14361,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14350,7 +14387,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14375,7 +14412,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPropertyAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14401,7 +14438,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferencePrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14426,7 +14463,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferencePrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAndConstructor( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14452,7 +14489,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ReferenceReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstructorAsObject( new Version( 1, 2, 3, 4 ) ); var serializer = context.GetSerializer(); @@ -14477,7 +14514,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ReferenceReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14503,7 +14540,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteProperty_S [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14528,7 +14565,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadWritePropertyAsObject_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14554,7 +14591,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadWriteField_Succ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14579,7 +14616,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadWriteFieldAsObject_AsM [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14605,7 +14642,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueGetOnlyPropertyAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14630,7 +14667,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueGetOnlyPropertyAndConstruc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterPropertyAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14656,7 +14693,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValuePrivateSetterProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14681,7 +14718,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValuePrivateSetterPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndConstructor( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14707,7 +14744,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_ValueReadOnlyFieldAndCon [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructorAsObject( new DateTime( 1982, 1, 29, 15, 46, 12, DateTimeKind.Utc ) ); var serializer = context.GetSerializer(); @@ -14732,7 +14769,7 @@ public void TestPolymorphicMemberTypeRuntimeType_ValueReadOnlyFieldAndConstructo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -14758,7 +14795,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14783,7 +14820,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWritePropertyAsObj [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -14809,7 +14846,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadWriteField_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -14834,7 +14871,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadWriteFieldAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -14860,7 +14897,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveGetOnlyProperty [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -14885,7 +14922,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveGetOnlyPropertyAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPropertyAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -14911,7 +14948,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitivePrivateSetterPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -14936,7 +14973,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitivePrivateSetterPropertyA [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAndConstructor( 123 ); var serializer = context.GetSerializer(); @@ -14962,7 +14999,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PrimitiveReadOnlyFieldAn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstructorAsObject( 123 ); var serializer = context.GetSerializer(); @@ -14987,7 +15024,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PrimitiveReadOnlyFieldAndConstr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15013,7 +15050,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteProperty_ [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -15038,7 +15075,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadWritePropertyAsObject [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15064,7 +15101,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadWriteField_Suc [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -15089,7 +15126,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadWriteFieldAsObject_As [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -15115,7 +15152,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringGetOnlyPropertyAnd [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -15140,7 +15177,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringGetOnlyPropertyAndConstru [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPropertyAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -15166,7 +15203,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringPrivateSetterPrope [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -15191,7 +15228,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringPrivateSetterPropertyAndC [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndConstructor( "ABC" ); var serializer = context.GetSerializer(); @@ -15217,7 +15254,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_StringReadOnlyFieldAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstructorAsObject_AsMpo() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstructorAsObject( "ABC" ); var serializer = context.GetSerializer(); @@ -15242,7 +15279,7 @@ public void TestPolymorphicMemberTypeRuntimeType_StringReadOnlyFieldAndConstruct [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15268,7 +15305,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -15294,7 +15331,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWritePropertyAsO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15320,7 +15357,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadWriteFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObject.Initialize(); var serializer = context.GetSerializer(); @@ -15346,7 +15383,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadWriteFieldAsObje [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15372,7 +15409,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicGetOnlyProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15398,7 +15435,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicGetOnlyPropertyAndCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetterPropertyAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15424,7 +15461,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicPrivateSetter [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropertyAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropertyAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15450,7 +15487,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicPrivateSetterPropert [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyFieldAndConstructor( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15476,7 +15513,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Normal_PolymorphicReadOnlyField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndConstructorAsObject_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndConstructorAsObject( new FileEntry { Name = "file", Size = 1 } ); var serializer = context.GetSerializer(); @@ -15505,7 +15542,7 @@ public void TestPolymorphicMemberTypeRuntimeType_PolymorphicReadOnlyFieldAndCons [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15531,7 +15568,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15557,7 +15594,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15583,7 +15620,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15609,7 +15646,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15635,7 +15672,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListStaticItemReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15661,7 +15698,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15687,7 +15724,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15713,7 +15750,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15739,7 +15776,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15765,7 +15802,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15791,7 +15828,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWritePro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15817,7 +15854,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadWriteFie [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15843,7 +15880,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemGetOnlyColle [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15869,7 +15906,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemPrivateSette [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -15895,7 +15932,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItemReadOnlyColl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15921,7 +15958,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -15947,7 +15984,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15973,7 +16010,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -15999,7 +16036,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16025,7 +16062,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListPolymorphicItselfReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16051,7 +16088,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16077,7 +16114,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -16091,7 +16128,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfGetOnlyCol [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -16121,7 +16158,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -16138,7 +16175,7 @@ public void TestPolymorphicMemberTypeRuntimeType_List_ListObjectItselfReadOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16164,7 +16201,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16190,7 +16227,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16216,7 +16253,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16242,7 +16279,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16268,7 +16305,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16294,7 +16331,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16320,7 +16357,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16346,7 +16383,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16372,7 +16409,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16398,7 +16435,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndStati [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16424,7 +16461,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16450,7 +16487,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16476,7 +16513,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16502,7 +16539,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16528,7 +16565,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndStaticItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16554,7 +16591,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16580,7 +16617,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16606,7 +16643,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16632,7 +16669,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphicItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16658,7 +16695,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndPolymorphi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16684,7 +16721,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16710,7 +16747,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16736,7 +16773,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16762,7 +16799,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16788,7 +16825,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictStaticKeyAndObjectItem [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16814,7 +16851,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16840,7 +16877,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16866,7 +16903,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemG [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16892,7 +16929,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -16918,7 +16955,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicKeyAndItemR [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16944,7 +16981,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -16970,7 +17007,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadWr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -16996,7 +17033,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemGetOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17022,7 +17059,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemPrivat [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -17048,7 +17085,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectKeyAndItemReadOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17074,7 +17111,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17100,7 +17137,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOnlyCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17126,7 +17163,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPrivateSetterCollectionProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17152,7 +17189,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadOnlyCollectionField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadOnlyCollectionField.Initialize(); var serializer = context.GetSerializer(); @@ -17178,7 +17215,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictPolymorphicItselfReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17204,7 +17241,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17230,7 +17267,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCollectionProperty_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCollectionProperty.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -17244,7 +17281,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfGetOnlyCol [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSetterCollectionProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSetterCollectionProperty.Initialize(); #if SILVERLIGHT && !SILVERLIGHT_PRIVILEGED Assert.Throws( () => context.GetSerializer() ); @@ -17274,7 +17311,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCollectionField_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCollectionField.Initialize(); Assert.Throws( () => context.GetSerializer() ); } @@ -17292,7 +17329,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Dict_DictObjectItselfReadOnlyCo [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17318,7 +17355,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteProp [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17344,7 +17381,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadWriteFiel [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -17370,7 +17407,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticGetOnlyProper [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -17396,7 +17433,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticPrivateSetter [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyFieldAndConstructor( Tuple.Create( "1" ) ); var serializer = context.GetSerializer(); @@ -17422,7 +17459,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1StaticReadOnlyField [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17448,7 +17485,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17474,7 +17511,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadWrit [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17500,7 +17537,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicGetOnlyP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17526,7 +17563,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicPrivateS [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -17552,7 +17589,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1PolymorphicReadOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17578,7 +17615,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17604,7 +17641,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadWrite [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -17630,7 +17667,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemGetOnlyPr [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -17656,7 +17693,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemPrivateSe [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as object ) ); var serializer = context.GetSerializer(); @@ -17682,7 +17719,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItemReadOnlyF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17708,7 +17745,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17734,7 +17771,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadWri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -17760,7 +17797,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfGetOnly [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -17786,7 +17823,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfPrivate [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileEntry ) ); var serializer = context.GetSerializer(); @@ -17812,7 +17849,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple1ObjectItselfReadOnl [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17838,7 +17875,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17864,7 +17901,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -17890,7 +17927,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -17916,7 +17953,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7" ) ); var serializer = context.GetSerializer(); @@ -17942,7 +17979,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllStaticReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -17968,7 +18005,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -17994,7 +18031,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18020,7 +18057,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicGet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18046,7 +18083,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicPri [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, "2", "3", "4", "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18072,7 +18109,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7FirstPolymorphicRea [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18098,7 +18135,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18124,7 +18161,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18150,7 +18187,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicGetO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18176,7 +18213,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicPriv [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18202,7 +18239,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18228,7 +18265,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18254,7 +18291,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18280,7 +18317,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18306,7 +18343,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", new FileEntry { Name = "4", Size = 4 } as FileSystemEntry, "5", "6", "7") ); var serializer = context.GetSerializer(); @@ -18332,7 +18369,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7MidPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18358,7 +18395,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18384,7 +18421,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18410,7 +18447,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18436,7 +18473,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18462,7 +18499,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple7AllPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18488,7 +18525,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteP [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18514,7 +18551,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadWriteF [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -18540,7 +18577,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticGetOnlyPro [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -18566,7 +18603,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticPrivateSet [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", "8" ) ); var serializer = context.GetSerializer(); @@ -18592,7 +18629,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllStaticReadOnlyFi [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18618,7 +18655,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18644,7 +18681,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18670,7 +18707,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicGetO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18696,7 +18733,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicPriv [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( "1", "2", "3", "4", "5", "6", "7", new FileEntry { Name = "8", Size = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18722,7 +18759,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8LastPolymorphicRead [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteProperty_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteProperty.Initialize(); var serializer = context.GetSerializer(); @@ -18748,7 +18785,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteField_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadWriteField.Initialize(); var serializer = context.GetSerializer(); @@ -18774,7 +18811,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadW [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOnlyPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18800,7 +18837,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicGetOn [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPrivateSetterPropertyAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18826,7 +18863,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicPriva [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadOnlyFieldAndConstructor( Tuple.Create( new FileEntry { Name = "1", Size = 1 } as FileSystemEntry, new DirectoryEntry { Name = "2", ChildCount = 2 } as FileSystemEntry, new FileEntry { Name = "3", Size = 3 } as FileSystemEntry, new DirectoryEntry { Name = "4", ChildCount = 4 } as FileSystemEntry, new FileEntry { Name = "5", Size = 5 } as FileSystemEntry, new DirectoryEntry { Name = "6", ChildCount = 6 } as FileSystemEntry, new FileEntry { Name = "7", Size = 7 } as FileSystemEntry, new DirectoryEntry { Name = "8", ChildCount = 8 } as FileSystemEntry ) ); var serializer = context.GetSerializer(); @@ -18854,7 +18891,7 @@ public void TestPolymorphicMemberTypeRuntimeType_Tuple_Tuple8AllPolymorphicReadO [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeMixed_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeMixed(); target.NormalVanilla = "ABC"; target.NormalRuntime = new FileEntry { Name = "File", Size = 1 }; @@ -18919,7 +18956,7 @@ public void TestPolymorphicMemberTypeMixed_Success() [Category( "PolymorphicSerialization" )] public void TestPolymorphicMemberTypeMixed_Null_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new PolymorphicMemberTypeMixed(); var serializer = context.GetSerializer(); @@ -18954,7 +18991,7 @@ public void TestPolymorphicMemberTypeMixed_Null_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberNoAttribute { Value = new FileEntry { Name = "file", Size = 1 } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -18964,7 +19001,7 @@ public void TestAbstractClassMemberNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberKnownType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -18986,7 +19023,7 @@ public void TestAbstractClassMemberKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassMemberRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassMemberRuntimeType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -19008,7 +19045,7 @@ public void TestAbstractClassMemberRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemNoAttribute { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19018,7 +19055,7 @@ public void TestAbstractClassListItemNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemKnownType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -19041,7 +19078,7 @@ public void TestAbstractClassListItemKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassListItemRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassListItemRuntimeType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -19064,7 +19101,7 @@ public void TestAbstractClassListItemRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyNoAttribute { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19074,7 +19111,7 @@ public void TestAbstractClassDictKeyNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyKnownType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -19097,7 +19134,7 @@ public void TestAbstractClassDictKeyKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassDictKeyRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new AbstractClassDictKeyRuntimeType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -19120,7 +19157,7 @@ public void TestAbstractClassDictKeyRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberNoAttribute { Value = new FileEntry { Name = "file", Size = 1 } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19130,7 +19167,7 @@ public void TestInterfaceMemberNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberKnownType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -19152,7 +19189,7 @@ public void TestInterfaceMemberKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceMemberRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceMemberRuntimeType { Value = new FileEntry { Name = "file", Size = 1 } }; var serializer = context.GetSerializer(); @@ -19174,7 +19211,7 @@ public void TestInterfaceMemberRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemNoAttribute { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19184,7 +19221,7 @@ public void TestInterfaceListItemNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemKnownType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -19207,7 +19244,7 @@ public void TestInterfaceListItemKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceListItemRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceListItemRuntimeType { Value = new List{ new FileEntry { Name = "file", Size = 1 } } }; var serializer = context.GetSerializer(); @@ -19230,7 +19267,7 @@ public void TestInterfaceListItemRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyNoAttribute_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyNoAttribute { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; Assert.Throws( ()=> context.GetSerializer() ); @@ -19240,7 +19277,7 @@ public void TestInterfaceDictKeyNoAttribute_Fail() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyKnownType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -19263,7 +19300,7 @@ public void TestInterfaceDictKeyKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceDictKeyRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new InterfaceDictKeyRuntimeType { Value = new Dictionary { { new FileEntry { Name = "file", Size = 1 }, "ABC" } } }; var serializer = context.GetSerializer(); @@ -19286,7 +19323,7 @@ public void TestInterfaceDictKeyRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionNoAttribute_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionNoAttribute { Value = new EchoKeyedCollection { "ABC" } }; @@ -19310,7 +19347,7 @@ public void TestAbstractClassCollectionNoAttribute_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionKnownType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19334,7 +19371,7 @@ public void TestAbstractClassCollectionKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestAbstractClassCollectionRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( KeyedCollection ), typeof( EchoKeyedCollection ) ); var target = new AbstractClassCollectionRuntimeType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19358,7 +19395,7 @@ public void TestAbstractClassCollectionRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionNoAttribute_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionNoAttribute { Value = new EchoKeyedCollection { "ABC" } }; @@ -19382,7 +19419,7 @@ public void TestInterfaceCollectionNoAttribute_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionKnownType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionKnownType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19406,7 +19443,7 @@ public void TestInterfaceCollectionKnownType_Success() [Category( "PolymorphicSerialization" )] public void TestInterfaceCollectionRuntimeType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.DefaultCollectionTypes.Register( typeof( IList ), typeof( EchoKeyedCollection ) ); var target = new InterfaceCollectionRuntimeType { Value = new EchoKeyedCollection { "ABC" } }; @@ -19430,7 +19467,7 @@ public void TestInterfaceCollectionRuntimeType_Success() [Category( "PolymorphicSerialization" )] public void TestTupleAbstractType_Success() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new TupleAbstractType { Value = Tuple.Create( new FileEntry { Name = "1", Size = 1 } as AbstractFileSystemEntry, new FileEntry { Name = "2", Size = 2 } as IFileSystemEntry, new FileEntry { Name = "3", Size = 3 } as AbstractFileSystemEntry, new FileEntry { Name = "4", Size = 4 } as IFileSystemEntry ) }; var serializer = context.GetSerializer(); @@ -19452,7 +19489,7 @@ public void TestTupleAbstractType_Success() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownMember_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownMember(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19461,7 +19498,7 @@ public void TestAttribute_DuplicatedKnownMember_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownCollectionItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownCollectionItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19470,7 +19507,7 @@ public void TestAttribute_DuplicatedKnownCollectionItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownDictionaryKey_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownDictionaryKey(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19480,7 +19517,7 @@ public void TestAttribute_DuplicatedKnownDictionaryKey_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_DuplicatedKnownTupleItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new DuplicatedKnownTupleItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19490,7 +19527,7 @@ public void TestAttribute_DuplicatedKnownTupleItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeMember_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeMember(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19499,7 +19536,7 @@ public void TestAttribute_KnownAndRuntimeMember_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeCollectionItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeCollectionItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19508,7 +19545,7 @@ public void TestAttribute_KnownAndRuntimeCollectionItem_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeDictionaryKey_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeDictionaryKey(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19518,7 +19555,7 @@ public void TestAttribute_KnownAndRuntimeDictionaryKey_Fail() [Category( "PolymorphicSerialization" )] public void TestAttribute_KnownAndRuntimeTupleItem_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new KnownAndRuntimeTupleItem(); Assert.Throws( ()=> context.GetSerializer() ); } @@ -19528,7 +19565,7 @@ public void TestAttribute_KnownAndRuntimeTupleItem_Fail() [Category( "PolymorphicSerialization" )] public void TestGlobalNamespace() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new HasGlobalNamespaceType { GlobalType = new TypeInGlobalNamespace { Value = "ABC" } }; var serializer = context.GetSerializer(); @@ -19551,7 +19588,7 @@ public void TestGlobalNamespace() [Category( "PolymorphicSerialization" )] public async Task TestGlobalNamespaceAsync() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new HasGlobalNamespaceType { GlobalType = new TypeInGlobalNamespace { Value = "ABC" } }; var serializer = context.GetSerializer(); @@ -19585,7 +19622,7 @@ private static void SetUpDefaultCollectionsForPolymorphism( SerializationContext [Category( "PolymorphicSerialization" )] public void TestPolymorphismAttributesInType() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); context.GetSerializer(); context.GetSerializer(); @@ -19598,7 +19635,7 @@ public void TestPolymorphismAttributesInType() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19624,7 +19661,7 @@ public void TestKnownType_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19650,7 +19687,7 @@ public void TestKnownType_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19678,7 +19715,7 @@ public void TestKnownType_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19706,7 +19743,7 @@ public void TestKnownType_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19733,7 +19770,7 @@ public void TestKnownType_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownType_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19760,7 +19797,7 @@ public void TestKnownType_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19787,7 +19824,7 @@ public void TestRuntimeType_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19814,7 +19851,7 @@ public void TestRuntimeType_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19837,7 +19874,7 @@ public void TestRuntimeType_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19860,7 +19897,7 @@ public void TestRuntimeType_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19887,7 +19924,7 @@ public void TestRuntimeType_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeType_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19914,7 +19951,7 @@ public void TestRuntimeType_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19940,7 +19977,7 @@ public void TestKnownTypeCollection_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19966,7 +20003,7 @@ public void TestKnownTypeCollection_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -19994,7 +20031,7 @@ public void TestKnownTypeCollection_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20022,7 +20059,7 @@ public void TestKnownTypeCollection_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20049,7 +20086,7 @@ public void TestKnownTypeCollection_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeCollection_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20076,7 +20113,7 @@ public void TestKnownTypeCollection_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20103,7 +20140,7 @@ public void TestRuntimeTypeCollection_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20130,7 +20167,7 @@ public void TestRuntimeTypeCollection_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20153,7 +20190,7 @@ public void TestRuntimeTypeCollection_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20176,7 +20213,7 @@ public void TestRuntimeTypeCollection_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20203,7 +20240,7 @@ public void TestRuntimeTypeCollection_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeCollection_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20230,7 +20267,7 @@ public void TestRuntimeTypeCollection_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsNothing_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20256,7 +20293,7 @@ public void TestKnownTypeDictionary_AttributeIsNothing_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsNothing_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20282,7 +20319,7 @@ public void TestKnownTypeDictionary_AttributeIsNothing_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsKnown_Field_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20310,7 +20347,7 @@ public void TestKnownTypeDictionary_AttributeIsKnown_Field_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsKnown_Property_Known() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20338,7 +20375,7 @@ public void TestKnownTypeDictionary_AttributeIsKnown_Property_Known() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20365,7 +20402,7 @@ public void TestKnownTypeDictionary_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestKnownTypeDictionary_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20392,7 +20429,7 @@ public void TestKnownTypeDictionary_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsNothing_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20419,7 +20456,7 @@ public void TestRuntimeTypeDictionary_AttributeIsNothing_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsNothing_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20446,7 +20483,7 @@ public void TestRuntimeTypeDictionary_AttributeIsNothing_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsKnown_Field_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20469,7 +20506,7 @@ public void TestRuntimeTypeDictionary_AttributeIsKnown_Field_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsKnown_Property_Known_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20492,7 +20529,7 @@ public void TestRuntimeTypeDictionary_AttributeIsKnown_Property_Known_Fail() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsRuntime_Field_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20519,7 +20556,7 @@ public void TestRuntimeTypeDictionary_AttributeIsRuntime_Field_Runtime() [Category( "PolymorphicSerialization" )] public void TestRuntimeTypeDictionary_AttributeIsRuntime_Property_Runtime() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); context.SerializationMethod = SerializationMethod.Map; SetUpDefaultCollectionsForPolymorphism( context ); @@ -20551,7 +20588,7 @@ public void TestRuntimeTypeDictionary_AttributeIsRuntime_Property_Runtime() [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_PublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPublicStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20570,7 +20607,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_PublicStaticMethod_OK() [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_NonPublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPrivateStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20589,7 +20626,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_NonPublicStaticMethod_O [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_PublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPublicInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20608,7 +20645,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_PublicInstanceMethod_OK [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_PublicVerifierType_NonPublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForPublicTypeVerifierPrivateInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20627,7 +20664,7 @@ public void TestTypeVerifierSelection_PublicVerifierType_NonPublicInstanceMethod [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_PublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPublicStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20646,7 +20683,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_PublicStaticMethod_O [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicStaticMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPrivateStaticAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20665,7 +20702,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicStaticMetho [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_PublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPublicInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20684,7 +20721,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_PublicInstanceMethod [Category( "PolymorphicSerialization" )] public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicInstanceMethod_OK() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); SetUpDefaultCollectionsForPolymorphism( context ); var target = new PolymorphicHolder { ForNonPublicTypeVerifierPrivateInstanceAllowAll = new PolymorphicValueA { Value = "Foo" } }; var serializer = context.GetSerializer(); @@ -20703,7 +20740,7 @@ public void TestTypeVerifierSelection_NonPublicVerifierType_NonPublicInstanceMet [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoMethods_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierNoMethods { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20718,7 +20755,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoMethods_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseVoidReturnMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierVoidReturnMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20733,7 +20770,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseVoidReturnMethod_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoParametersMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierNoParametersMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20748,7 +20785,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseNoParametersMethod_Fail() [Category( "PolymorphicSerialization" )] public void TestSpecifiedTypeVerifierIsNotFound_BecauseExtraParametersMethod_Fail() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var target = new RuntimeTypePolymorphicWithInvalidVerifierExtraParametersMethod { Value = "Foo" }; var ex = Assert.Catch( () => context.GetSerializer() ); @@ -20763,7 +20800,7 @@ public void TestSpecifiedTypeVerifierIsNotFound_BecauseExtraParametersMethod_Fai [Category( "PolymorphicSerialization" )] public void TestTypeVerifierDoesNotLoadTypeItself() { - var context = NewSerializationContext( PackerCompatibilityOptions.None ); + var context = NewSerializationContext(); var serializer = context.GetSerializer(); using ( var buffer = new MemoryStream() ) diff --git a/test/MsgPack.UnitTest/Serialization/SerializationContextTest.cs b/test/MsgPack.UnitTest/Serialization/SerializationContextTest.cs index 5cb200fd2..e80a6622f 100644 --- a/test/MsgPack.UnitTest/Serialization/SerializationContextTest.cs +++ b/test/MsgPack.UnitTest/Serialization/SerializationContextTest.cs @@ -1,8 +1,8 @@ -#region -- License Terms -- +#region -- License Terms -- // // MessagePack for CLI // -// Copyright (C) 2010-2015 FUJIWARA, Yusuke +// Copyright (C) 2010-2017 FUJIWARA, Yusuke // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -204,7 +204,7 @@ public void TestDefaultCollectionTypes_Register_CloseOpen_Fail() public void TestDefault_SafeAndEasySettings() { Assert.That( SerializationContext.Default, Is.Not.Null ); - Assert.That( SerializationContext.Default.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + Assert.That( SerializationContext.Default.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); Assert.That( SerializationContext.Default.EnumSerializationOptions.SerializationMethod, Is.EqualTo( EnumSerializationMethod.ByName ) ); #if !AOT && !UNITY && !SILVERLIGHT Assert.That( SerializationContext.Default.SerializerOptions.GeneratorOption, Is.EqualTo( SerializationMethodGeneratorOption.Fast ) ); @@ -237,7 +237,7 @@ public void TestConfigureClassic_DefaultIsReplaced() Assert.That( result, Is.SameAs( previous ) ); // result is default settings. Assert.That( result, Is.Not.Null ); - Assert.That( result.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + Assert.That( result.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); Assert.That( result.EnumSerializationOptions.SerializationMethod, Is.EqualTo( EnumSerializationMethod.ByName ) ); #if !AOT && !UNITY && !SILVERLIGHT Assert.That( result.SerializerOptions.GeneratorOption, Is.EqualTo( SerializationMethodGeneratorOption.Fast ) ); @@ -259,7 +259,7 @@ public void TestConfigureClassic_DefaultIsReplaced() } // Verify restore - Assert.That( SerializationContext.Default.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Native ) ); + Assert.That( SerializationContext.Default.DefaultDateTimeConversionMethod, Is.EqualTo( DateTimeConversionMethod.Timestamp ) ); Assert.That( SerializationContext.Default.EnumSerializationOptions.SerializationMethod, Is.EqualTo( EnumSerializationMethod.ByName ) ); #if !AOT && !UNITY && !SILVERLIGHT Assert.That( SerializationContext.Default.SerializerOptions.GeneratorOption, Is.EqualTo( SerializationMethodGeneratorOption.Fast ) ); From 700d58c9f8c1ec936c346a9821274f2424348590 Mon Sep 17 00:00:00 2001 From: yfakariya Date: Sat, 23 Sep 2017 22:24:48 +0900 Subject: [PATCH 12/23] Fix Code Access Security related issue of unit test. --- test/MsgPack.UnitTest/GenericExceptionTester.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/MsgPack.UnitTest/GenericExceptionTester.cs b/test/MsgPack.UnitTest/GenericExceptionTester.cs index 511859ed2..1a577652c 100644 --- a/test/MsgPack.UnitTest/GenericExceptionTester.cs +++ b/test/MsgPack.UnitTest/GenericExceptionTester.cs @@ -260,7 +260,7 @@ private void TestSerializationOnPartialTrust() evidence.AddHostEvidence( new Zone( SecurityZone.Internet ) ); var permisions = SecurityManager.GetStandardSandbox( evidence ); #endif - AppDomain workerDomain = AppDomain.CreateDomain( "PartialTrust", evidence, appDomainSetUp, permisions, GetStrongName( this.GetType() ) ); + AppDomain workerDomain = AppDomain.CreateDomain( "PartialTrust", evidence, appDomainSetUp, permisions, GetStrongName( this.GetType() ), GetStrongName( typeof( Assert ) ) ); try { var innerMessage = Guid.NewGuid().ToString(); @@ -273,7 +273,7 @@ private void TestSerializationOnPartialTrust() var target = workerDomain.GetData( "MsgPack.GenericExceptionTester.Target" ) as T; Assert.That( target, Is.Not.Null ); Assert.That( target.Message, Is.EqualTo( target.Message ) ); - Assert.That( target.InnerException, Is.Not.Null.And.TypeOf( typeof( Exception ) ) ); + Assert.That( target.InnerException is Exception, target.InnerException == null ? "(null)" : target.InnerException.GetType().ToString() ); Assert.That( target.InnerException.Message, Is.EqualTo( target.InnerException.Message ) ); } finally @@ -322,7 +322,7 @@ public static void TestSerializationOnPartialTrustCore() var target = instance.CreateTargetInstance( message, new Exception( innerMessage ) ); Assert.That( target, Is.Not.Null ); Assert.That( target.Message, Is.EqualTo( target.Message ) ); - Assert.That( target.InnerException, Is.Not.Null.And.TypeOf( typeof( Exception ) ) ); + Assert.That( target.InnerException is Exception, target.InnerException == null ? "(null)" : target.InnerException.GetType().ToString() ); Assert.That( target.InnerException.Message, Is.EqualTo( target.InnerException.Message ) ); AppDomain.CurrentDomain.SetData( "MsgPack.GenericExceptionTester.Target", target ); } From c5b23fedcabd65e1c6ac751f28225c62ed3bdebf Mon Sep 17 00:00:00 2001 From: yfakariya Date: Sun, 24 Sep 2017 17:28:48 +0900 Subject: [PATCH 13/23] Fix netstandard 2.0 test error of CodeDOM --- .../Serialization/SerializerGeneratorTest.cs | 87 +++++++++++++++++++ .../TempFileDependentAssemblyManager.cs | 3 + 2 files changed, 90 insertions(+) diff --git a/test/MsgPack.UnitTest/Serialization/SerializerGeneratorTest.cs b/test/MsgPack.UnitTest/Serialization/SerializerGeneratorTest.cs index 1e1fa696c..3545cce3e 100644 --- a/test/MsgPack.UnitTest/Serialization/SerializerGeneratorTest.cs +++ b/test/MsgPack.UnitTest/Serialization/SerializerGeneratorTest.cs @@ -19,14 +19,25 @@ #endregion -- License Terms -- using System; +#if !NETSTANDARD2_0 using System.CodeDom.Compiler; +#endif // !NETSTANDARD2_0 using System.Collections; using System.Collections.Generic; +#if NETSTANDARD2_0 +using System.Globalization; +#endif // NETSTANDARD2_0 using System.IO; using System.Linq; using System.Reflection; using System.Text.RegularExpressions; +#if NETSTANDARD2_0 +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.Emit; +#endif // NETSTANDARD2_0 + using MsgPack.Serialization.Reflection; using NUnit.Framework; @@ -1708,6 +1719,8 @@ private static void TestOnWorkerAppDomainForMultiple( string geneartedAssemblyFi private static void AssertValidCode( IEnumerable results ) { +#if !NETSTANDARD2_0 + var result = CodeDomProvider .CreateProvider( "C#" ) @@ -1735,14 +1748,88 @@ private static void AssertValidCode( IEnumerable { File.Delete( result.PathToAssembly ); } + +#else // !NETSTANDARD2_0 + + var assemblyName = "CodeGenerationAssembly" + DateTime.UtcNow.ToString( "yyyyMMddHHmmssfff" ); + var metadataList = + new TempFileDependentAssemblyManager( TestContext.CurrentContext.TestDirectory ).CodeSerializerDependentAssemblies + .Concat( new[] { Assembly.GetExecutingAssembly().Location } ) + .Select( + a => + a is string + ? AssemblyMetadata.CreateFromFile( a as string ) + : AssemblyMetadata.CreateFromImage( a as byte[] ) + ).ToArray(); + try + { + var compilation = + CSharpCompilation.Create( + assemblyName, + results.Select( r => CSharpSyntaxTree.ParseText( File.ReadAllText( r.FilePath ) ) ), + metadataList.Select( m => m.GetReference() ), + new CSharpCompilationOptions( + OutputKind.DynamicallyLinkedLibrary, + optimizationLevel: OptimizationLevel.Debug, + // Suppress CS0436 because gen/*.cs will conflict with testing serializers. + specificDiagnosticOptions: new[] { new KeyValuePair( "CS0436", ReportDiagnostic.Suppress ) } + ) + ); + + var emitOptions = new EmitOptions( runtimeMetadataVersion: "v4.0.30319" ); + EmitResult result; + using ( var buffer = new MemoryStream() ) + { + result = compilation.Emit( buffer, options: emitOptions ); + } + + Assert.That( + result.Diagnostics.Any( d => d.Severity == DiagnosticSeverity.Error || d.Severity == DiagnosticSeverity.Warning ), + Is.False, + String.Join( Environment.NewLine, GetCompileErrorLines( result.Diagnostics ).ToArray() ) + ); + } + finally + { + foreach ( var metadata in metadataList ) + { + metadata.Dispose(); + } + } +#endif // !NETSTANDARD2_0 } +#if !NETSTANDARD2_0 + private static IEnumerable GetCompileErrorLines( CompilerError error ) { yield return error.ToString(); yield return File.ReadAllLines( error.FileName ).Skip( error.Line - 1 ).First(); } +#else // !NETSTANDARD2_0 + + private static IEnumerable GetCompileErrorLines( IEnumerable diagnostics ) + { + return + diagnostics.Select( + ( diagnostic, i ) => + String.Format( + CultureInfo.InvariantCulture, + "[{0}]{1}:{2}:(File:{3}, Line:{4}, Column:{5}):{6}", + i, + diagnostic.Severity, + diagnostic.Id, + diagnostic.Location.GetLineSpan().Path, + diagnostic.Location.GetLineSpan().StartLinePosition.Line, + diagnostic.Location.GetLineSpan().StartLinePosition.Character, + diagnostic.GetMessage() + ) + ); + } + +#endif // !NETSTANDARD2_0 + public sealed class Tester : MarshalByRefObject { public void DoTest( string testAssemblyFile, int packerCompatiblityOptions, int serializationMethod, byte[] bytesValue, byte[] expectedPackedValue, int expectedSerializerTypeCounts, TestType testType ) diff --git a/test/MsgPack.UnitTest/Serialization/TempFileDependentAssemblyManager.cs b/test/MsgPack.UnitTest/Serialization/TempFileDependentAssemblyManager.cs index 0f617c690..a10679706 100644 --- a/test/MsgPack.UnitTest/Serialization/TempFileDependentAssemblyManager.cs +++ b/test/MsgPack.UnitTest/Serialization/TempFileDependentAssemblyManager.cs @@ -103,6 +103,7 @@ protected override IEnumerable GetRuntimeAssemblies() // .NET Standard 2.0 library should refer netstandard.dll yield return Path.Combine( coreSdkAssemblyDirectory, "netstandard.dll" ); yield return typeof( object ).Assembly.Location; // System.Private.Corelib.dll + yield return typeof( Uri ).Assembly.Location; // System.Private.Uri.dll yield return Path.Combine( coreSdkAssemblyDirectory, "System.Runtime.dll" ); yield return Path.Combine( coreSdkAssemblyDirectory, "System.Collections.dll" ); yield return Path.Combine( coreSdkAssemblyDirectory, "System.Collections.NonGeneric.dll" ); @@ -112,10 +113,12 @@ protected override IEnumerable GetRuntimeAssemblies() yield return Path.Combine( coreSdkAssemblyDirectory, "System.Globalization.dll" ); yield return Path.Combine( coreSdkAssemblyDirectory, "System.Linq.dll" ); yield return Path.Combine( coreSdkAssemblyDirectory, "System.Numerics.Vectors.dll" ); + yield return Path.Combine( coreSdkAssemblyDirectory, "System.ObjectModel.dll" ); yield return Path.Combine( coreSdkAssemblyDirectory, "System.Reflection.dll" ); yield return Path.Combine( coreSdkAssemblyDirectory, "System.Reflection.Extensions.dll" ); yield return Path.Combine( coreSdkAssemblyDirectory, "System.Reflection.Primitives.dll" ); yield return Path.Combine( coreSdkAssemblyDirectory, "System.Runtime.Extensions.dll" ); + yield return Path.Combine( coreSdkAssemblyDirectory, "System.Runtime.InteropServices.dll" ); yield return Path.Combine( coreSdkAssemblyDirectory, "System.Runtime.Numerics.dll" ); yield return Path.Combine( coreSdkAssemblyDirectory, "System.Runtime.Serialization.Primitives.dll" ); yield return Path.Combine( coreSdkAssemblyDirectory, "System.Threading.dll" ); From 7e76b2947bb78a03c0901ca3be64c2371a3eb238 Mon Sep 17 00:00:00 2001 From: yfakariya Date: Sun, 24 Sep 2017 19:51:56 +0900 Subject: [PATCH 14/23] Add workaround for strange LINQ bug. --- .../CodeDomSerializers/CodeDomSerializerBuilder.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/MsgPack/Serialization/CodeDomSerializers/CodeDomSerializerBuilder.cs b/src/MsgPack/Serialization/CodeDomSerializers/CodeDomSerializerBuilder.cs index 3654d3949..7aa3f6aec 100644 --- a/src/MsgPack/Serialization/CodeDomSerializers/CodeDomSerializerBuilder.cs +++ b/src/MsgPack/Serialization/CodeDomSerializers/CodeDomSerializerBuilder.cs @@ -1425,7 +1425,10 @@ private void Finish( CodeDomContext context, SerializationTarget targetInfo, boo context, schema, dependentSerializer.Key.PolymorphismSchema - ).SelectMany( st => st.AsStatements() ).ToArray() + ) + // inner ToArray() is required for .net core app 2.0 LINQ + .SelectMany( st => st.AsStatements().ToArray() ) + .ToArray() ); schemaExpression = new CodeVariableReferenceExpression( variableName ); From c143af65398fc20dc60339522b626b1ab0571ec2 Mon Sep 17 00:00:00 2001 From: yfakariya Date: Sun, 24 Sep 2017 20:50:55 +0900 Subject: [PATCH 15/23] Disable runtime serialization for .net standard 2.0 .NET Standard 2.0 does no support RuntimeType serialization, so this feature is not available in .net core. In addition, this feature is not very important because runtime serialization (binary formatter) is legacy for .net core. --- src/MsgPack/MessagePackObject.Utilities.cs | 4 ++-- src/MsgPack/MessagePackString.cs | 6 +++--- test/MsgPack.UnitTest/MessagePackObjectDictionaryTest.cs | 6 +++--- test/MsgPack.UnitTest/MsgPack.UnitTest.csproj | 3 +++ 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/MsgPack/MessagePackObject.Utilities.cs b/src/MsgPack/MessagePackObject.Utilities.cs index d67b3165c..aff46751c 100644 --- a/src/MsgPack/MessagePackObject.Utilities.cs +++ b/src/MsgPack/MessagePackObject.Utilities.cs @@ -44,9 +44,9 @@ namespace MsgPack { -#if !SILVERLIGHT && !NETSTANDARD1_1 && !NETSTANDARD1_3 +#if !SILVERLIGHT && !NETSTANDARD1_1 && !NETSTANDARD1_3 && !NETSTANDARD2_0 [Serializable] -#endif // !SILVERLIGHT && !NETSTANDARD1_1 && !NETSTANDARD1_3 +#endif // !SILVERLIGHT && !NETSTANDARD1_1 && !NETSTANDARD1_3 && !NETSTANDARD2_0 partial struct MessagePackObject : IPackable #if FEATURE_TAP , IAsyncPackable diff --git a/src/MsgPack/MessagePackString.cs b/src/MsgPack/MessagePackString.cs index 7e1d038db..3b2113357 100644 --- a/src/MsgPack/MessagePackString.cs +++ b/src/MsgPack/MessagePackString.cs @@ -1,4 +1,4 @@ -#region -- License Terms -- +#region -- License Terms -- // // MessagePack for CLI // @@ -43,9 +43,9 @@ namespace MsgPack /// /// Encapselates and its serialized UTF-8 bytes. /// -#if !SILVERLIGHT && !NETSTANDARD1_1 && !NETSTANDARD1_3 +#if !SILVERLIGHT && !NETSTANDARD1_1 && !NETSTANDARD1_3 && !NETSTANDARD2_0 [Serializable] -#endif // !SILVERLIGHT && !NETSTANDARD1_1 && !NETSTANDARD1_3 +#endif // !SILVERLIGHT && !NETSTANDARD1_1 && !NETSTANDARD1_3 && !NETSTANDARD2_0 #if !NET35 && !UNITY [SecuritySafeCritical] #endif // !NET35 && !UNITY diff --git a/test/MsgPack.UnitTest/MessagePackObjectDictionaryTest.cs b/test/MsgPack.UnitTest/MessagePackObjectDictionaryTest.cs index 4e52c253b..46997aae7 100644 --- a/test/MsgPack.UnitTest/MessagePackObjectDictionaryTest.cs +++ b/test/MsgPack.UnitTest/MessagePackObjectDictionaryTest.cs @@ -1,4 +1,4 @@ -#region -- License Terms -- +#region -- License Terms -- // // MessagePack for CLI // @@ -1337,7 +1337,7 @@ public void TestValuesCopyTo() Assert.That( array[ 4 ], Is.EqualTo( MessagePackObject.Nil ) ); } -#if !NETFX_CORE && !SILVERLIGHT && !UNITY && !NETSTANDARD1_1 && !NETSTANDARD1_3 +#if !NETFX_CORE && !SILVERLIGHT && !UNITY && !NETSTANDARD1_1 && !NETSTANDARD1_3 && !NETSTANDARD2_0 [Test] public void TestRuntimeSerialization_NotEmpty_RoundTripped() { @@ -1351,7 +1351,7 @@ public void TestRuntimeSerialization_NotEmpty_RoundTripped() Assert.AreEqual( target, deserialized ); } } -#endif // !NETFX_CORE && !SILVERLIGHT && !UNITY && !NETSTANDARD1_1 && !NETSTANDARD1_3 +#endif // !NETFX_CORE && !SILVERLIGHT && !UNITY && !NETSTANDARD1_1 && !NETSTANDARD1_3 && !NETSTANDARD2_0 private sealed class MyClass { } } diff --git a/test/MsgPack.UnitTest/MsgPack.UnitTest.csproj b/test/MsgPack.UnitTest/MsgPack.UnitTest.csproj index aabd7e325..b6feda836 100644 --- a/test/MsgPack.UnitTest/MsgPack.UnitTest.csproj +++ b/test/MsgPack.UnitTest/MsgPack.UnitTest.csproj @@ -769,6 +769,9 @@ UnpackerTest.cs + + +