Example #1
0
 public void DeserializeWithNullStream(KvSerializationFormat format)
 {
     Assert.That(
         () => KvSerializer.Create(format).Deserialize(stream: null),
         Throws.Exception.TypeOf <ArgumentNullException>()
         .With.Property(nameof(ArgumentNullException.ParamName)).EqualTo("stream"));
 }
Example #2
0
 /// <summary>
 /// Creates a new <see cref="KvSerializer"/> for the given format.
 /// </summary>
 /// <param name="format">The <see cref="KvSerializationFormat"/> to use when (de)serializing. </param>
 /// <returns>A new <see cref="KvSerializer"/> that (de)serializes with the given format.</returns>
 public static KvSerializer Create(KvSerializationFormat format)
 => new KvSerializer(format);
Example #3
0
 private KvSerializer(KvSerializationFormat format)
 {
     _format = format;
 }