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

github.com/aspnet/MessagePack-CSharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/SerializerBenchmark/Serializers/BinaryFormatter.cs')
-rw-r--r--benchmark/SerializerBenchmark/Serializers/BinaryFormatter.cs29
1 files changed, 0 insertions, 29 deletions
diff --git a/benchmark/SerializerBenchmark/Serializers/BinaryFormatter.cs b/benchmark/SerializerBenchmark/Serializers/BinaryFormatter.cs
deleted file mode 100644
index b3981a89..00000000
--- a/benchmark/SerializerBenchmark/Serializers/BinaryFormatter.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) All contributors. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-using System.IO;
-using System.Runtime.Serialization.Formatters.Binary;
-using Benchmark.Serializers;
-
-#pragma warning disable SA1649 // File name should match first type name
-
-public class BinaryFormatter_ : SerializerBase
-{
- public override T Deserialize<T>(object input)
- {
- using (var ms = new MemoryStream((byte[])input))
- {
- return (T)new BinaryFormatter().Deserialize(ms);
- }
- }
-
- public override object Serialize<T>(T input)
- {
- using (var ms = new MemoryStream())
- {
- new BinaryFormatter().Serialize(ms, input);
- ms.Flush();
- return ms.ToArray();
- }
- }
-}