├── README.md
├── SerializationPerformanceTest.sln
├── SerializationPerformanceTest
├── App.config
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
├── SerializationPerformanceTest.csproj
├── TestData
│ └── BelgianBeer
│ │ ├── Beer.cs
│ │ ├── Data
│ │ ├── beer.bin
│ │ ├── beer.datacontract
│ │ ├── beer.jsonns
│ │ ├── beer.jsonss
│ │ ├── beer.msgpack
│ │ ├── beer.protobuf
│ │ ├── beer.xml
│ │ ├── beers.bin
│ │ ├── beers.datacontract
│ │ ├── beers.jsonns
│ │ ├── beers.jsonss
│ │ ├── beers.msgpack
│ │ ├── beers.protobuf
│ │ └── beers.xml
│ │ └── DataRetriver.cs
├── Testers
│ ├── BinarySerializationTester.cs
│ ├── DataContractSerializationTester.cs
│ ├── JsonNewtonsoftSerializationTester.cs
│ ├── JsonServiceStackSerializationTester.cs
│ ├── MsgPackSerializationTester.cs
│ ├── ProtobufSerializationTester.cs
│ ├── SerializationTester.cs
│ └── XmlSerializationTester.cs
├── bin
│ ├── Debug
│ │ ├── HtmlAgilityPack.xml
│ │ ├── MsgPack.xml
│ │ ├── Newtonsoft.Json.xml
│ │ ├── SerializationPerformanceTest.exe.config
│ │ ├── SerializationPerformanceTest.vshost.exe.config
│ │ ├── SerializationPerformanceTest.vshost.exe.manifest
│ │ ├── ServiceStack.Text.xml
│ │ ├── beers.bin
│ │ ├── beers.json
│ │ ├── beers.msgpack
│ │ ├── beers.xml
│ │ └── protobuf-net.xml
│ └── Release
│ │ ├── HtmlAgilityPack.xml
│ │ ├── MsgPack.xml
│ │ ├── Newtonsoft.Json.xml
│ │ ├── SerializationPerformanceTest.exe.config
│ │ ├── SerializationPerformanceTest.vshost.exe.config
│ │ ├── SerializationPerformanceTest.vshost.exe.manifest
│ │ ├── ServiceStack.Text.xml
│ │ └── protobuf-net.xml
├── obj
│ ├── Debug
│ │ ├── SerializationPerformanceTest.csproj.FileListAbsolute.txt
│ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
│ └── Release
│ │ ├── SerializationPerformanceTest.csproj.FileListAbsolute.txt
│ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
│ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
│ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
└── packages.config
└── packages
├── HtmlAgilityPack.1.4.6
├── HAPIcon.png
├── HtmlAgilityPack.1.4.6.nupkg
├── lib
│ ├── Net20
│ │ └── HtmlAgilityPack.xml
│ ├── Net40-client
│ │ └── HtmlAgilityPack.xml
│ ├── Net40
│ │ └── HtmlAgilityPack.XML
│ ├── Net45
│ │ └── HtmlAgilityPack.XML
│ ├── sl3-wp
│ │ └── HtmlAgilityPack.XML
│ ├── sl4-windowsphone71
│ │ └── HtmlAgilityPack.XML
│ ├── sl4
│ │ └── HtmlAgilityPack.XML
│ ├── sl5
│ │ └── HtmlAgilityPack.XML
│ └── winrt45
│ │ ├── HtmlAgilityPack.pri
│ │ └── HtmlAgilityPack.xml
└── readme.txt
├── MsgPack.Cli.0.4.3
├── MsgPack.Cli.0.4.3.nupkg
└── lib
│ ├── net35-client
│ └── MsgPack.XML
│ ├── net40-client
│ └── MsgPack.XML
│ ├── netcore45
│ ├── MsgPack.Serialization.XML
│ └── MsgPack.XML
│ ├── sl4-windowsphone71
│ ├── MsgPack.Serialization.xml
│ └── MsgPack.XML
│ ├── sl4
│ ├── MsgPack.Serialization.XML
│ └── MsgPack.XML
│ └── sl5
│ ├── MsgPack.Serialization.XML
│ └── MsgPack.XML
├── Newtonsoft.Json.6.0.1
├── Newtonsoft.Json.6.0.1.nupkg
├── lib
│ ├── net20
│ │ └── Newtonsoft.Json.xml
│ ├── net35
│ │ └── Newtonsoft.Json.xml
│ ├── net40
│ │ └── Newtonsoft.Json.xml
│ ├── net45
│ │ └── Newtonsoft.Json.xml
│ ├── netcore45
│ │ └── Newtonsoft.Json.xml
│ ├── portable-net40+sl5+wp80+win8+monotouch+monoandroid
│ │ └── Newtonsoft.Json.xml
│ └── portable-net45+wp80+win8
│ │ └── Newtonsoft.Json.xml
└── tools
│ └── install.ps1
├── ServiceStack.Text.4.0.15
├── ServiceStack.Text.4.0.15.nupkg
└── lib
│ └── net40
│ └── ServiceStack.Text.xml
├── protobuf-net.2.0.0.668
├── lib
│ ├── net20-cf
│ │ └── protobuf-net.xml
│ ├── net20
│ │ └── protobuf-net.xml
│ ├── net30
│ │ └── protobuf-net.xml
│ ├── net35-cf
│ │ └── protobuf-net.xml
│ ├── net35
│ │ └── protobuf-net.xml
│ ├── net40-cf
│ │ └── protobuf-net.xml
│ ├── net40
│ │ └── protobuf-net.xml
│ ├── netcore45
│ │ ├── protobuf-net.XML
│ │ └── protobuf-net.pri
│ ├── portable-sl4+net40+wp7+windows8
│ │ └── protobuf-net.xml
│ ├── sl3-wp
│ │ └── protobuf-net.xml
│ ├── sl4-windowsphone71
│ │ └── protobuf-net.xml
│ ├── sl4
│ │ └── protobuf-net.xml
│ └── windowsphone8
│ │ └── protobuf-net.xml
└── protobuf-net.2.0.0.668.nupkg
└── repositories.config
/README.md:
--------------------------------------------------------------------------------
1 | SerializationPerformanceTest_CSharp
2 | ===================================
3 |
4 | The code for a serialization performance test in my blog post -
5 |
6 | http://maxondev.com/serialization-performance-comparison-c-net-formats-frameworks-xmldatacontractserializer-xmlserializer-binaryformatter-json-newtonsoft-servicestack-text/
7 |
8 |
9 | This code let you test performance of any serialization framework easily.
10 |
--------------------------------------------------------------------------------
/SerializationPerformanceTest.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.30110.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SerializationPerformanceTest", "SerializationPerformanceTest\SerializationPerformanceTest.csproj", "{A22E0877-518F-41DB-A170-42A3E4CA3BCE}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {A22E0877-518F-41DB-A170-42A3E4CA3BCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {A22E0877-518F-41DB-A170-42A3E4CA3BCE}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {A22E0877-518F-41DB-A170-42A3E4CA3BCE}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {A22E0877-518F-41DB-A170-42A3E4CA3BCE}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/SerializationPerformanceTest/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/SerializationPerformanceTest/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Net.Mime;
6 | using System.Threading;
7 | using SerializationPerformanceTest.TestData.BelgianBeer;
8 | using SerializationPerformanceTest.Testers;
9 |
10 |
11 | namespace SerializationPerformanceTest
12 | {
13 | internal static class Program
14 | {
15 | private static void Main()
16 | {
17 | List beersList = BelgianBeerDataRetriever.GetDataFromXML();
18 | Beer beer = beersList.First();
19 |
20 | var testers = new SerializationTester[]
21 | {
22 | //List of beers
23 | new DataContractSerializationTester>(beersList),
24 | new XmlSerializationTester>(beersList),
25 | new BinarySerializationTester>(beersList),
26 | new JsonNewtonsoftSerializationTester>(beersList),
27 | new JsonServiceStackSerializationTester>(beersList),
28 | new ProtobufSerializationTester>(beersList),
29 | new MsgPackSerializationTester>(beersList),
30 |
31 | //Single beer
32 | new DataContractSerializationTester(beer),
33 | new XmlSerializationTester(beer),
34 | new BinarySerializationTester(beer),
35 | new JsonNewtonsoftSerializationTester(beer),
36 | new JsonServiceStackSerializationTester(beer),
37 | new ProtobufSerializationTester(beer),
38 | new MsgPackSerializationTester(beer),
39 | };
40 |
41 |
42 |
43 | foreach (var tester in testers)
44 | {
45 | using (tester)
46 | {
47 | tester.Test();
48 |
49 | Console.WriteLine();
50 | }
51 |
52 | GC.Collect();
53 | }
54 |
55 | }
56 | }
57 | }
--------------------------------------------------------------------------------
/SerializationPerformanceTest/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("SerializationPerformanceTest")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SerializationPerformanceTest")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("f49f5299-4878-4bfb-81ad-6a344b0ef838")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/SerializationPerformanceTest/SerializationPerformanceTest.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {A22E0877-518F-41DB-A170-42A3E4CA3BCE}
8 | Exe
9 | Properties
10 | SerializationPerformanceTest
11 | SerializationPerformanceTest
12 | v4.5.1
13 | 512
14 |
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 | false
26 |
27 |
28 | AnyCPU
29 | pdbonly
30 | true
31 | bin\Release\
32 | TRACE
33 | prompt
34 | 4
35 | false
36 |
37 |
38 |
39 | ..\packages\HtmlAgilityPack.1.4.6\lib\Net45\HtmlAgilityPack.dll
40 |
41 |
42 | ..\packages\MsgPack.Cli.0.4.3\lib\net40-client\MsgPack.dll
43 |
44 |
45 | False
46 | ..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll
47 |
48 |
49 | ..\packages\protobuf-net.2.0.0.668\lib\net40\protobuf-net.dll
50 |
51 |
52 | ..\packages\ServiceStack.Text.4.0.15\lib\net40\ServiceStack.Text.dll
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
101 |
--------------------------------------------------------------------------------
/SerializationPerformanceTest/TestData/BelgianBeer/Beer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Runtime.Serialization;
4 | using ProtoBuf;
5 |
6 | namespace SerializationPerformanceTest.TestData.BelgianBeer
7 | {
8 |
9 | [Serializable, ProtoContract, DataContract]
10 | public class Beer
11 | {
12 | [ProtoMember(1), DataMember]
13 | public string Brand { get; set; }
14 |
15 | [ProtoMember(2), DataMember]
16 | public List Sort { get; set; }
17 |
18 | [ProtoMember(3), DataMember]
19 | public float Alcohol { get; set; }
20 |
21 | [ProtoMember(4), DataMember]
22 | public string Brewery { get; set; }
23 | }
24 | }
--------------------------------------------------------------------------------
/SerializationPerformanceTest/TestData/BelgianBeer/Data/beer.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/SerializationPerformanceTest/TestData/BelgianBeer/Data/beer.bin
--------------------------------------------------------------------------------
/SerializationPerformanceTest/TestData/BelgianBeer/Data/beer.datacontract:
--------------------------------------------------------------------------------
1 | 63 Schtֳ©ngBrasserie Grain d'Orgehigh fermentation
--------------------------------------------------------------------------------
/SerializationPerformanceTest/TestData/BelgianBeer/Data/beer.jsonns:
--------------------------------------------------------------------------------
1 | {"Brand":"3 Schtֳ©ng","Sort":["high fermentation"],"Alcohol":6.0,"Brewery":"Brasserie Grain d'Orge"}
--------------------------------------------------------------------------------
/SerializationPerformanceTest/TestData/BelgianBeer/Data/beer.jsonss:
--------------------------------------------------------------------------------
1 | {Brand:3 Schtֳ©ng,Sort:[high fermentation],Alcohol:6,Brewery:Brasserie Grain d'Orge}
--------------------------------------------------------------------------------
/SerializationPerformanceTest/TestData/BelgianBeer/Data/beer.msgpack:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/SerializationPerformanceTest/TestData/BelgianBeer/Data/beer.msgpack
--------------------------------------------------------------------------------
/SerializationPerformanceTest/TestData/BelgianBeer/Data/beer.protobuf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/SerializationPerformanceTest/TestData/BelgianBeer/Data/beer.protobuf
--------------------------------------------------------------------------------
/SerializationPerformanceTest/TestData/BelgianBeer/Data/beer.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3 Schtֳ©ng
4 |
5 | high fermentation
6 |
7 | 6
8 | Brasserie Grain d'Orge
9 |
--------------------------------------------------------------------------------
/SerializationPerformanceTest/TestData/BelgianBeer/Data/beers.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/SerializationPerformanceTest/TestData/BelgianBeer/Data/beers.bin
--------------------------------------------------------------------------------
/SerializationPerformanceTest/TestData/BelgianBeer/Data/beers.msgpack:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/SerializationPerformanceTest/TestData/BelgianBeer/Data/beers.msgpack
--------------------------------------------------------------------------------
/SerializationPerformanceTest/TestData/BelgianBeer/Data/beers.protobuf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/SerializationPerformanceTest/TestData/BelgianBeer/Data/beers.protobuf
--------------------------------------------------------------------------------
/SerializationPerformanceTest/TestData/BelgianBeer/DataRetriver.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Net;
6 | using System.Xml.Serialization;
7 | using HtmlAgilityPack;
8 |
9 | namespace SerializationPerformanceTest.TestData.BelgianBeer
10 | {
11 | public static class BelgianBeerDataRetriever
12 | {
13 | public static List GetDataFromXML()
14 | {
15 | var serializer = new XmlSerializer(typeof(List));
16 | using (var fs = new FileStream(@".\..\..\TestData\BelgianBeer\Data\beers.xml", FileMode.Open))
17 | {
18 | var deserialize = serializer.Deserialize(fs);
19 | return (List) deserialize;
20 | }
21 | }
22 |
23 |
24 | public static List GetDataFromWikipedia()
25 | {
26 | HtmlDocument htmlDocument = new HtmlDocument();
27 | var html = new WebClient().DownloadString(new Uri("http://en.wikipedia.org/wiki/List_of_Belgian_beer"));
28 |
29 | htmlDocument.LoadHtml(html);
30 |
31 | var rows = htmlDocument.DocumentNode.Descendants("tr").ToArray();
32 |
33 | List list = new List();
34 |
35 | foreach (var row in rows)
36 | {
37 | string[] columns = row.Descendants("td").Select(item => item.InnerText).ToArray();
38 |
39 | float alcohol;
40 |
41 | bool hasFourColumns = columns.Length == 4;
42 | if (hasFourColumns && float.TryParse(columns[2].TrimEnd('%'), out alcohol))
43 | {
44 | var sort = columns[1].Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList();
45 |
46 | Beer beer = new Beer()
47 | {
48 | Brand = columns[0],
49 | Sort = sort,
50 | Alcohol = alcohol,
51 | Brewery = columns[3]
52 | };
53 |
54 | list.Add(beer);
55 | }
56 | }
57 |
58 | //FileStream fs = new FileStream("beers.xml", FileMode.Create);
59 | //new XmlSerializer(typeof(List)).Serialize(fs, list);
60 | //fs.Close();
61 |
62 | return list;
63 |
64 | }
65 | }
66 | }
--------------------------------------------------------------------------------
/SerializationPerformanceTest/Testers/BinarySerializationTester.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.Serialization;
6 | using System.Runtime.Serialization.Formatters.Binary;
7 |
8 | namespace SerializationPerformanceTest.Testers
9 | {
10 | class BinarySerializationTester : SerializationTester
11 | {
12 | private readonly IFormatter formatter;
13 |
14 | public BinarySerializationTester(TTestObject testObject)
15 | : base(testObject)
16 | {
17 | formatter = new BinaryFormatter();
18 | }
19 |
20 | protected override TTestObject Deserialize()
21 | {
22 | base.MemoryStream.Seek(0, 0);
23 | TTestObject deserialize = (TTestObject)formatter.Deserialize(base.MemoryStream);
24 | return deserialize;
25 | }
26 |
27 |
28 | protected override MemoryStream Serialize()
29 | {
30 | var stream = new MemoryStream();
31 | formatter.Serialize(stream, base.TestObject);
32 |
33 | return stream;
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/SerializationPerformanceTest/Testers/DataContractSerializationTester.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.Serialization;
6 | using Newtonsoft.Json;
7 |
8 | namespace SerializationPerformanceTest.Testers
9 | {
10 | class DataContractSerializationTester : SerializationTester
11 | {
12 | private readonly DataContractSerializer serializer;
13 |
14 | public DataContractSerializationTester(TTestObject testObject)
15 | : base(testObject)
16 | {
17 | serializer = new DataContractSerializer(typeof(TTestObject));
18 | }
19 |
20 | protected override TTestObject Deserialize()
21 | {
22 | base.MemoryStream.Seek(0, 0);
23 | return (TTestObject)serializer.ReadObject(base.MemoryStream);
24 | }
25 |
26 | protected override MemoryStream Serialize()
27 | {
28 | var stream = new MemoryStream();
29 |
30 | serializer.WriteObject(stream, base.TestObject);
31 |
32 | return stream;
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/SerializationPerformanceTest/Testers/JsonNewtonsoftSerializationTester.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.IO;
5 | using System.Linq;
6 | using Newtonsoft.Json;
7 | using JsonSerializer = Newtonsoft.Json.JsonSerializer;
8 |
9 | namespace SerializationPerformanceTest.Testers
10 | {
11 | class JsonNewtonsoftSerializationTester : SerializationTester
12 | {
13 | private readonly JsonSerializer jsonSerializer;
14 | private StreamReader streamReader;
15 |
16 |
17 | public JsonNewtonsoftSerializationTester(TTestObject testObject)
18 | : base(testObject)
19 | {
20 | jsonSerializer = new JsonSerializer();
21 | }
22 |
23 | protected override void Init()
24 | {
25 | base.Init();
26 | streamReader = new StreamReader(this.MemoryStream);
27 | }
28 |
29 | protected override TTestObject Deserialize()
30 | {
31 | base.MemoryStream.Position = 0;
32 | var jsonTextReader = new JsonTextReader(streamReader) { CloseInput = false };
33 |
34 | return jsonSerializer.Deserialize(jsonTextReader);
35 | }
36 |
37 | protected override MemoryStream Serialize()
38 | {
39 | var stream = new MemoryStream();
40 | var streamWriter = new StreamWriter(stream);
41 | jsonSerializer.Serialize(streamWriter, base.TestObject);
42 | streamWriter.Flush();
43 |
44 | return stream;
45 | }
46 |
47 | public override void Dispose()
48 | {
49 | streamReader.Dispose();
50 | base.Dispose();
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/SerializationPerformanceTest/Testers/JsonServiceStackSerializationTester.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using ServiceStack.Text;
3 |
4 | namespace SerializationPerformanceTest.Testers
5 | {
6 | class JsonServiceStackSerializationTester : SerializationTester
7 | {
8 | private readonly TypeSerializer serializer;
9 | private StreamReader streamReader;
10 |
11 |
12 | public JsonServiceStackSerializationTester(TTestObject testObject)
13 | : base(testObject)
14 | {
15 | serializer = new TypeSerializer();
16 | }
17 |
18 | protected override void Init()
19 | {
20 | base.Init();
21 |
22 | streamReader = new StreamReader(this.MemoryStream);
23 | }
24 |
25 | protected override TTestObject Deserialize()
26 | {
27 | base.MemoryStream.Position = 0;
28 | return serializer.DeserializeFromReader(this.streamReader);
29 | }
30 |
31 | protected override MemoryStream Serialize()
32 | {
33 | var stream = new MemoryStream();
34 | var streamWriter = new StreamWriter(stream);
35 | serializer.SerializeToWriter(base.TestObject, streamWriter);
36 | streamWriter.Flush();
37 |
38 | return stream;
39 | }
40 |
41 | public override void Dispose()
42 | {
43 | this.streamReader.Dispose();
44 | base.Dispose();
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/SerializationPerformanceTest/Testers/MsgPackSerializationTester.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using MsgPack.Serialization;
6 |
7 | namespace SerializationPerformanceTest.Testers
8 | {
9 | class MsgPackSerializationTester : SerializationTester
10 | {
11 | private readonly MessagePackSerializer serializer;
12 |
13 |
14 | public MsgPackSerializationTester(TTestObject testObject)
15 | : base(testObject)
16 | {
17 | serializer = MessagePackSerializer.Create();
18 | }
19 |
20 |
21 | protected override TTestObject Deserialize()
22 | {
23 | base.MemoryStream.Position = 0;
24 | return serializer.Unpack(base.MemoryStream);
25 | }
26 |
27 | protected override MemoryStream Serialize()
28 | {
29 | var stream = new MemoryStream();
30 | serializer.Pack(stream, base.TestObject);
31 | return stream;
32 | }
33 |
34 | }
35 |
36 | }
--------------------------------------------------------------------------------
/SerializationPerformanceTest/Testers/ProtobufSerializationTester.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 |
6 | namespace SerializationPerformanceTest.Testers
7 | {
8 | class ProtobufSerializationTester : SerializationTester
9 | {
10 | public ProtobufSerializationTester(TTestObject testObject)
11 | : base(testObject)
12 | {
13 | }
14 |
15 | protected override TTestObject Deserialize()
16 | {
17 | base.MemoryStream.Seek(0, 0);
18 | return ProtoBuf.Serializer.Deserialize(base.MemoryStream);
19 | }
20 |
21 | protected override MemoryStream Serialize()
22 | {
23 | var stream = new MemoryStream();
24 | ProtoBuf.Serializer.Serialize(stream, base.TestObject);
25 | return stream;
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/SerializationPerformanceTest/Testers/SerializationTester.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.IO;
5 | using System.Linq;
6 | using System.Threading;
7 |
8 | namespace SerializationPerformanceTest.Testers
9 | {
10 | abstract public class SerializationTester: IDisposable
11 | {
12 | protected MemoryStream MemoryStream { get; set; }
13 |
14 | public abstract void Test(int iterations = 100);
15 |
16 | public virtual void Dispose()
17 | {
18 | this.MemoryStream.Dispose();
19 | }
20 | }
21 |
22 | ///
23 | /// Base class for testing serialization formats/frameworks.
24 | ///
25 | /// The object that will be tested to Serialize/Deserialize
26 | abstract public class SerializationTester : SerializationTester
27 | {
28 | protected TTestObject TestObject { get; private set; }
29 |
30 | private bool isInit;
31 |
32 | protected SerializationTester(TTestObject testObject)
33 | {
34 | base.MemoryStream = new MemoryStream();
35 | this.TestObject = testObject;
36 | }
37 |
38 | ///
39 | /// Will do any preparations needed before serializing/deserializing
40 | ///
41 | protected virtual void Init()
42 | {
43 | isInit = true;
44 | this.MemoryStream = Serialize();
45 | Console.WriteLine("Size of serialized object : " + base.MemoryStream.Length.ToString("#,0"));
46 | }
47 |
48 | ///
49 | /// Will deserialize the TestObject to a .NET Object
50 | ///
51 | ///
52 | protected abstract TTestObject Deserialize();
53 |
54 | ///
55 | /// Will serialize the object to a MemoryStream
56 | ///
57 | ///
58 | protected abstract MemoryStream Serialize();
59 |
60 |
61 | ///
62 | /// Will run the tests for Size/Speed of Serialization/Deserialization
63 | ///
64 | ///
65 | public override void Test(int iterations = 100)
66 | {
67 | if (!isInit)
68 | {
69 | Init();
70 | }
71 |
72 | TimeSpan timeSpan;
73 |
74 | timeSpan = Measure(this.Deserialize, iterations);
75 | Console.WriteLine(this.GetType().Name + "(Deserialize) : " + timeSpan.TotalMilliseconds / iterations);
76 | GC.Collect();
77 |
78 | timeSpan = Measure(this.Serialize, iterations);
79 | Console.WriteLine(this.GetType().Name + "(Serialize) : " + timeSpan.TotalMilliseconds / iterations);
80 | GC.Collect();
81 | }
82 |
83 | private TimeSpan Measure(Func testFunc, int iterations)
84 | {
85 | var list = new List(iterations);
86 |
87 | //warm up lazy initialized classes
88 | TTestObject warmup = testFunc.Invoke();
89 |
90 | Stopwatch sw = Stopwatch.StartNew();
91 | for (int i = 0; i < iterations; i++)
92 | {
93 | TTestObject obj = testFunc.Invoke();
94 |
95 | list.Add(obj);
96 | }
97 |
98 | sw.Stop();
99 |
100 | GC.KeepAlive(warmup);
101 |
102 | return sw.Elapsed;
103 | }
104 |
105 |
106 | }
107 | }
--------------------------------------------------------------------------------
/SerializationPerformanceTest/Testers/XmlSerializationTester.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.Serialization;
6 | using System.Runtime.Serialization.Formatters.Binary;
7 | using System.Security.Cryptography;
8 | using System.Xml.Serialization;
9 |
10 | namespace SerializationPerformanceTest.Testers
11 | {
12 | class XmlSerializationTester : SerializationTester{
13 | private readonly XmlSerializer serializer;
14 |
15 | public XmlSerializationTester(TTestObject testObject)
16 | : base(testObject)
17 | {
18 | serializer = new XmlSerializer(typeof(TTestObject));
19 |
20 | }
21 |
22 | protected override TTestObject Deserialize()
23 | {
24 | base.MemoryStream.Seek(0, 0);
25 | var deserialize = (TTestObject)serializer.Deserialize(base.MemoryStream);
26 | return deserialize;
27 | }
28 |
29 | protected override MemoryStream Serialize()
30 | {
31 | var stream = new MemoryStream();
32 | serializer.Serialize(stream, base.TestObject);
33 | return stream;
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/SerializationPerformanceTest/bin/Debug/SerializationPerformanceTest.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/SerializationPerformanceTest/bin/Debug/SerializationPerformanceTest.vshost.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/SerializationPerformanceTest/bin/Debug/SerializationPerformanceTest.vshost.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/SerializationPerformanceTest/bin/Debug/ServiceStack.Text.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ServiceStack.Text
5 |
6 |
7 |
8 |
9 | Utils to load types
10 |
11 |
12 |
13 |
14 | Find the type from the name supplied
15 |
16 | [typeName] or [typeName, assemblyName]
17 |
18 |
19 |
20 |
21 | The top-most interface of the given type, if any.
22 |
23 |
24 |
25 |
26 | Find type if it exists
27 |
28 |
29 |
30 | The type if it exists
31 |
32 |
33 |
34 | Populate an object with Example data.
35 |
36 |
37 |
38 |
39 |
40 |
41 | Populates the object with example data.
42 |
43 |
44 | Tracks how deeply nested we are
45 |
46 |
47 |
48 |
49 | If AlwaysUseUtc is set to true then convert all DateTime to UTC.
50 |
51 |
52 |
53 |
54 |
55 |
56 | Repairs an out-of-spec XML date/time string which incorrectly uses a space instead of a 'T' to separate the date from the time.
57 | These string are occasionally generated by SQLite and can cause errors in OrmLite when reading these columns from the DB.
58 |
59 | The XML date/time string to repair
60 | The repaired string. If no repairs were made, the original string is returned.
61 |
62 |
63 |
64 | WCF Json format: /Date(unixts+0000)/
65 |
66 |
67 |
68 |
69 |
70 |
71 | WCF Json format: /Date(unixts+0000)/
72 |
73 |
74 |
75 |
76 |
77 |
78 | Get the type(string) constructor if exists
79 |
80 | The type.
81 |
82 |
83 |
84 |
85 | micro optimizations: using flags instead of value.IndexOfAny(EscapeChars)
86 |
87 |
88 |
89 |
90 |
91 |
92 | Class to hold
93 |
94 |
95 |
96 |
97 |
98 | A fast, standards-based, serialization-issue free DateTime serailizer.
99 |
100 |
101 |
102 |
103 | Determines whether this serializer can create the specified type from a string.
104 |
105 | The type.
106 |
107 | true if this instance [can create from string] the specified type; otherwise, false.
108 |
109 |
110 |
111 |
112 | Parses the specified value.
113 |
114 | The value.
115 |
116 |
117 |
118 |
119 | Deserializes from reader.
120 |
121 | The reader.
122 |
123 |
124 |
125 |
126 | Serializes to string.
127 |
128 | The value.
129 |
130 |
131 |
132 |
133 | Serializes to writer.
134 |
135 | The value.
136 | The writer.
137 |
138 |
139 |
140 | Sets which format to use when serializing TimeSpans
141 |
142 |
143 |
144 |
145 | if the is configured
146 | to take advantage of specification,
147 | to support user-friendly serialized formats, ie emitting camelCasing for JSON
148 | and parsing member names and enum values in a case-insensitive manner.
149 |
150 |
151 |
152 |
153 | if the is configured
154 | to support web-friendly serialized formats, ie emitting lowercase_underscore_casing for JSON
155 |
156 |
157 |
158 |
159 | Define how property names are mapped during deserialization
160 |
161 |
162 |
163 |
164 | Gets or sets a value indicating if the framework should throw serialization exceptions
165 | or continue regardless of deserialization errors. If the framework
166 | will throw; otherwise, it will parse as many fields as possible. The default is .
167 |
168 |
169 |
170 |
171 | Gets or sets a value indicating if the framework should always convert to UTC format instead of local time.
172 |
173 |
174 |
175 |
176 | Gets or sets a value indicating if the framework should always assume is in UTC format if Kind is Unspecified.
177 |
178 |
179 |
180 |
181 | Gets or sets whether we should append the Utc offset when we serialize Utc dates. Defaults to no.
182 | Only supported for when the JsConfig.DateHandler == JsonDateHandler.TimestampOffset
183 |
184 |
185 |
186 |
187 | Gets or sets a value indicating if unicode symbols should be serialized as "\uXXXX".
188 |
189 |
190 |
191 |
192 | If set to true, Interface types will be prefered over concrete types when serializing.
193 |
194 |
195 |
196 |
197 | Sets the maximum depth to avoid circular dependencies
198 |
199 |
200 |
201 |
202 | Set this to enable your own type construction provider.
203 | This is helpful for integration with IoC containers where you need to call the container constructor.
204 | Return null if you don't know how to construct the type and the parameterless constructor will be used.
205 |
206 |
207 |
208 |
209 | If set to true, Interface types will be prefered over concrete types when serializing.
210 |
211 |
212 |
213 |
214 | Always emit type info for this type. Takes precedence over ExcludeTypeInfo
215 |
216 |
217 |
218 |
219 | Never emit type info for this type
220 |
221 |
222 |
223 |
224 | if the is configured
225 | to take advantage of specification,
226 | to support user-friendly serialized formats, ie emitting camelCasing for JSON
227 | and parsing member names and enum values in a case-insensitive manner.
228 |
229 |
230 |
231 |
232 | Define custom serialization fn for BCL Structs
233 |
234 |
235 |
236 |
237 | Define custom raw serialization fn
238 |
239 |
240 |
241 |
242 | Define custom serialization hook
243 |
244 |
245 |
246 |
247 | Define custom deserialization fn for BCL Structs
248 |
249 |
250 |
251 |
252 | Define custom raw deserialization fn for objects
253 |
254 |
255 |
256 |
257 | Exclude specific properties of this type from being serialized
258 |
259 |
260 |
261 |
262 | Opt-in flag to set some Value Types to be treated as a Ref Type
263 |
264 |
265 |
266 |
267 | Whether there is a fn (raw or otherwise)
268 |
269 |
270 |
271 |
272 | The property names on target types must match property names in the JSON source
273 |
274 |
275 |
276 |
277 | The property names on target types may not match the property names in the JSON source
278 |
279 |
280 |
281 |
282 | Uses the xsd format like PT15H10M20S
283 |
284 |
285 |
286 |
287 | Uses the standard .net ToString method of the TimeSpan class
288 |
289 |
290 |
291 |
292 | Get JSON string value converted to T
293 |
294 |
295 |
296 |
297 | Get JSON string value
298 |
299 |
300 |
301 |
302 | Get unescaped string value
303 |
304 |
305 |
306 |
307 | Get unescaped string value
308 |
309 |
310 |
311 |
312 | Write JSON Array, Object, bool or number values as raw string
313 |
314 |
315 |
316 |
317 | Get JSON string value
318 |
319 |
320 |
321 |
322 | Creates an instance of a Type from a string value
323 |
324 |
325 |
326 |
327 | Parses the specified value.
328 |
329 | The value.
330 |
331 |
332 |
333 |
334 | Shortcut escape when we're sure value doesn't contain any escaped chars
335 |
336 |
337 |
338 |
339 |
340 |
341 | Given a character as utf32, returns the equivalent string provided that the character
342 | is legal json.
343 |
344 |
345 |
346 |
347 |
348 |
349 | micro optimizations: using flags instead of value.IndexOfAny(EscapeChars)
350 |
351 |
352 |
353 |
354 |
355 |
356 | Implement the serializer using a more static approach
357 |
358 |
359 |
360 |
361 |
362 | Implement the serializer using a more static approach
363 |
364 |
365 |
366 |
367 |
368 | Public Code API to register commercial license for ServiceStack.
369 |
370 |
371 |
372 |
373 | Internal Utilities to verify licensing
374 |
375 |
376 |
377 |
378 | Pretty Thread-Safe cache class from:
379 | http://code.google.com/p/dapper-dot-net/source/browse/Dapper/SqlMapper.cs
380 |
381 | This is a micro-cache; suitable when the number of terms is controllable (a few hundred, for example),
382 | and strictly append-only; you cannot change existing values. All key matches are on **REFERENCE**
383 | equality. The type is fully thread-safe.
384 |
385 |
386 |
387 |
388 | Represents an individual object, allowing access to members by-name
389 |
390 |
391 |
392 |
393 | Use the target types definition of equality
394 |
395 |
396 |
397 |
398 | Obtain the hash of the target object
399 |
400 |
401 |
402 |
403 | Use the target's definition of a string representation
404 |
405 |
406 |
407 |
408 | Wraps an individual object, allowing by-name access to that instance
409 |
410 |
411 |
412 |
413 | Get or Set the value of a named member for the underlying object
414 |
415 |
416 |
417 |
418 | The object represented by this instance
419 |
420 |
421 |
422 |
423 | Provides by-name member-access to objects of a given type
424 |
425 |
426 |
427 |
428 | Create a new instance of this type
429 |
430 |
431 |
432 |
433 | Provides a type-specific accessor, allowing by-name access for all objects of that type
434 |
435 | The accessor is cached internally; a pre-existing accessor may be returned
436 |
437 |
438 |
439 | Does this type support new instances via a parameterless constructor?
440 |
441 |
442 |
443 |
444 | Get or set the value of a named member on the target instance
445 |
446 |
447 |
448 |
449 | Maps the path of a file in the context of a VS project
450 |
451 | the relative path
452 | the absolute path
453 | Assumes static content is two directories above the /bin/ directory,
454 | eg. in a unit test scenario the assembly would be in /bin/Debug/.
455 |
456 |
457 |
458 | Maps the path of a file in a self-hosted scenario
459 |
460 | the relative path
461 | the absolute path
462 | Assumes static content is copied to /bin/ folder with the assemblies
463 |
464 |
465 |
466 | Maps the path of a file in an Asp.Net hosted scenario
467 |
468 | the relative path
469 | the absolute path
470 | Assumes static content is in the parent folder of the /bin/ directory
471 |
472 |
473 |
474 | Implement the serializer using a more static approach
475 |
476 |
477 |
478 |
479 |
480 | Creates a new instance of type.
481 | First looks at JsConfig.ModelFactory before falling back to CreateInstance
482 |
483 |
484 |
485 |
486 | Creates a new instance of type.
487 | First looks at JsConfig.ModelFactory before falling back to CreateInstance
488 |
489 |
490 |
491 |
492 | Creates a new instance from the default constructor of type
493 |
494 |
495 |
496 |
497 | Add a Property attribute at runtime.
498 | Not threadsafe, should only add attributes on Startup.
499 |
500 |
501 |
502 |
503 | Add a Property attribute at runtime.
504 | Not threadsafe, should only add attributes on Startup.
505 |
506 |
507 |
508 |
509 | @jonskeet: Collection of utility methods which operate on streams.
510 | r285, February 26th 2009: http://www.yoda.arachsys.com/csharp/miscutil/
511 |
512 |
513 |
514 |
515 | Reads the given stream up to the end, returning the data as a byte
516 | array.
517 |
518 |
519 |
520 |
521 | Reads the given stream up to the end, returning the data as a byte
522 | array, using the given buffer size.
523 |
524 |
525 |
526 |
527 | Reads the given stream up to the end, returning the data as a byte
528 | array, using the given buffer for transferring data. Note that the
529 | current contents of the buffer is ignored, so the buffer needn't
530 | be cleared beforehand.
531 |
532 |
533 |
534 |
535 | Copies all the data from one stream into another.
536 |
537 |
538 |
539 |
540 | Copies all the data from one stream into another, using a buffer
541 | of the given size.
542 |
543 |
544 |
545 |
546 | Copies all the data from one stream into another, using the given
547 | buffer for transferring data. Note that the current contents of
548 | the buffer is ignored, so the buffer needn't be cleared beforehand.
549 |
550 |
551 |
552 |
553 | Reads exactly the given number of bytes from the specified stream.
554 | If the end of the stream is reached before the specified amount
555 | of data is read, an exception is thrown.
556 |
557 |
558 |
559 |
560 | Reads into a buffer, filling it completely.
561 |
562 |
563 |
564 |
565 | Reads exactly the given number of bytes from the specified stream,
566 | into the given buffer, starting at position 0 of the array.
567 |
568 |
569 |
570 |
571 | Reads exactly the given number of bytes from the specified stream,
572 | into the given buffer, starting at position 0 of the array.
573 |
574 |
575 |
576 |
577 | Same as ReadExactly, but without the argument checks.
578 |
579 |
580 |
581 |
582 | Converts from base: 0 - 62
583 |
584 | The source.
585 | From.
586 | To.
587 |
588 |
589 |
590 |
591 | Skip the encoding process for 'safe strings'
592 |
593 |
594 |
595 |
596 |
597 |
598 | A class to allow the conversion of doubles to string representations of
599 | their exact decimal values. The implementation aims for readability over
600 | efficiency.
601 |
602 | Courtesy of @JonSkeet
603 | http://www.yoda.arachsys.com/csharp/DoubleConverter.cs
604 |
605 |
606 |
607 |
608 |
609 |
610 |
611 | How many digits are *after* the decimal point
612 |
613 |
614 |
615 |
616 | Constructs an arbitrary decimal expansion from the given long.
617 | The long must not be negative.
618 |
619 |
620 |
621 |
622 | Multiplies the current expansion by the given amount, which should
623 | only be 2 or 5.
624 |
625 |
626 |
627 |
628 | Shifts the decimal point; a negative value makes
629 | the decimal expansion bigger (as fewer digits come after the
630 | decimal place) and a positive value makes the decimal
631 | expansion smaller.
632 |
633 |
634 |
635 |
636 | Removes leading/trailing zeroes from the expansion.
637 |
638 |
639 |
640 |
641 | Converts the value to a proper decimal string representation.
642 |
643 |
644 |
645 |
646 | Creates an instance of a Type from a string value
647 |
648 |
649 |
650 |
651 | Determines whether the specified type is convertible from string.
652 |
653 | The type.
654 |
655 | true if the specified type is convertible from string; otherwise, false.
656 |
657 |
658 |
659 |
660 | Parses the specified value.
661 |
662 | The value.
663 |
664 |
665 |
666 |
667 | Parses the specified type.
668 |
669 | The type.
670 | The value.
671 |
672 |
673 |
674 |
675 | Useful extension method to get the Dictionary[string,string] representation of any POCO type.
676 |
677 |
678 |
679 |
680 |
681 | Recursively prints the contents of any POCO object in a human-friendly, readable format
682 |
683 |
684 |
685 |
686 |
687 | Print Dump to Console.WriteLine
688 |
689 |
690 |
691 |
692 | Print string.Format to Console.WriteLine
693 |
694 |
695 |
696 |
697 | Parses the specified value.
698 |
699 | The value.
700 |
701 |
702 |
703 |
704 |
--------------------------------------------------------------------------------
/SerializationPerformanceTest/bin/Debug/beers.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/SerializationPerformanceTest/bin/Debug/beers.bin
--------------------------------------------------------------------------------
/SerializationPerformanceTest/bin/Debug/beers.msgpack:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/SerializationPerformanceTest/bin/Debug/beers.msgpack
--------------------------------------------------------------------------------
/SerializationPerformanceTest/bin/Release/SerializationPerformanceTest.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/SerializationPerformanceTest/bin/Release/SerializationPerformanceTest.vshost.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/SerializationPerformanceTest/bin/Release/SerializationPerformanceTest.vshost.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/SerializationPerformanceTest/bin/Release/ServiceStack.Text.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ServiceStack.Text
5 |
6 |
7 |
8 |
9 | Utils to load types
10 |
11 |
12 |
13 |
14 | Find the type from the name supplied
15 |
16 | [typeName] or [typeName, assemblyName]
17 |
18 |
19 |
20 |
21 | The top-most interface of the given type, if any.
22 |
23 |
24 |
25 |
26 | Find type if it exists
27 |
28 |
29 |
30 | The type if it exists
31 |
32 |
33 |
34 | Populate an object with Example data.
35 |
36 |
37 |
38 |
39 |
40 |
41 | Populates the object with example data.
42 |
43 |
44 | Tracks how deeply nested we are
45 |
46 |
47 |
48 |
49 | If AlwaysUseUtc is set to true then convert all DateTime to UTC.
50 |
51 |
52 |
53 |
54 |
55 |
56 | Repairs an out-of-spec XML date/time string which incorrectly uses a space instead of a 'T' to separate the date from the time.
57 | These string are occasionally generated by SQLite and can cause errors in OrmLite when reading these columns from the DB.
58 |
59 | The XML date/time string to repair
60 | The repaired string. If no repairs were made, the original string is returned.
61 |
62 |
63 |
64 | WCF Json format: /Date(unixts+0000)/
65 |
66 |
67 |
68 |
69 |
70 |
71 | WCF Json format: /Date(unixts+0000)/
72 |
73 |
74 |
75 |
76 |
77 |
78 | Get the type(string) constructor if exists
79 |
80 | The type.
81 |
82 |
83 |
84 |
85 | micro optimizations: using flags instead of value.IndexOfAny(EscapeChars)
86 |
87 |
88 |
89 |
90 |
91 |
92 | Class to hold
93 |
94 |
95 |
96 |
97 |
98 | A fast, standards-based, serialization-issue free DateTime serailizer.
99 |
100 |
101 |
102 |
103 | Determines whether this serializer can create the specified type from a string.
104 |
105 | The type.
106 |
107 | true if this instance [can create from string] the specified type; otherwise, false.
108 |
109 |
110 |
111 |
112 | Parses the specified value.
113 |
114 | The value.
115 |
116 |
117 |
118 |
119 | Deserializes from reader.
120 |
121 | The reader.
122 |
123 |
124 |
125 |
126 | Serializes to string.
127 |
128 | The value.
129 |
130 |
131 |
132 |
133 | Serializes to writer.
134 |
135 | The value.
136 | The writer.
137 |
138 |
139 |
140 | Sets which format to use when serializing TimeSpans
141 |
142 |
143 |
144 |
145 | if the is configured
146 | to take advantage of specification,
147 | to support user-friendly serialized formats, ie emitting camelCasing for JSON
148 | and parsing member names and enum values in a case-insensitive manner.
149 |
150 |
151 |
152 |
153 | if the is configured
154 | to support web-friendly serialized formats, ie emitting lowercase_underscore_casing for JSON
155 |
156 |
157 |
158 |
159 | Define how property names are mapped during deserialization
160 |
161 |
162 |
163 |
164 | Gets or sets a value indicating if the framework should throw serialization exceptions
165 | or continue regardless of deserialization errors. If the framework
166 | will throw; otherwise, it will parse as many fields as possible. The default is .
167 |
168 |
169 |
170 |
171 | Gets or sets a value indicating if the framework should always convert to UTC format instead of local time.
172 |
173 |
174 |
175 |
176 | Gets or sets a value indicating if the framework should always assume is in UTC format if Kind is Unspecified.
177 |
178 |
179 |
180 |
181 | Gets or sets whether we should append the Utc offset when we serialize Utc dates. Defaults to no.
182 | Only supported for when the JsConfig.DateHandler == JsonDateHandler.TimestampOffset
183 |
184 |
185 |
186 |
187 | Gets or sets a value indicating if unicode symbols should be serialized as "\uXXXX".
188 |
189 |
190 |
191 |
192 | If set to true, Interface types will be prefered over concrete types when serializing.
193 |
194 |
195 |
196 |
197 | Sets the maximum depth to avoid circular dependencies
198 |
199 |
200 |
201 |
202 | Set this to enable your own type construction provider.
203 | This is helpful for integration with IoC containers where you need to call the container constructor.
204 | Return null if you don't know how to construct the type and the parameterless constructor will be used.
205 |
206 |
207 |
208 |
209 | If set to true, Interface types will be prefered over concrete types when serializing.
210 |
211 |
212 |
213 |
214 | Always emit type info for this type. Takes precedence over ExcludeTypeInfo
215 |
216 |
217 |
218 |
219 | Never emit type info for this type
220 |
221 |
222 |
223 |
224 | if the is configured
225 | to take advantage of specification,
226 | to support user-friendly serialized formats, ie emitting camelCasing for JSON
227 | and parsing member names and enum values in a case-insensitive manner.
228 |
229 |
230 |
231 |
232 | Define custom serialization fn for BCL Structs
233 |
234 |
235 |
236 |
237 | Define custom raw serialization fn
238 |
239 |
240 |
241 |
242 | Define custom serialization hook
243 |
244 |
245 |
246 |
247 | Define custom deserialization fn for BCL Structs
248 |
249 |
250 |
251 |
252 | Define custom raw deserialization fn for objects
253 |
254 |
255 |
256 |
257 | Exclude specific properties of this type from being serialized
258 |
259 |
260 |
261 |
262 | Opt-in flag to set some Value Types to be treated as a Ref Type
263 |
264 |
265 |
266 |
267 | Whether there is a fn (raw or otherwise)
268 |
269 |
270 |
271 |
272 | The property names on target types must match property names in the JSON source
273 |
274 |
275 |
276 |
277 | The property names on target types may not match the property names in the JSON source
278 |
279 |
280 |
281 |
282 | Uses the xsd format like PT15H10M20S
283 |
284 |
285 |
286 |
287 | Uses the standard .net ToString method of the TimeSpan class
288 |
289 |
290 |
291 |
292 | Get JSON string value converted to T
293 |
294 |
295 |
296 |
297 | Get JSON string value
298 |
299 |
300 |
301 |
302 | Get unescaped string value
303 |
304 |
305 |
306 |
307 | Get unescaped string value
308 |
309 |
310 |
311 |
312 | Write JSON Array, Object, bool or number values as raw string
313 |
314 |
315 |
316 |
317 | Get JSON string value
318 |
319 |
320 |
321 |
322 | Creates an instance of a Type from a string value
323 |
324 |
325 |
326 |
327 | Parses the specified value.
328 |
329 | The value.
330 |
331 |
332 |
333 |
334 | Shortcut escape when we're sure value doesn't contain any escaped chars
335 |
336 |
337 |
338 |
339 |
340 |
341 | Given a character as utf32, returns the equivalent string provided that the character
342 | is legal json.
343 |
344 |
345 |
346 |
347 |
348 |
349 | micro optimizations: using flags instead of value.IndexOfAny(EscapeChars)
350 |
351 |
352 |
353 |
354 |
355 |
356 | Implement the serializer using a more static approach
357 |
358 |
359 |
360 |
361 |
362 | Implement the serializer using a more static approach
363 |
364 |
365 |
366 |
367 |
368 | Public Code API to register commercial license for ServiceStack.
369 |
370 |
371 |
372 |
373 | Internal Utilities to verify licensing
374 |
375 |
376 |
377 |
378 | Pretty Thread-Safe cache class from:
379 | http://code.google.com/p/dapper-dot-net/source/browse/Dapper/SqlMapper.cs
380 |
381 | This is a micro-cache; suitable when the number of terms is controllable (a few hundred, for example),
382 | and strictly append-only; you cannot change existing values. All key matches are on **REFERENCE**
383 | equality. The type is fully thread-safe.
384 |
385 |
386 |
387 |
388 | Represents an individual object, allowing access to members by-name
389 |
390 |
391 |
392 |
393 | Use the target types definition of equality
394 |
395 |
396 |
397 |
398 | Obtain the hash of the target object
399 |
400 |
401 |
402 |
403 | Use the target's definition of a string representation
404 |
405 |
406 |
407 |
408 | Wraps an individual object, allowing by-name access to that instance
409 |
410 |
411 |
412 |
413 | Get or Set the value of a named member for the underlying object
414 |
415 |
416 |
417 |
418 | The object represented by this instance
419 |
420 |
421 |
422 |
423 | Provides by-name member-access to objects of a given type
424 |
425 |
426 |
427 |
428 | Create a new instance of this type
429 |
430 |
431 |
432 |
433 | Provides a type-specific accessor, allowing by-name access for all objects of that type
434 |
435 | The accessor is cached internally; a pre-existing accessor may be returned
436 |
437 |
438 |
439 | Does this type support new instances via a parameterless constructor?
440 |
441 |
442 |
443 |
444 | Get or set the value of a named member on the target instance
445 |
446 |
447 |
448 |
449 | Maps the path of a file in the context of a VS project
450 |
451 | the relative path
452 | the absolute path
453 | Assumes static content is two directories above the /bin/ directory,
454 | eg. in a unit test scenario the assembly would be in /bin/Debug/.
455 |
456 |
457 |
458 | Maps the path of a file in a self-hosted scenario
459 |
460 | the relative path
461 | the absolute path
462 | Assumes static content is copied to /bin/ folder with the assemblies
463 |
464 |
465 |
466 | Maps the path of a file in an Asp.Net hosted scenario
467 |
468 | the relative path
469 | the absolute path
470 | Assumes static content is in the parent folder of the /bin/ directory
471 |
472 |
473 |
474 | Implement the serializer using a more static approach
475 |
476 |
477 |
478 |
479 |
480 | Creates a new instance of type.
481 | First looks at JsConfig.ModelFactory before falling back to CreateInstance
482 |
483 |
484 |
485 |
486 | Creates a new instance of type.
487 | First looks at JsConfig.ModelFactory before falling back to CreateInstance
488 |
489 |
490 |
491 |
492 | Creates a new instance from the default constructor of type
493 |
494 |
495 |
496 |
497 | Add a Property attribute at runtime.
498 | Not threadsafe, should only add attributes on Startup.
499 |
500 |
501 |
502 |
503 | Add a Property attribute at runtime.
504 | Not threadsafe, should only add attributes on Startup.
505 |
506 |
507 |
508 |
509 | @jonskeet: Collection of utility methods which operate on streams.
510 | r285, February 26th 2009: http://www.yoda.arachsys.com/csharp/miscutil/
511 |
512 |
513 |
514 |
515 | Reads the given stream up to the end, returning the data as a byte
516 | array.
517 |
518 |
519 |
520 |
521 | Reads the given stream up to the end, returning the data as a byte
522 | array, using the given buffer size.
523 |
524 |
525 |
526 |
527 | Reads the given stream up to the end, returning the data as a byte
528 | array, using the given buffer for transferring data. Note that the
529 | current contents of the buffer is ignored, so the buffer needn't
530 | be cleared beforehand.
531 |
532 |
533 |
534 |
535 | Copies all the data from one stream into another.
536 |
537 |
538 |
539 |
540 | Copies all the data from one stream into another, using a buffer
541 | of the given size.
542 |
543 |
544 |
545 |
546 | Copies all the data from one stream into another, using the given
547 | buffer for transferring data. Note that the current contents of
548 | the buffer is ignored, so the buffer needn't be cleared beforehand.
549 |
550 |
551 |
552 |
553 | Reads exactly the given number of bytes from the specified stream.
554 | If the end of the stream is reached before the specified amount
555 | of data is read, an exception is thrown.
556 |
557 |
558 |
559 |
560 | Reads into a buffer, filling it completely.
561 |
562 |
563 |
564 |
565 | Reads exactly the given number of bytes from the specified stream,
566 | into the given buffer, starting at position 0 of the array.
567 |
568 |
569 |
570 |
571 | Reads exactly the given number of bytes from the specified stream,
572 | into the given buffer, starting at position 0 of the array.
573 |
574 |
575 |
576 |
577 | Same as ReadExactly, but without the argument checks.
578 |
579 |
580 |
581 |
582 | Converts from base: 0 - 62
583 |
584 | The source.
585 | From.
586 | To.
587 |
588 |
589 |
590 |
591 | Skip the encoding process for 'safe strings'
592 |
593 |
594 |
595 |
596 |
597 |
598 | A class to allow the conversion of doubles to string representations of
599 | their exact decimal values. The implementation aims for readability over
600 | efficiency.
601 |
602 | Courtesy of @JonSkeet
603 | http://www.yoda.arachsys.com/csharp/DoubleConverter.cs
604 |
605 |
606 |
607 |
608 |
609 |
610 |
611 | How many digits are *after* the decimal point
612 |
613 |
614 |
615 |
616 | Constructs an arbitrary decimal expansion from the given long.
617 | The long must not be negative.
618 |
619 |
620 |
621 |
622 | Multiplies the current expansion by the given amount, which should
623 | only be 2 or 5.
624 |
625 |
626 |
627 |
628 | Shifts the decimal point; a negative value makes
629 | the decimal expansion bigger (as fewer digits come after the
630 | decimal place) and a positive value makes the decimal
631 | expansion smaller.
632 |
633 |
634 |
635 |
636 | Removes leading/trailing zeroes from the expansion.
637 |
638 |
639 |
640 |
641 | Converts the value to a proper decimal string representation.
642 |
643 |
644 |
645 |
646 | Creates an instance of a Type from a string value
647 |
648 |
649 |
650 |
651 | Determines whether the specified type is convertible from string.
652 |
653 | The type.
654 |
655 | true if the specified type is convertible from string; otherwise, false.
656 |
657 |
658 |
659 |
660 | Parses the specified value.
661 |
662 | The value.
663 |
664 |
665 |
666 |
667 | Parses the specified type.
668 |
669 | The type.
670 | The value.
671 |
672 |
673 |
674 |
675 | Useful extension method to get the Dictionary[string,string] representation of any POCO type.
676 |
677 |
678 |
679 |
680 |
681 | Recursively prints the contents of any POCO object in a human-friendly, readable format
682 |
683 |
684 |
685 |
686 |
687 | Print Dump to Console.WriteLine
688 |
689 |
690 |
691 |
692 | Print string.Format to Console.WriteLine
693 |
694 |
695 |
696 |
697 | Parses the specified value.
698 |
699 | The value.
700 |
701 |
702 |
703 |
704 |
--------------------------------------------------------------------------------
/SerializationPerformanceTest/obj/Debug/SerializationPerformanceTest.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Debug\SerializationPerformanceTest.exe.config
2 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\obj\Debug\SerializationPerformanceTest.csprojResolveAssemblyReference.cache
3 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Debug\SerializationPerformanceTest.exe
4 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Debug\SerializationPerformanceTest.pdb
5 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Debug\HtmlAgilityPack.dll
6 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Debug\MsgPack.dll
7 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Debug\Newtonsoft.Json.dll
8 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Debug\HtmlAgilityPack.pdb
9 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Debug\HtmlAgilityPack.xml
10 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Debug\MsgPack.xml
11 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Debug\Newtonsoft.Json.xml
12 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\obj\Debug\SerializationPerformanceTest.exe
13 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\obj\Debug\SerializationPerformanceTest.pdb
14 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Debug\protobuf-net.dll
15 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Debug\protobuf-net.pdb
16 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Debug\protobuf-net.xml
17 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Debug\ServiceStack.Text.dll
18 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Debug\ServiceStack.Text.xml
19 |
--------------------------------------------------------------------------------
/SerializationPerformanceTest/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/SerializationPerformanceTest/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
--------------------------------------------------------------------------------
/SerializationPerformanceTest/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/SerializationPerformanceTest/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
--------------------------------------------------------------------------------
/SerializationPerformanceTest/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/SerializationPerformanceTest/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
--------------------------------------------------------------------------------
/SerializationPerformanceTest/obj/Release/SerializationPerformanceTest.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Release\SerializationPerformanceTest.exe.config
2 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Release\SerializationPerformanceTest.exe
3 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Release\SerializationPerformanceTest.pdb
4 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Release\HtmlAgilityPack.dll
5 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Release\MsgPack.dll
6 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Release\Newtonsoft.Json.dll
7 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Release\HtmlAgilityPack.pdb
8 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Release\HtmlAgilityPack.xml
9 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Release\MsgPack.xml
10 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Release\Newtonsoft.Json.xml
11 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\obj\Release\SerializationPerformanceTest.exe
12 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\obj\Release\SerializationPerformanceTest.pdb
13 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Release\protobuf-net.dll
14 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Release\protobuf-net.pdb
15 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Release\protobuf-net.xml
16 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Release\ServiceStack.Text.dll
17 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\bin\Release\ServiceStack.Text.xml
18 | c:\code\SerializationPerformanceTest\SerializationPerformanceTest\obj\Release\SerializationPerformanceTest.csprojResolveAssemblyReference.cache
19 |
--------------------------------------------------------------------------------
/SerializationPerformanceTest/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/SerializationPerformanceTest/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
--------------------------------------------------------------------------------
/SerializationPerformanceTest/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/SerializationPerformanceTest/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
--------------------------------------------------------------------------------
/SerializationPerformanceTest/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/SerializationPerformanceTest/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
--------------------------------------------------------------------------------
/SerializationPerformanceTest/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/packages/HtmlAgilityPack.1.4.6/HAPIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/packages/HtmlAgilityPack.1.4.6/HAPIcon.png
--------------------------------------------------------------------------------
/packages/HtmlAgilityPack.1.4.6/HtmlAgilityPack.1.4.6.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/packages/HtmlAgilityPack.1.4.6/HtmlAgilityPack.1.4.6.nupkg
--------------------------------------------------------------------------------
/packages/HtmlAgilityPack.1.4.6/lib/winrt45/HtmlAgilityPack.pri:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/packages/HtmlAgilityPack.1.4.6/lib/winrt45/HtmlAgilityPack.pri
--------------------------------------------------------------------------------
/packages/HtmlAgilityPack.1.4.6/lib/winrt45/HtmlAgilityPack.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | HtmlAgilityPack
5 |
6 |
7 |
8 |
9 | Happens when a document has been loaded
10 |
11 |
12 |
13 |
14 | If an error occured when loading the document, null if not
15 |
16 |
17 |
18 |
19 | The document that has been loaded
20 |
21 |
22 |
23 |
24 | A utility class to compute CRC32.
25 |
26 |
27 |
28 |
29 | Compute a checksum for a given array of bytes.
30 |
31 | The array of bytes to compute the checksum for.
32 | The computed checksum.
33 |
34 |
35 |
36 | Compute a checksum for a given string.
37 |
38 | The string to compute the checksum for.
39 | The computed checksum.
40 |
41 |
42 |
43 | Represents an HTML attribute.
44 |
45 |
46 |
47 |
48 | Compares the current instance with another attribute. Comparison is based on attributes' name.
49 |
50 | An attribute to compare with this instance.
51 | A 32-bit signed integer that indicates the relative order of the names comparison.
52 |
53 |
54 |
55 | Creates a duplicate of this attribute.
56 |
57 | The cloned attribute.
58 |
59 |
60 |
61 | Removes this attribute from it's parents collection
62 |
63 |
64 |
65 |
66 | Gets the line number of this attribute in the document.
67 |
68 |
69 |
70 |
71 | Gets the column number of this attribute in the document.
72 |
73 |
74 |
75 |
76 | Gets the qualified name of the attribute.
77 |
78 |
79 |
80 |
81 | Name of attribute with original case
82 |
83 |
84 |
85 |
86 | Gets the HTML document to which this attribute belongs.
87 |
88 |
89 |
90 |
91 | Gets the HTML node to which this attribute belongs.
92 |
93 |
94 |
95 |
96 | Specifies what type of quote the data should be wrapped in
97 |
98 |
99 |
100 |
101 | Gets the stream position of this attribute in the document, relative to the start of the document.
102 |
103 |
104 |
105 |
106 | Gets or sets the value of the attribute.
107 |
108 |
109 |
110 |
111 | Gets a valid XPath string that points to this Attribute
112 |
113 |
114 |
115 |
116 | An Enum representing different types of Quotes used for surrounding attribute values
117 |
118 |
119 |
120 |
121 | A single quote mark '
122 |
123 |
124 |
125 |
126 | A double quote mark "
127 |
128 |
129 |
130 |
131 | Represents a combined list and collection of HTML nodes.
132 |
133 |
134 |
135 |
136 | Adds supplied item to collection
137 |
138 |
139 |
140 |
141 |
142 | Explicit clear
143 |
144 |
145 |
146 |
147 | Retreives existence of supplied item
148 |
149 |
150 |
151 |
152 |
153 |
154 | Copies collection to array
155 |
156 |
157 |
158 |
159 |
160 |
161 | Get Explicit enumerator
162 |
163 |
164 |
165 |
166 |
167 | Explicit non-generic enumerator
168 |
169 |
170 |
171 |
172 |
173 | Retrieves the index for the supplied item, -1 if not found
174 |
175 |
176 |
177 |
178 |
179 |
180 | Inserts given item into collection at supplied index
181 |
182 |
183 |
184 |
185 |
186 |
187 | Explicit collection remove
188 |
189 |
190 |
191 |
192 |
193 |
194 | Removes the attribute at the specified index.
195 |
196 | The index of the attribute to remove.
197 |
198 |
199 |
200 | Adds a new attribute to the collection with the given values
201 |
202 |
203 |
204 |
205 |
206 |
207 | Inserts the specified attribute as the last attribute in the collection.
208 |
209 | The attribute to insert. May not be null.
210 | The appended attribute.
211 |
212 |
213 |
214 | Creates and inserts a new attribute as the last attribute in the collection.
215 |
216 | The name of the attribute to insert.
217 | The appended attribute.
218 |
219 |
220 |
221 | Creates and inserts a new attribute as the last attribute in the collection.
222 |
223 | The name of the attribute to insert.
224 | The value of the attribute to insert.
225 | The appended attribute.
226 |
227 |
228 |
229 | Checks for existance of attribute with given name
230 |
231 |
232 |
233 |
234 |
235 |
236 | Inserts the specified attribute as the first node in the collection.
237 |
238 | The attribute to insert. May not be null.
239 | The prepended attribute.
240 |
241 |
242 |
243 | Removes a given attribute from the list.
244 |
245 | The attribute to remove. May not be null.
246 |
247 |
248 |
249 | Removes an attribute from the list, using its name. If there are more than one attributes with this name, they will all be removed.
250 |
251 | The attribute's name. May not be null.
252 |
253 |
254 |
255 | Remove all attributes in the list.
256 |
257 |
258 |
259 |
260 | Returns all attributes with specified name. Handles case insentivity
261 |
262 | Name of the attribute
263 |
264 |
265 |
266 |
267 | Removes all attributes from the collection
268 |
269 |
270 |
271 |
272 | Clears the attribute collection
273 |
274 |
275 |
276 |
277 | Gets a given attribute from the list using its name.
278 |
279 |
280 |
281 |
282 | Gets the number of elements actually contained in the list.
283 |
284 |
285 |
286 |
287 | Gets readonly status of colelction
288 |
289 |
290 |
291 |
292 | Gets the attribute at the specified index.
293 |
294 |
295 |
296 |
297 | Represents an HTML comment.
298 |
299 |
300 |
301 |
302 | Represents an HTML node.
303 |
304 |
305 |
306 |
307 | Gets the name of a comment node. It is actually defined as '#comment'.
308 |
309 |
310 |
311 |
312 | Gets the name of the document node. It is actually defined as '#document'.
313 |
314 |
315 |
316 |
317 | Gets the name of a text node. It is actually defined as '#text'.
318 |
319 |
320 |
321 |
322 | Gets a collection of flags that define specific behaviors for specific element nodes.
323 | The table contains a DictionaryEntry list with the lowercase tag name as the Key, and a combination of HtmlElementFlags as the Value.
324 |
325 |
326 |
327 |
328 | Initialize HtmlNode. Builds a list of all tags that have special allowances
329 |
330 |
331 |
332 |
333 | Initializes HtmlNode, providing type, owner and where it exists in a collection
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 | Determines if an element node can be kept overlapped.
342 |
343 | The name of the element node to check. May not be null.
344 | true if the name is the name of an element node that can be kept overlapped, false otherwise.
345 |
346 |
347 |
348 | Creates an HTML node from a string representing literal HTML.
349 |
350 | The HTML text.
351 | The newly created node instance.
352 |
353 |
354 |
355 | Determines if an element node is a CDATA element node.
356 |
357 | The name of the element node to check. May not be null.
358 | true if the name is the name of a CDATA element node, false otherwise.
359 |
360 |
361 |
362 | Determines if an element node is closed.
363 |
364 | The name of the element node to check. May not be null.
365 | true if the name is the name of a closed element node, false otherwise.
366 |
367 |
368 |
369 | Determines if an element node is defined as empty.
370 |
371 | The name of the element node to check. May not be null.
372 | true if the name is the name of an empty element node, false otherwise.
373 |
374 |
375 |
376 | Determines if a text corresponds to the closing tag of an node that can be kept overlapped.
377 |
378 | The text to check. May not be null.
379 | true or false.
380 |
381 |
382 |
383 | Returns a collection of all ancestor nodes of this element.
384 |
385 |
386 |
387 |
388 |
389 | Get Ancestors with matching name
390 |
391 |
392 |
393 |
394 |
395 |
396 | Returns a collection of all ancestor nodes of this element.
397 |
398 |
399 |
400 |
401 |
402 | Gets all anscestor nodes and the current node
403 |
404 |
405 |
406 |
407 |
408 |
409 | Adds the specified node to the end of the list of children of this node.
410 |
411 | The node to add. May not be null.
412 | The node added.
413 |
414 |
415 |
416 | Adds the specified node to the end of the list of children of this node.
417 |
418 | The node list to add. May not be null.
419 |
420 |
421 |
422 | Gets all Attributes with name
423 |
424 |
425 |
426 |
427 |
428 |
429 | Creates a duplicate of the node
430 |
431 |
432 |
433 |
434 |
435 | Creates a duplicate of the node and changes its name at the same time.
436 |
437 | The new name of the cloned node. May not be null.
438 | The cloned node.
439 |
440 |
441 |
442 | Creates a duplicate of the node and changes its name at the same time.
443 |
444 | The new name of the cloned node. May not be null.
445 | true to recursively clone the subtree under the specified node; false to clone only the node itself.
446 | The cloned node.
447 |
448 |
449 |
450 | Creates a duplicate of the node.
451 |
452 | true to recursively clone the subtree under the specified node; false to clone only the node itself.
453 | The cloned node.
454 |
455 |
456 |
457 | Creates a duplicate of the node and the subtree under it.
458 |
459 | The node to duplicate. May not be null.
460 |
461 |
462 |
463 | Creates a duplicate of the node.
464 |
465 | The node to duplicate. May not be null.
466 | true to recursively clone the subtree under the specified node, false to clone only the node itself.
467 |
468 |
469 |
470 | Gets all Descendant nodes for this node and each of child nodes
471 |
472 |
473 |
474 |
475 |
476 | Returns a collection of all descendant nodes of this element, in document order
477 |
478 |
479 |
480 |
481 |
482 | Gets all Descendant nodes in enumerated list
483 |
484 |
485 |
486 |
487 |
488 | Get all descendant nodes with matching name
489 |
490 |
491 |
492 |
493 |
494 |
495 | Returns a collection of all descendant nodes of this element, in document order
496 |
497 |
498 |
499 |
500 |
501 | Gets all descendant nodes including this node
502 |
503 |
504 |
505 |
506 |
507 |
508 | Gets first generation child node matching name
509 |
510 |
511 |
512 |
513 |
514 |
515 | Gets matching first generation child nodes matching name
516 |
517 |
518 |
519 |
520 |
521 |
522 | Helper method to get the value of an attribute of this node. If the attribute is not found, the default value will be returned.
523 |
524 | The name of the attribute to get. May not be null.
525 | The default value to return if not found.
526 | The value of the attribute if found, the default value if not found.
527 |
528 |
529 |
530 | Helper method to get the value of an attribute of this node. If the attribute is not found, the default value will be returned.
531 |
532 | The name of the attribute to get. May not be null.
533 | The default value to return if not found.
534 | The value of the attribute if found, the default value if not found.
535 |
536 |
537 |
538 | Helper method to get the value of an attribute of this node. If the attribute is not found, the default value will be returned.
539 |
540 | The name of the attribute to get. May not be null.
541 | The default value to return if not found.
542 | The value of the attribute if found, the default value if not found.
543 |
544 |
545 |
546 | Inserts the specified node immediately after the specified reference node.
547 |
548 | The node to insert. May not be null.
549 | The node that is the reference node. The newNode is placed after the refNode.
550 | The node being inserted.
551 |
552 |
553 |
554 | Inserts the specified node immediately before the specified reference node.
555 |
556 | The node to insert. May not be null.
557 | The node that is the reference node. The newChild is placed before this node.
558 | The node being inserted.
559 |
560 |
561 |
562 | Adds the specified node to the beginning of the list of children of this node.
563 |
564 | The node to add. May not be null.
565 | The node added.
566 |
567 |
568 |
569 | Adds the specified node list to the beginning of the list of children of this node.
570 |
571 | The node list to add. May not be null.
572 |
573 |
574 |
575 | Removes node from parent collection
576 |
577 |
578 |
579 |
580 | Removes all the children and/or attributes of the current node.
581 |
582 |
583 |
584 |
585 | Removes all the children of the current node.
586 |
587 |
588 |
589 |
590 | Removes the specified child node.
591 |
592 | The node being removed. May not be null.
593 | The node removed.
594 |
595 |
596 |
597 | Removes the specified child node.
598 |
599 | The node being removed. May not be null.
600 | true to keep grand children of the node, false otherwise.
601 | The node removed.
602 |
603 |
604 |
605 | Replaces the child node oldChild with newChild node.
606 |
607 | The new node to put in the child list.
608 | The node being replaced in the list.
609 | The node replaced.
610 |
611 |
612 |
613 | Helper method to set the value of an attribute of this node. If the attribute is not found, it will be created automatically.
614 |
615 | The name of the attribute to set. May not be null.
616 | The value for the attribute.
617 | The corresponding attribute instance.
618 |
619 |
620 |
621 | Saves all the children of the node to the specified TextWriter.
622 |
623 | The TextWriter to which you want to save.
624 |
625 |
626 |
627 | Saves all the children of the node to a string.
628 |
629 | The saved string.
630 |
631 |
632 |
633 | Saves the current node to the specified TextWriter.
634 |
635 | The TextWriter to which you want to save.
636 |
637 |
638 |
639 | Saves the current node to the specified XmlWriter.
640 |
641 | The XmlWriter to which you want to save.
642 |
643 |
644 |
645 | Saves the current node to a string.
646 |
647 | The saved string.
648 |
649 |
650 |
651 | Gets the collection of HTML attributes for this node. May not be null.
652 |
653 |
654 |
655 |
656 | Gets all the children of the node.
657 |
658 |
659 |
660 |
661 | Gets a value indicating if this node has been closed or not.
662 |
663 |
664 |
665 |
666 | Gets the collection of HTML attributes for the closing tag. May not be null.
667 |
668 |
669 |
670 |
671 | Gets the first child of the node.
672 |
673 |
674 |
675 |
676 | Gets a value indicating whether the current node has any attributes.
677 |
678 |
679 |
680 |
681 | Gets a value indicating whether this node has any child nodes.
682 |
683 |
684 |
685 |
686 | Gets a value indicating whether the current node has any attributes on the closing tag.
687 |
688 |
689 |
690 |
691 | Gets or sets the value of the 'id' HTML attribute. The document must have been parsed using the OptionUseIdAttribute set to true.
692 |
693 |
694 |
695 |
696 | Gets or Sets the HTML between the start and end tags of the object.
697 |
698 |
699 |
700 |
701 | Gets or Sets the text between the start and end tags of the object.
702 |
703 |
704 |
705 |
706 | Gets the last child of the node.
707 |
708 |
709 |
710 |
711 | Gets the line number of this node in the document.
712 |
713 |
714 |
715 |
716 | Gets the column number of this node in the document.
717 |
718 |
719 |
720 |
721 | Gets or sets this node's name.
722 |
723 |
724 |
725 |
726 | Gets the HTML node immediately following this element.
727 |
728 |
729 |
730 |
731 | Gets the type of this node.
732 |
733 |
734 |
735 |
736 | The original unaltered name of the tag
737 |
738 |
739 |
740 |
741 | Gets or Sets the object and its content in HTML.
742 |
743 |
744 |
745 |
746 | Gets the to which this node belongs.
747 |
748 |
749 |
750 |
751 | Gets the parent of this node (for nodes that can have parents).
752 |
753 |
754 |
755 |
756 | Gets the node immediately preceding this node.
757 |
758 |
759 |
760 |
761 | Gets the stream position of this node in the document, relative to the start of the document.
762 |
763 |
764 |
765 |
766 | Gets a valid XPath string that points to this node
767 |
768 |
769 |
770 |
771 | Gets or Sets the comment text of the node.
772 |
773 |
774 |
775 |
776 | Gets or Sets the HTML between the start and end tags of the object. In the case of a text node, it is equals to OuterHtml.
777 |
778 |
779 |
780 |
781 | Gets or Sets the object and its content in HTML.
782 |
783 |
784 |
785 |
786 | Represents a complete HTML document.
787 |
788 |
789 |
790 |
791 | Adds Debugging attributes to node. Default is false.
792 |
793 |
794 |
795 |
796 | Defines if closing for non closed nodes must be done at the end or directly in the document.
797 | Setting this to true can actually change how browsers render the page. Default is false.
798 |
799 |
800 |
801 |
802 | Defines if non closed nodes will be checked at the end of parsing. Default is true.
803 |
804 |
805 |
806 |
807 | Defines if a checksum must be computed for the document while parsing. Default is false.
808 |
809 |
810 |
811 |
812 | Defines the default stream encoding to use. Default is System.Text.Encoding.Default.
813 |
814 |
815 |
816 |
817 | Defines if source text must be extracted while parsing errors.
818 | If the document has a lot of errors, or cascading errors, parsing performance can be dramatically affected if set to true.
819 | Default is false.
820 |
821 |
822 |
823 |
824 | Defines the maximum length of source text or parse errors. Default is 100.
825 |
826 |
827 |
828 |
829 | Defines if LI, TR, TH, TD tags must be partially fixed when nesting errors are detected. Default is false.
830 |
831 |
832 |
833 |
834 | Defines if output must conform to XML, instead of HTML.
835 |
836 |
837 |
838 |
839 | Defines if attribute value output must be optimized (not bound with double quotes if it is possible). Default is false.
840 |
841 |
842 |
843 |
844 | Defines if name must be output with it's original case. Useful for asp.net tags and attributes
845 |
846 |
847 |
848 |
849 | Defines if name must be output in uppercase. Default is false.
850 |
851 |
852 |
853 |
854 | Defines if declared encoding must be read from the document.
855 | Declared encoding is determined using the meta http-equiv="content-type" content="text/html;charset=XXXXX" html node.
856 | Default is true.
857 |
858 |
859 |
860 |
861 | Defines the name of a node that will throw the StopperNodeException when found as an end node. Default is null.
862 |
863 |
864 |
865 |
866 | Defines if the 'id' attribute must be specifically used. Default is true.
867 |
868 |
869 |
870 |
871 | Defines if empty nodes must be written as closed during output. Default is false.
872 |
873 |
874 |
875 |
876 | Creates an instance of an HTML document.
877 |
878 |
879 |
880 |
881 | Gets a valid XML name.
882 |
883 | Any text.
884 | A string that is a valid XML name.
885 |
886 |
887 |
888 | Applies HTML encoding to a specified string.
889 |
890 | The input string to encode. May not be null.
891 | The encoded string.
892 |
893 |
894 |
895 | Determines if the specified character is considered as a whitespace character.
896 |
897 | The character to check.
898 | true if if the specified character is considered as a whitespace character.
899 |
900 |
901 |
902 | Creates an HTML attribute with the specified name.
903 |
904 | The name of the attribute. May not be null.
905 | The new HTML attribute.
906 |
907 |
908 |
909 | Creates an HTML attribute with the specified name.
910 |
911 | The name of the attribute. May not be null.
912 | The value of the attribute.
913 | The new HTML attribute.
914 |
915 |
916 |
917 | Creates an HTML comment node.
918 |
919 | The new HTML comment node.
920 |
921 |
922 |
923 | Creates an HTML comment node with the specified comment text.
924 |
925 | The comment text. May not be null.
926 | The new HTML comment node.
927 |
928 |
929 |
930 | Creates an HTML element node with the specified name.
931 |
932 | The qualified name of the element. May not be null.
933 | The new HTML node.
934 |
935 |
936 |
937 | Creates an HTML text node.
938 |
939 | The new HTML text node.
940 |
941 |
942 |
943 | Creates an HTML text node with the specified text.
944 |
945 | The text of the node. May not be null.
946 | The new HTML text node.
947 |
948 |
949 |
950 | Detects the encoding of an HTML stream.
951 |
952 | The input stream. May not be null.
953 | The detected encoding.
954 |
955 |
956 |
957 | Detects the encoding of an HTML text provided on a TextReader.
958 |
959 | The TextReader used to feed the HTML. May not be null.
960 | The detected encoding.
961 |
962 |
963 |
964 | Detects the encoding of an HTML text.
965 |
966 | The input html text. May not be null.
967 | The detected encoding.
968 |
969 |
970 |
971 | Gets the HTML node with the specified 'id' attribute value.
972 |
973 | The attribute id to match. May not be null.
974 | The HTML node with the matching id or null if not found.
975 |
976 |
977 |
978 | Loads an HTML document from a stream.
979 |
980 | The input stream.
981 |
982 |
983 |
984 | Loads an HTML document from a stream.
985 |
986 | The input stream.
987 | Indicates whether to look for byte order marks at the beginning of the stream.
988 |
989 |
990 |
991 | Loads an HTML document from a stream.
992 |
993 | The input stream.
994 | The character encoding to use.
995 |
996 |
997 |
998 | Loads an HTML document from a stream.
999 |
1000 | The input stream.
1001 | The character encoding to use.
1002 | Indicates whether to look for byte order marks at the beginning of the stream.
1003 |
1004 |
1005 |
1006 | Loads an HTML document from a stream.
1007 |
1008 | The input stream.
1009 | The character encoding to use.
1010 | Indicates whether to look for byte order marks at the beginning of the stream.
1011 | The minimum buffer size.
1012 |
1013 |
1014 |
1015 | Loads the HTML document from the specified TextReader.
1016 |
1017 | The TextReader used to feed the HTML data into the document. May not be null.
1018 |
1019 |
1020 |
1021 | Loads the HTML document from the specified string.
1022 |
1023 | String containing the HTML document to load. May not be null.
1024 |
1025 |
1026 |
1027 | Saves the HTML document to the specified stream.
1028 |
1029 | The stream to which you want to save.
1030 |
1031 |
1032 |
1033 | Saves the HTML document to the specified stream.
1034 |
1035 | The stream to which you want to save. May not be null.
1036 | The character encoding to use. May not be null.
1037 |
1038 |
1039 |
1040 | Saves the HTML document to the specified StreamWriter.
1041 |
1042 | The StreamWriter to which you want to save.
1043 |
1044 |
1045 |
1046 | Saves the HTML document to the specified TextWriter.
1047 |
1048 | The TextWriter to which you want to save. May not be null.
1049 |
1050 |
1051 |
1052 | Saves the HTML document to the specified XmlWriter.
1053 |
1054 | The XmlWriter to which you want to save.
1055 |
1056 |
1057 |
1058 | Gets the document CRC32 checksum if OptionComputeChecksum was set to true before parsing, 0 otherwise.
1059 |
1060 |
1061 |
1062 |
1063 | Gets the document's declared encoding.
1064 | Declared encoding is determined using the meta http-equiv="content-type" content="text/html;charset=XXXXX" html node.
1065 |
1066 |
1067 |
1068 |
1069 | Gets the root node of the document.
1070 |
1071 |
1072 |
1073 |
1074 | Gets the document's output encoding.
1075 |
1076 |
1077 |
1078 |
1079 | Gets a list of parse errors found in the document.
1080 |
1081 |
1082 |
1083 |
1084 | Gets the remaining text.
1085 | Will always be null if OptionStopperNodeName is null.
1086 |
1087 |
1088 |
1089 |
1090 | Gets the offset of Remainder in the original Html text.
1091 | If OptionStopperNodeName is null, this will return the length of the original Html text.
1092 |
1093 |
1094 |
1095 |
1096 | Gets the document's stream encoding.
1097 |
1098 |
1099 |
1100 |
1101 | Flags that describe the behavior of an Element node.
1102 |
1103 |
1104 |
1105 |
1106 | The node is a CDATA node.
1107 |
1108 |
1109 |
1110 |
1111 | The node is empty. META or IMG are example of such nodes.
1112 |
1113 |
1114 |
1115 |
1116 | The node will automatically be closed during parsing.
1117 |
1118 |
1119 |
1120 |
1121 | The node can overlap.
1122 |
1123 |
1124 |
1125 |
1126 | A utility class to replace special characters by entities and vice-versa.
1127 | Follows HTML 4.0 specification found at http://www.w3.org/TR/html4/sgml/entities.html
1128 |
1129 |
1130 |
1131 |
1132 | Replace known entities by characters.
1133 |
1134 | The source text.
1135 | The result text.
1136 |
1137 |
1138 |
1139 | Clone and entitize an HtmlNode. This will affect attribute values and nodes' text. It will also entitize all child nodes.
1140 |
1141 | The node to entitize.
1142 | An entitized cloned node.
1143 |
1144 |
1145 |
1146 | Replace characters above 127 by entities.
1147 |
1148 | The source text.
1149 | The result text.
1150 |
1151 |
1152 |
1153 | Replace characters above 127 by entities.
1154 |
1155 | The source text.
1156 | If set to false, the function will not use known entities name. Default is true.
1157 | The result text.
1158 |
1159 |
1160 |
1161 | Replace characters above 127 by entities.
1162 |
1163 | The source text.
1164 | If set to false, the function will not use known entities name. Default is true.
1165 | If set to true, the [quote], [ampersand], [lower than] and [greather than] characters will be entitized.
1166 | The result text
1167 |
1168 |
1169 |
1170 | A collection of entities indexed by name.
1171 |
1172 |
1173 |
1174 |
1175 | A collection of entities indexed by value.
1176 |
1177 |
1178 |
1179 |
1180 | Represents a combined list and collection of HTML nodes.
1181 |
1182 |
1183 |
1184 |
1185 | Initialize the HtmlNodeCollection with the base parent node
1186 |
1187 | The base node of the collection
1188 |
1189 |
1190 |
1191 | Add node to the collection
1192 |
1193 |
1194 |
1195 |
1196 |
1197 | Clears out the collection of HtmlNodes. Removes each nodes reference to parentnode, nextnode and prevnode
1198 |
1199 |
1200 |
1201 |
1202 | Gets existence of node in collection
1203 |
1204 |
1205 |
1206 |
1207 |
1208 |
1209 | Copy collection to array
1210 |
1211 |
1212 |
1213 |
1214 |
1215 |
1216 | Get Enumerator
1217 |
1218 |
1219 |
1220 |
1221 |
1222 | Get Explicit Enumerator
1223 |
1224 |
1225 |
1226 |
1227 |
1228 | Get index of node
1229 |
1230 |
1231 |
1232 |
1233 |
1234 |
1235 | Insert node at index
1236 |
1237 |
1238 |
1239 |
1240 |
1241 |
1242 | Remove node
1243 |
1244 |
1245 |
1246 |
1247 |
1248 |
1249 | Remove at index
1250 |
1251 |
1252 |
1253 |
1254 |
1255 | Get first instance of node in supplied collection
1256 |
1257 |
1258 |
1259 |
1260 |
1261 |
1262 |
1263 | Add node to the end of the collection
1264 |
1265 |
1266 |
1267 |
1268 |
1269 | Get first instance of node with name
1270 |
1271 |
1272 |
1273 |
1274 |
1275 |
1276 | Get index of node
1277 |
1278 |
1279 |
1280 |
1281 |
1282 |
1283 | Add node to the beginning of the collection
1284 |
1285 |
1286 |
1287 |
1288 |
1289 | Remove node at index
1290 |
1291 |
1292 |
1293 |
1294 |
1295 |
1296 | Replace node at index
1297 |
1298 |
1299 |
1300 |
1301 |
1302 |
1303 | Get all node descended from this collection
1304 |
1305 |
1306 |
1307 |
1308 |
1309 | Get all node descended from this collection with matching name
1310 |
1311 |
1312 |
1313 |
1314 |
1315 | Gets all first generation elements in collection
1316 |
1317 |
1318 |
1319 |
1320 |
1321 | Gets all first generation elements matching name
1322 |
1323 |
1324 |
1325 |
1326 |
1327 |
1328 | All first generation nodes in collection
1329 |
1330 |
1331 |
1332 |
1333 |
1334 | Gets a given node from the list.
1335 |
1336 |
1337 |
1338 |
1339 | Get node with tag name
1340 |
1341 |
1342 |
1343 |
1344 |
1345 |
1346 | Gets the number of elements actually contained in the list.
1347 |
1348 |
1349 |
1350 |
1351 | Is collection read only
1352 |
1353 |
1354 |
1355 |
1356 | Gets the node at the specified index.
1357 |
1358 |
1359 |
1360 |
1361 | Represents the type of a node.
1362 |
1363 |
1364 |
1365 |
1366 | The root of a document.
1367 |
1368 |
1369 |
1370 |
1371 | An HTML element.
1372 |
1373 |
1374 |
1375 |
1376 | An HTML comment.
1377 |
1378 |
1379 |
1380 |
1381 | A text node is always the child of an element or a document node.
1382 |
1383 |
1384 |
1385 |
1386 | Represents a parsing error found during document parsing.
1387 |
1388 |
1389 |
1390 |
1391 | Gets the type of error.
1392 |
1393 |
1394 |
1395 |
1396 | Gets the line number of this error in the document.
1397 |
1398 |
1399 |
1400 |
1401 | Gets the column number of this error in the document.
1402 |
1403 |
1404 |
1405 |
1406 | Gets a description for the error.
1407 |
1408 |
1409 |
1410 |
1411 | Gets the the full text of the line containing the error.
1412 |
1413 |
1414 |
1415 |
1416 | Gets the absolute stream position of this error in the document, relative to the start of the document.
1417 |
1418 |
1419 |
1420 |
1421 | Represents the type of parsing error.
1422 |
1423 |
1424 |
1425 |
1426 | A tag was not closed.
1427 |
1428 |
1429 |
1430 |
1431 | A tag was not opened.
1432 |
1433 |
1434 |
1435 |
1436 | There is a charset mismatch between stream and declared (META) encoding.
1437 |
1438 |
1439 |
1440 |
1441 | An end tag was not required.
1442 |
1443 |
1444 |
1445 |
1446 | An end tag is invalid at this position.
1447 |
1448 |
1449 |
1450 |
1451 | Represents an HTML text node.
1452 |
1453 |
1454 |
1455 |
1456 | Gets or Sets the HTML between the start and end tags of the object. In the case of a text node, it is equals to OuterHtml.
1457 |
1458 |
1459 |
1460 |
1461 | Gets or Sets the object and its content in HTML.
1462 |
1463 |
1464 |
1465 |
1466 | Gets or Sets the text of the node.
1467 |
1468 |
1469 |
1470 |
1471 | Represents an exception thrown by the HtmlWeb utility class.
1472 |
1473 |
1474 |
1475 |
1476 | Creates an instance of the HtmlWebException.
1477 |
1478 | The exception's message.
1479 |
1480 |
1481 |
1482 | Used for downloading and parsing html from the internet
1483 |
1484 |
1485 |
1486 |
1487 | Begins the process of downloading an internet resource
1488 |
1489 | Url to the html document
1490 |
1491 |
1492 |
1493 | Begins the process of downloading an internet resource
1494 |
1495 | Url to the html document
1496 | The encoding to use while downloading the document
1497 |
1498 |
1499 |
1500 | Begins the process of downloading an internet resource
1501 |
1502 | Url to the html document
1503 | The encoding to use while downloading the document
1504 | Username to use for credentials in the web request
1505 | Password to use for credentials in the web request
1506 |
1507 |
1508 |
1509 | Begins the process of downloading an internet resource
1510 |
1511 | Url to the html document
1512 | The encoding to use while downloading the document
1513 | Username to use for credentials in the web request
1514 | Password to use for credentials in the web request
1515 | Domain to use for credentials in the web request
1516 |
1517 |
1518 |
1519 | Begins the process of downloading an internet resource
1520 |
1521 | Url to the html document
1522 | Username to use for credentials in the web request
1523 | Password to use for credentials in the web request
1524 | Domain to use for credentials in the web request
1525 |
1526 |
1527 |
1528 | Begins the process of downloading an internet resource
1529 |
1530 | Url to the html document
1531 | Username to use for credentials in the web request
1532 | Password to use for credentials in the web request
1533 |
1534 |
1535 |
1536 | Begins the process of downloading an internet resource
1537 |
1538 | Url to the html document
1539 | The credentials to use for authenticating the web request
1540 |
1541 |
1542 |
1543 | Begins the process of downloading an internet resource
1544 |
1545 | Url to the html document
1546 | The encoding to use while downloading the document
1547 | The credentials to use for authenticating the web request
1548 |
1549 |
1550 |
1551 | Allows for setting document defaults before loading
1552 |
1553 |
1554 |
1555 |
1556 |
--------------------------------------------------------------------------------
/packages/HtmlAgilityPack.1.4.6/readme.txt:
--------------------------------------------------------------------------------
1 | ----------------------------------------------------
2 | ---------- Html Agility Pack Nuget Readme ----------
3 | ----------------------------------------------------
4 |
5 | ----Silverlight 4 and Windows Phone 7.1+ projects-----
6 | To use XPATH features: System.Xml.Xpath.dll from the Silverlight 4 SDK must be referenced.
7 | This is normally found at
8 | %ProgramFiles(x86)%\Microsoft SDKs\Microsoft SDKs\Silverlight\v4.0\Libraries\Client
9 | or
10 | %ProgramFiles%\Microsoft SDKs\Microsoft SDKs\Silverlight\v4.0\Libraries\Client
11 |
12 | ----Silverlight 5 projects-----
13 | To use XPATH features: System.Xml.Xpath.dll from the Silverlight 5 SDK must be referenced.
14 | This is normally found at
15 | %ProgramFiles(x86)%\Microsoft SDKs\Microsoft SDKs\Silverlight\v5.0\Libraries\Client
16 | or
17 | %ProgramFiles%\Microsoft SDKs\Microsoft SDKs\Silverlight\v5.0\Libraries\Client
18 |
--------------------------------------------------------------------------------
/packages/MsgPack.Cli.0.4.3/MsgPack.Cli.0.4.3.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/packages/MsgPack.Cli.0.4.3/MsgPack.Cli.0.4.3.nupkg
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.6.0.1/Newtonsoft.Json.6.0.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/packages/Newtonsoft.Json.6.0.1/Newtonsoft.Json.6.0.1.nupkg
--------------------------------------------------------------------------------
/packages/Newtonsoft.Json.6.0.1/tools/install.ps1:
--------------------------------------------------------------------------------
1 | param($installPath, $toolsPath, $package, $project)
2 |
3 | # open json.net splash page on package install
4 | # don't open if json.net is installed as a dependency
5 |
6 | try
7 | {
8 | $url = "http://james.newtonking.com/json"
9 | $dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
10 |
11 | if ($dte2.ActiveWindow.Caption -eq "Package Manager Console")
12 | {
13 | # user is installing from VS NuGet console
14 | # get reference to the window, the console host and the input history
15 | # show webpage if "install-package newtonsoft.json" was last input
16 |
17 | $consoleWindow = $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow])
18 |
19 | $props = $consoleWindow.GetType().GetProperties([System.Reflection.BindingFlags]::Instance -bor `
20 | [System.Reflection.BindingFlags]::NonPublic)
21 |
22 | $prop = $props | ? { $_.Name -eq "ActiveHostInfo" } | select -first 1
23 | if ($prop -eq $null) { return }
24 |
25 | $hostInfo = $prop.GetValue($consoleWindow)
26 | if ($hostInfo -eq $null) { return }
27 |
28 | $history = $hostInfo.WpfConsole.InputHistory.History
29 |
30 | $lastCommand = $history | select -last 1
31 |
32 | if ($lastCommand)
33 | {
34 | $lastCommand = $lastCommand.Trim().ToLower()
35 | if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("newtonsoft.json"))
36 | {
37 | $dte2.ItemOperations.Navigate($url) | Out-Null
38 | }
39 | }
40 | }
41 | else
42 | {
43 | # user is installing from VS NuGet dialog
44 | # get reference to the window, then smart output console provider
45 | # show webpage if messages in buffered console contains "installing...newtonsoft.json" in last operation
46 |
47 | $instanceField = [NuGet.Dialog.PackageManagerWindow].GetField("CurrentInstance", [System.Reflection.BindingFlags]::Static -bor `
48 | [System.Reflection.BindingFlags]::NonPublic)
49 | $consoleField = [NuGet.Dialog.PackageManagerWindow].GetField("_smartOutputConsoleProvider", [System.Reflection.BindingFlags]::Instance -bor `
50 | [System.Reflection.BindingFlags]::NonPublic)
51 | if ($instanceField -eq $null -or $consoleField -eq $null) { return }
52 |
53 | $instance = $instanceField.GetValue($null)
54 | if ($instance -eq $null) { return }
55 |
56 | $consoleProvider = $consoleField.GetValue($instance)
57 | if ($consoleProvider -eq $null) { return }
58 |
59 | $console = $consoleProvider.CreateOutputConsole($false)
60 |
61 | $messagesField = $console.GetType().GetField("_messages", [System.Reflection.BindingFlags]::Instance -bor `
62 | [System.Reflection.BindingFlags]::NonPublic)
63 | if ($messagesField -eq $null) { return }
64 |
65 | $messages = $messagesField.GetValue($console)
66 | if ($messages -eq $null) { return }
67 |
68 | $operations = $messages -split "=============================="
69 |
70 | $lastOperation = $operations | select -last 1
71 |
72 | if ($lastOperation)
73 | {
74 | $lastOperation = $lastOperation.ToLower()
75 |
76 | $lines = $lastOperation -split "`r`n"
77 |
78 | $installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json ") } | select -first 1
79 |
80 | if ($installMatch)
81 | {
82 | $dte2.ItemOperations.Navigate($url) | Out-Null
83 | }
84 | }
85 | }
86 | }
87 | catch
88 | {
89 | # stop potential errors from bubbling up
90 | # worst case the splash page won't open
91 | }
92 |
93 | # yolo
--------------------------------------------------------------------------------
/packages/ServiceStack.Text.4.0.15/ServiceStack.Text.4.0.15.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/packages/ServiceStack.Text.4.0.15/ServiceStack.Text.4.0.15.nupkg
--------------------------------------------------------------------------------
/packages/ServiceStack.Text.4.0.15/lib/net40/ServiceStack.Text.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ServiceStack.Text
5 |
6 |
7 |
8 |
9 | Utils to load types
10 |
11 |
12 |
13 |
14 | Find the type from the name supplied
15 |
16 | [typeName] or [typeName, assemblyName]
17 |
18 |
19 |
20 |
21 | The top-most interface of the given type, if any.
22 |
23 |
24 |
25 |
26 | Find type if it exists
27 |
28 |
29 |
30 | The type if it exists
31 |
32 |
33 |
34 | Populate an object with Example data.
35 |
36 |
37 |
38 |
39 |
40 |
41 | Populates the object with example data.
42 |
43 |
44 | Tracks how deeply nested we are
45 |
46 |
47 |
48 |
49 | If AlwaysUseUtc is set to true then convert all DateTime to UTC.
50 |
51 |
52 |
53 |
54 |
55 |
56 | Repairs an out-of-spec XML date/time string which incorrectly uses a space instead of a 'T' to separate the date from the time.
57 | These string are occasionally generated by SQLite and can cause errors in OrmLite when reading these columns from the DB.
58 |
59 | The XML date/time string to repair
60 | The repaired string. If no repairs were made, the original string is returned.
61 |
62 |
63 |
64 | WCF Json format: /Date(unixts+0000)/
65 |
66 |
67 |
68 |
69 |
70 |
71 | WCF Json format: /Date(unixts+0000)/
72 |
73 |
74 |
75 |
76 |
77 |
78 | Get the type(string) constructor if exists
79 |
80 | The type.
81 |
82 |
83 |
84 |
85 | micro optimizations: using flags instead of value.IndexOfAny(EscapeChars)
86 |
87 |
88 |
89 |
90 |
91 |
92 | Class to hold
93 |
94 |
95 |
96 |
97 |
98 | A fast, standards-based, serialization-issue free DateTime serailizer.
99 |
100 |
101 |
102 |
103 | Determines whether this serializer can create the specified type from a string.
104 |
105 | The type.
106 |
107 | true if this instance [can create from string] the specified type; otherwise, false.
108 |
109 |
110 |
111 |
112 | Parses the specified value.
113 |
114 | The value.
115 |
116 |
117 |
118 |
119 | Deserializes from reader.
120 |
121 | The reader.
122 |
123 |
124 |
125 |
126 | Serializes to string.
127 |
128 | The value.
129 |
130 |
131 |
132 |
133 | Serializes to writer.
134 |
135 | The value.
136 | The writer.
137 |
138 |
139 |
140 | Sets which format to use when serializing TimeSpans
141 |
142 |
143 |
144 |
145 | if the is configured
146 | to take advantage of specification,
147 | to support user-friendly serialized formats, ie emitting camelCasing for JSON
148 | and parsing member names and enum values in a case-insensitive manner.
149 |
150 |
151 |
152 |
153 | if the is configured
154 | to support web-friendly serialized formats, ie emitting lowercase_underscore_casing for JSON
155 |
156 |
157 |
158 |
159 | Define how property names are mapped during deserialization
160 |
161 |
162 |
163 |
164 | Gets or sets a value indicating if the framework should throw serialization exceptions
165 | or continue regardless of deserialization errors. If the framework
166 | will throw; otherwise, it will parse as many fields as possible. The default is .
167 |
168 |
169 |
170 |
171 | Gets or sets a value indicating if the framework should always convert to UTC format instead of local time.
172 |
173 |
174 |
175 |
176 | Gets or sets a value indicating if the framework should always assume is in UTC format if Kind is Unspecified.
177 |
178 |
179 |
180 |
181 | Gets or sets whether we should append the Utc offset when we serialize Utc dates. Defaults to no.
182 | Only supported for when the JsConfig.DateHandler == JsonDateHandler.TimestampOffset
183 |
184 |
185 |
186 |
187 | Gets or sets a value indicating if unicode symbols should be serialized as "\uXXXX".
188 |
189 |
190 |
191 |
192 | If set to true, Interface types will be prefered over concrete types when serializing.
193 |
194 |
195 |
196 |
197 | Sets the maximum depth to avoid circular dependencies
198 |
199 |
200 |
201 |
202 | Set this to enable your own type construction provider.
203 | This is helpful for integration with IoC containers where you need to call the container constructor.
204 | Return null if you don't know how to construct the type and the parameterless constructor will be used.
205 |
206 |
207 |
208 |
209 | If set to true, Interface types will be prefered over concrete types when serializing.
210 |
211 |
212 |
213 |
214 | Always emit type info for this type. Takes precedence over ExcludeTypeInfo
215 |
216 |
217 |
218 |
219 | Never emit type info for this type
220 |
221 |
222 |
223 |
224 | if the is configured
225 | to take advantage of specification,
226 | to support user-friendly serialized formats, ie emitting camelCasing for JSON
227 | and parsing member names and enum values in a case-insensitive manner.
228 |
229 |
230 |
231 |
232 | Define custom serialization fn for BCL Structs
233 |
234 |
235 |
236 |
237 | Define custom raw serialization fn
238 |
239 |
240 |
241 |
242 | Define custom serialization hook
243 |
244 |
245 |
246 |
247 | Define custom deserialization fn for BCL Structs
248 |
249 |
250 |
251 |
252 | Define custom raw deserialization fn for objects
253 |
254 |
255 |
256 |
257 | Exclude specific properties of this type from being serialized
258 |
259 |
260 |
261 |
262 | Opt-in flag to set some Value Types to be treated as a Ref Type
263 |
264 |
265 |
266 |
267 | Whether there is a fn (raw or otherwise)
268 |
269 |
270 |
271 |
272 | The property names on target types must match property names in the JSON source
273 |
274 |
275 |
276 |
277 | The property names on target types may not match the property names in the JSON source
278 |
279 |
280 |
281 |
282 | Uses the xsd format like PT15H10M20S
283 |
284 |
285 |
286 |
287 | Uses the standard .net ToString method of the TimeSpan class
288 |
289 |
290 |
291 |
292 | Get JSON string value converted to T
293 |
294 |
295 |
296 |
297 | Get JSON string value
298 |
299 |
300 |
301 |
302 | Get unescaped string value
303 |
304 |
305 |
306 |
307 | Get unescaped string value
308 |
309 |
310 |
311 |
312 | Write JSON Array, Object, bool or number values as raw string
313 |
314 |
315 |
316 |
317 | Get JSON string value
318 |
319 |
320 |
321 |
322 | Creates an instance of a Type from a string value
323 |
324 |
325 |
326 |
327 | Parses the specified value.
328 |
329 | The value.
330 |
331 |
332 |
333 |
334 | Shortcut escape when we're sure value doesn't contain any escaped chars
335 |
336 |
337 |
338 |
339 |
340 |
341 | Given a character as utf32, returns the equivalent string provided that the character
342 | is legal json.
343 |
344 |
345 |
346 |
347 |
348 |
349 | micro optimizations: using flags instead of value.IndexOfAny(EscapeChars)
350 |
351 |
352 |
353 |
354 |
355 |
356 | Implement the serializer using a more static approach
357 |
358 |
359 |
360 |
361 |
362 | Implement the serializer using a more static approach
363 |
364 |
365 |
366 |
367 |
368 | Public Code API to register commercial license for ServiceStack.
369 |
370 |
371 |
372 |
373 | Internal Utilities to verify licensing
374 |
375 |
376 |
377 |
378 | Pretty Thread-Safe cache class from:
379 | http://code.google.com/p/dapper-dot-net/source/browse/Dapper/SqlMapper.cs
380 |
381 | This is a micro-cache; suitable when the number of terms is controllable (a few hundred, for example),
382 | and strictly append-only; you cannot change existing values. All key matches are on **REFERENCE**
383 | equality. The type is fully thread-safe.
384 |
385 |
386 |
387 |
388 | Represents an individual object, allowing access to members by-name
389 |
390 |
391 |
392 |
393 | Use the target types definition of equality
394 |
395 |
396 |
397 |
398 | Obtain the hash of the target object
399 |
400 |
401 |
402 |
403 | Use the target's definition of a string representation
404 |
405 |
406 |
407 |
408 | Wraps an individual object, allowing by-name access to that instance
409 |
410 |
411 |
412 |
413 | Get or Set the value of a named member for the underlying object
414 |
415 |
416 |
417 |
418 | The object represented by this instance
419 |
420 |
421 |
422 |
423 | Provides by-name member-access to objects of a given type
424 |
425 |
426 |
427 |
428 | Create a new instance of this type
429 |
430 |
431 |
432 |
433 | Provides a type-specific accessor, allowing by-name access for all objects of that type
434 |
435 | The accessor is cached internally; a pre-existing accessor may be returned
436 |
437 |
438 |
439 | Does this type support new instances via a parameterless constructor?
440 |
441 |
442 |
443 |
444 | Get or set the value of a named member on the target instance
445 |
446 |
447 |
448 |
449 | Maps the path of a file in the context of a VS project
450 |
451 | the relative path
452 | the absolute path
453 | Assumes static content is two directories above the /bin/ directory,
454 | eg. in a unit test scenario the assembly would be in /bin/Debug/.
455 |
456 |
457 |
458 | Maps the path of a file in a self-hosted scenario
459 |
460 | the relative path
461 | the absolute path
462 | Assumes static content is copied to /bin/ folder with the assemblies
463 |
464 |
465 |
466 | Maps the path of a file in an Asp.Net hosted scenario
467 |
468 | the relative path
469 | the absolute path
470 | Assumes static content is in the parent folder of the /bin/ directory
471 |
472 |
473 |
474 | Implement the serializer using a more static approach
475 |
476 |
477 |
478 |
479 |
480 | Creates a new instance of type.
481 | First looks at JsConfig.ModelFactory before falling back to CreateInstance
482 |
483 |
484 |
485 |
486 | Creates a new instance of type.
487 | First looks at JsConfig.ModelFactory before falling back to CreateInstance
488 |
489 |
490 |
491 |
492 | Creates a new instance from the default constructor of type
493 |
494 |
495 |
496 |
497 | Add a Property attribute at runtime.
498 | Not threadsafe, should only add attributes on Startup.
499 |
500 |
501 |
502 |
503 | Add a Property attribute at runtime.
504 | Not threadsafe, should only add attributes on Startup.
505 |
506 |
507 |
508 |
509 | @jonskeet: Collection of utility methods which operate on streams.
510 | r285, February 26th 2009: http://www.yoda.arachsys.com/csharp/miscutil/
511 |
512 |
513 |
514 |
515 | Reads the given stream up to the end, returning the data as a byte
516 | array.
517 |
518 |
519 |
520 |
521 | Reads the given stream up to the end, returning the data as a byte
522 | array, using the given buffer size.
523 |
524 |
525 |
526 |
527 | Reads the given stream up to the end, returning the data as a byte
528 | array, using the given buffer for transferring data. Note that the
529 | current contents of the buffer is ignored, so the buffer needn't
530 | be cleared beforehand.
531 |
532 |
533 |
534 |
535 | Copies all the data from one stream into another.
536 |
537 |
538 |
539 |
540 | Copies all the data from one stream into another, using a buffer
541 | of the given size.
542 |
543 |
544 |
545 |
546 | Copies all the data from one stream into another, using the given
547 | buffer for transferring data. Note that the current contents of
548 | the buffer is ignored, so the buffer needn't be cleared beforehand.
549 |
550 |
551 |
552 |
553 | Reads exactly the given number of bytes from the specified stream.
554 | If the end of the stream is reached before the specified amount
555 | of data is read, an exception is thrown.
556 |
557 |
558 |
559 |
560 | Reads into a buffer, filling it completely.
561 |
562 |
563 |
564 |
565 | Reads exactly the given number of bytes from the specified stream,
566 | into the given buffer, starting at position 0 of the array.
567 |
568 |
569 |
570 |
571 | Reads exactly the given number of bytes from the specified stream,
572 | into the given buffer, starting at position 0 of the array.
573 |
574 |
575 |
576 |
577 | Same as ReadExactly, but without the argument checks.
578 |
579 |
580 |
581 |
582 | Converts from base: 0 - 62
583 |
584 | The source.
585 | From.
586 | To.
587 |
588 |
589 |
590 |
591 | Skip the encoding process for 'safe strings'
592 |
593 |
594 |
595 |
596 |
597 |
598 | A class to allow the conversion of doubles to string representations of
599 | their exact decimal values. The implementation aims for readability over
600 | efficiency.
601 |
602 | Courtesy of @JonSkeet
603 | http://www.yoda.arachsys.com/csharp/DoubleConverter.cs
604 |
605 |
606 |
607 |
608 |
609 |
610 |
611 | How many digits are *after* the decimal point
612 |
613 |
614 |
615 |
616 | Constructs an arbitrary decimal expansion from the given long.
617 | The long must not be negative.
618 |
619 |
620 |
621 |
622 | Multiplies the current expansion by the given amount, which should
623 | only be 2 or 5.
624 |
625 |
626 |
627 |
628 | Shifts the decimal point; a negative value makes
629 | the decimal expansion bigger (as fewer digits come after the
630 | decimal place) and a positive value makes the decimal
631 | expansion smaller.
632 |
633 |
634 |
635 |
636 | Removes leading/trailing zeroes from the expansion.
637 |
638 |
639 |
640 |
641 | Converts the value to a proper decimal string representation.
642 |
643 |
644 |
645 |
646 | Creates an instance of a Type from a string value
647 |
648 |
649 |
650 |
651 | Determines whether the specified type is convertible from string.
652 |
653 | The type.
654 |
655 | true if the specified type is convertible from string; otherwise, false.
656 |
657 |
658 |
659 |
660 | Parses the specified value.
661 |
662 | The value.
663 |
664 |
665 |
666 |
667 | Parses the specified type.
668 |
669 | The type.
670 | The value.
671 |
672 |
673 |
674 |
675 | Useful extension method to get the Dictionary[string,string] representation of any POCO type.
676 |
677 |
678 |
679 |
680 |
681 | Recursively prints the contents of any POCO object in a human-friendly, readable format
682 |
683 |
684 |
685 |
686 |
687 | Print Dump to Console.WriteLine
688 |
689 |
690 |
691 |
692 | Print string.Format to Console.WriteLine
693 |
694 |
695 |
696 |
697 | Parses the specified value.
698 |
699 | The value.
700 |
701 |
702 |
703 |
704 |
--------------------------------------------------------------------------------
/packages/protobuf-net.2.0.0.668/lib/netcore45/protobuf-net.pri:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/packages/protobuf-net.2.0.0.668/lib/netcore45/protobuf-net.pri
--------------------------------------------------------------------------------
/packages/protobuf-net.2.0.0.668/protobuf-net.2.0.0.668.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/maximn/SerializationPerformanceTest_CSharp/21b12d3b3b2bbadafac62f412855a113da65f90f/packages/protobuf-net.2.0.0.668/protobuf-net.2.0.0.668.nupkg
--------------------------------------------------------------------------------
/packages/repositories.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------