diff --git a/.gitignore b/.gitignore
index 376bdfd8..81aee0d9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,14 +1,14 @@
-## Ignore build results and temporary files.
-
-Backup*
-_UpgradeReport_Files
-bin
-obj
-
-*.mdb
-*.pdb
-*.pidb
-*.suo
-*.user
-*.userprefs
-UpgradeLog*.*
+## Ignore build results and temporary files.
+
+Backup*
+_UpgradeReport_Files
+bin
+obj
+
+*.mdb
+*.pdb
+*.pidb
+*.suo
+*.user
+*.userprefs
+UpgradeLog*.*
diff --git a/.idea/.idea.websocket-sharp/.idea/.gitignore b/.idea/.idea.websocket-sharp/.idea/.gitignore
new file mode 100644
index 00000000..dfa77b5f
--- /dev/null
+++ b/.idea/.idea.websocket-sharp/.idea/.gitignore
@@ -0,0 +1,13 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Rider ignored files
+/.idea.websocket-sharp.iml
+/contentModel.xml
+/projectSettingsUpdater.xml
+/modules.xml
+# Datasource local storage ignored files
+/../../../../../../../../:\Users\cover\RiderProjects\websocket-sharp\.idea\.idea.websocket-sharp\.idea/dataSources/
+/dataSources.local.xml
+# Editor-based HTTP Client requests
+/httpRequests/
diff --git a/.idea/.idea.websocket-sharp/.idea/encodings.xml b/.idea/.idea.websocket-sharp/.idea/encodings.xml
new file mode 100644
index 00000000..df87cf95
--- /dev/null
+++ b/.idea/.idea.websocket-sharp/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.websocket-sharp/.idea/indexLayout.xml b/.idea/.idea.websocket-sharp/.idea/indexLayout.xml
new file mode 100644
index 00000000..473077d7
--- /dev/null
+++ b/.idea/.idea.websocket-sharp/.idea/indexLayout.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.websocket-sharp/.idea/riderModule.iml b/.idea/.idea.websocket-sharp/.idea/riderModule.iml
new file mode 100644
index 00000000..cc7f540f
--- /dev/null
+++ b/.idea/.idea.websocket-sharp/.idea/riderModule.iml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.websocket-sharp/.idea/vcs.xml b/.idea/.idea.websocket-sharp/.idea/vcs.xml
new file mode 100644
index 00000000..368a2f52
--- /dev/null
+++ b/.idea/.idea.websocket-sharp/.idea/vcs.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Example/AssemblyInfo.cs b/Example/AssemblyInfo.cs
index 9a961735..7fb8cad4 100644
--- a/Example/AssemblyInfo.cs
+++ b/Example/AssemblyInfo.cs
@@ -1,26 +1,26 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// Information about this assembly is defined by the following attributes.
-// Change them to the values specific to your project.
-
-[assembly: AssemblyTitle("Example")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("sta.blockhead")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
-// The form "{Major}.{Minor}.*" will automatically update the build and revision,
-// and "{Major}.{Minor}.{Build}.*" will update just the revision.
-
-[assembly: AssemblyVersion("1.0.*")]
-
-// The following attributes are used to specify the signing key for the assembly,
-// if desired. See the Mono documentation for more information about signing.
-
-//[assembly: AssemblyDelaySign(false)]
-//[assembly: AssemblyKeyFile("")]
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("Example")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("sta.blockhead")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
diff --git a/Example/Example.csproj b/Example/Example.csproj
index 38c5b420..b2ffeedd 100644
--- a/Example/Example.csproj
+++ b/Example/Example.csproj
@@ -1,71 +1,78 @@
-
-
-
- Debug
- AnyCPU
- 9.0.21022
- 2.0
- {52805AEC-EFB1-4F42-BB8E-3ED4E692C568}
- Exe
- Example
- example
- v3.5
-
-
- true
- full
- false
- bin\Debug
- DEBUG
- prompt
- 4
- true
-
-
- none
- false
- bin\Release
- prompt
- 4
- true
-
-
- true
- full
- false
- bin\Debug_Ubuntu
- DEBUG,UBUNTU
- prompt
- 4
- true
-
-
- none
- false
- bin\Release_Ubuntu
- UBUNTU
- prompt
- 4
- true
-
-
-
-
- notify-sharp
-
-
-
-
-
- {B357BAC7-529E-4D81-A0D2-71041B19C8DE}
- websocket-sharp
-
-
-
-
-
-
-
-
-
+
+
+
+ Debug
+ AnyCPU
+ 9.0.21022
+ 2.0
+ {52805AEC-EFB1-4F42-BB8E-3ED4E692C568}
+ Exe
+ Example
+ example
+ v3.5
+
+
+ true
+ full
+ false
+ bin\Debug
+ DEBUG
+ prompt
+ 4
+ true
+
+
+ none
+ false
+ bin\Release
+ prompt
+ 4
+ true
+
+
+ true
+ full
+ false
+ bin\Debug_Ubuntu
+ DEBUG,UBUNTU
+ prompt
+ 4
+ true
+
+
+ none
+ false
+ bin\Release_Ubuntu
+ UBUNTU
+ prompt
+ 4
+ true
+
+
+
+ ..\packages\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll
+ True
+
+
+
+ notify-sharp
+
+
+
+
+
+ {B357BAC7-529E-4D81-A0D2-71041B19C8DE}
+ websocket-sharp
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Example/NotificationMessage.cs b/Example/NotificationMessage.cs
index fd1bd307..a7ca47bd 100644
--- a/Example/NotificationMessage.cs
+++ b/Example/NotificationMessage.cs
@@ -1,24 +1,24 @@
-using System;
-
-namespace Example
-{
- internal class NotificationMessage
- {
- public string Body {
- get; set;
- }
-
- public string Icon {
- get; set;
- }
-
- public string Summary {
- get; set;
- }
-
- public override string ToString ()
- {
- return String.Format ("{0}: {1}", Summary, Body);
- }
- }
-}
+using System;
+
+namespace Example
+{
+ internal class NotificationMessage
+ {
+ public string Body {
+ get; set;
+ }
+
+ public string Icon {
+ get; set;
+ }
+
+ public string Summary {
+ get; set;
+ }
+
+ public override string ToString ()
+ {
+ return String.Format ("{0}: {1}", Summary, Body);
+ }
+ }
+}
diff --git a/Example/Notifier.cs b/Example/Notifier.cs
index 5371c37a..1bf9606f 100644
--- a/Example/Notifier.cs
+++ b/Example/Notifier.cs
@@ -1,81 +1,81 @@
-#if UBUNTU
-using Notifications;
-#endif
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Threading;
-
-namespace Example
-{
- internal class Notifier : IDisposable
- {
- private volatile bool _enabled;
- private ManualResetEvent _exited;
- private Queue _queue;
- private object _sync;
-
- public Notifier ()
- {
- _enabled = true;
- _exited = new ManualResetEvent (false);
- _queue = new Queue ();
- _sync = ((ICollection) _queue).SyncRoot;
-
- ThreadPool.QueueUserWorkItem (
- state => {
- while (_enabled || Count > 0) {
- var msg = dequeue ();
- if (msg != null) {
-#if UBUNTU
- var nf = new Notification (msg.Summary, msg.Body, msg.Icon);
- nf.AddHint ("append", "allowed");
- nf.Show ();
-#else
- Console.WriteLine (msg);
-#endif
- }
- else {
- Thread.Sleep (500);
- }
- }
-
- _exited.Set ();
- }
- );
- }
-
- public int Count {
- get {
- lock (_sync)
- return _queue.Count;
- }
- }
-
- private NotificationMessage dequeue ()
- {
- lock (_sync)
- return _queue.Count > 0 ? _queue.Dequeue () : null;
- }
-
- public void Close ()
- {
- _enabled = false;
- _exited.WaitOne ();
- _exited.Close ();
- }
-
- public void Notify (NotificationMessage message)
- {
- lock (_sync) {
- if (_enabled)
- _queue.Enqueue (message);
- }
- }
-
- void IDisposable.Dispose ()
- {
- Close ();
- }
- }
-}
+#if UBUNTU
+using Notifications;
+#endif
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Threading;
+
+namespace Example
+{
+ internal class Notifier : IDisposable
+ {
+ private volatile bool _enabled;
+ private ManualResetEvent _exited;
+ private Queue _queue;
+ private object _sync;
+
+ public Notifier ()
+ {
+ _enabled = true;
+ _exited = new ManualResetEvent (false);
+ _queue = new Queue ();
+ _sync = ((ICollection) _queue).SyncRoot;
+
+ ThreadPool.QueueUserWorkItem (
+ state => {
+ while (_enabled || Count > 0) {
+ var msg = dequeue ();
+ if (msg != null) {
+#if UBUNTU
+ var nf = new Notification (msg.Summary, msg.Body, msg.Icon);
+ nf.AddHint ("append", "allowed");
+ nf.Show ();
+#else
+ Console.WriteLine (msg);
+#endif
+ }
+ else {
+ Thread.Sleep (500);
+ }
+ }
+
+ _exited.Set ();
+ }
+ );
+ }
+
+ public int Count {
+ get {
+ lock (_sync)
+ return _queue.Count;
+ }
+ }
+
+ private NotificationMessage dequeue ()
+ {
+ lock (_sync)
+ return _queue.Count > 0 ? _queue.Dequeue () : null;
+ }
+
+ public void Close ()
+ {
+ _enabled = false;
+ _exited.WaitOne ();
+ _exited.Close ();
+ }
+
+ public void Notify (NotificationMessage message)
+ {
+ lock (_sync) {
+ if (_enabled)
+ _queue.Enqueue (message);
+ }
+ }
+
+ void IDisposable.Dispose ()
+ {
+ Close ();
+ }
+ }
+}
diff --git a/Example/Program.cs b/Example/Program.cs
index d414bb1e..465405da 100644
--- a/Example/Program.cs
+++ b/Example/Program.cs
@@ -1,128 +1,128 @@
-using System;
-using System.Threading;
-using WebSocketSharp;
-using WebSocketSharp.Net;
-
-namespace Example
-{
- public class Program
- {
- public static void Main (string[] args)
- {
- // Create a new instance of the WebSocket class.
- //
- // The WebSocket class inherits the System.IDisposable interface, so you can
- // use the using statement. And the WebSocket connection will be closed with
- // close status 1001 (going away) when the control leaves the using block.
- //
- // If you would like to connect to the server with the secure connection,
- // you should create a new instance with a wss scheme WebSocket URL.
-
- using (var nf = new Notifier ())
- using (var ws = new WebSocket ("ws://echo.websocket.org"))
- //using (var ws = new WebSocket ("wss://echo.websocket.org"))
- //using (var ws = new WebSocket ("ws://localhost:4649/Echo"))
- //using (var ws = new WebSocket ("wss://localhost:5963/Echo"))
- //using (var ws = new WebSocket ("ws://localhost:4649/Echo?name=nobita"))
- //using (var ws = new WebSocket ("wss://localhost:5963/Echo?name=nobita"))
- //using (var ws = new WebSocket ("ws://localhost:4649/Chat"))
- //using (var ws = new WebSocket ("wss://localhost:5963/Chat"))
- //using (var ws = new WebSocket ("ws://localhost:4649/Chat?name=nobita"))
- //using (var ws = new WebSocket ("wss://localhost:5963/Chat?name=nobita"))
- {
- // Set the WebSocket events.
-
- ws.OnOpen += (sender, e) => ws.Send ("Hi, there!");
-
- ws.OnMessage += (sender, e) =>
- nf.Notify (
- new NotificationMessage {
- Summary = "WebSocket Message",
- Body = !e.IsPing ? e.Data : "Received a ping.",
- Icon = "notification-message-im"
- }
- );
-
- ws.OnError += (sender, e) =>
- nf.Notify (
- new NotificationMessage {
- Summary = "WebSocket Error",
- Body = e.Message,
- Icon = "notification-message-im"
- }
- );
-
- ws.OnClose += (sender, e) =>
- nf.Notify (
- new NotificationMessage {
- Summary = String.Format ("WebSocket Close ({0})", e.Code),
- Body = e.Reason,
- Icon = "notification-message-im"
- }
- );
-#if DEBUG
- // To change the logging level.
- ws.Log.Level = LogLevel.Trace;
-
- // To change the wait time for the response to the Ping or Close.
- //ws.WaitTime = TimeSpan.FromSeconds (10);
-
- // To emit a WebSocket.OnMessage event when receives a ping.
- //ws.EmitOnPing = true;
-#endif
- // To enable the Per-message Compression extension.
- //ws.Compression = CompressionMethod.Deflate;
-
- // To validate the server certificate.
- /*
- ws.SslConfiguration.ServerCertificateValidationCallback =
- (sender, certificate, chain, sslPolicyErrors) => {
- ws.Log.Debug (
- String.Format (
- "Certificate:\n- Issuer: {0}\n- Subject: {1}",
- certificate.Issuer,
- certificate.Subject
- )
- );
-
- return true; // If the server certificate is valid.
- };
- */
-
- // To send the credentials for the HTTP Authentication (Basic/Digest).
- //ws.SetCredentials ("nobita", "password", false);
-
- // To send the Origin header.
- //ws.Origin = "http://localhost:4649";
-
- // To send the cookies.
- //ws.SetCookie (new Cookie ("name", "nobita"));
- //ws.SetCookie (new Cookie ("roles", "\"idiot, gunfighter\""));
-
- // To connect through the HTTP Proxy server.
- //ws.SetProxy ("http://localhost:3128", "nobita", "password");
-
- // To enable the redirection.
- //ws.EnableRedirection = true;
-
- // Connect to the server.
- ws.Connect ();
-
- // Connect to the server asynchronously.
- //ws.ConnectAsync ();
-
- Console.WriteLine ("\nType 'exit' to exit.\n");
- while (true) {
- Thread.Sleep (1000);
- Console.Write ("> ");
- var msg = Console.ReadLine ();
- if (msg == "exit")
- break;
-
- // Send a text message.
- ws.Send (msg);
- }
- }
- }
- }
-}
+using System;
+using System.Threading;
+using WebSocketSharp;
+using WebSocketSharp.Net;
+
+namespace Example
+{
+ public class Program
+ {
+ public static void Main (string[] args)
+ {
+ // Create a new instance of the WebSocket class.
+ //
+ // The WebSocket class inherits the System.IDisposable interface, so you can
+ // use the using statement. And the WebSocket connection will be closed with
+ // close status 1001 (going away) when the control leaves the using block.
+ //
+ // If you would like to connect to the server with the secure connection,
+ // you should create a new instance with a wss scheme WebSocket URL.
+
+ using (var nf = new Notifier ())
+ using (var ws = new WebSocket ("ws://echo.websocket.org"))
+ //using (var ws = new WebSocket ("wss://echo.websocket.org"))
+ //using (var ws = new WebSocket ("ws://localhost:4649/Echo"))
+ //using (var ws = new WebSocket ("wss://localhost:5963/Echo"))
+ //using (var ws = new WebSocket ("ws://localhost:4649/Echo?name=nobita"))
+ //using (var ws = new WebSocket ("wss://localhost:5963/Echo?name=nobita"))
+ //using (var ws = new WebSocket ("ws://localhost:4649/Chat"))
+ //using (var ws = new WebSocket ("wss://localhost:5963/Chat"))
+ //using (var ws = new WebSocket ("ws://localhost:4649/Chat?name=nobita"))
+ //using (var ws = new WebSocket ("wss://localhost:5963/Chat?name=nobita"))
+ {
+ // Set the WebSocket events.
+
+ ws.OnOpen += (sender, e) => ws.Send ("Hi, there!");
+
+ ws.OnMessage += (sender, e) =>
+ nf.Notify (
+ new NotificationMessage {
+ Summary = "WebSocket Message",
+ Body = !e.IsPing ? e.Data : "Received a ping.",
+ Icon = "notification-message-im"
+ }
+ );
+
+ ws.OnError += (sender, e) =>
+ nf.Notify (
+ new NotificationMessage {
+ Summary = "WebSocket Error",
+ Body = e.Message,
+ Icon = "notification-message-im"
+ }
+ );
+
+ ws.OnClose += (sender, e) =>
+ nf.Notify (
+ new NotificationMessage {
+ Summary = String.Format ("WebSocket Close ({0})", e.Code),
+ Body = e.Reason,
+ Icon = "notification-message-im"
+ }
+ );
+#if DEBUG
+ // To change the logging level.
+ ws.Log.Level = LogLevel.Trace;
+
+ // To change the wait time for the response to the Ping or Close.
+ //ws.WaitTime = TimeSpan.FromSeconds (10);
+
+ // To emit a WebSocket.OnMessage event when receives a ping.
+ //ws.EmitOnPing = true;
+#endif
+ // To enable the Per-message Compression extension.
+ //ws.Compression = CompressionMethod.Deflate;
+
+ // To validate the server certificate.
+ /*
+ ws.SslConfiguration.ServerCertificateValidationCallback =
+ (sender, certificate, chain, sslPolicyErrors) => {
+ ws.Log.Debug (
+ String.Format (
+ "Certificate:\n- Issuer: {0}\n- Subject: {1}",
+ certificate.Issuer,
+ certificate.Subject
+ )
+ );
+
+ return true; // If the server certificate is valid.
+ };
+ */
+
+ // To send the credentials for the HTTP Authentication (Basic/Digest).
+ //ws.SetCredentials ("nobita", "password", false);
+
+ // To send the Origin header.
+ //ws.Origin = "http://localhost:4649";
+
+ // To send the cookies.
+ //ws.SetCookie (new Cookie ("name", "nobita"));
+ //ws.SetCookie (new Cookie ("roles", "\"idiot, gunfighter\""));
+
+ // To connect through the HTTP Proxy server.
+ //ws.SetProxy ("http://localhost:3128", "nobita", "password");
+
+ // To enable the redirection.
+ //ws.EnableRedirection = true;
+
+ // Connect to the server.
+ ws.Connect ();
+
+ // Connect to the server asynchronously.
+ //ws.ConnectAsync ();
+
+ Console.WriteLine ("\nType 'exit' to exit.\n");
+ while (true) {
+ Thread.Sleep (1000);
+ Console.Write ("> ");
+ var msg = Console.ReadLine ();
+ if (msg == "exit")
+ break;
+
+ // Send a text message.
+ ws.Send (msg);
+ }
+ }
+ }
+ }
+}
diff --git a/Example/packages.config b/Example/packages.config
new file mode 100644
index 00000000..451b858a
--- /dev/null
+++ b/Example/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Example1/AssemblyInfo.cs b/Example1/AssemblyInfo.cs
index a78e6c6d..26c35f54 100644
--- a/Example1/AssemblyInfo.cs
+++ b/Example1/AssemblyInfo.cs
@@ -1,26 +1,26 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// Information about this assembly is defined by the following attributes.
-// Change them to the values specific to your project.
-
-[assembly: AssemblyTitle("Example1")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("sta.blockhead")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
-// The form "{Major}.{Minor}.*" will automatically update the build and revision,
-// and "{Major}.{Minor}.{Build}.*" will update just the revision.
-
-[assembly: AssemblyVersion("1.0.*")]
-
-// The following attributes are used to specify the signing key for the assembly,
-// if desired. See the Mono documentation for more information about signing.
-
-//[assembly: AssemblyDelaySign(false)]
-//[assembly: AssemblyKeyFile("")]
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("Example1")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("sta.blockhead")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
diff --git a/Example1/AudioStreamer.cs b/Example1/AudioStreamer.cs
index 711694e9..b8043f32 100644
--- a/Example1/AudioStreamer.cs
+++ b/Example1/AudioStreamer.cs
@@ -1,192 +1,192 @@
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using System.Threading;
-using WebSocketSharp;
-
-namespace Example1
-{
- internal class AudioStreamer : IDisposable
- {
- private Dictionary _audioBox;
- private uint? _id;
- private string _name;
- private Notifier _notifier;
- private Timer _timer;
- private WebSocket _websocket;
-
- public AudioStreamer (string url)
- {
- _websocket = new WebSocket (url);
-
- _audioBox = new Dictionary ();
- _id = null;
- _notifier = new Notifier ();
- _timer = new Timer (sendHeartbeat, null, -1, -1);
-
- configure ();
- }
-
- private void configure ()
- {
-#if DEBUG
- _websocket.Log.Level = LogLevel.Trace;
-#endif
- _websocket.OnOpen += (sender, e) =>
- _websocket.Send (createTextMessage ("connection", String.Empty));
-
- _websocket.OnMessage += (sender, e) => {
- if (e.IsText) {
- _notifier.Notify (processTextMessage (e.Data));
- return;
- }
-
- if (e.IsBinary) {
- processBinaryMessage (e.RawData);
- return;
- }
- };
-
- _websocket.OnError += (sender, e) =>
- _notifier.Notify (
- new NotificationMessage {
- Summary = "AudioStreamer (error)",
- Body = e.Message,
- Icon = "notification-message-im"
- }
- );
-
- _websocket.OnClose += (sender, e) =>
- _notifier.Notify (
- new NotificationMessage {
- Summary = "AudioStreamer (disconnect)",
- Body = String.Format ("code: {0} reason: {1}", e.Code, e.Reason),
- Icon = "notification-message-im"
- }
- );
- }
-
- private byte[] createBinaryMessage (float[,] bufferArray)
- {
- return new BinaryMessage {
- UserID = (uint) _id,
- ChannelNumber = (byte) bufferArray.GetLength (0),
- BufferLength = (uint) bufferArray.GetLength (1),
- BufferArray = bufferArray
- }
- .ToArray ();
- }
-
- private string createTextMessage (string type, string message)
- {
- return new TextMessage {
- UserID = _id,
- Name = _name,
- Type = type,
- Message = message
- }
- .ToString ();
- }
-
- private void processBinaryMessage (byte[] data)
- {
- var msg = BinaryMessage.Parse (data);
-
- var id = msg.UserID;
- if (id == _id)
- return;
-
- Queue queue;
- if (_audioBox.TryGetValue (id, out queue)) {
- queue.Enqueue (msg.BufferArray);
- return;
- }
-
- queue = Queue.Synchronized (new Queue ());
- queue.Enqueue (msg.BufferArray);
- _audioBox.Add (id, queue);
- }
-
- private NotificationMessage processTextMessage (string data)
- {
- var json = JObject.Parse (data);
- var id = (uint) json["user_id"];
- var name = (string) json["name"];
- var type = (string) json["type"];
-
- string body;
- if (type == "message") {
- body = String.Format ("{0}: {1}", name, (string) json["message"]);
- }
- else if (type == "start_music") {
- body = String.Format ("{0}: Started playing music!", name);
- }
- else if (type == "connection") {
- var users = (JArray) json["message"];
- var buff = new StringBuilder ("Now keeping connections:");
- foreach (JToken user in users) {
- buff.AppendFormat (
- "\n- user_id: {0} name: {1}", (uint) user["user_id"], (string) user["name"]
- );
- }
-
- body = buff.ToString ();
- }
- else if (type == "connected") {
- _id = id;
- _timer.Change (30000, 30000);
-
- body = String.Format ("user_id: {0} name: {1}", id, name);
- }
- else {
- body = "Received unknown type message.";
- }
-
- return new NotificationMessage {
- Summary = String.Format ("AudioStreamer ({0})", type),
- Body = body,
- Icon = "notification-message-im"
- };
- }
-
- private void sendHeartbeat (object state)
- {
- _websocket.Send (createTextMessage ("heartbeat", String.Empty));
- }
-
- public void Close ()
- {
- Disconnect ();
- _timer.Dispose ();
- _notifier.Close ();
- }
-
- public void Connect (string username)
- {
- _name = username;
- _websocket.Connect ();
- }
-
- public void Disconnect ()
- {
- _timer.Change (-1, -1);
- _websocket.Close (CloseStatusCode.Away);
- _audioBox.Clear ();
- _id = null;
- _name = null;
- }
-
- public void Write (string message)
- {
- _websocket.Send (createTextMessage ("message", message));
- }
-
- void IDisposable.Dispose ()
- {
- Close ();
- }
- }
-}
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using WebSocketSharp;
+
+namespace Example1
+{
+ internal class AudioStreamer : IDisposable
+ {
+ private Dictionary _audioBox;
+ private uint? _id;
+ private string _name;
+ private Notifier _notifier;
+ private Timer _timer;
+ private WebSocket _websocket;
+
+ public AudioStreamer (string url)
+ {
+ _websocket = new WebSocket (url);
+
+ _audioBox = new Dictionary ();
+ _id = null;
+ _notifier = new Notifier ();
+ _timer = new Timer (sendHeartbeat, null, -1, -1);
+
+ configure ();
+ }
+
+ private void configure ()
+ {
+#if DEBUG
+ _websocket.Log.Level = LogLevel.Trace;
+#endif
+ _websocket.OnOpen += (sender, e) =>
+ _websocket.Send (createTextMessage ("connection", String.Empty));
+
+ _websocket.OnMessage += (sender, e) => {
+ if (e.IsText) {
+ _notifier.Notify (processTextMessage (e.Data));
+ return;
+ }
+
+ if (e.IsBinary) {
+ processBinaryMessage (e.RawData);
+ return;
+ }
+ };
+
+ _websocket.OnError += (sender, e) =>
+ _notifier.Notify (
+ new NotificationMessage {
+ Summary = "AudioStreamer (error)",
+ Body = e.Message,
+ Icon = "notification-message-im"
+ }
+ );
+
+ _websocket.OnClose += (sender, e) =>
+ _notifier.Notify (
+ new NotificationMessage {
+ Summary = "AudioStreamer (disconnect)",
+ Body = String.Format ("code: {0} reason: {1}", e.Code, e.Reason),
+ Icon = "notification-message-im"
+ }
+ );
+ }
+
+ private byte[] createBinaryMessage (float[,] bufferArray)
+ {
+ return new BinaryMessage {
+ UserID = (uint) _id,
+ ChannelNumber = (byte) bufferArray.GetLength (0),
+ BufferLength = (uint) bufferArray.GetLength (1),
+ BufferArray = bufferArray
+ }
+ .ToArray ();
+ }
+
+ private string createTextMessage (string type, string message)
+ {
+ return new TextMessage {
+ UserID = _id,
+ Name = _name,
+ Type = type,
+ Message = message
+ }
+ .ToString ();
+ }
+
+ private void processBinaryMessage (byte[] data)
+ {
+ var msg = BinaryMessage.Parse (data);
+
+ var id = msg.UserID;
+ if (id == _id)
+ return;
+
+ Queue queue;
+ if (_audioBox.TryGetValue (id, out queue)) {
+ queue.Enqueue (msg.BufferArray);
+ return;
+ }
+
+ queue = Queue.Synchronized (new Queue ());
+ queue.Enqueue (msg.BufferArray);
+ _audioBox.Add (id, queue);
+ }
+
+ private NotificationMessage processTextMessage (string data)
+ {
+ var json = JObject.Parse (data);
+ var id = (uint) json["user_id"];
+ var name = (string) json["name"];
+ var type = (string) json["type"];
+
+ string body;
+ if (type == "message") {
+ body = String.Format ("{0}: {1}", name, (string) json["message"]);
+ }
+ else if (type == "start_music") {
+ body = String.Format ("{0}: Started playing music!", name);
+ }
+ else if (type == "connection") {
+ var users = (JArray) json["message"];
+ var buff = new StringBuilder ("Now keeping connections:");
+ foreach (JToken user in users) {
+ buff.AppendFormat (
+ "\n- user_id: {0} name: {1}", (uint) user["user_id"], (string) user["name"]
+ );
+ }
+
+ body = buff.ToString ();
+ }
+ else if (type == "connected") {
+ _id = id;
+ _timer.Change (30000, 30000);
+
+ body = String.Format ("user_id: {0} name: {1}", id, name);
+ }
+ else {
+ body = "Received unknown type message.";
+ }
+
+ return new NotificationMessage {
+ Summary = String.Format ("AudioStreamer ({0})", type),
+ Body = body,
+ Icon = "notification-message-im"
+ };
+ }
+
+ private void sendHeartbeat (object state)
+ {
+ _websocket.Send (createTextMessage ("heartbeat", String.Empty));
+ }
+
+ public void Close ()
+ {
+ Disconnect ();
+ _timer.Dispose ();
+ _notifier.Close ();
+ }
+
+ public void Connect (string username)
+ {
+ _name = username;
+ _websocket.Connect ();
+ }
+
+ public void Disconnect ()
+ {
+ _timer.Change (-1, -1);
+ _websocket.Close (CloseStatusCode.Away);
+ _audioBox.Clear ();
+ _id = null;
+ _name = null;
+ }
+
+ public void Write (string message)
+ {
+ _websocket.Send (createTextMessage ("message", message));
+ }
+
+ void IDisposable.Dispose ()
+ {
+ Close ();
+ }
+ }
+}
diff --git a/Example1/BinaryMessage.cs b/Example1/BinaryMessage.cs
index eafa7aa9..74600dca 100644
--- a/Example1/BinaryMessage.cs
+++ b/Example1/BinaryMessage.cs
@@ -1,74 +1,74 @@
-using System;
-using System.Collections.Generic;
-using WebSocketSharp;
-
-namespace Example1
-{
- internal class BinaryMessage
- {
- public uint UserID {
- get; set;
- }
-
- public byte ChannelNumber {
- get; set;
- }
-
- public uint BufferLength {
- get; set;
- }
-
- public float[,] BufferArray {
- get; set;
- }
-
- public static BinaryMessage Parse (byte[] data)
- {
- var id = data.SubArray (0, 4).To (ByteOrder.Big);
- var num = data.SubArray (4, 1)[0];
- var len = data.SubArray (5, 4).To (ByteOrder.Big);
- var arr = new float[num, len];
-
- var offset = 9;
- ((uint) num).Times (
- i =>
- len.Times (
- j => {
- arr[i, j] = data.SubArray (offset, 4).To (ByteOrder.Big);
- offset += 4;
- }
- )
- );
-
- return new BinaryMessage {
- UserID = id,
- ChannelNumber = num,
- BufferLength = len,
- BufferArray = arr
- };
- }
-
- public byte[] ToArray ()
- {
- var buff = new List ();
-
- var id = UserID;
- var num = ChannelNumber;
- var len = BufferLength;
- var arr = BufferArray;
-
- buff.AddRange (id.ToByteArray (ByteOrder.Big));
- buff.Add (num);
- buff.AddRange (len.ToByteArray (ByteOrder.Big));
-
- ((uint) num).Times (
- i =>
- len.Times (
- j => buff.AddRange (arr[i, j].ToByteArray (ByteOrder.Big))
- )
- );
-
- return buff.ToArray ();
- }
- }
-}
+using System;
+using System.Collections.Generic;
+using WebSocketSharp;
+
+namespace Example1
+{
+ internal class BinaryMessage
+ {
+ public uint UserID {
+ get; set;
+ }
+
+ public byte ChannelNumber {
+ get; set;
+ }
+
+ public uint BufferLength {
+ get; set;
+ }
+
+ public float[,] BufferArray {
+ get; set;
+ }
+
+ public static BinaryMessage Parse (byte[] data)
+ {
+ var id = data.SubArray (0, 4).To (ByteOrder.Big);
+ var num = data.SubArray (4, 1)[0];
+ var len = data.SubArray (5, 4).To (ByteOrder.Big);
+ var arr = new float[num, len];
+
+ var offset = 9;
+ ((uint) num).Times (
+ i =>
+ len.Times (
+ j => {
+ arr[i, j] = data.SubArray (offset, 4).To (ByteOrder.Big);
+ offset += 4;
+ }
+ )
+ );
+
+ return new BinaryMessage {
+ UserID = id,
+ ChannelNumber = num,
+ BufferLength = len,
+ BufferArray = arr
+ };
+ }
+
+ public byte[] ToArray ()
+ {
+ var buff = new List ();
+
+ var id = UserID;
+ var num = ChannelNumber;
+ var len = BufferLength;
+ var arr = BufferArray;
+
+ buff.AddRange (id.ToByteArray (ByteOrder.Big));
+ buff.Add (num);
+ buff.AddRange (len.ToByteArray (ByteOrder.Big));
+
+ ((uint) num).Times (
+ i =>
+ len.Times (
+ j => buff.AddRange (arr[i, j].ToByteArray (ByteOrder.Big))
+ )
+ );
+
+ return buff.ToArray ();
+ }
+ }
+}
diff --git a/Example1/Example1.csproj b/Example1/Example1.csproj
index 81c52eff..f9732006 100644
--- a/Example1/Example1.csproj
+++ b/Example1/Example1.csproj
@@ -1,77 +1,81 @@
-
-
-
- Debug
- AnyCPU
- 9.0.21022
- 2.0
- {390E2568-57B7-4D17-91E5-C29336368CCF}
- Exe
- Example
- example1
- v3.5
-
-
- true
- full
- false
- bin\Debug
- DEBUG;
- prompt
- 4
- true
-
-
- none
- false
- bin\Release
- prompt
- 4
- true
-
-
- true
- full
- false
- bin\Debug_Ubuntu
- DEBUG;UBUNTU
- prompt
- 4
- true
-
-
- none
- false
- bin\Release_Ubuntu
- prompt
- 4
- true
- UBUNTU
-
-
-
-
- False
- notify-sharp
-
-
- False
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {B357BAC7-529E-4D81-A0D2-71041B19C8DE}
- websocket-sharp
-
-
+
+
+
+ Debug
+ AnyCPU
+ 9.0.21022
+ 2.0
+ {390E2568-57B7-4D17-91E5-C29336368CCF}
+ Exe
+ Example
+ example1
+ v3.5
+
+
+ true
+ full
+ false
+ bin\Debug
+ DEBUG;
+ prompt
+ 4
+ true
+
+
+ none
+ false
+ bin\Release
+ prompt
+ 4
+ true
+
+
+ true
+ full
+ false
+ bin\Debug_Ubuntu
+ DEBUG;UBUNTU
+ prompt
+ 4
+ true
+
+
+ none
+ false
+ bin\Release_Ubuntu
+ prompt
+ 4
+ true
+ UBUNTU
+
+
+
+ ..\packages\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll
+ True
+
+
+
+ False
+ notify-sharp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {B357BAC7-529E-4D81-A0D2-71041B19C8DE}
+ websocket-sharp
+
+
+
+
+
\ No newline at end of file
diff --git a/Example1/NotificationMessage.cs b/Example1/NotificationMessage.cs
index 01f1692a..99a56cf1 100644
--- a/Example1/NotificationMessage.cs
+++ b/Example1/NotificationMessage.cs
@@ -1,24 +1,24 @@
-using System;
-
-namespace Example1
-{
- internal class NotificationMessage
- {
- public string Body {
- get; set;
- }
-
- public string Icon {
- get; set;
- }
-
- public string Summary {
- get; set;
- }
-
- public override string ToString ()
- {
- return String.Format ("{0}: {1}", Summary, Body);
- }
- }
-}
+using System;
+
+namespace Example1
+{
+ internal class NotificationMessage
+ {
+ public string Body {
+ get; set;
+ }
+
+ public string Icon {
+ get; set;
+ }
+
+ public string Summary {
+ get; set;
+ }
+
+ public override string ToString ()
+ {
+ return String.Format ("{0}: {1}", Summary, Body);
+ }
+ }
+}
diff --git a/Example1/Notifier.cs b/Example1/Notifier.cs
index adf53ec9..8b366092 100644
--- a/Example1/Notifier.cs
+++ b/Example1/Notifier.cs
@@ -1,81 +1,81 @@
-#if UBUNTU
-using Notifications;
-#endif
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Threading;
-
-namespace Example1
-{
- internal class Notifier : IDisposable
- {
- private volatile bool _enabled;
- private ManualResetEvent _exited;
- private Queue _queue;
- private object _sync;
-
- public Notifier ()
- {
- _enabled = true;
- _exited = new ManualResetEvent (false);
- _queue = new Queue ();
- _sync = ((ICollection) _queue).SyncRoot;
-
- ThreadPool.QueueUserWorkItem (
- state => {
- while (_enabled || Count > 0) {
- var msg = dequeue ();
- if (msg != null) {
-#if UBUNTU
- var nf = new Notification (msg.Summary, msg.Body, msg.Icon);
- nf.AddHint ("append", "allowed");
- nf.Show ();
-#else
- Console.WriteLine (msg);
-#endif
- }
- else {
- Thread.Sleep (500);
- }
- }
-
- _exited.Set ();
- }
- );
- }
-
- public int Count {
- get {
- lock (_sync)
- return _queue.Count;
- }
- }
-
- private NotificationMessage dequeue ()
- {
- lock (_sync)
- return _queue.Count > 0 ? _queue.Dequeue () : null;
- }
-
- public void Close ()
- {
- _enabled = false;
- _exited.WaitOne ();
- _exited.Close ();
- }
-
- public void Notify (NotificationMessage message)
- {
- lock (_sync) {
- if (_enabled)
- _queue.Enqueue (message);
- }
- }
-
- void IDisposable.Dispose ()
- {
- Close ();
- }
- }
-}
+#if UBUNTU
+using Notifications;
+#endif
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Threading;
+
+namespace Example1
+{
+ internal class Notifier : IDisposable
+ {
+ private volatile bool _enabled;
+ private ManualResetEvent _exited;
+ private Queue _queue;
+ private object _sync;
+
+ public Notifier ()
+ {
+ _enabled = true;
+ _exited = new ManualResetEvent (false);
+ _queue = new Queue ();
+ _sync = ((ICollection) _queue).SyncRoot;
+
+ ThreadPool.QueueUserWorkItem (
+ state => {
+ while (_enabled || Count > 0) {
+ var msg = dequeue ();
+ if (msg != null) {
+#if UBUNTU
+ var nf = new Notification (msg.Summary, msg.Body, msg.Icon);
+ nf.AddHint ("append", "allowed");
+ nf.Show ();
+#else
+ Console.WriteLine (msg);
+#endif
+ }
+ else {
+ Thread.Sleep (500);
+ }
+ }
+
+ _exited.Set ();
+ }
+ );
+ }
+
+ public int Count {
+ get {
+ lock (_sync)
+ return _queue.Count;
+ }
+ }
+
+ private NotificationMessage dequeue ()
+ {
+ lock (_sync)
+ return _queue.Count > 0 ? _queue.Dequeue () : null;
+ }
+
+ public void Close ()
+ {
+ _enabled = false;
+ _exited.WaitOne ();
+ _exited.Close ();
+ }
+
+ public void Notify (NotificationMessage message)
+ {
+ lock (_sync) {
+ if (_enabled)
+ _queue.Enqueue (message);
+ }
+ }
+
+ void IDisposable.Dispose ()
+ {
+ Close ();
+ }
+ }
+}
diff --git a/Example1/Program.cs b/Example1/Program.cs
index 88c0bedf..23d2cfed 100644
--- a/Example1/Program.cs
+++ b/Example1/Program.cs
@@ -1,37 +1,37 @@
-using System;
-using System.Threading;
-
-namespace Example1
-{
- public class Program
- {
- public static void Main (string[] args)
- {
- // The AudioStreamer class provides a client (chat) for AudioStreamer
- // (https://github.com/agektmr/AudioStreamer).
-
- using (var streamer = new AudioStreamer ("ws://localhost:3000/socket"))
- {
- string name;
- do {
- Console.Write ("Input your name> ");
- name = Console.ReadLine ();
- }
- while (name.Length == 0);
-
- streamer.Connect (name);
-
- Console.WriteLine ("\nType 'exit' to exit.\n");
- while (true) {
- Thread.Sleep (1000);
- Console.Write ("> ");
- var msg = Console.ReadLine ();
- if (msg == "exit")
- break;
-
- streamer.Write (msg);
- }
- }
- }
- }
-}
+using System;
+using System.Threading;
+
+namespace Example1
+{
+ public class Program
+ {
+ public static void Main (string[] args)
+ {
+ // The AudioStreamer class provides a client (chat) for AudioStreamer
+ // (https://github.com/agektmr/AudioStreamer).
+
+ using (var streamer = new AudioStreamer ("ws://localhost:3000/socket"))
+ {
+ string name;
+ do {
+ Console.Write ("Input your name> ");
+ name = Console.ReadLine ();
+ }
+ while (name.Length == 0);
+
+ streamer.Connect (name);
+
+ Console.WriteLine ("\nType 'exit' to exit.\n");
+ while (true) {
+ Thread.Sleep (1000);
+ Console.Write ("> ");
+ var msg = Console.ReadLine ();
+ if (msg == "exit")
+ break;
+
+ streamer.Write (msg);
+ }
+ }
+ }
+ }
+}
diff --git a/Example1/TextMessage.cs b/Example1/TextMessage.cs
index 2b177d84..e8d06e95 100644
--- a/Example1/TextMessage.cs
+++ b/Example1/TextMessage.cs
@@ -1,33 +1,33 @@
-using Newtonsoft.Json;
-using System;
-
-namespace Example1
-{
- internal class TextMessage
- {
- [JsonProperty ("user_id")]
- public uint? UserID {
- get; set;
- }
-
- [JsonProperty ("name")]
- public string Name {
- get; set;
- }
-
- [JsonProperty ("type")]
- public string Type {
- get; set;
- }
-
- [JsonProperty ("message")]
- public string Message {
- get; set;
- }
-
- public override string ToString ()
- {
- return JsonConvert.SerializeObject (this);
- }
- }
-}
+using Newtonsoft.Json;
+using System;
+
+namespace Example1
+{
+ internal class TextMessage
+ {
+ [JsonProperty ("user_id")]
+ public uint? UserID {
+ get; set;
+ }
+
+ [JsonProperty ("name")]
+ public string Name {
+ get; set;
+ }
+
+ [JsonProperty ("type")]
+ public string Type {
+ get; set;
+ }
+
+ [JsonProperty ("message")]
+ public string Message {
+ get; set;
+ }
+
+ public override string ToString ()
+ {
+ return JsonConvert.SerializeObject (this);
+ }
+ }
+}
diff --git a/Example1/packages.config b/Example1/packages.config
new file mode 100644
index 00000000..451b858a
--- /dev/null
+++ b/Example1/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Example2/App.config b/Example2/App.config
index 3a02690e..9e6790a0 100644
--- a/Example2/App.config
+++ b/Example2/App.config
@@ -1,7 +1,7 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/Example2/AssemblyInfo.cs b/Example2/AssemblyInfo.cs
index 55cd94f7..ff330d54 100644
--- a/Example2/AssemblyInfo.cs
+++ b/Example2/AssemblyInfo.cs
@@ -1,26 +1,26 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// Information about this assembly is defined by the following attributes.
-// Change them to the values specific to your project.
-
-[assembly: AssemblyTitle("Example2")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("sta.blockhead")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
-// The form "{Major}.{Minor}.*" will automatically update the build and revision,
-// and "{Major}.{Minor}.{Build}.*" will update just the revision.
-
-[assembly: AssemblyVersion("1.0.*")]
-
-// The following attributes are used to specify the signing key for the assembly,
-// if desired. See the Mono documentation for more information about signing.
-
-//[assembly: AssemblyDelaySign(false)]
-//[assembly: AssemblyKeyFile("")]
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("Example2")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("sta.blockhead")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
diff --git a/Example2/Chat.cs b/Example2/Chat.cs
index a6b367d9..35137b4e 100644
--- a/Example2/Chat.cs
+++ b/Example2/Chat.cs
@@ -1,50 +1,50 @@
-using System;
-using System.Threading;
-using WebSocketSharp;
-using WebSocketSharp.Server;
-
-namespace Example2
-{
- public class Chat : WebSocketBehavior
- {
- private string _name;
- private static int _number = 0;
- private string _prefix;
-
- public Chat ()
- : this (null)
- {
- }
-
- public Chat (string prefix)
- {
- _prefix = !prefix.IsNullOrEmpty () ? prefix : "anon#";
- }
-
- private string getName ()
- {
- var name = Context.QueryString["name"];
- return !name.IsNullOrEmpty () ? name : _prefix + getNumber ();
- }
-
- private static int getNumber ()
- {
- return Interlocked.Increment (ref _number);
- }
-
- protected override void OnClose (CloseEventArgs e)
- {
- Sessions.Broadcast (String.Format ("{0} got logged off...", _name));
- }
-
- protected override void OnMessage (MessageEventArgs e)
- {
- Sessions.Broadcast (String.Format ("{0}: {1}", _name, e.Data));
- }
-
- protected override void OnOpen ()
- {
- _name = getName ();
- }
- }
-}
+using System;
+using System.Threading;
+using WebSocketSharp;
+using WebSocketSharp.Server;
+
+namespace Example2
+{
+ public class Chat : WebSocketBehavior
+ {
+ private string _name;
+ private static int _number = 0;
+ private string _prefix;
+
+ public Chat ()
+ : this (null)
+ {
+ }
+
+ public Chat (string prefix)
+ {
+ _prefix = !prefix.IsNullOrEmpty () ? prefix : "anon#";
+ }
+
+ private string getName ()
+ {
+ var name = Context.QueryString["name"];
+ return !name.IsNullOrEmpty () ? name : _prefix + getNumber ();
+ }
+
+ private static int getNumber ()
+ {
+ return Interlocked.Increment (ref _number);
+ }
+
+ protected override void OnClose (CloseEventArgs e)
+ {
+ Sessions.Broadcast (String.Format ("{0} got logged off...", _name));
+ }
+
+ protected override void OnMessage (MessageEventArgs e)
+ {
+ Sessions.Broadcast (String.Format ("{0}: {1}", _name, e.Data));
+ }
+
+ protected override void OnOpen ()
+ {
+ _name = getName ();
+ }
+ }
+}
diff --git a/Example2/Echo.cs b/Example2/Echo.cs
index dd780c8d..8c2887b3 100644
--- a/Example2/Echo.cs
+++ b/Example2/Echo.cs
@@ -1,15 +1,15 @@
-using System;
-using WebSocketSharp;
-using WebSocketSharp.Server;
-
-namespace Example2
-{
- public class Echo : WebSocketBehavior
- {
- protected override void OnMessage (MessageEventArgs e)
- {
- var name = Context.QueryString["name"];
- Send (!name.IsNullOrEmpty () ? String.Format ("\"{0}\" to {1}", e.Data, name) : e.Data);
- }
- }
-}
+using System;
+using WebSocketSharp;
+using WebSocketSharp.Server;
+
+namespace Example2
+{
+ public class Echo : WebSocketBehavior
+ {
+ protected override void OnMessage (MessageEventArgs e)
+ {
+ var name = Context.QueryString["name"];
+ Send (!name.IsNullOrEmpty () ? String.Format ("\"{0}\" to {1}", e.Data, name) : e.Data);
+ }
+ }
+}
diff --git a/Example2/Example2.csproj b/Example2/Example2.csproj
index 685a1ef6..965ba431 100644
--- a/Example2/Example2.csproj
+++ b/Example2/Example2.csproj
@@ -1,70 +1,75 @@
-
-
-
- Debug
- AnyCPU
- 9.0.21022
- 2.0
- {B81A24C8-25BB-42B2-AF99-1E1EACCE74C7}
- Exe
- Example2
- example2
- v3.5
-
-
- true
- full
- false
- bin\Debug
- DEBUG;
- prompt
- 4
- true
-
-
- none
- false
- bin\Release
- prompt
- 4
- true
-
-
- true
- full
- false
- bin\Debug_Ubuntu
- DEBUG;
- prompt
- 4
- true
-
-
- none
- false
- bin\Release_Ubuntu
- prompt
- 4
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {B357BAC7-529E-4D81-A0D2-71041B19C8DE}
- websocket-sharp
-
-
-
-
-
+
+
+
+ Debug
+ AnyCPU
+ 9.0.21022
+ 2.0
+ {B81A24C8-25BB-42B2-AF99-1E1EACCE74C7}
+ Exe
+ Example2
+ example2
+ v3.5
+
+
+ true
+ full
+ false
+ bin\Debug
+ DEBUG;
+ prompt
+ 4
+ true
+
+
+ none
+ false
+ bin\Release
+ prompt
+ 4
+ true
+
+
+ true
+ full
+ false
+ bin\Debug_Ubuntu
+ DEBUG;
+ prompt
+ 4
+ true
+
+
+ none
+ false
+ bin\Release_Ubuntu
+ prompt
+ 4
+ true
+
+
+
+ ..\packages\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {B357BAC7-529E-4D81-A0D2-71041B19C8DE}
+ websocket-sharp
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Example2/Program.cs b/Example2/Program.cs
index c9bd7ef3..81947e72 100644
--- a/Example2/Program.cs
+++ b/Example2/Program.cs
@@ -1,135 +1,135 @@
-using System;
-using System.Configuration;
-using System.Security.Cryptography.X509Certificates;
-using WebSocketSharp;
-using WebSocketSharp.Net;
-using WebSocketSharp.Server;
-
-namespace Example2
-{
- public class Program
- {
- public static void Main (string[] args)
- {
- // Create a new instance of the WebSocketServer class.
- //
- // If you would like to provide the secure connection, you should
- // create a new instance with the 'secure' parameter set to true,
- // or a wss scheme WebSocket URL.
-
- var wssv = new WebSocketServer (4649);
- //var wssv = new WebSocketServer (5963, true);
-
- //var wssv = new WebSocketServer (System.Net.IPAddress.Any, 4649);
- //var wssv = new WebSocketServer (System.Net.IPAddress.Any, 5963, true);
-
- //var wssv = new WebSocketServer (System.Net.IPAddress.IPv6Any, 4649);
- //var wssv = new WebSocketServer (System.Net.IPAddress.IPv6Any, 5963, true);
-
- //var wssv = new WebSocketServer ("ws://0.0.0.0:4649");
- //var wssv = new WebSocketServer ("wss://0.0.0.0:5963");
-
- //var wssv = new WebSocketServer ("ws://[::0]:4649");
- //var wssv = new WebSocketServer ("wss://[::0]:5963");
-
- //var wssv = new WebSocketServer (System.Net.IPAddress.Loopback, 4649);
- //var wssv = new WebSocketServer (System.Net.IPAddress.Loopback, 5963, true);
-
- //var wssv = new WebSocketServer (System.Net.IPAddress.IPv6Loopback, 4649);
- //var wssv = new WebSocketServer (System.Net.IPAddress.IPv6Loopback, 5963, true);
-
- //var wssv = new WebSocketServer ("ws://localhost:4649");
- //var wssv = new WebSocketServer ("wss://localhost:5963");
-
- //var wssv = new WebSocketServer ("ws://127.0.0.1:4649");
- //var wssv = new WebSocketServer ("wss://127.0.0.1:5963");
-
- //var wssv = new WebSocketServer ("ws://[::1]:4649");
- //var wssv = new WebSocketServer ("wss://[::1]:5963");
-#if DEBUG
- // To change the logging level.
- wssv.Log.Level = LogLevel.Trace;
-
- // To change the wait time for the response to the WebSocket Ping or Close.
- //wssv.WaitTime = TimeSpan.FromSeconds (2);
-
- // Not to remove the inactive sessions periodically.
- //wssv.KeepClean = false;
-#endif
- // To provide the secure connection.
- /*
- var cert = ConfigurationManager.AppSettings["ServerCertFile"];
- var passwd = ConfigurationManager.AppSettings["CertFilePassword"];
- wssv.SslConfiguration.ServerCertificate = new X509Certificate2 (cert, passwd);
- */
-
- // To provide the HTTP Authentication (Basic/Digest).
- /*
- wssv.AuthenticationSchemes = AuthenticationSchemes.Basic;
- wssv.Realm = "WebSocket Test";
- wssv.UserCredentialsFinder = id => {
- var name = id.Name;
-
- // Return user name, password, and roles.
- return name == "nobita"
- ? new NetworkCredential (name, "password", "gunfighter")
- : null; // If the user credentials aren't found.
- };
- */
-
- // To resolve to wait for socket in TIME_WAIT state.
- //wssv.ReuseAddress = true;
-
- // Add the WebSocket services.
- wssv.AddWebSocketService ("/Echo");
- wssv.AddWebSocketService ("/Chat");
-
- // Add the WebSocket service with initializing.
- /*
- wssv.AddWebSocketService (
- "/Chat",
- () =>
- new Chat ("Anon#") {
- // To send the Sec-WebSocket-Protocol header that has a subprotocol name.
- Protocol = "chat",
- // To ignore the Sec-WebSocket-Extensions header.
- IgnoreExtensions = true,
- // To emit a WebSocket.OnMessage event when receives a ping.
- EmitOnPing = true,
- // To validate the Origin header.
- OriginValidator = val => {
- // Check the value of the Origin header, and return true if valid.
- Uri origin;
- return !val.IsNullOrEmpty ()
- && Uri.TryCreate (val, UriKind.Absolute, out origin)
- && origin.Host == "localhost";
- },
- // To validate the cookies.
- CookiesValidator = (req, res) => {
- // Check the cookies in 'req', and set the cookies to send to
- // the client with 'res' if necessary.
- foreach (Cookie cookie in req) {
- cookie.Expired = true;
- res.Add (cookie);
- }
-
- return true; // If valid.
- }
- }
- );
- */
-
- wssv.Start ();
- if (wssv.IsListening) {
- Console.WriteLine ("Listening on port {0}, and providing WebSocket services:", wssv.Port);
- foreach (var path in wssv.WebSocketServices.Paths)
- Console.WriteLine ("- {0}", path);
- }
-
- Console.WriteLine ("\nPress Enter key to stop the server...");
- Console.ReadLine ();
-
- wssv.Stop ();
- }
- }
-}
+using System;
+using System.Configuration;
+using System.Security.Cryptography.X509Certificates;
+using WebSocketSharp;
+using WebSocketSharp.Net;
+using WebSocketSharp.Server;
+
+namespace Example2
+{
+ public class Program
+ {
+ public static void Main (string[] args)
+ {
+ // Create a new instance of the WebSocketServer class.
+ //
+ // If you would like to provide the secure connection, you should
+ // create a new instance with the 'secure' parameter set to true,
+ // or a wss scheme WebSocket URL.
+
+ var wssv = new WebSocketServer (4649);
+ //var wssv = new WebSocketServer (5963, true);
+
+ //var wssv = new WebSocketServer (System.Net.IPAddress.Any, 4649);
+ //var wssv = new WebSocketServer (System.Net.IPAddress.Any, 5963, true);
+
+ //var wssv = new WebSocketServer (System.Net.IPAddress.IPv6Any, 4649);
+ //var wssv = new WebSocketServer (System.Net.IPAddress.IPv6Any, 5963, true);
+
+ //var wssv = new WebSocketServer ("ws://0.0.0.0:4649");
+ //var wssv = new WebSocketServer ("wss://0.0.0.0:5963");
+
+ //var wssv = new WebSocketServer ("ws://[::0]:4649");
+ //var wssv = new WebSocketServer ("wss://[::0]:5963");
+
+ //var wssv = new WebSocketServer (System.Net.IPAddress.Loopback, 4649);
+ //var wssv = new WebSocketServer (System.Net.IPAddress.Loopback, 5963, true);
+
+ //var wssv = new WebSocketServer (System.Net.IPAddress.IPv6Loopback, 4649);
+ //var wssv = new WebSocketServer (System.Net.IPAddress.IPv6Loopback, 5963, true);
+
+ //var wssv = new WebSocketServer ("ws://localhost:4649");
+ //var wssv = new WebSocketServer ("wss://localhost:5963");
+
+ //var wssv = new WebSocketServer ("ws://127.0.0.1:4649");
+ //var wssv = new WebSocketServer ("wss://127.0.0.1:5963");
+
+ //var wssv = new WebSocketServer ("ws://[::1]:4649");
+ //var wssv = new WebSocketServer ("wss://[::1]:5963");
+#if DEBUG
+ // To change the logging level.
+ wssv.Log.Level = LogLevel.Trace;
+
+ // To change the wait time for the response to the WebSocket Ping or Close.
+ //wssv.WaitTime = TimeSpan.FromSeconds (2);
+
+ // Not to remove the inactive sessions periodically.
+ //wssv.KeepClean = false;
+#endif
+ // To provide the secure connection.
+ /*
+ var cert = ConfigurationManager.AppSettings["ServerCertFile"];
+ var passwd = ConfigurationManager.AppSettings["CertFilePassword"];
+ wssv.SslConfiguration.ServerCertificate = new X509Certificate2 (cert, passwd);
+ */
+
+ // To provide the HTTP Authentication (Basic/Digest).
+ /*
+ wssv.AuthenticationSchemes = AuthenticationSchemes.Basic;
+ wssv.Realm = "WebSocket Test";
+ wssv.UserCredentialsFinder = id => {
+ var name = id.Name;
+
+ // Return user name, password, and roles.
+ return name == "nobita"
+ ? new NetworkCredential (name, "password", "gunfighter")
+ : null; // If the user credentials aren't found.
+ };
+ */
+
+ // To resolve to wait for socket in TIME_WAIT state.
+ //wssv.ReuseAddress = true;
+
+ // Add the WebSocket services.
+ wssv.AddWebSocketService ("/Echo");
+ wssv.AddWebSocketService ("/Chat");
+
+ // Add the WebSocket service with initializing.
+ /*
+ wssv.AddWebSocketService (
+ "/Chat",
+ () =>
+ new Chat ("Anon#") {
+ // To send the Sec-WebSocket-Protocol header that has a subprotocol name.
+ Protocol = "chat",
+ // To ignore the Sec-WebSocket-Extensions header.
+ IgnoreExtensions = true,
+ // To emit a WebSocket.OnMessage event when receives a ping.
+ EmitOnPing = true,
+ // To validate the Origin header.
+ OriginValidator = val => {
+ // Check the value of the Origin header, and return true if valid.
+ Uri origin;
+ return !val.IsNullOrEmpty ()
+ && Uri.TryCreate (val, UriKind.Absolute, out origin)
+ && origin.Host == "localhost";
+ },
+ // To validate the cookies.
+ CookiesValidator = (req, res) => {
+ // Check the cookies in 'req', and set the cookies to send to
+ // the client with 'res' if necessary.
+ foreach (Cookie cookie in req) {
+ cookie.Expired = true;
+ res.Add (cookie);
+ }
+
+ return true; // If valid.
+ }
+ }
+ );
+ */
+
+ wssv.Start ();
+ if (wssv.IsListening) {
+ Console.WriteLine ("Listening on port {0}, and providing WebSocket services:", wssv.Port);
+ foreach (var path in wssv.WebSocketServices.Paths)
+ Console.WriteLine ("- {0}", path);
+ }
+
+ Console.WriteLine ("\nPress Enter key to stop the server...");
+ Console.ReadLine ();
+
+ wssv.Stop ();
+ }
+ }
+}
diff --git a/Example2/packages.config b/Example2/packages.config
new file mode 100644
index 00000000..451b858a
--- /dev/null
+++ b/Example2/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Example3/App.config b/Example3/App.config
index fa624b42..e0e5d1d4 100644
--- a/Example3/App.config
+++ b/Example3/App.config
@@ -1,8 +1,8 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/Example3/AssemblyInfo.cs b/Example3/AssemblyInfo.cs
index b9a88a25..d52ebada 100644
--- a/Example3/AssemblyInfo.cs
+++ b/Example3/AssemblyInfo.cs
@@ -1,26 +1,26 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// Information about this assembly is defined by the following attributes.
-// Change them to the values specific to your project.
-
-[assembly: AssemblyTitle("Example3")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("sta.blockhead")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
-// The form "{Major}.{Minor}.*" will automatically update the build and revision,
-// and "{Major}.{Minor}.{Build}.*" will update just the revision.
-
-[assembly: AssemblyVersion("1.0.*")]
-
-// The following attributes are used to specify the signing key for the assembly,
-// if desired. See the Mono documentation for more information about signing.
-
-//[assembly: AssemblyDelaySign(false)]
-//[assembly: AssemblyKeyFile("")]
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("Example3")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("sta.blockhead")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
diff --git a/Example3/Chat.cs b/Example3/Chat.cs
index b1a3f4d7..21a7e512 100644
--- a/Example3/Chat.cs
+++ b/Example3/Chat.cs
@@ -1,50 +1,50 @@
-using System;
-using System.Threading;
-using WebSocketSharp;
-using WebSocketSharp.Server;
-
-namespace Example3
-{
- public class Chat : WebSocketBehavior
- {
- private string _name;
- private static int _number = 0;
- private string _prefix;
-
- public Chat ()
- : this (null)
- {
- }
-
- public Chat (string prefix)
- {
- _prefix = !prefix.IsNullOrEmpty () ? prefix : "anon#";
- }
-
- private string getName ()
- {
- var name = Context.QueryString["name"];
- return !name.IsNullOrEmpty () ? name : _prefix + getNumber ();
- }
-
- private static int getNumber ()
- {
- return Interlocked.Increment (ref _number);
- }
-
- protected override void OnClose (CloseEventArgs e)
- {
- Sessions.Broadcast (String.Format ("{0} got logged off...", _name));
- }
-
- protected override void OnMessage (MessageEventArgs e)
- {
- Sessions.Broadcast (String.Format ("{0}: {1}", _name, e.Data));
- }
-
- protected override void OnOpen ()
- {
- _name = getName ();
- }
- }
-}
+using System;
+using System.Threading;
+using WebSocketSharp;
+using WebSocketSharp.Server;
+
+namespace Example3
+{
+ public class Chat : WebSocketBehavior
+ {
+ private string _name;
+ private static int _number = 0;
+ private string _prefix;
+
+ public Chat ()
+ : this (null)
+ {
+ }
+
+ public Chat (string prefix)
+ {
+ _prefix = !prefix.IsNullOrEmpty () ? prefix : "anon#";
+ }
+
+ private string getName ()
+ {
+ var name = Context.QueryString["name"];
+ return !name.IsNullOrEmpty () ? name : _prefix + getNumber ();
+ }
+
+ private static int getNumber ()
+ {
+ return Interlocked.Increment (ref _number);
+ }
+
+ protected override void OnClose (CloseEventArgs e)
+ {
+ Sessions.Broadcast (String.Format ("{0} got logged off...", _name));
+ }
+
+ protected override void OnMessage (MessageEventArgs e)
+ {
+ Sessions.Broadcast (String.Format ("{0}: {1}", _name, e.Data));
+ }
+
+ protected override void OnOpen ()
+ {
+ _name = getName ();
+ }
+ }
+}
diff --git a/Example3/Echo.cs b/Example3/Echo.cs
index eb7c3341..bafe1102 100644
--- a/Example3/Echo.cs
+++ b/Example3/Echo.cs
@@ -1,15 +1,15 @@
-using System;
-using WebSocketSharp;
-using WebSocketSharp.Server;
-
-namespace Example3
-{
- public class Echo : WebSocketBehavior
- {
- protected override void OnMessage (MessageEventArgs e)
- {
- var name = Context.QueryString["name"];
- Send (!name.IsNullOrEmpty () ? String.Format ("\"{0}\" to {1}", e.Data, name) : e.Data);
- }
- }
-}
+using System;
+using WebSocketSharp;
+using WebSocketSharp.Server;
+
+namespace Example3
+{
+ public class Echo : WebSocketBehavior
+ {
+ protected override void OnMessage (MessageEventArgs e)
+ {
+ var name = Context.QueryString["name"];
+ Send (!name.IsNullOrEmpty () ? String.Format ("\"{0}\" to {1}", e.Data, name) : e.Data);
+ }
+ }
+}
diff --git a/Example3/Example3.csproj b/Example3/Example3.csproj
index ce4fe265..ae03cf3b 100644
--- a/Example3/Example3.csproj
+++ b/Example3/Example3.csproj
@@ -1,76 +1,81 @@
-
-
-
- Debug
- AnyCPU
- 9.0.21022
- 2.0
- {C648BA25-77E5-4A40-A97F-D0AA37B9FB26}
- Exe
- Example3
- example3
- v3.5
-
-
- true
- full
- false
- bin\Debug
- DEBUG;
- prompt
- 4
- true
-
-
- none
- false
- bin\Release
- prompt
- 4
- true
-
-
- true
- full
- false
- bin\Debug_Ubuntu
- DEBUG;
- prompt
- 4
- true
-
-
- none
- false
- bin\Release_Ubuntu
- prompt
- 4
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {B357BAC7-529E-4D81-A0D2-71041B19C8DE}
- websocket-sharp
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ Debug
+ AnyCPU
+ 9.0.21022
+ 2.0
+ {C648BA25-77E5-4A40-A97F-D0AA37B9FB26}
+ Exe
+ Example3
+ example3
+ v3.5
+
+
+ true
+ full
+ false
+ bin\Debug
+ DEBUG;
+ prompt
+ 4
+ true
+
+
+ none
+ false
+ bin\Release
+ prompt
+ 4
+ true
+
+
+ true
+ full
+ false
+ bin\Debug_Ubuntu
+ DEBUG;
+ prompt
+ 4
+ true
+
+
+ none
+ false
+ bin\Release_Ubuntu
+ prompt
+ 4
+ true
+
+
+
+ ..\packages\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {B357BAC7-529E-4D81-A0D2-71041B19C8DE}
+ websocket-sharp
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Example3/Program.cs b/Example3/Program.cs
index b9699531..f31ff5b6 100644
--- a/Example3/Program.cs
+++ b/Example3/Program.cs
@@ -1,167 +1,167 @@
-using System;
-using System.Configuration;
-using System.Security.Cryptography.X509Certificates;
-using System.Text;
-using WebSocketSharp;
-using WebSocketSharp.Net;
-using WebSocketSharp.Server;
-
-namespace Example3
-{
- public class Program
- {
- public static void Main (string[] args)
- {
- // Create a new instance of the HttpServer class.
- //
- // If you would like to provide the secure connection, you should
- // create a new instance with the 'secure' parameter set to true,
- // or an https scheme HTTP URL.
-
- var httpsv = new HttpServer (4649);
- //var httpsv = new HttpServer (5963, true);
-
- //var httpsv = new HttpServer (System.Net.IPAddress.Any, 4649);
- //var httpsv = new HttpServer (System.Net.IPAddress.Any, 5963, true);
-
- //var httpsv = new HttpServer (System.Net.IPAddress.IPv6Any, 4649);
- //var httpsv = new HttpServer (System.Net.IPAddress.IPv6Any, 5963, true);
-
- //var httpsv = new HttpServer ("http://0.0.0.0:4649");
- //var httpsv = new HttpServer ("https://0.0.0.0:5963");
-
- //var httpsv = new HttpServer ("http://[::0]:4649");
- //var httpsv = new HttpServer ("https://[::0]:5963");
-
- //var httpsv = new HttpServer (System.Net.IPAddress.Loopback, 4649);
- //var httpsv = new HttpServer (System.Net.IPAddress.Loopback, 5963, true);
-
- //var httpsv = new HttpServer (System.Net.IPAddress.IPv6Loopback, 4649);
- //var httpsv = new HttpServer (System.Net.IPAddress.IPv6Loopback, 5963, true);
-
- //var httpsv = new HttpServer ("http://localhost:4649");
- //var httpsv = new HttpServer ("https://localhost:5963");
-
- //var httpsv = new HttpServer ("http://127.0.0.1:4649");
- //var httpsv = new HttpServer ("https://127.0.0.1:5963");
-
- //var httpsv = new HttpServer ("http://[::1]:4649");
- //var httpsv = new HttpServer ("https://[::1]:5963");
-#if DEBUG
- // To change the logging level.
- httpsv.Log.Level = LogLevel.Trace;
-
- // To change the wait time for the response to the WebSocket Ping or Close.
- //httpsv.WaitTime = TimeSpan.FromSeconds (2);
-
- // Not to remove the inactive WebSocket sessions periodically.
- //httpsv.KeepClean = false;
-#endif
- // To provide the secure connection.
- /*
- var cert = ConfigurationManager.AppSettings["ServerCertFile"];
- var passwd = ConfigurationManager.AppSettings["CertFilePassword"];
- httpsv.SslConfiguration.ServerCertificate = new X509Certificate2 (cert, passwd);
- */
-
- // To provide the HTTP Authentication (Basic/Digest).
- /*
- httpsv.AuthenticationSchemes = AuthenticationSchemes.Basic;
- httpsv.Realm = "WebSocket Test";
- httpsv.UserCredentialsFinder = id => {
- var name = id.Name;
-
- // Return user name, password, and roles.
- return name == "nobita"
- ? new NetworkCredential (name, "password", "gunfighter")
- : null; // If the user credentials aren't found.
- };
- */
-
- // To resolve to wait for socket in TIME_WAIT state.
- //httpsv.ReuseAddress = true;
-
- // Set the document root path.
- httpsv.DocumentRootPath = ConfigurationManager.AppSettings["DocumentRootPath"];
-
- // Set the HTTP GET request event.
- httpsv.OnGet += (sender, e) => {
- var req = e.Request;
- var res = e.Response;
-
- var path = req.RawUrl;
- if (path == "/")
- path += "index.html";
-
- byte[] contents;
- if (!e.TryReadFile (path, out contents)) {
- res.StatusCode = (int) HttpStatusCode.NotFound;
- return;
- }
-
- if (path.EndsWith (".html")) {
- res.ContentType = "text/html";
- res.ContentEncoding = Encoding.UTF8;
- }
- else if (path.EndsWith (".js")) {
- res.ContentType = "application/javascript";
- res.ContentEncoding = Encoding.UTF8;
- }
-
- res.ContentLength64 = contents.LongLength;
- res.Close (contents, true);
- };
-
- // Add the WebSocket services.
- httpsv.AddWebSocketService ("/Echo");
- httpsv.AddWebSocketService ("/Chat");
-
- // Add the WebSocket service with initializing.
- /*
- httpsv.AddWebSocketService (
- "/Chat",
- () =>
- new Chat ("Anon#") {
- // To send the Sec-WebSocket-Protocol header that has a subprotocol name.
- Protocol = "chat",
- // To ignore the Sec-WebSocket-Extensions header.
- IgnoreExtensions = true,
- // To emit a WebSocket.OnMessage event when receives a ping.
- EmitOnPing = true,
- // To validate the Origin header.
- OriginValidator = val => {
- // Check the value of the Origin header, and return true if valid.
- Uri origin;
- return !val.IsNullOrEmpty ()
- && Uri.TryCreate (val, UriKind.Absolute, out origin)
- && origin.Host == "localhost";
- },
- // To validate the cookies.
- CookiesValidator = (req, res) => {
- // Check the cookies in 'req', and set the cookies to send to
- // the client with 'res' if necessary.
- foreach (Cookie cookie in req) {
- cookie.Expired = true;
- res.Add (cookie);
- }
-
- return true; // If valid.
- }
- }
- );
- */
-
- httpsv.Start ();
- if (httpsv.IsListening) {
- Console.WriteLine ("Listening on port {0}, and providing WebSocket services:", httpsv.Port);
- foreach (var path in httpsv.WebSocketServices.Paths)
- Console.WriteLine ("- {0}", path);
- }
-
- Console.WriteLine ("\nPress Enter key to stop the server...");
- Console.ReadLine ();
-
- httpsv.Stop ();
- }
- }
-}
+using System;
+using System.Configuration;
+using System.Security.Cryptography.X509Certificates;
+using System.Text;
+using WebSocketSharp;
+using WebSocketSharp.Net;
+using WebSocketSharp.Server;
+
+namespace Example3
+{
+ public class Program
+ {
+ public static void Main (string[] args)
+ {
+ // Create a new instance of the HttpServer class.
+ //
+ // If you would like to provide the secure connection, you should
+ // create a new instance with the 'secure' parameter set to true,
+ // or an https scheme HTTP URL.
+
+ var httpsv = new HttpServer (12346);
+ //var httpsv = new HttpServer (5963, true);
+
+ //var httpsv = new HttpServer (System.Net.IPAddress.Any, 4649);
+ //var httpsv = new HttpServer (System.Net.IPAddress.Any, 5963, true);
+
+ //var httpsv = new HttpServer (System.Net.IPAddress.IPv6Any, 4649);
+ //var httpsv = new HttpServer (System.Net.IPAddress.IPv6Any, 5963, true);
+
+ //var httpsv = new HttpServer ("http://0.0.0.0:4649");
+ //var httpsv = new HttpServer ("https://0.0.0.0:5963");
+
+ //var httpsv = new HttpServer ("http://[::0]:4649");
+ //var httpsv = new HttpServer ("https://[::0]:5963");
+
+ //var httpsv = new HttpServer (System.Net.IPAddress.Loopback, 4649);
+ //var httpsv = new HttpServer (System.Net.IPAddress.Loopback, 5963, true);
+
+ //var httpsv = new HttpServer (System.Net.IPAddress.IPv6Loopback, 4649);
+ //var httpsv = new HttpServer (System.Net.IPAddress.IPv6Loopback, 5963, true);
+
+ //var httpsv = new HttpServer ("http://localhost:4649");
+ //var httpsv = new HttpServer ("https://localhost:5963");
+
+ //var httpsv = new HttpServer ("http://127.0.0.1:4649");
+ //var httpsv = new HttpServer ("https://127.0.0.1:5963");
+
+ //var httpsv = new HttpServer ("http://[::1]:4649");
+ //var httpsv = new HttpServer ("https://[::1]:5963");
+#if DEBUG
+ // To change the logging level.
+ httpsv.Log.Level = LogLevel.Trace;
+
+ // To change the wait time for the response to the WebSocket Ping or Close.
+ //httpsv.WaitTime = TimeSpan.FromSeconds (2);
+
+ // Not to remove the inactive WebSocket sessions periodically.
+ //httpsv.KeepClean = false;
+#endif
+ // To provide the secure connection.
+ /*
+ var cert = ConfigurationManager.AppSettings["ServerCertFile"];
+ var passwd = ConfigurationManager.AppSettings["CertFilePassword"];
+ httpsv.SslConfiguration.ServerCertificate = new X509Certificate2 (cert, passwd);
+ */
+
+ // To provide the HTTP Authentication (Basic/Digest).
+ /*
+ httpsv.AuthenticationSchemes = AuthenticationSchemes.Basic;
+ httpsv.Realm = "WebSocket Test";
+ httpsv.UserCredentialsFinder = id => {
+ var name = id.Name;
+
+ // Return user name, password, and roles.
+ return name == "nobita"
+ ? new NetworkCredential (name, "password", "gunfighter")
+ : null; // If the user credentials aren't found.
+ };
+ */
+
+ // To resolve to wait for socket in TIME_WAIT state.
+ //httpsv.ReuseAddress = true;
+
+ // Set the document root path.
+ httpsv.DocumentRootPath = ConfigurationManager.AppSettings["DocumentRootPath"];
+
+ // Set the HTTP GET request event.
+ httpsv.OnGet += (sender, e) => {
+ var req = e.Request;
+ var res = e.Response;
+
+ var path = req.RawUrl;
+ if (path == "/")
+ path += "index.html";
+
+ byte[] contents;
+ if (!e.TryReadFile (path, out contents)) {
+ res.StatusCode = (int) HttpStatusCode.NotFound;
+ return;
+ }
+
+ if (path.EndsWith (".html")) {
+ res.ContentType = "text/html";
+ res.ContentEncoding = Encoding.UTF8;
+ }
+ else if (path.EndsWith (".js")) {
+ res.ContentType = "application/javascript";
+ res.ContentEncoding = Encoding.UTF8;
+ }
+
+ res.ContentLength64 = contents.LongLength;
+ res.Close (contents, true);
+ };
+
+ // Add the WebSocket services.
+ httpsv.AddWebSocketService ("/Echo");
+ httpsv.AddWebSocketService ("/Chat");
+
+ // Add the WebSocket service with initializing.
+ /*
+ httpsv.AddWebSocketService (
+ "/Chat",
+ () =>
+ new Chat ("Anon#") {
+ // To send the Sec-WebSocket-Protocol header that has a subprotocol name.
+ Protocol = "chat",
+ // To ignore the Sec-WebSocket-Extensions header.
+ IgnoreExtensions = true,
+ // To emit a WebSocket.OnMessage event when receives a ping.
+ EmitOnPing = true,
+ // To validate the Origin header.
+ OriginValidator = val => {
+ // Check the value of the Origin header, and return true if valid.
+ Uri origin;
+ return !val.IsNullOrEmpty ()
+ && Uri.TryCreate (val, UriKind.Absolute, out origin)
+ && origin.Host == "localhost";
+ },
+ // To validate the cookies.
+ CookiesValidator = (req, res) => {
+ // Check the cookies in 'req', and set the cookies to send to
+ // the client with 'res' if necessary.
+ foreach (Cookie cookie in req) {
+ cookie.Expired = true;
+ res.Add (cookie);
+ }
+
+ return true; // If valid.
+ }
+ }
+ );
+ */
+
+ httpsv.Start ();
+ if (httpsv.IsListening) {
+ Console.WriteLine ("Listening on port {0}, and providing WebSocket services:", httpsv.Port);
+ foreach (var path in httpsv.WebSocketServices.Paths)
+ Console.WriteLine ("- {0}", path);
+ }
+
+ Console.WriteLine ("\nPress Enter key to stop the server...");
+ Console.ReadLine ();
+
+ httpsv.Stop ();
+ }
+ }
+}
diff --git a/Example3/Public/Js/echotest.js b/Example3/Public/Js/echotest.js
index a356f0d3..6521d337 100644
--- a/Example3/Public/Js/echotest.js
+++ b/Example3/Public/Js/echotest.js
@@ -1,68 +1,68 @@
-/*
- * echotest.js
- *
- * Derived from Echo Test of WebSocket.org (http://www.websocket.org/echo.html).
- *
- * Copyright (c) 2012 Kaazing Corporation.
- */
-
-var url = "ws://localhost:4649/Echo";
-//var url = "wss://localhost:5963/Echo";
-var output;
-
-function init () {
- output = document.getElementById ("output");
- doWebSocket ();
-}
-
-function doWebSocket () {
- websocket = new WebSocket (url);
-
- websocket.onopen = function (e) {
- onOpen (e);
- };
-
- websocket.onmessage = function (e) {
- onMessage (e);
- };
-
- websocket.onerror = function (e) {
- onError (e);
- };
-
- websocket.onclose = function (e) {
- onClose (e);
- };
-}
-
-function onOpen (event) {
- writeToScreen ("CONNECTED");
- send ("WebSocket rocks");
-}
-
-function onMessage (event) {
- writeToScreen ('RESPONSE: ' + event.data + '');
- websocket.close ();
-}
-
-function onError (event) {
- writeToScreen ('ERROR: ' + event.data + '');
-}
-
-function onClose (event) {
- writeToScreen ("DISCONNECTED");
-}
-
-function send (message) {
- writeToScreen ("SENT: " + message);
- websocket.send (message);
-}
-
-function writeToScreen (message) {
- var pre = document.createElement ("p");
- pre.style.wordWrap = "break-word";
- pre.innerHTML = message;
- output.appendChild (pre);
-}
-
+/*
+ * echotest.js
+ *
+ * Derived from Echo Test of WebSocket.org (http://www.websocket.org/echo.html).
+ *
+ * Copyright (c) 2012 Kaazing Corporation.
+ */
+
+var url = "ws://localhost:4649/Echo";
+//var url = "wss://localhost:5963/Echo";
+var output;
+
+function init () {
+ output = document.getElementById ("output");
+ doWebSocket ();
+}
+
+function doWebSocket () {
+ websocket = new WebSocket (url);
+
+ websocket.onopen = function (e) {
+ onOpen (e);
+ };
+
+ websocket.onmessage = function (e) {
+ onMessage (e);
+ };
+
+ websocket.onerror = function (e) {
+ onError (e);
+ };
+
+ websocket.onclose = function (e) {
+ onClose (e);
+ };
+}
+
+function onOpen (event) {
+ writeToScreen ("CONNECTED");
+ send ("WebSocket rocks");
+}
+
+function onMessage (event) {
+ writeToScreen ('RESPONSE: ' + event.data + '');
+ websocket.close ();
+}
+
+function onError (event) {
+ writeToScreen ('ERROR: ' + event.data + '');
+}
+
+function onClose (event) {
+ writeToScreen ("DISCONNECTED");
+}
+
+function send (message) {
+ writeToScreen ("SENT: " + message);
+ websocket.send (message);
+}
+
+function writeToScreen (message) {
+ var pre = document.createElement ("p");
+ pre.style.wordWrap = "break-word";
+ pre.innerHTML = message;
+ output.appendChild (pre);
+}
+
window.addEventListener ("load", init, false);
\ No newline at end of file
diff --git a/Example3/Public/index.html b/Example3/Public/index.html
index 8d6fe43c..c401b7b0 100644
--- a/Example3/Public/index.html
+++ b/Example3/Public/index.html
@@ -1,12 +1,12 @@
-
-
-
- WebSocket Echo Test
-
-
-
- WebSocket Echo Test
-
-
-
+
+
+
+ WebSocket Echo Test
+
+
+
+ WebSocket Echo Test
+
+
+
diff --git a/Example3/packages.config b/Example3/packages.config
new file mode 100644
index 00000000..451b858a
--- /dev/null
+++ b/Example3/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/LICENSE.txt b/LICENSE.txt
index 4d4e5632..586705e2 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,21 +1,21 @@
-The MIT License (MIT)
-
-Copyright (c) 2010-2021 sta.blockhead
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+The MIT License (MIT)
+
+Copyright (c) 2010-2021 sta.blockhead
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/README.md b/README.md
index e7049b22..fd18bde8 100644
--- a/README.md
+++ b/README.md
@@ -1,709 +1,709 @@
-
-
-## Welcome to websocket-sharp! ##
-
-websocket-sharp supports:
-
-- [RFC 6455](#supported-websocket-specifications)
-- [WebSocket Client](#websocket-client) and [Server](#websocket-server)
-- [Per-message Compression](#per-message-compression) extension
-- [Secure Connection](#secure-connection)
-- [HTTP Authentication](#http-authentication)
-- [Query string, Origin header, and Cookies](#query-string-origin-header-and-cookies)
-- [Connecting through the HTTP proxy server](#connecting-through-the-http-proxy-server)
-- .NET Framework **3.5** or later (includes compatible environment such as [Mono])
-
-## Branches ##
-
-- [master] for production releases.
-- [hybi-00] for older [draft-ietf-hybi-thewebsocketprotocol-00]. No longer maintained.
-- [draft75] for even more old [draft-hixie-thewebsocketprotocol-75]. No longer maintained.
-
-## Build ##
-
-websocket-sharp is built as a single assembly, **websocket-sharp.dll**.
-
-websocket-sharp is developed with [MonoDevelop]. So a simple way to build is to open **websocket-sharp.sln** and run build for **websocket-sharp project** with any of the build configurations (e.g. `Debug`) in MonoDevelop.
-
-## Install ##
-
-### Self Build ###
-
-You should add your websocket-sharp.dll (e.g. `/path/to/websocket-sharp/bin/Debug/websocket-sharp.dll`) to the library references of your project.
-
-If you would like to use that dll in your [Unity] project, you should add it to any folder of your project (e.g. `Assets/Plugins`) in the **Unity Editor**.
-
-### NuGet Gallery ###
-
-websocket-sharp is available on the [NuGet Gallery], as still a **prerelease** version.
-
-- [NuGet Gallery: websocket-sharp]
-
-You can add websocket-sharp to your project with the NuGet Package Manager, by using the following command in the Package Manager Console.
-
- PM> Install-Package WebSocketSharp -Pre
-
-### Unity Asset Store ###
-
-websocket-sharp is available on the Unity Asset Store (Sorry, Not available now).
-
-- [WebSocket-Sharp for Unity]
-
-It works with **Unity Free**, but there are some limitations:
-
-- [Security Sandbox of the Webplayer] (The server is not available in Web Player)
-- [WebGL Networking] (Not available in WebGL)
-- Incompatible platform (Not available for such UWP)
-- Lack of dll for the System.IO.Compression (The compression extension is not available on Windows)
-- .NET Socket Support for iOS/Android (iOS/Android Pro is required if your Unity is earlier than Unity 5)
-- .NET API 2.0 compatibility level for iOS/Android
-
-.NET API 2.0 compatibility level for iOS/Android may require to fix lack of some features for later than .NET Framework 2.0, such as the `System.Func<...>` delegates (so i have added them in the asset package).
-
-And it is priced at **US$15**. I believe your $15 makes this project more better, **Thank you!**
-
-## Usage ##
-
-### WebSocket Client ###
-
-```csharp
-using System;
-using WebSocketSharp;
-
-namespace Example
-{
- public class Program
- {
- public static void Main (string[] args)
- {
- using (var ws = new WebSocket ("ws://dragonsnest.far/Laputa")) {
- ws.OnMessage += (sender, e) =>
- Console.WriteLine ("Laputa says: " + e.Data);
-
- ws.Connect ();
- ws.Send ("BALUS");
- Console.ReadKey (true);
- }
- }
- }
-}
-```
-
-#### Step 1 ####
-
-Required namespace.
-
-```csharp
-using WebSocketSharp;
-```
-
-The `WebSocket` class exists in the `WebSocketSharp` namespace.
-
-#### Step 2 ####
-
-Creating a new instance of the `WebSocket` class with the WebSocket URL to connect.
-
-```csharp
-var ws = new WebSocket ("ws://example.com");
-```
-
-The `WebSocket` class inherits the `System.IDisposable` interface, so you can create it with the `using` statement.
-
-```csharp
-using (var ws = new WebSocket ("ws://example.com")) {
- ...
-}
-```
-
-This will **close** the WebSocket connection with status code `1001` (going away) when the control leaves the `using` block.
-
-#### Step 3 ####
-
-Setting the `WebSocket` events.
-
-##### WebSocket.OnOpen Event #####
-
-This event occurs when the WebSocket connection has been established.
-
-```csharp
-ws.OnOpen += (sender, e) => {
- ...
- };
-```
-
-`System.EventArgs.Empty` is passed as `e`, so you do not need to use it.
-
-##### WebSocket.OnMessage Event #####
-
-This event occurs when the `WebSocket` receives a message.
-
-```csharp
-ws.OnMessage += (sender, e) => {
- ...
- };
-```
-
-A `WebSocketSharp.MessageEventArgs` instance is passed as `e`.
-
-If you would like to get the message data, you should access `e.Data` or `e.RawData` property.
-
-`e.Data` property returns a `string`, so it is mainly used to get the **text** message data.
-
-`e.RawData` property returns a `byte[]`, so it is mainly used to get the **binary** message data.
-
-```csharp
-if (e.IsText) {
- // Do something with e.Data.
- ...
-
- return;
-}
-
-if (e.IsBinary) {
- // Do something with e.RawData.
- ...
-
- return;
-}
-```
-
-And if you would like to notify that a **ping** has been received, via this event, you should set the `WebSocket.EmitOnPing` property to `true`.
-
-```csharp
-ws.EmitOnPing = true;
-ws.OnMessage += (sender, e) => {
- if (e.IsPing) {
- // Do something to notify that a ping has been received.
- ...
-
- return;
- }
- };
-```
-
-##### WebSocket.OnError Event #####
-
-This event occurs when the `WebSocket` gets an error.
-
-```csharp
-ws.OnError += (sender, e) => {
- ...
- };
-```
-
-A `WebSocketSharp.ErrorEventArgs` instance is passed as `e`.
-
-If you would like to get the error message, you should access `e.Message` property.
-
-`e.Message` property returns a `string` that represents the error message.
-
-And `e.Exception` property returns a `System.Exception` instance that represents the cause of the error if it is due to an exception.
-
-##### WebSocket.OnClose Event #####
-
-This event occurs when the WebSocket connection has been closed.
-
-```csharp
-ws.OnClose += (sender, e) => {
- ...
- };
-```
-
-A `WebSocketSharp.CloseEventArgs` instance is passed as `e`.
-
-If you would like to get the reason for the close, you should access `e.Code` or `e.Reason` property.
-
-`e.Code` property returns a `ushort` that represents the status code for the close.
-
-`e.Reason` property returns a `string` that represents the reason for the close.
-
-#### Step 4 ####
-
-Connecting to the WebSocket server.
-
-```csharp
-ws.Connect ();
-```
-
-If you would like to connect to the server asynchronously, you should use the `WebSocket.ConnectAsync ()` method.
-
-#### Step 5 ####
-
-Sending data to the WebSocket server.
-
-```csharp
-ws.Send (data);
-```
-
-The `WebSocket.Send` method is overloaded.
-
-You can use the `WebSocket.Send (string)`, `WebSocket.Send (byte[])`, or `WebSocket.Send (System.IO.FileInfo)` method to send the data.
-
-If you would like to send the data asynchronously, you should use the `WebSocket.SendAsync` method.
-
-```csharp
-ws.SendAsync (data, completed);
-```
-
-And also if you would like to do something when the send is complete, you should set `completed` to any `Action` delegate.
-
-#### Step 6 ####
-
-Closing the WebSocket connection.
-
-```csharp
-ws.Close (code, reason);
-```
-
-If you would like to close the connection explicitly, you should use the `WebSocket.Close` method.
-
-The `WebSocket.Close` method is overloaded.
-
-You can use the `WebSocket.Close ()`, `WebSocket.Close (ushort)`, `WebSocket.Close (WebSocketSharp.CloseStatusCode)`, `WebSocket.Close (ushort, string)`, or `WebSocket.Close (WebSocketSharp.CloseStatusCode, string)` method to close the connection.
-
-If you would like to close the connection asynchronously, you should use the `WebSocket.CloseAsync` method.
-
-### WebSocket Server ###
-
-```csharp
-using System;
-using WebSocketSharp;
-using WebSocketSharp.Server;
-
-namespace Example
-{
- public class Laputa : WebSocketBehavior
- {
- protected override void OnMessage (MessageEventArgs e)
- {
- var msg = e.Data == "BALUS"
- ? "I've been balused already..."
- : "I'm not available now.";
-
- Send (msg);
- }
- }
-
- public class Program
- {
- public static void Main (string[] args)
- {
- var wssv = new WebSocketServer ("ws://dragonsnest.far");
- wssv.AddWebSocketService ("/Laputa");
- wssv.Start ();
- Console.ReadKey (true);
- wssv.Stop ();
- }
- }
-}
-```
-
-#### Step 1 ####
-
-Required namespace.
-
-```csharp
-using WebSocketSharp.Server;
-```
-
-The `WebSocketBehavior` and `WebSocketServer` classes exist in the `WebSocketSharp.Server` namespace.
-
-#### Step 2 ####
-
-Creating the class that inherits the `WebSocketBehavior` class.
-
-For example, if you would like to provide an echo service,
-
-```csharp
-using System;
-using WebSocketSharp;
-using WebSocketSharp.Server;
-
-public class Echo : WebSocketBehavior
-{
- protected override void OnMessage (MessageEventArgs e)
- {
- Send (e.Data);
- }
-}
-```
-
-And if you would like to provide a chat service,
-
-```csharp
-using System;
-using WebSocketSharp;
-using WebSocketSharp.Server;
-
-public class Chat : WebSocketBehavior
-{
- private string _suffix;
-
- public Chat ()
- : this (null)
- {
- }
-
- public Chat (string suffix)
- {
- _suffix = suffix ?? String.Empty;
- }
-
- protected override void OnMessage (MessageEventArgs e)
- {
- Sessions.Broadcast (e.Data + _suffix);
- }
-}
-```
-
-You can define the behavior of any WebSocket service by creating the class that inherits the `WebSocketBehavior` class.
-
-If you override the `WebSocketBehavior.OnMessage (MessageEventArgs)` method, it will be called when the `WebSocket` used in a session in the service receives a message.
-
-And if you override the `WebSocketBehavior.OnOpen ()`, `WebSocketBehavior.OnError (ErrorEventArgs)`, and `WebSocketBehavior.OnClose (CloseEventArgs)` methods, each of them will be called when each of the `WebSocket` events (`OnOpen`, `OnError`, and `OnClose`) occurs.
-
-The `WebSocketBehavior.Send` method can send data to the client on a session in the service.
-
-If you would like to get the sessions in the service, you should access the `WebSocketBehavior.Sessions` property (returns a `WebSocketSharp.Server.WebSocketSessionManager`).
-
-The `WebSocketBehavior.Sessions.Broadcast` method can send data to every client in the service.
-
-#### Step 3 ####
-
-Creating a new instance of the `WebSocketServer` class.
-
-```csharp
-var wssv = new WebSocketServer (4649);
-wssv.AddWebSocketService ("/Echo");
-wssv.AddWebSocketService ("/Chat");
-wssv.AddWebSocketService ("/ChatWithNyan", () => new Chat (" Nyan!"));
-```
-
-You can add any WebSocket service to your `WebSocketServer` with the specified behavior and absolute path to the service, by using the `WebSocketServer.AddWebSocketService (string)` or `WebSocketServer.AddWebSocketService (string, Func)` method.
-
-The type of `TBehaviorWithNew` must inherit the `WebSocketBehavior` class, and must have a public parameterless constructor.
-
-The type of `TBehavior` must inherit the `WebSocketBehavior` class.
-
-So you can use a class in the above Step 2 to add the service.
-
-If you create a new instance of the `WebSocketServer` class without a port number, it sets the port number to **80**. So it is necessary to run with root permission.
-
- $ sudo mono example2.exe
-
-#### Step 4 ####
-
-Starting the WebSocket server.
-
-```csharp
-wssv.Start ();
-```
-
-#### Step 5 ####
-
-Stopping the WebSocket server.
-
-```csharp
-wssv.Stop (code, reason);
-```
-
-The `WebSocketServer.Stop` method is overloaded.
-
-You can use the `WebSocketServer.Stop ()`, `WebSocketServer.Stop (ushort, string)`, or `WebSocketServer.Stop (WebSocketSharp.CloseStatusCode, string)` method to stop the server.
-
-### HTTP Server with the WebSocket ###
-
-I have modified the `System.Net.HttpListener`, `System.Net.HttpListenerContext`, and some other classes from **[Mono]** to create an HTTP server that allows to accept the WebSocket handshake requests.
-
-So websocket-sharp provides the `WebSocketSharp.Server.HttpServer` class.
-
-You can add any WebSocket service to your `HttpServer` with the specified behavior and path to the service, by using the `HttpServer.AddWebSocketService (string)` or `HttpServer.AddWebSocketService (string, Func)` method.
-
-```csharp
-var httpsv = new HttpServer (4649);
-httpsv.AddWebSocketService ("/Echo");
-httpsv.AddWebSocketService ("/Chat");
-httpsv.AddWebSocketService ("/ChatWithNyan", () => new Chat (" Nyan!"));
-```
-
-For more information, would you see **[Example3]**?
-
-### WebSocket Extensions ###
-
-#### Per-message Compression ####
-
-websocket-sharp supports the [Per-message Compression][compression] extension (but does not support it with the [context take over]).
-
-As a WebSocket client, if you would like to enable this extension, you should set the `WebSocket.Compression` property to a compression method before calling the connect method.
-
-```csharp
-ws.Compression = CompressionMethod.Deflate;
-```
-
-And then the client will send the following header in the handshake request to the server.
-
- Sec-WebSocket-Extensions: permessage-deflate; server_no_context_takeover; client_no_context_takeover
-
-If the server supports this extension, it will return the same header which has the corresponding value.
-
-So eventually this extension will be available when the client receives the header in the handshake response.
-
-#### Ignoring the extensions ####
-
-As a WebSocket server, if you would like to ignore the extensions requested from a client, you should set the `WebSocketBehavior.IgnoreExtensions` property to `true` in your `WebSocketBehavior` constructor or initializing it, such as the following.
-
-```csharp
-wssv.AddWebSocketService (
- "/Chat",
- () =>
- new Chat () {
- // To ignore the extensions requested from a client.
- IgnoreExtensions = true
- }
-);
-```
-
-If it is set to `true`, the service will not return the Sec-WebSocket-Extensions header in its handshake response.
-
-I think this is useful when you get something error in connecting the server and exclude the extensions as a cause of the error.
-
-### Secure Connection ###
-
-websocket-sharp supports the secure connection with **SSL/TLS**.
-
-As a WebSocket client, you should create a new instance of the `WebSocket` class with a **wss** scheme WebSocket URL.
-
-```csharp
-var ws = new WebSocket ("wss://example.com");
-```
-
-If you would like to set a custom validation for the server certificate, you should set the `WebSocket.SslConfiguration.ServerCertificateValidationCallback` property to a callback for it.
-
-```csharp
-ws.SslConfiguration.ServerCertificateValidationCallback =
- (sender, certificate, chain, sslPolicyErrors) => {
- // Do something to validate the server certificate.
- ...
-
- return true; // If the server certificate is valid.
- };
-```
-
-The default callback always returns `true`.
-
-As a WebSocket server, you should create a new instance of the `WebSocketServer` or `HttpServer` class with some settings for the secure connection, such as the following.
-
-```csharp
-var wssv = new WebSocketServer (5963, true);
-wssv.SslConfiguration.ServerCertificate =
- new X509Certificate2 ("/path/to/cert.pfx", "password for cert.pfx");
-```
-
-### HTTP Authentication ###
-
-websocket-sharp supports the [HTTP Authentication (Basic/Digest)][rfc2617].
-
-As a WebSocket client, you should set a pair of user name and password for the HTTP authentication, by using the `WebSocket.SetCredentials (string, string, bool)` method before calling the connect method.
-
-```csharp
-ws.SetCredentials ("nobita", "password", preAuth);
-```
-
-If `preAuth` is `true`, the client will send the credentials for the Basic authentication in the first handshake request to the server.
-
-Otherwise, it will send the credentials for either the Basic or Digest (determined by the unauthorized response to the first handshake request) authentication in the second handshake request to the server.
-
-As a WebSocket server, you should set an HTTP authentication scheme, a realm, and any function to find the user credentials before calling the start method, such as the following.
-
-```csharp
-wssv.AuthenticationSchemes = AuthenticationSchemes.Basic;
-wssv.Realm = "WebSocket Test";
-wssv.UserCredentialsFinder = id => {
- var name = id.Name;
-
- // Return user name, password, and roles.
- return name == "nobita"
- ? new NetworkCredential (name, "password", "gunfighter")
- : null; // If the user credentials are not found.
- };
-```
-
-If you would like to provide the Digest authentication, you should set such as the following.
-
-```csharp
-wssv.AuthenticationSchemes = AuthenticationSchemes.Digest;
-```
-
-### Query string, Origin header, and Cookies ###
-
-As a WebSocket client, if you would like to send the query string in the handshake request, you should create a new instance of the `WebSocket` class with a WebSocket URL that includes the [Query] string parameters.
-
-```csharp
-var ws = new WebSocket ("ws://example.com/?name=nobita");
-```
-
-If you would like to send the Origin header in the handshake request, you should set the `WebSocket.Origin` property to an allowable value as the [Origin] header before calling the connect method.
-
-```csharp
-ws.Origin = "http://example.com";
-```
-
-And if you would like to send the cookies in the handshake request, you should set any cookie by using the `WebSocket.SetCookie (WebSocketSharp.Net.Cookie)` method before calling the connect method.
-
-```csharp
-ws.SetCookie (new Cookie ("name", "nobita"));
-```
-
-As a WebSocket server, if you would like to get the query string included in a handshake request, you should access the `WebSocketBehavior.Context.QueryString` property, such as the following.
-
-```csharp
-public class Chat : WebSocketBehavior
-{
- private string _name;
- ...
-
- protected override void OnOpen ()
- {
- _name = Context.QueryString["name"];
- }
-
- ...
-}
-```
-
-If you would like to get the value of the Origin header included in a handshake request, you should access the `WebSocketBehavior.Context.Origin` property.
-
-If you would like to get the cookies included in a handshake request, you should access the `WebSocketBehavior.Context.CookieCollection` property.
-
-And if you would like to validate the Origin header, cookies, or both, you should set each validation for it with your `WebSocketBehavior`, for example, by using the `WebSocketServer.AddWebSocketService (string, Func)` method with initializing, such as the following.
-
-```csharp
-wssv.AddWebSocketService (
- "/Chat",
- () =>
- new Chat () {
- OriginValidator = val => {
- // Check the value of the Origin header, and return true if valid.
- Uri origin;
- return !val.IsNullOrEmpty ()
- && Uri.TryCreate (val, UriKind.Absolute, out origin)
- && origin.Host == "example.com";
- },
- CookiesValidator = (req, res) => {
- // Check the cookies in 'req', and set the cookies to send to
- // the client with 'res' if necessary.
- foreach (Cookie cookie in req) {
- cookie.Expired = true;
- res.Add (cookie);
- }
-
- return true; // If valid.
- }
- }
-);
-```
-
-### Connecting through the HTTP proxy server ###
-
-websocket-sharp supports to connect through the HTTP proxy server.
-
-If you would like to connect to a WebSocket server through the HTTP proxy server, you should set the proxy server URL, and if necessary, a pair of user name and password for the proxy server authentication (Basic/Digest), by using the `WebSocket.SetProxy (string, string, string)` method before calling the connect method.
-
-```csharp
-var ws = new WebSocket ("ws://example.com");
-ws.SetProxy ("http://localhost:3128", "nobita", "password");
-```
-
-I have tested this with **[Squid]**. It is necessary to disable the following option in **squid.conf** (e.g. `/etc/squid/squid.conf`).
-
-```
-# Deny CONNECT to other than SSL ports
-#http_access deny CONNECT !SSL_ports
-```
-
-### Logging ###
-
-The `WebSocket` class has the own logging function.
-
-You can use it with the `WebSocket.Log` property (returns a `WebSocketSharp.Logger`).
-
-So if you would like to change the current logging level (`WebSocketSharp.LogLevel.Error` as the default), you should set the `WebSocket.Log.Level` property to any of the `LogLevel` enum values.
-
-```csharp
-ws.Log.Level = LogLevel.Debug;
-```
-
-The above means a log with lower than `LogLevel.Debug` cannot be outputted.
-
-And if you would like to output a log, you should use any of the output methods. The following outputs a log with `LogLevel.Debug`.
-
-```csharp
-ws.Log.Debug ("This is a debug message.");
-```
-
-The `WebSocketServer` and `HttpServer` classes have the same logging function.
-
-## Examples ##
-
-Examples using websocket-sharp.
-
-### Example ###
-
-[Example] connects to the [Echo server].
-
-### Example2 ###
-
-[Example2] starts a WebSocket server.
-
-### Example3 ###
-
-[Example3] starts an HTTP server that allows to accept the WebSocket handshake requests.
-
-Would you access to [http://localhost:4649](http://localhost:4649) to do **WebSocket Echo Test** with your web browser while Example3 is running?
-
-## Supported WebSocket Specifications ##
-
-websocket-sharp supports **RFC 6455**, and it is based on the following references:
-
-- [The WebSocket Protocol][rfc6455]
-- [The WebSocket API][api]
-- [Compression Extensions for WebSocket][compression]
-
-Thanks for translating to japanese.
-
-- [The WebSocket Protocol 日本語訳][rfc6455_ja]
-- [The WebSocket API 日本語訳][api_ja]
-
-## License ##
-
-websocket-sharp is provided under [The MIT License].
-
-
-[Echo server]: http://www.websocket.org/echo.html
-[Example]: https://github.com/sta/websocket-sharp/tree/master/Example
-[Example2]: https://github.com/sta/websocket-sharp/tree/master/Example2
-[Example3]: https://github.com/sta/websocket-sharp/tree/master/Example3
-[Mono]: http://www.mono-project.com
-[MonoDevelop]: http://monodevelop.com
-[NuGet Gallery]: http://www.nuget.org
-[NuGet Gallery: websocket-sharp]: http://www.nuget.org/packages/WebSocketSharp
-[Origin]: http://tools.ietf.org/html/rfc6454#section-7
-[Query]: http://tools.ietf.org/html/rfc3986#section-3.4
-[Security Sandbox of the Webplayer]: http://docs.unity3d.com/Manual/SecuritySandbox.html
-[Squid]: http://www.squid-cache.org
-[The MIT License]: https://raw.github.com/sta/websocket-sharp/master/LICENSE.txt
-[Unity]: http://unity3d.com
-[WebGL Networking]: http://docs.unity3d.com/Manual/webgl-networking.html
-[WebSocket-Sharp for Unity]: http://u3d.as/content/sta-blockhead/websocket-sharp-for-unity
-[api]: http://www.w3.org/TR/websockets
-[api_ja]: http://www.hcn.zaq.ne.jp/___/WEB/WebSocket-ja.html
-[compression]: http://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-19
-[context take over]: http://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-19#section-8.1.1
-[draft-hixie-thewebsocketprotocol-75]: http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75
-[draft-ietf-hybi-thewebsocketprotocol-00]: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-00
-[draft75]: https://github.com/sta/websocket-sharp/tree/draft75
-[hybi-00]: https://github.com/sta/websocket-sharp/tree/hybi-00
-[master]: https://github.com/sta/websocket-sharp/tree/master
-[rfc2617]: http://tools.ietf.org/html/rfc2617
-[rfc6455]: http://tools.ietf.org/html/rfc6455
-[rfc6455_ja]: http://www.hcn.zaq.ne.jp/___/WEB/RFC6455-ja.html
+
+
+## Welcome to websocket-sharp! ##
+
+websocket-sharp supports:
+
+- [RFC 6455](#supported-websocket-specifications)
+- [WebSocket Client](#websocket-client) and [Server](#websocket-server)
+- [Per-message Compression](#per-message-compression) extension
+- [Secure Connection](#secure-connection)
+- [HTTP Authentication](#http-authentication)
+- [Query string, Origin header, and Cookies](#query-string-origin-header-and-cookies)
+- [Connecting through the HTTP proxy server](#connecting-through-the-http-proxy-server)
+- .NET Framework **3.5** or later (includes compatible environment such as [Mono])
+
+## Branches ##
+
+- [master] for production releases.
+- [hybi-00] for older [draft-ietf-hybi-thewebsocketprotocol-00]. No longer maintained.
+- [draft75] for even more old [draft-hixie-thewebsocketprotocol-75]. No longer maintained.
+
+## Build ##
+
+websocket-sharp is built as a single assembly, **websocket-sharp.dll**.
+
+websocket-sharp is developed with [MonoDevelop]. So a simple way to build is to open **websocket-sharp.sln** and run build for **websocket-sharp project** with any of the build configurations (e.g. `Debug`) in MonoDevelop.
+
+## Install ##
+
+### Self Build ###
+
+You should add your websocket-sharp.dll (e.g. `/path/to/websocket-sharp/bin/Debug/websocket-sharp.dll`) to the library references of your project.
+
+If you would like to use that dll in your [Unity] project, you should add it to any folder of your project (e.g. `Assets/Plugins`) in the **Unity Editor**.
+
+### NuGet Gallery ###
+
+websocket-sharp is available on the [NuGet Gallery], as still a **prerelease** version.
+
+- [NuGet Gallery: websocket-sharp]
+
+You can add websocket-sharp to your project with the NuGet Package Manager, by using the following command in the Package Manager Console.
+
+ PM> Install-Package WebSocketSharp -Pre
+
+### Unity Asset Store ###
+
+websocket-sharp is available on the Unity Asset Store (Sorry, Not available now).
+
+- [WebSocket-Sharp for Unity]
+
+It works with **Unity Free**, but there are some limitations:
+
+- [Security Sandbox of the Webplayer] (The server is not available in Web Player)
+- [WebGL Networking] (Not available in WebGL)
+- Incompatible platform (Not available for such UWP)
+- Lack of dll for the System.IO.Compression (The compression extension is not available on Windows)
+- .NET Socket Support for iOS/Android (iOS/Android Pro is required if your Unity is earlier than Unity 5)
+- .NET API 2.0 compatibility level for iOS/Android
+
+.NET API 2.0 compatibility level for iOS/Android may require to fix lack of some features for later than .NET Framework 2.0, such as the `System.Func<...>` delegates (so i have added them in the asset package).
+
+And it is priced at **US$15**. I believe your $15 makes this project more better, **Thank you!**
+
+## Usage ##
+
+### WebSocket Client ###
+
+```csharp
+using System;
+using WebSocketSharp;
+
+namespace Example
+{
+ public class Program
+ {
+ public static void Main (string[] args)
+ {
+ using (var ws = new WebSocket ("ws://dragonsnest.far/Laputa")) {
+ ws.OnMessage += (sender, e) =>
+ Console.WriteLine ("Laputa says: " + e.Data);
+
+ ws.Connect ();
+ ws.Send ("BALUS");
+ Console.ReadKey (true);
+ }
+ }
+ }
+}
+```
+
+#### Step 1 ####
+
+Required namespace.
+
+```csharp
+using WebSocketSharp;
+```
+
+The `WebSocket` class exists in the `WebSocketSharp` namespace.
+
+#### Step 2 ####
+
+Creating a new instance of the `WebSocket` class with the WebSocket URL to connect.
+
+```csharp
+var ws = new WebSocket ("ws://example.com");
+```
+
+The `WebSocket` class inherits the `System.IDisposable` interface, so you can create it with the `using` statement.
+
+```csharp
+using (var ws = new WebSocket ("ws://example.com")) {
+ ...
+}
+```
+
+This will **close** the WebSocket connection with status code `1001` (going away) when the control leaves the `using` block.
+
+#### Step 3 ####
+
+Setting the `WebSocket` events.
+
+##### WebSocket.OnOpen Event #####
+
+This event occurs when the WebSocket connection has been established.
+
+```csharp
+ws.OnOpen += (sender, e) => {
+ ...
+ };
+```
+
+`System.EventArgs.Empty` is passed as `e`, so you do not need to use it.
+
+##### WebSocket.OnMessage Event #####
+
+This event occurs when the `WebSocket` receives a message.
+
+```csharp
+ws.OnMessage += (sender, e) => {
+ ...
+ };
+```
+
+A `WebSocketSharp.MessageEventArgs` instance is passed as `e`.
+
+If you would like to get the message data, you should access `e.Data` or `e.RawData` property.
+
+`e.Data` property returns a `string`, so it is mainly used to get the **text** message data.
+
+`e.RawData` property returns a `byte[]`, so it is mainly used to get the **binary** message data.
+
+```csharp
+if (e.IsText) {
+ // Do something with e.Data.
+ ...
+
+ return;
+}
+
+if (e.IsBinary) {
+ // Do something with e.RawData.
+ ...
+
+ return;
+}
+```
+
+And if you would like to notify that a **ping** has been received, via this event, you should set the `WebSocket.EmitOnPing` property to `true`.
+
+```csharp
+ws.EmitOnPing = true;
+ws.OnMessage += (sender, e) => {
+ if (e.IsPing) {
+ // Do something to notify that a ping has been received.
+ ...
+
+ return;
+ }
+ };
+```
+
+##### WebSocket.OnError Event #####
+
+This event occurs when the `WebSocket` gets an error.
+
+```csharp
+ws.OnError += (sender, e) => {
+ ...
+ };
+```
+
+A `WebSocketSharp.ErrorEventArgs` instance is passed as `e`.
+
+If you would like to get the error message, you should access `e.Message` property.
+
+`e.Message` property returns a `string` that represents the error message.
+
+And `e.Exception` property returns a `System.Exception` instance that represents the cause of the error if it is due to an exception.
+
+##### WebSocket.OnClose Event #####
+
+This event occurs when the WebSocket connection has been closed.
+
+```csharp
+ws.OnClose += (sender, e) => {
+ ...
+ };
+```
+
+A `WebSocketSharp.CloseEventArgs` instance is passed as `e`.
+
+If you would like to get the reason for the close, you should access `e.Code` or `e.Reason` property.
+
+`e.Code` property returns a `ushort` that represents the status code for the close.
+
+`e.Reason` property returns a `string` that represents the reason for the close.
+
+#### Step 4 ####
+
+Connecting to the WebSocket server.
+
+```csharp
+ws.Connect ();
+```
+
+If you would like to connect to the server asynchronously, you should use the `WebSocket.ConnectAsync ()` method.
+
+#### Step 5 ####
+
+Sending data to the WebSocket server.
+
+```csharp
+ws.Send (data);
+```
+
+The `WebSocket.Send` method is overloaded.
+
+You can use the `WebSocket.Send (string)`, `WebSocket.Send (byte[])`, or `WebSocket.Send (System.IO.FileInfo)` method to send the data.
+
+If you would like to send the data asynchronously, you should use the `WebSocket.SendAsync` method.
+
+```csharp
+ws.SendAsync (data, completed);
+```
+
+And also if you would like to do something when the send is complete, you should set `completed` to any `Action` delegate.
+
+#### Step 6 ####
+
+Closing the WebSocket connection.
+
+```csharp
+ws.Close (code, reason);
+```
+
+If you would like to close the connection explicitly, you should use the `WebSocket.Close` method.
+
+The `WebSocket.Close` method is overloaded.
+
+You can use the `WebSocket.Close ()`, `WebSocket.Close (ushort)`, `WebSocket.Close (WebSocketSharp.CloseStatusCode)`, `WebSocket.Close (ushort, string)`, or `WebSocket.Close (WebSocketSharp.CloseStatusCode, string)` method to close the connection.
+
+If you would like to close the connection asynchronously, you should use the `WebSocket.CloseAsync` method.
+
+### WebSocket Server ###
+
+```csharp
+using System;
+using WebSocketSharp;
+using WebSocketSharp.Server;
+
+namespace Example
+{
+ public class Laputa : WebSocketBehavior
+ {
+ protected override void OnMessage (MessageEventArgs e)
+ {
+ var msg = e.Data == "BALUS"
+ ? "I've been balused already..."
+ : "I'm not available now.";
+
+ Send (msg);
+ }
+ }
+
+ public class Program
+ {
+ public static void Main (string[] args)
+ {
+ var wssv = new WebSocketServer ("ws://dragonsnest.far");
+ wssv.AddWebSocketService ("/Laputa");
+ wssv.Start ();
+ Console.ReadKey (true);
+ wssv.Stop ();
+ }
+ }
+}
+```
+
+#### Step 1 ####
+
+Required namespace.
+
+```csharp
+using WebSocketSharp.Server;
+```
+
+The `WebSocketBehavior` and `WebSocketServer` classes exist in the `WebSocketSharp.Server` namespace.
+
+#### Step 2 ####
+
+Creating the class that inherits the `WebSocketBehavior` class.
+
+For example, if you would like to provide an echo service,
+
+```csharp
+using System;
+using WebSocketSharp;
+using WebSocketSharp.Server;
+
+public class Echo : WebSocketBehavior
+{
+ protected override void OnMessage (MessageEventArgs e)
+ {
+ Send (e.Data);
+ }
+}
+```
+
+And if you would like to provide a chat service,
+
+```csharp
+using System;
+using WebSocketSharp;
+using WebSocketSharp.Server;
+
+public class Chat : WebSocketBehavior
+{
+ private string _suffix;
+
+ public Chat ()
+ : this (null)
+ {
+ }
+
+ public Chat (string suffix)
+ {
+ _suffix = suffix ?? String.Empty;
+ }
+
+ protected override void OnMessage (MessageEventArgs e)
+ {
+ Sessions.Broadcast (e.Data + _suffix);
+ }
+}
+```
+
+You can define the behavior of any WebSocket service by creating the class that inherits the `WebSocketBehavior` class.
+
+If you override the `WebSocketBehavior.OnMessage (MessageEventArgs)` method, it will be called when the `WebSocket` used in a session in the service receives a message.
+
+And if you override the `WebSocketBehavior.OnOpen ()`, `WebSocketBehavior.OnError (ErrorEventArgs)`, and `WebSocketBehavior.OnClose (CloseEventArgs)` methods, each of them will be called when each of the `WebSocket` events (`OnOpen`, `OnError`, and `OnClose`) occurs.
+
+The `WebSocketBehavior.Send` method can send data to the client on a session in the service.
+
+If you would like to get the sessions in the service, you should access the `WebSocketBehavior.Sessions` property (returns a `WebSocketSharp.Server.WebSocketSessionManager`).
+
+The `WebSocketBehavior.Sessions.Broadcast` method can send data to every client in the service.
+
+#### Step 3 ####
+
+Creating a new instance of the `WebSocketServer` class.
+
+```csharp
+var wssv = new WebSocketServer (4649);
+wssv.AddWebSocketService ("/Echo");
+wssv.AddWebSocketService ("/Chat");
+wssv.AddWebSocketService ("/ChatWithNyan", () => new Chat (" Nyan!"));
+```
+
+You can add any WebSocket service to your `WebSocketServer` with the specified behavior and absolute path to the service, by using the `WebSocketServer.AddWebSocketService (string)` or `WebSocketServer.AddWebSocketService (string, Func)` method.
+
+The type of `TBehaviorWithNew` must inherit the `WebSocketBehavior` class, and must have a public parameterless constructor.
+
+The type of `TBehavior` must inherit the `WebSocketBehavior` class.
+
+So you can use a class in the above Step 2 to add the service.
+
+If you create a new instance of the `WebSocketServer` class without a port number, it sets the port number to **80**. So it is necessary to run with root permission.
+
+ $ sudo mono example2.exe
+
+#### Step 4 ####
+
+Starting the WebSocket server.
+
+```csharp
+wssv.Start ();
+```
+
+#### Step 5 ####
+
+Stopping the WebSocket server.
+
+```csharp
+wssv.Stop (code, reason);
+```
+
+The `WebSocketServer.Stop` method is overloaded.
+
+You can use the `WebSocketServer.Stop ()`, `WebSocketServer.Stop (ushort, string)`, or `WebSocketServer.Stop (WebSocketSharp.CloseStatusCode, string)` method to stop the server.
+
+### HTTP Server with the WebSocket ###
+
+I have modified the `System.Net.HttpListener`, `System.Net.HttpListenerContext`, and some other classes from **[Mono]** to create an HTTP server that allows to accept the WebSocket handshake requests.
+
+So websocket-sharp provides the `WebSocketSharp.Server.HttpServer` class.
+
+You can add any WebSocket service to your `HttpServer` with the specified behavior and path to the service, by using the `HttpServer.AddWebSocketService (string)` or `HttpServer.AddWebSocketService (string, Func)` method.
+
+```csharp
+var httpsv = new HttpServer (4649);
+httpsv.AddWebSocketService ("/Echo");
+httpsv.AddWebSocketService ("/Chat");
+httpsv.AddWebSocketService ("/ChatWithNyan", () => new Chat (" Nyan!"));
+```
+
+For more information, would you see **[Example3]**?
+
+### WebSocket Extensions ###
+
+#### Per-message Compression ####
+
+websocket-sharp supports the [Per-message Compression][compression] extension (but does not support it with the [context take over]).
+
+As a WebSocket client, if you would like to enable this extension, you should set the `WebSocket.Compression` property to a compression method before calling the connect method.
+
+```csharp
+ws.Compression = CompressionMethod.Deflate;
+```
+
+And then the client will send the following header in the handshake request to the server.
+
+ Sec-WebSocket-Extensions: permessage-deflate; server_no_context_takeover; client_no_context_takeover
+
+If the server supports this extension, it will return the same header which has the corresponding value.
+
+So eventually this extension will be available when the client receives the header in the handshake response.
+
+#### Ignoring the extensions ####
+
+As a WebSocket server, if you would like to ignore the extensions requested from a client, you should set the `WebSocketBehavior.IgnoreExtensions` property to `true` in your `WebSocketBehavior` constructor or initializing it, such as the following.
+
+```csharp
+wssv.AddWebSocketService (
+ "/Chat",
+ () =>
+ new Chat () {
+ // To ignore the extensions requested from a client.
+ IgnoreExtensions = true
+ }
+);
+```
+
+If it is set to `true`, the service will not return the Sec-WebSocket-Extensions header in its handshake response.
+
+I think this is useful when you get something error in connecting the server and exclude the extensions as a cause of the error.
+
+### Secure Connection ###
+
+websocket-sharp supports the secure connection with **SSL/TLS**.
+
+As a WebSocket client, you should create a new instance of the `WebSocket` class with a **wss** scheme WebSocket URL.
+
+```csharp
+var ws = new WebSocket ("wss://example.com");
+```
+
+If you would like to set a custom validation for the server certificate, you should set the `WebSocket.SslConfiguration.ServerCertificateValidationCallback` property to a callback for it.
+
+```csharp
+ws.SslConfiguration.ServerCertificateValidationCallback =
+ (sender, certificate, chain, sslPolicyErrors) => {
+ // Do something to validate the server certificate.
+ ...
+
+ return true; // If the server certificate is valid.
+ };
+```
+
+The default callback always returns `true`.
+
+As a WebSocket server, you should create a new instance of the `WebSocketServer` or `HttpServer` class with some settings for the secure connection, such as the following.
+
+```csharp
+var wssv = new WebSocketServer (5963, true);
+wssv.SslConfiguration.ServerCertificate =
+ new X509Certificate2 ("/path/to/cert.pfx", "password for cert.pfx");
+```
+
+### HTTP Authentication ###
+
+websocket-sharp supports the [HTTP Authentication (Basic/Digest)][rfc2617].
+
+As a WebSocket client, you should set a pair of user name and password for the HTTP authentication, by using the `WebSocket.SetCredentials (string, string, bool)` method before calling the connect method.
+
+```csharp
+ws.SetCredentials ("nobita", "password", preAuth);
+```
+
+If `preAuth` is `true`, the client will send the credentials for the Basic authentication in the first handshake request to the server.
+
+Otherwise, it will send the credentials for either the Basic or Digest (determined by the unauthorized response to the first handshake request) authentication in the second handshake request to the server.
+
+As a WebSocket server, you should set an HTTP authentication scheme, a realm, and any function to find the user credentials before calling the start method, such as the following.
+
+```csharp
+wssv.AuthenticationSchemes = AuthenticationSchemes.Basic;
+wssv.Realm = "WebSocket Test";
+wssv.UserCredentialsFinder = id => {
+ var name = id.Name;
+
+ // Return user name, password, and roles.
+ return name == "nobita"
+ ? new NetworkCredential (name, "password", "gunfighter")
+ : null; // If the user credentials are not found.
+ };
+```
+
+If you would like to provide the Digest authentication, you should set such as the following.
+
+```csharp
+wssv.AuthenticationSchemes = AuthenticationSchemes.Digest;
+```
+
+### Query string, Origin header, and Cookies ###
+
+As a WebSocket client, if you would like to send the query string in the handshake request, you should create a new instance of the `WebSocket` class with a WebSocket URL that includes the [Query] string parameters.
+
+```csharp
+var ws = new WebSocket ("ws://example.com/?name=nobita");
+```
+
+If you would like to send the Origin header in the handshake request, you should set the `WebSocket.Origin` property to an allowable value as the [Origin] header before calling the connect method.
+
+```csharp
+ws.Origin = "http://example.com";
+```
+
+And if you would like to send the cookies in the handshake request, you should set any cookie by using the `WebSocket.SetCookie (WebSocketSharp.Net.Cookie)` method before calling the connect method.
+
+```csharp
+ws.SetCookie (new Cookie ("name", "nobita"));
+```
+
+As a WebSocket server, if you would like to get the query string included in a handshake request, you should access the `WebSocketBehavior.Context.QueryString` property, such as the following.
+
+```csharp
+public class Chat : WebSocketBehavior
+{
+ private string _name;
+ ...
+
+ protected override void OnOpen ()
+ {
+ _name = Context.QueryString["name"];
+ }
+
+ ...
+}
+```
+
+If you would like to get the value of the Origin header included in a handshake request, you should access the `WebSocketBehavior.Context.Origin` property.
+
+If you would like to get the cookies included in a handshake request, you should access the `WebSocketBehavior.Context.CookieCollection` property.
+
+And if you would like to validate the Origin header, cookies, or both, you should set each validation for it with your `WebSocketBehavior`, for example, by using the `WebSocketServer.AddWebSocketService (string, Func)` method with initializing, such as the following.
+
+```csharp
+wssv.AddWebSocketService (
+ "/Chat",
+ () =>
+ new Chat () {
+ OriginValidator = val => {
+ // Check the value of the Origin header, and return true if valid.
+ Uri origin;
+ return !val.IsNullOrEmpty ()
+ && Uri.TryCreate (val, UriKind.Absolute, out origin)
+ && origin.Host == "example.com";
+ },
+ CookiesValidator = (req, res) => {
+ // Check the cookies in 'req', and set the cookies to send to
+ // the client with 'res' if necessary.
+ foreach (Cookie cookie in req) {
+ cookie.Expired = true;
+ res.Add (cookie);
+ }
+
+ return true; // If valid.
+ }
+ }
+);
+```
+
+### Connecting through the HTTP proxy server ###
+
+websocket-sharp supports to connect through the HTTP proxy server.
+
+If you would like to connect to a WebSocket server through the HTTP proxy server, you should set the proxy server URL, and if necessary, a pair of user name and password for the proxy server authentication (Basic/Digest), by using the `WebSocket.SetProxy (string, string, string)` method before calling the connect method.
+
+```csharp
+var ws = new WebSocket ("ws://example.com");
+ws.SetProxy ("http://localhost:3128", "nobita", "password");
+```
+
+I have tested this with **[Squid]**. It is necessary to disable the following option in **squid.conf** (e.g. `/etc/squid/squid.conf`).
+
+```
+# Deny CONNECT to other than SSL ports
+#http_access deny CONNECT !SSL_ports
+```
+
+### Logging ###
+
+The `WebSocket` class has the own logging function.
+
+You can use it with the `WebSocket.Log` property (returns a `WebSocketSharp.Logger`).
+
+So if you would like to change the current logging level (`WebSocketSharp.LogLevel.Error` as the default), you should set the `WebSocket.Log.Level` property to any of the `LogLevel` enum values.
+
+```csharp
+ws.Log.Level = LogLevel.Debug;
+```
+
+The above means a log with lower than `LogLevel.Debug` cannot be outputted.
+
+And if you would like to output a log, you should use any of the output methods. The following outputs a log with `LogLevel.Debug`.
+
+```csharp
+ws.Log.Debug ("This is a debug message.");
+```
+
+The `WebSocketServer` and `HttpServer` classes have the same logging function.
+
+## Examples ##
+
+Examples using websocket-sharp.
+
+### Example ###
+
+[Example] connects to the [Echo server].
+
+### Example2 ###
+
+[Example2] starts a WebSocket server.
+
+### Example3 ###
+
+[Example3] starts an HTTP server that allows to accept the WebSocket handshake requests.
+
+Would you access to [http://localhost:4649](http://localhost:4649) to do **WebSocket Echo Test** with your web browser while Example3 is running?
+
+## Supported WebSocket Specifications ##
+
+websocket-sharp supports **RFC 6455**, and it is based on the following references:
+
+- [The WebSocket Protocol][rfc6455]
+- [The WebSocket API][api]
+- [Compression Extensions for WebSocket][compression]
+
+Thanks for translating to japanese.
+
+- [The WebSocket Protocol 日本語訳][rfc6455_ja]
+- [The WebSocket API 日本語訳][api_ja]
+
+## License ##
+
+websocket-sharp is provided under [The MIT License].
+
+
+[Echo server]: http://www.websocket.org/echo.html
+[Example]: https://github.com/sta/websocket-sharp/tree/master/Example
+[Example2]: https://github.com/sta/websocket-sharp/tree/master/Example2
+[Example3]: https://github.com/sta/websocket-sharp/tree/master/Example3
+[Mono]: http://www.mono-project.com
+[MonoDevelop]: http://monodevelop.com
+[NuGet Gallery]: http://www.nuget.org
+[NuGet Gallery: websocket-sharp]: http://www.nuget.org/packages/WebSocketSharp
+[Origin]: http://tools.ietf.org/html/rfc6454#section-7
+[Query]: http://tools.ietf.org/html/rfc3986#section-3.4
+[Security Sandbox of the Webplayer]: http://docs.unity3d.com/Manual/SecuritySandbox.html
+[Squid]: http://www.squid-cache.org
+[The MIT License]: https://raw.github.com/sta/websocket-sharp/master/LICENSE.txt
+[Unity]: http://unity3d.com
+[WebGL Networking]: http://docs.unity3d.com/Manual/webgl-networking.html
+[WebSocket-Sharp for Unity]: http://u3d.as/content/sta-blockhead/websocket-sharp-for-unity
+[api]: http://www.w3.org/TR/websockets
+[api_ja]: http://www.hcn.zaq.ne.jp/___/WEB/WebSocket-ja.html
+[compression]: http://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-19
+[context take over]: http://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-19#section-8.1.1
+[draft-hixie-thewebsocketprotocol-75]: http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75
+[draft-ietf-hybi-thewebsocketprotocol-00]: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-00
+[draft75]: https://github.com/sta/websocket-sharp/tree/draft75
+[hybi-00]: https://github.com/sta/websocket-sharp/tree/hybi-00
+[master]: https://github.com/sta/websocket-sharp/tree/master
+[rfc2617]: http://tools.ietf.org/html/rfc2617
+[rfc6455]: http://tools.ietf.org/html/rfc6455
+[rfc6455_ja]: http://www.hcn.zaq.ne.jp/___/WEB/RFC6455-ja.html
diff --git a/TestServer/Program.cs b/TestServer/Program.cs
new file mode 100644
index 00000000..2037f126
--- /dev/null
+++ b/TestServer/Program.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace TestServer
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ Console.WriteLine("Hello World!");
+ }
+ }
+}
diff --git a/TestServer/TestServer.csproj b/TestServer/TestServer.csproj
new file mode 100644
index 00000000..b733150e
--- /dev/null
+++ b/TestServer/TestServer.csproj
@@ -0,0 +1,8 @@
+
+
+
+ Exe
+ net5.0
+
+
+
diff --git a/TestServer2/App.config b/TestServer2/App.config
new file mode 100644
index 00000000..e0e5d1d4
--- /dev/null
+++ b/TestServer2/App.config
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/TestServer2/Program.cs b/TestServer2/Program.cs
new file mode 100644
index 00000000..7d5f04ef
--- /dev/null
+++ b/TestServer2/Program.cs
@@ -0,0 +1,66 @@
+using System;
+using System.Configuration;
+using System.Security.Cryptography.X509Certificates;
+using System.Text;
+using WebSocketSharp;
+using WebSocketSharp.Net;
+using WebSocketSharp.Server;
+
+namespace TestServer2
+{
+ internal class Program
+ {
+ public static void Main(string[] args)
+ {
+ var httpsv = new HttpServer ("http://localhost:12346");
+
+ // ConfigurationManager
+ // Set the document root path.
+ httpsv.DocumentRootPath = ConfigurationManager.AppSettings["DocumentRootPath"];
+
+ // Set the HTTP GET request event.
+ httpsv.OnGet += (sender, e) => {
+ var req = e.Request;
+ var res = e.Response;
+
+ var path = req.RawUrl;
+ if (path == "/")
+ path += "index.html";
+
+ byte[] contents;
+ if (!e.TryReadFile (path, out contents)) {
+ res.StatusCode = (int) HttpStatusCode.NotFound;
+ return;
+ }
+
+ if (path.EndsWith (".html")) {
+ res.ContentType = "text/html";
+ res.ContentEncoding = Encoding.UTF8;
+ }
+ else if (path.EndsWith (".js")) {
+ res.ContentType = "application/javascript";
+ res.ContentEncoding = Encoding.UTF8;
+ }
+
+ res.ContentLength64 = contents.LongLength;
+ res.Close (contents, true);
+ };
+
+ // Handle endpoints
+ httpsv.AddWebSocketService ("/Test");
+
+ // Everything else
+ httpsv.Start ();
+ if (httpsv.IsListening) {
+ Console.WriteLine ("Listening on port {0}, and providing WebSocket services:", httpsv.Port);
+ foreach (var path in httpsv.WebSocketServices.Paths)
+ Console.WriteLine ("- {0}", path);
+ }
+
+ Console.WriteLine ("\nPress Enter key to stop the server...");
+ Console.ReadLine ();
+
+ httpsv.Stop ();
+ }
+ }
+}
\ No newline at end of file
diff --git a/TestServer2/Properties/AssemblyInfo.cs b/TestServer2/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..ab156597
--- /dev/null
+++ b/TestServer2/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("TestServer2")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("TestServer2")]
+[assembly: AssemblyCopyright("Copyright © 2021")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("874E9D0F-A2D7-4714-B790-F9631ED35582")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
\ No newline at end of file
diff --git a/TestServer2/Public/Js/echotest.js b/TestServer2/Public/Js/echotest.js
new file mode 100644
index 00000000..6521d337
--- /dev/null
+++ b/TestServer2/Public/Js/echotest.js
@@ -0,0 +1,68 @@
+/*
+ * echotest.js
+ *
+ * Derived from Echo Test of WebSocket.org (http://www.websocket.org/echo.html).
+ *
+ * Copyright (c) 2012 Kaazing Corporation.
+ */
+
+var url = "ws://localhost:4649/Echo";
+//var url = "wss://localhost:5963/Echo";
+var output;
+
+function init () {
+ output = document.getElementById ("output");
+ doWebSocket ();
+}
+
+function doWebSocket () {
+ websocket = new WebSocket (url);
+
+ websocket.onopen = function (e) {
+ onOpen (e);
+ };
+
+ websocket.onmessage = function (e) {
+ onMessage (e);
+ };
+
+ websocket.onerror = function (e) {
+ onError (e);
+ };
+
+ websocket.onclose = function (e) {
+ onClose (e);
+ };
+}
+
+function onOpen (event) {
+ writeToScreen ("CONNECTED");
+ send ("WebSocket rocks");
+}
+
+function onMessage (event) {
+ writeToScreen ('RESPONSE: ' + event.data + '');
+ websocket.close ();
+}
+
+function onError (event) {
+ writeToScreen ('ERROR: ' + event.data + '');
+}
+
+function onClose (event) {
+ writeToScreen ("DISCONNECTED");
+}
+
+function send (message) {
+ writeToScreen ("SENT: " + message);
+ websocket.send (message);
+}
+
+function writeToScreen (message) {
+ var pre = document.createElement ("p");
+ pre.style.wordWrap = "break-word";
+ pre.innerHTML = message;
+ output.appendChild (pre);
+}
+
+window.addEventListener ("load", init, false);
\ No newline at end of file
diff --git a/TestServer2/Public/index.html b/TestServer2/Public/index.html
new file mode 100644
index 00000000..c401b7b0
--- /dev/null
+++ b/TestServer2/Public/index.html
@@ -0,0 +1,12 @@
+
+
+
+ WebSocket Echo Test
+
+
+
+ WebSocket Echo Test
+
+
+
diff --git a/TestServer2/Test.cs b/TestServer2/Test.cs
new file mode 100644
index 00000000..a879e877
--- /dev/null
+++ b/TestServer2/Test.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Threading;
+using WebSocketSharp;
+using WebSocketSharp.Server;
+
+
+namespace TestServer2
+{
+ public class Test : WebSocketBehavior
+ {
+ protected override void OnOpen()
+ {
+ Console.WriteLine("Conection Opened");
+ Send("AAAAAAAAAA");
+ }
+
+ protected override void OnMessage(MessageEventArgs e)
+ {
+ Console.WriteLine(e.Data);
+ Console.WriteLine("Message Recieved");
+ Send("AAAAAAAAAA");
+ }
+ }
+}
\ No newline at end of file
diff --git a/TestServer2/TestServer2.csproj b/TestServer2/TestServer2.csproj
new file mode 100644
index 00000000..5133cda8
--- /dev/null
+++ b/TestServer2/TestServer2.csproj
@@ -0,0 +1,66 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {874E9D0F-A2D7-4714-B790-F9631ED35582}
+ Exe
+ Properties
+ TestServer2
+ TestServer2
+ v3.5
+ 512
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {b357bac7-529e-4d81-a0d2-71041b19c8de}
+ websocket-sharp
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ngrok.exe b/ngrok.exe
new file mode 100644
index 00000000..3f30e6db
Binary files /dev/null and b/ngrok.exe differ
diff --git a/packages/Newtonsoft.Json.12.0.3/.signature.p7s b/packages/Newtonsoft.Json.12.0.3/.signature.p7s
new file mode 100644
index 00000000..bc07e212
Binary files /dev/null and b/packages/Newtonsoft.Json.12.0.3/.signature.p7s differ
diff --git a/packages/Newtonsoft.Json.12.0.3/LICENSE.md b/packages/Newtonsoft.Json.12.0.3/LICENSE.md
new file mode 100644
index 00000000..6cc88f29
--- /dev/null
+++ b/packages/Newtonsoft.Json.12.0.3/LICENSE.md
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2007 James Newton-King
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/packages/Newtonsoft.Json.12.0.3/Newtonsoft.Json.12.0.3.nupkg b/packages/Newtonsoft.Json.12.0.3/Newtonsoft.Json.12.0.3.nupkg
new file mode 100644
index 00000000..f162e3d5
Binary files /dev/null and b/packages/Newtonsoft.Json.12.0.3/Newtonsoft.Json.12.0.3.nupkg differ
diff --git a/packages/Newtonsoft.Json.12.0.3/lib/net20/Newtonsoft.Json.dll b/packages/Newtonsoft.Json.12.0.3/lib/net20/Newtonsoft.Json.dll
new file mode 100644
index 00000000..adabab65
Binary files /dev/null and b/packages/Newtonsoft.Json.12.0.3/lib/net20/Newtonsoft.Json.dll differ
diff --git a/packages/Newtonsoft.Json.12.0.3/lib/net20/Newtonsoft.Json.xml b/packages/Newtonsoft.Json.12.0.3/lib/net20/Newtonsoft.Json.xml
new file mode 100644
index 00000000..f885761f
--- /dev/null
+++ b/packages/Newtonsoft.Json.12.0.3/lib/net20/Newtonsoft.Json.xml
@@ -0,0 +1,10298 @@
+
+
+
+ Newtonsoft.Json
+
+
+
+
+ Represents a BSON Oid (object id).
+
+
+
+
+ Gets or sets the value of the Oid.
+
+ The value of the Oid.
+
+
+
+ Initializes a new instance of the class.
+
+ The Oid value.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized BSON data.
+
+
+
+
+ Gets or sets a value indicating whether binary data reading should be compatible with incorrect Json.NET 3.5 written binary.
+
+
+ true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether the root object will be read as a JSON array.
+
+
+ true if the root object will be read as a JSON array; otherwise, false.
+
+
+
+
+ Gets or sets the used when reading values from BSON.
+
+ The used when reading values from BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+ if set to true the root object will be read as a JSON array.
+ The used when reading values from BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+ if set to true the root object will be read as a JSON array.
+ The used when reading values from BSON.
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating BSON data.
+
+
+
+
+ Gets or sets the used when writing values to BSON.
+ When set to no conversion will occur.
+
+ The used when writing values to BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The to write to.
+
+
+
+ Initializes a new instance of the class.
+
+ The to write to.
+
+
+
+ Flushes whatever is in the buffer to the underlying and also flushes the underlying stream.
+
+
+
+
+ Writes the end.
+
+ The token.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Closes this writer.
+ If is set to true, the underlying is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value that represents a BSON object id.
+
+ The Object ID value to write.
+
+
+
+ Writes a BSON regex.
+
+ The regex pattern.
+ The regex options.
+
+
+
+ Specifies how constructors are used when initializing objects during deserialization by the .
+
+
+
+
+ First attempt to use the public default constructor, then fall back to a single parameterized constructor, then to the non-public default constructor.
+
+
+
+
+ Json.NET will use a non-public default constructor before falling back to a parameterized constructor.
+
+
+
+
+ Converts a binary value to and from a base 64 string value.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON and BSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Creates a custom object.
+
+ The object type to convert.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Creates an object which will then be populated by the serializer.
+
+ Type of the object.
+ The created object.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+
+ true if this can write JSON; otherwise, false.
+
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified value type.
+
+ Type of the value.
+
+ true if this instance can convert the specified value type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified value type.
+
+ Type of the value.
+
+ true if this instance can convert the specified value type; otherwise, false.
+
+
+
+
+ Provides a base class for converting a to and from JSON.
+
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from the ISO 8601 date format (e.g. "2008-04-12T12:53Z").
+
+
+
+
+ Gets or sets the date time styles used when converting a date to and from JSON.
+
+ The date time styles used when converting a date to and from JSON.
+
+
+
+ Gets or sets the date time format used when converting a date to and from JSON.
+
+ The date time format used when converting a date to and from JSON.
+
+
+
+ Gets or sets the culture used when converting a date to and from JSON.
+
+ The culture used when converting a date to and from JSON.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from a JavaScript Date constructor (e.g. new Date(52231943)).
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON and BSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an to and from its name string value.
+
+
+
+
+ Gets or sets a value indicating whether the written enum text should be camel case.
+ The default value is false.
+
+ true if the written enum text will be camel case; otherwise, false.
+
+
+
+ Gets or sets the naming strategy used to resolve how enum text is written.
+
+ The naming strategy used to resolve how enum text is written.
+
+
+
+ Gets or sets a value indicating whether integer values are allowed when serializing and deserializing.
+ The default value is true.
+
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ true if the written enum text will be camel case; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The naming strategy used to resolve how enum text is written.
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from Unix epoch time
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from a string (e.g. "1.2.3.4").
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts XML to and from JSON.
+
+
+
+
+ Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produced multiple root elements.
+
+ The name of the deserialized root element.
+
+
+
+ Gets or sets a value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ true if the array attribute is written to the XML; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether to write the root JSON object.
+
+ true if the JSON root object is omitted; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ true if special characters are encoded; otherwise, false.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The calling serializer.
+ The value.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Checks if the is a namespace attribute.
+
+ Attribute name to test.
+ The attribute name prefix if it has one, otherwise an empty string.
+ true if attribute name is for a namespace attribute, otherwise false.
+
+
+
+ Determines whether this instance can convert the specified value type.
+
+ Type of the value.
+
+ true if this instance can convert the specified value type; otherwise, false.
+
+
+
+
+ Specifies how dates are formatted when writing JSON text.
+
+
+
+
+ Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z".
+
+
+
+
+ Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/".
+
+
+
+
+ Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text.
+
+
+
+
+ Date formatted strings are not parsed to a date type and are read as strings.
+
+
+
+
+ Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to .
+
+
+
+
+ Specifies how to treat the time value when converting between string and .
+
+
+
+
+ Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time.
+
+
+
+
+ Treat as a UTC. If the object represents a local time, it is converted to a UTC.
+
+
+
+
+ Treat as a local time if a is being converted to a string.
+ If a string is being converted to , convert to a local time if a time zone is specified.
+
+
+
+
+ Time zone information should be preserved when converting.
+
+
+
+
+ The default JSON name table implementation.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets a string containing the same characters as the specified range of characters in the given array.
+
+ The character array containing the name to find.
+ The zero-based index into the array specifying the first character of the name.
+ The number of characters in the name.
+ A string containing the same characters as the specified range of characters in the given array.
+
+
+
+ Adds the specified string into name table.
+
+ The string to add.
+ This method is not thread-safe.
+ The resolved string.
+
+
+
+ Specifies default value handling options for the .
+
+
+
+
+
+
+
+
+ Include members where the member value is the same as the member's default value when serializing objects.
+ Included members are written to JSON. Has no effect when deserializing.
+
+
+
+
+ Ignore members where the member value is the same as the member's default value when serializing objects
+ so that it is not written to JSON.
+ This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers,
+ decimals and floating point numbers; and false for booleans). The default value ignored can be changed by
+ placing the on the property.
+
+
+
+
+ Members with a default value but no JSON will be set to their default value when deserializing.
+
+
+
+
+ Ignore members where the member value is the same as the member's default value when serializing objects
+ and set members to their default value when deserializing.
+
+
+
+
+ Specifies float format handling options when writing special floating point numbers, e.g. ,
+ and with .
+
+
+
+
+ Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity".
+
+
+
+
+ Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity.
+ Note that this will produce non-valid JSON.
+
+
+
+
+ Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a of property.
+
+
+
+
+ Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+
+
+
+
+ Floating point numbers are parsed to .
+
+
+
+
+ Floating point numbers are parsed to .
+
+
+
+
+ Specifies formatting options for the .
+
+
+
+
+ No special formatting is applied. This is the default.
+
+
+
+
+ Causes child objects to be indented according to the and settings.
+
+
+
+
+ Provides an interface for using pooled arrays.
+
+ The array type content.
+
+
+
+ Rent an array from the pool. This array must be returned when it is no longer needed.
+
+ The minimum required length of the array. The returned array may be longer.
+ The rented array from the pool. This array must be returned when it is no longer needed.
+
+
+
+ Return an array to the pool.
+
+ The array that is being returned.
+
+
+
+ Provides an interface to enable a class to return line and position information.
+
+
+
+
+ Gets a value indicating whether the class can return line information.
+
+
+ true if and can be provided; otherwise, false.
+
+
+
+
+ Gets the current line number.
+
+ The current line number or 0 if no line information is available (for example, when returns false).
+
+
+
+ Gets the current line position.
+
+ The current line position or 0 if no line information is available (for example, when returns false).
+
+
+
+ Instructs the how to serialize the collection.
+
+
+
+
+ Gets or sets a value indicating whether null items are allowed in the collection.
+
+ true if null items are allowed in the collection; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with a flag indicating whether the array can contain null items.
+
+ A flag indicating whether the array can contain null items.
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Instructs the to use the specified constructor when deserializing that object.
+
+
+
+
+ Instructs the how to serialize the object.
+
+
+
+
+ Gets or sets the id.
+
+ The id.
+
+
+
+ Gets or sets the title.
+
+ The title.
+
+
+
+ Gets or sets the description.
+
+ The description.
+
+
+
+ Gets or sets the collection's items converter.
+
+ The collection's items converter.
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonContainer(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets a value that indicates whether to preserve object references.
+
+
+ true to keep object reference; otherwise, false. The default is false.
+
+
+
+
+ Gets or sets a value that indicates whether to preserve collection's items references.
+
+
+ true to keep collection's items object references; otherwise, false. The default is false.
+
+
+
+
+ Gets or sets the reference loop handling used when serializing the collection's items.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the type name handling used when serializing the collection's items.
+
+ The type name handling.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Provides methods for converting between .NET types and JSON types.
+
+
+
+
+
+
+
+ Gets or sets a function that creates default .
+ Default settings are automatically used by serialization methods on ,
+ and and on .
+ To serialize without using any default settings create a with
+ .
+
+
+
+
+ Represents JavaScript's boolean value true as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's boolean value false as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's null as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's undefined as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's positive infinity as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's negative infinity as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's NaN as a string. This field is read-only.
+
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation using the specified.
+
+ The value to convert.
+ The format the date will be converted to.
+ The time zone handling when the date is converted to a string.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ The string delimiter character.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ The string delimiter character.
+ The string escape handling.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Serializes the specified object to a JSON string.
+
+ The object to serialize.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using formatting.
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a collection of .
+
+ The object to serialize.
+ A collection of converters used while serializing.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using formatting and a collection of .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ A collection of converters used while serializing.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using .
+
+ The object to serialize.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a type, formatting and .
+
+ The object to serialize.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using formatting and .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a type, formatting and .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+ A JSON string representation of the object.
+
+
+
+
+ Deserializes the JSON to a .NET object.
+
+ The JSON to deserialize.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to a .NET object using .
+
+ The JSON to deserialize.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type.
+
+ The JSON to deserialize.
+ The of object being deserialized.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type.
+
+ The type of the object to deserialize to.
+ The JSON to deserialize.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the given anonymous type.
+
+
+ The anonymous type to deserialize to. This can't be specified
+ traditionally and must be inferred from the anonymous type passed
+ as a parameter.
+
+ The JSON to deserialize.
+ The anonymous type object.
+ The deserialized anonymous type from the JSON string.
+
+
+
+ Deserializes the JSON to the given anonymous type using .
+
+
+ The anonymous type to deserialize to. This can't be specified
+ traditionally and must be inferred from the anonymous type passed
+ as a parameter.
+
+ The JSON to deserialize.
+ The anonymous type object.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized anonymous type from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using a collection of .
+
+ The type of the object to deserialize to.
+ The JSON to deserialize.
+ Converters to use while deserializing.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using .
+
+ The type of the object to deserialize to.
+ The object to deserialize.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using a collection of .
+
+ The JSON to deserialize.
+ The type of the object to deserialize.
+ Converters to use while deserializing.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using .
+
+ The JSON to deserialize.
+ The type of the object to deserialize to.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Populates the object with values from the JSON string.
+
+ The JSON to populate values from.
+ The target object to populate values onto.
+
+
+
+ Populates the object with values from the JSON string using .
+
+ The JSON to populate values from.
+ The target object to populate values onto.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+
+
+
+ Serializes the to a JSON string.
+
+ The node to serialize.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting and omits the root object if is true.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ Omits writing the root object.
+ A JSON string of the .
+
+
+
+ Deserializes the from a JSON string.
+
+ The JSON string.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by .
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by
+ and writes a Json.NET array attribute for collections.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by ,
+ writes a Json.NET array attribute for collections, and encodes special characters.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+
+ A value to indicate whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ The deserialized .
+
+
+
+ Converts an object to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can read JSON.
+
+ true if this can read JSON; otherwise, false.
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+ true if this can write JSON; otherwise, false.
+
+
+
+ Converts an object to and from JSON.
+
+ The object type to convert.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read. If there is no existing value then null will be used.
+ The existing value has a value.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Instructs the to use the specified when serializing the member or class.
+
+
+
+
+ Gets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+
+
+
+
+ Initializes a new instance of the class.
+
+ Type of the .
+
+
+
+ Initializes a new instance of the class.
+
+ Type of the .
+ Parameter list to use when constructing the . Can be null.
+
+
+
+ Represents a collection of .
+
+
+
+
+ Instructs the how to serialize the collection.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ The exception thrown when an error occurs during JSON serialization or deserialization.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Instructs the to deserialize properties with no matching class member into the specified collection
+ and write values during serialization.
+
+
+
+
+ Gets or sets a value that indicates whether to write extension data when serializing the object.
+
+
+ true to write extension data when serializing the object; otherwise, false. The default is true.
+
+
+
+
+ Gets or sets a value that indicates whether to read extension data when deserializing the object.
+
+
+ true to read extension data when deserializing the object; otherwise, false. The default is true.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Instructs the not to serialize the public field or public read/write property value.
+
+
+
+
+ Base class for a table of atomized string objects.
+
+
+
+
+ Gets a string containing the same characters as the specified range of characters in the given array.
+
+ The character array containing the name to find.
+ The zero-based index into the array specifying the first character of the name.
+ The number of characters in the name.
+ A string containing the same characters as the specified range of characters in the given array.
+
+
+
+ Instructs the how to serialize the object.
+
+
+
+
+ Gets or sets the member serialization.
+
+ The member serialization.
+
+
+
+ Gets or sets the missing member handling used when deserializing this object.
+
+ The missing member handling.
+
+
+
+ Gets or sets how the object's properties with null values are handled during serialization and deserialization.
+
+ How the object's properties with null values are handled during serialization and deserialization.
+
+
+
+ Gets or sets a value that indicates whether the object's properties are required.
+
+
+ A value indicating whether the object's properties are required.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified member serialization.
+
+ The member serialization.
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Instructs the to always serialize the member with the specified name.
+
+
+
+
+ Gets or sets the type used when serializing the property's collection items.
+
+ The collection's items type.
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonProperty(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the null value handling used when serializing this property.
+
+ The null value handling.
+
+
+
+ Gets or sets the default value handling used when serializing this property.
+
+ The default value handling.
+
+
+
+ Gets or sets the reference loop handling used when serializing this property.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the object creation handling used when deserializing this property.
+
+ The object creation handling.
+
+
+
+ Gets or sets the type name handling used when serializing this property.
+
+ The type name handling.
+
+
+
+ Gets or sets whether this property's value is serialized as a reference.
+
+ Whether this property's value is serialized as a reference.
+
+
+
+ Gets or sets the order of serialization of a member.
+
+ The numeric order of serialization.
+
+
+
+ Gets or sets a value indicating whether this property is required.
+
+
+ A value indicating whether this property is required.
+
+
+
+
+ Gets or sets the name of the property.
+
+ The name of the property.
+
+
+
+ Gets or sets the reference loop handling used when serializing the property's collection items.
+
+ The collection's items reference loop handling.
+
+
+
+ Gets or sets the type name handling used when serializing the property's collection items.
+
+ The collection's items type name handling.
+
+
+
+ Gets or sets whether this property's collection items are serialized as a reference.
+
+ Whether this property's collection items are serialized as a reference.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ Name of the property.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
+
+
+
+
+ Specifies the state of the reader.
+
+
+
+
+ A read method has not been called.
+
+
+
+
+ The end of the file has been reached successfully.
+
+
+
+
+ Reader is at a property.
+
+
+
+
+ Reader is at the start of an object.
+
+
+
+
+ Reader is in an object.
+
+
+
+
+ Reader is at the start of an array.
+
+
+
+
+ Reader is in an array.
+
+
+
+
+ The method has been called.
+
+
+
+
+ Reader has just read a value.
+
+
+
+
+ Reader is at the start of a constructor.
+
+
+
+
+ Reader is in a constructor.
+
+
+
+
+ An error occurred that prevents the read operation from continuing.
+
+
+
+
+ The end of the file has been reached successfully.
+
+
+
+
+ Gets the current reader state.
+
+ The current reader state.
+
+
+
+ Gets or sets a value indicating whether the source should be closed when this reader is closed.
+
+
+ true to close the source when this reader is closed; otherwise false. The default is true.
+
+
+
+
+ Gets or sets a value indicating whether multiple pieces of JSON content can
+ be read from a continuous stream without erroring.
+
+
+ true to support reading multiple pieces of JSON content; otherwise false.
+ The default is false.
+
+
+
+
+ Gets the quotation mark character used to enclose the value of a string.
+
+
+
+
+ Gets or sets how time zones are handled when reading JSON.
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+
+
+
+
+ Gets or sets how custom date formatted strings are parsed when reading JSON.
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+
+
+
+
+ Gets the type of the current JSON token.
+
+
+
+
+ Gets the text value of the current JSON token.
+
+
+
+
+ Gets the .NET type for the current JSON token.
+
+
+
+
+ Gets the depth of the current token in the JSON document.
+
+ The depth of the current token in the JSON document.
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Gets or sets the culture used when reading JSON. Defaults to .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads the next JSON token from the source.
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a [].
+
+ A [] or null if the next JSON token is null. This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Skips the children of the current token.
+
+
+
+
+ Sets the current token.
+
+ The new token.
+
+
+
+ Sets the current token and value.
+
+ The new token.
+ The value.
+
+
+
+ Sets the current token and value.
+
+ The new token.
+ The value.
+ A flag indicating whether the position index inside an array should be updated.
+
+
+
+ Sets the state based on current token type.
+
+
+
+
+ Releases unmanaged and - optionally - managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the source is also closed.
+
+
+
+
+ The exception thrown when an error occurs while reading JSON text.
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The line number indicating where the error occurred.
+ The line position indicating where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Instructs the to always serialize the member, and to require that the member has a value.
+
+
+
+
+ The exception thrown when an error occurs during JSON serialization or deserialization.
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The line number indicating where the error occurred.
+ The line position indicating where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Serializes and deserializes objects into and from the JSON format.
+ The enables you to control how objects are encoded into JSON.
+
+
+
+
+ Occurs when the errors during serialization and deserialization.
+
+
+
+
+ Gets or sets the used by the serializer when resolving references.
+
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+
+
+
+ Gets or sets the used by the serializer when writing trace messages.
+
+ The trace writer.
+
+
+
+ Gets or sets the equality comparer used by the serializer when comparing references.
+
+ The equality comparer.
+
+
+
+ Gets or sets how type name writing and reading is handled by the serializer.
+ The default value is .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how object references are preserved by the serializer.
+ The default value is .
+
+
+
+
+ Gets or sets how reference loops (e.g. a class referencing itself) is handled.
+ The default value is .
+
+
+
+
+ Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how null values are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how default values are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how objects are created during deserialization.
+ The default value is .
+
+ The object creation handling.
+
+
+
+ Gets or sets how constructors are used during deserialization.
+ The default value is .
+
+ The constructor handling.
+
+
+
+ Gets or sets how metadata properties are used during deserialization.
+ The default value is .
+
+ The metadata properties handling.
+
+
+
+ Gets a collection that will be used during serialization.
+
+ Collection that will be used during serialization.
+
+
+
+ Gets or sets the contract resolver used by the serializer when
+ serializing .NET objects to JSON and vice versa.
+
+
+
+
+ Gets or sets the used by the serializer when invoking serialization callback methods.
+
+ The context.
+
+
+
+ Indicates how JSON text output is formatted.
+ The default value is .
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how time zones are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written as JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how and values are formatted when writing JSON text,
+ and the expected date format when reading JSON text.
+ The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
+
+
+
+
+ Gets or sets the culture used when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+ A null value means there is no maximum.
+ The default value is null.
+
+
+
+
+ Gets a value indicating whether there will be a check for additional JSON content after deserializing an object.
+ The default value is false.
+
+
+ true if there will be a check for additional JSON content after deserializing an object; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Creates a new instance.
+ The will not use default settings
+ from .
+
+
+ A new instance.
+ The will not use default settings
+ from .
+
+
+
+
+ Creates a new instance using the specified .
+ The will not use default settings
+ from .
+
+ The settings to be applied to the .
+
+ A new instance using the specified .
+ The will not use default settings
+ from .
+
+
+
+
+ Creates a new instance.
+ The will use default settings
+ from .
+
+
+ A new instance.
+ The will use default settings
+ from .
+
+
+
+
+ Creates a new instance using the specified .
+ The will use default settings
+ from as well as the specified .
+
+ The settings to be applied to the .
+
+ A new instance using the specified .
+ The will use default settings
+ from as well as the specified .
+
+
+
+
+ Populates the JSON values onto the target object.
+
+ The that contains the JSON structure to read values from.
+ The target object to populate values onto.
+
+
+
+ Populates the JSON values onto the target object.
+
+ The that contains the JSON structure to read values from.
+ The target object to populate values onto.
+
+
+
+ Deserializes the JSON structure contained by the specified .
+
+ The that contains the JSON structure to deserialize.
+ The being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The of object being deserialized.
+ The instance of being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The type of the object to deserialize.
+ The instance of being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The of object being deserialized.
+ The instance of being deserialized.
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+ The type of the value being serialized.
+ This parameter is used when is Auto to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+
+
+ Specifies the settings on a object.
+
+
+
+
+ Gets or sets how reference loops (e.g. a class referencing itself) are handled.
+ The default value is .
+
+ Reference loop handling.
+
+
+
+ Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
+ The default value is .
+
+ Missing member handling.
+
+
+
+ Gets or sets how objects are created during deserialization.
+ The default value is .
+
+ The object creation handling.
+
+
+
+ Gets or sets how null values are handled during serialization and deserialization.
+ The default value is .
+
+ Null value handling.
+
+
+
+ Gets or sets how default values are handled during serialization and deserialization.
+ The default value is .
+
+ The default value handling.
+
+
+
+ Gets or sets a collection that will be used during serialization.
+
+ The converters.
+
+
+
+ Gets or sets how object references are preserved by the serializer.
+ The default value is .
+
+ The preserve references handling.
+
+
+
+ Gets or sets how type name writing and reading is handled by the serializer.
+ The default value is .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+ The type name handling.
+
+
+
+ Gets or sets how metadata properties are used during deserialization.
+ The default value is .
+
+ The metadata properties handling.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how constructors are used during deserialization.
+ The default value is .
+
+ The constructor handling.
+
+
+
+ Gets or sets the contract resolver used by the serializer when
+ serializing .NET objects to JSON and vice versa.
+
+ The contract resolver.
+
+
+
+ Gets or sets the equality comparer used by the serializer when comparing references.
+
+ The equality comparer.
+
+
+
+ Gets or sets the used by the serializer when resolving references.
+
+ The reference resolver.
+
+
+
+ Gets or sets a function that creates the used by the serializer when resolving references.
+
+ A function that creates the used by the serializer when resolving references.
+
+
+
+ Gets or sets the used by the serializer when writing trace messages.
+
+ The trace writer.
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+ The binder.
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+ The binder.
+
+
+
+ Gets or sets the error handler called during serialization and deserialization.
+
+ The error handler called during serialization and deserialization.
+
+
+
+ Gets or sets the used by the serializer when invoking serialization callback methods.
+
+ The context.
+
+
+
+ Gets or sets how and values are formatted when writing JSON text,
+ and the expected date format when reading JSON text.
+ The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+ A null value means there is no maximum.
+ The default value is null.
+
+
+
+
+ Indicates how JSON text output is formatted.
+ The default value is .
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how time zones are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written as JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets the culture used when reading JSON.
+ The default value is .
+
+
+
+
+ Gets a value indicating whether there will be a check for additional content after deserializing an object.
+ The default value is false.
+
+
+ true if there will be a check for additional content after deserializing an object; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to JSON text data.
+
+
+
+
+ Initializes a new instance of the class with the specified .
+
+ The containing the JSON data to read.
+
+
+
+ Gets or sets the reader's property name table.
+
+
+
+
+ Gets or sets the reader's character buffer pool.
+
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a [].
+
+ A [] or null if the next JSON token is null. This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Gets a value indicating whether the class can return line information.
+
+
+ true if and can be provided; otherwise, false.
+
+
+
+
+ Gets the current line number.
+
+
+ The current line number or 0 if no line information is available (for example, returns false).
+
+
+
+
+ Gets the current line position.
+
+
+ The current line position or 0 if no line information is available (for example, returns false).
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Gets or sets the writer's character array pool.
+
+
+
+
+ Gets or sets how many s to write for each level in the hierarchy when is set to .
+
+
+
+
+ Gets or sets which character to use to quote attribute values.
+
+
+
+
+ Gets or sets which character to use for indenting when is set to .
+
+
+
+
+ Gets or sets a value indicating whether object names will be surrounded with quotes.
+
+
+
+
+ Initializes a new instance of the class using the specified .
+
+ The to write to.
+
+
+
+ Flushes whatever is in the buffer to the underlying and also flushes the underlying .
+
+
+
+
+ Closes this writer.
+ If is set to true, the underlying is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the specified end token.
+
+ The end token to write.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+
+
+
+ Writes indent characters.
+
+
+
+
+ Writes the JSON value delimiter.
+
+
+
+
+ Writes an indent space.
+
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the given white space.
+
+ The string of white space characters.
+
+
+
+ Specifies the type of JSON token.
+
+
+
+
+ This is returned by the if a read method has not been called.
+
+
+
+
+ An object start token.
+
+
+
+
+ An array start token.
+
+
+
+
+ A constructor start token.
+
+
+
+
+ An object property name.
+
+
+
+
+ A comment.
+
+
+
+
+ Raw JSON.
+
+
+
+
+ An integer.
+
+
+
+
+ A float.
+
+
+
+
+ A string.
+
+
+
+
+ A boolean.
+
+
+
+
+ A null token.
+
+
+
+
+ An undefined token.
+
+
+
+
+ An object end token.
+
+
+
+
+ An array end token.
+
+
+
+
+ A constructor end token.
+
+
+
+
+ A Date.
+
+
+
+
+ Byte data.
+
+
+
+
+
+ Represents a reader that provides validation.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Sets an event handler for receiving schema validation errors.
+
+
+
+
+ Gets the text value of the current JSON token.
+
+
+
+
+
+ Gets the depth of the current token in the JSON document.
+
+ The depth of the current token in the JSON document.
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Gets the quotation mark character used to enclose the value of a string.
+
+
+
+
+
+ Gets the type of the current JSON token.
+
+
+
+
+
+ Gets the .NET type for the current JSON token.
+
+
+
+
+
+ Initializes a new instance of the class that
+ validates the content returned from the given .
+
+ The to read from while validating.
+
+
+
+ Gets or sets the schema.
+
+ The schema.
+
+
+
+ Gets the used to construct this .
+
+ The specified in the constructor.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a [].
+
+
+ A [] or null if the next JSON token is null.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Gets or sets a value indicating whether the destination should be closed when this writer is closed.
+
+
+ true to close the destination when this writer is closed; otherwise false. The default is true.
+
+
+
+
+ Gets or sets a value indicating whether the JSON should be auto-completed when this writer is closed.
+
+
+ true to auto-complete the JSON when this writer is closed; otherwise false. The default is true.
+
+
+
+
+ Gets the top.
+
+ The top.
+
+
+
+ Gets the state of the writer.
+
+
+
+
+ Gets the path of the writer.
+
+
+
+
+ Gets or sets a value indicating how JSON text output should be formatted.
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+
+
+
+
+ Gets or sets how time zones are handled when writing JSON text.
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written to JSON text.
+
+
+
+
+ Gets or sets how and values are formatted when writing JSON text.
+
+
+
+
+ Gets or sets the culture used when writing JSON. Defaults to .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Flushes whatever is in the buffer to the destination and also flushes the destination.
+
+
+
+
+ Closes this writer.
+ If is set to true, the destination is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the end of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the end of an array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the end constructor.
+
+
+
+
+ Writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+
+
+
+ Writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+
+
+
+ Writes the end of the current JSON object or array.
+
+
+
+
+ Writes the current token and its children.
+
+ The to read the token from.
+
+
+
+ Writes the current token.
+
+ The to read the token from.
+ A flag indicating whether the current token's children should be written.
+
+
+
+ Writes the token and its value.
+
+ The to write.
+
+ The value to write.
+ A value is only required for tokens that have an associated value, e.g. the property name for .
+ null can be passed to the method for tokens that don't have a value, e.g. .
+
+
+
+
+ Writes the token.
+
+ The to write.
+
+
+
+ Writes the specified end token.
+
+ The end token to write.
+
+
+
+ Writes indent characters.
+
+
+
+
+ Writes the JSON value delimiter.
+
+
+
+
+ Writes an indent space.
+
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the given white space.
+
+ The string of white space characters.
+
+
+
+ Releases unmanaged and - optionally - managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Sets the state of the .
+
+ The being written.
+ The value being written.
+
+
+
+ The exception thrown when an error occurs while writing JSON text.
+
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Specifies how JSON comments are handled when loading JSON.
+
+
+
+
+ Ignore comments.
+
+
+
+
+ Load comments as a with type .
+
+
+
+
+ Specifies how duplicate property names are handled when loading JSON.
+
+
+
+
+ Replace the existing value when there is a duplicate property. The value of the last property in the JSON object will be used.
+
+
+
+
+ Ignore the new value when there is a duplicate property. The value of the first property in the JSON object will be used.
+
+
+
+
+ Throw a when a duplicate property is encountered.
+
+
+
+
+ Contains the LINQ to JSON extension methods.
+
+
+
+
+ Returns a collection of tokens that contains the ancestors of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains the ancestors of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains every token in the source collection, the ancestors of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains the descendants of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains the descendants of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains every token in the source collection, and the descendants of every token in the source collection.
+
+
+
+ Returns a collection of child properties of every object in the source collection.
+
+ An of that contains the source collection.
+ An of that contains the properties of every object in the source collection.
+
+
+
+ Returns a collection of child values of every object in the source collection with the given key.
+
+ An of that contains the source collection.
+ The token key.
+ An of that contains the values of every token in the source collection with the given key.
+
+
+
+ Returns a collection of child values of every object in the source collection.
+
+ An of that contains the source collection.
+ An of that contains the values of every token in the source collection.
+
+
+
+ Returns a collection of converted child values of every object in the source collection with the given key.
+
+ The type to convert the values to.
+ An of that contains the source collection.
+ The token key.
+ An that contains the converted values of every token in the source collection with the given key.
+
+
+
+ Returns a collection of converted child values of every object in the source collection.
+
+ The type to convert the values to.
+ An of that contains the source collection.
+ An that contains the converted values of every token in the source collection.
+
+
+
+ Converts the value.
+
+ The type to convert the value to.
+ A cast as a of .
+ A converted value.
+
+
+
+ Converts the value.
+
+ The source collection type.
+ The type to convert the value to.
+ A cast as a of .
+ A converted value.
+
+
+
+ Returns a collection of child tokens of every array in the source collection.
+
+ The source collection type.
+ An of that contains the source collection.
+ An of that contains the values of every token in the source collection.
+
+
+
+ Returns a collection of converted child tokens of every array in the source collection.
+
+ An of that contains the source collection.
+ The type to convert the values to.
+ The source collection type.
+ An that contains the converted values of every token in the source collection.
+
+
+
+ Returns the input typed as .
+
+ An of that contains the source collection.
+ The input typed as .
+
+
+
+ Returns the input typed as .
+
+ The source collection type.
+ An of that contains the source collection.
+ The input typed as .
+
+
+
+ Represents a collection of objects.
+
+ The type of token.
+
+
+
+ Gets the of with the specified key.
+
+
+
+
+
+ Represents a JSON array.
+
+
+
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the array.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the array.
+
+
+
+ Loads an from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads an from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+
+
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the values of the specified object.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ The that will be used to read the object.
+ A with the values of the specified object.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets or sets the at the specified index.
+
+
+
+
+
+ Determines the index of a specific item in the .
+
+ The object to locate in the .
+
+ The index of if found in the list; otherwise, -1.
+
+
+
+
+ Inserts an item to the at the specified index.
+
+ The zero-based index at which should be inserted.
+ The object to insert into the .
+
+ is not a valid index in the .
+
+
+
+
+ Removes the item at the specified index.
+
+ The zero-based index of the item to remove.
+
+ is not a valid index in the .
+
+
+
+
+ Returns an enumerator that iterates through the collection.
+
+
+ A of that can be used to iterate through the collection.
+
+
+
+
+ Adds an item to the .
+
+ The object to add to the .
+
+
+
+ Removes all items from the .
+
+
+
+
+ Determines whether the contains a specific value.
+
+ The object to locate in the .
+
+ true if is found in the ; otherwise, false.
+
+
+
+
+ Copies the elements of the to an array, starting at a particular array index.
+
+ The array.
+ Index of the array.
+
+
+
+ Gets a value indicating whether the is read-only.
+
+ true if the is read-only; otherwise, false.
+
+
+
+ Removes the first occurrence of a specific object from the .
+
+ The object to remove from the .
+
+ true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original .
+
+
+
+
+ Represents a JSON constructor.
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets or sets the name of this constructor.
+
+ The constructor name.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified name and content.
+
+ The constructor name.
+ The contents of the constructor.
+
+
+
+ Initializes a new instance of the class with the specified name and content.
+
+ The constructor name.
+ The contents of the constructor.
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ The constructor name.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Represents a token that can contain other tokens.
+
+
+
+
+ Occurs when the list changes or an item in the list changes.
+
+
+
+
+ Occurs before an item is added to the collection.
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Get the first child token of this token.
+
+
+ A containing the first child token of the .
+
+
+
+
+ Get the last child token of this token.
+
+
+ A containing the last child token of the .
+
+
+
+
+ Returns a collection of the child tokens of this token, in document order.
+
+
+ An of containing the child tokens of this , in document order.
+
+
+
+
+ Returns a collection of the child values of this token, in document order.
+
+ The type to convert the values to.
+
+ A containing the child values of this , in document order.
+
+
+
+
+ Returns a collection of the descendant tokens for this token in document order.
+
+ An of containing the descendant tokens of the .
+
+
+
+ Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order.
+
+ An of containing this token, and all the descendant tokens of the .
+
+
+
+ Adds the specified content as children of this .
+
+ The content to be added.
+
+
+
+ Adds the specified content as the first children of this .
+
+ The content to be added.
+
+
+
+ Creates a that can be used to add tokens to the .
+
+ A that is ready to have content written to it.
+
+
+
+ Replaces the child nodes of this token with the specified content.
+
+ The content.
+
+
+
+ Removes the child nodes from this token.
+
+
+
+
+ Merge the specified content into this .
+
+ The content to be merged.
+
+
+
+ Merge the specified content into this using .
+
+ The content to be merged.
+ The used to merge the content.
+
+
+
+ Gets the count of child JSON tokens.
+
+ The count of child JSON tokens.
+
+
+
+ Represents a collection of objects.
+
+ The type of token.
+
+
+
+ An empty collection of objects.
+
+
+
+
+ Initializes a new instance of the struct.
+
+ The enumerable.
+
+
+
+ Returns an enumerator that can be used to iterate through the collection.
+
+
+ A that can be used to iterate through the collection.
+
+
+
+
+ Gets the of with the specified key.
+
+
+
+
+
+ Determines whether the specified is equal to this instance.
+
+ The to compare with this instance.
+
+ true if the specified is equal to this instance; otherwise, false.
+
+
+
+
+ Determines whether the specified is equal to this instance.
+
+ The to compare with this instance.
+
+ true if the specified is equal to this instance; otherwise, false.
+
+
+
+
+ Returns a hash code for this instance.
+
+
+ A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
+
+
+
+
+ Represents a JSON object.
+
+
+
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Occurs when a property value changes.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the object.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the object.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets an of of this object's properties.
+
+ An of of this object's properties.
+
+
+
+ Gets a with the specified name.
+
+ The property name.
+ A with the specified name or null.
+
+
+
+ Gets the with the specified name.
+ The exact name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ The property name.
+ One of the enumeration values that specifies how the strings will be compared.
+ A matched with the specified name or null.
+
+
+
+ Gets a of of this object's property values.
+
+ A of of this object's property values.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets or sets the with the specified property name.
+
+
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+ is not valid JSON.
+
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+ is not valid JSON.
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+ is not valid JSON.
+
+
+
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+ is not valid JSON.
+
+
+
+
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the values of the specified object.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ The that will be used to read the object.
+ A with the values of the specified object.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified property name.
+
+ Name of the property.
+ The with the specified property name.
+
+
+
+ Gets the with the specified property name.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ Name of the property.
+ One of the enumeration values that specifies how the strings will be compared.
+ The with the specified property name.
+
+
+
+ Tries to get the with the specified property name.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ Name of the property.
+ The value.
+ One of the enumeration values that specifies how the strings will be compared.
+ true if a value was successfully retrieved; otherwise, false.
+
+
+
+ Adds the specified property name.
+
+ Name of the property.
+ The value.
+
+
+
+ Determines whether the JSON object has the specified property name.
+
+ Name of the property.
+ true if the JSON object has the specified property name; otherwise, false.
+
+
+
+ Removes the property with the specified name.
+
+ Name of the property.
+ true if item was successfully removed; otherwise, false.
+
+
+
+ Tries to get the with the specified property name.
+
+ Name of the property.
+ The value.
+ true if a value was successfully retrieved; otherwise, false.
+
+
+
+ Returns an enumerator that can be used to iterate through the collection.
+
+
+ A that can be used to iterate through the collection.
+
+
+
+
+ Raises the event with the provided arguments.
+
+ Name of the property.
+
+
+
+ Represents a JSON property.
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets the property name.
+
+ The property name.
+
+
+
+ Gets or sets the property value.
+
+ The property value.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+ The property name.
+ The property content.
+
+
+
+ Initializes a new instance of the class.
+
+ The property name.
+ The property content.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Represents a view of a .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The name.
+
+
+
+ When overridden in a derived class, returns whether resetting an object changes its value.
+
+
+ true if resetting the component changes its value; otherwise, false.
+
+ The component to test for reset capability.
+
+
+
+ When overridden in a derived class, gets the current value of the property on a component.
+
+
+ The value of a property for a given component.
+
+ The component with the property for which to retrieve the value.
+
+
+
+ When overridden in a derived class, resets the value for this property of the component to the default value.
+
+ The component with the property value that is to be reset to the default value.
+
+
+
+ When overridden in a derived class, sets the value of the component to a different value.
+
+ The component with the property value that is to be set.
+ The new value.
+
+
+
+ When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted.
+
+
+ true if the property should be persisted; otherwise, false.
+
+ The component with the property to be examined for persistence.
+
+
+
+ When overridden in a derived class, gets the type of the component this property is bound to.
+
+
+ A that represents the type of component this property is bound to.
+ When the or
+
+ methods are invoked, the object specified might be an instance of this type.
+
+
+
+
+ When overridden in a derived class, gets a value indicating whether this property is read-only.
+
+
+ true if the property is read-only; otherwise, false.
+
+
+
+
+ When overridden in a derived class, gets the type of the property.
+
+
+ A that represents the type of the property.
+
+
+
+
+ Gets the hash code for the name of the member.
+
+
+
+ The hash code for the name of the member.
+
+
+
+
+ Represents a raw JSON string.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class.
+
+ The raw json.
+
+
+
+ Creates an instance of with the content of the reader's current token.
+
+ The reader.
+ An instance of with the content of the reader's current token.
+
+
+
+ Specifies the settings used when loading JSON.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets or sets how JSON comments are handled when loading JSON.
+ The default value is .
+
+ The JSON comment handling.
+
+
+
+ Gets or sets how JSON line info is handled when loading JSON.
+ The default value is .
+
+ The JSON line info handling.
+
+
+
+ Gets or sets how duplicate property names in JSON objects are handled when loading JSON.
+ The default value is .
+
+ The JSON duplicate property name handling.
+
+
+
+ Specifies the settings used when merging JSON.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets or sets the method used when merging JSON arrays.
+
+ The method used when merging JSON arrays.
+
+
+
+ Gets or sets how null value properties are merged.
+
+ How null value properties are merged.
+
+
+
+ Gets or sets the comparison used to match property names while merging.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ The comparison used to match property names while merging.
+
+
+
+ Represents an abstract JSON token.
+
+
+
+
+ Gets a comparer that can compare two tokens for value equality.
+
+ A that can compare two nodes for value equality.
+
+
+
+ Gets or sets the parent.
+
+ The parent.
+
+
+
+ Gets the root of this .
+
+ The root of this .
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Compares the values of two tokens, including the values of all descendant tokens.
+
+ The first to compare.
+ The second to compare.
+ true if the tokens are equal; otherwise false.
+
+
+
+ Gets the next sibling token of this node.
+
+ The that contains the next sibling token.
+
+
+
+ Gets the previous sibling token of this node.
+
+ The that contains the previous sibling token.
+
+
+
+ Gets the path of the JSON token.
+
+
+
+
+ Adds the specified content immediately after this token.
+
+ A content object that contains simple content or a collection of content objects to be added after this token.
+
+
+
+ Adds the specified content immediately before this token.
+
+ A content object that contains simple content or a collection of content objects to be added before this token.
+
+
+
+ Returns a collection of the ancestor tokens of this token.
+
+ A collection of the ancestor tokens of this token.
+
+
+
+ Returns a collection of tokens that contain this token, and the ancestors of this token.
+
+ A collection of tokens that contain this token, and the ancestors of this token.
+
+
+
+ Returns a collection of the sibling tokens after this token, in document order.
+
+ A collection of the sibling tokens after this tokens, in document order.
+
+
+
+ Returns a collection of the sibling tokens before this token, in document order.
+
+ A collection of the sibling tokens before this token, in document order.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets the with the specified key converted to the specified type.
+
+ The type to convert the token to.
+ The token key.
+ The converted token value.
+
+
+
+ Get the first child token of this token.
+
+ A containing the first child token of the .
+
+
+
+ Get the last child token of this token.
+
+ A containing the last child token of the .
+
+
+
+ Returns a collection of the child tokens of this token, in document order.
+
+ An of containing the child tokens of this , in document order.
+
+
+
+ Returns a collection of the child tokens of this token, in document order, filtered by the specified type.
+
+ The type to filter the child tokens on.
+ A containing the child tokens of this , in document order.
+
+
+
+ Returns a collection of the child values of this token, in document order.
+
+ The type to convert the values to.
+ A containing the child values of this , in document order.
+
+
+
+ Removes this token from its parent.
+
+
+
+
+ Replaces this token with the specified token.
+
+ The value.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Returns the indented JSON for this token.
+
+
+ ToString() returns a non-JSON string value for tokens with a type of .
+ If you want the JSON for all token types then you should use .
+
+
+ The indented JSON for this token.
+
+
+
+
+ Returns the JSON for this token using the given formatting and converters.
+
+ Indicates how the output should be formatted.
+ A collection of s which will be used when writing the token.
+ The JSON for this token using the given formatting and converters.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to [].
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from [] to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Creates a for this token.
+
+ A that can be used to read this token and its descendants.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the value of the specified object.
+
+
+
+ Creates a from an object using the specified .
+
+ The object that will be used to create .
+ The that will be used when reading the object.
+ A with the value of the specified object.
+
+
+
+ Creates an instance of the specified .NET type from the .
+
+ The object type that the token will be deserialized to.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the .
+
+ The object type that the token will be deserialized to.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the using the specified .
+
+ The object type that the token will be deserialized to.
+ The that will be used when creating the object.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the using the specified .
+
+ The object type that the token will be deserialized to.
+ The that will be used when creating the object.
+ The new object created from the JSON value.
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Creates a from a .
+
+ An positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Selects a using a JSONPath expression. Selects the token that matches the object path.
+
+
+ A that contains a JSONPath expression.
+
+ A , or null.
+
+
+
+ Selects a using a JSONPath expression. Selects the token that matches the object path.
+
+
+ A that contains a JSONPath expression.
+
+ A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.
+ A .
+
+
+
+ Selects a collection of elements using a JSONPath expression.
+
+
+ A that contains a JSONPath expression.
+
+ An of that contains the selected elements.
+
+
+
+ Selects a collection of elements using a JSONPath expression.
+
+
+ A that contains a JSONPath expression.
+
+ A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.
+ An of that contains the selected elements.
+
+
+
+ Creates a new instance of the . All child tokens are recursively cloned.
+
+ A new instance of the .
+
+
+
+ Adds an object to the annotation list of this .
+
+ The annotation to add.
+
+
+
+ Get the first annotation object of the specified type from this .
+
+ The type of the annotation to retrieve.
+ The first annotation object that matches the specified type, or null if no annotation is of the specified type.
+
+
+
+ Gets the first annotation object of the specified type from this .
+
+ The of the annotation to retrieve.
+ The first annotation object that matches the specified type, or null if no annotation is of the specified type.
+
+
+
+ Gets a collection of annotations of the specified type for this .
+
+ The type of the annotations to retrieve.
+ An that contains the annotations for this .
+
+
+
+ Gets a collection of annotations of the specified type for this .
+
+ The of the annotations to retrieve.
+ An of that contains the annotations that match the specified type for this .
+
+
+
+ Removes the annotations of the specified type from this .
+
+ The type of annotations to remove.
+
+
+
+ Removes the annotations of the specified type from this .
+
+ The of annotations to remove.
+
+
+
+ Compares tokens to determine whether they are equal.
+
+
+
+
+ Determines whether the specified objects are equal.
+
+ The first object of type to compare.
+ The second object of type to compare.
+
+ true if the specified objects are equal; otherwise, false.
+
+
+
+
+ Returns a hash code for the specified object.
+
+ The for which a hash code is to be returned.
+ A hash code for the specified object.
+ The type of is a reference type and is null.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
+
+
+
+
+ Gets the at the reader's current position.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The token to read from.
+
+
+
+ Initializes a new instance of the class.
+
+ The token to read from.
+ The initial path of the token. It is prepended to the returned .
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Specifies the type of token.
+
+
+
+
+ No token type has been set.
+
+
+
+
+ A JSON object.
+
+
+
+
+ A JSON array.
+
+
+
+
+ A JSON constructor.
+
+
+
+
+ A JSON object property.
+
+
+
+
+ A comment.
+
+
+
+
+ An integer value.
+
+
+
+
+ A float value.
+
+
+
+
+ A string value.
+
+
+
+
+ A boolean value.
+
+
+
+
+ A null value.
+
+
+
+
+ An undefined value.
+
+
+
+
+ A date value.
+
+
+
+
+ A raw JSON value.
+
+
+
+
+ A collection of bytes value.
+
+
+
+
+ A Guid value.
+
+
+
+
+ A Uri value.
+
+
+
+
+ A TimeSpan value.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Gets the at the writer's current position.
+
+
+
+
+ Gets the token being written.
+
+ The token being written.
+
+
+
+ Initializes a new instance of the class writing to the given .
+
+ The container being written to.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Flushes whatever is in the buffer to the underlying .
+
+
+
+
+ Closes this writer.
+ If is set to true, the JSON is auto-completed.
+
+
+ Setting to true has no additional effect, since the underlying is a type that cannot be closed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the end.
+
+ The token.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Writes a value.
+ An error will be raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Represents a value in JSON (string, integer, date, etc).
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Creates a comment with the given value.
+
+ The value.
+ A comment with the given value.
+
+
+
+ Creates a string with the given value.
+
+ The value.
+ A string with the given value.
+
+
+
+ Creates a null value.
+
+ A null value.
+
+
+
+ Creates a undefined value.
+
+ A undefined value.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets or sets the underlying token value.
+
+ The underlying token value.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of s which will be used when writing the token.
+
+
+
+ Indicates whether the current object is equal to another object of the same type.
+
+
+ true if the current object is equal to the parameter; otherwise, false.
+
+ An object to compare with this object.
+
+
+
+ Determines whether the specified is equal to the current .
+
+ The to compare with the current .
+
+ true if the specified is equal to the current ; otherwise, false.
+
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Returns a that represents this instance.
+
+
+ ToString() returns a non-JSON string value for tokens with a type of .
+ If you want the JSON for all token types then you should use .
+
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format.
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format provider.
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format.
+ The format provider.
+
+ A that represents this instance.
+
+
+
+
+ Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
+
+ An object to compare with this instance.
+
+ A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings:
+ Value
+ Meaning
+ Less than zero
+ This instance is less than .
+ Zero
+ This instance is equal to .
+ Greater than zero
+ This instance is greater than .
+
+
+ is not of the same type as this instance.
+
+
+
+
+ Specifies how line information is handled when loading JSON.
+
+
+
+
+ Ignore line information.
+
+
+
+
+ Load line information.
+
+
+
+
+ Specifies how JSON arrays are merged together.
+
+
+
+ Concatenate arrays.
+
+
+ Union arrays, skipping items that already exist.
+
+
+ Replace all array items.
+
+
+ Merge array items together, matched by index.
+
+
+
+ Specifies how null value properties are merged.
+
+
+
+
+ The content's null value properties will be ignored during merging.
+
+
+
+
+ The content's null value properties will be merged.
+
+
+
+
+ Specifies the member serialization options for the .
+
+
+
+
+ All public members are serialized by default. Members can be excluded using or .
+ This is the default member serialization mode.
+
+
+
+
+ Only members marked with or are serialized.
+ This member serialization mode can also be set by marking the class with .
+
+
+
+
+ All public and private fields are serialized. Members can be excluded using or .
+ This member serialization mode can also be set by marking the class with
+ and setting IgnoreSerializableAttribute on to false.
+
+
+
+
+ Specifies metadata property handling options for the .
+
+
+
+
+ Read metadata properties located at the start of a JSON object.
+
+
+
+
+ Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance.
+
+
+
+
+ Do not try to read metadata properties.
+
+
+
+
+ Specifies missing member handling options for the .
+
+
+
+
+ Ignore a missing member and do not attempt to deserialize it.
+
+
+
+
+ Throw a when a missing member is encountered during deserialization.
+
+
+
+
+ Specifies null value handling options for the .
+
+
+
+
+
+
+
+
+ Include null values when serializing and deserializing objects.
+
+
+
+
+ Ignore null values when serializing and deserializing objects.
+
+
+
+
+ Specifies how object creation is handled by the .
+
+
+
+
+ Reuse existing objects, create new objects when needed.
+
+
+
+
+ Only reuse existing objects.
+
+
+
+
+ Always create new objects.
+
+
+
+
+ Specifies reference handling options for the .
+ Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement .
+
+
+
+
+
+
+
+ Do not preserve references when serializing types.
+
+
+
+
+ Preserve references when serializing into a JSON object structure.
+
+
+
+
+ Preserve references when serializing into a JSON array structure.
+
+
+
+
+ Preserve references when serializing.
+
+
+
+
+ Specifies reference loop handling options for the .
+
+
+
+
+ Throw a when a loop is encountered.
+
+
+
+
+ Ignore loop references and do not serialize.
+
+
+
+
+ Serialize loop references.
+
+
+
+
+ Indicating whether a property is required.
+
+
+
+
+ The property is not required. The default state.
+
+
+
+
+ The property must be defined in JSON but can be a null value.
+
+
+
+
+ The property must be defined in JSON and cannot be a null value.
+
+
+
+
+ The property is not required but it cannot be a null value.
+
+
+
+
+
+ Contains the JSON schema extension methods.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+
+ Determines whether the is valid.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+
+ true if the specified is valid; otherwise, false.
+
+
+
+
+
+ Determines whether the is valid.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+ When this method returns, contains any error messages generated while validating.
+
+ true if the specified is valid; otherwise, false.
+
+
+
+
+
+ Validates the specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+
+
+
+
+ Validates the specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+ The validation event handler.
+
+
+
+
+ An in-memory representation of a JSON Schema.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets the id.
+
+
+
+
+ Gets or sets the title.
+
+
+
+
+ Gets or sets whether the object is required.
+
+
+
+
+ Gets or sets whether the object is read-only.
+
+
+
+
+ Gets or sets whether the object is visible to users.
+
+
+
+
+ Gets or sets whether the object is transient.
+
+
+
+
+ Gets or sets the description of the object.
+
+
+
+
+ Gets or sets the types of values allowed by the object.
+
+ The type.
+
+
+
+ Gets or sets the pattern.
+
+ The pattern.
+
+
+
+ Gets or sets the minimum length.
+
+ The minimum length.
+
+
+
+ Gets or sets the maximum length.
+
+ The maximum length.
+
+
+
+ Gets or sets a number that the value should be divisible by.
+
+ A number that the value should be divisible by.
+
+
+
+ Gets or sets the minimum.
+
+ The minimum.
+
+
+
+ Gets or sets the maximum.
+
+ The maximum.
+
+
+
+ Gets or sets a flag indicating whether the value can not equal the number defined by the minimum attribute ().
+
+ A flag indicating whether the value can not equal the number defined by the minimum attribute ().
+
+
+
+ Gets or sets a flag indicating whether the value can not equal the number defined by the maximum attribute ().
+
+ A flag indicating whether the value can not equal the number defined by the maximum attribute ().
+
+
+
+ Gets or sets the minimum number of items.
+
+ The minimum number of items.
+
+
+
+ Gets or sets the maximum number of items.
+
+ The maximum number of items.
+
+
+
+ Gets or sets the of items.
+
+ The of items.
+
+
+
+ Gets or sets a value indicating whether items in an array are validated using the instance at their array position from .
+
+
+ true if items are validated using their array position; otherwise, false.
+
+
+
+
+ Gets or sets the of additional items.
+
+ The of additional items.
+
+
+
+ Gets or sets a value indicating whether additional items are allowed.
+
+
+ true if additional items are allowed; otherwise, false.
+
+
+
+
+ Gets or sets whether the array items must be unique.
+
+
+
+
+ Gets or sets the of properties.
+
+ The of properties.
+
+
+
+ Gets or sets the of additional properties.
+
+ The of additional properties.
+
+
+
+ Gets or sets the pattern properties.
+
+ The pattern properties.
+
+
+
+ Gets or sets a value indicating whether additional properties are allowed.
+
+
+ true if additional properties are allowed; otherwise, false.
+
+
+
+
+ Gets or sets the required property if this property is present.
+
+ The required property if this property is present.
+
+
+
+ Gets or sets the a collection of valid enum values allowed.
+
+ A collection of valid enum values allowed.
+
+
+
+ Gets or sets disallowed types.
+
+ The disallowed types.
+
+
+
+ Gets or sets the default value.
+
+ The default value.
+
+
+
+ Gets or sets the collection of that this schema extends.
+
+ The collection of that this schema extends.
+
+
+
+ Gets or sets the format.
+
+ The format.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads a from the specified .
+
+ The containing the JSON Schema to read.
+ The object representing the JSON Schema.
+
+
+
+ Reads a from the specified .
+
+ The containing the JSON Schema to read.
+ The to use when resolving schema references.
+ The object representing the JSON Schema.
+
+
+
+ Load a from a string that contains JSON Schema.
+
+ A that contains JSON Schema.
+ A populated from the string that contains JSON Schema.
+
+
+
+ Load a from a string that contains JSON Schema using the specified .
+
+ A that contains JSON Schema.
+ The resolver.
+ A populated from the string that contains JSON Schema.
+
+
+
+ Writes this schema to a .
+
+ A into which this method will write.
+
+
+
+ Writes this schema to a using the specified .
+
+ A into which this method will write.
+ The resolver used.
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+
+ Returns detailed information about the schema exception.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+
+ Generates a from a specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets how undefined schemas are handled by the serializer.
+
+
+
+
+ Gets or sets the contract resolver.
+
+ The contract resolver.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ The used to resolve schema references.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ Specify whether the generated root will be nullable.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ The used to resolve schema references.
+ Specify whether the generated root will be nullable.
+ A generated from the specified type.
+
+
+
+
+ Resolves from an id.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets the loaded schemas.
+
+ The loaded schemas.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets a for the specified reference.
+
+ The id.
+ A for the specified reference.
+
+
+
+
+ The value types allowed by the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ No type specified.
+
+
+
+
+ String type.
+
+
+
+
+ Float type.
+
+
+
+
+ Integer type.
+
+
+
+
+ Boolean type.
+
+
+
+
+ Object type.
+
+
+
+
+ Array type.
+
+
+
+
+ Null type.
+
+
+
+
+ Any type.
+
+
+
+
+
+ Specifies undefined schema Id handling options for the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Do not infer a schema Id.
+
+
+
+
+ Use the .NET type name as the schema Id.
+
+
+
+
+ Use the assembly qualified .NET type name as the schema Id.
+
+
+
+
+
+ Returns detailed information related to the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets the associated with the validation error.
+
+ The JsonSchemaException associated with the validation error.
+
+
+
+ Gets the path of the JSON location where the validation error occurred.
+
+ The path of the JSON location where the validation error occurred.
+
+
+
+ Gets the text description corresponding to the validation error.
+
+ The text description.
+
+
+
+
+ Represents the callback method that will handle JSON schema validation events and the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ A camel case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Resolves member mappings for a type, camel casing property names.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Used by to resolve a for a given .
+
+
+
+
+ Gets a value indicating whether members are being get and set using dynamic code generation.
+ This value is determined by the runtime permissions available.
+
+
+ true if using dynamic code generation; otherwise, false.
+
+
+
+
+ Gets or sets the default members search flags.
+
+ The default members search flags.
+
+
+
+ Gets or sets a value indicating whether compiler generated members should be serialized.
+
+
+ true if serialized compiler generated members; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types.
+
+
+ true if the interface will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore the attribute when serializing and deserializing types.
+
+
+ true if the attribute will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore IsSpecified members when serializing and deserializing types.
+
+
+ true if the IsSpecified members will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore ShouldSerialize members when serializing and deserializing types.
+
+
+ true if the ShouldSerialize members will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets the naming strategy used to resolve how property names and dictionary keys are serialized.
+
+ The naming strategy used to resolve how property names and dictionary keys are serialized.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Gets the serializable members for the type.
+
+ The type to get serializable members for.
+ The serializable members for the type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates the constructor parameters.
+
+ The constructor to create properties for.
+ The type's member properties.
+ Properties for the given .
+
+
+
+ Creates a for the given .
+
+ The matching member property.
+ The constructor parameter.
+ A created for the given .
+
+
+
+ Resolves the default for the contract.
+
+ Type of the object.
+ The contract's default .
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Determines which contract type is created for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates properties for the given .
+
+ The type to create properties for.
+ /// The member serialization mode for the type.
+ Properties for the given .
+
+
+
+ Creates the used by the serializer to get and set values from a member.
+
+ The member.
+ The used by the serializer to get and set values from a member.
+
+
+
+ Creates a for the given .
+
+ The member's parent .
+ The member to create a for.
+ A created for the given .
+
+
+
+ Resolves the name of the property.
+
+ Name of the property.
+ Resolved name of the property.
+
+
+
+ Resolves the name of the extension data. By default no changes are made to extension data names.
+
+ Name of the extension data.
+ Resolved name of the extension data.
+
+
+
+ Resolves the key of the dictionary. By default is used to resolve dictionary keys.
+
+ Key of the dictionary.
+ Resolved key of the dictionary.
+
+
+
+ Gets the resolved name of the property.
+
+ Name of the property.
+ Name of the property.
+
+
+
+ The default naming strategy. Property names and dictionary keys are unchanged.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ The default serialization binder used when resolving and loading classes from type names.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+ The type of the object the formatter creates a new instance of.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ Represents a trace writer that writes to the application's instances.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Get and set values for a using dynamic methods.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Provides information surrounding an error.
+
+
+
+
+ Gets the error.
+
+ The error.
+
+
+
+ Gets the original object that caused the error.
+
+ The original object that caused the error.
+
+
+
+ Gets the member that caused the error.
+
+ The member that caused the error.
+
+
+
+ Gets the path of the JSON location where the error occurred.
+
+ The path of the JSON location where the error occurred.
+
+
+
+ Gets or sets a value indicating whether this is handled.
+
+ true if handled; otherwise, false.
+
+
+
+ Provides data for the Error event.
+
+
+
+
+ Gets the current object the error event is being raised against.
+
+ The current object the error event is being raised against.
+
+
+
+ Gets the error context.
+
+ The error context.
+
+
+
+ Initializes a new instance of the class.
+
+ The current object.
+ The error context.
+
+
+
+ Provides methods to get attributes.
+
+
+
+
+ Returns a collection of all of the attributes, or an empty collection if there are no attributes.
+
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Returns a collection of attributes, identified by type, or an empty collection if there are no attributes.
+
+ The type of the attributes.
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Used by to resolve a for a given .
+
+
+
+
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Used to resolve references when serializing and deserializing JSON by the .
+
+
+
+
+ Resolves a reference to its object.
+
+ The serialization context.
+ The reference to resolve.
+ The object that was resolved from the reference.
+
+
+
+ Gets the reference for the specified object.
+
+ The serialization context.
+ The object to get a reference for.
+ The reference to the object.
+
+
+
+ Determines whether the specified object is referenced.
+
+ The serialization context.
+ The object to test for a reference.
+
+ true if the specified object is referenced; otherwise, false.
+
+
+
+
+ Adds a reference to the specified object.
+
+ The serialization context.
+ The reference.
+ The object to reference.
+
+
+
+ Allows users to control class loading and mandate what class to load.
+
+
+
+
+ When implemented, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object
+ The type of the object the formatter creates a new instance of.
+
+
+
+ When implemented, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ Represents a trace writer.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Provides methods to get and set values.
+
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the of the collection items.
+
+ The of the collection items.
+
+
+
+ Gets a value indicating whether the collection type is a multidimensional array.
+
+ true if the collection type is a multidimensional array; otherwise, false.
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+
+ The function used to create the object.
+
+
+
+ Gets a value indicating whether the creator has a parameter with the collection values.
+
+ true if the creator has a parameter with the collection values; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the default collection items .
+
+ The converter.
+
+
+
+ Gets or sets a value indicating whether the collection items preserve object references.
+
+ true if collection items preserve object references; otherwise, false.
+
+
+
+ Gets or sets the collection item reference loop handling.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the collection item type name handling.
+
+ The type name handling.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Handles serialization callback events.
+
+ The object that raised the callback event.
+ The streaming context.
+
+
+
+ Handles serialization error callback events.
+
+ The object that raised the callback event.
+ The streaming context.
+ The error context.
+
+
+
+ Sets extension data for an object during deserialization.
+
+ The object to set extension data on.
+ The extension data key.
+ The extension data value.
+
+
+
+ Gets extension data for an object during serialization.
+
+ The object to set extension data on.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the underlying type for the contract.
+
+ The underlying type for the contract.
+
+
+
+ Gets or sets the type created during deserialization.
+
+ The type created during deserialization.
+
+
+
+ Gets or sets whether this type contract is serialized as a reference.
+
+ Whether this type contract is serialized as a reference.
+
+
+
+ Gets or sets the default for this contract.
+
+ The converter.
+
+
+
+ Gets the internally resolved for the contract's type.
+ This converter is used as a fallback converter when no other converter is resolved.
+ Setting will always override this converter.
+
+
+
+
+ Gets or sets all methods called immediately after deserialization of the object.
+
+ The methods called immediately after deserialization of the object.
+
+
+
+ Gets or sets all methods called during deserialization of the object.
+
+ The methods called during deserialization of the object.
+
+
+
+ Gets or sets all methods called after serialization of the object graph.
+
+ The methods called after serialization of the object graph.
+
+
+
+ Gets or sets all methods called before serialization of the object.
+
+ The methods called before serialization of the object.
+
+
+
+ Gets or sets all method called when an error is thrown during the serialization of the object.
+
+ The methods called when an error is thrown during the serialization of the object.
+
+
+
+ Gets or sets the default creator method used to create the object.
+
+ The default creator method used to create the object.
+
+
+
+ Gets or sets a value indicating whether the default creator is non-public.
+
+ true if the default object creator is non-public; otherwise, false.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the dictionary key resolver.
+
+ The dictionary key resolver.
+
+
+
+ Gets the of the dictionary keys.
+
+ The of the dictionary keys.
+
+
+
+ Gets the of the dictionary values.
+
+ The of the dictionary values.
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+
+ The function used to create the object.
+
+
+
+ Gets a value indicating whether the creator has a parameter with the dictionary values.
+
+ true if the creator has a parameter with the dictionary values; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the object constructor.
+
+ The object constructor.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the object member serialization.
+
+ The member object serialization.
+
+
+
+ Gets or sets the missing member handling used when deserializing this object.
+
+ The missing member handling.
+
+
+
+ Gets or sets a value that indicates whether the object's properties are required.
+
+
+ A value indicating whether the object's properties are required.
+
+
+
+
+ Gets or sets how the object's properties with null values are handled during serialization and deserialization.
+
+ How the object's properties with null values are handled during serialization and deserialization.
+
+
+
+ Gets the object's properties.
+
+ The object's properties.
+
+
+
+ Gets a collection of instances that define the parameters used with .
+
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+ This function is called with a collection of arguments which are defined by the collection.
+
+ The function used to create the object.
+
+
+
+ Gets or sets the extension data setter.
+
+
+
+
+ Gets or sets the extension data getter.
+
+
+
+
+ Gets or sets the extension data value type.
+
+
+
+
+ Gets or sets the extension data name resolver.
+
+ The extension data name resolver.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Maps a JSON property to a .NET member or constructor parameter.
+
+
+
+
+ Gets or sets the name of the property.
+
+ The name of the property.
+
+
+
+ Gets or sets the type that declared this property.
+
+ The type that declared this property.
+
+
+
+ Gets or sets the order of serialization of a member.
+
+ The numeric order of serialization.
+
+
+
+ Gets or sets the name of the underlying member or parameter.
+
+ The name of the underlying member or parameter.
+
+
+
+ Gets the that will get and set the during serialization.
+
+ The that will get and set the during serialization.
+
+
+
+ Gets or sets the for this property.
+
+ The for this property.
+
+
+
+ Gets or sets the type of the property.
+
+ The type of the property.
+
+
+
+ Gets or sets the for the property.
+ If set this converter takes precedence over the contract converter for the property type.
+
+ The converter.
+
+
+
+ Gets or sets the member converter.
+
+ The member converter.
+
+
+
+ Gets or sets a value indicating whether this is ignored.
+
+ true if ignored; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this is readable.
+
+ true if readable; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this is writable.
+
+ true if writable; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this has a member attribute.
+
+ true if has a member attribute; otherwise, false.
+
+
+
+ Gets the default value.
+
+ The default value.
+
+
+
+ Gets or sets a value indicating whether this is required.
+
+ A value indicating whether this is required.
+
+
+
+ Gets a value indicating whether has a value specified.
+
+
+
+
+ Gets or sets a value indicating whether this property preserves object references.
+
+
+ true if this instance is reference; otherwise, false.
+
+
+
+
+ Gets or sets the property null value handling.
+
+ The null value handling.
+
+
+
+ Gets or sets the property default value handling.
+
+ The default value handling.
+
+
+
+ Gets or sets the property reference loop handling.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the property object creation handling.
+
+ The object creation handling.
+
+
+
+ Gets or sets or sets the type name handling.
+
+ The type name handling.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be serialized.
+
+ A predicate used to determine whether the property should be serialized.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be deserialized.
+
+ A predicate used to determine whether the property should be deserialized.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be serialized.
+
+ A predicate used to determine whether the property should be serialized.
+
+
+
+ Gets or sets an action used to set whether the property has been deserialized.
+
+ An action used to set whether the property has been deserialized.
+
+
+
+ Returns a that represents this instance.
+
+
+ A that represents this instance.
+
+
+
+
+ Gets or sets the converter used when serializing the property's collection items.
+
+ The collection's items converter.
+
+
+
+ Gets or sets whether this property's collection items are serialized as a reference.
+
+ Whether this property's collection items are serialized as a reference.
+
+
+
+ Gets or sets the type name handling used when serializing the property's collection items.
+
+ The collection's items type name handling.
+
+
+
+ Gets or sets the reference loop handling used when serializing the property's collection items.
+
+ The collection's items reference loop handling.
+
+
+
+ A collection of objects.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The type.
+
+
+
+ When implemented in a derived class, extracts the key from the specified element.
+
+ The element from which to extract the key.
+ The key for the specified element.
+
+
+
+ Adds a object.
+
+ The property to add to the collection.
+
+
+
+ Gets the closest matching object.
+ First attempts to get an exact case match of and then
+ a case insensitive match.
+
+ Name of the property.
+ A matching property if found.
+
+
+
+ Gets a property by property name.
+
+ The name of the property to get.
+ Type property name string comparison.
+ A matching property if found.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Lookup and create an instance of the type described by the argument.
+
+ The type to create.
+ Optional arguments to pass to an initializing constructor of the JsonConverter.
+ If null, the default constructor is used.
+
+
+
+ A kebab case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Represents a trace writer that writes to memory. When the trace message limit is
+ reached then old trace messages will be removed as new messages are added.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Returns an enumeration of the most recent trace messages.
+
+ An enumeration of the most recent trace messages.
+
+
+
+ Returns a of the most recent trace messages.
+
+
+ A of the most recent trace messages.
+
+
+
+
+ A base class for resolving how property names and dictionary keys are serialized.
+
+
+
+
+ A flag indicating whether dictionary keys should be processed.
+ Defaults to false.
+
+
+
+
+ A flag indicating whether extension data names should be processed.
+ Defaults to false.
+
+
+
+
+ A flag indicating whether explicitly specified property names,
+ e.g. a property name customized with a , should be processed.
+ Defaults to false.
+
+
+
+
+ Gets the serialized name for a given property name.
+
+ The initial property name.
+ A flag indicating whether the property has had a name explicitly specified.
+ The serialized property name.
+
+
+
+ Gets the serialized name for a given extension data name.
+
+ The initial extension data name.
+ The serialized extension data name.
+
+
+
+ Gets the serialized key for a given dictionary key.
+
+ The initial dictionary key.
+ The serialized dictionary key.
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Hash code calculation
+
+
+
+
+
+ Object equality implementation
+
+
+
+
+
+
+ Compare to another NamingStrategy
+
+
+
+
+
+
+ Represents a method that constructs an object.
+
+ The object type to create.
+
+
+
+ When applied to a method, specifies that the method is called when an error occurs serializing an object.
+
+
+
+
+ Provides methods to get attributes from a , , or .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The instance to get attributes for. This parameter should be a , , or .
+
+
+
+ Returns a collection of all of the attributes, or an empty collection if there are no attributes.
+
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Returns a collection of attributes, identified by type, or an empty collection if there are no attributes.
+
+ The type of the attributes.
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Get and set values for a using reflection.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ A snake case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Specifies how strings are escaped when writing JSON text.
+
+
+
+
+ Only control characters (e.g. newline) are escaped.
+
+
+
+
+ All non-ASCII and control characters (e.g. newline) are escaped.
+
+
+
+
+ HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped.
+
+
+
+
+ Indicates the method that will be used during deserialization for locating and loading assemblies.
+
+
+
+
+ In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the LoadWithPartialName method of the class is used to load the assembly.
+
+
+
+
+ In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The Load method of the class is used to load the assembly.
+
+
+
+
+ Specifies type name handling options for the .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+
+
+
+ Do not include the .NET type name when serializing types.
+
+
+
+
+ Include the .NET type name when serializing into a JSON object structure.
+
+
+
+
+ Include the .NET type name when serializing into a JSON array structure.
+
+
+
+
+ Always include the .NET type name when serializing.
+
+
+
+
+ Include the .NET type name when the type of the object being serialized is not the same as its declared type.
+ Note that this doesn't include the root serialized object by default. To include the root object's type name in JSON
+ you must specify a root type object with
+ or .
+
+
+
+
+ Determines whether the collection is null or empty.
+
+ The collection.
+
+ true if the collection is null or empty; otherwise, false.
+
+
+
+
+ Adds the elements of the specified collection to the specified generic .
+
+ The list to add to.
+ The collection of elements to add.
+
+
+
+ Converts the value to the specified type. If the value is unable to be converted, the
+ value is checked whether it assignable to the specified type.
+
+ The value to convert.
+ The culture to use when converting.
+ The type to convert or cast the value to.
+
+ The converted type. If conversion was unsuccessful, the initial value
+ is returned if assignable to the target type.
+
+
+
+
+ Helper class for serializing immutable collections.
+ Note that this is used by all builds, even those that don't support immutable collections, in case the DLL is GACed
+ https://github.com/JamesNK/Newtonsoft.Json/issues/652
+
+
+
+
+ Provides a set of static (Shared in Visual Basic) methods for
+ querying objects that implement .
+
+
+
+
+ Returns the input typed as .
+
+
+
+
+ Returns an empty that has the
+ specified type argument.
+
+
+
+
+ Converts the elements of an to the
+ specified type.
+
+
+
+
+ Filters the elements of an based on a specified type.
+
+
+
+
+ Generates a sequence of integral numbers within a specified range.
+
+ The value of the first integer in the sequence.
+ The number of sequential integers to generate.
+
+
+
+ Generates a sequence that contains one repeated value.
+
+
+
+
+ Filters a sequence of values based on a predicate.
+
+
+
+
+ Filters a sequence of values based on a predicate.
+ Each element's index is used in the logic of the predicate function.
+
+
+
+
+ Projects each element of a sequence into a new form.
+
+
+
+
+ Projects each element of a sequence into a new form by
+ incorporating the element's index.
+
+
+
+
+ Projects each element of a sequence to an
+ and flattens the resulting sequences into one sequence.
+
+
+
+
+ Projects each element of a sequence to an ,
+ and flattens the resulting sequences into one sequence. The
+ index of each source element is used in the projected form of
+ that element.
+
+
+
+
+ Projects each element of a sequence to an ,
+ flattens the resulting sequences into one sequence, and invokes
+ a result selector function on each element therein.
+
+
+
+
+ Projects each element of a sequence to an ,
+ flattens the resulting sequences into one sequence, and invokes
+ a result selector function on each element therein. The index of
+ each source element is used in the intermediate projected form
+ of that element.
+
+
+
+
+ Returns elements from a sequence as long as a specified condition is true.
+
+
+
+
+ Returns elements from a sequence as long as a specified condition is true.
+ The element's index is used in the logic of the predicate function.
+
+
+
+
+ Base implementation of First operator.
+
+
+
+
+ Returns the first element of a sequence.
+
+
+
+
+ Returns the first element in a sequence that satisfies a specified condition.
+
+
+
+
+ Returns the first element of a sequence, or a default value if
+ the sequence contains no elements.
+
+
+
+
+ Returns the first element of the sequence that satisfies a
+ condition or a default value if no such element is found.
+
+
+
+
+ Base implementation of Last operator.
+
+
+
+
+ Returns the last element of a sequence.
+
+
+
+
+ Returns the last element of a sequence that satisfies a
+ specified condition.
+
+
+
+
+ Returns the last element of a sequence, or a default value if
+ the sequence contains no elements.
+
+
+
+
+ Returns the last element of a sequence that satisfies a
+ condition or a default value if no such element is found.
+
+
+
+
+ Base implementation of Single operator.
+
+
+
+
+ Returns the only element of a sequence, and throws an exception
+ if there is not exactly one element in the sequence.
+
+
+
+
+ Returns the only element of a sequence that satisfies a
+ specified condition, and throws an exception if more than one
+ such element exists.
+
+
+
+
+ Returns the only element of a sequence, or a default value if
+ the sequence is empty; this method throws an exception if there
+ is more than one element in the sequence.
+
+
+
+
+ Returns the only element of a sequence that satisfies a
+ specified condition or a default value if no such element
+ exists; this method throws an exception if more than one element
+ satisfies the condition.
+
+
+
+
+ Returns the element at a specified index in a sequence.
+
+
+
+
+ Returns the element at a specified index in a sequence or a
+ default value if the index is out of range.
+
+
+
+
+ Inverts the order of the elements in a sequence.
+
+
+
+
+ Returns a specified number of contiguous elements from the start
+ of a sequence.
+
+
+
+
+ Bypasses a specified number of elements in a sequence and then
+ returns the remaining elements.
+
+
+
+
+ Bypasses elements in a sequence as long as a specified condition
+ is true and then returns the remaining elements.
+
+
+
+
+ Bypasses elements in a sequence as long as a specified condition
+ is true and then returns the remaining elements. The element's
+ index is used in the logic of the predicate function.
+
+
+
+
+ Returns the number of elements in a sequence.
+
+
+
+
+ Returns a number that represents how many elements in the
+ specified sequence satisfy a condition.
+
+
+
+
+ Returns a that represents the total number
+ of elements in a sequence.
+
+
+
+
+ Returns a that represents how many elements
+ in a sequence satisfy a condition.
+
+
+
+
+ Concatenates two sequences.
+
+
+
+
+ Creates a from an .
+
+
+
+
+ Creates an array from an .
+
+
+
+
+ Returns distinct elements from a sequence by using the default
+ equality comparer to compare values.
+
+
+
+
+ Returns distinct elements from a sequence by using a specified
+ to compare values.
+
+
+
+
+ Creates a from an
+ according to a specified key
+ selector function.
+
+
+
+
+ Creates a from an
+ according to a specified key
+ selector function and a key comparer.
+
+
+
+
+ Creates a from an
+ according to specified key
+ and element selector functions.
+
+
+
+
+ Creates a from an
+ according to a specified key
+ selector function, a comparer and an element selector function.
+
+
+
+
+ Groups the elements of a sequence according to a specified key
+ selector function.
+
+
+
+
+ Groups the elements of a sequence according to a specified key
+ selector function and compares the keys by using a specified
+ comparer.
+
+
+
+
+ Groups the elements of a sequence according to a specified key
+ selector function and projects the elements for each group by
+ using a specified function.
+
+
+
+
+ Groups the elements of a sequence according to a specified key
+ selector function and creates a result value from each group and
+ its key.
+
+
+
+
+ Groups the elements of a sequence according to a key selector
+ function. The keys are compared by using a comparer and each
+ group's elements are projected by using a specified function.
+
+
+
+
+ Groups the elements of a sequence according to a specified key
+ selector function and creates a result value from each group and
+ its key. The elements of each group are projected by using a
+ specified function.
+
+
+
+
+ Groups the elements of a sequence according to a specified key
+ selector function and creates a result value from each group and
+ its key. The keys are compared by using a specified comparer.
+
+
+
+
+ Groups the elements of a sequence according to a specified key
+ selector function and creates a result value from each group and
+ its key. Key values are compared by using a specified comparer,
+ and the elements of each group are projected by using a
+ specified function.
+
+
+
+
+ Applies an accumulator function over a sequence.
+
+
+
+
+ Applies an accumulator function over a sequence. The specified
+ seed value is used as the initial accumulator value.
+
+
+
+
+ Applies an accumulator function over a sequence. The specified
+ seed value is used as the initial accumulator value, and the
+ specified function is used to select the result value.
+
+
+
+
+ Produces the set union of two sequences by using the default
+ equality comparer.
+
+
+
+
+ Produces the set union of two sequences by using a specified
+ .
+
+
+
+
+ Returns the elements of the specified sequence or the type
+ parameter's default value in a singleton collection if the
+ sequence is empty.
+
+
+
+
+ Returns the elements of the specified sequence or the specified
+ value in a singleton collection if the sequence is empty.
+
+
+
+
+ Determines whether all elements of a sequence satisfy a condition.
+
+
+
+
+ Determines whether a sequence contains any elements.
+
+
+
+
+ Determines whether any element of a sequence satisfies a
+ condition.
+
+
+
+
+ Determines whether a sequence contains a specified element by
+ using the default equality comparer.
+
+
+
+
+ Determines whether a sequence contains a specified element by
+ using a specified .
+
+
+
+
+ Determines whether two sequences are equal by comparing the
+ elements by using the default equality comparer for their type.
+
+
+
+
+ Determines whether two sequences are equal by comparing their
+ elements by using a specified .
+
+
+
+
+ Base implementation for Min/Max operator.
+
+
+
+
+ Base implementation for Min/Max operator for nullable types.
+
+
+
+
+ Returns the minimum value in a generic sequence.
+
+
+
+
+ Invokes a transform function on each element of a generic
+ sequence and returns the minimum resulting value.
+
+
+
+
+ Returns the maximum value in a generic sequence.
+
+
+
+
+ Invokes a transform function on each element of a generic
+ sequence and returns the maximum resulting value.
+
+
+
+
+ Makes an enumerator seen as enumerable once more.
+
+
+ The supplied enumerator must have been started. The first element
+ returned is the element the enumerator was on when passed in.
+ DO NOT use this method if the caller must be a generator. It is
+ mostly safe among aggregate operations.
+
+
+
+
+ Sorts the elements of a sequence in ascending order according to a key.
+
+
+
+
+ Sorts the elements of a sequence in ascending order by using a
+ specified comparer.
+
+
+
+
+ Sorts the elements of a sequence in descending order according to a key.
+
+
+
+
+ Sorts the elements of a sequence in descending order by using a
+ specified comparer.
+
+
+
+
+ Performs a subsequent ordering of the elements in a sequence in
+ ascending order according to a key.
+
+
+
+
+ Performs a subsequent ordering of the elements in a sequence in
+ ascending order by using a specified comparer.
+
+
+
+
+ Performs a subsequent ordering of the elements in a sequence in
+ descending order, according to a key.
+
+
+
+
+ Performs a subsequent ordering of the elements in a sequence in
+ descending order by using a specified comparer.
+
+
+
+
+ Base implementation for Intersect and Except operators.
+
+
+
+
+ Produces the set intersection of two sequences by using the
+ default equality comparer to compare values.
+
+
+
+
+ Produces the set intersection of two sequences by using the
+ specified to compare values.
+
+
+
+
+ Produces the set difference of two sequences by using the
+ default equality comparer to compare values.
+
+
+
+
+ Produces the set difference of two sequences by using the
+ specified to compare values.
+
+
+
+
+ Creates a from an
+ according to a specified key
+ selector function.
+
+
+
+
+ Creates a from an
+ according to a specified key
+ selector function and key comparer.
+
+
+
+
+ Creates a from an
+ according to specified key
+ selector and element selector functions.
+
+
+
+
+ Creates a from an
+ according to a specified key
+ selector function, a comparer, and an element selector function.
+
+
+
+
+ Correlates the elements of two sequences based on matching keys.
+ The default equality comparer is used to compare keys.
+
+
+
+
+ Correlates the elements of two sequences based on matching keys.
+ The default equality comparer is used to compare keys. A
+ specified is used to compare keys.
+
+
+
+
+ Correlates the elements of two sequences based on equality of
+ keys and groups the results. The default equality comparer is
+ used to compare keys.
+
+
+
+
+ Correlates the elements of two sequences based on equality of
+ keys and groups the results. The default equality comparer is
+ used to compare keys. A specified
+ is used to compare keys.
+
+
+
+
+ Computes the sum of a sequence of values.
+
+
+
+
+ Computes the sum of a sequence of
+ values that are obtained by invoking a transform function on
+ each element of the input sequence.
+
+
+
+
+ Computes the average of a sequence of values.
+
+
+
+
+ Computes the average of a sequence of values
+ that are obtained by invoking a transform function on each
+ element of the input sequence.
+
+
+
+
+ Computes the sum of a sequence of nullable values.
+
+
+
+
+ Computes the sum of a sequence of nullable
+ values that are obtained by invoking a transform function on
+ each element of the input sequence.
+
+
+
+
+ Computes the average of a sequence of nullable values.
+
+
+
+
+ Computes the average of a sequence of nullable values
+ that are obtained by invoking a transform function on each
+ element of the input sequence.
+
+
+
+
+ Returns the minimum value in a sequence of nullable
+ values.
+
+
+
+
+ Invokes a transform function on each element of a sequence and
+ returns the minimum nullable value.
+
+
+
+
+ Returns the maximum value in a sequence of nullable
+ values.
+
+
+
+
+ Invokes a transform function on each element of a sequence and
+ returns the maximum nullable value.
+
+
+
+
+ Computes the sum of a sequence of values.
+
+
+
+
+ Computes the sum of a sequence of
+ values that are obtained by invoking a transform function on
+ each element of the input sequence.
+
+
+
+
+ Computes the average of a sequence of values.
+
+
+
+
+ Computes the average of a sequence of values
+ that are obtained by invoking a transform function on each
+ element of the input sequence.
+
+
+
+
+ Computes the sum of a sequence of nullable values.
+
+
+
+
+ Computes the sum of a sequence of nullable
+ values that are obtained by invoking a transform function on
+ each element of the input sequence.
+
+
+
+
+ Computes the average of a sequence of nullable values.
+
+
+
+
+ Computes the average of a sequence of nullable values
+ that are obtained by invoking a transform function on each
+ element of the input sequence.
+
+
+
+
+ Returns the minimum value in a sequence of nullable
+ values.
+
+
+
+
+ Invokes a transform function on each element of a sequence and
+ returns the minimum nullable value.
+
+
+
+
+ Returns the maximum value in a sequence of nullable
+ values.
+
+
+
+
+ Invokes a transform function on each element of a sequence and
+ returns the maximum nullable value.
+
+
+
+
+ Computes the sum of a sequence of nullable values.
+
+
+
+
+ Computes the sum of a sequence of
+ values that are obtained by invoking a transform function on
+ each element of the input sequence.
+
+
+
+
+ Computes the average of a sequence of values.
+
+
+
+
+ Computes the average of a sequence of values
+ that are obtained by invoking a transform function on each
+ element of the input sequence.
+
+
+
+
+ Computes the sum of a sequence of nullable values.
+
+
+
+
+ Computes the sum of a sequence of nullable
+ values that are obtained by invoking a transform function on
+ each element of the input sequence.
+
+
+
+
+ Computes the average of a sequence of nullable values.
+
+
+
+
+ Computes the average of a sequence of nullable values
+ that are obtained by invoking a transform function on each
+ element of the input sequence.
+
+
+
+
+ Returns the minimum value in a sequence of nullable
+ values.
+
+
+
+
+ Invokes a transform function on each element of a sequence and
+ returns the minimum nullable value.
+
+
+
+
+ Returns the maximum value in a sequence of nullable
+ values.
+
+
+
+
+ Invokes a transform function on each element of a sequence and
+ returns the maximum nullable value.
+
+
+
+
+ Computes the sum of a sequence of values.
+
+
+
+
+ Computes the sum of a sequence of
+ values that are obtained by invoking a transform function on
+ each element of the input sequence.
+
+
+
+
+ Computes the average of a sequence of values.
+
+
+
+
+ Computes the average of a sequence of values
+ that are obtained by invoking a transform function on each
+ element of the input sequence.
+
+
+
+
+ Computes the sum of a sequence of nullable values.
+
+
+
+
+ Computes the sum of a sequence of nullable
+ values that are obtained by invoking a transform function on
+ each element of the input sequence.
+
+
+
+
+ Computes the average of a sequence of nullable values.
+
+
+
+
+ Computes the average of a sequence of nullable values
+ that are obtained by invoking a transform function on each
+ element of the input sequence.
+
+
+
+
+ Returns the minimum value in a sequence of nullable
+ values.
+
+
+
+
+ Invokes a transform function on each element of a sequence and
+ returns the minimum nullable value.
+
+
+
+
+ Returns the maximum value in a sequence of nullable
+ values.
+
+
+
+
+ Invokes a transform function on each element of a sequence and
+ returns the maximum nullable value.
+
+
+
+
+ Computes the sum of a sequence of values.
+
+
+
+
+ Computes the sum of a sequence of
+ values that are obtained by invoking a transform function on
+ each element of the input sequence.
+
+
+
+
+ Computes the average of a sequence of values.
+
+
+
+
+ Computes the average of a sequence of values
+ that are obtained by invoking a transform function on each
+ element of the input sequence.
+
+
+
+
+ Computes the sum of a sequence of nullable values.
+
+
+
+
+ Computes the sum of a sequence of nullable
+ values that are obtained by invoking a transform function on
+ each element of the input sequence.
+
+
+
+
+ Computes the average of a sequence of nullable values.
+
+
+
+
+ Computes the average of a sequence of nullable values
+ that are obtained by invoking a transform function on each
+ element of the input sequence.
+
+
+
+
+ Returns the minimum value in a sequence of nullable
+ values.
+
+
+
+
+ Invokes a transform function on each element of a sequence and
+ returns the minimum nullable value.
+
+
+
+
+ Returns the maximum value in a sequence of nullable
+ values.
+
+
+
+
+ Invokes a transform function on each element of a sequence and
+ returns the maximum nullable value.
+
+
+
+
+ Represents a collection of objects that have a common key.
+
+
+
+
+ Gets the key of the .
+
+
+
+
+ Defines an indexer, size property, and Boolean search method for
+ data structures that map keys to
+ sequences of values.
+
+
+
+
+ Represents a sorted sequence.
+
+
+
+
+ Performs a subsequent ordering on the elements of an
+ according to a key.
+
+
+
+
+ Represents a collection of keys each mapped to one or more values.
+
+
+
+
+ Gets the number of key/value collection pairs in the .
+
+
+
+
+ Gets the collection of values indexed by the specified key.
+
+
+
+
+ Determines whether a specified key is in the .
+
+
+
+
+ Applies a transform function to each key and its associated
+ values and returns the results.
+
+
+
+
+ Returns a generic enumerator that iterates through the .
+
+
+
+
+ See issue #11
+ for why this method is needed and cannot be expressed as a
+ lambda at the call site.
+
+
+
+
+ See issue #11
+ for why this method is needed and cannot be expressed as a
+ lambda at the call site.
+
+
+
+
+ Gets the type of the typed collection's items.
+
+ The type.
+ The type of the typed collection's items.
+
+
+
+ Gets the member's underlying type.
+
+ The member.
+ The underlying type of the member.
+
+
+
+ Determines whether the property is an indexed property.
+
+ The property.
+
+ true if the property is an indexed property; otherwise, false.
+
+
+
+
+ Gets the member's value on the object.
+
+ The member.
+ The target object.
+ The member's value on the object.
+
+
+
+ Sets the member's value on the target object.
+
+ The member.
+ The target.
+ The value.
+
+
+
+ Determines whether the specified MemberInfo can be read.
+
+ The MemberInfo to determine whether can be read.
+ /// if set to true then allow the member to be gotten non-publicly.
+
+ true if the specified MemberInfo can be read; otherwise, false.
+
+
+
+
+ Determines whether the specified MemberInfo can be set.
+
+ The MemberInfo to determine whether can be set.
+ if set to true then allow the member to be set non-publicly.
+ if set to true then allow the member to be set if read-only.
+
+ true if the specified MemberInfo can be set; otherwise, false.
+
+
+
+
+ Builds a string. Unlike this class lets you reuse its internal buffer.
+
+
+
+
+ Determines whether the string is all white space. Empty string will return false.
+
+ The string to test whether it is all white space.
+
+ true if the string is all white space; otherwise, false.
+
+
+
+
+ Specifies the state of the .
+
+
+
+
+ An exception has been thrown, which has left the in an invalid state.
+ You may call the method to put the in the Closed state.
+ Any other method calls result in an being thrown.
+
+
+
+
+ The method has been called.
+
+
+
+
+ An object is being written.
+
+
+
+
+ An array is being written.
+
+
+
+
+ A constructor is being written.
+
+
+
+
+ A property is being written.
+
+
+
+
+ A write method has not been called.
+
+
+
+
+ This attribute allows us to define extension methods without
+ requiring .NET Framework 3.5. For more information, see the section,
+ Extension Methods in .NET Framework 2.0 Apps,
+ of Basic Instincts: Extension Methods
+ column in MSDN Magazine,
+ issue Nov 2007.
+
+
+
+ Specifies that an output will not be null even if the corresponding type allows it.
+
+
+ Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it.
+
+
+ Initializes the attribute with the specified return value condition.
+
+ The return value condition. If the method returns this value, the associated parameter will not be null.
+
+
+
+ Gets the return value condition.
+
+
+ Specifies that an output may be null even if the corresponding type disallows it.
+
+
+ Specifies that null is allowed as an input even if the corresponding type disallows it.
+
+
+
+ Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
+ the associated parameter matches this value.
+
+
+
+ Gets the condition parameter value.
+
+
+
diff --git a/packages/Newtonsoft.Json.12.0.3/lib/net35/Newtonsoft.Json.dll b/packages/Newtonsoft.Json.12.0.3/lib/net35/Newtonsoft.Json.dll
new file mode 100644
index 00000000..b965fb57
Binary files /dev/null and b/packages/Newtonsoft.Json.12.0.3/lib/net35/Newtonsoft.Json.dll differ
diff --git a/packages/Newtonsoft.Json.12.0.3/lib/net35/Newtonsoft.Json.xml b/packages/Newtonsoft.Json.12.0.3/lib/net35/Newtonsoft.Json.xml
new file mode 100644
index 00000000..47d4427a
--- /dev/null
+++ b/packages/Newtonsoft.Json.12.0.3/lib/net35/Newtonsoft.Json.xml
@@ -0,0 +1,9446 @@
+
+
+
+ Newtonsoft.Json
+
+
+
+
+ Represents a BSON Oid (object id).
+
+
+
+
+ Gets or sets the value of the Oid.
+
+ The value of the Oid.
+
+
+
+ Initializes a new instance of the class.
+
+ The Oid value.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized BSON data.
+
+
+
+
+ Gets or sets a value indicating whether binary data reading should be compatible with incorrect Json.NET 3.5 written binary.
+
+
+ true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether the root object will be read as a JSON array.
+
+
+ true if the root object will be read as a JSON array; otherwise, false.
+
+
+
+
+ Gets or sets the used when reading values from BSON.
+
+ The used when reading values from BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+ if set to true the root object will be read as a JSON array.
+ The used when reading values from BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+ if set to true the root object will be read as a JSON array.
+ The used when reading values from BSON.
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating BSON data.
+
+
+
+
+ Gets or sets the used when writing values to BSON.
+ When set to no conversion will occur.
+
+ The used when writing values to BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The to write to.
+
+
+
+ Initializes a new instance of the class.
+
+ The to write to.
+
+
+
+ Flushes whatever is in the buffer to the underlying and also flushes the underlying stream.
+
+
+
+
+ Writes the end.
+
+ The token.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Closes this writer.
+ If is set to true, the underlying is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value that represents a BSON object id.
+
+ The Object ID value to write.
+
+
+
+ Writes a BSON regex.
+
+ The regex pattern.
+ The regex options.
+
+
+
+ Specifies how constructors are used when initializing objects during deserialization by the .
+
+
+
+
+ First attempt to use the public default constructor, then fall back to a single parameterized constructor, then to the non-public default constructor.
+
+
+
+
+ Json.NET will use a non-public default constructor before falling back to a parameterized constructor.
+
+
+
+
+ Converts a binary value to and from a base 64 string value.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON and BSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Creates a custom object.
+
+ The object type to convert.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Creates an object which will then be populated by the serializer.
+
+ Type of the object.
+ The created object.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+
+ true if this can write JSON; otherwise, false.
+
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified value type.
+
+ Type of the value.
+
+ true if this instance can convert the specified value type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified value type.
+
+ Type of the value.
+
+ true if this instance can convert the specified value type; otherwise, false.
+
+
+
+
+ Provides a base class for converting a to and from JSON.
+
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an Entity Framework to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from the ISO 8601 date format (e.g. "2008-04-12T12:53Z").
+
+
+
+
+ Gets or sets the date time styles used when converting a date to and from JSON.
+
+ The date time styles used when converting a date to and from JSON.
+
+
+
+ Gets or sets the date time format used when converting a date to and from JSON.
+
+ The date time format used when converting a date to and from JSON.
+
+
+
+ Gets or sets the culture used when converting a date to and from JSON.
+
+ The culture used when converting a date to and from JSON.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from a JavaScript Date constructor (e.g. new Date(52231943)).
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON and BSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an to and from its name string value.
+
+
+
+
+ Gets or sets a value indicating whether the written enum text should be camel case.
+ The default value is false.
+
+ true if the written enum text will be camel case; otherwise, false.
+
+
+
+ Gets or sets the naming strategy used to resolve how enum text is written.
+
+ The naming strategy used to resolve how enum text is written.
+
+
+
+ Gets or sets a value indicating whether integer values are allowed when serializing and deserializing.
+ The default value is true.
+
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ true if the written enum text will be camel case; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The naming strategy used to resolve how enum text is written.
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from Unix epoch time
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from a string (e.g. "1.2.3.4").
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts XML to and from JSON.
+
+
+
+
+ Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produced multiple root elements.
+
+ The name of the deserialized root element.
+
+
+
+ Gets or sets a value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ true if the array attribute is written to the XML; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether to write the root JSON object.
+
+ true if the JSON root object is omitted; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ true if special characters are encoded; otherwise, false.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The calling serializer.
+ The value.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Checks if the is a namespace attribute.
+
+ Attribute name to test.
+ The attribute name prefix if it has one, otherwise an empty string.
+ true if attribute name is for a namespace attribute, otherwise false.
+
+
+
+ Determines whether this instance can convert the specified value type.
+
+ Type of the value.
+
+ true if this instance can convert the specified value type; otherwise, false.
+
+
+
+
+ Specifies how dates are formatted when writing JSON text.
+
+
+
+
+ Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z".
+
+
+
+
+ Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/".
+
+
+
+
+ Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text.
+
+
+
+
+ Date formatted strings are not parsed to a date type and are read as strings.
+
+
+
+
+ Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to .
+
+
+
+
+ Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to .
+
+
+
+
+ Specifies how to treat the time value when converting between string and .
+
+
+
+
+ Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time.
+
+
+
+
+ Treat as a UTC. If the object represents a local time, it is converted to a UTC.
+
+
+
+
+ Treat as a local time if a is being converted to a string.
+ If a string is being converted to , convert to a local time if a time zone is specified.
+
+
+
+
+ Time zone information should be preserved when converting.
+
+
+
+
+ The default JSON name table implementation.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets a string containing the same characters as the specified range of characters in the given array.
+
+ The character array containing the name to find.
+ The zero-based index into the array specifying the first character of the name.
+ The number of characters in the name.
+ A string containing the same characters as the specified range of characters in the given array.
+
+
+
+ Adds the specified string into name table.
+
+ The string to add.
+ This method is not thread-safe.
+ The resolved string.
+
+
+
+ Specifies default value handling options for the .
+
+
+
+
+
+
+
+
+ Include members where the member value is the same as the member's default value when serializing objects.
+ Included members are written to JSON. Has no effect when deserializing.
+
+
+
+
+ Ignore members where the member value is the same as the member's default value when serializing objects
+ so that it is not written to JSON.
+ This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers,
+ decimals and floating point numbers; and false for booleans). The default value ignored can be changed by
+ placing the on the property.
+
+
+
+
+ Members with a default value but no JSON will be set to their default value when deserializing.
+
+
+
+
+ Ignore members where the member value is the same as the member's default value when serializing objects
+ and set members to their default value when deserializing.
+
+
+
+
+ Specifies float format handling options when writing special floating point numbers, e.g. ,
+ and with .
+
+
+
+
+ Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity".
+
+
+
+
+ Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity.
+ Note that this will produce non-valid JSON.
+
+
+
+
+ Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a of property.
+
+
+
+
+ Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+
+
+
+
+ Floating point numbers are parsed to .
+
+
+
+
+ Floating point numbers are parsed to .
+
+
+
+
+ Specifies formatting options for the .
+
+
+
+
+ No special formatting is applied. This is the default.
+
+
+
+
+ Causes child objects to be indented according to the and settings.
+
+
+
+
+ Provides an interface for using pooled arrays.
+
+ The array type content.
+
+
+
+ Rent an array from the pool. This array must be returned when it is no longer needed.
+
+ The minimum required length of the array. The returned array may be longer.
+ The rented array from the pool. This array must be returned when it is no longer needed.
+
+
+
+ Return an array to the pool.
+
+ The array that is being returned.
+
+
+
+ Provides an interface to enable a class to return line and position information.
+
+
+
+
+ Gets a value indicating whether the class can return line information.
+
+
+ true if and can be provided; otherwise, false.
+
+
+
+
+ Gets the current line number.
+
+ The current line number or 0 if no line information is available (for example, when returns false).
+
+
+
+ Gets the current line position.
+
+ The current line position or 0 if no line information is available (for example, when returns false).
+
+
+
+ Instructs the how to serialize the collection.
+
+
+
+
+ Gets or sets a value indicating whether null items are allowed in the collection.
+
+ true if null items are allowed in the collection; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with a flag indicating whether the array can contain null items.
+
+ A flag indicating whether the array can contain null items.
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Instructs the to use the specified constructor when deserializing that object.
+
+
+
+
+ Instructs the how to serialize the object.
+
+
+
+
+ Gets or sets the id.
+
+ The id.
+
+
+
+ Gets or sets the title.
+
+ The title.
+
+
+
+ Gets or sets the description.
+
+ The description.
+
+
+
+ Gets or sets the collection's items converter.
+
+ The collection's items converter.
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonContainer(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets a value that indicates whether to preserve object references.
+
+
+ true to keep object reference; otherwise, false. The default is false.
+
+
+
+
+ Gets or sets a value that indicates whether to preserve collection's items references.
+
+
+ true to keep collection's items object references; otherwise, false. The default is false.
+
+
+
+
+ Gets or sets the reference loop handling used when serializing the collection's items.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the type name handling used when serializing the collection's items.
+
+ The type name handling.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Provides methods for converting between .NET types and JSON types.
+
+
+
+
+
+
+
+ Gets or sets a function that creates default .
+ Default settings are automatically used by serialization methods on ,
+ and and on .
+ To serialize without using any default settings create a with
+ .
+
+
+
+
+ Represents JavaScript's boolean value true as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's boolean value false as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's null as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's undefined as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's positive infinity as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's negative infinity as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's NaN as a string. This field is read-only.
+
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation using the specified.
+
+ The value to convert.
+ The format the date will be converted to.
+ The time zone handling when the date is converted to a string.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation using the specified.
+
+ The value to convert.
+ The format the date will be converted to.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ The string delimiter character.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ The string delimiter character.
+ The string escape handling.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Serializes the specified object to a JSON string.
+
+ The object to serialize.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using formatting.
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a collection of .
+
+ The object to serialize.
+ A collection of converters used while serializing.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using formatting and a collection of .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ A collection of converters used while serializing.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using .
+
+ The object to serialize.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a type, formatting and .
+
+ The object to serialize.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using formatting and .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a type, formatting and .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+ A JSON string representation of the object.
+
+
+
+
+ Deserializes the JSON to a .NET object.
+
+ The JSON to deserialize.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to a .NET object using .
+
+ The JSON to deserialize.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type.
+
+ The JSON to deserialize.
+ The of object being deserialized.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type.
+
+ The type of the object to deserialize to.
+ The JSON to deserialize.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the given anonymous type.
+
+
+ The anonymous type to deserialize to. This can't be specified
+ traditionally and must be inferred from the anonymous type passed
+ as a parameter.
+
+ The JSON to deserialize.
+ The anonymous type object.
+ The deserialized anonymous type from the JSON string.
+
+
+
+ Deserializes the JSON to the given anonymous type using .
+
+
+ The anonymous type to deserialize to. This can't be specified
+ traditionally and must be inferred from the anonymous type passed
+ as a parameter.
+
+ The JSON to deserialize.
+ The anonymous type object.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized anonymous type from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using a collection of .
+
+ The type of the object to deserialize to.
+ The JSON to deserialize.
+ Converters to use while deserializing.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using .
+
+ The type of the object to deserialize to.
+ The object to deserialize.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using a collection of .
+
+ The JSON to deserialize.
+ The type of the object to deserialize.
+ Converters to use while deserializing.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using .
+
+ The JSON to deserialize.
+ The type of the object to deserialize to.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Populates the object with values from the JSON string.
+
+ The JSON to populate values from.
+ The target object to populate values onto.
+
+
+
+ Populates the object with values from the JSON string using .
+
+ The JSON to populate values from.
+ The target object to populate values onto.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+
+
+
+ Serializes the to a JSON string.
+
+ The node to serialize.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting and omits the root object if is true.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ Omits writing the root object.
+ A JSON string of the .
+
+
+
+ Deserializes the from a JSON string.
+
+ The JSON string.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by .
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by
+ and writes a Json.NET array attribute for collections.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by ,
+ writes a Json.NET array attribute for collections, and encodes special characters.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+
+ A value to indicate whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ The deserialized .
+
+
+
+ Serializes the to a JSON string.
+
+ The node to convert to JSON.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting.
+
+ The node to convert to JSON.
+ Indicates how the output should be formatted.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting and omits the root object if is true.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ Omits writing the root object.
+ A JSON string of the .
+
+
+
+ Deserializes the from a JSON string.
+
+ The JSON string.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by .
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by
+ and writes a Json.NET array attribute for collections.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by ,
+ writes a Json.NET array attribute for collections, and encodes special characters.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+
+ A value to indicate whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ The deserialized .
+
+
+
+ Converts an object to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can read JSON.
+
+ true if this can read JSON; otherwise, false.
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+ true if this can write JSON; otherwise, false.
+
+
+
+ Converts an object to and from JSON.
+
+ The object type to convert.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read. If there is no existing value then null will be used.
+ The existing value has a value.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Instructs the to use the specified when serializing the member or class.
+
+
+
+
+ Gets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+
+
+
+
+ Initializes a new instance of the class.
+
+ Type of the .
+
+
+
+ Initializes a new instance of the class.
+
+ Type of the .
+ Parameter list to use when constructing the . Can be null.
+
+
+
+ Represents a collection of .
+
+
+
+
+ Instructs the how to serialize the collection.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ The exception thrown when an error occurs during JSON serialization or deserialization.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Instructs the to deserialize properties with no matching class member into the specified collection
+ and write values during serialization.
+
+
+
+
+ Gets or sets a value that indicates whether to write extension data when serializing the object.
+
+
+ true to write extension data when serializing the object; otherwise, false. The default is true.
+
+
+
+
+ Gets or sets a value that indicates whether to read extension data when deserializing the object.
+
+
+ true to read extension data when deserializing the object; otherwise, false. The default is true.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Instructs the not to serialize the public field or public read/write property value.
+
+
+
+
+ Base class for a table of atomized string objects.
+
+
+
+
+ Gets a string containing the same characters as the specified range of characters in the given array.
+
+ The character array containing the name to find.
+ The zero-based index into the array specifying the first character of the name.
+ The number of characters in the name.
+ A string containing the same characters as the specified range of characters in the given array.
+
+
+
+ Instructs the how to serialize the object.
+
+
+
+
+ Gets or sets the member serialization.
+
+ The member serialization.
+
+
+
+ Gets or sets the missing member handling used when deserializing this object.
+
+ The missing member handling.
+
+
+
+ Gets or sets how the object's properties with null values are handled during serialization and deserialization.
+
+ How the object's properties with null values are handled during serialization and deserialization.
+
+
+
+ Gets or sets a value that indicates whether the object's properties are required.
+
+
+ A value indicating whether the object's properties are required.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified member serialization.
+
+ The member serialization.
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Instructs the to always serialize the member with the specified name.
+
+
+
+
+ Gets or sets the type used when serializing the property's collection items.
+
+ The collection's items type.
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonProperty(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the null value handling used when serializing this property.
+
+ The null value handling.
+
+
+
+ Gets or sets the default value handling used when serializing this property.
+
+ The default value handling.
+
+
+
+ Gets or sets the reference loop handling used when serializing this property.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the object creation handling used when deserializing this property.
+
+ The object creation handling.
+
+
+
+ Gets or sets the type name handling used when serializing this property.
+
+ The type name handling.
+
+
+
+ Gets or sets whether this property's value is serialized as a reference.
+
+ Whether this property's value is serialized as a reference.
+
+
+
+ Gets or sets the order of serialization of a member.
+
+ The numeric order of serialization.
+
+
+
+ Gets or sets a value indicating whether this property is required.
+
+
+ A value indicating whether this property is required.
+
+
+
+
+ Gets or sets the name of the property.
+
+ The name of the property.
+
+
+
+ Gets or sets the reference loop handling used when serializing the property's collection items.
+
+ The collection's items reference loop handling.
+
+
+
+ Gets or sets the type name handling used when serializing the property's collection items.
+
+ The collection's items type name handling.
+
+
+
+ Gets or sets whether this property's collection items are serialized as a reference.
+
+ Whether this property's collection items are serialized as a reference.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ Name of the property.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
+
+
+
+
+ Specifies the state of the reader.
+
+
+
+
+ A read method has not been called.
+
+
+
+
+ The end of the file has been reached successfully.
+
+
+
+
+ Reader is at a property.
+
+
+
+
+ Reader is at the start of an object.
+
+
+
+
+ Reader is in an object.
+
+
+
+
+ Reader is at the start of an array.
+
+
+
+
+ Reader is in an array.
+
+
+
+
+ The method has been called.
+
+
+
+
+ Reader has just read a value.
+
+
+
+
+ Reader is at the start of a constructor.
+
+
+
+
+ Reader is in a constructor.
+
+
+
+
+ An error occurred that prevents the read operation from continuing.
+
+
+
+
+ The end of the file has been reached successfully.
+
+
+
+
+ Gets the current reader state.
+
+ The current reader state.
+
+
+
+ Gets or sets a value indicating whether the source should be closed when this reader is closed.
+
+
+ true to close the source when this reader is closed; otherwise false. The default is true.
+
+
+
+
+ Gets or sets a value indicating whether multiple pieces of JSON content can
+ be read from a continuous stream without erroring.
+
+
+ true to support reading multiple pieces of JSON content; otherwise false.
+ The default is false.
+
+
+
+
+ Gets the quotation mark character used to enclose the value of a string.
+
+
+
+
+ Gets or sets how time zones are handled when reading JSON.
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+
+
+
+
+ Gets or sets how custom date formatted strings are parsed when reading JSON.
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+
+
+
+
+ Gets the type of the current JSON token.
+
+
+
+
+ Gets the text value of the current JSON token.
+
+
+
+
+ Gets the .NET type for the current JSON token.
+
+
+
+
+ Gets the depth of the current token in the JSON document.
+
+ The depth of the current token in the JSON document.
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Gets or sets the culture used when reading JSON. Defaults to .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads the next JSON token from the source.
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a [].
+
+ A [] or null if the next JSON token is null. This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Skips the children of the current token.
+
+
+
+
+ Sets the current token.
+
+ The new token.
+
+
+
+ Sets the current token and value.
+
+ The new token.
+ The value.
+
+
+
+ Sets the current token and value.
+
+ The new token.
+ The value.
+ A flag indicating whether the position index inside an array should be updated.
+
+
+
+ Sets the state based on current token type.
+
+
+
+
+ Releases unmanaged and - optionally - managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the source is also closed.
+
+
+
+
+ The exception thrown when an error occurs while reading JSON text.
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The line number indicating where the error occurred.
+ The line position indicating where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Instructs the to always serialize the member, and to require that the member has a value.
+
+
+
+
+ The exception thrown when an error occurs during JSON serialization or deserialization.
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The line number indicating where the error occurred.
+ The line position indicating where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Serializes and deserializes objects into and from the JSON format.
+ The enables you to control how objects are encoded into JSON.
+
+
+
+
+ Occurs when the errors during serialization and deserialization.
+
+
+
+
+ Gets or sets the used by the serializer when resolving references.
+
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+
+
+
+ Gets or sets the used by the serializer when writing trace messages.
+
+ The trace writer.
+
+
+
+ Gets or sets the equality comparer used by the serializer when comparing references.
+
+ The equality comparer.
+
+
+
+ Gets or sets how type name writing and reading is handled by the serializer.
+ The default value is .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how object references are preserved by the serializer.
+ The default value is .
+
+
+
+
+ Gets or sets how reference loops (e.g. a class referencing itself) is handled.
+ The default value is .
+
+
+
+
+ Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how null values are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how default values are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how objects are created during deserialization.
+ The default value is .
+
+ The object creation handling.
+
+
+
+ Gets or sets how constructors are used during deserialization.
+ The default value is .
+
+ The constructor handling.
+
+
+
+ Gets or sets how metadata properties are used during deserialization.
+ The default value is .
+
+ The metadata properties handling.
+
+
+
+ Gets a collection that will be used during serialization.
+
+ Collection that will be used during serialization.
+
+
+
+ Gets or sets the contract resolver used by the serializer when
+ serializing .NET objects to JSON and vice versa.
+
+
+
+
+ Gets or sets the used by the serializer when invoking serialization callback methods.
+
+ The context.
+
+
+
+ Indicates how JSON text output is formatted.
+ The default value is .
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how time zones are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written as JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how and values are formatted when writing JSON text,
+ and the expected date format when reading JSON text.
+ The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
+
+
+
+
+ Gets or sets the culture used when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+ A null value means there is no maximum.
+ The default value is null.
+
+
+
+
+ Gets a value indicating whether there will be a check for additional JSON content after deserializing an object.
+ The default value is false.
+
+
+ true if there will be a check for additional JSON content after deserializing an object; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Creates a new instance.
+ The will not use default settings
+ from .
+
+
+ A new instance.
+ The will not use default settings
+ from .
+
+
+
+
+ Creates a new instance using the specified .
+ The will not use default settings
+ from .
+
+ The settings to be applied to the .
+
+ A new instance using the specified .
+ The will not use default settings
+ from .
+
+
+
+
+ Creates a new instance.
+ The will use default settings
+ from .
+
+
+ A new instance.
+ The will use default settings
+ from .
+
+
+
+
+ Creates a new instance using the specified .
+ The will use default settings
+ from as well as the specified .
+
+ The settings to be applied to the .
+
+ A new instance using the specified .
+ The will use default settings
+ from as well as the specified .
+
+
+
+
+ Populates the JSON values onto the target object.
+
+ The that contains the JSON structure to read values from.
+ The target object to populate values onto.
+
+
+
+ Populates the JSON values onto the target object.
+
+ The that contains the JSON structure to read values from.
+ The target object to populate values onto.
+
+
+
+ Deserializes the JSON structure contained by the specified .
+
+ The that contains the JSON structure to deserialize.
+ The being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The of object being deserialized.
+ The instance of being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The type of the object to deserialize.
+ The instance of being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The of object being deserialized.
+ The instance of being deserialized.
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+ The type of the value being serialized.
+ This parameter is used when is Auto to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+
+
+ Specifies the settings on a object.
+
+
+
+
+ Gets or sets how reference loops (e.g. a class referencing itself) are handled.
+ The default value is .
+
+ Reference loop handling.
+
+
+
+ Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
+ The default value is .
+
+ Missing member handling.
+
+
+
+ Gets or sets how objects are created during deserialization.
+ The default value is .
+
+ The object creation handling.
+
+
+
+ Gets or sets how null values are handled during serialization and deserialization.
+ The default value is .
+
+ Null value handling.
+
+
+
+ Gets or sets how default values are handled during serialization and deserialization.
+ The default value is .
+
+ The default value handling.
+
+
+
+ Gets or sets a collection that will be used during serialization.
+
+ The converters.
+
+
+
+ Gets or sets how object references are preserved by the serializer.
+ The default value is .
+
+ The preserve references handling.
+
+
+
+ Gets or sets how type name writing and reading is handled by the serializer.
+ The default value is .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+ The type name handling.
+
+
+
+ Gets or sets how metadata properties are used during deserialization.
+ The default value is .
+
+ The metadata properties handling.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how constructors are used during deserialization.
+ The default value is .
+
+ The constructor handling.
+
+
+
+ Gets or sets the contract resolver used by the serializer when
+ serializing .NET objects to JSON and vice versa.
+
+ The contract resolver.
+
+
+
+ Gets or sets the equality comparer used by the serializer when comparing references.
+
+ The equality comparer.
+
+
+
+ Gets or sets the used by the serializer when resolving references.
+
+ The reference resolver.
+
+
+
+ Gets or sets a function that creates the used by the serializer when resolving references.
+
+ A function that creates the used by the serializer when resolving references.
+
+
+
+ Gets or sets the used by the serializer when writing trace messages.
+
+ The trace writer.
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+ The binder.
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+ The binder.
+
+
+
+ Gets or sets the error handler called during serialization and deserialization.
+
+ The error handler called during serialization and deserialization.
+
+
+
+ Gets or sets the used by the serializer when invoking serialization callback methods.
+
+ The context.
+
+
+
+ Gets or sets how and values are formatted when writing JSON text,
+ and the expected date format when reading JSON text.
+ The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+ A null value means there is no maximum.
+ The default value is null.
+
+
+
+
+ Indicates how JSON text output is formatted.
+ The default value is .
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how time zones are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written as JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets the culture used when reading JSON.
+ The default value is .
+
+
+
+
+ Gets a value indicating whether there will be a check for additional content after deserializing an object.
+ The default value is false.
+
+
+ true if there will be a check for additional content after deserializing an object; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to JSON text data.
+
+
+
+
+ Initializes a new instance of the class with the specified .
+
+ The containing the JSON data to read.
+
+
+
+ Gets or sets the reader's property name table.
+
+
+
+
+ Gets or sets the reader's character buffer pool.
+
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a [].
+
+ A [] or null if the next JSON token is null. This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Gets a value indicating whether the class can return line information.
+
+
+ true if and can be provided; otherwise, false.
+
+
+
+
+ Gets the current line number.
+
+
+ The current line number or 0 if no line information is available (for example, returns false).
+
+
+
+
+ Gets the current line position.
+
+
+ The current line position or 0 if no line information is available (for example, returns false).
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Gets or sets the writer's character array pool.
+
+
+
+
+ Gets or sets how many s to write for each level in the hierarchy when is set to .
+
+
+
+
+ Gets or sets which character to use to quote attribute values.
+
+
+
+
+ Gets or sets which character to use for indenting when is set to .
+
+
+
+
+ Gets or sets a value indicating whether object names will be surrounded with quotes.
+
+
+
+
+ Initializes a new instance of the class using the specified .
+
+ The to write to.
+
+
+
+ Flushes whatever is in the buffer to the underlying and also flushes the underlying .
+
+
+
+
+ Closes this writer.
+ If is set to true, the underlying is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the specified end token.
+
+ The end token to write.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+
+
+
+ Writes indent characters.
+
+
+
+
+ Writes the JSON value delimiter.
+
+
+
+
+ Writes an indent space.
+
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the given white space.
+
+ The string of white space characters.
+
+
+
+ Specifies the type of JSON token.
+
+
+
+
+ This is returned by the if a read method has not been called.
+
+
+
+
+ An object start token.
+
+
+
+
+ An array start token.
+
+
+
+
+ A constructor start token.
+
+
+
+
+ An object property name.
+
+
+
+
+ A comment.
+
+
+
+
+ Raw JSON.
+
+
+
+
+ An integer.
+
+
+
+
+ A float.
+
+
+
+
+ A string.
+
+
+
+
+ A boolean.
+
+
+
+
+ A null token.
+
+
+
+
+ An undefined token.
+
+
+
+
+ An object end token.
+
+
+
+
+ An array end token.
+
+
+
+
+ A constructor end token.
+
+
+
+
+ A Date.
+
+
+
+
+ Byte data.
+
+
+
+
+
+ Represents a reader that provides validation.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Sets an event handler for receiving schema validation errors.
+
+
+
+
+ Gets the text value of the current JSON token.
+
+
+
+
+
+ Gets the depth of the current token in the JSON document.
+
+ The depth of the current token in the JSON document.
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Gets the quotation mark character used to enclose the value of a string.
+
+
+
+
+
+ Gets the type of the current JSON token.
+
+
+
+
+
+ Gets the .NET type for the current JSON token.
+
+
+
+
+
+ Initializes a new instance of the class that
+ validates the content returned from the given .
+
+ The to read from while validating.
+
+
+
+ Gets or sets the schema.
+
+ The schema.
+
+
+
+ Gets the used to construct this .
+
+ The specified in the constructor.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a [].
+
+
+ A [] or null if the next JSON token is null.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Gets or sets a value indicating whether the destination should be closed when this writer is closed.
+
+
+ true to close the destination when this writer is closed; otherwise false. The default is true.
+
+
+
+
+ Gets or sets a value indicating whether the JSON should be auto-completed when this writer is closed.
+
+
+ true to auto-complete the JSON when this writer is closed; otherwise false. The default is true.
+
+
+
+
+ Gets the top.
+
+ The top.
+
+
+
+ Gets the state of the writer.
+
+
+
+
+ Gets the path of the writer.
+
+
+
+
+ Gets or sets a value indicating how JSON text output should be formatted.
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+
+
+
+
+ Gets or sets how time zones are handled when writing JSON text.
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written to JSON text.
+
+
+
+
+ Gets or sets how and values are formatted when writing JSON text.
+
+
+
+
+ Gets or sets the culture used when writing JSON. Defaults to .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Flushes whatever is in the buffer to the destination and also flushes the destination.
+
+
+
+
+ Closes this writer.
+ If is set to true, the destination is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the end of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the end of an array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the end constructor.
+
+
+
+
+ Writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+
+
+
+ Writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+
+
+
+ Writes the end of the current JSON object or array.
+
+
+
+
+ Writes the current token and its children.
+
+ The to read the token from.
+
+
+
+ Writes the current token.
+
+ The to read the token from.
+ A flag indicating whether the current token's children should be written.
+
+
+
+ Writes the token and its value.
+
+ The to write.
+
+ The value to write.
+ A value is only required for tokens that have an associated value, e.g. the property name for .
+ null can be passed to the method for tokens that don't have a value, e.g. .
+
+
+
+
+ Writes the token.
+
+ The to write.
+
+
+
+ Writes the specified end token.
+
+ The end token to write.
+
+
+
+ Writes indent characters.
+
+
+
+
+ Writes the JSON value delimiter.
+
+
+
+
+ Writes an indent space.
+
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the given white space.
+
+ The string of white space characters.
+
+
+
+ Releases unmanaged and - optionally - managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Sets the state of the .
+
+ The being written.
+ The value being written.
+
+
+
+ The exception thrown when an error occurs while writing JSON text.
+
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Specifies how JSON comments are handled when loading JSON.
+
+
+
+
+ Ignore comments.
+
+
+
+
+ Load comments as a with type .
+
+
+
+
+ Specifies how duplicate property names are handled when loading JSON.
+
+
+
+
+ Replace the existing value when there is a duplicate property. The value of the last property in the JSON object will be used.
+
+
+
+
+ Ignore the new value when there is a duplicate property. The value of the first property in the JSON object will be used.
+
+
+
+
+ Throw a when a duplicate property is encountered.
+
+
+
+
+ Contains the LINQ to JSON extension methods.
+
+
+
+
+ Returns a collection of tokens that contains the ancestors of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains the ancestors of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains every token in the source collection, the ancestors of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains the descendants of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains the descendants of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains every token in the source collection, and the descendants of every token in the source collection.
+
+
+
+ Returns a collection of child properties of every object in the source collection.
+
+ An of that contains the source collection.
+ An of that contains the properties of every object in the source collection.
+
+
+
+ Returns a collection of child values of every object in the source collection with the given key.
+
+ An of that contains the source collection.
+ The token key.
+ An of that contains the values of every token in the source collection with the given key.
+
+
+
+ Returns a collection of child values of every object in the source collection.
+
+ An of that contains the source collection.
+ An of that contains the values of every token in the source collection.
+
+
+
+ Returns a collection of converted child values of every object in the source collection with the given key.
+
+ The type to convert the values to.
+ An of that contains the source collection.
+ The token key.
+ An that contains the converted values of every token in the source collection with the given key.
+
+
+
+ Returns a collection of converted child values of every object in the source collection.
+
+ The type to convert the values to.
+ An of that contains the source collection.
+ An that contains the converted values of every token in the source collection.
+
+
+
+ Converts the value.
+
+ The type to convert the value to.
+ A cast as a of .
+ A converted value.
+
+
+
+ Converts the value.
+
+ The source collection type.
+ The type to convert the value to.
+ A cast as a of .
+ A converted value.
+
+
+
+ Returns a collection of child tokens of every array in the source collection.
+
+ The source collection type.
+ An of that contains the source collection.
+ An of that contains the values of every token in the source collection.
+
+
+
+ Returns a collection of converted child tokens of every array in the source collection.
+
+ An of that contains the source collection.
+ The type to convert the values to.
+ The source collection type.
+ An that contains the converted values of every token in the source collection.
+
+
+
+ Returns the input typed as .
+
+ An of that contains the source collection.
+ The input typed as .
+
+
+
+ Returns the input typed as .
+
+ The source collection type.
+ An of that contains the source collection.
+ The input typed as .
+
+
+
+ Represents a collection of objects.
+
+ The type of token.
+
+
+
+ Gets the of with the specified key.
+
+
+
+
+
+ Represents a JSON array.
+
+
+
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the array.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the array.
+
+
+
+ Loads an from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads an from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+
+
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the values of the specified object.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ The that will be used to read the object.
+ A with the values of the specified object.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets or sets the at the specified index.
+
+
+
+
+
+ Determines the index of a specific item in the .
+
+ The object to locate in the .
+
+ The index of if found in the list; otherwise, -1.
+
+
+
+
+ Inserts an item to the at the specified index.
+
+ The zero-based index at which should be inserted.
+ The object to insert into the .
+
+ is not a valid index in the .
+
+
+
+
+ Removes the item at the specified index.
+
+ The zero-based index of the item to remove.
+
+ is not a valid index in the .
+
+
+
+
+ Returns an enumerator that iterates through the collection.
+
+
+ A of that can be used to iterate through the collection.
+
+
+
+
+ Adds an item to the .
+
+ The object to add to the .
+
+
+
+ Removes all items from the .
+
+
+
+
+ Determines whether the contains a specific value.
+
+ The object to locate in the .
+
+ true if is found in the ; otherwise, false.
+
+
+
+
+ Copies the elements of the to an array, starting at a particular array index.
+
+ The array.
+ Index of the array.
+
+
+
+ Gets a value indicating whether the is read-only.
+
+ true if the is read-only; otherwise, false.
+
+
+
+ Removes the first occurrence of a specific object from the .
+
+ The object to remove from the .
+
+ true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original .
+
+
+
+
+ Represents a JSON constructor.
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets or sets the name of this constructor.
+
+ The constructor name.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified name and content.
+
+ The constructor name.
+ The contents of the constructor.
+
+
+
+ Initializes a new instance of the class with the specified name and content.
+
+ The constructor name.
+ The contents of the constructor.
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ The constructor name.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Represents a token that can contain other tokens.
+
+
+
+
+ Occurs when the list changes or an item in the list changes.
+
+
+
+
+ Occurs before an item is added to the collection.
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Get the first child token of this token.
+
+
+ A containing the first child token of the .
+
+
+
+
+ Get the last child token of this token.
+
+
+ A containing the last child token of the .
+
+
+
+
+ Returns a collection of the child tokens of this token, in document order.
+
+
+ An of containing the child tokens of this , in document order.
+
+
+
+
+ Returns a collection of the child values of this token, in document order.
+
+ The type to convert the values to.
+
+ A containing the child values of this , in document order.
+
+
+
+
+ Returns a collection of the descendant tokens for this token in document order.
+
+ An of containing the descendant tokens of the .
+
+
+
+ Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order.
+
+ An of containing this token, and all the descendant tokens of the .
+
+
+
+ Adds the specified content as children of this .
+
+ The content to be added.
+
+
+
+ Adds the specified content as the first children of this .
+
+ The content to be added.
+
+
+
+ Creates a that can be used to add tokens to the .
+
+ A that is ready to have content written to it.
+
+
+
+ Replaces the child nodes of this token with the specified content.
+
+ The content.
+
+
+
+ Removes the child nodes from this token.
+
+
+
+
+ Merge the specified content into this .
+
+ The content to be merged.
+
+
+
+ Merge the specified content into this using .
+
+ The content to be merged.
+ The used to merge the content.
+
+
+
+ Gets the count of child JSON tokens.
+
+ The count of child JSON tokens.
+
+
+
+ Represents a collection of objects.
+
+ The type of token.
+
+
+
+ An empty collection of objects.
+
+
+
+
+ Initializes a new instance of the struct.
+
+ The enumerable.
+
+
+
+ Returns an enumerator that can be used to iterate through the collection.
+
+
+ A that can be used to iterate through the collection.
+
+
+
+
+ Gets the of with the specified key.
+
+
+
+
+
+ Determines whether the specified is equal to this instance.
+
+ The to compare with this instance.
+
+ true if the specified is equal to this instance; otherwise, false.
+
+
+
+
+ Determines whether the specified is equal to this instance.
+
+ The to compare with this instance.
+
+ true if the specified is equal to this instance; otherwise, false.
+
+
+
+
+ Returns a hash code for this instance.
+
+
+ A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
+
+
+
+
+ Represents a JSON object.
+
+
+
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Occurs when a property value changes.
+
+
+
+
+ Occurs when a property value is changing.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the object.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the object.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets an of of this object's properties.
+
+ An of of this object's properties.
+
+
+
+ Gets a with the specified name.
+
+ The property name.
+ A with the specified name or null.
+
+
+
+ Gets the with the specified name.
+ The exact name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ The property name.
+ One of the enumeration values that specifies how the strings will be compared.
+ A matched with the specified name or null.
+
+
+
+ Gets a of of this object's property values.
+
+ A of of this object's property values.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets or sets the with the specified property name.
+
+
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+ is not valid JSON.
+
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+ is not valid JSON.
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+ is not valid JSON.
+
+
+
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+ is not valid JSON.
+
+
+
+
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the values of the specified object.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ The that will be used to read the object.
+ A with the values of the specified object.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified property name.
+
+ Name of the property.
+ The with the specified property name.
+
+
+
+ Gets the with the specified property name.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ Name of the property.
+ One of the enumeration values that specifies how the strings will be compared.
+ The with the specified property name.
+
+
+
+ Tries to get the with the specified property name.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ Name of the property.
+ The value.
+ One of the enumeration values that specifies how the strings will be compared.
+ true if a value was successfully retrieved; otherwise, false.
+
+
+
+ Adds the specified property name.
+
+ Name of the property.
+ The value.
+
+
+
+ Determines whether the JSON object has the specified property name.
+
+ Name of the property.
+ true if the JSON object has the specified property name; otherwise, false.
+
+
+
+ Removes the property with the specified name.
+
+ Name of the property.
+ true if item was successfully removed; otherwise, false.
+
+
+
+ Tries to get the with the specified property name.
+
+ Name of the property.
+ The value.
+ true if a value was successfully retrieved; otherwise, false.
+
+
+
+ Returns an enumerator that can be used to iterate through the collection.
+
+
+ A that can be used to iterate through the collection.
+
+
+
+
+ Raises the event with the provided arguments.
+
+ Name of the property.
+
+
+
+ Raises the event with the provided arguments.
+
+ Name of the property.
+
+
+
+ Represents a JSON property.
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets the property name.
+
+ The property name.
+
+
+
+ Gets or sets the property value.
+
+ The property value.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+ The property name.
+ The property content.
+
+
+
+ Initializes a new instance of the class.
+
+ The property name.
+ The property content.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Represents a view of a .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The name.
+
+
+
+ When overridden in a derived class, returns whether resetting an object changes its value.
+
+
+ true if resetting the component changes its value; otherwise, false.
+
+ The component to test for reset capability.
+
+
+
+ When overridden in a derived class, gets the current value of the property on a component.
+
+
+ The value of a property for a given component.
+
+ The component with the property for which to retrieve the value.
+
+
+
+ When overridden in a derived class, resets the value for this property of the component to the default value.
+
+ The component with the property value that is to be reset to the default value.
+
+
+
+ When overridden in a derived class, sets the value of the component to a different value.
+
+ The component with the property value that is to be set.
+ The new value.
+
+
+
+ When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted.
+
+
+ true if the property should be persisted; otherwise, false.
+
+ The component with the property to be examined for persistence.
+
+
+
+ When overridden in a derived class, gets the type of the component this property is bound to.
+
+
+ A that represents the type of component this property is bound to.
+ When the or
+
+ methods are invoked, the object specified might be an instance of this type.
+
+
+
+
+ When overridden in a derived class, gets a value indicating whether this property is read-only.
+
+
+ true if the property is read-only; otherwise, false.
+
+
+
+
+ When overridden in a derived class, gets the type of the property.
+
+
+ A that represents the type of the property.
+
+
+
+
+ Gets the hash code for the name of the member.
+
+
+
+ The hash code for the name of the member.
+
+
+
+
+ Represents a raw JSON string.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class.
+
+ The raw json.
+
+
+
+ Creates an instance of with the content of the reader's current token.
+
+ The reader.
+ An instance of with the content of the reader's current token.
+
+
+
+ Specifies the settings used when loading JSON.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets or sets how JSON comments are handled when loading JSON.
+ The default value is .
+
+ The JSON comment handling.
+
+
+
+ Gets or sets how JSON line info is handled when loading JSON.
+ The default value is .
+
+ The JSON line info handling.
+
+
+
+ Gets or sets how duplicate property names in JSON objects are handled when loading JSON.
+ The default value is .
+
+ The JSON duplicate property name handling.
+
+
+
+ Specifies the settings used when merging JSON.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets or sets the method used when merging JSON arrays.
+
+ The method used when merging JSON arrays.
+
+
+
+ Gets or sets how null value properties are merged.
+
+ How null value properties are merged.
+
+
+
+ Gets or sets the comparison used to match property names while merging.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ The comparison used to match property names while merging.
+
+
+
+ Represents an abstract JSON token.
+
+
+
+
+ Gets a comparer that can compare two tokens for value equality.
+
+ A that can compare two nodes for value equality.
+
+
+
+ Gets or sets the parent.
+
+ The parent.
+
+
+
+ Gets the root of this .
+
+ The root of this .
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Compares the values of two tokens, including the values of all descendant tokens.
+
+ The first to compare.
+ The second to compare.
+ true if the tokens are equal; otherwise false.
+
+
+
+ Gets the next sibling token of this node.
+
+ The that contains the next sibling token.
+
+
+
+ Gets the previous sibling token of this node.
+
+ The that contains the previous sibling token.
+
+
+
+ Gets the path of the JSON token.
+
+
+
+
+ Adds the specified content immediately after this token.
+
+ A content object that contains simple content or a collection of content objects to be added after this token.
+
+
+
+ Adds the specified content immediately before this token.
+
+ A content object that contains simple content or a collection of content objects to be added before this token.
+
+
+
+ Returns a collection of the ancestor tokens of this token.
+
+ A collection of the ancestor tokens of this token.
+
+
+
+ Returns a collection of tokens that contain this token, and the ancestors of this token.
+
+ A collection of tokens that contain this token, and the ancestors of this token.
+
+
+
+ Returns a collection of the sibling tokens after this token, in document order.
+
+ A collection of the sibling tokens after this tokens, in document order.
+
+
+
+ Returns a collection of the sibling tokens before this token, in document order.
+
+ A collection of the sibling tokens before this token, in document order.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets the with the specified key converted to the specified type.
+
+ The type to convert the token to.
+ The token key.
+ The converted token value.
+
+
+
+ Get the first child token of this token.
+
+ A containing the first child token of the .
+
+
+
+ Get the last child token of this token.
+
+ A containing the last child token of the .
+
+
+
+ Returns a collection of the child tokens of this token, in document order.
+
+ An of containing the child tokens of this , in document order.
+
+
+
+ Returns a collection of the child tokens of this token, in document order, filtered by the specified type.
+
+ The type to filter the child tokens on.
+ A containing the child tokens of this , in document order.
+
+
+
+ Returns a collection of the child values of this token, in document order.
+
+ The type to convert the values to.
+ A containing the child values of this , in document order.
+
+
+
+ Removes this token from its parent.
+
+
+
+
+ Replaces this token with the specified token.
+
+ The value.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Returns the indented JSON for this token.
+
+
+ ToString() returns a non-JSON string value for tokens with a type of .
+ If you want the JSON for all token types then you should use .
+
+
+ The indented JSON for this token.
+
+
+
+
+ Returns the JSON for this token using the given formatting and converters.
+
+ Indicates how the output should be formatted.
+ A collection of s which will be used when writing the token.
+ The JSON for this token using the given formatting and converters.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to [].
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from [] to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Creates a for this token.
+
+ A that can be used to read this token and its descendants.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the value of the specified object.
+
+
+
+ Creates a from an object using the specified .
+
+ The object that will be used to create .
+ The that will be used when reading the object.
+ A with the value of the specified object.
+
+
+
+ Creates an instance of the specified .NET type from the .
+
+ The object type that the token will be deserialized to.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the .
+
+ The object type that the token will be deserialized to.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the using the specified .
+
+ The object type that the token will be deserialized to.
+ The that will be used when creating the object.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the using the specified .
+
+ The object type that the token will be deserialized to.
+ The that will be used when creating the object.
+ The new object created from the JSON value.
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Creates a from a .
+
+ An positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Selects a using a JSONPath expression. Selects the token that matches the object path.
+
+
+ A that contains a JSONPath expression.
+
+ A , or null.
+
+
+
+ Selects a using a JSONPath expression. Selects the token that matches the object path.
+
+
+ A that contains a JSONPath expression.
+
+ A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.
+ A .
+
+
+
+ Selects a collection of elements using a JSONPath expression.
+
+
+ A that contains a JSONPath expression.
+
+ An of that contains the selected elements.
+
+
+
+ Selects a collection of elements using a JSONPath expression.
+
+
+ A that contains a JSONPath expression.
+
+ A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.
+ An of that contains the selected elements.
+
+
+
+ Creates a new instance of the . All child tokens are recursively cloned.
+
+ A new instance of the .
+
+
+
+ Adds an object to the annotation list of this .
+
+ The annotation to add.
+
+
+
+ Get the first annotation object of the specified type from this .
+
+ The type of the annotation to retrieve.
+ The first annotation object that matches the specified type, or null if no annotation is of the specified type.
+
+
+
+ Gets the first annotation object of the specified type from this .
+
+ The of the annotation to retrieve.
+ The first annotation object that matches the specified type, or null if no annotation is of the specified type.
+
+
+
+ Gets a collection of annotations of the specified type for this .
+
+ The type of the annotations to retrieve.
+ An that contains the annotations for this .
+
+
+
+ Gets a collection of annotations of the specified type for this .
+
+ The of the annotations to retrieve.
+ An of that contains the annotations that match the specified type for this .
+
+
+
+ Removes the annotations of the specified type from this .
+
+ The type of annotations to remove.
+
+
+
+ Removes the annotations of the specified type from this .
+
+ The of annotations to remove.
+
+
+
+ Compares tokens to determine whether they are equal.
+
+
+
+
+ Determines whether the specified objects are equal.
+
+ The first object of type to compare.
+ The second object of type to compare.
+
+ true if the specified objects are equal; otherwise, false.
+
+
+
+
+ Returns a hash code for the specified object.
+
+ The for which a hash code is to be returned.
+ A hash code for the specified object.
+ The type of is a reference type and is null.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
+
+
+
+
+ Gets the at the reader's current position.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The token to read from.
+
+
+
+ Initializes a new instance of the class.
+
+ The token to read from.
+ The initial path of the token. It is prepended to the returned .
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Specifies the type of token.
+
+
+
+
+ No token type has been set.
+
+
+
+
+ A JSON object.
+
+
+
+
+ A JSON array.
+
+
+
+
+ A JSON constructor.
+
+
+
+
+ A JSON object property.
+
+
+
+
+ A comment.
+
+
+
+
+ An integer value.
+
+
+
+
+ A float value.
+
+
+
+
+ A string value.
+
+
+
+
+ A boolean value.
+
+
+
+
+ A null value.
+
+
+
+
+ An undefined value.
+
+
+
+
+ A date value.
+
+
+
+
+ A raw JSON value.
+
+
+
+
+ A collection of bytes value.
+
+
+
+
+ A Guid value.
+
+
+
+
+ A Uri value.
+
+
+
+
+ A TimeSpan value.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Gets the at the writer's current position.
+
+
+
+
+ Gets the token being written.
+
+ The token being written.
+
+
+
+ Initializes a new instance of the class writing to the given .
+
+ The container being written to.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Flushes whatever is in the buffer to the underlying .
+
+
+
+
+ Closes this writer.
+ If is set to true, the JSON is auto-completed.
+
+
+ Setting to true has no additional effect, since the underlying is a type that cannot be closed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the end.
+
+ The token.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Writes a value.
+ An error will be raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Represents a value in JSON (string, integer, date, etc).
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Creates a comment with the given value.
+
+ The value.
+ A comment with the given value.
+
+
+
+ Creates a string with the given value.
+
+ The value.
+ A string with the given value.
+
+
+
+ Creates a null value.
+
+ A null value.
+
+
+
+ Creates a undefined value.
+
+ A undefined value.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets or sets the underlying token value.
+
+ The underlying token value.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of s which will be used when writing the token.
+
+
+
+ Indicates whether the current object is equal to another object of the same type.
+
+
+ true if the current object is equal to the parameter; otherwise, false.
+
+ An object to compare with this object.
+
+
+
+ Determines whether the specified is equal to the current .
+
+ The to compare with the current .
+
+ true if the specified is equal to the current ; otherwise, false.
+
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Returns a that represents this instance.
+
+
+ ToString() returns a non-JSON string value for tokens with a type of .
+ If you want the JSON for all token types then you should use .
+
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format.
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format provider.
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format.
+ The format provider.
+
+ A that represents this instance.
+
+
+
+
+ Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
+
+ An object to compare with this instance.
+
+ A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings:
+ Value
+ Meaning
+ Less than zero
+ This instance is less than .
+ Zero
+ This instance is equal to .
+ Greater than zero
+ This instance is greater than .
+
+
+ is not of the same type as this instance.
+
+
+
+
+ Specifies how line information is handled when loading JSON.
+
+
+
+
+ Ignore line information.
+
+
+
+
+ Load line information.
+
+
+
+
+ Specifies how JSON arrays are merged together.
+
+
+
+ Concatenate arrays.
+
+
+ Union arrays, skipping items that already exist.
+
+
+ Replace all array items.
+
+
+ Merge array items together, matched by index.
+
+
+
+ Specifies how null value properties are merged.
+
+
+
+
+ The content's null value properties will be ignored during merging.
+
+
+
+
+ The content's null value properties will be merged.
+
+
+
+
+ Specifies the member serialization options for the .
+
+
+
+
+ All public members are serialized by default. Members can be excluded using or .
+ This is the default member serialization mode.
+
+
+
+
+ Only members marked with or are serialized.
+ This member serialization mode can also be set by marking the class with .
+
+
+
+
+ All public and private fields are serialized. Members can be excluded using or .
+ This member serialization mode can also be set by marking the class with
+ and setting IgnoreSerializableAttribute on to false.
+
+
+
+
+ Specifies metadata property handling options for the .
+
+
+
+
+ Read metadata properties located at the start of a JSON object.
+
+
+
+
+ Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance.
+
+
+
+
+ Do not try to read metadata properties.
+
+
+
+
+ Specifies missing member handling options for the .
+
+
+
+
+ Ignore a missing member and do not attempt to deserialize it.
+
+
+
+
+ Throw a when a missing member is encountered during deserialization.
+
+
+
+
+ Specifies null value handling options for the .
+
+
+
+
+
+
+
+
+ Include null values when serializing and deserializing objects.
+
+
+
+
+ Ignore null values when serializing and deserializing objects.
+
+
+
+
+ Specifies how object creation is handled by the .
+
+
+
+
+ Reuse existing objects, create new objects when needed.
+
+
+
+
+ Only reuse existing objects.
+
+
+
+
+ Always create new objects.
+
+
+
+
+ Specifies reference handling options for the .
+ Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement .
+
+
+
+
+
+
+
+ Do not preserve references when serializing types.
+
+
+
+
+ Preserve references when serializing into a JSON object structure.
+
+
+
+
+ Preserve references when serializing into a JSON array structure.
+
+
+
+
+ Preserve references when serializing.
+
+
+
+
+ Specifies reference loop handling options for the .
+
+
+
+
+ Throw a when a loop is encountered.
+
+
+
+
+ Ignore loop references and do not serialize.
+
+
+
+
+ Serialize loop references.
+
+
+
+
+ Indicating whether a property is required.
+
+
+
+
+ The property is not required. The default state.
+
+
+
+
+ The property must be defined in JSON but can be a null value.
+
+
+
+
+ The property must be defined in JSON and cannot be a null value.
+
+
+
+
+ The property is not required but it cannot be a null value.
+
+
+
+
+
+ Contains the JSON schema extension methods.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+
+ Determines whether the is valid.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+
+ true if the specified is valid; otherwise, false.
+
+
+
+
+
+ Determines whether the is valid.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+ When this method returns, contains any error messages generated while validating.
+
+ true if the specified is valid; otherwise, false.
+
+
+
+
+
+ Validates the specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+
+
+
+
+ Validates the specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+ The validation event handler.
+
+
+
+
+ An in-memory representation of a JSON Schema.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets the id.
+
+
+
+
+ Gets or sets the title.
+
+
+
+
+ Gets or sets whether the object is required.
+
+
+
+
+ Gets or sets whether the object is read-only.
+
+
+
+
+ Gets or sets whether the object is visible to users.
+
+
+
+
+ Gets or sets whether the object is transient.
+
+
+
+
+ Gets or sets the description of the object.
+
+
+
+
+ Gets or sets the types of values allowed by the object.
+
+ The type.
+
+
+
+ Gets or sets the pattern.
+
+ The pattern.
+
+
+
+ Gets or sets the minimum length.
+
+ The minimum length.
+
+
+
+ Gets or sets the maximum length.
+
+ The maximum length.
+
+
+
+ Gets or sets a number that the value should be divisible by.
+
+ A number that the value should be divisible by.
+
+
+
+ Gets or sets the minimum.
+
+ The minimum.
+
+
+
+ Gets or sets the maximum.
+
+ The maximum.
+
+
+
+ Gets or sets a flag indicating whether the value can not equal the number defined by the minimum attribute ().
+
+ A flag indicating whether the value can not equal the number defined by the minimum attribute ().
+
+
+
+ Gets or sets a flag indicating whether the value can not equal the number defined by the maximum attribute ().
+
+ A flag indicating whether the value can not equal the number defined by the maximum attribute ().
+
+
+
+ Gets or sets the minimum number of items.
+
+ The minimum number of items.
+
+
+
+ Gets or sets the maximum number of items.
+
+ The maximum number of items.
+
+
+
+ Gets or sets the of items.
+
+ The of items.
+
+
+
+ Gets or sets a value indicating whether items in an array are validated using the instance at their array position from .
+
+
+ true if items are validated using their array position; otherwise, false.
+
+
+
+
+ Gets or sets the of additional items.
+
+ The of additional items.
+
+
+
+ Gets or sets a value indicating whether additional items are allowed.
+
+
+ true if additional items are allowed; otherwise, false.
+
+
+
+
+ Gets or sets whether the array items must be unique.
+
+
+
+
+ Gets or sets the of properties.
+
+ The of properties.
+
+
+
+ Gets or sets the of additional properties.
+
+ The of additional properties.
+
+
+
+ Gets or sets the pattern properties.
+
+ The pattern properties.
+
+
+
+ Gets or sets a value indicating whether additional properties are allowed.
+
+
+ true if additional properties are allowed; otherwise, false.
+
+
+
+
+ Gets or sets the required property if this property is present.
+
+ The required property if this property is present.
+
+
+
+ Gets or sets the a collection of valid enum values allowed.
+
+ A collection of valid enum values allowed.
+
+
+
+ Gets or sets disallowed types.
+
+ The disallowed types.
+
+
+
+ Gets or sets the default value.
+
+ The default value.
+
+
+
+ Gets or sets the collection of that this schema extends.
+
+ The collection of that this schema extends.
+
+
+
+ Gets or sets the format.
+
+ The format.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads a from the specified .
+
+ The containing the JSON Schema to read.
+ The object representing the JSON Schema.
+
+
+
+ Reads a from the specified .
+
+ The containing the JSON Schema to read.
+ The to use when resolving schema references.
+ The object representing the JSON Schema.
+
+
+
+ Load a from a string that contains JSON Schema.
+
+ A that contains JSON Schema.
+ A populated from the string that contains JSON Schema.
+
+
+
+ Load a from a string that contains JSON Schema using the specified .
+
+ A that contains JSON Schema.
+ The resolver.
+ A populated from the string that contains JSON Schema.
+
+
+
+ Writes this schema to a .
+
+ A into which this method will write.
+
+
+
+ Writes this schema to a using the specified .
+
+ A into which this method will write.
+ The resolver used.
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+
+ Returns detailed information about the schema exception.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+
+ Generates a from a specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets how undefined schemas are handled by the serializer.
+
+
+
+
+ Gets or sets the contract resolver.
+
+ The contract resolver.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ The used to resolve schema references.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ Specify whether the generated root will be nullable.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ The used to resolve schema references.
+ Specify whether the generated root will be nullable.
+ A generated from the specified type.
+
+
+
+
+ Resolves from an id.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets the loaded schemas.
+
+ The loaded schemas.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets a for the specified reference.
+
+ The id.
+ A for the specified reference.
+
+
+
+
+ The value types allowed by the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ No type specified.
+
+
+
+
+ String type.
+
+
+
+
+ Float type.
+
+
+
+
+ Integer type.
+
+
+
+
+ Boolean type.
+
+
+
+
+ Object type.
+
+
+
+
+ Array type.
+
+
+
+
+ Null type.
+
+
+
+
+ Any type.
+
+
+
+
+
+ Specifies undefined schema Id handling options for the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Do not infer a schema Id.
+
+
+
+
+ Use the .NET type name as the schema Id.
+
+
+
+
+ Use the assembly qualified .NET type name as the schema Id.
+
+
+
+
+
+ Returns detailed information related to the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets the associated with the validation error.
+
+ The JsonSchemaException associated with the validation error.
+
+
+
+ Gets the path of the JSON location where the validation error occurred.
+
+ The path of the JSON location where the validation error occurred.
+
+
+
+ Gets the text description corresponding to the validation error.
+
+ The text description.
+
+
+
+
+ Represents the callback method that will handle JSON schema validation events and the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ A camel case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Resolves member mappings for a type, camel casing property names.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Used by to resolve a for a given .
+
+
+
+
+ Gets a value indicating whether members are being get and set using dynamic code generation.
+ This value is determined by the runtime permissions available.
+
+
+ true if using dynamic code generation; otherwise, false.
+
+
+
+
+ Gets or sets the default members search flags.
+
+ The default members search flags.
+
+
+
+ Gets or sets a value indicating whether compiler generated members should be serialized.
+
+
+ true if serialized compiler generated members; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types.
+
+
+ true if the interface will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore the attribute when serializing and deserializing types.
+
+
+ true if the attribute will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore IsSpecified members when serializing and deserializing types.
+
+
+ true if the IsSpecified members will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore ShouldSerialize members when serializing and deserializing types.
+
+
+ true if the ShouldSerialize members will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets the naming strategy used to resolve how property names and dictionary keys are serialized.
+
+ The naming strategy used to resolve how property names and dictionary keys are serialized.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Gets the serializable members for the type.
+
+ The type to get serializable members for.
+ The serializable members for the type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates the constructor parameters.
+
+ The constructor to create properties for.
+ The type's member properties.
+ Properties for the given .
+
+
+
+ Creates a for the given .
+
+ The matching member property.
+ The constructor parameter.
+ A created for the given .
+
+
+
+ Resolves the default for the contract.
+
+ Type of the object.
+ The contract's default .
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Determines which contract type is created for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates properties for the given .
+
+ The type to create properties for.
+ /// The member serialization mode for the type.
+ Properties for the given .
+
+
+
+ Creates the used by the serializer to get and set values from a member.
+
+ The member.
+ The used by the serializer to get and set values from a member.
+
+
+
+ Creates a for the given .
+
+ The member's parent .
+ The member to create a for.
+ A created for the given .
+
+
+
+ Resolves the name of the property.
+
+ Name of the property.
+ Resolved name of the property.
+
+
+
+ Resolves the name of the extension data. By default no changes are made to extension data names.
+
+ Name of the extension data.
+ Resolved name of the extension data.
+
+
+
+ Resolves the key of the dictionary. By default is used to resolve dictionary keys.
+
+ Key of the dictionary.
+ Resolved key of the dictionary.
+
+
+
+ Gets the resolved name of the property.
+
+ Name of the property.
+ Name of the property.
+
+
+
+ The default naming strategy. Property names and dictionary keys are unchanged.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ The default serialization binder used when resolving and loading classes from type names.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+ The type of the object the formatter creates a new instance of.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ Represents a trace writer that writes to the application's instances.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Get and set values for a using dynamic methods.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Provides information surrounding an error.
+
+
+
+
+ Gets the error.
+
+ The error.
+
+
+
+ Gets the original object that caused the error.
+
+ The original object that caused the error.
+
+
+
+ Gets the member that caused the error.
+
+ The member that caused the error.
+
+
+
+ Gets the path of the JSON location where the error occurred.
+
+ The path of the JSON location where the error occurred.
+
+
+
+ Gets or sets a value indicating whether this is handled.
+
+ true if handled; otherwise, false.
+
+
+
+ Provides data for the Error event.
+
+
+
+
+ Gets the current object the error event is being raised against.
+
+ The current object the error event is being raised against.
+
+
+
+ Gets the error context.
+
+ The error context.
+
+
+
+ Initializes a new instance of the class.
+
+ The current object.
+ The error context.
+
+
+
+ Provides methods to get attributes.
+
+
+
+
+ Returns a collection of all of the attributes, or an empty collection if there are no attributes.
+
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Returns a collection of attributes, identified by type, or an empty collection if there are no attributes.
+
+ The type of the attributes.
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Used by to resolve a for a given .
+
+
+
+
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Used to resolve references when serializing and deserializing JSON by the .
+
+
+
+
+ Resolves a reference to its object.
+
+ The serialization context.
+ The reference to resolve.
+ The object that was resolved from the reference.
+
+
+
+ Gets the reference for the specified object.
+
+ The serialization context.
+ The object to get a reference for.
+ The reference to the object.
+
+
+
+ Determines whether the specified object is referenced.
+
+ The serialization context.
+ The object to test for a reference.
+
+ true if the specified object is referenced; otherwise, false.
+
+
+
+
+ Adds a reference to the specified object.
+
+ The serialization context.
+ The reference.
+ The object to reference.
+
+
+
+ Allows users to control class loading and mandate what class to load.
+
+
+
+
+ When implemented, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object
+ The type of the object the formatter creates a new instance of.
+
+
+
+ When implemented, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ Represents a trace writer.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Provides methods to get and set values.
+
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the of the collection items.
+
+ The of the collection items.
+
+
+
+ Gets a value indicating whether the collection type is a multidimensional array.
+
+ true if the collection type is a multidimensional array; otherwise, false.
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+
+ The function used to create the object.
+
+
+
+ Gets a value indicating whether the creator has a parameter with the collection values.
+
+ true if the creator has a parameter with the collection values; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the default collection items .
+
+ The converter.
+
+
+
+ Gets or sets a value indicating whether the collection items preserve object references.
+
+ true if collection items preserve object references; otherwise, false.
+
+
+
+ Gets or sets the collection item reference loop handling.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the collection item type name handling.
+
+ The type name handling.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Handles serialization callback events.
+
+ The object that raised the callback event.
+ The streaming context.
+
+
+
+ Handles serialization error callback events.
+
+ The object that raised the callback event.
+ The streaming context.
+ The error context.
+
+
+
+ Sets extension data for an object during deserialization.
+
+ The object to set extension data on.
+ The extension data key.
+ The extension data value.
+
+
+
+ Gets extension data for an object during serialization.
+
+ The object to set extension data on.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the underlying type for the contract.
+
+ The underlying type for the contract.
+
+
+
+ Gets or sets the type created during deserialization.
+
+ The type created during deserialization.
+
+
+
+ Gets or sets whether this type contract is serialized as a reference.
+
+ Whether this type contract is serialized as a reference.
+
+
+
+ Gets or sets the default for this contract.
+
+ The converter.
+
+
+
+ Gets the internally resolved for the contract's type.
+ This converter is used as a fallback converter when no other converter is resolved.
+ Setting will always override this converter.
+
+
+
+
+ Gets or sets all methods called immediately after deserialization of the object.
+
+ The methods called immediately after deserialization of the object.
+
+
+
+ Gets or sets all methods called during deserialization of the object.
+
+ The methods called during deserialization of the object.
+
+
+
+ Gets or sets all methods called after serialization of the object graph.
+
+ The methods called after serialization of the object graph.
+
+
+
+ Gets or sets all methods called before serialization of the object.
+
+ The methods called before serialization of the object.
+
+
+
+ Gets or sets all method called when an error is thrown during the serialization of the object.
+
+ The methods called when an error is thrown during the serialization of the object.
+
+
+
+ Gets or sets the default creator method used to create the object.
+
+ The default creator method used to create the object.
+
+
+
+ Gets or sets a value indicating whether the default creator is non-public.
+
+ true if the default object creator is non-public; otherwise, false.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the dictionary key resolver.
+
+ The dictionary key resolver.
+
+
+
+ Gets the of the dictionary keys.
+
+ The of the dictionary keys.
+
+
+
+ Gets the of the dictionary values.
+
+ The of the dictionary values.
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+
+ The function used to create the object.
+
+
+
+ Gets a value indicating whether the creator has a parameter with the dictionary values.
+
+ true if the creator has a parameter with the dictionary values; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the object constructor.
+
+ The object constructor.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the object member serialization.
+
+ The member object serialization.
+
+
+
+ Gets or sets the missing member handling used when deserializing this object.
+
+ The missing member handling.
+
+
+
+ Gets or sets a value that indicates whether the object's properties are required.
+
+
+ A value indicating whether the object's properties are required.
+
+
+
+
+ Gets or sets how the object's properties with null values are handled during serialization and deserialization.
+
+ How the object's properties with null values are handled during serialization and deserialization.
+
+
+
+ Gets the object's properties.
+
+ The object's properties.
+
+
+
+ Gets a collection of instances that define the parameters used with .
+
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+ This function is called with a collection of arguments which are defined by the collection.
+
+ The function used to create the object.
+
+
+
+ Gets or sets the extension data setter.
+
+
+
+
+ Gets or sets the extension data getter.
+
+
+
+
+ Gets or sets the extension data value type.
+
+
+
+
+ Gets or sets the extension data name resolver.
+
+ The extension data name resolver.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Maps a JSON property to a .NET member or constructor parameter.
+
+
+
+
+ Gets or sets the name of the property.
+
+ The name of the property.
+
+
+
+ Gets or sets the type that declared this property.
+
+ The type that declared this property.
+
+
+
+ Gets or sets the order of serialization of a member.
+
+ The numeric order of serialization.
+
+
+
+ Gets or sets the name of the underlying member or parameter.
+
+ The name of the underlying member or parameter.
+
+
+
+ Gets the that will get and set the during serialization.
+
+ The that will get and set the during serialization.
+
+
+
+ Gets or sets the for this property.
+
+ The for this property.
+
+
+
+ Gets or sets the type of the property.
+
+ The type of the property.
+
+
+
+ Gets or sets the for the property.
+ If set this converter takes precedence over the contract converter for the property type.
+
+ The converter.
+
+
+
+ Gets or sets the member converter.
+
+ The member converter.
+
+
+
+ Gets or sets a value indicating whether this is ignored.
+
+ true if ignored; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this is readable.
+
+ true if readable; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this is writable.
+
+ true if writable; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this has a member attribute.
+
+ true if has a member attribute; otherwise, false.
+
+
+
+ Gets the default value.
+
+ The default value.
+
+
+
+ Gets or sets a value indicating whether this is required.
+
+ A value indicating whether this is required.
+
+
+
+ Gets a value indicating whether has a value specified.
+
+
+
+
+ Gets or sets a value indicating whether this property preserves object references.
+
+
+ true if this instance is reference; otherwise, false.
+
+
+
+
+ Gets or sets the property null value handling.
+
+ The null value handling.
+
+
+
+ Gets or sets the property default value handling.
+
+ The default value handling.
+
+
+
+ Gets or sets the property reference loop handling.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the property object creation handling.
+
+ The object creation handling.
+
+
+
+ Gets or sets or sets the type name handling.
+
+ The type name handling.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be serialized.
+
+ A predicate used to determine whether the property should be serialized.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be deserialized.
+
+ A predicate used to determine whether the property should be deserialized.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be serialized.
+
+ A predicate used to determine whether the property should be serialized.
+
+
+
+ Gets or sets an action used to set whether the property has been deserialized.
+
+ An action used to set whether the property has been deserialized.
+
+
+
+ Returns a that represents this instance.
+
+
+ A that represents this instance.
+
+
+
+
+ Gets or sets the converter used when serializing the property's collection items.
+
+ The collection's items converter.
+
+
+
+ Gets or sets whether this property's collection items are serialized as a reference.
+
+ Whether this property's collection items are serialized as a reference.
+
+
+
+ Gets or sets the type name handling used when serializing the property's collection items.
+
+ The collection's items type name handling.
+
+
+
+ Gets or sets the reference loop handling used when serializing the property's collection items.
+
+ The collection's items reference loop handling.
+
+
+
+ A collection of objects.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The type.
+
+
+
+ When implemented in a derived class, extracts the key from the specified element.
+
+ The element from which to extract the key.
+ The key for the specified element.
+
+
+
+ Adds a object.
+
+ The property to add to the collection.
+
+
+
+ Gets the closest matching object.
+ First attempts to get an exact case match of and then
+ a case insensitive match.
+
+ Name of the property.
+ A matching property if found.
+
+
+
+ Gets a property by property name.
+
+ The name of the property to get.
+ Type property name string comparison.
+ A matching property if found.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Lookup and create an instance of the type described by the argument.
+
+ The type to create.
+ Optional arguments to pass to an initializing constructor of the JsonConverter.
+ If null, the default constructor is used.
+
+
+
+ A kebab case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Represents a trace writer that writes to memory. When the trace message limit is
+ reached then old trace messages will be removed as new messages are added.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Returns an enumeration of the most recent trace messages.
+
+ An enumeration of the most recent trace messages.
+
+
+
+ Returns a of the most recent trace messages.
+
+
+ A of the most recent trace messages.
+
+
+
+
+ A base class for resolving how property names and dictionary keys are serialized.
+
+
+
+
+ A flag indicating whether dictionary keys should be processed.
+ Defaults to false.
+
+
+
+
+ A flag indicating whether extension data names should be processed.
+ Defaults to false.
+
+
+
+
+ A flag indicating whether explicitly specified property names,
+ e.g. a property name customized with a , should be processed.
+ Defaults to false.
+
+
+
+
+ Gets the serialized name for a given property name.
+
+ The initial property name.
+ A flag indicating whether the property has had a name explicitly specified.
+ The serialized property name.
+
+
+
+ Gets the serialized name for a given extension data name.
+
+ The initial extension data name.
+ The serialized extension data name.
+
+
+
+ Gets the serialized key for a given dictionary key.
+
+ The initial dictionary key.
+ The serialized dictionary key.
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Hash code calculation
+
+
+
+
+
+ Object equality implementation
+
+
+
+
+
+
+ Compare to another NamingStrategy
+
+
+
+
+
+
+ Represents a method that constructs an object.
+
+ The object type to create.
+
+
+
+ When applied to a method, specifies that the method is called when an error occurs serializing an object.
+
+
+
+
+ Provides methods to get attributes from a , , or .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The instance to get attributes for. This parameter should be a , , or .
+
+
+
+ Returns a collection of all of the attributes, or an empty collection if there are no attributes.
+
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Returns a collection of attributes, identified by type, or an empty collection if there are no attributes.
+
+ The type of the attributes.
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Get and set values for a using reflection.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ A snake case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Specifies how strings are escaped when writing JSON text.
+
+
+
+
+ Only control characters (e.g. newline) are escaped.
+
+
+
+
+ All non-ASCII and control characters (e.g. newline) are escaped.
+
+
+
+
+ HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped.
+
+
+
+
+ Indicates the method that will be used during deserialization for locating and loading assemblies.
+
+
+
+
+ In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the LoadWithPartialName method of the class is used to load the assembly.
+
+
+
+
+ In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The Load method of the class is used to load the assembly.
+
+
+
+
+ Specifies type name handling options for the .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+
+
+
+ Do not include the .NET type name when serializing types.
+
+
+
+
+ Include the .NET type name when serializing into a JSON object structure.
+
+
+
+
+ Include the .NET type name when serializing into a JSON array structure.
+
+
+
+
+ Always include the .NET type name when serializing.
+
+
+
+
+ Include the .NET type name when the type of the object being serialized is not the same as its declared type.
+ Note that this doesn't include the root serialized object by default. To include the root object's type name in JSON
+ you must specify a root type object with
+ or .
+
+
+
+
+ Determines whether the collection is null or empty.
+
+ The collection.
+
+ true if the collection is null or empty; otherwise, false.
+
+
+
+
+ Adds the elements of the specified collection to the specified generic .
+
+ The list to add to.
+ The collection of elements to add.
+
+
+
+ Converts the value to the specified type. If the value is unable to be converted, the
+ value is checked whether it assignable to the specified type.
+
+ The value to convert.
+ The culture to use when converting.
+ The type to convert or cast the value to.
+
+ The converted type. If conversion was unsuccessful, the initial value
+ is returned if assignable to the target type.
+
+
+
+
+ Helper class for serializing immutable collections.
+ Note that this is used by all builds, even those that don't support immutable collections, in case the DLL is GACed
+ https://github.com/JamesNK/Newtonsoft.Json/issues/652
+
+
+
+
+ Gets the type of the typed collection's items.
+
+ The type.
+ The type of the typed collection's items.
+
+
+
+ Gets the member's underlying type.
+
+ The member.
+ The underlying type of the member.
+
+
+
+ Determines whether the property is an indexed property.
+
+ The property.
+
+ true if the property is an indexed property; otherwise, false.
+
+
+
+
+ Gets the member's value on the object.
+
+ The member.
+ The target object.
+ The member's value on the object.
+
+
+
+ Sets the member's value on the target object.
+
+ The member.
+ The target.
+ The value.
+
+
+
+ Determines whether the specified MemberInfo can be read.
+
+ The MemberInfo to determine whether can be read.
+ /// if set to true then allow the member to be gotten non-publicly.
+
+ true if the specified MemberInfo can be read; otherwise, false.
+
+
+
+
+ Determines whether the specified MemberInfo can be set.
+
+ The MemberInfo to determine whether can be set.
+ if set to true then allow the member to be set non-publicly.
+ if set to true then allow the member to be set if read-only.
+
+ true if the specified MemberInfo can be set; otherwise, false.
+
+
+
+
+ Builds a string. Unlike this class lets you reuse its internal buffer.
+
+
+
+
+ Determines whether the string is all white space. Empty string will return false.
+
+ The string to test whether it is all white space.
+
+ true if the string is all white space; otherwise, false.
+
+
+
+
+ Specifies the state of the .
+
+
+
+
+ An exception has been thrown, which has left the in an invalid state.
+ You may call the method to put the in the Closed state.
+ Any other method calls result in an being thrown.
+
+
+
+
+ The method has been called.
+
+
+
+
+ An object is being written.
+
+
+
+
+ An array is being written.
+
+
+
+
+ A constructor is being written.
+
+
+
+
+ A property is being written.
+
+
+
+
+ A write method has not been called.
+
+
+
+ Specifies that an output will not be null even if the corresponding type allows it.
+
+
+ Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it.
+
+
+ Initializes the attribute with the specified return value condition.
+
+ The return value condition. If the method returns this value, the associated parameter will not be null.
+
+
+
+ Gets the return value condition.
+
+
+ Specifies that an output may be null even if the corresponding type disallows it.
+
+
+ Specifies that null is allowed as an input even if the corresponding type disallows it.
+
+
+
+ Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
+ the associated parameter matches this value.
+
+
+
+ Gets the condition parameter value.
+
+
+
diff --git a/packages/Newtonsoft.Json.12.0.3/lib/net40/Newtonsoft.Json.dll b/packages/Newtonsoft.Json.12.0.3/lib/net40/Newtonsoft.Json.dll
new file mode 100644
index 00000000..628aaf03
Binary files /dev/null and b/packages/Newtonsoft.Json.12.0.3/lib/net40/Newtonsoft.Json.dll differ
diff --git a/packages/Newtonsoft.Json.12.0.3/lib/net40/Newtonsoft.Json.xml b/packages/Newtonsoft.Json.12.0.3/lib/net40/Newtonsoft.Json.xml
new file mode 100644
index 00000000..c5064068
--- /dev/null
+++ b/packages/Newtonsoft.Json.12.0.3/lib/net40/Newtonsoft.Json.xml
@@ -0,0 +1,9646 @@
+
+
+
+ Newtonsoft.Json
+
+
+
+
+ Represents a BSON Oid (object id).
+
+
+
+
+ Gets or sets the value of the Oid.
+
+ The value of the Oid.
+
+
+
+ Initializes a new instance of the class.
+
+ The Oid value.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized BSON data.
+
+
+
+
+ Gets or sets a value indicating whether binary data reading should be compatible with incorrect Json.NET 3.5 written binary.
+
+
+ true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether the root object will be read as a JSON array.
+
+
+ true if the root object will be read as a JSON array; otherwise, false.
+
+
+
+
+ Gets or sets the used when reading values from BSON.
+
+ The used when reading values from BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+ if set to true the root object will be read as a JSON array.
+ The used when reading values from BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+ if set to true the root object will be read as a JSON array.
+ The used when reading values from BSON.
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating BSON data.
+
+
+
+
+ Gets or sets the used when writing values to BSON.
+ When set to no conversion will occur.
+
+ The used when writing values to BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The to write to.
+
+
+
+ Initializes a new instance of the class.
+
+ The to write to.
+
+
+
+ Flushes whatever is in the buffer to the underlying and also flushes the underlying stream.
+
+
+
+
+ Writes the end.
+
+ The token.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Closes this writer.
+ If is set to true, the underlying is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value that represents a BSON object id.
+
+ The Object ID value to write.
+
+
+
+ Writes a BSON regex.
+
+ The regex pattern.
+ The regex options.
+
+
+
+ Specifies how constructors are used when initializing objects during deserialization by the .
+
+
+
+
+ First attempt to use the public default constructor, then fall back to a single parameterized constructor, then to the non-public default constructor.
+
+
+
+
+ Json.NET will use a non-public default constructor before falling back to a parameterized constructor.
+
+
+
+
+ Converts a binary value to and from a base 64 string value.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON and BSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Creates a custom object.
+
+ The object type to convert.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Creates an object which will then be populated by the serializer.
+
+ Type of the object.
+ The created object.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+
+ true if this can write JSON; otherwise, false.
+
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified value type.
+
+ Type of the value.
+
+ true if this instance can convert the specified value type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified value type.
+
+ Type of the value.
+
+ true if this instance can convert the specified value type; otherwise, false.
+
+
+
+
+ Provides a base class for converting a to and from JSON.
+
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a F# discriminated union type to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an Entity Framework to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+
+ true if this can write JSON; otherwise, false.
+
+
+
+
+ Converts a to and from the ISO 8601 date format (e.g. "2008-04-12T12:53Z").
+
+
+
+
+ Gets or sets the date time styles used when converting a date to and from JSON.
+
+ The date time styles used when converting a date to and from JSON.
+
+
+
+ Gets or sets the date time format used when converting a date to and from JSON.
+
+ The date time format used when converting a date to and from JSON.
+
+
+
+ Gets or sets the culture used when converting a date to and from JSON.
+
+ The culture used when converting a date to and from JSON.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from a JavaScript Date constructor (e.g. new Date(52231943)).
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON and BSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an to and from its name string value.
+
+
+
+
+ Gets or sets a value indicating whether the written enum text should be camel case.
+ The default value is false.
+
+ true if the written enum text will be camel case; otherwise, false.
+
+
+
+ Gets or sets the naming strategy used to resolve how enum text is written.
+
+ The naming strategy used to resolve how enum text is written.
+
+
+
+ Gets or sets a value indicating whether integer values are allowed when serializing and deserializing.
+ The default value is true.
+
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ true if the written enum text will be camel case; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The naming strategy used to resolve how enum text is written.
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from Unix epoch time
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from a string (e.g. "1.2.3.4").
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts XML to and from JSON.
+
+
+
+
+ Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produced multiple root elements.
+
+ The name of the deserialized root element.
+
+
+
+ Gets or sets a value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ true if the array attribute is written to the XML; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether to write the root JSON object.
+
+ true if the JSON root object is omitted; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ true if special characters are encoded; otherwise, false.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The calling serializer.
+ The value.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Checks if the is a namespace attribute.
+
+ Attribute name to test.
+ The attribute name prefix if it has one, otherwise an empty string.
+ true if attribute name is for a namespace attribute, otherwise false.
+
+
+
+ Determines whether this instance can convert the specified value type.
+
+ Type of the value.
+
+ true if this instance can convert the specified value type; otherwise, false.
+
+
+
+
+ Specifies how dates are formatted when writing JSON text.
+
+
+
+
+ Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z".
+
+
+
+
+ Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/".
+
+
+
+
+ Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text.
+
+
+
+
+ Date formatted strings are not parsed to a date type and are read as strings.
+
+
+
+
+ Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to .
+
+
+
+
+ Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to .
+
+
+
+
+ Specifies how to treat the time value when converting between string and .
+
+
+
+
+ Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time.
+
+
+
+
+ Treat as a UTC. If the object represents a local time, it is converted to a UTC.
+
+
+
+
+ Treat as a local time if a is being converted to a string.
+ If a string is being converted to , convert to a local time if a time zone is specified.
+
+
+
+
+ Time zone information should be preserved when converting.
+
+
+
+
+ The default JSON name table implementation.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets a string containing the same characters as the specified range of characters in the given array.
+
+ The character array containing the name to find.
+ The zero-based index into the array specifying the first character of the name.
+ The number of characters in the name.
+ A string containing the same characters as the specified range of characters in the given array.
+
+
+
+ Adds the specified string into name table.
+
+ The string to add.
+ This method is not thread-safe.
+ The resolved string.
+
+
+
+ Specifies default value handling options for the .
+
+
+
+
+
+
+
+
+ Include members where the member value is the same as the member's default value when serializing objects.
+ Included members are written to JSON. Has no effect when deserializing.
+
+
+
+
+ Ignore members where the member value is the same as the member's default value when serializing objects
+ so that it is not written to JSON.
+ This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers,
+ decimals and floating point numbers; and false for booleans). The default value ignored can be changed by
+ placing the on the property.
+
+
+
+
+ Members with a default value but no JSON will be set to their default value when deserializing.
+
+
+
+
+ Ignore members where the member value is the same as the member's default value when serializing objects
+ and set members to their default value when deserializing.
+
+
+
+
+ Specifies float format handling options when writing special floating point numbers, e.g. ,
+ and with .
+
+
+
+
+ Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity".
+
+
+
+
+ Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity.
+ Note that this will produce non-valid JSON.
+
+
+
+
+ Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a of property.
+
+
+
+
+ Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+
+
+
+
+ Floating point numbers are parsed to .
+
+
+
+
+ Floating point numbers are parsed to .
+
+
+
+
+ Specifies formatting options for the .
+
+
+
+
+ No special formatting is applied. This is the default.
+
+
+
+
+ Causes child objects to be indented according to the and settings.
+
+
+
+
+ Provides an interface for using pooled arrays.
+
+ The array type content.
+
+
+
+ Rent an array from the pool. This array must be returned when it is no longer needed.
+
+ The minimum required length of the array. The returned array may be longer.
+ The rented array from the pool. This array must be returned when it is no longer needed.
+
+
+
+ Return an array to the pool.
+
+ The array that is being returned.
+
+
+
+ Provides an interface to enable a class to return line and position information.
+
+
+
+
+ Gets a value indicating whether the class can return line information.
+
+
+ true if and can be provided; otherwise, false.
+
+
+
+
+ Gets the current line number.
+
+ The current line number or 0 if no line information is available (for example, when returns false).
+
+
+
+ Gets the current line position.
+
+ The current line position or 0 if no line information is available (for example, when returns false).
+
+
+
+ Instructs the how to serialize the collection.
+
+
+
+
+ Gets or sets a value indicating whether null items are allowed in the collection.
+
+ true if null items are allowed in the collection; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with a flag indicating whether the array can contain null items.
+
+ A flag indicating whether the array can contain null items.
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Instructs the to use the specified constructor when deserializing that object.
+
+
+
+
+ Instructs the how to serialize the object.
+
+
+
+
+ Gets or sets the id.
+
+ The id.
+
+
+
+ Gets or sets the title.
+
+ The title.
+
+
+
+ Gets or sets the description.
+
+ The description.
+
+
+
+ Gets or sets the collection's items converter.
+
+ The collection's items converter.
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonContainer(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets a value that indicates whether to preserve object references.
+
+
+ true to keep object reference; otherwise, false. The default is false.
+
+
+
+
+ Gets or sets a value that indicates whether to preserve collection's items references.
+
+
+ true to keep collection's items object references; otherwise, false. The default is false.
+
+
+
+
+ Gets or sets the reference loop handling used when serializing the collection's items.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the type name handling used when serializing the collection's items.
+
+ The type name handling.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Provides methods for converting between .NET types and JSON types.
+
+
+
+
+
+
+
+ Gets or sets a function that creates default .
+ Default settings are automatically used by serialization methods on ,
+ and and on .
+ To serialize without using any default settings create a with
+ .
+
+
+
+
+ Represents JavaScript's boolean value true as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's boolean value false as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's null as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's undefined as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's positive infinity as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's negative infinity as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's NaN as a string. This field is read-only.
+
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation using the specified.
+
+ The value to convert.
+ The format the date will be converted to.
+ The time zone handling when the date is converted to a string.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation using the specified.
+
+ The value to convert.
+ The format the date will be converted to.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ The string delimiter character.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ The string delimiter character.
+ The string escape handling.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Serializes the specified object to a JSON string.
+
+ The object to serialize.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using formatting.
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a collection of .
+
+ The object to serialize.
+ A collection of converters used while serializing.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using formatting and a collection of .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ A collection of converters used while serializing.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using .
+
+ The object to serialize.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a type, formatting and .
+
+ The object to serialize.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using formatting and .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a type, formatting and .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+ A JSON string representation of the object.
+
+
+
+
+ Deserializes the JSON to a .NET object.
+
+ The JSON to deserialize.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to a .NET object using .
+
+ The JSON to deserialize.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type.
+
+ The JSON to deserialize.
+ The of object being deserialized.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type.
+
+ The type of the object to deserialize to.
+ The JSON to deserialize.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the given anonymous type.
+
+
+ The anonymous type to deserialize to. This can't be specified
+ traditionally and must be inferred from the anonymous type passed
+ as a parameter.
+
+ The JSON to deserialize.
+ The anonymous type object.
+ The deserialized anonymous type from the JSON string.
+
+
+
+ Deserializes the JSON to the given anonymous type using .
+
+
+ The anonymous type to deserialize to. This can't be specified
+ traditionally and must be inferred from the anonymous type passed
+ as a parameter.
+
+ The JSON to deserialize.
+ The anonymous type object.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized anonymous type from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using a collection of .
+
+ The type of the object to deserialize to.
+ The JSON to deserialize.
+ Converters to use while deserializing.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using .
+
+ The type of the object to deserialize to.
+ The object to deserialize.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using a collection of .
+
+ The JSON to deserialize.
+ The type of the object to deserialize.
+ Converters to use while deserializing.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using .
+
+ The JSON to deserialize.
+ The type of the object to deserialize to.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Populates the object with values from the JSON string.
+
+ The JSON to populate values from.
+ The target object to populate values onto.
+
+
+
+ Populates the object with values from the JSON string using .
+
+ The JSON to populate values from.
+ The target object to populate values onto.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+
+
+
+ Serializes the to a JSON string.
+
+ The node to serialize.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting and omits the root object if is true.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ Omits writing the root object.
+ A JSON string of the .
+
+
+
+ Deserializes the from a JSON string.
+
+ The JSON string.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by .
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by
+ and writes a Json.NET array attribute for collections.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by ,
+ writes a Json.NET array attribute for collections, and encodes special characters.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+
+ A value to indicate whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ The deserialized .
+
+
+
+ Serializes the to a JSON string.
+
+ The node to convert to JSON.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting.
+
+ The node to convert to JSON.
+ Indicates how the output should be formatted.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting and omits the root object if is true.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ Omits writing the root object.
+ A JSON string of the .
+
+
+
+ Deserializes the from a JSON string.
+
+ The JSON string.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by .
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by
+ and writes a Json.NET array attribute for collections.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by ,
+ writes a Json.NET array attribute for collections, and encodes special characters.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+
+ A value to indicate whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ The deserialized .
+
+
+
+ Converts an object to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can read JSON.
+
+ true if this can read JSON; otherwise, false.
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+ true if this can write JSON; otherwise, false.
+
+
+
+ Converts an object to and from JSON.
+
+ The object type to convert.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read. If there is no existing value then null will be used.
+ The existing value has a value.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Instructs the to use the specified when serializing the member or class.
+
+
+
+
+ Gets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+
+
+
+
+ Initializes a new instance of the class.
+
+ Type of the .
+
+
+
+ Initializes a new instance of the class.
+
+ Type of the .
+ Parameter list to use when constructing the . Can be null.
+
+
+
+ Represents a collection of .
+
+
+
+
+ Instructs the how to serialize the collection.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ The exception thrown when an error occurs during JSON serialization or deserialization.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Instructs the to deserialize properties with no matching class member into the specified collection
+ and write values during serialization.
+
+
+
+
+ Gets or sets a value that indicates whether to write extension data when serializing the object.
+
+
+ true to write extension data when serializing the object; otherwise, false. The default is true.
+
+
+
+
+ Gets or sets a value that indicates whether to read extension data when deserializing the object.
+
+
+ true to read extension data when deserializing the object; otherwise, false. The default is true.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Instructs the not to serialize the public field or public read/write property value.
+
+
+
+
+ Base class for a table of atomized string objects.
+
+
+
+
+ Gets a string containing the same characters as the specified range of characters in the given array.
+
+ The character array containing the name to find.
+ The zero-based index into the array specifying the first character of the name.
+ The number of characters in the name.
+ A string containing the same characters as the specified range of characters in the given array.
+
+
+
+ Instructs the how to serialize the object.
+
+
+
+
+ Gets or sets the member serialization.
+
+ The member serialization.
+
+
+
+ Gets or sets the missing member handling used when deserializing this object.
+
+ The missing member handling.
+
+
+
+ Gets or sets how the object's properties with null values are handled during serialization and deserialization.
+
+ How the object's properties with null values are handled during serialization and deserialization.
+
+
+
+ Gets or sets a value that indicates whether the object's properties are required.
+
+
+ A value indicating whether the object's properties are required.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified member serialization.
+
+ The member serialization.
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Instructs the to always serialize the member with the specified name.
+
+
+
+
+ Gets or sets the type used when serializing the property's collection items.
+
+ The collection's items type.
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonProperty(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the null value handling used when serializing this property.
+
+ The null value handling.
+
+
+
+ Gets or sets the default value handling used when serializing this property.
+
+ The default value handling.
+
+
+
+ Gets or sets the reference loop handling used when serializing this property.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the object creation handling used when deserializing this property.
+
+ The object creation handling.
+
+
+
+ Gets or sets the type name handling used when serializing this property.
+
+ The type name handling.
+
+
+
+ Gets or sets whether this property's value is serialized as a reference.
+
+ Whether this property's value is serialized as a reference.
+
+
+
+ Gets or sets the order of serialization of a member.
+
+ The numeric order of serialization.
+
+
+
+ Gets or sets a value indicating whether this property is required.
+
+
+ A value indicating whether this property is required.
+
+
+
+
+ Gets or sets the name of the property.
+
+ The name of the property.
+
+
+
+ Gets or sets the reference loop handling used when serializing the property's collection items.
+
+ The collection's items reference loop handling.
+
+
+
+ Gets or sets the type name handling used when serializing the property's collection items.
+
+ The collection's items type name handling.
+
+
+
+ Gets or sets whether this property's collection items are serialized as a reference.
+
+ Whether this property's collection items are serialized as a reference.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ Name of the property.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
+
+
+
+
+ Specifies the state of the reader.
+
+
+
+
+ A read method has not been called.
+
+
+
+
+ The end of the file has been reached successfully.
+
+
+
+
+ Reader is at a property.
+
+
+
+
+ Reader is at the start of an object.
+
+
+
+
+ Reader is in an object.
+
+
+
+
+ Reader is at the start of an array.
+
+
+
+
+ Reader is in an array.
+
+
+
+
+ The method has been called.
+
+
+
+
+ Reader has just read a value.
+
+
+
+
+ Reader is at the start of a constructor.
+
+
+
+
+ Reader is in a constructor.
+
+
+
+
+ An error occurred that prevents the read operation from continuing.
+
+
+
+
+ The end of the file has been reached successfully.
+
+
+
+
+ Gets the current reader state.
+
+ The current reader state.
+
+
+
+ Gets or sets a value indicating whether the source should be closed when this reader is closed.
+
+
+ true to close the source when this reader is closed; otherwise false. The default is true.
+
+
+
+
+ Gets or sets a value indicating whether multiple pieces of JSON content can
+ be read from a continuous stream without erroring.
+
+
+ true to support reading multiple pieces of JSON content; otherwise false.
+ The default is false.
+
+
+
+
+ Gets the quotation mark character used to enclose the value of a string.
+
+
+
+
+ Gets or sets how time zones are handled when reading JSON.
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+
+
+
+
+ Gets or sets how custom date formatted strings are parsed when reading JSON.
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+
+
+
+
+ Gets the type of the current JSON token.
+
+
+
+
+ Gets the text value of the current JSON token.
+
+
+
+
+ Gets the .NET type for the current JSON token.
+
+
+
+
+ Gets the depth of the current token in the JSON document.
+
+ The depth of the current token in the JSON document.
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Gets or sets the culture used when reading JSON. Defaults to .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads the next JSON token from the source.
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a [].
+
+ A [] or null if the next JSON token is null. This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Skips the children of the current token.
+
+
+
+
+ Sets the current token.
+
+ The new token.
+
+
+
+ Sets the current token and value.
+
+ The new token.
+ The value.
+
+
+
+ Sets the current token and value.
+
+ The new token.
+ The value.
+ A flag indicating whether the position index inside an array should be updated.
+
+
+
+ Sets the state based on current token type.
+
+
+
+
+ Releases unmanaged and - optionally - managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the source is also closed.
+
+
+
+
+ The exception thrown when an error occurs while reading JSON text.
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The line number indicating where the error occurred.
+ The line position indicating where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Instructs the to always serialize the member, and to require that the member has a value.
+
+
+
+
+ The exception thrown when an error occurs during JSON serialization or deserialization.
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The line number indicating where the error occurred.
+ The line position indicating where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Serializes and deserializes objects into and from the JSON format.
+ The enables you to control how objects are encoded into JSON.
+
+
+
+
+ Occurs when the errors during serialization and deserialization.
+
+
+
+
+ Gets or sets the used by the serializer when resolving references.
+
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+
+
+
+ Gets or sets the used by the serializer when writing trace messages.
+
+ The trace writer.
+
+
+
+ Gets or sets the equality comparer used by the serializer when comparing references.
+
+ The equality comparer.
+
+
+
+ Gets or sets how type name writing and reading is handled by the serializer.
+ The default value is .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how object references are preserved by the serializer.
+ The default value is .
+
+
+
+
+ Gets or sets how reference loops (e.g. a class referencing itself) is handled.
+ The default value is .
+
+
+
+
+ Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how null values are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how default values are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how objects are created during deserialization.
+ The default value is .
+
+ The object creation handling.
+
+
+
+ Gets or sets how constructors are used during deserialization.
+ The default value is .
+
+ The constructor handling.
+
+
+
+ Gets or sets how metadata properties are used during deserialization.
+ The default value is .
+
+ The metadata properties handling.
+
+
+
+ Gets a collection that will be used during serialization.
+
+ Collection that will be used during serialization.
+
+
+
+ Gets or sets the contract resolver used by the serializer when
+ serializing .NET objects to JSON and vice versa.
+
+
+
+
+ Gets or sets the used by the serializer when invoking serialization callback methods.
+
+ The context.
+
+
+
+ Indicates how JSON text output is formatted.
+ The default value is .
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how time zones are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written as JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how and values are formatted when writing JSON text,
+ and the expected date format when reading JSON text.
+ The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
+
+
+
+
+ Gets or sets the culture used when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+ A null value means there is no maximum.
+ The default value is null.
+
+
+
+
+ Gets a value indicating whether there will be a check for additional JSON content after deserializing an object.
+ The default value is false.
+
+
+ true if there will be a check for additional JSON content after deserializing an object; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Creates a new instance.
+ The will not use default settings
+ from .
+
+
+ A new instance.
+ The will not use default settings
+ from .
+
+
+
+
+ Creates a new instance using the specified .
+ The will not use default settings
+ from .
+
+ The settings to be applied to the .
+
+ A new instance using the specified .
+ The will not use default settings
+ from .
+
+
+
+
+ Creates a new instance.
+ The will use default settings
+ from .
+
+
+ A new instance.
+ The will use default settings
+ from .
+
+
+
+
+ Creates a new instance using the specified .
+ The will use default settings
+ from as well as the specified .
+
+ The settings to be applied to the .
+
+ A new instance using the specified .
+ The will use default settings
+ from as well as the specified .
+
+
+
+
+ Populates the JSON values onto the target object.
+
+ The that contains the JSON structure to read values from.
+ The target object to populate values onto.
+
+
+
+ Populates the JSON values onto the target object.
+
+ The that contains the JSON structure to read values from.
+ The target object to populate values onto.
+
+
+
+ Deserializes the JSON structure contained by the specified .
+
+ The that contains the JSON structure to deserialize.
+ The being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The of object being deserialized.
+ The instance of being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The type of the object to deserialize.
+ The instance of being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The of object being deserialized.
+ The instance of being deserialized.
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+ The type of the value being serialized.
+ This parameter is used when is Auto to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+
+
+ Specifies the settings on a object.
+
+
+
+
+ Gets or sets how reference loops (e.g. a class referencing itself) are handled.
+ The default value is .
+
+ Reference loop handling.
+
+
+
+ Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
+ The default value is .
+
+ Missing member handling.
+
+
+
+ Gets or sets how objects are created during deserialization.
+ The default value is .
+
+ The object creation handling.
+
+
+
+ Gets or sets how null values are handled during serialization and deserialization.
+ The default value is .
+
+ Null value handling.
+
+
+
+ Gets or sets how default values are handled during serialization and deserialization.
+ The default value is .
+
+ The default value handling.
+
+
+
+ Gets or sets a collection that will be used during serialization.
+
+ The converters.
+
+
+
+ Gets or sets how object references are preserved by the serializer.
+ The default value is .
+
+ The preserve references handling.
+
+
+
+ Gets or sets how type name writing and reading is handled by the serializer.
+ The default value is .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+ The type name handling.
+
+
+
+ Gets or sets how metadata properties are used during deserialization.
+ The default value is .
+
+ The metadata properties handling.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how constructors are used during deserialization.
+ The default value is .
+
+ The constructor handling.
+
+
+
+ Gets or sets the contract resolver used by the serializer when
+ serializing .NET objects to JSON and vice versa.
+
+ The contract resolver.
+
+
+
+ Gets or sets the equality comparer used by the serializer when comparing references.
+
+ The equality comparer.
+
+
+
+ Gets or sets the used by the serializer when resolving references.
+
+ The reference resolver.
+
+
+
+ Gets or sets a function that creates the used by the serializer when resolving references.
+
+ A function that creates the used by the serializer when resolving references.
+
+
+
+ Gets or sets the used by the serializer when writing trace messages.
+
+ The trace writer.
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+ The binder.
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+ The binder.
+
+
+
+ Gets or sets the error handler called during serialization and deserialization.
+
+ The error handler called during serialization and deserialization.
+
+
+
+ Gets or sets the used by the serializer when invoking serialization callback methods.
+
+ The context.
+
+
+
+ Gets or sets how and values are formatted when writing JSON text,
+ and the expected date format when reading JSON text.
+ The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+ A null value means there is no maximum.
+ The default value is null.
+
+
+
+
+ Indicates how JSON text output is formatted.
+ The default value is .
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how time zones are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written as JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets the culture used when reading JSON.
+ The default value is .
+
+
+
+
+ Gets a value indicating whether there will be a check for additional content after deserializing an object.
+ The default value is false.
+
+
+ true if there will be a check for additional content after deserializing an object; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to JSON text data.
+
+
+
+
+ Initializes a new instance of the class with the specified .
+
+ The containing the JSON data to read.
+
+
+
+ Gets or sets the reader's property name table.
+
+
+
+
+ Gets or sets the reader's character buffer pool.
+
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a [].
+
+ A [] or null if the next JSON token is null. This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Gets a value indicating whether the class can return line information.
+
+
+ true if and can be provided; otherwise, false.
+
+
+
+
+ Gets the current line number.
+
+
+ The current line number or 0 if no line information is available (for example, returns false).
+
+
+
+
+ Gets the current line position.
+
+
+ The current line position or 0 if no line information is available (for example, returns false).
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Gets or sets the writer's character array pool.
+
+
+
+
+ Gets or sets how many s to write for each level in the hierarchy when is set to .
+
+
+
+
+ Gets or sets which character to use to quote attribute values.
+
+
+
+
+ Gets or sets which character to use for indenting when is set to .
+
+
+
+
+ Gets or sets a value indicating whether object names will be surrounded with quotes.
+
+
+
+
+ Initializes a new instance of the class using the specified .
+
+ The to write to.
+
+
+
+ Flushes whatever is in the buffer to the underlying and also flushes the underlying .
+
+
+
+
+ Closes this writer.
+ If is set to true, the underlying is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the specified end token.
+
+ The end token to write.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+
+
+
+ Writes indent characters.
+
+
+
+
+ Writes the JSON value delimiter.
+
+
+
+
+ Writes an indent space.
+
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the given white space.
+
+ The string of white space characters.
+
+
+
+ Specifies the type of JSON token.
+
+
+
+
+ This is returned by the if a read method has not been called.
+
+
+
+
+ An object start token.
+
+
+
+
+ An array start token.
+
+
+
+
+ A constructor start token.
+
+
+
+
+ An object property name.
+
+
+
+
+ A comment.
+
+
+
+
+ Raw JSON.
+
+
+
+
+ An integer.
+
+
+
+
+ A float.
+
+
+
+
+ A string.
+
+
+
+
+ A boolean.
+
+
+
+
+ A null token.
+
+
+
+
+ An undefined token.
+
+
+
+
+ An object end token.
+
+
+
+
+ An array end token.
+
+
+
+
+ A constructor end token.
+
+
+
+
+ A Date.
+
+
+
+
+ Byte data.
+
+
+
+
+
+ Represents a reader that provides validation.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Sets an event handler for receiving schema validation errors.
+
+
+
+
+ Gets the text value of the current JSON token.
+
+
+
+
+
+ Gets the depth of the current token in the JSON document.
+
+ The depth of the current token in the JSON document.
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Gets the quotation mark character used to enclose the value of a string.
+
+
+
+
+
+ Gets the type of the current JSON token.
+
+
+
+
+
+ Gets the .NET type for the current JSON token.
+
+
+
+
+
+ Initializes a new instance of the class that
+ validates the content returned from the given .
+
+ The to read from while validating.
+
+
+
+ Gets or sets the schema.
+
+ The schema.
+
+
+
+ Gets the used to construct this .
+
+ The specified in the constructor.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a [].
+
+
+ A [] or null if the next JSON token is null.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Gets or sets a value indicating whether the destination should be closed when this writer is closed.
+
+
+ true to close the destination when this writer is closed; otherwise false. The default is true.
+
+
+
+
+ Gets or sets a value indicating whether the JSON should be auto-completed when this writer is closed.
+
+
+ true to auto-complete the JSON when this writer is closed; otherwise false. The default is true.
+
+
+
+
+ Gets the top.
+
+ The top.
+
+
+
+ Gets the state of the writer.
+
+
+
+
+ Gets the path of the writer.
+
+
+
+
+ Gets or sets a value indicating how JSON text output should be formatted.
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+
+
+
+
+ Gets or sets how time zones are handled when writing JSON text.
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written to JSON text.
+
+
+
+
+ Gets or sets how and values are formatted when writing JSON text.
+
+
+
+
+ Gets or sets the culture used when writing JSON. Defaults to .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Flushes whatever is in the buffer to the destination and also flushes the destination.
+
+
+
+
+ Closes this writer.
+ If is set to true, the destination is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the end of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the end of an array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the end constructor.
+
+
+
+
+ Writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+
+
+
+ Writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+
+
+
+ Writes the end of the current JSON object or array.
+
+
+
+
+ Writes the current token and its children.
+
+ The to read the token from.
+
+
+
+ Writes the current token.
+
+ The to read the token from.
+ A flag indicating whether the current token's children should be written.
+
+
+
+ Writes the token and its value.
+
+ The to write.
+
+ The value to write.
+ A value is only required for tokens that have an associated value, e.g. the property name for .
+ null can be passed to the method for tokens that don't have a value, e.g. .
+
+
+
+
+ Writes the token.
+
+ The to write.
+
+
+
+ Writes the specified end token.
+
+ The end token to write.
+
+
+
+ Writes indent characters.
+
+
+
+
+ Writes the JSON value delimiter.
+
+
+
+
+ Writes an indent space.
+
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the given white space.
+
+ The string of white space characters.
+
+
+
+ Releases unmanaged and - optionally - managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Sets the state of the .
+
+ The being written.
+ The value being written.
+
+
+
+ The exception thrown when an error occurs while writing JSON text.
+
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Specifies how JSON comments are handled when loading JSON.
+
+
+
+
+ Ignore comments.
+
+
+
+
+ Load comments as a with type .
+
+
+
+
+ Specifies how duplicate property names are handled when loading JSON.
+
+
+
+
+ Replace the existing value when there is a duplicate property. The value of the last property in the JSON object will be used.
+
+
+
+
+ Ignore the new value when there is a duplicate property. The value of the first property in the JSON object will be used.
+
+
+
+
+ Throw a when a duplicate property is encountered.
+
+
+
+
+ Contains the LINQ to JSON extension methods.
+
+
+
+
+ Returns a collection of tokens that contains the ancestors of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains the ancestors of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains every token in the source collection, the ancestors of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains the descendants of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains the descendants of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains every token in the source collection, and the descendants of every token in the source collection.
+
+
+
+ Returns a collection of child properties of every object in the source collection.
+
+ An of that contains the source collection.
+ An of that contains the properties of every object in the source collection.
+
+
+
+ Returns a collection of child values of every object in the source collection with the given key.
+
+ An of that contains the source collection.
+ The token key.
+ An of that contains the values of every token in the source collection with the given key.
+
+
+
+ Returns a collection of child values of every object in the source collection.
+
+ An of that contains the source collection.
+ An of that contains the values of every token in the source collection.
+
+
+
+ Returns a collection of converted child values of every object in the source collection with the given key.
+
+ The type to convert the values to.
+ An of that contains the source collection.
+ The token key.
+ An that contains the converted values of every token in the source collection with the given key.
+
+
+
+ Returns a collection of converted child values of every object in the source collection.
+
+ The type to convert the values to.
+ An of that contains the source collection.
+ An that contains the converted values of every token in the source collection.
+
+
+
+ Converts the value.
+
+ The type to convert the value to.
+ A cast as a of .
+ A converted value.
+
+
+
+ Converts the value.
+
+ The source collection type.
+ The type to convert the value to.
+ A cast as a of .
+ A converted value.
+
+
+
+ Returns a collection of child tokens of every array in the source collection.
+
+ The source collection type.
+ An of that contains the source collection.
+ An of that contains the values of every token in the source collection.
+
+
+
+ Returns a collection of converted child tokens of every array in the source collection.
+
+ An of that contains the source collection.
+ The type to convert the values to.
+ The source collection type.
+ An that contains the converted values of every token in the source collection.
+
+
+
+ Returns the input typed as .
+
+ An of that contains the source collection.
+ The input typed as .
+
+
+
+ Returns the input typed as .
+
+ The source collection type.
+ An of that contains the source collection.
+ The input typed as .
+
+
+
+ Represents a collection of objects.
+
+ The type of token.
+
+
+
+ Gets the of with the specified key.
+
+
+
+
+
+ Represents a JSON array.
+
+
+
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the array.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the array.
+
+
+
+ Loads an from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads an from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+
+
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the values of the specified object.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ The that will be used to read the object.
+ A with the values of the specified object.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets or sets the at the specified index.
+
+
+
+
+
+ Determines the index of a specific item in the .
+
+ The object to locate in the .
+
+ The index of if found in the list; otherwise, -1.
+
+
+
+
+ Inserts an item to the at the specified index.
+
+ The zero-based index at which should be inserted.
+ The object to insert into the .
+
+ is not a valid index in the .
+
+
+
+
+ Removes the item at the specified index.
+
+ The zero-based index of the item to remove.
+
+ is not a valid index in the .
+
+
+
+
+ Returns an enumerator that iterates through the collection.
+
+
+ A of that can be used to iterate through the collection.
+
+
+
+
+ Adds an item to the .
+
+ The object to add to the .
+
+
+
+ Removes all items from the .
+
+
+
+
+ Determines whether the contains a specific value.
+
+ The object to locate in the .
+
+ true if is found in the ; otherwise, false.
+
+
+
+
+ Copies the elements of the to an array, starting at a particular array index.
+
+ The array.
+ Index of the array.
+
+
+
+ Gets a value indicating whether the is read-only.
+
+ true if the is read-only; otherwise, false.
+
+
+
+ Removes the first occurrence of a specific object from the .
+
+ The object to remove from the .
+
+ true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original .
+
+
+
+
+ Represents a JSON constructor.
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets or sets the name of this constructor.
+
+ The constructor name.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified name and content.
+
+ The constructor name.
+ The contents of the constructor.
+
+
+
+ Initializes a new instance of the class with the specified name and content.
+
+ The constructor name.
+ The contents of the constructor.
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ The constructor name.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Represents a token that can contain other tokens.
+
+
+
+
+ Occurs when the list changes or an item in the list changes.
+
+
+
+
+ Occurs before an item is added to the collection.
+
+
+
+
+ Occurs when the items list of the collection has changed, or the collection is reset.
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Get the first child token of this token.
+
+
+ A containing the first child token of the .
+
+
+
+
+ Get the last child token of this token.
+
+
+ A containing the last child token of the .
+
+
+
+
+ Returns a collection of the child tokens of this token, in document order.
+
+
+ An of containing the child tokens of this , in document order.
+
+
+
+
+ Returns a collection of the child values of this token, in document order.
+
+ The type to convert the values to.
+
+ A containing the child values of this , in document order.
+
+
+
+
+ Returns a collection of the descendant tokens for this token in document order.
+
+ An of containing the descendant tokens of the .
+
+
+
+ Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order.
+
+ An of containing this token, and all the descendant tokens of the .
+
+
+
+ Adds the specified content as children of this .
+
+ The content to be added.
+
+
+
+ Adds the specified content as the first children of this .
+
+ The content to be added.
+
+
+
+ Creates a that can be used to add tokens to the .
+
+ A that is ready to have content written to it.
+
+
+
+ Replaces the child nodes of this token with the specified content.
+
+ The content.
+
+
+
+ Removes the child nodes from this token.
+
+
+
+
+ Merge the specified content into this .
+
+ The content to be merged.
+
+
+
+ Merge the specified content into this using .
+
+ The content to be merged.
+ The used to merge the content.
+
+
+
+ Gets the count of child JSON tokens.
+
+ The count of child JSON tokens.
+
+
+
+ Represents a collection of objects.
+
+ The type of token.
+
+
+
+ An empty collection of objects.
+
+
+
+
+ Initializes a new instance of the struct.
+
+ The enumerable.
+
+
+
+ Returns an enumerator that can be used to iterate through the collection.
+
+
+ A that can be used to iterate through the collection.
+
+
+
+
+ Gets the of with the specified key.
+
+
+
+
+
+ Determines whether the specified is equal to this instance.
+
+ The to compare with this instance.
+
+ true if the specified is equal to this instance; otherwise, false.
+
+
+
+
+ Determines whether the specified is equal to this instance.
+
+ The to compare with this instance.
+
+ true if the specified is equal to this instance; otherwise, false.
+
+
+
+
+ Returns a hash code for this instance.
+
+
+ A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
+
+
+
+
+ Represents a JSON object.
+
+
+
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Occurs when a property value changes.
+
+
+
+
+ Occurs when a property value is changing.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the object.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the object.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets an of of this object's properties.
+
+ An of of this object's properties.
+
+
+
+ Gets a with the specified name.
+
+ The property name.
+ A with the specified name or null.
+
+
+
+ Gets the with the specified name.
+ The exact name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ The property name.
+ One of the enumeration values that specifies how the strings will be compared.
+ A matched with the specified name or null.
+
+
+
+ Gets a of of this object's property values.
+
+ A of of this object's property values.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets or sets the with the specified property name.
+
+
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+ is not valid JSON.
+
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+ is not valid JSON.
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+ is not valid JSON.
+
+
+
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+ is not valid JSON.
+
+
+
+
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the values of the specified object.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ The that will be used to read the object.
+ A with the values of the specified object.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified property name.
+
+ Name of the property.
+ The with the specified property name.
+
+
+
+ Gets the with the specified property name.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ Name of the property.
+ One of the enumeration values that specifies how the strings will be compared.
+ The with the specified property name.
+
+
+
+ Tries to get the with the specified property name.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ Name of the property.
+ The value.
+ One of the enumeration values that specifies how the strings will be compared.
+ true if a value was successfully retrieved; otherwise, false.
+
+
+
+ Adds the specified property name.
+
+ Name of the property.
+ The value.
+
+
+
+ Determines whether the JSON object has the specified property name.
+
+ Name of the property.
+ true if the JSON object has the specified property name; otherwise, false.
+
+
+
+ Removes the property with the specified name.
+
+ Name of the property.
+ true if item was successfully removed; otherwise, false.
+
+
+
+ Tries to get the with the specified property name.
+
+ Name of the property.
+ The value.
+ true if a value was successfully retrieved; otherwise, false.
+
+
+
+ Returns an enumerator that can be used to iterate through the collection.
+
+
+ A that can be used to iterate through the collection.
+
+
+
+
+ Raises the event with the provided arguments.
+
+ Name of the property.
+
+
+
+ Raises the event with the provided arguments.
+
+ Name of the property.
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Represents a JSON property.
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets the property name.
+
+ The property name.
+
+
+
+ Gets or sets the property value.
+
+ The property value.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+ The property name.
+ The property content.
+
+
+
+ Initializes a new instance of the class.
+
+ The property name.
+ The property content.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Represents a view of a .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The name.
+
+
+
+ When overridden in a derived class, returns whether resetting an object changes its value.
+
+
+ true if resetting the component changes its value; otherwise, false.
+
+ The component to test for reset capability.
+
+
+
+ When overridden in a derived class, gets the current value of the property on a component.
+
+
+ The value of a property for a given component.
+
+ The component with the property for which to retrieve the value.
+
+
+
+ When overridden in a derived class, resets the value for this property of the component to the default value.
+
+ The component with the property value that is to be reset to the default value.
+
+
+
+ When overridden in a derived class, sets the value of the component to a different value.
+
+ The component with the property value that is to be set.
+ The new value.
+
+
+
+ When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted.
+
+
+ true if the property should be persisted; otherwise, false.
+
+ The component with the property to be examined for persistence.
+
+
+
+ When overridden in a derived class, gets the type of the component this property is bound to.
+
+
+ A that represents the type of component this property is bound to.
+ When the or
+
+ methods are invoked, the object specified might be an instance of this type.
+
+
+
+
+ When overridden in a derived class, gets a value indicating whether this property is read-only.
+
+
+ true if the property is read-only; otherwise, false.
+
+
+
+
+ When overridden in a derived class, gets the type of the property.
+
+
+ A that represents the type of the property.
+
+
+
+
+ Gets the hash code for the name of the member.
+
+
+
+ The hash code for the name of the member.
+
+
+
+
+ Represents a raw JSON string.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class.
+
+ The raw json.
+
+
+
+ Creates an instance of with the content of the reader's current token.
+
+ The reader.
+ An instance of with the content of the reader's current token.
+
+
+
+ Specifies the settings used when loading JSON.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets or sets how JSON comments are handled when loading JSON.
+ The default value is .
+
+ The JSON comment handling.
+
+
+
+ Gets or sets how JSON line info is handled when loading JSON.
+ The default value is .
+
+ The JSON line info handling.
+
+
+
+ Gets or sets how duplicate property names in JSON objects are handled when loading JSON.
+ The default value is .
+
+ The JSON duplicate property name handling.
+
+
+
+ Specifies the settings used when merging JSON.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets or sets the method used when merging JSON arrays.
+
+ The method used when merging JSON arrays.
+
+
+
+ Gets or sets how null value properties are merged.
+
+ How null value properties are merged.
+
+
+
+ Gets or sets the comparison used to match property names while merging.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ The comparison used to match property names while merging.
+
+
+
+ Represents an abstract JSON token.
+
+
+
+
+ Gets a comparer that can compare two tokens for value equality.
+
+ A that can compare two nodes for value equality.
+
+
+
+ Gets or sets the parent.
+
+ The parent.
+
+
+
+ Gets the root of this .
+
+ The root of this .
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Compares the values of two tokens, including the values of all descendant tokens.
+
+ The first to compare.
+ The second to compare.
+ true if the tokens are equal; otherwise false.
+
+
+
+ Gets the next sibling token of this node.
+
+ The that contains the next sibling token.
+
+
+
+ Gets the previous sibling token of this node.
+
+ The that contains the previous sibling token.
+
+
+
+ Gets the path of the JSON token.
+
+
+
+
+ Adds the specified content immediately after this token.
+
+ A content object that contains simple content or a collection of content objects to be added after this token.
+
+
+
+ Adds the specified content immediately before this token.
+
+ A content object that contains simple content or a collection of content objects to be added before this token.
+
+
+
+ Returns a collection of the ancestor tokens of this token.
+
+ A collection of the ancestor tokens of this token.
+
+
+
+ Returns a collection of tokens that contain this token, and the ancestors of this token.
+
+ A collection of tokens that contain this token, and the ancestors of this token.
+
+
+
+ Returns a collection of the sibling tokens after this token, in document order.
+
+ A collection of the sibling tokens after this tokens, in document order.
+
+
+
+ Returns a collection of the sibling tokens before this token, in document order.
+
+ A collection of the sibling tokens before this token, in document order.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets the with the specified key converted to the specified type.
+
+ The type to convert the token to.
+ The token key.
+ The converted token value.
+
+
+
+ Get the first child token of this token.
+
+ A containing the first child token of the .
+
+
+
+ Get the last child token of this token.
+
+ A containing the last child token of the .
+
+
+
+ Returns a collection of the child tokens of this token, in document order.
+
+ An of containing the child tokens of this , in document order.
+
+
+
+ Returns a collection of the child tokens of this token, in document order, filtered by the specified type.
+
+ The type to filter the child tokens on.
+ A containing the child tokens of this , in document order.
+
+
+
+ Returns a collection of the child values of this token, in document order.
+
+ The type to convert the values to.
+ A containing the child values of this , in document order.
+
+
+
+ Removes this token from its parent.
+
+
+
+
+ Replaces this token with the specified token.
+
+ The value.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Returns the indented JSON for this token.
+
+
+ ToString() returns a non-JSON string value for tokens with a type of .
+ If you want the JSON for all token types then you should use .
+
+
+ The indented JSON for this token.
+
+
+
+
+ Returns the JSON for this token using the given formatting and converters.
+
+ Indicates how the output should be formatted.
+ A collection of s which will be used when writing the token.
+ The JSON for this token using the given formatting and converters.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to [].
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from [] to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Creates a for this token.
+
+ A that can be used to read this token and its descendants.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the value of the specified object.
+
+
+
+ Creates a from an object using the specified .
+
+ The object that will be used to create .
+ The that will be used when reading the object.
+ A with the value of the specified object.
+
+
+
+ Creates an instance of the specified .NET type from the .
+
+ The object type that the token will be deserialized to.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the .
+
+ The object type that the token will be deserialized to.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the using the specified .
+
+ The object type that the token will be deserialized to.
+ The that will be used when creating the object.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the using the specified .
+
+ The object type that the token will be deserialized to.
+ The that will be used when creating the object.
+ The new object created from the JSON value.
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Creates a from a .
+
+ An positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Selects a using a JSONPath expression. Selects the token that matches the object path.
+
+
+ A that contains a JSONPath expression.
+
+ A , or null.
+
+
+
+ Selects a using a JSONPath expression. Selects the token that matches the object path.
+
+
+ A that contains a JSONPath expression.
+
+ A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.
+ A .
+
+
+
+ Selects a collection of elements using a JSONPath expression.
+
+
+ A that contains a JSONPath expression.
+
+ An of that contains the selected elements.
+
+
+
+ Selects a collection of elements using a JSONPath expression.
+
+
+ A that contains a JSONPath expression.
+
+ A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.
+ An of that contains the selected elements.
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Creates a new instance of the . All child tokens are recursively cloned.
+
+ A new instance of the .
+
+
+
+ Adds an object to the annotation list of this .
+
+ The annotation to add.
+
+
+
+ Get the first annotation object of the specified type from this .
+
+ The type of the annotation to retrieve.
+ The first annotation object that matches the specified type, or null if no annotation is of the specified type.
+
+
+
+ Gets the first annotation object of the specified type from this .
+
+ The of the annotation to retrieve.
+ The first annotation object that matches the specified type, or null if no annotation is of the specified type.
+
+
+
+ Gets a collection of annotations of the specified type for this .
+
+ The type of the annotations to retrieve.
+ An that contains the annotations for this .
+
+
+
+ Gets a collection of annotations of the specified type for this .
+
+ The of the annotations to retrieve.
+ An of that contains the annotations that match the specified type for this .
+
+
+
+ Removes the annotations of the specified type from this .
+
+ The type of annotations to remove.
+
+
+
+ Removes the annotations of the specified type from this .
+
+ The of annotations to remove.
+
+
+
+ Compares tokens to determine whether they are equal.
+
+
+
+
+ Determines whether the specified objects are equal.
+
+ The first object of type to compare.
+ The second object of type to compare.
+
+ true if the specified objects are equal; otherwise, false.
+
+
+
+
+ Returns a hash code for the specified object.
+
+ The for which a hash code is to be returned.
+ A hash code for the specified object.
+ The type of is a reference type and is null.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
+
+
+
+
+ Gets the at the reader's current position.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The token to read from.
+
+
+
+ Initializes a new instance of the class.
+
+ The token to read from.
+ The initial path of the token. It is prepended to the returned .
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Specifies the type of token.
+
+
+
+
+ No token type has been set.
+
+
+
+
+ A JSON object.
+
+
+
+
+ A JSON array.
+
+
+
+
+ A JSON constructor.
+
+
+
+
+ A JSON object property.
+
+
+
+
+ A comment.
+
+
+
+
+ An integer value.
+
+
+
+
+ A float value.
+
+
+
+
+ A string value.
+
+
+
+
+ A boolean value.
+
+
+
+
+ A null value.
+
+
+
+
+ An undefined value.
+
+
+
+
+ A date value.
+
+
+
+
+ A raw JSON value.
+
+
+
+
+ A collection of bytes value.
+
+
+
+
+ A Guid value.
+
+
+
+
+ A Uri value.
+
+
+
+
+ A TimeSpan value.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Gets the at the writer's current position.
+
+
+
+
+ Gets the token being written.
+
+ The token being written.
+
+
+
+ Initializes a new instance of the class writing to the given .
+
+ The container being written to.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Flushes whatever is in the buffer to the underlying .
+
+
+
+
+ Closes this writer.
+ If is set to true, the JSON is auto-completed.
+
+
+ Setting to true has no additional effect, since the underlying is a type that cannot be closed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the end.
+
+ The token.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Writes a value.
+ An error will be raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Represents a value in JSON (string, integer, date, etc).
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Creates a comment with the given value.
+
+ The value.
+ A comment with the given value.
+
+
+
+ Creates a string with the given value.
+
+ The value.
+ A string with the given value.
+
+
+
+ Creates a null value.
+
+ A null value.
+
+
+
+ Creates a undefined value.
+
+ A undefined value.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets or sets the underlying token value.
+
+ The underlying token value.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of s which will be used when writing the token.
+
+
+
+ Indicates whether the current object is equal to another object of the same type.
+
+
+ true if the current object is equal to the parameter; otherwise, false.
+
+ An object to compare with this object.
+
+
+
+ Determines whether the specified is equal to the current .
+
+ The to compare with the current .
+
+ true if the specified is equal to the current ; otherwise, false.
+
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Returns a that represents this instance.
+
+
+ ToString() returns a non-JSON string value for tokens with a type of .
+ If you want the JSON for all token types then you should use .
+
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format.
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format provider.
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format.
+ The format provider.
+
+ A that represents this instance.
+
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
+
+ An object to compare with this instance.
+
+ A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings:
+ Value
+ Meaning
+ Less than zero
+ This instance is less than .
+ Zero
+ This instance is equal to .
+ Greater than zero
+ This instance is greater than .
+
+
+ is not of the same type as this instance.
+
+
+
+
+ Specifies how line information is handled when loading JSON.
+
+
+
+
+ Ignore line information.
+
+
+
+
+ Load line information.
+
+
+
+
+ Specifies how JSON arrays are merged together.
+
+
+
+ Concatenate arrays.
+
+
+ Union arrays, skipping items that already exist.
+
+
+ Replace all array items.
+
+
+ Merge array items together, matched by index.
+
+
+
+ Specifies how null value properties are merged.
+
+
+
+
+ The content's null value properties will be ignored during merging.
+
+
+
+
+ The content's null value properties will be merged.
+
+
+
+
+ Specifies the member serialization options for the .
+
+
+
+
+ All public members are serialized by default. Members can be excluded using or .
+ This is the default member serialization mode.
+
+
+
+
+ Only members marked with or are serialized.
+ This member serialization mode can also be set by marking the class with .
+
+
+
+
+ All public and private fields are serialized. Members can be excluded using or .
+ This member serialization mode can also be set by marking the class with
+ and setting IgnoreSerializableAttribute on to false.
+
+
+
+
+ Specifies metadata property handling options for the .
+
+
+
+
+ Read metadata properties located at the start of a JSON object.
+
+
+
+
+ Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance.
+
+
+
+
+ Do not try to read metadata properties.
+
+
+
+
+ Specifies missing member handling options for the .
+
+
+
+
+ Ignore a missing member and do not attempt to deserialize it.
+
+
+
+
+ Throw a when a missing member is encountered during deserialization.
+
+
+
+
+ Specifies null value handling options for the .
+
+
+
+
+
+
+
+
+ Include null values when serializing and deserializing objects.
+
+
+
+
+ Ignore null values when serializing and deserializing objects.
+
+
+
+
+ Specifies how object creation is handled by the .
+
+
+
+
+ Reuse existing objects, create new objects when needed.
+
+
+
+
+ Only reuse existing objects.
+
+
+
+
+ Always create new objects.
+
+
+
+
+ Specifies reference handling options for the .
+ Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement .
+
+
+
+
+
+
+
+ Do not preserve references when serializing types.
+
+
+
+
+ Preserve references when serializing into a JSON object structure.
+
+
+
+
+ Preserve references when serializing into a JSON array structure.
+
+
+
+
+ Preserve references when serializing.
+
+
+
+
+ Specifies reference loop handling options for the .
+
+
+
+
+ Throw a when a loop is encountered.
+
+
+
+
+ Ignore loop references and do not serialize.
+
+
+
+
+ Serialize loop references.
+
+
+
+
+ Indicating whether a property is required.
+
+
+
+
+ The property is not required. The default state.
+
+
+
+
+ The property must be defined in JSON but can be a null value.
+
+
+
+
+ The property must be defined in JSON and cannot be a null value.
+
+
+
+
+ The property is not required but it cannot be a null value.
+
+
+
+
+
+ Contains the JSON schema extension methods.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+
+ Determines whether the is valid.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+
+ true if the specified is valid; otherwise, false.
+
+
+
+
+
+ Determines whether the is valid.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+ When this method returns, contains any error messages generated while validating.
+
+ true if the specified is valid; otherwise, false.
+
+
+
+
+
+ Validates the specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+
+
+
+
+ Validates the specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+ The validation event handler.
+
+
+
+
+ An in-memory representation of a JSON Schema.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets the id.
+
+
+
+
+ Gets or sets the title.
+
+
+
+
+ Gets or sets whether the object is required.
+
+
+
+
+ Gets or sets whether the object is read-only.
+
+
+
+
+ Gets or sets whether the object is visible to users.
+
+
+
+
+ Gets or sets whether the object is transient.
+
+
+
+
+ Gets or sets the description of the object.
+
+
+
+
+ Gets or sets the types of values allowed by the object.
+
+ The type.
+
+
+
+ Gets or sets the pattern.
+
+ The pattern.
+
+
+
+ Gets or sets the minimum length.
+
+ The minimum length.
+
+
+
+ Gets or sets the maximum length.
+
+ The maximum length.
+
+
+
+ Gets or sets a number that the value should be divisible by.
+
+ A number that the value should be divisible by.
+
+
+
+ Gets or sets the minimum.
+
+ The minimum.
+
+
+
+ Gets or sets the maximum.
+
+ The maximum.
+
+
+
+ Gets or sets a flag indicating whether the value can not equal the number defined by the minimum attribute ().
+
+ A flag indicating whether the value can not equal the number defined by the minimum attribute ().
+
+
+
+ Gets or sets a flag indicating whether the value can not equal the number defined by the maximum attribute ().
+
+ A flag indicating whether the value can not equal the number defined by the maximum attribute ().
+
+
+
+ Gets or sets the minimum number of items.
+
+ The minimum number of items.
+
+
+
+ Gets or sets the maximum number of items.
+
+ The maximum number of items.
+
+
+
+ Gets or sets the of items.
+
+ The of items.
+
+
+
+ Gets or sets a value indicating whether items in an array are validated using the instance at their array position from .
+
+
+ true if items are validated using their array position; otherwise, false.
+
+
+
+
+ Gets or sets the of additional items.
+
+ The of additional items.
+
+
+
+ Gets or sets a value indicating whether additional items are allowed.
+
+
+ true if additional items are allowed; otherwise, false.
+
+
+
+
+ Gets or sets whether the array items must be unique.
+
+
+
+
+ Gets or sets the of properties.
+
+ The of properties.
+
+
+
+ Gets or sets the of additional properties.
+
+ The of additional properties.
+
+
+
+ Gets or sets the pattern properties.
+
+ The pattern properties.
+
+
+
+ Gets or sets a value indicating whether additional properties are allowed.
+
+
+ true if additional properties are allowed; otherwise, false.
+
+
+
+
+ Gets or sets the required property if this property is present.
+
+ The required property if this property is present.
+
+
+
+ Gets or sets the a collection of valid enum values allowed.
+
+ A collection of valid enum values allowed.
+
+
+
+ Gets or sets disallowed types.
+
+ The disallowed types.
+
+
+
+ Gets or sets the default value.
+
+ The default value.
+
+
+
+ Gets or sets the collection of that this schema extends.
+
+ The collection of that this schema extends.
+
+
+
+ Gets or sets the format.
+
+ The format.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads a from the specified .
+
+ The containing the JSON Schema to read.
+ The object representing the JSON Schema.
+
+
+
+ Reads a from the specified .
+
+ The containing the JSON Schema to read.
+ The to use when resolving schema references.
+ The object representing the JSON Schema.
+
+
+
+ Load a from a string that contains JSON Schema.
+
+ A that contains JSON Schema.
+ A populated from the string that contains JSON Schema.
+
+
+
+ Load a from a string that contains JSON Schema using the specified .
+
+ A that contains JSON Schema.
+ The resolver.
+ A populated from the string that contains JSON Schema.
+
+
+
+ Writes this schema to a .
+
+ A into which this method will write.
+
+
+
+ Writes this schema to a using the specified .
+
+ A into which this method will write.
+ The resolver used.
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+
+ Returns detailed information about the schema exception.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+
+ Generates a from a specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets how undefined schemas are handled by the serializer.
+
+
+
+
+ Gets or sets the contract resolver.
+
+ The contract resolver.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ The used to resolve schema references.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ Specify whether the generated root will be nullable.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ The used to resolve schema references.
+ Specify whether the generated root will be nullable.
+ A generated from the specified type.
+
+
+
+
+ Resolves from an id.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets the loaded schemas.
+
+ The loaded schemas.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets a for the specified reference.
+
+ The id.
+ A for the specified reference.
+
+
+
+
+ The value types allowed by the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ No type specified.
+
+
+
+
+ String type.
+
+
+
+
+ Float type.
+
+
+
+
+ Integer type.
+
+
+
+
+ Boolean type.
+
+
+
+
+ Object type.
+
+
+
+
+ Array type.
+
+
+
+
+ Null type.
+
+
+
+
+ Any type.
+
+
+
+
+
+ Specifies undefined schema Id handling options for the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Do not infer a schema Id.
+
+
+
+
+ Use the .NET type name as the schema Id.
+
+
+
+
+ Use the assembly qualified .NET type name as the schema Id.
+
+
+
+
+
+ Returns detailed information related to the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets the associated with the validation error.
+
+ The JsonSchemaException associated with the validation error.
+
+
+
+ Gets the path of the JSON location where the validation error occurred.
+
+ The path of the JSON location where the validation error occurred.
+
+
+
+ Gets the text description corresponding to the validation error.
+
+ The text description.
+
+
+
+
+ Represents the callback method that will handle JSON schema validation events and the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ A camel case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Resolves member mappings for a type, camel casing property names.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Used by to resolve a for a given .
+
+
+
+
+ Gets a value indicating whether members are being get and set using dynamic code generation.
+ This value is determined by the runtime permissions available.
+
+
+ true if using dynamic code generation; otherwise, false.
+
+
+
+
+ Gets or sets the default members search flags.
+
+ The default members search flags.
+
+
+
+ Gets or sets a value indicating whether compiler generated members should be serialized.
+
+
+ true if serialized compiler generated members; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types.
+
+
+ true if the interface will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore the attribute when serializing and deserializing types.
+
+
+ true if the attribute will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore IsSpecified members when serializing and deserializing types.
+
+
+ true if the IsSpecified members will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore ShouldSerialize members when serializing and deserializing types.
+
+
+ true if the ShouldSerialize members will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets the naming strategy used to resolve how property names and dictionary keys are serialized.
+
+ The naming strategy used to resolve how property names and dictionary keys are serialized.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Gets the serializable members for the type.
+
+ The type to get serializable members for.
+ The serializable members for the type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates the constructor parameters.
+
+ The constructor to create properties for.
+ The type's member properties.
+ Properties for the given .
+
+
+
+ Creates a for the given .
+
+ The matching member property.
+ The constructor parameter.
+ A created for the given .
+
+
+
+ Resolves the default for the contract.
+
+ Type of the object.
+ The contract's default .
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Determines which contract type is created for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates properties for the given .
+
+ The type to create properties for.
+ /// The member serialization mode for the type.
+ Properties for the given .
+
+
+
+ Creates the used by the serializer to get and set values from a member.
+
+ The member.
+ The used by the serializer to get and set values from a member.
+
+
+
+ Creates a for the given .
+
+ The member's parent .
+ The member to create a for.
+ A created for the given .
+
+
+
+ Resolves the name of the property.
+
+ Name of the property.
+ Resolved name of the property.
+
+
+
+ Resolves the name of the extension data. By default no changes are made to extension data names.
+
+ Name of the extension data.
+ Resolved name of the extension data.
+
+
+
+ Resolves the key of the dictionary. By default is used to resolve dictionary keys.
+
+ Key of the dictionary.
+ Resolved key of the dictionary.
+
+
+
+ Gets the resolved name of the property.
+
+ Name of the property.
+ Name of the property.
+
+
+
+ The default naming strategy. Property names and dictionary keys are unchanged.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ The default serialization binder used when resolving and loading classes from type names.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+ The type of the object the formatter creates a new instance of.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ Represents a trace writer that writes to the application's instances.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Get and set values for a using dynamic methods.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Provides information surrounding an error.
+
+
+
+
+ Gets the error.
+
+ The error.
+
+
+
+ Gets the original object that caused the error.
+
+ The original object that caused the error.
+
+
+
+ Gets the member that caused the error.
+
+ The member that caused the error.
+
+
+
+ Gets the path of the JSON location where the error occurred.
+
+ The path of the JSON location where the error occurred.
+
+
+
+ Gets or sets a value indicating whether this is handled.
+
+ true if handled; otherwise, false.
+
+
+
+ Provides data for the Error event.
+
+
+
+
+ Gets the current object the error event is being raised against.
+
+ The current object the error event is being raised against.
+
+
+
+ Gets the error context.
+
+ The error context.
+
+
+
+ Initializes a new instance of the class.
+
+ The current object.
+ The error context.
+
+
+
+ Get and set values for a using dynamic methods.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Provides methods to get attributes.
+
+
+
+
+ Returns a collection of all of the attributes, or an empty collection if there are no attributes.
+
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Returns a collection of attributes, identified by type, or an empty collection if there are no attributes.
+
+ The type of the attributes.
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Used by to resolve a for a given .
+
+
+
+
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Used to resolve references when serializing and deserializing JSON by the .
+
+
+
+
+ Resolves a reference to its object.
+
+ The serialization context.
+ The reference to resolve.
+ The object that was resolved from the reference.
+
+
+
+ Gets the reference for the specified object.
+
+ The serialization context.
+ The object to get a reference for.
+ The reference to the object.
+
+
+
+ Determines whether the specified object is referenced.
+
+ The serialization context.
+ The object to test for a reference.
+
+ true if the specified object is referenced; otherwise, false.
+
+
+
+
+ Adds a reference to the specified object.
+
+ The serialization context.
+ The reference.
+ The object to reference.
+
+
+
+ Allows users to control class loading and mandate what class to load.
+
+
+
+
+ When implemented, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object
+ The type of the object the formatter creates a new instance of.
+
+
+
+ When implemented, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ Represents a trace writer.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Provides methods to get and set values.
+
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the of the collection items.
+
+ The of the collection items.
+
+
+
+ Gets a value indicating whether the collection type is a multidimensional array.
+
+ true if the collection type is a multidimensional array; otherwise, false.
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+
+ The function used to create the object.
+
+
+
+ Gets a value indicating whether the creator has a parameter with the collection values.
+
+ true if the creator has a parameter with the collection values; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the default collection items .
+
+ The converter.
+
+
+
+ Gets or sets a value indicating whether the collection items preserve object references.
+
+ true if collection items preserve object references; otherwise, false.
+
+
+
+ Gets or sets the collection item reference loop handling.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the collection item type name handling.
+
+ The type name handling.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Handles serialization callback events.
+
+ The object that raised the callback event.
+ The streaming context.
+
+
+
+ Handles serialization error callback events.
+
+ The object that raised the callback event.
+ The streaming context.
+ The error context.
+
+
+
+ Sets extension data for an object during deserialization.
+
+ The object to set extension data on.
+ The extension data key.
+ The extension data value.
+
+
+
+ Gets extension data for an object during serialization.
+
+ The object to set extension data on.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the underlying type for the contract.
+
+ The underlying type for the contract.
+
+
+
+ Gets or sets the type created during deserialization.
+
+ The type created during deserialization.
+
+
+
+ Gets or sets whether this type contract is serialized as a reference.
+
+ Whether this type contract is serialized as a reference.
+
+
+
+ Gets or sets the default for this contract.
+
+ The converter.
+
+
+
+ Gets the internally resolved for the contract's type.
+ This converter is used as a fallback converter when no other converter is resolved.
+ Setting will always override this converter.
+
+
+
+
+ Gets or sets all methods called immediately after deserialization of the object.
+
+ The methods called immediately after deserialization of the object.
+
+
+
+ Gets or sets all methods called during deserialization of the object.
+
+ The methods called during deserialization of the object.
+
+
+
+ Gets or sets all methods called after serialization of the object graph.
+
+ The methods called after serialization of the object graph.
+
+
+
+ Gets or sets all methods called before serialization of the object.
+
+ The methods called before serialization of the object.
+
+
+
+ Gets or sets all method called when an error is thrown during the serialization of the object.
+
+ The methods called when an error is thrown during the serialization of the object.
+
+
+
+ Gets or sets the default creator method used to create the object.
+
+ The default creator method used to create the object.
+
+
+
+ Gets or sets a value indicating whether the default creator is non-public.
+
+ true if the default object creator is non-public; otherwise, false.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the dictionary key resolver.
+
+ The dictionary key resolver.
+
+
+
+ Gets the of the dictionary keys.
+
+ The of the dictionary keys.
+
+
+
+ Gets the of the dictionary values.
+
+ The of the dictionary values.
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+
+ The function used to create the object.
+
+
+
+ Gets a value indicating whether the creator has a parameter with the dictionary values.
+
+ true if the creator has a parameter with the dictionary values; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the object's properties.
+
+ The object's properties.
+
+
+
+ Gets or sets the property name resolver.
+
+ The property name resolver.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the object constructor.
+
+ The object constructor.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the object member serialization.
+
+ The member object serialization.
+
+
+
+ Gets or sets the missing member handling used when deserializing this object.
+
+ The missing member handling.
+
+
+
+ Gets or sets a value that indicates whether the object's properties are required.
+
+
+ A value indicating whether the object's properties are required.
+
+
+
+
+ Gets or sets how the object's properties with null values are handled during serialization and deserialization.
+
+ How the object's properties with null values are handled during serialization and deserialization.
+
+
+
+ Gets the object's properties.
+
+ The object's properties.
+
+
+
+ Gets a collection of instances that define the parameters used with .
+
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+ This function is called with a collection of arguments which are defined by the collection.
+
+ The function used to create the object.
+
+
+
+ Gets or sets the extension data setter.
+
+
+
+
+ Gets or sets the extension data getter.
+
+
+
+
+ Gets or sets the extension data value type.
+
+
+
+
+ Gets or sets the extension data name resolver.
+
+ The extension data name resolver.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Maps a JSON property to a .NET member or constructor parameter.
+
+
+
+
+ Gets or sets the name of the property.
+
+ The name of the property.
+
+
+
+ Gets or sets the type that declared this property.
+
+ The type that declared this property.
+
+
+
+ Gets or sets the order of serialization of a member.
+
+ The numeric order of serialization.
+
+
+
+ Gets or sets the name of the underlying member or parameter.
+
+ The name of the underlying member or parameter.
+
+
+
+ Gets the that will get and set the during serialization.
+
+ The that will get and set the during serialization.
+
+
+
+ Gets or sets the for this property.
+
+ The for this property.
+
+
+
+ Gets or sets the type of the property.
+
+ The type of the property.
+
+
+
+ Gets or sets the for the property.
+ If set this converter takes precedence over the contract converter for the property type.
+
+ The converter.
+
+
+
+ Gets or sets the member converter.
+
+ The member converter.
+
+
+
+ Gets or sets a value indicating whether this is ignored.
+
+ true if ignored; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this is readable.
+
+ true if readable; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this is writable.
+
+ true if writable; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this has a member attribute.
+
+ true if has a member attribute; otherwise, false.
+
+
+
+ Gets the default value.
+
+ The default value.
+
+
+
+ Gets or sets a value indicating whether this is required.
+
+ A value indicating whether this is required.
+
+
+
+ Gets a value indicating whether has a value specified.
+
+
+
+
+ Gets or sets a value indicating whether this property preserves object references.
+
+
+ true if this instance is reference; otherwise, false.
+
+
+
+
+ Gets or sets the property null value handling.
+
+ The null value handling.
+
+
+
+ Gets or sets the property default value handling.
+
+ The default value handling.
+
+
+
+ Gets or sets the property reference loop handling.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the property object creation handling.
+
+ The object creation handling.
+
+
+
+ Gets or sets or sets the type name handling.
+
+ The type name handling.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be serialized.
+
+ A predicate used to determine whether the property should be serialized.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be deserialized.
+
+ A predicate used to determine whether the property should be deserialized.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be serialized.
+
+ A predicate used to determine whether the property should be serialized.
+
+
+
+ Gets or sets an action used to set whether the property has been deserialized.
+
+ An action used to set whether the property has been deserialized.
+
+
+
+ Returns a that represents this instance.
+
+
+ A that represents this instance.
+
+
+
+
+ Gets or sets the converter used when serializing the property's collection items.
+
+ The collection's items converter.
+
+
+
+ Gets or sets whether this property's collection items are serialized as a reference.
+
+ Whether this property's collection items are serialized as a reference.
+
+
+
+ Gets or sets the type name handling used when serializing the property's collection items.
+
+ The collection's items type name handling.
+
+
+
+ Gets or sets the reference loop handling used when serializing the property's collection items.
+
+ The collection's items reference loop handling.
+
+
+
+ A collection of objects.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The type.
+
+
+
+ When implemented in a derived class, extracts the key from the specified element.
+
+ The element from which to extract the key.
+ The key for the specified element.
+
+
+
+ Adds a object.
+
+ The property to add to the collection.
+
+
+
+ Gets the closest matching object.
+ First attempts to get an exact case match of and then
+ a case insensitive match.
+
+ Name of the property.
+ A matching property if found.
+
+
+
+ Gets a property by property name.
+
+ The name of the property to get.
+ Type property name string comparison.
+ A matching property if found.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Lookup and create an instance of the type described by the argument.
+
+ The type to create.
+ Optional arguments to pass to an initializing constructor of the JsonConverter.
+ If null, the default constructor is used.
+
+
+
+ A kebab case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Represents a trace writer that writes to memory. When the trace message limit is
+ reached then old trace messages will be removed as new messages are added.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Returns an enumeration of the most recent trace messages.
+
+ An enumeration of the most recent trace messages.
+
+
+
+ Returns a of the most recent trace messages.
+
+
+ A of the most recent trace messages.
+
+
+
+
+ A base class for resolving how property names and dictionary keys are serialized.
+
+
+
+
+ A flag indicating whether dictionary keys should be processed.
+ Defaults to false.
+
+
+
+
+ A flag indicating whether extension data names should be processed.
+ Defaults to false.
+
+
+
+
+ A flag indicating whether explicitly specified property names,
+ e.g. a property name customized with a , should be processed.
+ Defaults to false.
+
+
+
+
+ Gets the serialized name for a given property name.
+
+ The initial property name.
+ A flag indicating whether the property has had a name explicitly specified.
+ The serialized property name.
+
+
+
+ Gets the serialized name for a given extension data name.
+
+ The initial extension data name.
+ The serialized extension data name.
+
+
+
+ Gets the serialized key for a given dictionary key.
+
+ The initial dictionary key.
+ The serialized dictionary key.
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Hash code calculation
+
+
+
+
+
+ Object equality implementation
+
+
+
+
+
+
+ Compare to another NamingStrategy
+
+
+
+
+
+
+ Represents a method that constructs an object.
+
+ The object type to create.
+
+
+
+ When applied to a method, specifies that the method is called when an error occurs serializing an object.
+
+
+
+
+ Provides methods to get attributes from a , , or .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The instance to get attributes for. This parameter should be a , , or .
+
+
+
+ Returns a collection of all of the attributes, or an empty collection if there are no attributes.
+
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Returns a collection of attributes, identified by type, or an empty collection if there are no attributes.
+
+ The type of the attributes.
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Get and set values for a using reflection.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ A snake case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Specifies how strings are escaped when writing JSON text.
+
+
+
+
+ Only control characters (e.g. newline) are escaped.
+
+
+
+
+ All non-ASCII and control characters (e.g. newline) are escaped.
+
+
+
+
+ HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped.
+
+
+
+
+ Indicates the method that will be used during deserialization for locating and loading assemblies.
+
+
+
+
+ In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the LoadWithPartialName method of the class is used to load the assembly.
+
+
+
+
+ In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The Load method of the class is used to load the assembly.
+
+
+
+
+ Specifies type name handling options for the .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+
+
+
+ Do not include the .NET type name when serializing types.
+
+
+
+
+ Include the .NET type name when serializing into a JSON object structure.
+
+
+
+
+ Include the .NET type name when serializing into a JSON array structure.
+
+
+
+
+ Always include the .NET type name when serializing.
+
+
+
+
+ Include the .NET type name when the type of the object being serialized is not the same as its declared type.
+ Note that this doesn't include the root serialized object by default. To include the root object's type name in JSON
+ you must specify a root type object with
+ or .
+
+
+
+
+ Determines whether the collection is null or empty.
+
+ The collection.
+
+ true if the collection is null or empty; otherwise, false.
+
+
+
+
+ Adds the elements of the specified collection to the specified generic .
+
+ The list to add to.
+ The collection of elements to add.
+
+
+
+ Converts the value to the specified type. If the value is unable to be converted, the
+ value is checked whether it assignable to the specified type.
+
+ The value to convert.
+ The culture to use when converting.
+ The type to convert or cast the value to.
+
+ The converted type. If conversion was unsuccessful, the initial value
+ is returned if assignable to the target type.
+
+
+
+
+ Helper method for generating a MetaObject which calls a
+ specific method on Dynamic that returns a result
+
+
+
+
+ Helper method for generating a MetaObject which calls a
+ specific method on Dynamic, but uses one of the arguments for
+ the result.
+
+
+
+
+ Helper method for generating a MetaObject which calls a
+ specific method on Dynamic, but uses one of the arguments for
+ the result.
+
+
+
+
+ Returns a Restrictions object which includes our current restrictions merged
+ with a restriction limiting our type
+
+
+
+
+ Helper class for serializing immutable collections.
+ Note that this is used by all builds, even those that don't support immutable collections, in case the DLL is GACed
+ https://github.com/JamesNK/Newtonsoft.Json/issues/652
+
+
+
+
+ Gets the type of the typed collection's items.
+
+ The type.
+ The type of the typed collection's items.
+
+
+
+ Gets the member's underlying type.
+
+ The member.
+ The underlying type of the member.
+
+
+
+ Determines whether the property is an indexed property.
+
+ The property.
+
+ true if the property is an indexed property; otherwise, false.
+
+
+
+
+ Gets the member's value on the object.
+
+ The member.
+ The target object.
+ The member's value on the object.
+
+
+
+ Sets the member's value on the target object.
+
+ The member.
+ The target.
+ The value.
+
+
+
+ Determines whether the specified MemberInfo can be read.
+
+ The MemberInfo to determine whether can be read.
+ /// if set to true then allow the member to be gotten non-publicly.
+
+ true if the specified MemberInfo can be read; otherwise, false.
+
+
+
+
+ Determines whether the specified MemberInfo can be set.
+
+ The MemberInfo to determine whether can be set.
+ if set to true then allow the member to be set non-publicly.
+ if set to true then allow the member to be set if read-only.
+
+ true if the specified MemberInfo can be set; otherwise, false.
+
+
+
+
+ Builds a string. Unlike this class lets you reuse its internal buffer.
+
+
+
+
+ Determines whether the string is all white space. Empty string will return false.
+
+ The string to test whether it is all white space.
+
+ true if the string is all white space; otherwise, false.
+
+
+
+
+ Specifies the state of the .
+
+
+
+
+ An exception has been thrown, which has left the in an invalid state.
+ You may call the method to put the in the Closed state.
+ Any other method calls result in an being thrown.
+
+
+
+
+ The method has been called.
+
+
+
+
+ An object is being written.
+
+
+
+
+ An array is being written.
+
+
+
+
+ A constructor is being written.
+
+
+
+
+ A property is being written.
+
+
+
+
+ A write method has not been called.
+
+
+
+ Specifies that an output will not be null even if the corresponding type allows it.
+
+
+ Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it.
+
+
+ Initializes the attribute with the specified return value condition.
+
+ The return value condition. If the method returns this value, the associated parameter will not be null.
+
+
+
+ Gets the return value condition.
+
+
+ Specifies that an output may be null even if the corresponding type disallows it.
+
+
+ Specifies that null is allowed as an input even if the corresponding type disallows it.
+
+
+
+ Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
+ the associated parameter matches this value.
+
+
+
+ Gets the condition parameter value.
+
+
+
diff --git a/packages/Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.dll b/packages/Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.dll
new file mode 100644
index 00000000..e4a63399
Binary files /dev/null and b/packages/Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.dll differ
diff --git a/packages/Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.xml b/packages/Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.xml
new file mode 100644
index 00000000..af9ceda5
--- /dev/null
+++ b/packages/Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.xml
@@ -0,0 +1,11262 @@
+
+
+
+ Newtonsoft.Json
+
+
+
+
+ Represents a BSON Oid (object id).
+
+
+
+
+ Gets or sets the value of the Oid.
+
+ The value of the Oid.
+
+
+
+ Initializes a new instance of the class.
+
+ The Oid value.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized BSON data.
+
+
+
+
+ Gets or sets a value indicating whether binary data reading should be compatible with incorrect Json.NET 3.5 written binary.
+
+
+ true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether the root object will be read as a JSON array.
+
+
+ true if the root object will be read as a JSON array; otherwise, false.
+
+
+
+
+ Gets or sets the used when reading values from BSON.
+
+ The used when reading values from BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+ if set to true the root object will be read as a JSON array.
+ The used when reading values from BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+ if set to true the root object will be read as a JSON array.
+ The used when reading values from BSON.
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating BSON data.
+
+
+
+
+ Gets or sets the used when writing values to BSON.
+ When set to no conversion will occur.
+
+ The used when writing values to BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The to write to.
+
+
+
+ Initializes a new instance of the class.
+
+ The to write to.
+
+
+
+ Flushes whatever is in the buffer to the underlying and also flushes the underlying stream.
+
+
+
+
+ Writes the end.
+
+ The token.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Closes this writer.
+ If is set to true, the underlying is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value that represents a BSON object id.
+
+ The Object ID value to write.
+
+
+
+ Writes a BSON regex.
+
+ The regex pattern.
+ The regex options.
+
+
+
+ Specifies how constructors are used when initializing objects during deserialization by the .
+
+
+
+
+ First attempt to use the public default constructor, then fall back to a single parameterized constructor, then to the non-public default constructor.
+
+
+
+
+ Json.NET will use a non-public default constructor before falling back to a parameterized constructor.
+
+
+
+
+ Converts a binary value to and from a base 64 string value.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON and BSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Creates a custom object.
+
+ The object type to convert.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Creates an object which will then be populated by the serializer.
+
+ Type of the object.
+ The created object.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+
+ true if this can write JSON; otherwise, false.
+
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified value type.
+
+ Type of the value.
+
+ true if this instance can convert the specified value type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified value type.
+
+ Type of the value.
+
+ true if this instance can convert the specified value type; otherwise, false.
+
+
+
+
+ Provides a base class for converting a to and from JSON.
+
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a F# discriminated union type to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an Entity Framework to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+
+ true if this can write JSON; otherwise, false.
+
+
+
+
+ Converts a to and from the ISO 8601 date format (e.g. "2008-04-12T12:53Z").
+
+
+
+
+ Gets or sets the date time styles used when converting a date to and from JSON.
+
+ The date time styles used when converting a date to and from JSON.
+
+
+
+ Gets or sets the date time format used when converting a date to and from JSON.
+
+ The date time format used when converting a date to and from JSON.
+
+
+
+ Gets or sets the culture used when converting a date to and from JSON.
+
+ The culture used when converting a date to and from JSON.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from a JavaScript Date constructor (e.g. new Date(52231943)).
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON and BSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an to and from its name string value.
+
+
+
+
+ Gets or sets a value indicating whether the written enum text should be camel case.
+ The default value is false.
+
+ true if the written enum text will be camel case; otherwise, false.
+
+
+
+ Gets or sets the naming strategy used to resolve how enum text is written.
+
+ The naming strategy used to resolve how enum text is written.
+
+
+
+ Gets or sets a value indicating whether integer values are allowed when serializing and deserializing.
+ The default value is true.
+
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ true if the written enum text will be camel case; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The naming strategy used to resolve how enum text is written.
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from Unix epoch time
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from a string (e.g. "1.2.3.4").
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts XML to and from JSON.
+
+
+
+
+ Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produced multiple root elements.
+
+ The name of the deserialized root element.
+
+
+
+ Gets or sets a value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ true if the array attribute is written to the XML; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether to write the root JSON object.
+
+ true if the JSON root object is omitted; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ true if special characters are encoded; otherwise, false.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The calling serializer.
+ The value.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Checks if the is a namespace attribute.
+
+ Attribute name to test.
+ The attribute name prefix if it has one, otherwise an empty string.
+ true if attribute name is for a namespace attribute, otherwise false.
+
+
+
+ Determines whether this instance can convert the specified value type.
+
+ Type of the value.
+
+ true if this instance can convert the specified value type; otherwise, false.
+
+
+
+
+ Specifies how dates are formatted when writing JSON text.
+
+
+
+
+ Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z".
+
+
+
+
+ Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/".
+
+
+
+
+ Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text.
+
+
+
+
+ Date formatted strings are not parsed to a date type and are read as strings.
+
+
+
+
+ Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to .
+
+
+
+
+ Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to .
+
+
+
+
+ Specifies how to treat the time value when converting between string and .
+
+
+
+
+ Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time.
+
+
+
+
+ Treat as a UTC. If the object represents a local time, it is converted to a UTC.
+
+
+
+
+ Treat as a local time if a is being converted to a string.
+ If a string is being converted to , convert to a local time if a time zone is specified.
+
+
+
+
+ Time zone information should be preserved when converting.
+
+
+
+
+ The default JSON name table implementation.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets a string containing the same characters as the specified range of characters in the given array.
+
+ The character array containing the name to find.
+ The zero-based index into the array specifying the first character of the name.
+ The number of characters in the name.
+ A string containing the same characters as the specified range of characters in the given array.
+
+
+
+ Adds the specified string into name table.
+
+ The string to add.
+ This method is not thread-safe.
+ The resolved string.
+
+
+
+ Specifies default value handling options for the .
+
+
+
+
+
+
+
+
+ Include members where the member value is the same as the member's default value when serializing objects.
+ Included members are written to JSON. Has no effect when deserializing.
+
+
+
+
+ Ignore members where the member value is the same as the member's default value when serializing objects
+ so that it is not written to JSON.
+ This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers,
+ decimals and floating point numbers; and false for booleans). The default value ignored can be changed by
+ placing the on the property.
+
+
+
+
+ Members with a default value but no JSON will be set to their default value when deserializing.
+
+
+
+
+ Ignore members where the member value is the same as the member's default value when serializing objects
+ and set members to their default value when deserializing.
+
+
+
+
+ Specifies float format handling options when writing special floating point numbers, e.g. ,
+ and with .
+
+
+
+
+ Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity".
+
+
+
+
+ Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity.
+ Note that this will produce non-valid JSON.
+
+
+
+
+ Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a of property.
+
+
+
+
+ Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+
+
+
+
+ Floating point numbers are parsed to .
+
+
+
+
+ Floating point numbers are parsed to .
+
+
+
+
+ Specifies formatting options for the .
+
+
+
+
+ No special formatting is applied. This is the default.
+
+
+
+
+ Causes child objects to be indented according to the and settings.
+
+
+
+
+ Provides an interface for using pooled arrays.
+
+ The array type content.
+
+
+
+ Rent an array from the pool. This array must be returned when it is no longer needed.
+
+ The minimum required length of the array. The returned array may be longer.
+ The rented array from the pool. This array must be returned when it is no longer needed.
+
+
+
+ Return an array to the pool.
+
+ The array that is being returned.
+
+
+
+ Provides an interface to enable a class to return line and position information.
+
+
+
+
+ Gets a value indicating whether the class can return line information.
+
+
+ true if and can be provided; otherwise, false.
+
+
+
+
+ Gets the current line number.
+
+ The current line number or 0 if no line information is available (for example, when returns false).
+
+
+
+ Gets the current line position.
+
+ The current line position or 0 if no line information is available (for example, when returns false).
+
+
+
+ Instructs the how to serialize the collection.
+
+
+
+
+ Gets or sets a value indicating whether null items are allowed in the collection.
+
+ true if null items are allowed in the collection; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with a flag indicating whether the array can contain null items.
+
+ A flag indicating whether the array can contain null items.
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Instructs the to use the specified constructor when deserializing that object.
+
+
+
+
+ Instructs the how to serialize the object.
+
+
+
+
+ Gets or sets the id.
+
+ The id.
+
+
+
+ Gets or sets the title.
+
+ The title.
+
+
+
+ Gets or sets the description.
+
+ The description.
+
+
+
+ Gets or sets the collection's items converter.
+
+ The collection's items converter.
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonContainer(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets a value that indicates whether to preserve object references.
+
+
+ true to keep object reference; otherwise, false. The default is false.
+
+
+
+
+ Gets or sets a value that indicates whether to preserve collection's items references.
+
+
+ true to keep collection's items object references; otherwise, false. The default is false.
+
+
+
+
+ Gets or sets the reference loop handling used when serializing the collection's items.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the type name handling used when serializing the collection's items.
+
+ The type name handling.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Provides methods for converting between .NET types and JSON types.
+
+
+
+
+
+
+
+ Gets or sets a function that creates default .
+ Default settings are automatically used by serialization methods on ,
+ and and on .
+ To serialize without using any default settings create a with
+ .
+
+
+
+
+ Represents JavaScript's boolean value true as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's boolean value false as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's null as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's undefined as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's positive infinity as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's negative infinity as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's NaN as a string. This field is read-only.
+
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation using the specified.
+
+ The value to convert.
+ The format the date will be converted to.
+ The time zone handling when the date is converted to a string.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation using the specified.
+
+ The value to convert.
+ The format the date will be converted to.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ The string delimiter character.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ The string delimiter character.
+ The string escape handling.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Serializes the specified object to a JSON string.
+
+ The object to serialize.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using formatting.
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a collection of .
+
+ The object to serialize.
+ A collection of converters used while serializing.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using formatting and a collection of .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ A collection of converters used while serializing.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using .
+
+ The object to serialize.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a type, formatting and .
+
+ The object to serialize.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using formatting and .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a type, formatting and .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+ A JSON string representation of the object.
+
+
+
+
+ Deserializes the JSON to a .NET object.
+
+ The JSON to deserialize.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to a .NET object using .
+
+ The JSON to deserialize.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type.
+
+ The JSON to deserialize.
+ The of object being deserialized.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type.
+
+ The type of the object to deserialize to.
+ The JSON to deserialize.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the given anonymous type.
+
+
+ The anonymous type to deserialize to. This can't be specified
+ traditionally and must be inferred from the anonymous type passed
+ as a parameter.
+
+ The JSON to deserialize.
+ The anonymous type object.
+ The deserialized anonymous type from the JSON string.
+
+
+
+ Deserializes the JSON to the given anonymous type using .
+
+
+ The anonymous type to deserialize to. This can't be specified
+ traditionally and must be inferred from the anonymous type passed
+ as a parameter.
+
+ The JSON to deserialize.
+ The anonymous type object.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized anonymous type from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using a collection of .
+
+ The type of the object to deserialize to.
+ The JSON to deserialize.
+ Converters to use while deserializing.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using .
+
+ The type of the object to deserialize to.
+ The object to deserialize.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using a collection of .
+
+ The JSON to deserialize.
+ The type of the object to deserialize.
+ Converters to use while deserializing.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using .
+
+ The JSON to deserialize.
+ The type of the object to deserialize to.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Populates the object with values from the JSON string.
+
+ The JSON to populate values from.
+ The target object to populate values onto.
+
+
+
+ Populates the object with values from the JSON string using .
+
+ The JSON to populate values from.
+ The target object to populate values onto.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+
+
+
+ Serializes the to a JSON string.
+
+ The node to serialize.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting and omits the root object if is true.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ Omits writing the root object.
+ A JSON string of the .
+
+
+
+ Deserializes the from a JSON string.
+
+ The JSON string.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by .
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by
+ and writes a Json.NET array attribute for collections.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by ,
+ writes a Json.NET array attribute for collections, and encodes special characters.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+
+ A value to indicate whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ The deserialized .
+
+
+
+ Serializes the to a JSON string.
+
+ The node to convert to JSON.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting.
+
+ The node to convert to JSON.
+ Indicates how the output should be formatted.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting and omits the root object if is true.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ Omits writing the root object.
+ A JSON string of the .
+
+
+
+ Deserializes the from a JSON string.
+
+ The JSON string.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by .
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by
+ and writes a Json.NET array attribute for collections.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by ,
+ writes a Json.NET array attribute for collections, and encodes special characters.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+
+ A value to indicate whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ The deserialized .
+
+
+
+ Converts an object to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can read JSON.
+
+ true if this can read JSON; otherwise, false.
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+ true if this can write JSON; otherwise, false.
+
+
+
+ Converts an object to and from JSON.
+
+ The object type to convert.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read. If there is no existing value then null will be used.
+ The existing value has a value.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Instructs the to use the specified when serializing the member or class.
+
+
+
+
+ Gets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+
+
+
+
+ Initializes a new instance of the class.
+
+ Type of the .
+
+
+
+ Initializes a new instance of the class.
+
+ Type of the .
+ Parameter list to use when constructing the . Can be null.
+
+
+
+ Represents a collection of .
+
+
+
+
+ Instructs the how to serialize the collection.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ The exception thrown when an error occurs during JSON serialization or deserialization.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Instructs the to deserialize properties with no matching class member into the specified collection
+ and write values during serialization.
+
+
+
+
+ Gets or sets a value that indicates whether to write extension data when serializing the object.
+
+
+ true to write extension data when serializing the object; otherwise, false. The default is true.
+
+
+
+
+ Gets or sets a value that indicates whether to read extension data when deserializing the object.
+
+
+ true to read extension data when deserializing the object; otherwise, false. The default is true.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Instructs the not to serialize the public field or public read/write property value.
+
+
+
+
+ Base class for a table of atomized string objects.
+
+
+
+
+ Gets a string containing the same characters as the specified range of characters in the given array.
+
+ The character array containing the name to find.
+ The zero-based index into the array specifying the first character of the name.
+ The number of characters in the name.
+ A string containing the same characters as the specified range of characters in the given array.
+
+
+
+ Instructs the how to serialize the object.
+
+
+
+
+ Gets or sets the member serialization.
+
+ The member serialization.
+
+
+
+ Gets or sets the missing member handling used when deserializing this object.
+
+ The missing member handling.
+
+
+
+ Gets or sets how the object's properties with null values are handled during serialization and deserialization.
+
+ How the object's properties with null values are handled during serialization and deserialization.
+
+
+
+ Gets or sets a value that indicates whether the object's properties are required.
+
+
+ A value indicating whether the object's properties are required.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified member serialization.
+
+ The member serialization.
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Instructs the to always serialize the member with the specified name.
+
+
+
+
+ Gets or sets the type used when serializing the property's collection items.
+
+ The collection's items type.
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonProperty(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the null value handling used when serializing this property.
+
+ The null value handling.
+
+
+
+ Gets or sets the default value handling used when serializing this property.
+
+ The default value handling.
+
+
+
+ Gets or sets the reference loop handling used when serializing this property.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the object creation handling used when deserializing this property.
+
+ The object creation handling.
+
+
+
+ Gets or sets the type name handling used when serializing this property.
+
+ The type name handling.
+
+
+
+ Gets or sets whether this property's value is serialized as a reference.
+
+ Whether this property's value is serialized as a reference.
+
+
+
+ Gets or sets the order of serialization of a member.
+
+ The numeric order of serialization.
+
+
+
+ Gets or sets a value indicating whether this property is required.
+
+
+ A value indicating whether this property is required.
+
+
+
+
+ Gets or sets the name of the property.
+
+ The name of the property.
+
+
+
+ Gets or sets the reference loop handling used when serializing the property's collection items.
+
+ The collection's items reference loop handling.
+
+
+
+ Gets or sets the type name handling used when serializing the property's collection items.
+
+ The collection's items type name handling.
+
+
+
+ Gets or sets whether this property's collection items are serialized as a reference.
+
+ Whether this property's collection items are serialized as a reference.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ Name of the property.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
+
+
+
+
+ Asynchronously reads the next JSON token from the source.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns true if the next token was read successfully; false if there are no more tokens to read.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously skips the children of the current token.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a [].
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the []. This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Specifies the state of the reader.
+
+
+
+
+ A read method has not been called.
+
+
+
+
+ The end of the file has been reached successfully.
+
+
+
+
+ Reader is at a property.
+
+
+
+
+ Reader is at the start of an object.
+
+
+
+
+ Reader is in an object.
+
+
+
+
+ Reader is at the start of an array.
+
+
+
+
+ Reader is in an array.
+
+
+
+
+ The method has been called.
+
+
+
+
+ Reader has just read a value.
+
+
+
+
+ Reader is at the start of a constructor.
+
+
+
+
+ Reader is in a constructor.
+
+
+
+
+ An error occurred that prevents the read operation from continuing.
+
+
+
+
+ The end of the file has been reached successfully.
+
+
+
+
+ Gets the current reader state.
+
+ The current reader state.
+
+
+
+ Gets or sets a value indicating whether the source should be closed when this reader is closed.
+
+
+ true to close the source when this reader is closed; otherwise false. The default is true.
+
+
+
+
+ Gets or sets a value indicating whether multiple pieces of JSON content can
+ be read from a continuous stream without erroring.
+
+
+ true to support reading multiple pieces of JSON content; otherwise false.
+ The default is false.
+
+
+
+
+ Gets the quotation mark character used to enclose the value of a string.
+
+
+
+
+ Gets or sets how time zones are handled when reading JSON.
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+
+
+
+
+ Gets or sets how custom date formatted strings are parsed when reading JSON.
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+
+
+
+
+ Gets the type of the current JSON token.
+
+
+
+
+ Gets the text value of the current JSON token.
+
+
+
+
+ Gets the .NET type for the current JSON token.
+
+
+
+
+ Gets the depth of the current token in the JSON document.
+
+ The depth of the current token in the JSON document.
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Gets or sets the culture used when reading JSON. Defaults to .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads the next JSON token from the source.
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a [].
+
+ A [] or null if the next JSON token is null. This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Skips the children of the current token.
+
+
+
+
+ Sets the current token.
+
+ The new token.
+
+
+
+ Sets the current token and value.
+
+ The new token.
+ The value.
+
+
+
+ Sets the current token and value.
+
+ The new token.
+ The value.
+ A flag indicating whether the position index inside an array should be updated.
+
+
+
+ Sets the state based on current token type.
+
+
+
+
+ Releases unmanaged and - optionally - managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the source is also closed.
+
+
+
+
+ The exception thrown when an error occurs while reading JSON text.
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The line number indicating where the error occurred.
+ The line position indicating where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Instructs the to always serialize the member, and to require that the member has a value.
+
+
+
+
+ The exception thrown when an error occurs during JSON serialization or deserialization.
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The line number indicating where the error occurred.
+ The line position indicating where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Serializes and deserializes objects into and from the JSON format.
+ The enables you to control how objects are encoded into JSON.
+
+
+
+
+ Occurs when the errors during serialization and deserialization.
+
+
+
+
+ Gets or sets the used by the serializer when resolving references.
+
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+
+
+
+ Gets or sets the used by the serializer when writing trace messages.
+
+ The trace writer.
+
+
+
+ Gets or sets the equality comparer used by the serializer when comparing references.
+
+ The equality comparer.
+
+
+
+ Gets or sets how type name writing and reading is handled by the serializer.
+ The default value is .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how object references are preserved by the serializer.
+ The default value is .
+
+
+
+
+ Gets or sets how reference loops (e.g. a class referencing itself) is handled.
+ The default value is .
+
+
+
+
+ Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how null values are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how default values are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how objects are created during deserialization.
+ The default value is .
+
+ The object creation handling.
+
+
+
+ Gets or sets how constructors are used during deserialization.
+ The default value is .
+
+ The constructor handling.
+
+
+
+ Gets or sets how metadata properties are used during deserialization.
+ The default value is .
+
+ The metadata properties handling.
+
+
+
+ Gets a collection that will be used during serialization.
+
+ Collection that will be used during serialization.
+
+
+
+ Gets or sets the contract resolver used by the serializer when
+ serializing .NET objects to JSON and vice versa.
+
+
+
+
+ Gets or sets the used by the serializer when invoking serialization callback methods.
+
+ The context.
+
+
+
+ Indicates how JSON text output is formatted.
+ The default value is .
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how time zones are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written as JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how and values are formatted when writing JSON text,
+ and the expected date format when reading JSON text.
+ The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
+
+
+
+
+ Gets or sets the culture used when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+ A null value means there is no maximum.
+ The default value is null.
+
+
+
+
+ Gets a value indicating whether there will be a check for additional JSON content after deserializing an object.
+ The default value is false.
+
+
+ true if there will be a check for additional JSON content after deserializing an object; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Creates a new instance.
+ The will not use default settings
+ from .
+
+
+ A new instance.
+ The will not use default settings
+ from .
+
+
+
+
+ Creates a new instance using the specified .
+ The will not use default settings
+ from .
+
+ The settings to be applied to the .
+
+ A new instance using the specified .
+ The will not use default settings
+ from .
+
+
+
+
+ Creates a new instance.
+ The will use default settings
+ from .
+
+
+ A new instance.
+ The will use default settings
+ from .
+
+
+
+
+ Creates a new instance using the specified .
+ The will use default settings
+ from as well as the specified .
+
+ The settings to be applied to the .
+
+ A new instance using the specified .
+ The will use default settings
+ from as well as the specified .
+
+
+
+
+ Populates the JSON values onto the target object.
+
+ The that contains the JSON structure to read values from.
+ The target object to populate values onto.
+
+
+
+ Populates the JSON values onto the target object.
+
+ The that contains the JSON structure to read values from.
+ The target object to populate values onto.
+
+
+
+ Deserializes the JSON structure contained by the specified .
+
+ The that contains the JSON structure to deserialize.
+ The being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The of object being deserialized.
+ The instance of being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The type of the object to deserialize.
+ The instance of being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The of object being deserialized.
+ The instance of being deserialized.
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+ The type of the value being serialized.
+ This parameter is used when is Auto to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+
+
+ Specifies the settings on a object.
+
+
+
+
+ Gets or sets how reference loops (e.g. a class referencing itself) are handled.
+ The default value is .
+
+ Reference loop handling.
+
+
+
+ Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
+ The default value is .
+
+ Missing member handling.
+
+
+
+ Gets or sets how objects are created during deserialization.
+ The default value is .
+
+ The object creation handling.
+
+
+
+ Gets or sets how null values are handled during serialization and deserialization.
+ The default value is .
+
+ Null value handling.
+
+
+
+ Gets or sets how default values are handled during serialization and deserialization.
+ The default value is .
+
+ The default value handling.
+
+
+
+ Gets or sets a collection that will be used during serialization.
+
+ The converters.
+
+
+
+ Gets or sets how object references are preserved by the serializer.
+ The default value is .
+
+ The preserve references handling.
+
+
+
+ Gets or sets how type name writing and reading is handled by the serializer.
+ The default value is .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+ The type name handling.
+
+
+
+ Gets or sets how metadata properties are used during deserialization.
+ The default value is .
+
+ The metadata properties handling.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how constructors are used during deserialization.
+ The default value is .
+
+ The constructor handling.
+
+
+
+ Gets or sets the contract resolver used by the serializer when
+ serializing .NET objects to JSON and vice versa.
+
+ The contract resolver.
+
+
+
+ Gets or sets the equality comparer used by the serializer when comparing references.
+
+ The equality comparer.
+
+
+
+ Gets or sets the used by the serializer when resolving references.
+
+ The reference resolver.
+
+
+
+ Gets or sets a function that creates the used by the serializer when resolving references.
+
+ A function that creates the used by the serializer when resolving references.
+
+
+
+ Gets or sets the used by the serializer when writing trace messages.
+
+ The trace writer.
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+ The binder.
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+ The binder.
+
+
+
+ Gets or sets the error handler called during serialization and deserialization.
+
+ The error handler called during serialization and deserialization.
+
+
+
+ Gets or sets the used by the serializer when invoking serialization callback methods.
+
+ The context.
+
+
+
+ Gets or sets how and values are formatted when writing JSON text,
+ and the expected date format when reading JSON text.
+ The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+ A null value means there is no maximum.
+ The default value is null.
+
+
+
+
+ Indicates how JSON text output is formatted.
+ The default value is .
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how time zones are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written as JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets the culture used when reading JSON.
+ The default value is .
+
+
+
+
+ Gets a value indicating whether there will be a check for additional content after deserializing an object.
+ The default value is false.
+
+
+ true if there will be a check for additional content after deserializing an object; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to JSON text data.
+
+
+
+
+ Asynchronously reads the next JSON token from the source.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns true if the next token was read successfully; false if there are no more tokens to read.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a [].
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the []. This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Initializes a new instance of the class with the specified .
+
+ The containing the JSON data to read.
+
+
+
+ Gets or sets the reader's property name table.
+
+
+
+
+ Gets or sets the reader's character buffer pool.
+
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a [].
+
+ A [] or null if the next JSON token is null. This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Gets a value indicating whether the class can return line information.
+
+
+ true if and can be provided; otherwise, false.
+
+
+
+
+ Gets the current line number.
+
+
+ The current line number or 0 if no line information is available (for example, returns false).
+
+
+
+
+ Gets the current line position.
+
+
+ The current line position or 0 if no line information is available (for example, returns false).
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the JSON value delimiter.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the specified end token.
+
+ The end token to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously closes this writer.
+ If is set to true, the destination is also closed.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of the current JSON object or array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes indent characters.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes an indent space.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a null value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the beginning of a JSON array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the beginning of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the start of a constructor with the given name.
+
+ The name of the constructor.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes an undefined value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the given white space.
+
+ The string of white space characters.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a [] value.
+
+ The [] value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of an array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of a constructor.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Gets or sets the writer's character array pool.
+
+
+
+
+ Gets or sets how many s to write for each level in the hierarchy when is set to .
+
+
+
+
+ Gets or sets which character to use to quote attribute values.
+
+
+
+
+ Gets or sets which character to use for indenting when is set to .
+
+
+
+
+ Gets or sets a value indicating whether object names will be surrounded with quotes.
+
+
+
+
+ Initializes a new instance of the class using the specified .
+
+ The to write to.
+
+
+
+ Flushes whatever is in the buffer to the underlying and also flushes the underlying .
+
+
+
+
+ Closes this writer.
+ If is set to true, the underlying is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the specified end token.
+
+ The end token to write.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+
+
+
+ Writes indent characters.
+
+
+
+
+ Writes the JSON value delimiter.
+
+
+
+
+ Writes an indent space.
+
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the given white space.
+
+ The string of white space characters.
+
+
+
+ Specifies the type of JSON token.
+
+
+
+
+ This is returned by the if a read method has not been called.
+
+
+
+
+ An object start token.
+
+
+
+
+ An array start token.
+
+
+
+
+ A constructor start token.
+
+
+
+
+ An object property name.
+
+
+
+
+ A comment.
+
+
+
+
+ Raw JSON.
+
+
+
+
+ An integer.
+
+
+
+
+ A float.
+
+
+
+
+ A string.
+
+
+
+
+ A boolean.
+
+
+
+
+ A null token.
+
+
+
+
+ An undefined token.
+
+
+
+
+ An object end token.
+
+
+
+
+ An array end token.
+
+
+
+
+ A constructor end token.
+
+
+
+
+ A Date.
+
+
+
+
+ Byte data.
+
+
+
+
+
+ Represents a reader that provides validation.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Sets an event handler for receiving schema validation errors.
+
+
+
+
+ Gets the text value of the current JSON token.
+
+
+
+
+
+ Gets the depth of the current token in the JSON document.
+
+ The depth of the current token in the JSON document.
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Gets the quotation mark character used to enclose the value of a string.
+
+
+
+
+
+ Gets the type of the current JSON token.
+
+
+
+
+
+ Gets the .NET type for the current JSON token.
+
+
+
+
+
+ Initializes a new instance of the class that
+ validates the content returned from the given .
+
+ The to read from while validating.
+
+
+
+ Gets or sets the schema.
+
+ The schema.
+
+
+
+ Gets the used to construct this .
+
+ The specified in the constructor.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a [].
+
+
+ A [] or null if the next JSON token is null.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Asynchronously closes this writer.
+ If is set to true, the destination is also closed.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the specified end token.
+
+ The end token to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes indent characters.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the JSON value delimiter.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes an indent space.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of the current JSON object or array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of an array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of a constructor.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a null value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the beginning of a JSON array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the start of a constructor with the given name.
+
+ The name of the constructor.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the beginning of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the current token.
+
+ The to read the token from.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the current token.
+
+ The to read the token from.
+ A flag indicating whether the current token's children should be written.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the token and its value.
+
+ The to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the token and its value.
+
+ The to write.
+
+ The value to write.
+ A value is only required for tokens that have an associated value, e.g. the property name for .
+ null can be passed to the method for tokens that don't have a value, e.g. .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a [] value.
+
+ The [] value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes an undefined value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the given white space.
+
+ The string of white space characters.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously ets the state of the .
+
+ The being written.
+ The value being written.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Gets or sets a value indicating whether the destination should be closed when this writer is closed.
+
+
+ true to close the destination when this writer is closed; otherwise false. The default is true.
+
+
+
+
+ Gets or sets a value indicating whether the JSON should be auto-completed when this writer is closed.
+
+
+ true to auto-complete the JSON when this writer is closed; otherwise false. The default is true.
+
+
+
+
+ Gets the top.
+
+ The top.
+
+
+
+ Gets the state of the writer.
+
+
+
+
+ Gets the path of the writer.
+
+
+
+
+ Gets or sets a value indicating how JSON text output should be formatted.
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+
+
+
+
+ Gets or sets how time zones are handled when writing JSON text.
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written to JSON text.
+
+
+
+
+ Gets or sets how and values are formatted when writing JSON text.
+
+
+
+
+ Gets or sets the culture used when writing JSON. Defaults to .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Flushes whatever is in the buffer to the destination and also flushes the destination.
+
+
+
+
+ Closes this writer.
+ If is set to true, the destination is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the end of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the end of an array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the end constructor.
+
+
+
+
+ Writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+
+
+
+ Writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+
+
+
+ Writes the end of the current JSON object or array.
+
+
+
+
+ Writes the current token and its children.
+
+ The to read the token from.
+
+
+
+ Writes the current token.
+
+ The to read the token from.
+ A flag indicating whether the current token's children should be written.
+
+
+
+ Writes the token and its value.
+
+ The to write.
+
+ The value to write.
+ A value is only required for tokens that have an associated value, e.g. the property name for .
+ null can be passed to the method for tokens that don't have a value, e.g. .
+
+
+
+
+ Writes the token.
+
+ The to write.
+
+
+
+ Writes the specified end token.
+
+ The end token to write.
+
+
+
+ Writes indent characters.
+
+
+
+
+ Writes the JSON value delimiter.
+
+
+
+
+ Writes an indent space.
+
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the given white space.
+
+ The string of white space characters.
+
+
+
+ Releases unmanaged and - optionally - managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Sets the state of the .
+
+ The being written.
+ The value being written.
+
+
+
+ The exception thrown when an error occurs while writing JSON text.
+
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Specifies how JSON comments are handled when loading JSON.
+
+
+
+
+ Ignore comments.
+
+
+
+
+ Load comments as a with type .
+
+
+
+
+ Specifies how duplicate property names are handled when loading JSON.
+
+
+
+
+ Replace the existing value when there is a duplicate property. The value of the last property in the JSON object will be used.
+
+
+
+
+ Ignore the new value when there is a duplicate property. The value of the first property in the JSON object will be used.
+
+
+
+
+ Throw a when a duplicate property is encountered.
+
+
+
+
+ Contains the LINQ to JSON extension methods.
+
+
+
+
+ Returns a collection of tokens that contains the ancestors of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains the ancestors of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains every token in the source collection, the ancestors of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains the descendants of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains the descendants of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains every token in the source collection, and the descendants of every token in the source collection.
+
+
+
+ Returns a collection of child properties of every object in the source collection.
+
+ An of that contains the source collection.
+ An of that contains the properties of every object in the source collection.
+
+
+
+ Returns a collection of child values of every object in the source collection with the given key.
+
+ An of that contains the source collection.
+ The token key.
+ An of that contains the values of every token in the source collection with the given key.
+
+
+
+ Returns a collection of child values of every object in the source collection.
+
+ An of that contains the source collection.
+ An of that contains the values of every token in the source collection.
+
+
+
+ Returns a collection of converted child values of every object in the source collection with the given key.
+
+ The type to convert the values to.
+ An of that contains the source collection.
+ The token key.
+ An that contains the converted values of every token in the source collection with the given key.
+
+
+
+ Returns a collection of converted child values of every object in the source collection.
+
+ The type to convert the values to.
+ An of that contains the source collection.
+ An that contains the converted values of every token in the source collection.
+
+
+
+ Converts the value.
+
+ The type to convert the value to.
+ A cast as a of .
+ A converted value.
+
+
+
+ Converts the value.
+
+ The source collection type.
+ The type to convert the value to.
+ A cast as a of .
+ A converted value.
+
+
+
+ Returns a collection of child tokens of every array in the source collection.
+
+ The source collection type.
+ An of that contains the source collection.
+ An of that contains the values of every token in the source collection.
+
+
+
+ Returns a collection of converted child tokens of every array in the source collection.
+
+ An of that contains the source collection.
+ The type to convert the values to.
+ The source collection type.
+ An that contains the converted values of every token in the source collection.
+
+
+
+ Returns the input typed as .
+
+ An of that contains the source collection.
+ The input typed as .
+
+
+
+ Returns the input typed as .
+
+ The source collection type.
+ An of that contains the source collection.
+ The input typed as .
+
+
+
+ Represents a collection of objects.
+
+ The type of token.
+
+
+
+ Gets the of with the specified key.
+
+
+
+
+
+ Represents a JSON array.
+
+
+
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous load. The property contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous load. The property contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the array.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the array.
+
+
+
+ Loads an from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads an from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+
+
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the values of the specified object.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ The that will be used to read the object.
+ A with the values of the specified object.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets or sets the at the specified index.
+
+
+
+
+
+ Determines the index of a specific item in the .
+
+ The object to locate in the .
+
+ The index of if found in the list; otherwise, -1.
+
+
+
+
+ Inserts an item to the at the specified index.
+
+ The zero-based index at which should be inserted.
+ The object to insert into the .
+
+ is not a valid index in the .
+
+
+
+
+ Removes the item at the specified index.
+
+ The zero-based index of the item to remove.
+
+ is not a valid index in the .
+
+
+
+
+ Returns an enumerator that iterates through the collection.
+
+
+ A of that can be used to iterate through the collection.
+
+
+
+
+ Adds an item to the .
+
+ The object to add to the .
+
+
+
+ Removes all items from the .
+
+
+
+
+ Determines whether the contains a specific value.
+
+ The object to locate in the .
+
+ true if is found in the ; otherwise, false.
+
+
+
+
+ Copies the elements of the to an array, starting at a particular array index.
+
+ The array.
+ Index of the array.
+
+
+
+ Gets a value indicating whether the is read-only.
+
+ true if the is read-only; otherwise, false.
+
+
+
+ Removes the first occurrence of a specific object from the .
+
+ The object to remove from the .
+
+ true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original .
+
+
+
+
+ Represents a JSON constructor.
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets or sets the name of this constructor.
+
+ The constructor name.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified name and content.
+
+ The constructor name.
+ The contents of the constructor.
+
+
+
+ Initializes a new instance of the class with the specified name and content.
+
+ The constructor name.
+ The contents of the constructor.
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ The constructor name.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Represents a token that can contain other tokens.
+
+
+
+
+ Occurs when the list changes or an item in the list changes.
+
+
+
+
+ Occurs before an item is added to the collection.
+
+
+
+
+ Occurs when the items list of the collection has changed, or the collection is reset.
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Get the first child token of this token.
+
+
+ A containing the first child token of the .
+
+
+
+
+ Get the last child token of this token.
+
+
+ A containing the last child token of the .
+
+
+
+
+ Returns a collection of the child tokens of this token, in document order.
+
+
+ An of containing the child tokens of this , in document order.
+
+
+
+
+ Returns a collection of the child values of this token, in document order.
+
+ The type to convert the values to.
+
+ A containing the child values of this , in document order.
+
+
+
+
+ Returns a collection of the descendant tokens for this token in document order.
+
+ An of containing the descendant tokens of the .
+
+
+
+ Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order.
+
+ An of containing this token, and all the descendant tokens of the .
+
+
+
+ Adds the specified content as children of this .
+
+ The content to be added.
+
+
+
+ Adds the specified content as the first children of this .
+
+ The content to be added.
+
+
+
+ Creates a that can be used to add tokens to the .
+
+ A that is ready to have content written to it.
+
+
+
+ Replaces the child nodes of this token with the specified content.
+
+ The content.
+
+
+
+ Removes the child nodes from this token.
+
+
+
+
+ Merge the specified content into this .
+
+ The content to be merged.
+
+
+
+ Merge the specified content into this using .
+
+ The content to be merged.
+ The used to merge the content.
+
+
+
+ Gets the count of child JSON tokens.
+
+ The count of child JSON tokens.
+
+
+
+ Represents a collection of objects.
+
+ The type of token.
+
+
+
+ An empty collection of objects.
+
+
+
+
+ Initializes a new instance of the struct.
+
+ The enumerable.
+
+
+
+ Returns an enumerator that can be used to iterate through the collection.
+
+
+ A that can be used to iterate through the collection.
+
+
+
+
+ Gets the of with the specified key.
+
+
+
+
+
+ Determines whether the specified is equal to this instance.
+
+ The to compare with this instance.
+
+ true if the specified is equal to this instance; otherwise, false.
+
+
+
+
+ Determines whether the specified is equal to this instance.
+
+ The to compare with this instance.
+
+ true if the specified is equal to this instance; otherwise, false.
+
+
+
+
+ Returns a hash code for this instance.
+
+
+ A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
+
+
+
+
+ Represents a JSON object.
+
+
+
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Occurs when a property value changes.
+
+
+
+
+ Occurs when a property value is changing.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the object.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the object.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets an of of this object's properties.
+
+ An of of this object's properties.
+
+
+
+ Gets a with the specified name.
+
+ The property name.
+ A with the specified name or null.
+
+
+
+ Gets the with the specified name.
+ The exact name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ The property name.
+ One of the enumeration values that specifies how the strings will be compared.
+ A matched with the specified name or null.
+
+
+
+ Gets a of of this object's property values.
+
+ A of of this object's property values.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets or sets the with the specified property name.
+
+
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+ is not valid JSON.
+
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+ is not valid JSON.
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+ is not valid JSON.
+
+
+
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+ is not valid JSON.
+
+
+
+
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the values of the specified object.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ The that will be used to read the object.
+ A with the values of the specified object.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified property name.
+
+ Name of the property.
+ The with the specified property name.
+
+
+
+ Gets the with the specified property name.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ Name of the property.
+ One of the enumeration values that specifies how the strings will be compared.
+ The with the specified property name.
+
+
+
+ Tries to get the with the specified property name.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ Name of the property.
+ The value.
+ One of the enumeration values that specifies how the strings will be compared.
+ true if a value was successfully retrieved; otherwise, false.
+
+
+
+ Adds the specified property name.
+
+ Name of the property.
+ The value.
+
+
+
+ Determines whether the JSON object has the specified property name.
+
+ Name of the property.
+ true if the JSON object has the specified property name; otherwise, false.
+
+
+
+ Removes the property with the specified name.
+
+ Name of the property.
+ true if item was successfully removed; otherwise, false.
+
+
+
+ Tries to get the with the specified property name.
+
+ Name of the property.
+ The value.
+ true if a value was successfully retrieved; otherwise, false.
+
+
+
+ Returns an enumerator that can be used to iterate through the collection.
+
+
+ A that can be used to iterate through the collection.
+
+
+
+
+ Raises the event with the provided arguments.
+
+ Name of the property.
+
+
+
+ Raises the event with the provided arguments.
+
+ Name of the property.
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Represents a JSON property.
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous creation. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous creation. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets the property name.
+
+ The property name.
+
+
+
+ Gets or sets the property value.
+
+ The property value.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+ The property name.
+ The property content.
+
+
+
+ Initializes a new instance of the class.
+
+ The property name.
+ The property content.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Represents a view of a .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The name.
+
+
+
+ When overridden in a derived class, returns whether resetting an object changes its value.
+
+
+ true if resetting the component changes its value; otherwise, false.
+
+ The component to test for reset capability.
+
+
+
+ When overridden in a derived class, gets the current value of the property on a component.
+
+
+ The value of a property for a given component.
+
+ The component with the property for which to retrieve the value.
+
+
+
+ When overridden in a derived class, resets the value for this property of the component to the default value.
+
+ The component with the property value that is to be reset to the default value.
+
+
+
+ When overridden in a derived class, sets the value of the component to a different value.
+
+ The component with the property value that is to be set.
+ The new value.
+
+
+
+ When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted.
+
+
+ true if the property should be persisted; otherwise, false.
+
+ The component with the property to be examined for persistence.
+
+
+
+ When overridden in a derived class, gets the type of the component this property is bound to.
+
+
+ A that represents the type of component this property is bound to.
+ When the or
+
+ methods are invoked, the object specified might be an instance of this type.
+
+
+
+
+ When overridden in a derived class, gets a value indicating whether this property is read-only.
+
+
+ true if the property is read-only; otherwise, false.
+
+
+
+
+ When overridden in a derived class, gets the type of the property.
+
+
+ A that represents the type of the property.
+
+
+
+
+ Gets the hash code for the name of the member.
+
+
+
+ The hash code for the name of the member.
+
+
+
+
+ Represents a raw JSON string.
+
+
+
+
+ Asynchronously creates an instance of with the content of the reader's current token.
+
+ The reader.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous creation. The
+ property returns an instance of with the content of the reader's current token.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class.
+
+ The raw json.
+
+
+
+ Creates an instance of with the content of the reader's current token.
+
+ The reader.
+ An instance of with the content of the reader's current token.
+
+
+
+ Specifies the settings used when loading JSON.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets or sets how JSON comments are handled when loading JSON.
+ The default value is .
+
+ The JSON comment handling.
+
+
+
+ Gets or sets how JSON line info is handled when loading JSON.
+ The default value is .
+
+ The JSON line info handling.
+
+
+
+ Gets or sets how duplicate property names in JSON objects are handled when loading JSON.
+ The default value is .
+
+ The JSON duplicate property name handling.
+
+
+
+ Specifies the settings used when merging JSON.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets or sets the method used when merging JSON arrays.
+
+ The method used when merging JSON arrays.
+
+
+
+ Gets or sets how null value properties are merged.
+
+ How null value properties are merged.
+
+
+
+ Gets or sets the comparison used to match property names while merging.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ The comparison used to match property names while merging.
+
+
+
+ Represents an abstract JSON token.
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously creates a from a .
+
+ An positioned at the token to read into this .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains
+ the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Asynchronously creates a from a .
+
+ An positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains
+ the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Asynchronously creates a from a .
+
+ A positioned at the token to read into this .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Asynchronously creates a from a .
+
+ A positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Gets a comparer that can compare two tokens for value equality.
+
+ A that can compare two nodes for value equality.
+
+
+
+ Gets or sets the parent.
+
+ The parent.
+
+
+
+ Gets the root of this .
+
+ The root of this .
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Compares the values of two tokens, including the values of all descendant tokens.
+
+ The first to compare.
+ The second to compare.
+ true if the tokens are equal; otherwise false.
+
+
+
+ Gets the next sibling token of this node.
+
+ The that contains the next sibling token.
+
+
+
+ Gets the previous sibling token of this node.
+
+ The that contains the previous sibling token.
+
+
+
+ Gets the path of the JSON token.
+
+
+
+
+ Adds the specified content immediately after this token.
+
+ A content object that contains simple content or a collection of content objects to be added after this token.
+
+
+
+ Adds the specified content immediately before this token.
+
+ A content object that contains simple content or a collection of content objects to be added before this token.
+
+
+
+ Returns a collection of the ancestor tokens of this token.
+
+ A collection of the ancestor tokens of this token.
+
+
+
+ Returns a collection of tokens that contain this token, and the ancestors of this token.
+
+ A collection of tokens that contain this token, and the ancestors of this token.
+
+
+
+ Returns a collection of the sibling tokens after this token, in document order.
+
+ A collection of the sibling tokens after this tokens, in document order.
+
+
+
+ Returns a collection of the sibling tokens before this token, in document order.
+
+ A collection of the sibling tokens before this token, in document order.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets the with the specified key converted to the specified type.
+
+ The type to convert the token to.
+ The token key.
+ The converted token value.
+
+
+
+ Get the first child token of this token.
+
+ A containing the first child token of the .
+
+
+
+ Get the last child token of this token.
+
+ A containing the last child token of the .
+
+
+
+ Returns a collection of the child tokens of this token, in document order.
+
+ An of containing the child tokens of this , in document order.
+
+
+
+ Returns a collection of the child tokens of this token, in document order, filtered by the specified type.
+
+ The type to filter the child tokens on.
+ A containing the child tokens of this , in document order.
+
+
+
+ Returns a collection of the child values of this token, in document order.
+
+ The type to convert the values to.
+ A containing the child values of this , in document order.
+
+
+
+ Removes this token from its parent.
+
+
+
+
+ Replaces this token with the specified token.
+
+ The value.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Returns the indented JSON for this token.
+
+
+ ToString() returns a non-JSON string value for tokens with a type of .
+ If you want the JSON for all token types then you should use .
+
+
+ The indented JSON for this token.
+
+
+
+
+ Returns the JSON for this token using the given formatting and converters.
+
+ Indicates how the output should be formatted.
+ A collection of s which will be used when writing the token.
+ The JSON for this token using the given formatting and converters.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to [].
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from [] to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Creates a for this token.
+
+ A that can be used to read this token and its descendants.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the value of the specified object.
+
+
+
+ Creates a from an object using the specified .
+
+ The object that will be used to create .
+ The that will be used when reading the object.
+ A with the value of the specified object.
+
+
+
+ Creates an instance of the specified .NET type from the .
+
+ The object type that the token will be deserialized to.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the .
+
+ The object type that the token will be deserialized to.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the using the specified .
+
+ The object type that the token will be deserialized to.
+ The that will be used when creating the object.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the using the specified .
+
+ The object type that the token will be deserialized to.
+ The that will be used when creating the object.
+ The new object created from the JSON value.
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Creates a from a .
+
+ An positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Selects a using a JSONPath expression. Selects the token that matches the object path.
+
+
+ A that contains a JSONPath expression.
+
+ A , or null.
+
+
+
+ Selects a using a JSONPath expression. Selects the token that matches the object path.
+
+
+ A that contains a JSONPath expression.
+
+ A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.
+ A .
+
+
+
+ Selects a collection of elements using a JSONPath expression.
+
+
+ A that contains a JSONPath expression.
+
+ An of that contains the selected elements.
+
+
+
+ Selects a collection of elements using a JSONPath expression.
+
+
+ A that contains a JSONPath expression.
+
+ A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.
+ An of that contains the selected elements.
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Creates a new instance of the . All child tokens are recursively cloned.
+
+ A new instance of the .
+
+
+
+ Adds an object to the annotation list of this .
+
+ The annotation to add.
+
+
+
+ Get the first annotation object of the specified type from this .
+
+ The type of the annotation to retrieve.
+ The first annotation object that matches the specified type, or null if no annotation is of the specified type.
+
+
+
+ Gets the first annotation object of the specified type from this .
+
+ The of the annotation to retrieve.
+ The first annotation object that matches the specified type, or null if no annotation is of the specified type.
+
+
+
+ Gets a collection of annotations of the specified type for this .
+
+ The type of the annotations to retrieve.
+ An that contains the annotations for this .
+
+
+
+ Gets a collection of annotations of the specified type for this .
+
+ The of the annotations to retrieve.
+ An of that contains the annotations that match the specified type for this .
+
+
+
+ Removes the annotations of the specified type from this .
+
+ The type of annotations to remove.
+
+
+
+ Removes the annotations of the specified type from this .
+
+ The of annotations to remove.
+
+
+
+ Compares tokens to determine whether they are equal.
+
+
+
+
+ Determines whether the specified objects are equal.
+
+ The first object of type to compare.
+ The second object of type to compare.
+
+ true if the specified objects are equal; otherwise, false.
+
+
+
+
+ Returns a hash code for the specified object.
+
+ The for which a hash code is to be returned.
+ A hash code for the specified object.
+ The type of is a reference type and is null.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
+
+
+
+
+ Gets the at the reader's current position.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The token to read from.
+
+
+
+ Initializes a new instance of the class.
+
+ The token to read from.
+ The initial path of the token. It is prepended to the returned .
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Specifies the type of token.
+
+
+
+
+ No token type has been set.
+
+
+
+
+ A JSON object.
+
+
+
+
+ A JSON array.
+
+
+
+
+ A JSON constructor.
+
+
+
+
+ A JSON object property.
+
+
+
+
+ A comment.
+
+
+
+
+ An integer value.
+
+
+
+
+ A float value.
+
+
+
+
+ A string value.
+
+
+
+
+ A boolean value.
+
+
+
+
+ A null value.
+
+
+
+
+ An undefined value.
+
+
+
+
+ A date value.
+
+
+
+
+ A raw JSON value.
+
+
+
+
+ A collection of bytes value.
+
+
+
+
+ A Guid value.
+
+
+
+
+ A Uri value.
+
+
+
+
+ A TimeSpan value.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Gets the at the writer's current position.
+
+
+
+
+ Gets the token being written.
+
+ The token being written.
+
+
+
+ Initializes a new instance of the class writing to the given .
+
+ The container being written to.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Flushes whatever is in the buffer to the underlying .
+
+
+
+
+ Closes this writer.
+ If is set to true, the JSON is auto-completed.
+
+
+ Setting to true has no additional effect, since the underlying is a type that cannot be closed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the end.
+
+ The token.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Writes a value.
+ An error will be raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Represents a value in JSON (string, integer, date, etc).
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Creates a comment with the given value.
+
+ The value.
+ A comment with the given value.
+
+
+
+ Creates a string with the given value.
+
+ The value.
+ A string with the given value.
+
+
+
+ Creates a null value.
+
+ A null value.
+
+
+
+ Creates a undefined value.
+
+ A undefined value.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets or sets the underlying token value.
+
+ The underlying token value.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of s which will be used when writing the token.
+
+
+
+ Indicates whether the current object is equal to another object of the same type.
+
+
+ true if the current object is equal to the parameter; otherwise, false.
+
+ An object to compare with this object.
+
+
+
+ Determines whether the specified is equal to the current .
+
+ The to compare with the current .
+
+ true if the specified is equal to the current ; otherwise, false.
+
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Returns a that represents this instance.
+
+
+ ToString() returns a non-JSON string value for tokens with a type of .
+ If you want the JSON for all token types then you should use .
+
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format.
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format provider.
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format.
+ The format provider.
+
+ A that represents this instance.
+
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
+
+ An object to compare with this instance.
+
+ A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings:
+ Value
+ Meaning
+ Less than zero
+ This instance is less than .
+ Zero
+ This instance is equal to .
+ Greater than zero
+ This instance is greater than .
+
+
+ is not of the same type as this instance.
+
+
+
+
+ Specifies how line information is handled when loading JSON.
+
+
+
+
+ Ignore line information.
+
+
+
+
+ Load line information.
+
+
+
+
+ Specifies how JSON arrays are merged together.
+
+
+
+ Concatenate arrays.
+
+
+ Union arrays, skipping items that already exist.
+
+
+ Replace all array items.
+
+
+ Merge array items together, matched by index.
+
+
+
+ Specifies how null value properties are merged.
+
+
+
+
+ The content's null value properties will be ignored during merging.
+
+
+
+
+ The content's null value properties will be merged.
+
+
+
+
+ Specifies the member serialization options for the .
+
+
+
+
+ All public members are serialized by default. Members can be excluded using or .
+ This is the default member serialization mode.
+
+
+
+
+ Only members marked with or are serialized.
+ This member serialization mode can also be set by marking the class with .
+
+
+
+
+ All public and private fields are serialized. Members can be excluded using or .
+ This member serialization mode can also be set by marking the class with
+ and setting IgnoreSerializableAttribute on to false.
+
+
+
+
+ Specifies metadata property handling options for the .
+
+
+
+
+ Read metadata properties located at the start of a JSON object.
+
+
+
+
+ Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance.
+
+
+
+
+ Do not try to read metadata properties.
+
+
+
+
+ Specifies missing member handling options for the .
+
+
+
+
+ Ignore a missing member and do not attempt to deserialize it.
+
+
+
+
+ Throw a when a missing member is encountered during deserialization.
+
+
+
+
+ Specifies null value handling options for the .
+
+
+
+
+
+
+
+
+ Include null values when serializing and deserializing objects.
+
+
+
+
+ Ignore null values when serializing and deserializing objects.
+
+
+
+
+ Specifies how object creation is handled by the .
+
+
+
+
+ Reuse existing objects, create new objects when needed.
+
+
+
+
+ Only reuse existing objects.
+
+
+
+
+ Always create new objects.
+
+
+
+
+ Specifies reference handling options for the .
+ Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement .
+
+
+
+
+
+
+
+ Do not preserve references when serializing types.
+
+
+
+
+ Preserve references when serializing into a JSON object structure.
+
+
+
+
+ Preserve references when serializing into a JSON array structure.
+
+
+
+
+ Preserve references when serializing.
+
+
+
+
+ Specifies reference loop handling options for the .
+
+
+
+
+ Throw a when a loop is encountered.
+
+
+
+
+ Ignore loop references and do not serialize.
+
+
+
+
+ Serialize loop references.
+
+
+
+
+ Indicating whether a property is required.
+
+
+
+
+ The property is not required. The default state.
+
+
+
+
+ The property must be defined in JSON but can be a null value.
+
+
+
+
+ The property must be defined in JSON and cannot be a null value.
+
+
+
+
+ The property is not required but it cannot be a null value.
+
+
+
+
+
+ Contains the JSON schema extension methods.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+
+ Determines whether the is valid.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+
+ true if the specified is valid; otherwise, false.
+
+
+
+
+
+ Determines whether the is valid.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+ When this method returns, contains any error messages generated while validating.
+
+ true if the specified is valid; otherwise, false.
+
+
+
+
+
+ Validates the specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+
+
+
+
+ Validates the specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+ The validation event handler.
+
+
+
+
+ An in-memory representation of a JSON Schema.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets the id.
+
+
+
+
+ Gets or sets the title.
+
+
+
+
+ Gets or sets whether the object is required.
+
+
+
+
+ Gets or sets whether the object is read-only.
+
+
+
+
+ Gets or sets whether the object is visible to users.
+
+
+
+
+ Gets or sets whether the object is transient.
+
+
+
+
+ Gets or sets the description of the object.
+
+
+
+
+ Gets or sets the types of values allowed by the object.
+
+ The type.
+
+
+
+ Gets or sets the pattern.
+
+ The pattern.
+
+
+
+ Gets or sets the minimum length.
+
+ The minimum length.
+
+
+
+ Gets or sets the maximum length.
+
+ The maximum length.
+
+
+
+ Gets or sets a number that the value should be divisible by.
+
+ A number that the value should be divisible by.
+
+
+
+ Gets or sets the minimum.
+
+ The minimum.
+
+
+
+ Gets or sets the maximum.
+
+ The maximum.
+
+
+
+ Gets or sets a flag indicating whether the value can not equal the number defined by the minimum attribute ().
+
+ A flag indicating whether the value can not equal the number defined by the minimum attribute ().
+
+
+
+ Gets or sets a flag indicating whether the value can not equal the number defined by the maximum attribute ().
+
+ A flag indicating whether the value can not equal the number defined by the maximum attribute ().
+
+
+
+ Gets or sets the minimum number of items.
+
+ The minimum number of items.
+
+
+
+ Gets or sets the maximum number of items.
+
+ The maximum number of items.
+
+
+
+ Gets or sets the of items.
+
+ The of items.
+
+
+
+ Gets or sets a value indicating whether items in an array are validated using the instance at their array position from .
+
+
+ true if items are validated using their array position; otherwise, false.
+
+
+
+
+ Gets or sets the of additional items.
+
+ The of additional items.
+
+
+
+ Gets or sets a value indicating whether additional items are allowed.
+
+
+ true if additional items are allowed; otherwise, false.
+
+
+
+
+ Gets or sets whether the array items must be unique.
+
+
+
+
+ Gets or sets the of properties.
+
+ The of properties.
+
+
+
+ Gets or sets the of additional properties.
+
+ The of additional properties.
+
+
+
+ Gets or sets the pattern properties.
+
+ The pattern properties.
+
+
+
+ Gets or sets a value indicating whether additional properties are allowed.
+
+
+ true if additional properties are allowed; otherwise, false.
+
+
+
+
+ Gets or sets the required property if this property is present.
+
+ The required property if this property is present.
+
+
+
+ Gets or sets the a collection of valid enum values allowed.
+
+ A collection of valid enum values allowed.
+
+
+
+ Gets or sets disallowed types.
+
+ The disallowed types.
+
+
+
+ Gets or sets the default value.
+
+ The default value.
+
+
+
+ Gets or sets the collection of that this schema extends.
+
+ The collection of that this schema extends.
+
+
+
+ Gets or sets the format.
+
+ The format.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads a from the specified .
+
+ The containing the JSON Schema to read.
+ The object representing the JSON Schema.
+
+
+
+ Reads a from the specified .
+
+ The containing the JSON Schema to read.
+ The to use when resolving schema references.
+ The object representing the JSON Schema.
+
+
+
+ Load a from a string that contains JSON Schema.
+
+ A that contains JSON Schema.
+ A populated from the string that contains JSON Schema.
+
+
+
+ Load a from a string that contains JSON Schema using the specified .
+
+ A that contains JSON Schema.
+ The resolver.
+ A populated from the string that contains JSON Schema.
+
+
+
+ Writes this schema to a .
+
+ A into which this method will write.
+
+
+
+ Writes this schema to a using the specified .
+
+ A into which this method will write.
+ The resolver used.
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+
+ Returns detailed information about the schema exception.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+
+ Generates a from a specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets how undefined schemas are handled by the serializer.
+
+
+
+
+ Gets or sets the contract resolver.
+
+ The contract resolver.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ The used to resolve schema references.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ Specify whether the generated root will be nullable.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ The used to resolve schema references.
+ Specify whether the generated root will be nullable.
+ A generated from the specified type.
+
+
+
+
+ Resolves from an id.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets the loaded schemas.
+
+ The loaded schemas.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets a for the specified reference.
+
+ The id.
+ A for the specified reference.
+
+
+
+
+ The value types allowed by the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ No type specified.
+
+
+
+
+ String type.
+
+
+
+
+ Float type.
+
+
+
+
+ Integer type.
+
+
+
+
+ Boolean type.
+
+
+
+
+ Object type.
+
+
+
+
+ Array type.
+
+
+
+
+ Null type.
+
+
+
+
+ Any type.
+
+
+
+
+
+ Specifies undefined schema Id handling options for the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Do not infer a schema Id.
+
+
+
+
+ Use the .NET type name as the schema Id.
+
+
+
+
+ Use the assembly qualified .NET type name as the schema Id.
+
+
+
+
+
+ Returns detailed information related to the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets the associated with the validation error.
+
+ The JsonSchemaException associated with the validation error.
+
+
+
+ Gets the path of the JSON location where the validation error occurred.
+
+ The path of the JSON location where the validation error occurred.
+
+
+
+ Gets the text description corresponding to the validation error.
+
+ The text description.
+
+
+
+
+ Represents the callback method that will handle JSON schema validation events and the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ A camel case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Resolves member mappings for a type, camel casing property names.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Used by to resolve a for a given .
+
+
+
+
+ Gets a value indicating whether members are being get and set using dynamic code generation.
+ This value is determined by the runtime permissions available.
+
+
+ true if using dynamic code generation; otherwise, false.
+
+
+
+
+ Gets or sets the default members search flags.
+
+ The default members search flags.
+
+
+
+ Gets or sets a value indicating whether compiler generated members should be serialized.
+
+
+ true if serialized compiler generated members; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types.
+
+
+ true if the interface will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore the attribute when serializing and deserializing types.
+
+
+ true if the attribute will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore IsSpecified members when serializing and deserializing types.
+
+
+ true if the IsSpecified members will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore ShouldSerialize members when serializing and deserializing types.
+
+
+ true if the ShouldSerialize members will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets the naming strategy used to resolve how property names and dictionary keys are serialized.
+
+ The naming strategy used to resolve how property names and dictionary keys are serialized.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Gets the serializable members for the type.
+
+ The type to get serializable members for.
+ The serializable members for the type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates the constructor parameters.
+
+ The constructor to create properties for.
+ The type's member properties.
+ Properties for the given .
+
+
+
+ Creates a for the given .
+
+ The matching member property.
+ The constructor parameter.
+ A created for the given .
+
+
+
+ Resolves the default for the contract.
+
+ Type of the object.
+ The contract's default .
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Determines which contract type is created for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates properties for the given .
+
+ The type to create properties for.
+ /// The member serialization mode for the type.
+ Properties for the given .
+
+
+
+ Creates the used by the serializer to get and set values from a member.
+
+ The member.
+ The used by the serializer to get and set values from a member.
+
+
+
+ Creates a for the given .
+
+ The member's parent .
+ The member to create a for.
+ A created for the given .
+
+
+
+ Resolves the name of the property.
+
+ Name of the property.
+ Resolved name of the property.
+
+
+
+ Resolves the name of the extension data. By default no changes are made to extension data names.
+
+ Name of the extension data.
+ Resolved name of the extension data.
+
+
+
+ Resolves the key of the dictionary. By default is used to resolve dictionary keys.
+
+ Key of the dictionary.
+ Resolved key of the dictionary.
+
+
+
+ Gets the resolved name of the property.
+
+ Name of the property.
+ Name of the property.
+
+
+
+ The default naming strategy. Property names and dictionary keys are unchanged.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ The default serialization binder used when resolving and loading classes from type names.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+ The type of the object the formatter creates a new instance of.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ Represents a trace writer that writes to the application's instances.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Get and set values for a using dynamic methods.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Provides information surrounding an error.
+
+
+
+
+ Gets the error.
+
+ The error.
+
+
+
+ Gets the original object that caused the error.
+
+ The original object that caused the error.
+
+
+
+ Gets the member that caused the error.
+
+ The member that caused the error.
+
+
+
+ Gets the path of the JSON location where the error occurred.
+
+ The path of the JSON location where the error occurred.
+
+
+
+ Gets or sets a value indicating whether this is handled.
+
+ true if handled; otherwise, false.
+
+
+
+ Provides data for the Error event.
+
+
+
+
+ Gets the current object the error event is being raised against.
+
+ The current object the error event is being raised against.
+
+
+
+ Gets the error context.
+
+ The error context.
+
+
+
+ Initializes a new instance of the class.
+
+ The current object.
+ The error context.
+
+
+
+ Get and set values for a using dynamic methods.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Provides methods to get attributes.
+
+
+
+
+ Returns a collection of all of the attributes, or an empty collection if there are no attributes.
+
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Returns a collection of attributes, identified by type, or an empty collection if there are no attributes.
+
+ The type of the attributes.
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Used by to resolve a for a given .
+
+
+
+
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Used to resolve references when serializing and deserializing JSON by the .
+
+
+
+
+ Resolves a reference to its object.
+
+ The serialization context.
+ The reference to resolve.
+ The object that was resolved from the reference.
+
+
+
+ Gets the reference for the specified object.
+
+ The serialization context.
+ The object to get a reference for.
+ The reference to the object.
+
+
+
+ Determines whether the specified object is referenced.
+
+ The serialization context.
+ The object to test for a reference.
+
+ true if the specified object is referenced; otherwise, false.
+
+
+
+
+ Adds a reference to the specified object.
+
+ The serialization context.
+ The reference.
+ The object to reference.
+
+
+
+ Allows users to control class loading and mandate what class to load.
+
+
+
+
+ When implemented, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object
+ The type of the object the formatter creates a new instance of.
+
+
+
+ When implemented, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ Represents a trace writer.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Provides methods to get and set values.
+
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the of the collection items.
+
+ The of the collection items.
+
+
+
+ Gets a value indicating whether the collection type is a multidimensional array.
+
+ true if the collection type is a multidimensional array; otherwise, false.
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+
+ The function used to create the object.
+
+
+
+ Gets a value indicating whether the creator has a parameter with the collection values.
+
+ true if the creator has a parameter with the collection values; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the default collection items .
+
+ The converter.
+
+
+
+ Gets or sets a value indicating whether the collection items preserve object references.
+
+ true if collection items preserve object references; otherwise, false.
+
+
+
+ Gets or sets the collection item reference loop handling.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the collection item type name handling.
+
+ The type name handling.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Handles serialization callback events.
+
+ The object that raised the callback event.
+ The streaming context.
+
+
+
+ Handles serialization error callback events.
+
+ The object that raised the callback event.
+ The streaming context.
+ The error context.
+
+
+
+ Sets extension data for an object during deserialization.
+
+ The object to set extension data on.
+ The extension data key.
+ The extension data value.
+
+
+
+ Gets extension data for an object during serialization.
+
+ The object to set extension data on.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the underlying type for the contract.
+
+ The underlying type for the contract.
+
+
+
+ Gets or sets the type created during deserialization.
+
+ The type created during deserialization.
+
+
+
+ Gets or sets whether this type contract is serialized as a reference.
+
+ Whether this type contract is serialized as a reference.
+
+
+
+ Gets or sets the default for this contract.
+
+ The converter.
+
+
+
+ Gets the internally resolved for the contract's type.
+ This converter is used as a fallback converter when no other converter is resolved.
+ Setting will always override this converter.
+
+
+
+
+ Gets or sets all methods called immediately after deserialization of the object.
+
+ The methods called immediately after deserialization of the object.
+
+
+
+ Gets or sets all methods called during deserialization of the object.
+
+ The methods called during deserialization of the object.
+
+
+
+ Gets or sets all methods called after serialization of the object graph.
+
+ The methods called after serialization of the object graph.
+
+
+
+ Gets or sets all methods called before serialization of the object.
+
+ The methods called before serialization of the object.
+
+
+
+ Gets or sets all method called when an error is thrown during the serialization of the object.
+
+ The methods called when an error is thrown during the serialization of the object.
+
+
+
+ Gets or sets the default creator method used to create the object.
+
+ The default creator method used to create the object.
+
+
+
+ Gets or sets a value indicating whether the default creator is non-public.
+
+ true if the default object creator is non-public; otherwise, false.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the dictionary key resolver.
+
+ The dictionary key resolver.
+
+
+
+ Gets the of the dictionary keys.
+
+ The of the dictionary keys.
+
+
+
+ Gets the of the dictionary values.
+
+ The of the dictionary values.
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+
+ The function used to create the object.
+
+
+
+ Gets a value indicating whether the creator has a parameter with the dictionary values.
+
+ true if the creator has a parameter with the dictionary values; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the object's properties.
+
+ The object's properties.
+
+
+
+ Gets or sets the property name resolver.
+
+ The property name resolver.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the object constructor.
+
+ The object constructor.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the object member serialization.
+
+ The member object serialization.
+
+
+
+ Gets or sets the missing member handling used when deserializing this object.
+
+ The missing member handling.
+
+
+
+ Gets or sets a value that indicates whether the object's properties are required.
+
+
+ A value indicating whether the object's properties are required.
+
+
+
+
+ Gets or sets how the object's properties with null values are handled during serialization and deserialization.
+
+ How the object's properties with null values are handled during serialization and deserialization.
+
+
+
+ Gets the object's properties.
+
+ The object's properties.
+
+
+
+ Gets a collection of instances that define the parameters used with .
+
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+ This function is called with a collection of arguments which are defined by the collection.
+
+ The function used to create the object.
+
+
+
+ Gets or sets the extension data setter.
+
+
+
+
+ Gets or sets the extension data getter.
+
+
+
+
+ Gets or sets the extension data value type.
+
+
+
+
+ Gets or sets the extension data name resolver.
+
+ The extension data name resolver.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Maps a JSON property to a .NET member or constructor parameter.
+
+
+
+
+ Gets or sets the name of the property.
+
+ The name of the property.
+
+
+
+ Gets or sets the type that declared this property.
+
+ The type that declared this property.
+
+
+
+ Gets or sets the order of serialization of a member.
+
+ The numeric order of serialization.
+
+
+
+ Gets or sets the name of the underlying member or parameter.
+
+ The name of the underlying member or parameter.
+
+
+
+ Gets the that will get and set the during serialization.
+
+ The that will get and set the during serialization.
+
+
+
+ Gets or sets the for this property.
+
+ The for this property.
+
+
+
+ Gets or sets the type of the property.
+
+ The type of the property.
+
+
+
+ Gets or sets the for the property.
+ If set this converter takes precedence over the contract converter for the property type.
+
+ The converter.
+
+
+
+ Gets or sets the member converter.
+
+ The member converter.
+
+
+
+ Gets or sets a value indicating whether this is ignored.
+
+ true if ignored; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this is readable.
+
+ true if readable; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this is writable.
+
+ true if writable; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this has a member attribute.
+
+ true if has a member attribute; otherwise, false.
+
+
+
+ Gets the default value.
+
+ The default value.
+
+
+
+ Gets or sets a value indicating whether this is required.
+
+ A value indicating whether this is required.
+
+
+
+ Gets a value indicating whether has a value specified.
+
+
+
+
+ Gets or sets a value indicating whether this property preserves object references.
+
+
+ true if this instance is reference; otherwise, false.
+
+
+
+
+ Gets or sets the property null value handling.
+
+ The null value handling.
+
+
+
+ Gets or sets the property default value handling.
+
+ The default value handling.
+
+
+
+ Gets or sets the property reference loop handling.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the property object creation handling.
+
+ The object creation handling.
+
+
+
+ Gets or sets or sets the type name handling.
+
+ The type name handling.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be serialized.
+
+ A predicate used to determine whether the property should be serialized.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be deserialized.
+
+ A predicate used to determine whether the property should be deserialized.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be serialized.
+
+ A predicate used to determine whether the property should be serialized.
+
+
+
+ Gets or sets an action used to set whether the property has been deserialized.
+
+ An action used to set whether the property has been deserialized.
+
+
+
+ Returns a that represents this instance.
+
+
+ A that represents this instance.
+
+
+
+
+ Gets or sets the converter used when serializing the property's collection items.
+
+ The collection's items converter.
+
+
+
+ Gets or sets whether this property's collection items are serialized as a reference.
+
+ Whether this property's collection items are serialized as a reference.
+
+
+
+ Gets or sets the type name handling used when serializing the property's collection items.
+
+ The collection's items type name handling.
+
+
+
+ Gets or sets the reference loop handling used when serializing the property's collection items.
+
+ The collection's items reference loop handling.
+
+
+
+ A collection of objects.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The type.
+
+
+
+ When implemented in a derived class, extracts the key from the specified element.
+
+ The element from which to extract the key.
+ The key for the specified element.
+
+
+
+ Adds a object.
+
+ The property to add to the collection.
+
+
+
+ Gets the closest matching object.
+ First attempts to get an exact case match of and then
+ a case insensitive match.
+
+ Name of the property.
+ A matching property if found.
+
+
+
+ Gets a property by property name.
+
+ The name of the property to get.
+ Type property name string comparison.
+ A matching property if found.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Lookup and create an instance of the type described by the argument.
+
+ The type to create.
+ Optional arguments to pass to an initializing constructor of the JsonConverter.
+ If null, the default constructor is used.
+
+
+
+ A kebab case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Represents a trace writer that writes to memory. When the trace message limit is
+ reached then old trace messages will be removed as new messages are added.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Returns an enumeration of the most recent trace messages.
+
+ An enumeration of the most recent trace messages.
+
+
+
+ Returns a of the most recent trace messages.
+
+
+ A of the most recent trace messages.
+
+
+
+
+ A base class for resolving how property names and dictionary keys are serialized.
+
+
+
+
+ A flag indicating whether dictionary keys should be processed.
+ Defaults to false.
+
+
+
+
+ A flag indicating whether extension data names should be processed.
+ Defaults to false.
+
+
+
+
+ A flag indicating whether explicitly specified property names,
+ e.g. a property name customized with a , should be processed.
+ Defaults to false.
+
+
+
+
+ Gets the serialized name for a given property name.
+
+ The initial property name.
+ A flag indicating whether the property has had a name explicitly specified.
+ The serialized property name.
+
+
+
+ Gets the serialized name for a given extension data name.
+
+ The initial extension data name.
+ The serialized extension data name.
+
+
+
+ Gets the serialized key for a given dictionary key.
+
+ The initial dictionary key.
+ The serialized dictionary key.
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Hash code calculation
+
+
+
+
+
+ Object equality implementation
+
+
+
+
+
+
+ Compare to another NamingStrategy
+
+
+
+
+
+
+ Represents a method that constructs an object.
+
+ The object type to create.
+
+
+
+ When applied to a method, specifies that the method is called when an error occurs serializing an object.
+
+
+
+
+ Provides methods to get attributes from a , , or .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The instance to get attributes for. This parameter should be a , , or .
+
+
+
+ Returns a collection of all of the attributes, or an empty collection if there are no attributes.
+
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Returns a collection of attributes, identified by type, or an empty collection if there are no attributes.
+
+ The type of the attributes.
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Get and set values for a using reflection.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ A snake case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Specifies how strings are escaped when writing JSON text.
+
+
+
+
+ Only control characters (e.g. newline) are escaped.
+
+
+
+
+ All non-ASCII and control characters (e.g. newline) are escaped.
+
+
+
+
+ HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped.
+
+
+
+
+ Indicates the method that will be used during deserialization for locating and loading assemblies.
+
+
+
+
+ In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the LoadWithPartialName method of the class is used to load the assembly.
+
+
+
+
+ In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The Load method of the class is used to load the assembly.
+
+
+
+
+ Specifies type name handling options for the .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+
+
+
+ Do not include the .NET type name when serializing types.
+
+
+
+
+ Include the .NET type name when serializing into a JSON object structure.
+
+
+
+
+ Include the .NET type name when serializing into a JSON array structure.
+
+
+
+
+ Always include the .NET type name when serializing.
+
+
+
+
+ Include the .NET type name when the type of the object being serialized is not the same as its declared type.
+ Note that this doesn't include the root serialized object by default. To include the root object's type name in JSON
+ you must specify a root type object with
+ or .
+
+
+
+
+ Determines whether the collection is null or empty.
+
+ The collection.
+
+ true if the collection is null or empty; otherwise, false.
+
+
+
+
+ Adds the elements of the specified collection to the specified generic .
+
+ The list to add to.
+ The collection of elements to add.
+
+
+
+ Converts the value to the specified type. If the value is unable to be converted, the
+ value is checked whether it assignable to the specified type.
+
+ The value to convert.
+ The culture to use when converting.
+ The type to convert or cast the value to.
+
+ The converted type. If conversion was unsuccessful, the initial value
+ is returned if assignable to the target type.
+
+
+
+
+ Helper method for generating a MetaObject which calls a
+ specific method on Dynamic that returns a result
+
+
+
+
+ Helper method for generating a MetaObject which calls a
+ specific method on Dynamic, but uses one of the arguments for
+ the result.
+
+
+
+
+ Helper method for generating a MetaObject which calls a
+ specific method on Dynamic, but uses one of the arguments for
+ the result.
+
+
+
+
+ Returns a Restrictions object which includes our current restrictions merged
+ with a restriction limiting our type
+
+
+
+
+ Helper class for serializing immutable collections.
+ Note that this is used by all builds, even those that don't support immutable collections, in case the DLL is GACed
+ https://github.com/JamesNK/Newtonsoft.Json/issues/652
+
+
+
+
+ Gets the type of the typed collection's items.
+
+ The type.
+ The type of the typed collection's items.
+
+
+
+ Gets the member's underlying type.
+
+ The member.
+ The underlying type of the member.
+
+
+
+ Determines whether the property is an indexed property.
+
+ The property.
+
+ true if the property is an indexed property; otherwise, false.
+
+
+
+
+ Gets the member's value on the object.
+
+ The member.
+ The target object.
+ The member's value on the object.
+
+
+
+ Sets the member's value on the target object.
+
+ The member.
+ The target.
+ The value.
+
+
+
+ Determines whether the specified MemberInfo can be read.
+
+ The MemberInfo to determine whether can be read.
+ /// if set to true then allow the member to be gotten non-publicly.
+
+ true if the specified MemberInfo can be read; otherwise, false.
+
+
+
+
+ Determines whether the specified MemberInfo can be set.
+
+ The MemberInfo to determine whether can be set.
+ if set to true then allow the member to be set non-publicly.
+ if set to true then allow the member to be set if read-only.
+
+ true if the specified MemberInfo can be set; otherwise, false.
+
+
+
+
+ Builds a string. Unlike this class lets you reuse its internal buffer.
+
+
+
+
+ Determines whether the string is all white space. Empty string will return false.
+
+ The string to test whether it is all white space.
+
+ true if the string is all white space; otherwise, false.
+
+
+
+
+ Specifies the state of the .
+
+
+
+
+ An exception has been thrown, which has left the in an invalid state.
+ You may call the method to put the in the Closed state.
+ Any other method calls result in an being thrown.
+
+
+
+
+ The method has been called.
+
+
+
+
+ An object is being written.
+
+
+
+
+ An array is being written.
+
+
+
+
+ A constructor is being written.
+
+
+
+
+ A property is being written.
+
+
+
+
+ A write method has not been called.
+
+
+
+ Specifies that an output will not be null even if the corresponding type allows it.
+
+
+ Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it.
+
+
+ Initializes the attribute with the specified return value condition.
+
+ The return value condition. If the method returns this value, the associated parameter will not be null.
+
+
+
+ Gets the return value condition.
+
+
+ Specifies that an output may be null even if the corresponding type disallows it.
+
+
+ Specifies that null is allowed as an input even if the corresponding type disallows it.
+
+
+
+ Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
+ the associated parameter matches this value.
+
+
+
+ Gets the condition parameter value.
+
+
+
diff --git a/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.0/Newtonsoft.Json.dll b/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.0/Newtonsoft.Json.dll
new file mode 100644
index 00000000..32bbff8f
Binary files /dev/null and b/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.0/Newtonsoft.Json.dll differ
diff --git a/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.0/Newtonsoft.Json.xml b/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.0/Newtonsoft.Json.xml
new file mode 100644
index 00000000..b6108be8
--- /dev/null
+++ b/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.0/Newtonsoft.Json.xml
@@ -0,0 +1,10950 @@
+
+
+
+ Newtonsoft.Json
+
+
+
+
+ Represents a BSON Oid (object id).
+
+
+
+
+ Gets or sets the value of the Oid.
+
+ The value of the Oid.
+
+
+
+ Initializes a new instance of the class.
+
+ The Oid value.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized BSON data.
+
+
+
+
+ Gets or sets a value indicating whether binary data reading should be compatible with incorrect Json.NET 3.5 written binary.
+
+
+ true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether the root object will be read as a JSON array.
+
+
+ true if the root object will be read as a JSON array; otherwise, false.
+
+
+
+
+ Gets or sets the used when reading values from BSON.
+
+ The used when reading values from BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+ if set to true the root object will be read as a JSON array.
+ The used when reading values from BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+ if set to true the root object will be read as a JSON array.
+ The used when reading values from BSON.
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating BSON data.
+
+
+
+
+ Gets or sets the used when writing values to BSON.
+ When set to no conversion will occur.
+
+ The used when writing values to BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The to write to.
+
+
+
+ Initializes a new instance of the class.
+
+ The to write to.
+
+
+
+ Flushes whatever is in the buffer to the underlying and also flushes the underlying stream.
+
+
+
+
+ Writes the end.
+
+ The token.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Closes this writer.
+ If is set to true, the underlying is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value that represents a BSON object id.
+
+ The Object ID value to write.
+
+
+
+ Writes a BSON regex.
+
+ The regex pattern.
+ The regex options.
+
+
+
+ Specifies how constructors are used when initializing objects during deserialization by the .
+
+
+
+
+ First attempt to use the public default constructor, then fall back to a single parameterized constructor, then to the non-public default constructor.
+
+
+
+
+ Json.NET will use a non-public default constructor before falling back to a parameterized constructor.
+
+
+
+
+ Converts a binary value to and from a base 64 string value.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON and BSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Creates a custom object.
+
+ The object type to convert.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Creates an object which will then be populated by the serializer.
+
+ Type of the object.
+ The created object.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+
+ true if this can write JSON; otherwise, false.
+
+
+
+
+ Provides a base class for converting a to and from JSON.
+
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a F# discriminated union type to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+
+ true if this can write JSON; otherwise, false.
+
+
+
+
+ Converts a to and from the ISO 8601 date format (e.g. "2008-04-12T12:53Z").
+
+
+
+
+ Gets or sets the date time styles used when converting a date to and from JSON.
+
+ The date time styles used when converting a date to and from JSON.
+
+
+
+ Gets or sets the date time format used when converting a date to and from JSON.
+
+ The date time format used when converting a date to and from JSON.
+
+
+
+ Gets or sets the culture used when converting a date to and from JSON.
+
+ The culture used when converting a date to and from JSON.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from a JavaScript Date constructor (e.g. new Date(52231943)).
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON and BSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an to and from its name string value.
+
+
+
+
+ Gets or sets a value indicating whether the written enum text should be camel case.
+ The default value is false.
+
+ true if the written enum text will be camel case; otherwise, false.
+
+
+
+ Gets or sets the naming strategy used to resolve how enum text is written.
+
+ The naming strategy used to resolve how enum text is written.
+
+
+
+ Gets or sets a value indicating whether integer values are allowed when serializing and deserializing.
+ The default value is true.
+
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ true if the written enum text will be camel case; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The naming strategy used to resolve how enum text is written.
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from Unix epoch time
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from a string (e.g. "1.2.3.4").
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts XML to and from JSON.
+
+
+
+
+ Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produced multiple root elements.
+
+ The name of the deserialized root element.
+
+
+
+ Gets or sets a value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ true if the array attribute is written to the XML; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether to write the root JSON object.
+
+ true if the JSON root object is omitted; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ true if special characters are encoded; otherwise, false.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The calling serializer.
+ The value.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Checks if the is a namespace attribute.
+
+ Attribute name to test.
+ The attribute name prefix if it has one, otherwise an empty string.
+ true if attribute name is for a namespace attribute, otherwise false.
+
+
+
+ Determines whether this instance can convert the specified value type.
+
+ Type of the value.
+
+ true if this instance can convert the specified value type; otherwise, false.
+
+
+
+
+ Specifies how dates are formatted when writing JSON text.
+
+
+
+
+ Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z".
+
+
+
+
+ Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/".
+
+
+
+
+ Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text.
+
+
+
+
+ Date formatted strings are not parsed to a date type and are read as strings.
+
+
+
+
+ Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to .
+
+
+
+
+ Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to .
+
+
+
+
+ Specifies how to treat the time value when converting between string and .
+
+
+
+
+ Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time.
+
+
+
+
+ Treat as a UTC. If the object represents a local time, it is converted to a UTC.
+
+
+
+
+ Treat as a local time if a is being converted to a string.
+ If a string is being converted to , convert to a local time if a time zone is specified.
+
+
+
+
+ Time zone information should be preserved when converting.
+
+
+
+
+ The default JSON name table implementation.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets a string containing the same characters as the specified range of characters in the given array.
+
+ The character array containing the name to find.
+ The zero-based index into the array specifying the first character of the name.
+ The number of characters in the name.
+ A string containing the same characters as the specified range of characters in the given array.
+
+
+
+ Adds the specified string into name table.
+
+ The string to add.
+ This method is not thread-safe.
+ The resolved string.
+
+
+
+ Specifies default value handling options for the .
+
+
+
+
+
+
+
+
+ Include members where the member value is the same as the member's default value when serializing objects.
+ Included members are written to JSON. Has no effect when deserializing.
+
+
+
+
+ Ignore members where the member value is the same as the member's default value when serializing objects
+ so that it is not written to JSON.
+ This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers,
+ decimals and floating point numbers; and false for booleans). The default value ignored can be changed by
+ placing the on the property.
+
+
+
+
+ Members with a default value but no JSON will be set to their default value when deserializing.
+
+
+
+
+ Ignore members where the member value is the same as the member's default value when serializing objects
+ and set members to their default value when deserializing.
+
+
+
+
+ Specifies float format handling options when writing special floating point numbers, e.g. ,
+ and with .
+
+
+
+
+ Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity".
+
+
+
+
+ Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity.
+ Note that this will produce non-valid JSON.
+
+
+
+
+ Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a of property.
+
+
+
+
+ Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+
+
+
+
+ Floating point numbers are parsed to .
+
+
+
+
+ Floating point numbers are parsed to .
+
+
+
+
+ Specifies formatting options for the .
+
+
+
+
+ No special formatting is applied. This is the default.
+
+
+
+
+ Causes child objects to be indented according to the and settings.
+
+
+
+
+ Provides an interface for using pooled arrays.
+
+ The array type content.
+
+
+
+ Rent an array from the pool. This array must be returned when it is no longer needed.
+
+ The minimum required length of the array. The returned array may be longer.
+ The rented array from the pool. This array must be returned when it is no longer needed.
+
+
+
+ Return an array to the pool.
+
+ The array that is being returned.
+
+
+
+ Provides an interface to enable a class to return line and position information.
+
+
+
+
+ Gets a value indicating whether the class can return line information.
+
+
+ true if and can be provided; otherwise, false.
+
+
+
+
+ Gets the current line number.
+
+ The current line number or 0 if no line information is available (for example, when returns false).
+
+
+
+ Gets the current line position.
+
+ The current line position or 0 if no line information is available (for example, when returns false).
+
+
+
+ Instructs the how to serialize the collection.
+
+
+
+
+ Gets or sets a value indicating whether null items are allowed in the collection.
+
+ true if null items are allowed in the collection; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with a flag indicating whether the array can contain null items.
+
+ A flag indicating whether the array can contain null items.
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Instructs the to use the specified constructor when deserializing that object.
+
+
+
+
+ Instructs the how to serialize the object.
+
+
+
+
+ Gets or sets the id.
+
+ The id.
+
+
+
+ Gets or sets the title.
+
+ The title.
+
+
+
+ Gets or sets the description.
+
+ The description.
+
+
+
+ Gets or sets the collection's items converter.
+
+ The collection's items converter.
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonContainer(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets a value that indicates whether to preserve object references.
+
+
+ true to keep object reference; otherwise, false. The default is false.
+
+
+
+
+ Gets or sets a value that indicates whether to preserve collection's items references.
+
+
+ true to keep collection's items object references; otherwise, false. The default is false.
+
+
+
+
+ Gets or sets the reference loop handling used when serializing the collection's items.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the type name handling used when serializing the collection's items.
+
+ The type name handling.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Provides methods for converting between .NET types and JSON types.
+
+
+
+
+
+
+
+ Gets or sets a function that creates default .
+ Default settings are automatically used by serialization methods on ,
+ and and on .
+ To serialize without using any default settings create a with
+ .
+
+
+
+
+ Represents JavaScript's boolean value true as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's boolean value false as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's null as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's undefined as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's positive infinity as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's negative infinity as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's NaN as a string. This field is read-only.
+
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation using the specified.
+
+ The value to convert.
+ The format the date will be converted to.
+ The time zone handling when the date is converted to a string.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation using the specified.
+
+ The value to convert.
+ The format the date will be converted to.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ The string delimiter character.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ The string delimiter character.
+ The string escape handling.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Serializes the specified object to a JSON string.
+
+ The object to serialize.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using formatting.
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a collection of .
+
+ The object to serialize.
+ A collection of converters used while serializing.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using formatting and a collection of .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ A collection of converters used while serializing.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using .
+
+ The object to serialize.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a type, formatting and .
+
+ The object to serialize.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using formatting and .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a type, formatting and .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+ A JSON string representation of the object.
+
+
+
+
+ Deserializes the JSON to a .NET object.
+
+ The JSON to deserialize.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to a .NET object using .
+
+ The JSON to deserialize.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type.
+
+ The JSON to deserialize.
+ The of object being deserialized.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type.
+
+ The type of the object to deserialize to.
+ The JSON to deserialize.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the given anonymous type.
+
+
+ The anonymous type to deserialize to. This can't be specified
+ traditionally and must be inferred from the anonymous type passed
+ as a parameter.
+
+ The JSON to deserialize.
+ The anonymous type object.
+ The deserialized anonymous type from the JSON string.
+
+
+
+ Deserializes the JSON to the given anonymous type using .
+
+
+ The anonymous type to deserialize to. This can't be specified
+ traditionally and must be inferred from the anonymous type passed
+ as a parameter.
+
+ The JSON to deserialize.
+ The anonymous type object.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized anonymous type from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using a collection of .
+
+ The type of the object to deserialize to.
+ The JSON to deserialize.
+ Converters to use while deserializing.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using .
+
+ The type of the object to deserialize to.
+ The object to deserialize.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using a collection of .
+
+ The JSON to deserialize.
+ The type of the object to deserialize.
+ Converters to use while deserializing.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using .
+
+ The JSON to deserialize.
+ The type of the object to deserialize to.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Populates the object with values from the JSON string.
+
+ The JSON to populate values from.
+ The target object to populate values onto.
+
+
+
+ Populates the object with values from the JSON string using .
+
+ The JSON to populate values from.
+ The target object to populate values onto.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+
+
+
+ Serializes the to a JSON string.
+
+ The node to convert to JSON.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting.
+
+ The node to convert to JSON.
+ Indicates how the output should be formatted.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting and omits the root object if is true.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ Omits writing the root object.
+ A JSON string of the .
+
+
+
+ Deserializes the from a JSON string.
+
+ The JSON string.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by .
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by
+ and writes a Json.NET array attribute for collections.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by ,
+ writes a Json.NET array attribute for collections, and encodes special characters.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+
+ A value to indicate whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ The deserialized .
+
+
+
+ Converts an object to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can read JSON.
+
+ true if this can read JSON; otherwise, false.
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+ true if this can write JSON; otherwise, false.
+
+
+
+ Converts an object to and from JSON.
+
+ The object type to convert.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read. If there is no existing value then null will be used.
+ The existing value has a value.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Instructs the to use the specified when serializing the member or class.
+
+
+
+
+ Gets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+
+
+
+
+ Initializes a new instance of the class.
+
+ Type of the .
+
+
+
+ Initializes a new instance of the class.
+
+ Type of the .
+ Parameter list to use when constructing the . Can be null.
+
+
+
+ Represents a collection of .
+
+
+
+
+ Instructs the how to serialize the collection.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ The exception thrown when an error occurs during JSON serialization or deserialization.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Instructs the to deserialize properties with no matching class member into the specified collection
+ and write values during serialization.
+
+
+
+
+ Gets or sets a value that indicates whether to write extension data when serializing the object.
+
+
+ true to write extension data when serializing the object; otherwise, false. The default is true.
+
+
+
+
+ Gets or sets a value that indicates whether to read extension data when deserializing the object.
+
+
+ true to read extension data when deserializing the object; otherwise, false. The default is true.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Instructs the not to serialize the public field or public read/write property value.
+
+
+
+
+ Base class for a table of atomized string objects.
+
+
+
+
+ Gets a string containing the same characters as the specified range of characters in the given array.
+
+ The character array containing the name to find.
+ The zero-based index into the array specifying the first character of the name.
+ The number of characters in the name.
+ A string containing the same characters as the specified range of characters in the given array.
+
+
+
+ Instructs the how to serialize the object.
+
+
+
+
+ Gets or sets the member serialization.
+
+ The member serialization.
+
+
+
+ Gets or sets the missing member handling used when deserializing this object.
+
+ The missing member handling.
+
+
+
+ Gets or sets how the object's properties with null values are handled during serialization and deserialization.
+
+ How the object's properties with null values are handled during serialization and deserialization.
+
+
+
+ Gets or sets a value that indicates whether the object's properties are required.
+
+
+ A value indicating whether the object's properties are required.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified member serialization.
+
+ The member serialization.
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Instructs the to always serialize the member with the specified name.
+
+
+
+
+ Gets or sets the type used when serializing the property's collection items.
+
+ The collection's items type.
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonProperty(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the null value handling used when serializing this property.
+
+ The null value handling.
+
+
+
+ Gets or sets the default value handling used when serializing this property.
+
+ The default value handling.
+
+
+
+ Gets or sets the reference loop handling used when serializing this property.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the object creation handling used when deserializing this property.
+
+ The object creation handling.
+
+
+
+ Gets or sets the type name handling used when serializing this property.
+
+ The type name handling.
+
+
+
+ Gets or sets whether this property's value is serialized as a reference.
+
+ Whether this property's value is serialized as a reference.
+
+
+
+ Gets or sets the order of serialization of a member.
+
+ The numeric order of serialization.
+
+
+
+ Gets or sets a value indicating whether this property is required.
+
+
+ A value indicating whether this property is required.
+
+
+
+
+ Gets or sets the name of the property.
+
+ The name of the property.
+
+
+
+ Gets or sets the reference loop handling used when serializing the property's collection items.
+
+ The collection's items reference loop handling.
+
+
+
+ Gets or sets the type name handling used when serializing the property's collection items.
+
+ The collection's items type name handling.
+
+
+
+ Gets or sets whether this property's collection items are serialized as a reference.
+
+ Whether this property's collection items are serialized as a reference.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ Name of the property.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
+
+
+
+
+ Asynchronously reads the next JSON token from the source.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns true if the next token was read successfully; false if there are no more tokens to read.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously skips the children of the current token.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a [].
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the []. This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Specifies the state of the reader.
+
+
+
+
+ A read method has not been called.
+
+
+
+
+ The end of the file has been reached successfully.
+
+
+
+
+ Reader is at a property.
+
+
+
+
+ Reader is at the start of an object.
+
+
+
+
+ Reader is in an object.
+
+
+
+
+ Reader is at the start of an array.
+
+
+
+
+ Reader is in an array.
+
+
+
+
+ The method has been called.
+
+
+
+
+ Reader has just read a value.
+
+
+
+
+ Reader is at the start of a constructor.
+
+
+
+
+ Reader is in a constructor.
+
+
+
+
+ An error occurred that prevents the read operation from continuing.
+
+
+
+
+ The end of the file has been reached successfully.
+
+
+
+
+ Gets the current reader state.
+
+ The current reader state.
+
+
+
+ Gets or sets a value indicating whether the source should be closed when this reader is closed.
+
+
+ true to close the source when this reader is closed; otherwise false. The default is true.
+
+
+
+
+ Gets or sets a value indicating whether multiple pieces of JSON content can
+ be read from a continuous stream without erroring.
+
+
+ true to support reading multiple pieces of JSON content; otherwise false.
+ The default is false.
+
+
+
+
+ Gets the quotation mark character used to enclose the value of a string.
+
+
+
+
+ Gets or sets how time zones are handled when reading JSON.
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+
+
+
+
+ Gets or sets how custom date formatted strings are parsed when reading JSON.
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+
+
+
+
+ Gets the type of the current JSON token.
+
+
+
+
+ Gets the text value of the current JSON token.
+
+
+
+
+ Gets the .NET type for the current JSON token.
+
+
+
+
+ Gets the depth of the current token in the JSON document.
+
+ The depth of the current token in the JSON document.
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Gets or sets the culture used when reading JSON. Defaults to .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads the next JSON token from the source.
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a [].
+
+ A [] or null if the next JSON token is null. This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Skips the children of the current token.
+
+
+
+
+ Sets the current token.
+
+ The new token.
+
+
+
+ Sets the current token and value.
+
+ The new token.
+ The value.
+
+
+
+ Sets the current token and value.
+
+ The new token.
+ The value.
+ A flag indicating whether the position index inside an array should be updated.
+
+
+
+ Sets the state based on current token type.
+
+
+
+
+ Releases unmanaged and - optionally - managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the source is also closed.
+
+
+
+
+ The exception thrown when an error occurs while reading JSON text.
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The line number indicating where the error occurred.
+ The line position indicating where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Instructs the to always serialize the member, and to require that the member has a value.
+
+
+
+
+ The exception thrown when an error occurs during JSON serialization or deserialization.
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The line number indicating where the error occurred.
+ The line position indicating where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Serializes and deserializes objects into and from the JSON format.
+ The enables you to control how objects are encoded into JSON.
+
+
+
+
+ Occurs when the errors during serialization and deserialization.
+
+
+
+
+ Gets or sets the used by the serializer when resolving references.
+
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+
+
+
+ Gets or sets the used by the serializer when writing trace messages.
+
+ The trace writer.
+
+
+
+ Gets or sets the equality comparer used by the serializer when comparing references.
+
+ The equality comparer.
+
+
+
+ Gets or sets how type name writing and reading is handled by the serializer.
+ The default value is .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how object references are preserved by the serializer.
+ The default value is .
+
+
+
+
+ Gets or sets how reference loops (e.g. a class referencing itself) is handled.
+ The default value is .
+
+
+
+
+ Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how null values are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how default values are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how objects are created during deserialization.
+ The default value is .
+
+ The object creation handling.
+
+
+
+ Gets or sets how constructors are used during deserialization.
+ The default value is .
+
+ The constructor handling.
+
+
+
+ Gets or sets how metadata properties are used during deserialization.
+ The default value is .
+
+ The metadata properties handling.
+
+
+
+ Gets a collection that will be used during serialization.
+
+ Collection that will be used during serialization.
+
+
+
+ Gets or sets the contract resolver used by the serializer when
+ serializing .NET objects to JSON and vice versa.
+
+
+
+
+ Gets or sets the used by the serializer when invoking serialization callback methods.
+
+ The context.
+
+
+
+ Indicates how JSON text output is formatted.
+ The default value is .
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how time zones are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written as JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how and values are formatted when writing JSON text,
+ and the expected date format when reading JSON text.
+ The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
+
+
+
+
+ Gets or sets the culture used when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+ A null value means there is no maximum.
+ The default value is null.
+
+
+
+
+ Gets a value indicating whether there will be a check for additional JSON content after deserializing an object.
+ The default value is false.
+
+
+ true if there will be a check for additional JSON content after deserializing an object; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Creates a new instance.
+ The will not use default settings
+ from .
+
+
+ A new instance.
+ The will not use default settings
+ from .
+
+
+
+
+ Creates a new instance using the specified .
+ The will not use default settings
+ from .
+
+ The settings to be applied to the .
+
+ A new instance using the specified .
+ The will not use default settings
+ from .
+
+
+
+
+ Creates a new instance.
+ The will use default settings
+ from .
+
+
+ A new instance.
+ The will use default settings
+ from .
+
+
+
+
+ Creates a new instance using the specified .
+ The will use default settings
+ from as well as the specified .
+
+ The settings to be applied to the .
+
+ A new instance using the specified .
+ The will use default settings
+ from as well as the specified .
+
+
+
+
+ Populates the JSON values onto the target object.
+
+ The that contains the JSON structure to read values from.
+ The target object to populate values onto.
+
+
+
+ Populates the JSON values onto the target object.
+
+ The that contains the JSON structure to read values from.
+ The target object to populate values onto.
+
+
+
+ Deserializes the JSON structure contained by the specified .
+
+ The that contains the JSON structure to deserialize.
+ The being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The of object being deserialized.
+ The instance of being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The type of the object to deserialize.
+ The instance of being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The of object being deserialized.
+ The instance of being deserialized.
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+ The type of the value being serialized.
+ This parameter is used when is Auto to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+
+
+ Specifies the settings on a object.
+
+
+
+
+ Gets or sets how reference loops (e.g. a class referencing itself) are handled.
+ The default value is .
+
+ Reference loop handling.
+
+
+
+ Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
+ The default value is .
+
+ Missing member handling.
+
+
+
+ Gets or sets how objects are created during deserialization.
+ The default value is .
+
+ The object creation handling.
+
+
+
+ Gets or sets how null values are handled during serialization and deserialization.
+ The default value is .
+
+ Null value handling.
+
+
+
+ Gets or sets how default values are handled during serialization and deserialization.
+ The default value is .
+
+ The default value handling.
+
+
+
+ Gets or sets a collection that will be used during serialization.
+
+ The converters.
+
+
+
+ Gets or sets how object references are preserved by the serializer.
+ The default value is .
+
+ The preserve references handling.
+
+
+
+ Gets or sets how type name writing and reading is handled by the serializer.
+ The default value is .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+ The type name handling.
+
+
+
+ Gets or sets how metadata properties are used during deserialization.
+ The default value is .
+
+ The metadata properties handling.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how constructors are used during deserialization.
+ The default value is .
+
+ The constructor handling.
+
+
+
+ Gets or sets the contract resolver used by the serializer when
+ serializing .NET objects to JSON and vice versa.
+
+ The contract resolver.
+
+
+
+ Gets or sets the equality comparer used by the serializer when comparing references.
+
+ The equality comparer.
+
+
+
+ Gets or sets the used by the serializer when resolving references.
+
+ The reference resolver.
+
+
+
+ Gets or sets a function that creates the used by the serializer when resolving references.
+
+ A function that creates the used by the serializer when resolving references.
+
+
+
+ Gets or sets the used by the serializer when writing trace messages.
+
+ The trace writer.
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+ The binder.
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+ The binder.
+
+
+
+ Gets or sets the error handler called during serialization and deserialization.
+
+ The error handler called during serialization and deserialization.
+
+
+
+ Gets or sets the used by the serializer when invoking serialization callback methods.
+
+ The context.
+
+
+
+ Gets or sets how and values are formatted when writing JSON text,
+ and the expected date format when reading JSON text.
+ The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+ A null value means there is no maximum.
+ The default value is null.
+
+
+
+
+ Indicates how JSON text output is formatted.
+ The default value is .
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how time zones are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written as JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets the culture used when reading JSON.
+ The default value is .
+
+
+
+
+ Gets a value indicating whether there will be a check for additional content after deserializing an object.
+ The default value is false.
+
+
+ true if there will be a check for additional content after deserializing an object; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to JSON text data.
+
+
+
+
+ Asynchronously reads the next JSON token from the source.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns true if the next token was read successfully; false if there are no more tokens to read.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a [].
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the []. This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Initializes a new instance of the class with the specified .
+
+ The containing the JSON data to read.
+
+
+
+ Gets or sets the reader's property name table.
+
+
+
+
+ Gets or sets the reader's character buffer pool.
+
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a [].
+
+ A [] or null if the next JSON token is null. This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Gets a value indicating whether the class can return line information.
+
+
+ true if and can be provided; otherwise, false.
+
+
+
+
+ Gets the current line number.
+
+
+ The current line number or 0 if no line information is available (for example, returns false).
+
+
+
+
+ Gets the current line position.
+
+
+ The current line position or 0 if no line information is available (for example, returns false).
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the JSON value delimiter.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the specified end token.
+
+ The end token to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously closes this writer.
+ If is set to true, the destination is also closed.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of the current JSON object or array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes indent characters.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes an indent space.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a null value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the beginning of a JSON array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the beginning of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the start of a constructor with the given name.
+
+ The name of the constructor.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes an undefined value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the given white space.
+
+ The string of white space characters.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a [] value.
+
+ The [] value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of an array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of a constructor.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Gets or sets the writer's character array pool.
+
+
+
+
+ Gets or sets how many s to write for each level in the hierarchy when is set to .
+
+
+
+
+ Gets or sets which character to use to quote attribute values.
+
+
+
+
+ Gets or sets which character to use for indenting when is set to .
+
+
+
+
+ Gets or sets a value indicating whether object names will be surrounded with quotes.
+
+
+
+
+ Initializes a new instance of the class using the specified .
+
+ The to write to.
+
+
+
+ Flushes whatever is in the buffer to the underlying and also flushes the underlying .
+
+
+
+
+ Closes this writer.
+ If is set to true, the underlying is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the specified end token.
+
+ The end token to write.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+
+
+
+ Writes indent characters.
+
+
+
+
+ Writes the JSON value delimiter.
+
+
+
+
+ Writes an indent space.
+
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the given white space.
+
+ The string of white space characters.
+
+
+
+ Specifies the type of JSON token.
+
+
+
+
+ This is returned by the if a read method has not been called.
+
+
+
+
+ An object start token.
+
+
+
+
+ An array start token.
+
+
+
+
+ A constructor start token.
+
+
+
+
+ An object property name.
+
+
+
+
+ A comment.
+
+
+
+
+ Raw JSON.
+
+
+
+
+ An integer.
+
+
+
+
+ A float.
+
+
+
+
+ A string.
+
+
+
+
+ A boolean.
+
+
+
+
+ A null token.
+
+
+
+
+ An undefined token.
+
+
+
+
+ An object end token.
+
+
+
+
+ An array end token.
+
+
+
+
+ A constructor end token.
+
+
+
+
+ A Date.
+
+
+
+
+ Byte data.
+
+
+
+
+
+ Represents a reader that provides validation.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Sets an event handler for receiving schema validation errors.
+
+
+
+
+ Gets the text value of the current JSON token.
+
+
+
+
+
+ Gets the depth of the current token in the JSON document.
+
+ The depth of the current token in the JSON document.
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Gets the quotation mark character used to enclose the value of a string.
+
+
+
+
+
+ Gets the type of the current JSON token.
+
+
+
+
+
+ Gets the .NET type for the current JSON token.
+
+
+
+
+
+ Initializes a new instance of the class that
+ validates the content returned from the given .
+
+ The to read from while validating.
+
+
+
+ Gets or sets the schema.
+
+ The schema.
+
+
+
+ Gets the used to construct this .
+
+ The specified in the constructor.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a [].
+
+
+ A [] or null if the next JSON token is null.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Asynchronously closes this writer.
+ If is set to true, the destination is also closed.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the specified end token.
+
+ The end token to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes indent characters.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the JSON value delimiter.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes an indent space.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of the current JSON object or array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of an array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of a constructor.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a null value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the beginning of a JSON array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the start of a constructor with the given name.
+
+ The name of the constructor.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the beginning of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the current token.
+
+ The to read the token from.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the current token.
+
+ The to read the token from.
+ A flag indicating whether the current token's children should be written.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the token and its value.
+
+ The to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the token and its value.
+
+ The to write.
+
+ The value to write.
+ A value is only required for tokens that have an associated value, e.g. the property name for .
+ null can be passed to the method for tokens that don't have a value, e.g. .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a [] value.
+
+ The [] value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes an undefined value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the given white space.
+
+ The string of white space characters.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously ets the state of the .
+
+ The being written.
+ The value being written.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Gets or sets a value indicating whether the destination should be closed when this writer is closed.
+
+
+ true to close the destination when this writer is closed; otherwise false. The default is true.
+
+
+
+
+ Gets or sets a value indicating whether the JSON should be auto-completed when this writer is closed.
+
+
+ true to auto-complete the JSON when this writer is closed; otherwise false. The default is true.
+
+
+
+
+ Gets the top.
+
+ The top.
+
+
+
+ Gets the state of the writer.
+
+
+
+
+ Gets the path of the writer.
+
+
+
+
+ Gets or sets a value indicating how JSON text output should be formatted.
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+
+
+
+
+ Gets or sets how time zones are handled when writing JSON text.
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written to JSON text.
+
+
+
+
+ Gets or sets how and values are formatted when writing JSON text.
+
+
+
+
+ Gets or sets the culture used when writing JSON. Defaults to .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Flushes whatever is in the buffer to the destination and also flushes the destination.
+
+
+
+
+ Closes this writer.
+ If is set to true, the destination is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the end of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the end of an array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the end constructor.
+
+
+
+
+ Writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+
+
+
+ Writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+
+
+
+ Writes the end of the current JSON object or array.
+
+
+
+
+ Writes the current token and its children.
+
+ The to read the token from.
+
+
+
+ Writes the current token.
+
+ The to read the token from.
+ A flag indicating whether the current token's children should be written.
+
+
+
+ Writes the token and its value.
+
+ The to write.
+
+ The value to write.
+ A value is only required for tokens that have an associated value, e.g. the property name for .
+ null can be passed to the method for tokens that don't have a value, e.g. .
+
+
+
+
+ Writes the token.
+
+ The to write.
+
+
+
+ Writes the specified end token.
+
+ The end token to write.
+
+
+
+ Writes indent characters.
+
+
+
+
+ Writes the JSON value delimiter.
+
+
+
+
+ Writes an indent space.
+
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the given white space.
+
+ The string of white space characters.
+
+
+
+ Releases unmanaged and - optionally - managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Sets the state of the .
+
+ The being written.
+ The value being written.
+
+
+
+ The exception thrown when an error occurs while writing JSON text.
+
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Specifies how JSON comments are handled when loading JSON.
+
+
+
+
+ Ignore comments.
+
+
+
+
+ Load comments as a with type .
+
+
+
+
+ Specifies how duplicate property names are handled when loading JSON.
+
+
+
+
+ Replace the existing value when there is a duplicate property. The value of the last property in the JSON object will be used.
+
+
+
+
+ Ignore the new value when there is a duplicate property. The value of the first property in the JSON object will be used.
+
+
+
+
+ Throw a when a duplicate property is encountered.
+
+
+
+
+ Contains the LINQ to JSON extension methods.
+
+
+
+
+ Returns a collection of tokens that contains the ancestors of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains the ancestors of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains every token in the source collection, the ancestors of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains the descendants of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains the descendants of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains every token in the source collection, and the descendants of every token in the source collection.
+
+
+
+ Returns a collection of child properties of every object in the source collection.
+
+ An of that contains the source collection.
+ An of that contains the properties of every object in the source collection.
+
+
+
+ Returns a collection of child values of every object in the source collection with the given key.
+
+ An of that contains the source collection.
+ The token key.
+ An of that contains the values of every token in the source collection with the given key.
+
+
+
+ Returns a collection of child values of every object in the source collection.
+
+ An of that contains the source collection.
+ An of that contains the values of every token in the source collection.
+
+
+
+ Returns a collection of converted child values of every object in the source collection with the given key.
+
+ The type to convert the values to.
+ An of that contains the source collection.
+ The token key.
+ An that contains the converted values of every token in the source collection with the given key.
+
+
+
+ Returns a collection of converted child values of every object in the source collection.
+
+ The type to convert the values to.
+ An of that contains the source collection.
+ An that contains the converted values of every token in the source collection.
+
+
+
+ Converts the value.
+
+ The type to convert the value to.
+ A cast as a of .
+ A converted value.
+
+
+
+ Converts the value.
+
+ The source collection type.
+ The type to convert the value to.
+ A cast as a of .
+ A converted value.
+
+
+
+ Returns a collection of child tokens of every array in the source collection.
+
+ The source collection type.
+ An of that contains the source collection.
+ An of that contains the values of every token in the source collection.
+
+
+
+ Returns a collection of converted child tokens of every array in the source collection.
+
+ An of that contains the source collection.
+ The type to convert the values to.
+ The source collection type.
+ An that contains the converted values of every token in the source collection.
+
+
+
+ Returns the input typed as .
+
+ An of that contains the source collection.
+ The input typed as .
+
+
+
+ Returns the input typed as .
+
+ The source collection type.
+ An of that contains the source collection.
+ The input typed as .
+
+
+
+ Represents a collection of objects.
+
+ The type of token.
+
+
+
+ Gets the of with the specified key.
+
+
+
+
+
+ Represents a JSON array.
+
+
+
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous load. The property contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous load. The property contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the array.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the array.
+
+
+
+ Loads an from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads an from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+
+
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the values of the specified object.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ The that will be used to read the object.
+ A with the values of the specified object.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets or sets the at the specified index.
+
+
+
+
+
+ Determines the index of a specific item in the .
+
+ The object to locate in the .
+
+ The index of if found in the list; otherwise, -1.
+
+
+
+
+ Inserts an item to the at the specified index.
+
+ The zero-based index at which should be inserted.
+ The object to insert into the .
+
+ is not a valid index in the .
+
+
+
+
+ Removes the item at the specified index.
+
+ The zero-based index of the item to remove.
+
+ is not a valid index in the .
+
+
+
+
+ Returns an enumerator that iterates through the collection.
+
+
+ A of that can be used to iterate through the collection.
+
+
+
+
+ Adds an item to the .
+
+ The object to add to the .
+
+
+
+ Removes all items from the .
+
+
+
+
+ Determines whether the contains a specific value.
+
+ The object to locate in the .
+
+ true if is found in the ; otherwise, false.
+
+
+
+
+ Copies the elements of the to an array, starting at a particular array index.
+
+ The array.
+ Index of the array.
+
+
+
+ Gets a value indicating whether the is read-only.
+
+ true if the is read-only; otherwise, false.
+
+
+
+ Removes the first occurrence of a specific object from the .
+
+ The object to remove from the .
+
+ true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original .
+
+
+
+
+ Represents a JSON constructor.
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets or sets the name of this constructor.
+
+ The constructor name.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified name and content.
+
+ The constructor name.
+ The contents of the constructor.
+
+
+
+ Initializes a new instance of the class with the specified name and content.
+
+ The constructor name.
+ The contents of the constructor.
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ The constructor name.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Represents a token that can contain other tokens.
+
+
+
+
+ Occurs when the items list of the collection has changed, or the collection is reset.
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Get the first child token of this token.
+
+
+ A containing the first child token of the .
+
+
+
+
+ Get the last child token of this token.
+
+
+ A containing the last child token of the .
+
+
+
+
+ Returns a collection of the child tokens of this token, in document order.
+
+
+ An of containing the child tokens of this , in document order.
+
+
+
+
+ Returns a collection of the child values of this token, in document order.
+
+ The type to convert the values to.
+
+ A containing the child values of this , in document order.
+
+
+
+
+ Returns a collection of the descendant tokens for this token in document order.
+
+ An of containing the descendant tokens of the .
+
+
+
+ Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order.
+
+ An of containing this token, and all the descendant tokens of the .
+
+
+
+ Adds the specified content as children of this .
+
+ The content to be added.
+
+
+
+ Adds the specified content as the first children of this .
+
+ The content to be added.
+
+
+
+ Creates a that can be used to add tokens to the .
+
+ A that is ready to have content written to it.
+
+
+
+ Replaces the child nodes of this token with the specified content.
+
+ The content.
+
+
+
+ Removes the child nodes from this token.
+
+
+
+
+ Merge the specified content into this .
+
+ The content to be merged.
+
+
+
+ Merge the specified content into this using .
+
+ The content to be merged.
+ The used to merge the content.
+
+
+
+ Gets the count of child JSON tokens.
+
+ The count of child JSON tokens.
+
+
+
+ Represents a collection of objects.
+
+ The type of token.
+
+
+
+ An empty collection of objects.
+
+
+
+
+ Initializes a new instance of the struct.
+
+ The enumerable.
+
+
+
+ Returns an enumerator that can be used to iterate through the collection.
+
+
+ A that can be used to iterate through the collection.
+
+
+
+
+ Gets the of with the specified key.
+
+
+
+
+
+ Determines whether the specified is equal to this instance.
+
+ The to compare with this instance.
+
+ true if the specified is equal to this instance; otherwise, false.
+
+
+
+
+ Determines whether the specified is equal to this instance.
+
+ The to compare with this instance.
+
+ true if the specified is equal to this instance; otherwise, false.
+
+
+
+
+ Returns a hash code for this instance.
+
+
+ A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
+
+
+
+
+ Represents a JSON object.
+
+
+
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Occurs when a property value changes.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the object.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the object.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets an of of this object's properties.
+
+ An of of this object's properties.
+
+
+
+ Gets a with the specified name.
+
+ The property name.
+ A with the specified name or null.
+
+
+
+ Gets the with the specified name.
+ The exact name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ The property name.
+ One of the enumeration values that specifies how the strings will be compared.
+ A matched with the specified name or null.
+
+
+
+ Gets a of of this object's property values.
+
+ A of of this object's property values.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets or sets the with the specified property name.
+
+
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+ is not valid JSON.
+
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+ is not valid JSON.
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+ is not valid JSON.
+
+
+
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+ is not valid JSON.
+
+
+
+
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the values of the specified object.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ The that will be used to read the object.
+ A with the values of the specified object.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified property name.
+
+ Name of the property.
+ The with the specified property name.
+
+
+
+ Gets the with the specified property name.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ Name of the property.
+ One of the enumeration values that specifies how the strings will be compared.
+ The with the specified property name.
+
+
+
+ Tries to get the with the specified property name.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ Name of the property.
+ The value.
+ One of the enumeration values that specifies how the strings will be compared.
+ true if a value was successfully retrieved; otherwise, false.
+
+
+
+ Adds the specified property name.
+
+ Name of the property.
+ The value.
+
+
+
+ Determines whether the JSON object has the specified property name.
+
+ Name of the property.
+ true if the JSON object has the specified property name; otherwise, false.
+
+
+
+ Removes the property with the specified name.
+
+ Name of the property.
+ true if item was successfully removed; otherwise, false.
+
+
+
+ Tries to get the with the specified property name.
+
+ Name of the property.
+ The value.
+ true if a value was successfully retrieved; otherwise, false.
+
+
+
+ Returns an enumerator that can be used to iterate through the collection.
+
+
+ A that can be used to iterate through the collection.
+
+
+
+
+ Raises the event with the provided arguments.
+
+ Name of the property.
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Represents a JSON property.
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous creation. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous creation. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets the property name.
+
+ The property name.
+
+
+
+ Gets or sets the property value.
+
+ The property value.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+ The property name.
+ The property content.
+
+
+
+ Initializes a new instance of the class.
+
+ The property name.
+ The property content.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Represents a raw JSON string.
+
+
+
+
+ Asynchronously creates an instance of with the content of the reader's current token.
+
+ The reader.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous creation. The
+ property returns an instance of with the content of the reader's current token.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class.
+
+ The raw json.
+
+
+
+ Creates an instance of with the content of the reader's current token.
+
+ The reader.
+ An instance of with the content of the reader's current token.
+
+
+
+ Specifies the settings used when loading JSON.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets or sets how JSON comments are handled when loading JSON.
+ The default value is .
+
+ The JSON comment handling.
+
+
+
+ Gets or sets how JSON line info is handled when loading JSON.
+ The default value is .
+
+ The JSON line info handling.
+
+
+
+ Gets or sets how duplicate property names in JSON objects are handled when loading JSON.
+ The default value is .
+
+ The JSON duplicate property name handling.
+
+
+
+ Specifies the settings used when merging JSON.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets or sets the method used when merging JSON arrays.
+
+ The method used when merging JSON arrays.
+
+
+
+ Gets or sets how null value properties are merged.
+
+ How null value properties are merged.
+
+
+
+ Gets or sets the comparison used to match property names while merging.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ The comparison used to match property names while merging.
+
+
+
+ Represents an abstract JSON token.
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously creates a from a .
+
+ An positioned at the token to read into this .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains
+ the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Asynchronously creates a from a .
+
+ An positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains
+ the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Asynchronously creates a from a .
+
+ A positioned at the token to read into this .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Asynchronously creates a from a .
+
+ A positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Gets a comparer that can compare two tokens for value equality.
+
+ A that can compare two nodes for value equality.
+
+
+
+ Gets or sets the parent.
+
+ The parent.
+
+
+
+ Gets the root of this .
+
+ The root of this .
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Compares the values of two tokens, including the values of all descendant tokens.
+
+ The first to compare.
+ The second to compare.
+ true if the tokens are equal; otherwise false.
+
+
+
+ Gets the next sibling token of this node.
+
+ The that contains the next sibling token.
+
+
+
+ Gets the previous sibling token of this node.
+
+ The that contains the previous sibling token.
+
+
+
+ Gets the path of the JSON token.
+
+
+
+
+ Adds the specified content immediately after this token.
+
+ A content object that contains simple content or a collection of content objects to be added after this token.
+
+
+
+ Adds the specified content immediately before this token.
+
+ A content object that contains simple content or a collection of content objects to be added before this token.
+
+
+
+ Returns a collection of the ancestor tokens of this token.
+
+ A collection of the ancestor tokens of this token.
+
+
+
+ Returns a collection of tokens that contain this token, and the ancestors of this token.
+
+ A collection of tokens that contain this token, and the ancestors of this token.
+
+
+
+ Returns a collection of the sibling tokens after this token, in document order.
+
+ A collection of the sibling tokens after this tokens, in document order.
+
+
+
+ Returns a collection of the sibling tokens before this token, in document order.
+
+ A collection of the sibling tokens before this token, in document order.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets the with the specified key converted to the specified type.
+
+ The type to convert the token to.
+ The token key.
+ The converted token value.
+
+
+
+ Get the first child token of this token.
+
+ A containing the first child token of the .
+
+
+
+ Get the last child token of this token.
+
+ A containing the last child token of the .
+
+
+
+ Returns a collection of the child tokens of this token, in document order.
+
+ An of containing the child tokens of this , in document order.
+
+
+
+ Returns a collection of the child tokens of this token, in document order, filtered by the specified type.
+
+ The type to filter the child tokens on.
+ A containing the child tokens of this , in document order.
+
+
+
+ Returns a collection of the child values of this token, in document order.
+
+ The type to convert the values to.
+ A containing the child values of this , in document order.
+
+
+
+ Removes this token from its parent.
+
+
+
+
+ Replaces this token with the specified token.
+
+ The value.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Returns the indented JSON for this token.
+
+
+ ToString() returns a non-JSON string value for tokens with a type of .
+ If you want the JSON for all token types then you should use .
+
+
+ The indented JSON for this token.
+
+
+
+
+ Returns the JSON for this token using the given formatting and converters.
+
+ Indicates how the output should be formatted.
+ A collection of s which will be used when writing the token.
+ The JSON for this token using the given formatting and converters.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to [].
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from [] to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Creates a for this token.
+
+ A that can be used to read this token and its descendants.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the value of the specified object.
+
+
+
+ Creates a from an object using the specified .
+
+ The object that will be used to create .
+ The that will be used when reading the object.
+ A with the value of the specified object.
+
+
+
+ Creates an instance of the specified .NET type from the .
+
+ The object type that the token will be deserialized to.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the .
+
+ The object type that the token will be deserialized to.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the using the specified .
+
+ The object type that the token will be deserialized to.
+ The that will be used when creating the object.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the using the specified .
+
+ The object type that the token will be deserialized to.
+ The that will be used when creating the object.
+ The new object created from the JSON value.
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Creates a from a .
+
+ An positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Selects a using a JSONPath expression. Selects the token that matches the object path.
+
+
+ A that contains a JSONPath expression.
+
+ A , or null.
+
+
+
+ Selects a using a JSONPath expression. Selects the token that matches the object path.
+
+
+ A that contains a JSONPath expression.
+
+ A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.
+ A .
+
+
+
+ Selects a collection of elements using a JSONPath expression.
+
+
+ A that contains a JSONPath expression.
+
+ An of that contains the selected elements.
+
+
+
+ Selects a collection of elements using a JSONPath expression.
+
+
+ A that contains a JSONPath expression.
+
+ A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.
+ An of that contains the selected elements.
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Creates a new instance of the . All child tokens are recursively cloned.
+
+ A new instance of the .
+
+
+
+ Adds an object to the annotation list of this .
+
+ The annotation to add.
+
+
+
+ Get the first annotation object of the specified type from this .
+
+ The type of the annotation to retrieve.
+ The first annotation object that matches the specified type, or null if no annotation is of the specified type.
+
+
+
+ Gets the first annotation object of the specified type from this .
+
+ The of the annotation to retrieve.
+ The first annotation object that matches the specified type, or null if no annotation is of the specified type.
+
+
+
+ Gets a collection of annotations of the specified type for this .
+
+ The type of the annotations to retrieve.
+ An that contains the annotations for this .
+
+
+
+ Gets a collection of annotations of the specified type for this .
+
+ The of the annotations to retrieve.
+ An of that contains the annotations that match the specified type for this .
+
+
+
+ Removes the annotations of the specified type from this .
+
+ The type of annotations to remove.
+
+
+
+ Removes the annotations of the specified type from this .
+
+ The of annotations to remove.
+
+
+
+ Compares tokens to determine whether they are equal.
+
+
+
+
+ Determines whether the specified objects are equal.
+
+ The first object of type to compare.
+ The second object of type to compare.
+
+ true if the specified objects are equal; otherwise, false.
+
+
+
+
+ Returns a hash code for the specified object.
+
+ The for which a hash code is to be returned.
+ A hash code for the specified object.
+ The type of is a reference type and is null.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
+
+
+
+
+ Gets the at the reader's current position.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The token to read from.
+
+
+
+ Initializes a new instance of the class.
+
+ The token to read from.
+ The initial path of the token. It is prepended to the returned .
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Specifies the type of token.
+
+
+
+
+ No token type has been set.
+
+
+
+
+ A JSON object.
+
+
+
+
+ A JSON array.
+
+
+
+
+ A JSON constructor.
+
+
+
+
+ A JSON object property.
+
+
+
+
+ A comment.
+
+
+
+
+ An integer value.
+
+
+
+
+ A float value.
+
+
+
+
+ A string value.
+
+
+
+
+ A boolean value.
+
+
+
+
+ A null value.
+
+
+
+
+ An undefined value.
+
+
+
+
+ A date value.
+
+
+
+
+ A raw JSON value.
+
+
+
+
+ A collection of bytes value.
+
+
+
+
+ A Guid value.
+
+
+
+
+ A Uri value.
+
+
+
+
+ A TimeSpan value.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Gets the at the writer's current position.
+
+
+
+
+ Gets the token being written.
+
+ The token being written.
+
+
+
+ Initializes a new instance of the class writing to the given .
+
+ The container being written to.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Flushes whatever is in the buffer to the underlying .
+
+
+
+
+ Closes this writer.
+ If is set to true, the JSON is auto-completed.
+
+
+ Setting to true has no additional effect, since the underlying is a type that cannot be closed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the end.
+
+ The token.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Writes a value.
+ An error will be raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Represents a value in JSON (string, integer, date, etc).
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Creates a comment with the given value.
+
+ The value.
+ A comment with the given value.
+
+
+
+ Creates a string with the given value.
+
+ The value.
+ A string with the given value.
+
+
+
+ Creates a null value.
+
+ A null value.
+
+
+
+ Creates a undefined value.
+
+ A undefined value.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets or sets the underlying token value.
+
+ The underlying token value.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of s which will be used when writing the token.
+
+
+
+ Indicates whether the current object is equal to another object of the same type.
+
+
+ true if the current object is equal to the parameter; otherwise, false.
+
+ An object to compare with this object.
+
+
+
+ Determines whether the specified is equal to the current .
+
+ The to compare with the current .
+
+ true if the specified is equal to the current ; otherwise, false.
+
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Returns a that represents this instance.
+
+
+ ToString() returns a non-JSON string value for tokens with a type of .
+ If you want the JSON for all token types then you should use .
+
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format.
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format provider.
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format.
+ The format provider.
+
+ A that represents this instance.
+
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
+
+ An object to compare with this instance.
+
+ A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings:
+ Value
+ Meaning
+ Less than zero
+ This instance is less than .
+ Zero
+ This instance is equal to .
+ Greater than zero
+ This instance is greater than .
+
+
+ is not of the same type as this instance.
+
+
+
+
+ Specifies how line information is handled when loading JSON.
+
+
+
+
+ Ignore line information.
+
+
+
+
+ Load line information.
+
+
+
+
+ Specifies how JSON arrays are merged together.
+
+
+
+ Concatenate arrays.
+
+
+ Union arrays, skipping items that already exist.
+
+
+ Replace all array items.
+
+
+ Merge array items together, matched by index.
+
+
+
+ Specifies how null value properties are merged.
+
+
+
+
+ The content's null value properties will be ignored during merging.
+
+
+
+
+ The content's null value properties will be merged.
+
+
+
+
+ Specifies the member serialization options for the .
+
+
+
+
+ All public members are serialized by default. Members can be excluded using or .
+ This is the default member serialization mode.
+
+
+
+
+ Only members marked with or are serialized.
+ This member serialization mode can also be set by marking the class with .
+
+
+
+
+ All public and private fields are serialized. Members can be excluded using or .
+ This member serialization mode can also be set by marking the class with
+ and setting IgnoreSerializableAttribute on to false.
+
+
+
+
+ Specifies metadata property handling options for the .
+
+
+
+
+ Read metadata properties located at the start of a JSON object.
+
+
+
+
+ Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance.
+
+
+
+
+ Do not try to read metadata properties.
+
+
+
+
+ Specifies missing member handling options for the .
+
+
+
+
+ Ignore a missing member and do not attempt to deserialize it.
+
+
+
+
+ Throw a when a missing member is encountered during deserialization.
+
+
+
+
+ Specifies null value handling options for the .
+
+
+
+
+
+
+
+
+ Include null values when serializing and deserializing objects.
+
+
+
+
+ Ignore null values when serializing and deserializing objects.
+
+
+
+
+ Specifies how object creation is handled by the .
+
+
+
+
+ Reuse existing objects, create new objects when needed.
+
+
+
+
+ Only reuse existing objects.
+
+
+
+
+ Always create new objects.
+
+
+
+
+ Specifies reference handling options for the .
+ Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement .
+
+
+
+
+
+
+
+ Do not preserve references when serializing types.
+
+
+
+
+ Preserve references when serializing into a JSON object structure.
+
+
+
+
+ Preserve references when serializing into a JSON array structure.
+
+
+
+
+ Preserve references when serializing.
+
+
+
+
+ Specifies reference loop handling options for the .
+
+
+
+
+ Throw a when a loop is encountered.
+
+
+
+
+ Ignore loop references and do not serialize.
+
+
+
+
+ Serialize loop references.
+
+
+
+
+ Indicating whether a property is required.
+
+
+
+
+ The property is not required. The default state.
+
+
+
+
+ The property must be defined in JSON but can be a null value.
+
+
+
+
+ The property must be defined in JSON and cannot be a null value.
+
+
+
+
+ The property is not required but it cannot be a null value.
+
+
+
+
+
+ Contains the JSON schema extension methods.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+
+ Determines whether the is valid.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+
+ true if the specified is valid; otherwise, false.
+
+
+
+
+
+ Determines whether the is valid.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+ When this method returns, contains any error messages generated while validating.
+
+ true if the specified is valid; otherwise, false.
+
+
+
+
+
+ Validates the specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+
+
+
+
+ Validates the specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+ The validation event handler.
+
+
+
+
+ An in-memory representation of a JSON Schema.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets the id.
+
+
+
+
+ Gets or sets the title.
+
+
+
+
+ Gets or sets whether the object is required.
+
+
+
+
+ Gets or sets whether the object is read-only.
+
+
+
+
+ Gets or sets whether the object is visible to users.
+
+
+
+
+ Gets or sets whether the object is transient.
+
+
+
+
+ Gets or sets the description of the object.
+
+
+
+
+ Gets or sets the types of values allowed by the object.
+
+ The type.
+
+
+
+ Gets or sets the pattern.
+
+ The pattern.
+
+
+
+ Gets or sets the minimum length.
+
+ The minimum length.
+
+
+
+ Gets or sets the maximum length.
+
+ The maximum length.
+
+
+
+ Gets or sets a number that the value should be divisible by.
+
+ A number that the value should be divisible by.
+
+
+
+ Gets or sets the minimum.
+
+ The minimum.
+
+
+
+ Gets or sets the maximum.
+
+ The maximum.
+
+
+
+ Gets or sets a flag indicating whether the value can not equal the number defined by the minimum attribute ().
+
+ A flag indicating whether the value can not equal the number defined by the minimum attribute ().
+
+
+
+ Gets or sets a flag indicating whether the value can not equal the number defined by the maximum attribute ().
+
+ A flag indicating whether the value can not equal the number defined by the maximum attribute ().
+
+
+
+ Gets or sets the minimum number of items.
+
+ The minimum number of items.
+
+
+
+ Gets or sets the maximum number of items.
+
+ The maximum number of items.
+
+
+
+ Gets or sets the of items.
+
+ The of items.
+
+
+
+ Gets or sets a value indicating whether items in an array are validated using the instance at their array position from .
+
+
+ true if items are validated using their array position; otherwise, false.
+
+
+
+
+ Gets or sets the of additional items.
+
+ The of additional items.
+
+
+
+ Gets or sets a value indicating whether additional items are allowed.
+
+
+ true if additional items are allowed; otherwise, false.
+
+
+
+
+ Gets or sets whether the array items must be unique.
+
+
+
+
+ Gets or sets the of properties.
+
+ The of properties.
+
+
+
+ Gets or sets the of additional properties.
+
+ The of additional properties.
+
+
+
+ Gets or sets the pattern properties.
+
+ The pattern properties.
+
+
+
+ Gets or sets a value indicating whether additional properties are allowed.
+
+
+ true if additional properties are allowed; otherwise, false.
+
+
+
+
+ Gets or sets the required property if this property is present.
+
+ The required property if this property is present.
+
+
+
+ Gets or sets the a collection of valid enum values allowed.
+
+ A collection of valid enum values allowed.
+
+
+
+ Gets or sets disallowed types.
+
+ The disallowed types.
+
+
+
+ Gets or sets the default value.
+
+ The default value.
+
+
+
+ Gets or sets the collection of that this schema extends.
+
+ The collection of that this schema extends.
+
+
+
+ Gets or sets the format.
+
+ The format.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads a from the specified .
+
+ The containing the JSON Schema to read.
+ The object representing the JSON Schema.
+
+
+
+ Reads a from the specified .
+
+ The containing the JSON Schema to read.
+ The to use when resolving schema references.
+ The object representing the JSON Schema.
+
+
+
+ Load a from a string that contains JSON Schema.
+
+ A that contains JSON Schema.
+ A populated from the string that contains JSON Schema.
+
+
+
+ Load a from a string that contains JSON Schema using the specified .
+
+ A that contains JSON Schema.
+ The resolver.
+ A populated from the string that contains JSON Schema.
+
+
+
+ Writes this schema to a .
+
+ A into which this method will write.
+
+
+
+ Writes this schema to a using the specified .
+
+ A into which this method will write.
+ The resolver used.
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+
+ Returns detailed information about the schema exception.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+
+ Generates a from a specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets how undefined schemas are handled by the serializer.
+
+
+
+
+ Gets or sets the contract resolver.
+
+ The contract resolver.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ The used to resolve schema references.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ Specify whether the generated root will be nullable.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ The used to resolve schema references.
+ Specify whether the generated root will be nullable.
+ A generated from the specified type.
+
+
+
+
+ Resolves from an id.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets the loaded schemas.
+
+ The loaded schemas.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets a for the specified reference.
+
+ The id.
+ A for the specified reference.
+
+
+
+
+ The value types allowed by the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ No type specified.
+
+
+
+
+ String type.
+
+
+
+
+ Float type.
+
+
+
+
+ Integer type.
+
+
+
+
+ Boolean type.
+
+
+
+
+ Object type.
+
+
+
+
+ Array type.
+
+
+
+
+ Null type.
+
+
+
+
+ Any type.
+
+
+
+
+
+ Specifies undefined schema Id handling options for the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Do not infer a schema Id.
+
+
+
+
+ Use the .NET type name as the schema Id.
+
+
+
+
+ Use the assembly qualified .NET type name as the schema Id.
+
+
+
+
+
+ Returns detailed information related to the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets the associated with the validation error.
+
+ The JsonSchemaException associated with the validation error.
+
+
+
+ Gets the path of the JSON location where the validation error occurred.
+
+ The path of the JSON location where the validation error occurred.
+
+
+
+ Gets the text description corresponding to the validation error.
+
+ The text description.
+
+
+
+
+ Represents the callback method that will handle JSON schema validation events and the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Allows users to control class loading and mandate what class to load.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object
+ The type of the object the formatter creates a new instance of.
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ A camel case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Resolves member mappings for a type, camel casing property names.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Used by to resolve a for a given .
+
+
+
+
+ Gets a value indicating whether members are being get and set using dynamic code generation.
+ This value is determined by the runtime permissions available.
+
+
+ true if using dynamic code generation; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether compiler generated members should be serialized.
+
+
+ true if serialized compiler generated members; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore IsSpecified members when serializing and deserializing types.
+
+
+ true if the IsSpecified members will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore ShouldSerialize members when serializing and deserializing types.
+
+
+ true if the ShouldSerialize members will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets the naming strategy used to resolve how property names and dictionary keys are serialized.
+
+ The naming strategy used to resolve how property names and dictionary keys are serialized.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Gets the serializable members for the type.
+
+ The type to get serializable members for.
+ The serializable members for the type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates the constructor parameters.
+
+ The constructor to create properties for.
+ The type's member properties.
+ Properties for the given .
+
+
+
+ Creates a for the given .
+
+ The matching member property.
+ The constructor parameter.
+ A created for the given .
+
+
+
+ Resolves the default for the contract.
+
+ Type of the object.
+ The contract's default .
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Determines which contract type is created for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates properties for the given .
+
+ The type to create properties for.
+ /// The member serialization mode for the type.
+ Properties for the given .
+
+
+
+ Creates the used by the serializer to get and set values from a member.
+
+ The member.
+ The used by the serializer to get and set values from a member.
+
+
+
+ Creates a for the given .
+
+ The member's parent .
+ The member to create a for.
+ A created for the given .
+
+
+
+ Resolves the name of the property.
+
+ Name of the property.
+ Resolved name of the property.
+
+
+
+ Resolves the name of the extension data. By default no changes are made to extension data names.
+
+ Name of the extension data.
+ Resolved name of the extension data.
+
+
+
+ Resolves the key of the dictionary. By default is used to resolve dictionary keys.
+
+ Key of the dictionary.
+ Resolved key of the dictionary.
+
+
+
+ Gets the resolved name of the property.
+
+ Name of the property.
+ Name of the property.
+
+
+
+ The default naming strategy. Property names and dictionary keys are unchanged.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ The default serialization binder used when resolving and loading classes from type names.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+ The type of the object the formatter creates a new instance of.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ Provides information surrounding an error.
+
+
+
+
+ Gets the error.
+
+ The error.
+
+
+
+ Gets the original object that caused the error.
+
+ The original object that caused the error.
+
+
+
+ Gets the member that caused the error.
+
+ The member that caused the error.
+
+
+
+ Gets the path of the JSON location where the error occurred.
+
+ The path of the JSON location where the error occurred.
+
+
+
+ Gets or sets a value indicating whether this is handled.
+
+ true if handled; otherwise, false.
+
+
+
+ Provides data for the Error event.
+
+
+
+
+ Gets the current object the error event is being raised against.
+
+ The current object the error event is being raised against.
+
+
+
+ Gets the error context.
+
+ The error context.
+
+
+
+ Initializes a new instance of the class.
+
+ The current object.
+ The error context.
+
+
+
+ Get and set values for a using dynamic methods.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Provides methods to get attributes.
+
+
+
+
+ Returns a collection of all of the attributes, or an empty collection if there are no attributes.
+
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Returns a collection of attributes, identified by type, or an empty collection if there are no attributes.
+
+ The type of the attributes.
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Used by to resolve a for a given .
+
+
+
+
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Used to resolve references when serializing and deserializing JSON by the .
+
+
+
+
+ Resolves a reference to its object.
+
+ The serialization context.
+ The reference to resolve.
+ The object that was resolved from the reference.
+
+
+
+ Gets the reference for the specified object.
+
+ The serialization context.
+ The object to get a reference for.
+ The reference to the object.
+
+
+
+ Determines whether the specified object is referenced.
+
+ The serialization context.
+ The object to test for a reference.
+
+ true if the specified object is referenced; otherwise, false.
+
+
+
+
+ Adds a reference to the specified object.
+
+ The serialization context.
+ The reference.
+ The object to reference.
+
+
+
+ Allows users to control class loading and mandate what class to load.
+
+
+
+
+ When implemented, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object
+ The type of the object the formatter creates a new instance of.
+
+
+
+ When implemented, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ Represents a trace writer.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Provides methods to get and set values.
+
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the of the collection items.
+
+ The of the collection items.
+
+
+
+ Gets a value indicating whether the collection type is a multidimensional array.
+
+ true if the collection type is a multidimensional array; otherwise, false.
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+
+ The function used to create the object.
+
+
+
+ Gets a value indicating whether the creator has a parameter with the collection values.
+
+ true if the creator has a parameter with the collection values; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the default collection items .
+
+ The converter.
+
+
+
+ Gets or sets a value indicating whether the collection items preserve object references.
+
+ true if collection items preserve object references; otherwise, false.
+
+
+
+ Gets or sets the collection item reference loop handling.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the collection item type name handling.
+
+ The type name handling.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Handles serialization callback events.
+
+ The object that raised the callback event.
+ The streaming context.
+
+
+
+ Handles serialization error callback events.
+
+ The object that raised the callback event.
+ The streaming context.
+ The error context.
+
+
+
+ Sets extension data for an object during deserialization.
+
+ The object to set extension data on.
+ The extension data key.
+ The extension data value.
+
+
+
+ Gets extension data for an object during serialization.
+
+ The object to set extension data on.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the underlying type for the contract.
+
+ The underlying type for the contract.
+
+
+
+ Gets or sets the type created during deserialization.
+
+ The type created during deserialization.
+
+
+
+ Gets or sets whether this type contract is serialized as a reference.
+
+ Whether this type contract is serialized as a reference.
+
+
+
+ Gets or sets the default for this contract.
+
+ The converter.
+
+
+
+ Gets the internally resolved for the contract's type.
+ This converter is used as a fallback converter when no other converter is resolved.
+ Setting will always override this converter.
+
+
+
+
+ Gets or sets all methods called immediately after deserialization of the object.
+
+ The methods called immediately after deserialization of the object.
+
+
+
+ Gets or sets all methods called during deserialization of the object.
+
+ The methods called during deserialization of the object.
+
+
+
+ Gets or sets all methods called after serialization of the object graph.
+
+ The methods called after serialization of the object graph.
+
+
+
+ Gets or sets all methods called before serialization of the object.
+
+ The methods called before serialization of the object.
+
+
+
+ Gets or sets all method called when an error is thrown during the serialization of the object.
+
+ The methods called when an error is thrown during the serialization of the object.
+
+
+
+ Gets or sets the default creator method used to create the object.
+
+ The default creator method used to create the object.
+
+
+
+ Gets or sets a value indicating whether the default creator is non-public.
+
+ true if the default object creator is non-public; otherwise, false.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the dictionary key resolver.
+
+ The dictionary key resolver.
+
+
+
+ Gets the of the dictionary keys.
+
+ The of the dictionary keys.
+
+
+
+ Gets the of the dictionary values.
+
+ The of the dictionary values.
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+
+ The function used to create the object.
+
+
+
+ Gets a value indicating whether the creator has a parameter with the dictionary values.
+
+ true if the creator has a parameter with the dictionary values; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the object's properties.
+
+ The object's properties.
+
+
+
+ Gets or sets the property name resolver.
+
+ The property name resolver.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the object member serialization.
+
+ The member object serialization.
+
+
+
+ Gets or sets the missing member handling used when deserializing this object.
+
+ The missing member handling.
+
+
+
+ Gets or sets a value that indicates whether the object's properties are required.
+
+
+ A value indicating whether the object's properties are required.
+
+
+
+
+ Gets or sets how the object's properties with null values are handled during serialization and deserialization.
+
+ How the object's properties with null values are handled during serialization and deserialization.
+
+
+
+ Gets the object's properties.
+
+ The object's properties.
+
+
+
+ Gets a collection of instances that define the parameters used with .
+
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+ This function is called with a collection of arguments which are defined by the collection.
+
+ The function used to create the object.
+
+
+
+ Gets or sets the extension data setter.
+
+
+
+
+ Gets or sets the extension data getter.
+
+
+
+
+ Gets or sets the extension data value type.
+
+
+
+
+ Gets or sets the extension data name resolver.
+
+ The extension data name resolver.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Maps a JSON property to a .NET member or constructor parameter.
+
+
+
+
+ Gets or sets the name of the property.
+
+ The name of the property.
+
+
+
+ Gets or sets the type that declared this property.
+
+ The type that declared this property.
+
+
+
+ Gets or sets the order of serialization of a member.
+
+ The numeric order of serialization.
+
+
+
+ Gets or sets the name of the underlying member or parameter.
+
+ The name of the underlying member or parameter.
+
+
+
+ Gets the that will get and set the during serialization.
+
+ The that will get and set the during serialization.
+
+
+
+ Gets or sets the for this property.
+
+ The for this property.
+
+
+
+ Gets or sets the type of the property.
+
+ The type of the property.
+
+
+
+ Gets or sets the for the property.
+ If set this converter takes precedence over the contract converter for the property type.
+
+ The converter.
+
+
+
+ Gets or sets the member converter.
+
+ The member converter.
+
+
+
+ Gets or sets a value indicating whether this is ignored.
+
+ true if ignored; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this is readable.
+
+ true if readable; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this is writable.
+
+ true if writable; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this has a member attribute.
+
+ true if has a member attribute; otherwise, false.
+
+
+
+ Gets the default value.
+
+ The default value.
+
+
+
+ Gets or sets a value indicating whether this is required.
+
+ A value indicating whether this is required.
+
+
+
+ Gets a value indicating whether has a value specified.
+
+
+
+
+ Gets or sets a value indicating whether this property preserves object references.
+
+
+ true if this instance is reference; otherwise, false.
+
+
+
+
+ Gets or sets the property null value handling.
+
+ The null value handling.
+
+
+
+ Gets or sets the property default value handling.
+
+ The default value handling.
+
+
+
+ Gets or sets the property reference loop handling.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the property object creation handling.
+
+ The object creation handling.
+
+
+
+ Gets or sets or sets the type name handling.
+
+ The type name handling.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be serialized.
+
+ A predicate used to determine whether the property should be serialized.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be deserialized.
+
+ A predicate used to determine whether the property should be deserialized.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be serialized.
+
+ A predicate used to determine whether the property should be serialized.
+
+
+
+ Gets or sets an action used to set whether the property has been deserialized.
+
+ An action used to set whether the property has been deserialized.
+
+
+
+ Returns a that represents this instance.
+
+
+ A that represents this instance.
+
+
+
+
+ Gets or sets the converter used when serializing the property's collection items.
+
+ The collection's items converter.
+
+
+
+ Gets or sets whether this property's collection items are serialized as a reference.
+
+ Whether this property's collection items are serialized as a reference.
+
+
+
+ Gets or sets the type name handling used when serializing the property's collection items.
+
+ The collection's items type name handling.
+
+
+
+ Gets or sets the reference loop handling used when serializing the property's collection items.
+
+ The collection's items reference loop handling.
+
+
+
+ A collection of objects.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The type.
+
+
+
+ When implemented in a derived class, extracts the key from the specified element.
+
+ The element from which to extract the key.
+ The key for the specified element.
+
+
+
+ Adds a object.
+
+ The property to add to the collection.
+
+
+
+ Gets the closest matching object.
+ First attempts to get an exact case match of and then
+ a case insensitive match.
+
+ Name of the property.
+ A matching property if found.
+
+
+
+ Gets a property by property name.
+
+ The name of the property to get.
+ Type property name string comparison.
+ A matching property if found.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Lookup and create an instance of the type described by the argument.
+
+ The type to create.
+ Optional arguments to pass to an initializing constructor of the JsonConverter.
+ If null, the default constructor is used.
+
+
+
+ A kebab case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Represents a trace writer that writes to memory. When the trace message limit is
+ reached then old trace messages will be removed as new messages are added.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Returns an enumeration of the most recent trace messages.
+
+ An enumeration of the most recent trace messages.
+
+
+
+ Returns a of the most recent trace messages.
+
+
+ A of the most recent trace messages.
+
+
+
+
+ A base class for resolving how property names and dictionary keys are serialized.
+
+
+
+
+ A flag indicating whether dictionary keys should be processed.
+ Defaults to false.
+
+
+
+
+ A flag indicating whether extension data names should be processed.
+ Defaults to false.
+
+
+
+
+ A flag indicating whether explicitly specified property names,
+ e.g. a property name customized with a , should be processed.
+ Defaults to false.
+
+
+
+
+ Gets the serialized name for a given property name.
+
+ The initial property name.
+ A flag indicating whether the property has had a name explicitly specified.
+ The serialized property name.
+
+
+
+ Gets the serialized name for a given extension data name.
+
+ The initial extension data name.
+ The serialized extension data name.
+
+
+
+ Gets the serialized key for a given dictionary key.
+
+ The initial dictionary key.
+ The serialized dictionary key.
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Hash code calculation
+
+
+
+
+
+ Object equality implementation
+
+
+
+
+
+
+ Compare to another NamingStrategy
+
+
+
+
+
+
+ Represents a method that constructs an object.
+
+ The object type to create.
+
+
+
+ When applied to a method, specifies that the method is called when an error occurs serializing an object.
+
+
+
+
+ Provides methods to get attributes from a , , or .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The instance to get attributes for. This parameter should be a , , or .
+
+
+
+ Returns a collection of all of the attributes, or an empty collection if there are no attributes.
+
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Returns a collection of attributes, identified by type, or an empty collection if there are no attributes.
+
+ The type of the attributes.
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Get and set values for a using reflection.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ A snake case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Specifies how strings are escaped when writing JSON text.
+
+
+
+
+ Only control characters (e.g. newline) are escaped.
+
+
+
+
+ All non-ASCII and control characters (e.g. newline) are escaped.
+
+
+
+
+ HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped.
+
+
+
+
+ Specifies what messages to output for the class.
+
+
+
+
+ Output no tracing and debugging messages.
+
+
+
+
+ Output error-handling messages.
+
+
+
+
+ Output warnings and error-handling messages.
+
+
+
+
+ Output informational messages, warnings, and error-handling messages.
+
+
+
+
+ Output all debugging and tracing messages.
+
+
+
+
+ Indicates the method that will be used during deserialization for locating and loading assemblies.
+
+
+
+
+ In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the LoadWithPartialName method of the class is used to load the assembly.
+
+
+
+
+ In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The Load method of the class is used to load the assembly.
+
+
+
+
+ Specifies type name handling options for the .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+
+
+
+ Do not include the .NET type name when serializing types.
+
+
+
+
+ Include the .NET type name when serializing into a JSON object structure.
+
+
+
+
+ Include the .NET type name when serializing into a JSON array structure.
+
+
+
+
+ Always include the .NET type name when serializing.
+
+
+
+
+ Include the .NET type name when the type of the object being serialized is not the same as its declared type.
+ Note that this doesn't include the root serialized object by default. To include the root object's type name in JSON
+ you must specify a root type object with
+ or .
+
+
+
+
+ Determines whether the collection is null or empty.
+
+ The collection.
+
+ true if the collection is null or empty; otherwise, false.
+
+
+
+
+ Adds the elements of the specified collection to the specified generic .
+
+ The list to add to.
+ The collection of elements to add.
+
+
+
+ Converts the value to the specified type. If the value is unable to be converted, the
+ value is checked whether it assignable to the specified type.
+
+ The value to convert.
+ The culture to use when converting.
+ The type to convert or cast the value to.
+
+ The converted type. If conversion was unsuccessful, the initial value
+ is returned if assignable to the target type.
+
+
+
+
+ Helper method for generating a MetaObject which calls a
+ specific method on Dynamic that returns a result
+
+
+
+
+ Helper method for generating a MetaObject which calls a
+ specific method on Dynamic, but uses one of the arguments for
+ the result.
+
+
+
+
+ Helper method for generating a MetaObject which calls a
+ specific method on Dynamic, but uses one of the arguments for
+ the result.
+
+
+
+
+ Returns a Restrictions object which includes our current restrictions merged
+ with a restriction limiting our type
+
+
+
+
+ Helper class for serializing immutable collections.
+ Note that this is used by all builds, even those that don't support immutable collections, in case the DLL is GACed
+ https://github.com/JamesNK/Newtonsoft.Json/issues/652
+
+
+
+
+ List of primitive types which can be widened.
+
+
+
+
+ Widening masks for primitive types above.
+ Index of the value in this array defines a type we're widening,
+ while the bits in mask define types it can be widened to (including itself).
+
+ For example, value at index 0 defines a bool type, and it only has bit 0 set,
+ i.e. bool values can be assigned only to bool.
+
+
+
+
+ Checks if value of primitive type can be
+ assigned to parameter of primitive type .
+
+ Source primitive type.
+ Target primitive type.
+ true if source type can be widened to target type, false otherwise.
+
+
+
+ Checks if a set of values with given can be used
+ to invoke a method with specified .
+
+ Method parameters.
+ Argument types.
+ Try to pack extra arguments into the last parameter when it is marked up with .
+ true if method can be called with given arguments, false otherwise.
+
+
+
+ Compares two sets of parameters to determine
+ which one suits better for given argument types.
+
+
+
+
+ Returns a best method overload for given argument .
+
+ List of method candidates.
+ Argument types.
+ Best method overload, or null if none matched.
+
+
+
+ Gets the type of the typed collection's items.
+
+ The type.
+ The type of the typed collection's items.
+
+
+
+ Gets the member's underlying type.
+
+ The member.
+ The underlying type of the member.
+
+
+
+ Determines whether the property is an indexed property.
+
+ The property.
+
+ true if the property is an indexed property; otherwise, false.
+
+
+
+
+ Gets the member's value on the object.
+
+ The member.
+ The target object.
+ The member's value on the object.
+
+
+
+ Sets the member's value on the target object.
+
+ The member.
+ The target.
+ The value.
+
+
+
+ Determines whether the specified MemberInfo can be read.
+
+ The MemberInfo to determine whether can be read.
+ /// if set to true then allow the member to be gotten non-publicly.
+
+ true if the specified MemberInfo can be read; otherwise, false.
+
+
+
+
+ Determines whether the specified MemberInfo can be set.
+
+ The MemberInfo to determine whether can be set.
+ if set to true then allow the member to be set non-publicly.
+ if set to true then allow the member to be set if read-only.
+
+ true if the specified MemberInfo can be set; otherwise, false.
+
+
+
+
+ Builds a string. Unlike this class lets you reuse its internal buffer.
+
+
+
+
+ Determines whether the string is all white space. Empty string will return false.
+
+ The string to test whether it is all white space.
+
+ true if the string is all white space; otherwise, false.
+
+
+
+
+ Specifies the state of the .
+
+
+
+
+ An exception has been thrown, which has left the in an invalid state.
+ You may call the method to put the in the Closed state.
+ Any other method calls result in an being thrown.
+
+
+
+
+ The method has been called.
+
+
+
+
+ An object is being written.
+
+
+
+
+ An array is being written.
+
+
+
+
+ A constructor is being written.
+
+
+
+
+ A property is being written.
+
+
+
+
+ A write method has not been called.
+
+
+
+
+ Indicates the method that will be used during deserialization for locating and loading assemblies.
+
+
+
+
+ In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the method is used to load the assembly.
+
+
+
+
+ In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The is used to load the assembly.
+
+
+
+ Specifies that an output will not be null even if the corresponding type allows it.
+
+
+ Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it.
+
+
+ Initializes the attribute with the specified return value condition.
+
+ The return value condition. If the method returns this value, the associated parameter will not be null.
+
+
+
+ Gets the return value condition.
+
+
+ Specifies that an output may be null even if the corresponding type disallows it.
+
+
+ Specifies that null is allowed as an input even if the corresponding type disallows it.
+
+
+
+ Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
+ the associated parameter matches this value.
+
+
+
+ Gets the condition parameter value.
+
+
+
diff --git a/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.3/Newtonsoft.Json.dll b/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.3/Newtonsoft.Json.dll
new file mode 100644
index 00000000..9244d0a2
Binary files /dev/null and b/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.3/Newtonsoft.Json.dll differ
diff --git a/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.3/Newtonsoft.Json.xml b/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.3/Newtonsoft.Json.xml
new file mode 100644
index 00000000..5da7f401
--- /dev/null
+++ b/packages/Newtonsoft.Json.12.0.3/lib/netstandard1.3/Newtonsoft.Json.xml
@@ -0,0 +1,11072 @@
+
+
+
+ Newtonsoft.Json
+
+
+
+
+ Represents a BSON Oid (object id).
+
+
+
+
+ Gets or sets the value of the Oid.
+
+ The value of the Oid.
+
+
+
+ Initializes a new instance of the class.
+
+ The Oid value.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized BSON data.
+
+
+
+
+ Gets or sets a value indicating whether binary data reading should be compatible with incorrect Json.NET 3.5 written binary.
+
+
+ true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether the root object will be read as a JSON array.
+
+
+ true if the root object will be read as a JSON array; otherwise, false.
+
+
+
+
+ Gets or sets the used when reading values from BSON.
+
+ The used when reading values from BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+ if set to true the root object will be read as a JSON array.
+ The used when reading values from BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+ if set to true the root object will be read as a JSON array.
+ The used when reading values from BSON.
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating BSON data.
+
+
+
+
+ Gets or sets the used when writing values to BSON.
+ When set to no conversion will occur.
+
+ The used when writing values to BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The to write to.
+
+
+
+ Initializes a new instance of the class.
+
+ The to write to.
+
+
+
+ Flushes whatever is in the buffer to the underlying and also flushes the underlying stream.
+
+
+
+
+ Writes the end.
+
+ The token.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Closes this writer.
+ If is set to true, the underlying is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value that represents a BSON object id.
+
+ The Object ID value to write.
+
+
+
+ Writes a BSON regex.
+
+ The regex pattern.
+ The regex options.
+
+
+
+ Specifies how constructors are used when initializing objects during deserialization by the .
+
+
+
+
+ First attempt to use the public default constructor, then fall back to a single parameterized constructor, then to the non-public default constructor.
+
+
+
+
+ Json.NET will use a non-public default constructor before falling back to a parameterized constructor.
+
+
+
+
+ Converts a binary value to and from a base 64 string value.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON and BSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Creates a custom object.
+
+ The object type to convert.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Creates an object which will then be populated by the serializer.
+
+ Type of the object.
+ The created object.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+
+ true if this can write JSON; otherwise, false.
+
+
+
+
+ Provides a base class for converting a to and from JSON.
+
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a F# discriminated union type to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+
+ true if this can write JSON; otherwise, false.
+
+
+
+
+ Converts a to and from the ISO 8601 date format (e.g. "2008-04-12T12:53Z").
+
+
+
+
+ Gets or sets the date time styles used when converting a date to and from JSON.
+
+ The date time styles used when converting a date to and from JSON.
+
+
+
+ Gets or sets the date time format used when converting a date to and from JSON.
+
+ The date time format used when converting a date to and from JSON.
+
+
+
+ Gets or sets the culture used when converting a date to and from JSON.
+
+ The culture used when converting a date to and from JSON.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from a JavaScript Date constructor (e.g. new Date(52231943)).
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON and BSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an to and from its name string value.
+
+
+
+
+ Gets or sets a value indicating whether the written enum text should be camel case.
+ The default value is false.
+
+ true if the written enum text will be camel case; otherwise, false.
+
+
+
+ Gets or sets the naming strategy used to resolve how enum text is written.
+
+ The naming strategy used to resolve how enum text is written.
+
+
+
+ Gets or sets a value indicating whether integer values are allowed when serializing and deserializing.
+ The default value is true.
+
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ true if the written enum text will be camel case; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The naming strategy used to resolve how enum text is written.
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from Unix epoch time
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from a string (e.g. "1.2.3.4").
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts XML to and from JSON.
+
+
+
+
+ Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produced multiple root elements.
+
+ The name of the deserialized root element.
+
+
+
+ Gets or sets a value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ true if the array attribute is written to the XML; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether to write the root JSON object.
+
+ true if the JSON root object is omitted; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ true if special characters are encoded; otherwise, false.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The calling serializer.
+ The value.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Checks if the is a namespace attribute.
+
+ Attribute name to test.
+ The attribute name prefix if it has one, otherwise an empty string.
+ true if attribute name is for a namespace attribute, otherwise false.
+
+
+
+ Determines whether this instance can convert the specified value type.
+
+ Type of the value.
+
+ true if this instance can convert the specified value type; otherwise, false.
+
+
+
+
+ Specifies how dates are formatted when writing JSON text.
+
+
+
+
+ Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z".
+
+
+
+
+ Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/".
+
+
+
+
+ Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text.
+
+
+
+
+ Date formatted strings are not parsed to a date type and are read as strings.
+
+
+
+
+ Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to .
+
+
+
+
+ Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to .
+
+
+
+
+ Specifies how to treat the time value when converting between string and .
+
+
+
+
+ Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time.
+
+
+
+
+ Treat as a UTC. If the object represents a local time, it is converted to a UTC.
+
+
+
+
+ Treat as a local time if a is being converted to a string.
+ If a string is being converted to , convert to a local time if a time zone is specified.
+
+
+
+
+ Time zone information should be preserved when converting.
+
+
+
+
+ The default JSON name table implementation.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets a string containing the same characters as the specified range of characters in the given array.
+
+ The character array containing the name to find.
+ The zero-based index into the array specifying the first character of the name.
+ The number of characters in the name.
+ A string containing the same characters as the specified range of characters in the given array.
+
+
+
+ Adds the specified string into name table.
+
+ The string to add.
+ This method is not thread-safe.
+ The resolved string.
+
+
+
+ Specifies default value handling options for the .
+
+
+
+
+
+
+
+
+ Include members where the member value is the same as the member's default value when serializing objects.
+ Included members are written to JSON. Has no effect when deserializing.
+
+
+
+
+ Ignore members where the member value is the same as the member's default value when serializing objects
+ so that it is not written to JSON.
+ This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers,
+ decimals and floating point numbers; and false for booleans). The default value ignored can be changed by
+ placing the on the property.
+
+
+
+
+ Members with a default value but no JSON will be set to their default value when deserializing.
+
+
+
+
+ Ignore members where the member value is the same as the member's default value when serializing objects
+ and set members to their default value when deserializing.
+
+
+
+
+ Specifies float format handling options when writing special floating point numbers, e.g. ,
+ and with .
+
+
+
+
+ Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity".
+
+
+
+
+ Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity.
+ Note that this will produce non-valid JSON.
+
+
+
+
+ Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a of property.
+
+
+
+
+ Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+
+
+
+
+ Floating point numbers are parsed to .
+
+
+
+
+ Floating point numbers are parsed to .
+
+
+
+
+ Specifies formatting options for the .
+
+
+
+
+ No special formatting is applied. This is the default.
+
+
+
+
+ Causes child objects to be indented according to the and settings.
+
+
+
+
+ Provides an interface for using pooled arrays.
+
+ The array type content.
+
+
+
+ Rent an array from the pool. This array must be returned when it is no longer needed.
+
+ The minimum required length of the array. The returned array may be longer.
+ The rented array from the pool. This array must be returned when it is no longer needed.
+
+
+
+ Return an array to the pool.
+
+ The array that is being returned.
+
+
+
+ Provides an interface to enable a class to return line and position information.
+
+
+
+
+ Gets a value indicating whether the class can return line information.
+
+
+ true if and can be provided; otherwise, false.
+
+
+
+
+ Gets the current line number.
+
+ The current line number or 0 if no line information is available (for example, when returns false).
+
+
+
+ Gets the current line position.
+
+ The current line position or 0 if no line information is available (for example, when returns false).
+
+
+
+ Instructs the how to serialize the collection.
+
+
+
+
+ Gets or sets a value indicating whether null items are allowed in the collection.
+
+ true if null items are allowed in the collection; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with a flag indicating whether the array can contain null items.
+
+ A flag indicating whether the array can contain null items.
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Instructs the to use the specified constructor when deserializing that object.
+
+
+
+
+ Instructs the how to serialize the object.
+
+
+
+
+ Gets or sets the id.
+
+ The id.
+
+
+
+ Gets or sets the title.
+
+ The title.
+
+
+
+ Gets or sets the description.
+
+ The description.
+
+
+
+ Gets or sets the collection's items converter.
+
+ The collection's items converter.
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonContainer(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets a value that indicates whether to preserve object references.
+
+
+ true to keep object reference; otherwise, false. The default is false.
+
+
+
+
+ Gets or sets a value that indicates whether to preserve collection's items references.
+
+
+ true to keep collection's items object references; otherwise, false. The default is false.
+
+
+
+
+ Gets or sets the reference loop handling used when serializing the collection's items.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the type name handling used when serializing the collection's items.
+
+ The type name handling.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Provides methods for converting between .NET types and JSON types.
+
+
+
+
+
+
+
+ Gets or sets a function that creates default .
+ Default settings are automatically used by serialization methods on ,
+ and and on .
+ To serialize without using any default settings create a with
+ .
+
+
+
+
+ Represents JavaScript's boolean value true as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's boolean value false as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's null as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's undefined as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's positive infinity as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's negative infinity as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's NaN as a string. This field is read-only.
+
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation using the specified.
+
+ The value to convert.
+ The format the date will be converted to.
+ The time zone handling when the date is converted to a string.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation using the specified.
+
+ The value to convert.
+ The format the date will be converted to.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ The string delimiter character.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ The string delimiter character.
+ The string escape handling.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Serializes the specified object to a JSON string.
+
+ The object to serialize.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using formatting.
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a collection of .
+
+ The object to serialize.
+ A collection of converters used while serializing.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using formatting and a collection of .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ A collection of converters used while serializing.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using .
+
+ The object to serialize.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a type, formatting and .
+
+ The object to serialize.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using formatting and .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a type, formatting and .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+ A JSON string representation of the object.
+
+
+
+
+ Deserializes the JSON to a .NET object.
+
+ The JSON to deserialize.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to a .NET object using .
+
+ The JSON to deserialize.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type.
+
+ The JSON to deserialize.
+ The of object being deserialized.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type.
+
+ The type of the object to deserialize to.
+ The JSON to deserialize.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the given anonymous type.
+
+
+ The anonymous type to deserialize to. This can't be specified
+ traditionally and must be inferred from the anonymous type passed
+ as a parameter.
+
+ The JSON to deserialize.
+ The anonymous type object.
+ The deserialized anonymous type from the JSON string.
+
+
+
+ Deserializes the JSON to the given anonymous type using .
+
+
+ The anonymous type to deserialize to. This can't be specified
+ traditionally and must be inferred from the anonymous type passed
+ as a parameter.
+
+ The JSON to deserialize.
+ The anonymous type object.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized anonymous type from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using a collection of .
+
+ The type of the object to deserialize to.
+ The JSON to deserialize.
+ Converters to use while deserializing.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using .
+
+ The type of the object to deserialize to.
+ The object to deserialize.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using a collection of .
+
+ The JSON to deserialize.
+ The type of the object to deserialize.
+ Converters to use while deserializing.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using .
+
+ The JSON to deserialize.
+ The type of the object to deserialize to.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Populates the object with values from the JSON string.
+
+ The JSON to populate values from.
+ The target object to populate values onto.
+
+
+
+ Populates the object with values from the JSON string using .
+
+ The JSON to populate values from.
+ The target object to populate values onto.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+
+
+
+ Serializes the to a JSON string.
+
+ The node to serialize.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting and omits the root object if is true.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ Omits writing the root object.
+ A JSON string of the .
+
+
+
+ Deserializes the from a JSON string.
+
+ The JSON string.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by .
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by
+ and writes a Json.NET array attribute for collections.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by ,
+ writes a Json.NET array attribute for collections, and encodes special characters.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+
+ A value to indicate whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ The deserialized .
+
+
+
+ Serializes the to a JSON string.
+
+ The node to convert to JSON.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting.
+
+ The node to convert to JSON.
+ Indicates how the output should be formatted.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting and omits the root object if is true.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ Omits writing the root object.
+ A JSON string of the .
+
+
+
+ Deserializes the from a JSON string.
+
+ The JSON string.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by .
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by
+ and writes a Json.NET array attribute for collections.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by ,
+ writes a Json.NET array attribute for collections, and encodes special characters.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+
+ A value to indicate whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ The deserialized .
+
+
+
+ Converts an object to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can read JSON.
+
+ true if this can read JSON; otherwise, false.
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+ true if this can write JSON; otherwise, false.
+
+
+
+ Converts an object to and from JSON.
+
+ The object type to convert.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read. If there is no existing value then null will be used.
+ The existing value has a value.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Instructs the to use the specified when serializing the member or class.
+
+
+
+
+ Gets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+
+
+
+
+ Initializes a new instance of the class.
+
+ Type of the .
+
+
+
+ Initializes a new instance of the class.
+
+ Type of the .
+ Parameter list to use when constructing the . Can be null.
+
+
+
+ Represents a collection of .
+
+
+
+
+ Instructs the how to serialize the collection.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ The exception thrown when an error occurs during JSON serialization or deserialization.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Instructs the to deserialize properties with no matching class member into the specified collection
+ and write values during serialization.
+
+
+
+
+ Gets or sets a value that indicates whether to write extension data when serializing the object.
+
+
+ true to write extension data when serializing the object; otherwise, false. The default is true.
+
+
+
+
+ Gets or sets a value that indicates whether to read extension data when deserializing the object.
+
+
+ true to read extension data when deserializing the object; otherwise, false. The default is true.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Instructs the not to serialize the public field or public read/write property value.
+
+
+
+
+ Base class for a table of atomized string objects.
+
+
+
+
+ Gets a string containing the same characters as the specified range of characters in the given array.
+
+ The character array containing the name to find.
+ The zero-based index into the array specifying the first character of the name.
+ The number of characters in the name.
+ A string containing the same characters as the specified range of characters in the given array.
+
+
+
+ Instructs the how to serialize the object.
+
+
+
+
+ Gets or sets the member serialization.
+
+ The member serialization.
+
+
+
+ Gets or sets the missing member handling used when deserializing this object.
+
+ The missing member handling.
+
+
+
+ Gets or sets how the object's properties with null values are handled during serialization and deserialization.
+
+ How the object's properties with null values are handled during serialization and deserialization.
+
+
+
+ Gets or sets a value that indicates whether the object's properties are required.
+
+
+ A value indicating whether the object's properties are required.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified member serialization.
+
+ The member serialization.
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Instructs the to always serialize the member with the specified name.
+
+
+
+
+ Gets or sets the type used when serializing the property's collection items.
+
+ The collection's items type.
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonProperty(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the null value handling used when serializing this property.
+
+ The null value handling.
+
+
+
+ Gets or sets the default value handling used when serializing this property.
+
+ The default value handling.
+
+
+
+ Gets or sets the reference loop handling used when serializing this property.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the object creation handling used when deserializing this property.
+
+ The object creation handling.
+
+
+
+ Gets or sets the type name handling used when serializing this property.
+
+ The type name handling.
+
+
+
+ Gets or sets whether this property's value is serialized as a reference.
+
+ Whether this property's value is serialized as a reference.
+
+
+
+ Gets or sets the order of serialization of a member.
+
+ The numeric order of serialization.
+
+
+
+ Gets or sets a value indicating whether this property is required.
+
+
+ A value indicating whether this property is required.
+
+
+
+
+ Gets or sets the name of the property.
+
+ The name of the property.
+
+
+
+ Gets or sets the reference loop handling used when serializing the property's collection items.
+
+ The collection's items reference loop handling.
+
+
+
+ Gets or sets the type name handling used when serializing the property's collection items.
+
+ The collection's items type name handling.
+
+
+
+ Gets or sets whether this property's collection items are serialized as a reference.
+
+ Whether this property's collection items are serialized as a reference.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ Name of the property.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
+
+
+
+
+ Asynchronously reads the next JSON token from the source.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns true if the next token was read successfully; false if there are no more tokens to read.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously skips the children of the current token.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a [].
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the []. This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Specifies the state of the reader.
+
+
+
+
+ A read method has not been called.
+
+
+
+
+ The end of the file has been reached successfully.
+
+
+
+
+ Reader is at a property.
+
+
+
+
+ Reader is at the start of an object.
+
+
+
+
+ Reader is in an object.
+
+
+
+
+ Reader is at the start of an array.
+
+
+
+
+ Reader is in an array.
+
+
+
+
+ The method has been called.
+
+
+
+
+ Reader has just read a value.
+
+
+
+
+ Reader is at the start of a constructor.
+
+
+
+
+ Reader is in a constructor.
+
+
+
+
+ An error occurred that prevents the read operation from continuing.
+
+
+
+
+ The end of the file has been reached successfully.
+
+
+
+
+ Gets the current reader state.
+
+ The current reader state.
+
+
+
+ Gets or sets a value indicating whether the source should be closed when this reader is closed.
+
+
+ true to close the source when this reader is closed; otherwise false. The default is true.
+
+
+
+
+ Gets or sets a value indicating whether multiple pieces of JSON content can
+ be read from a continuous stream without erroring.
+
+
+ true to support reading multiple pieces of JSON content; otherwise false.
+ The default is false.
+
+
+
+
+ Gets the quotation mark character used to enclose the value of a string.
+
+
+
+
+ Gets or sets how time zones are handled when reading JSON.
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+
+
+
+
+ Gets or sets how custom date formatted strings are parsed when reading JSON.
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+
+
+
+
+ Gets the type of the current JSON token.
+
+
+
+
+ Gets the text value of the current JSON token.
+
+
+
+
+ Gets the .NET type for the current JSON token.
+
+
+
+
+ Gets the depth of the current token in the JSON document.
+
+ The depth of the current token in the JSON document.
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Gets or sets the culture used when reading JSON. Defaults to .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads the next JSON token from the source.
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a [].
+
+ A [] or null if the next JSON token is null. This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Skips the children of the current token.
+
+
+
+
+ Sets the current token.
+
+ The new token.
+
+
+
+ Sets the current token and value.
+
+ The new token.
+ The value.
+
+
+
+ Sets the current token and value.
+
+ The new token.
+ The value.
+ A flag indicating whether the position index inside an array should be updated.
+
+
+
+ Sets the state based on current token type.
+
+
+
+
+ Releases unmanaged and - optionally - managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the source is also closed.
+
+
+
+
+ The exception thrown when an error occurs while reading JSON text.
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The line number indicating where the error occurred.
+ The line position indicating where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Instructs the to always serialize the member, and to require that the member has a value.
+
+
+
+
+ The exception thrown when an error occurs during JSON serialization or deserialization.
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The line number indicating where the error occurred.
+ The line position indicating where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Serializes and deserializes objects into and from the JSON format.
+ The enables you to control how objects are encoded into JSON.
+
+
+
+
+ Occurs when the errors during serialization and deserialization.
+
+
+
+
+ Gets or sets the used by the serializer when resolving references.
+
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+
+
+
+ Gets or sets the used by the serializer when writing trace messages.
+
+ The trace writer.
+
+
+
+ Gets or sets the equality comparer used by the serializer when comparing references.
+
+ The equality comparer.
+
+
+
+ Gets or sets how type name writing and reading is handled by the serializer.
+ The default value is .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how object references are preserved by the serializer.
+ The default value is .
+
+
+
+
+ Gets or sets how reference loops (e.g. a class referencing itself) is handled.
+ The default value is .
+
+
+
+
+ Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how null values are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how default values are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how objects are created during deserialization.
+ The default value is .
+
+ The object creation handling.
+
+
+
+ Gets or sets how constructors are used during deserialization.
+ The default value is .
+
+ The constructor handling.
+
+
+
+ Gets or sets how metadata properties are used during deserialization.
+ The default value is .
+
+ The metadata properties handling.
+
+
+
+ Gets a collection that will be used during serialization.
+
+ Collection that will be used during serialization.
+
+
+
+ Gets or sets the contract resolver used by the serializer when
+ serializing .NET objects to JSON and vice versa.
+
+
+
+
+ Gets or sets the used by the serializer when invoking serialization callback methods.
+
+ The context.
+
+
+
+ Indicates how JSON text output is formatted.
+ The default value is .
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how time zones are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written as JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how and values are formatted when writing JSON text,
+ and the expected date format when reading JSON text.
+ The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
+
+
+
+
+ Gets or sets the culture used when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+ A null value means there is no maximum.
+ The default value is null.
+
+
+
+
+ Gets a value indicating whether there will be a check for additional JSON content after deserializing an object.
+ The default value is false.
+
+
+ true if there will be a check for additional JSON content after deserializing an object; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Creates a new instance.
+ The will not use default settings
+ from .
+
+
+ A new instance.
+ The will not use default settings
+ from .
+
+
+
+
+ Creates a new instance using the specified .
+ The will not use default settings
+ from .
+
+ The settings to be applied to the .
+
+ A new instance using the specified .
+ The will not use default settings
+ from .
+
+
+
+
+ Creates a new instance.
+ The will use default settings
+ from .
+
+
+ A new instance.
+ The will use default settings
+ from .
+
+
+
+
+ Creates a new instance using the specified .
+ The will use default settings
+ from as well as the specified .
+
+ The settings to be applied to the .
+
+ A new instance using the specified .
+ The will use default settings
+ from as well as the specified .
+
+
+
+
+ Populates the JSON values onto the target object.
+
+ The that contains the JSON structure to read values from.
+ The target object to populate values onto.
+
+
+
+ Populates the JSON values onto the target object.
+
+ The that contains the JSON structure to read values from.
+ The target object to populate values onto.
+
+
+
+ Deserializes the JSON structure contained by the specified .
+
+ The that contains the JSON structure to deserialize.
+ The being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The of object being deserialized.
+ The instance of being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The type of the object to deserialize.
+ The instance of being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The of object being deserialized.
+ The instance of being deserialized.
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+ The type of the value being serialized.
+ This parameter is used when is Auto to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+
+
+ Specifies the settings on a object.
+
+
+
+
+ Gets or sets how reference loops (e.g. a class referencing itself) are handled.
+ The default value is .
+
+ Reference loop handling.
+
+
+
+ Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
+ The default value is .
+
+ Missing member handling.
+
+
+
+ Gets or sets how objects are created during deserialization.
+ The default value is .
+
+ The object creation handling.
+
+
+
+ Gets or sets how null values are handled during serialization and deserialization.
+ The default value is .
+
+ Null value handling.
+
+
+
+ Gets or sets how default values are handled during serialization and deserialization.
+ The default value is .
+
+ The default value handling.
+
+
+
+ Gets or sets a collection that will be used during serialization.
+
+ The converters.
+
+
+
+ Gets or sets how object references are preserved by the serializer.
+ The default value is .
+
+ The preserve references handling.
+
+
+
+ Gets or sets how type name writing and reading is handled by the serializer.
+ The default value is .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+ The type name handling.
+
+
+
+ Gets or sets how metadata properties are used during deserialization.
+ The default value is .
+
+ The metadata properties handling.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how constructors are used during deserialization.
+ The default value is .
+
+ The constructor handling.
+
+
+
+ Gets or sets the contract resolver used by the serializer when
+ serializing .NET objects to JSON and vice versa.
+
+ The contract resolver.
+
+
+
+ Gets or sets the equality comparer used by the serializer when comparing references.
+
+ The equality comparer.
+
+
+
+ Gets or sets the used by the serializer when resolving references.
+
+ The reference resolver.
+
+
+
+ Gets or sets a function that creates the used by the serializer when resolving references.
+
+ A function that creates the used by the serializer when resolving references.
+
+
+
+ Gets or sets the used by the serializer when writing trace messages.
+
+ The trace writer.
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+ The binder.
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+ The binder.
+
+
+
+ Gets or sets the error handler called during serialization and deserialization.
+
+ The error handler called during serialization and deserialization.
+
+
+
+ Gets or sets the used by the serializer when invoking serialization callback methods.
+
+ The context.
+
+
+
+ Gets or sets how and values are formatted when writing JSON text,
+ and the expected date format when reading JSON text.
+ The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+ A null value means there is no maximum.
+ The default value is null.
+
+
+
+
+ Indicates how JSON text output is formatted.
+ The default value is .
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how time zones are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written as JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets the culture used when reading JSON.
+ The default value is .
+
+
+
+
+ Gets a value indicating whether there will be a check for additional content after deserializing an object.
+ The default value is false.
+
+
+ true if there will be a check for additional content after deserializing an object; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to JSON text data.
+
+
+
+
+ Asynchronously reads the next JSON token from the source.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns true if the next token was read successfully; false if there are no more tokens to read.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a [].
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the []. This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Initializes a new instance of the class with the specified .
+
+ The containing the JSON data to read.
+
+
+
+ Gets or sets the reader's property name table.
+
+
+
+
+ Gets or sets the reader's character buffer pool.
+
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a [].
+
+ A [] or null if the next JSON token is null. This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Gets a value indicating whether the class can return line information.
+
+
+ true if and can be provided; otherwise, false.
+
+
+
+
+ Gets the current line number.
+
+
+ The current line number or 0 if no line information is available (for example, returns false).
+
+
+
+
+ Gets the current line position.
+
+
+ The current line position or 0 if no line information is available (for example, returns false).
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the JSON value delimiter.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the specified end token.
+
+ The end token to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously closes this writer.
+ If is set to true, the destination is also closed.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of the current JSON object or array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes indent characters.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes an indent space.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a null value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the beginning of a JSON array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the beginning of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the start of a constructor with the given name.
+
+ The name of the constructor.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes an undefined value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the given white space.
+
+ The string of white space characters.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a [] value.
+
+ The [] value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of an array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of a constructor.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Gets or sets the writer's character array pool.
+
+
+
+
+ Gets or sets how many s to write for each level in the hierarchy when is set to .
+
+
+
+
+ Gets or sets which character to use to quote attribute values.
+
+
+
+
+ Gets or sets which character to use for indenting when is set to .
+
+
+
+
+ Gets or sets a value indicating whether object names will be surrounded with quotes.
+
+
+
+
+ Initializes a new instance of the class using the specified .
+
+ The to write to.
+
+
+
+ Flushes whatever is in the buffer to the underlying and also flushes the underlying .
+
+
+
+
+ Closes this writer.
+ If is set to true, the underlying is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the specified end token.
+
+ The end token to write.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+
+
+
+ Writes indent characters.
+
+
+
+
+ Writes the JSON value delimiter.
+
+
+
+
+ Writes an indent space.
+
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the given white space.
+
+ The string of white space characters.
+
+
+
+ Specifies the type of JSON token.
+
+
+
+
+ This is returned by the if a read method has not been called.
+
+
+
+
+ An object start token.
+
+
+
+
+ An array start token.
+
+
+
+
+ A constructor start token.
+
+
+
+
+ An object property name.
+
+
+
+
+ A comment.
+
+
+
+
+ Raw JSON.
+
+
+
+
+ An integer.
+
+
+
+
+ A float.
+
+
+
+
+ A string.
+
+
+
+
+ A boolean.
+
+
+
+
+ A null token.
+
+
+
+
+ An undefined token.
+
+
+
+
+ An object end token.
+
+
+
+
+ An array end token.
+
+
+
+
+ A constructor end token.
+
+
+
+
+ A Date.
+
+
+
+
+ Byte data.
+
+
+
+
+
+ Represents a reader that provides validation.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Sets an event handler for receiving schema validation errors.
+
+
+
+
+ Gets the text value of the current JSON token.
+
+
+
+
+
+ Gets the depth of the current token in the JSON document.
+
+ The depth of the current token in the JSON document.
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Gets the quotation mark character used to enclose the value of a string.
+
+
+
+
+
+ Gets the type of the current JSON token.
+
+
+
+
+
+ Gets the .NET type for the current JSON token.
+
+
+
+
+
+ Initializes a new instance of the class that
+ validates the content returned from the given .
+
+ The to read from while validating.
+
+
+
+ Gets or sets the schema.
+
+ The schema.
+
+
+
+ Gets the used to construct this .
+
+ The specified in the constructor.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a [].
+
+
+ A [] or null if the next JSON token is null.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Asynchronously closes this writer.
+ If is set to true, the destination is also closed.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the specified end token.
+
+ The end token to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes indent characters.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the JSON value delimiter.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes an indent space.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of the current JSON object or array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of an array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of a constructor.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a null value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the beginning of a JSON array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the start of a constructor with the given name.
+
+ The name of the constructor.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the beginning of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the current token.
+
+ The to read the token from.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the current token.
+
+ The to read the token from.
+ A flag indicating whether the current token's children should be written.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the token and its value.
+
+ The to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the token and its value.
+
+ The to write.
+
+ The value to write.
+ A value is only required for tokens that have an associated value, e.g. the property name for .
+ null can be passed to the method for tokens that don't have a value, e.g. .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a [] value.
+
+ The [] value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes an undefined value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the given white space.
+
+ The string of white space characters.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously ets the state of the .
+
+ The being written.
+ The value being written.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Gets or sets a value indicating whether the destination should be closed when this writer is closed.
+
+
+ true to close the destination when this writer is closed; otherwise false. The default is true.
+
+
+
+
+ Gets or sets a value indicating whether the JSON should be auto-completed when this writer is closed.
+
+
+ true to auto-complete the JSON when this writer is closed; otherwise false. The default is true.
+
+
+
+
+ Gets the top.
+
+ The top.
+
+
+
+ Gets the state of the writer.
+
+
+
+
+ Gets the path of the writer.
+
+
+
+
+ Gets or sets a value indicating how JSON text output should be formatted.
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+
+
+
+
+ Gets or sets how time zones are handled when writing JSON text.
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written to JSON text.
+
+
+
+
+ Gets or sets how and values are formatted when writing JSON text.
+
+
+
+
+ Gets or sets the culture used when writing JSON. Defaults to .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Flushes whatever is in the buffer to the destination and also flushes the destination.
+
+
+
+
+ Closes this writer.
+ If is set to true, the destination is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the end of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the end of an array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the end constructor.
+
+
+
+
+ Writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+
+
+
+ Writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+
+
+
+ Writes the end of the current JSON object or array.
+
+
+
+
+ Writes the current token and its children.
+
+ The to read the token from.
+
+
+
+ Writes the current token.
+
+ The to read the token from.
+ A flag indicating whether the current token's children should be written.
+
+
+
+ Writes the token and its value.
+
+ The to write.
+
+ The value to write.
+ A value is only required for tokens that have an associated value, e.g. the property name for .
+ null can be passed to the method for tokens that don't have a value, e.g. .
+
+
+
+
+ Writes the token.
+
+ The to write.
+
+
+
+ Writes the specified end token.
+
+ The end token to write.
+
+
+
+ Writes indent characters.
+
+
+
+
+ Writes the JSON value delimiter.
+
+
+
+
+ Writes an indent space.
+
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the given white space.
+
+ The string of white space characters.
+
+
+
+ Releases unmanaged and - optionally - managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Sets the state of the .
+
+ The being written.
+ The value being written.
+
+
+
+ The exception thrown when an error occurs while writing JSON text.
+
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Specifies how JSON comments are handled when loading JSON.
+
+
+
+
+ Ignore comments.
+
+
+
+
+ Load comments as a with type .
+
+
+
+
+ Specifies how duplicate property names are handled when loading JSON.
+
+
+
+
+ Replace the existing value when there is a duplicate property. The value of the last property in the JSON object will be used.
+
+
+
+
+ Ignore the new value when there is a duplicate property. The value of the first property in the JSON object will be used.
+
+
+
+
+ Throw a when a duplicate property is encountered.
+
+
+
+
+ Contains the LINQ to JSON extension methods.
+
+
+
+
+ Returns a collection of tokens that contains the ancestors of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains the ancestors of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains every token in the source collection, the ancestors of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains the descendants of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains the descendants of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains every token in the source collection, and the descendants of every token in the source collection.
+
+
+
+ Returns a collection of child properties of every object in the source collection.
+
+ An of that contains the source collection.
+ An of that contains the properties of every object in the source collection.
+
+
+
+ Returns a collection of child values of every object in the source collection with the given key.
+
+ An of that contains the source collection.
+ The token key.
+ An of that contains the values of every token in the source collection with the given key.
+
+
+
+ Returns a collection of child values of every object in the source collection.
+
+ An of that contains the source collection.
+ An of that contains the values of every token in the source collection.
+
+
+
+ Returns a collection of converted child values of every object in the source collection with the given key.
+
+ The type to convert the values to.
+ An of that contains the source collection.
+ The token key.
+ An that contains the converted values of every token in the source collection with the given key.
+
+
+
+ Returns a collection of converted child values of every object in the source collection.
+
+ The type to convert the values to.
+ An of that contains the source collection.
+ An that contains the converted values of every token in the source collection.
+
+
+
+ Converts the value.
+
+ The type to convert the value to.
+ A cast as a of .
+ A converted value.
+
+
+
+ Converts the value.
+
+ The source collection type.
+ The type to convert the value to.
+ A cast as a of .
+ A converted value.
+
+
+
+ Returns a collection of child tokens of every array in the source collection.
+
+ The source collection type.
+ An of that contains the source collection.
+ An of that contains the values of every token in the source collection.
+
+
+
+ Returns a collection of converted child tokens of every array in the source collection.
+
+ An of that contains the source collection.
+ The type to convert the values to.
+ The source collection type.
+ An that contains the converted values of every token in the source collection.
+
+
+
+ Returns the input typed as .
+
+ An of that contains the source collection.
+ The input typed as .
+
+
+
+ Returns the input typed as .
+
+ The source collection type.
+ An of that contains the source collection.
+ The input typed as .
+
+
+
+ Represents a collection of objects.
+
+ The type of token.
+
+
+
+ Gets the of with the specified key.
+
+
+
+
+
+ Represents a JSON array.
+
+
+
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous load. The property contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous load. The property contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the array.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the array.
+
+
+
+ Loads an from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads an from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+
+
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the values of the specified object.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ The that will be used to read the object.
+ A with the values of the specified object.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets or sets the at the specified index.
+
+
+
+
+
+ Determines the index of a specific item in the .
+
+ The object to locate in the .
+
+ The index of if found in the list; otherwise, -1.
+
+
+
+
+ Inserts an item to the at the specified index.
+
+ The zero-based index at which should be inserted.
+ The object to insert into the .
+
+ is not a valid index in the .
+
+
+
+
+ Removes the item at the specified index.
+
+ The zero-based index of the item to remove.
+
+ is not a valid index in the .
+
+
+
+
+ Returns an enumerator that iterates through the collection.
+
+
+ A of that can be used to iterate through the collection.
+
+
+
+
+ Adds an item to the .
+
+ The object to add to the .
+
+
+
+ Removes all items from the .
+
+
+
+
+ Determines whether the contains a specific value.
+
+ The object to locate in the .
+
+ true if is found in the ; otherwise, false.
+
+
+
+
+ Copies the elements of the to an array, starting at a particular array index.
+
+ The array.
+ Index of the array.
+
+
+
+ Gets a value indicating whether the is read-only.
+
+ true if the is read-only; otherwise, false.
+
+
+
+ Removes the first occurrence of a specific object from the .
+
+ The object to remove from the .
+
+ true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original .
+
+
+
+
+ Represents a JSON constructor.
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets or sets the name of this constructor.
+
+ The constructor name.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified name and content.
+
+ The constructor name.
+ The contents of the constructor.
+
+
+
+ Initializes a new instance of the class with the specified name and content.
+
+ The constructor name.
+ The contents of the constructor.
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ The constructor name.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Represents a token that can contain other tokens.
+
+
+
+
+ Occurs when the items list of the collection has changed, or the collection is reset.
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Get the first child token of this token.
+
+
+ A containing the first child token of the .
+
+
+
+
+ Get the last child token of this token.
+
+
+ A containing the last child token of the .
+
+
+
+
+ Returns a collection of the child tokens of this token, in document order.
+
+
+ An of containing the child tokens of this , in document order.
+
+
+
+
+ Returns a collection of the child values of this token, in document order.
+
+ The type to convert the values to.
+
+ A containing the child values of this , in document order.
+
+
+
+
+ Returns a collection of the descendant tokens for this token in document order.
+
+ An of containing the descendant tokens of the .
+
+
+
+ Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order.
+
+ An of containing this token, and all the descendant tokens of the .
+
+
+
+ Adds the specified content as children of this .
+
+ The content to be added.
+
+
+
+ Adds the specified content as the first children of this .
+
+ The content to be added.
+
+
+
+ Creates a that can be used to add tokens to the .
+
+ A that is ready to have content written to it.
+
+
+
+ Replaces the child nodes of this token with the specified content.
+
+ The content.
+
+
+
+ Removes the child nodes from this token.
+
+
+
+
+ Merge the specified content into this .
+
+ The content to be merged.
+
+
+
+ Merge the specified content into this using .
+
+ The content to be merged.
+ The used to merge the content.
+
+
+
+ Gets the count of child JSON tokens.
+
+ The count of child JSON tokens.
+
+
+
+ Represents a collection of objects.
+
+ The type of token.
+
+
+
+ An empty collection of objects.
+
+
+
+
+ Initializes a new instance of the struct.
+
+ The enumerable.
+
+
+
+ Returns an enumerator that can be used to iterate through the collection.
+
+
+ A that can be used to iterate through the collection.
+
+
+
+
+ Gets the of with the specified key.
+
+
+
+
+
+ Determines whether the specified is equal to this instance.
+
+ The to compare with this instance.
+
+ true if the specified is equal to this instance; otherwise, false.
+
+
+
+
+ Determines whether the specified is equal to this instance.
+
+ The to compare with this instance.
+
+ true if the specified is equal to this instance; otherwise, false.
+
+
+
+
+ Returns a hash code for this instance.
+
+
+ A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
+
+
+
+
+ Represents a JSON object.
+
+
+
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Occurs when a property value changes.
+
+
+
+
+ Occurs when a property value is changing.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the object.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the object.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets an of of this object's properties.
+
+ An of of this object's properties.
+
+
+
+ Gets a with the specified name.
+
+ The property name.
+ A with the specified name or null.
+
+
+
+ Gets the with the specified name.
+ The exact name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ The property name.
+ One of the enumeration values that specifies how the strings will be compared.
+ A matched with the specified name or null.
+
+
+
+ Gets a of of this object's property values.
+
+ A of of this object's property values.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets or sets the with the specified property name.
+
+
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+ is not valid JSON.
+
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+ is not valid JSON.
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+ is not valid JSON.
+
+
+
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+ is not valid JSON.
+
+
+
+
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the values of the specified object.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ The that will be used to read the object.
+ A with the values of the specified object.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified property name.
+
+ Name of the property.
+ The with the specified property name.
+
+
+
+ Gets the with the specified property name.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ Name of the property.
+ One of the enumeration values that specifies how the strings will be compared.
+ The with the specified property name.
+
+
+
+ Tries to get the with the specified property name.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ Name of the property.
+ The value.
+ One of the enumeration values that specifies how the strings will be compared.
+ true if a value was successfully retrieved; otherwise, false.
+
+
+
+ Adds the specified property name.
+
+ Name of the property.
+ The value.
+
+
+
+ Determines whether the JSON object has the specified property name.
+
+ Name of the property.
+ true if the JSON object has the specified property name; otherwise, false.
+
+
+
+ Removes the property with the specified name.
+
+ Name of the property.
+ true if item was successfully removed; otherwise, false.
+
+
+
+ Tries to get the with the specified property name.
+
+ Name of the property.
+ The value.
+ true if a value was successfully retrieved; otherwise, false.
+
+
+
+ Returns an enumerator that can be used to iterate through the collection.
+
+
+ A that can be used to iterate through the collection.
+
+
+
+
+ Raises the event with the provided arguments.
+
+ Name of the property.
+
+
+
+ Raises the event with the provided arguments.
+
+ Name of the property.
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Represents a JSON property.
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous creation. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous creation. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets the property name.
+
+ The property name.
+
+
+
+ Gets or sets the property value.
+
+ The property value.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+ The property name.
+ The property content.
+
+
+
+ Initializes a new instance of the class.
+
+ The property name.
+ The property content.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Represents a raw JSON string.
+
+
+
+
+ Asynchronously creates an instance of with the content of the reader's current token.
+
+ The reader.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous creation. The
+ property returns an instance of with the content of the reader's current token.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class.
+
+ The raw json.
+
+
+
+ Creates an instance of with the content of the reader's current token.
+
+ The reader.
+ An instance of with the content of the reader's current token.
+
+
+
+ Specifies the settings used when loading JSON.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets or sets how JSON comments are handled when loading JSON.
+ The default value is .
+
+ The JSON comment handling.
+
+
+
+ Gets or sets how JSON line info is handled when loading JSON.
+ The default value is .
+
+ The JSON line info handling.
+
+
+
+ Gets or sets how duplicate property names in JSON objects are handled when loading JSON.
+ The default value is .
+
+ The JSON duplicate property name handling.
+
+
+
+ Specifies the settings used when merging JSON.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets or sets the method used when merging JSON arrays.
+
+ The method used when merging JSON arrays.
+
+
+
+ Gets or sets how null value properties are merged.
+
+ How null value properties are merged.
+
+
+
+ Gets or sets the comparison used to match property names while merging.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ The comparison used to match property names while merging.
+
+
+
+ Represents an abstract JSON token.
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously creates a from a .
+
+ An positioned at the token to read into this .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains
+ the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Asynchronously creates a from a .
+
+ An positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains
+ the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Asynchronously creates a from a .
+
+ A positioned at the token to read into this .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Asynchronously creates a from a .
+
+ A positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Gets a comparer that can compare two tokens for value equality.
+
+ A that can compare two nodes for value equality.
+
+
+
+ Gets or sets the parent.
+
+ The parent.
+
+
+
+ Gets the root of this .
+
+ The root of this .
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Compares the values of two tokens, including the values of all descendant tokens.
+
+ The first to compare.
+ The second to compare.
+ true if the tokens are equal; otherwise false.
+
+
+
+ Gets the next sibling token of this node.
+
+ The that contains the next sibling token.
+
+
+
+ Gets the previous sibling token of this node.
+
+ The that contains the previous sibling token.
+
+
+
+ Gets the path of the JSON token.
+
+
+
+
+ Adds the specified content immediately after this token.
+
+ A content object that contains simple content or a collection of content objects to be added after this token.
+
+
+
+ Adds the specified content immediately before this token.
+
+ A content object that contains simple content or a collection of content objects to be added before this token.
+
+
+
+ Returns a collection of the ancestor tokens of this token.
+
+ A collection of the ancestor tokens of this token.
+
+
+
+ Returns a collection of tokens that contain this token, and the ancestors of this token.
+
+ A collection of tokens that contain this token, and the ancestors of this token.
+
+
+
+ Returns a collection of the sibling tokens after this token, in document order.
+
+ A collection of the sibling tokens after this tokens, in document order.
+
+
+
+ Returns a collection of the sibling tokens before this token, in document order.
+
+ A collection of the sibling tokens before this token, in document order.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets the with the specified key converted to the specified type.
+
+ The type to convert the token to.
+ The token key.
+ The converted token value.
+
+
+
+ Get the first child token of this token.
+
+ A containing the first child token of the .
+
+
+
+ Get the last child token of this token.
+
+ A containing the last child token of the .
+
+
+
+ Returns a collection of the child tokens of this token, in document order.
+
+ An of containing the child tokens of this , in document order.
+
+
+
+ Returns a collection of the child tokens of this token, in document order, filtered by the specified type.
+
+ The type to filter the child tokens on.
+ A containing the child tokens of this , in document order.
+
+
+
+ Returns a collection of the child values of this token, in document order.
+
+ The type to convert the values to.
+ A containing the child values of this , in document order.
+
+
+
+ Removes this token from its parent.
+
+
+
+
+ Replaces this token with the specified token.
+
+ The value.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Returns the indented JSON for this token.
+
+
+ ToString() returns a non-JSON string value for tokens with a type of .
+ If you want the JSON for all token types then you should use .
+
+
+ The indented JSON for this token.
+
+
+
+
+ Returns the JSON for this token using the given formatting and converters.
+
+ Indicates how the output should be formatted.
+ A collection of s which will be used when writing the token.
+ The JSON for this token using the given formatting and converters.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to [].
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from [] to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Creates a for this token.
+
+ A that can be used to read this token and its descendants.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the value of the specified object.
+
+
+
+ Creates a from an object using the specified .
+
+ The object that will be used to create .
+ The that will be used when reading the object.
+ A with the value of the specified object.
+
+
+
+ Creates an instance of the specified .NET type from the .
+
+ The object type that the token will be deserialized to.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the .
+
+ The object type that the token will be deserialized to.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the using the specified .
+
+ The object type that the token will be deserialized to.
+ The that will be used when creating the object.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the using the specified .
+
+ The object type that the token will be deserialized to.
+ The that will be used when creating the object.
+ The new object created from the JSON value.
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Creates a from a .
+
+ An positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Selects a using a JSONPath expression. Selects the token that matches the object path.
+
+
+ A that contains a JSONPath expression.
+
+ A , or null.
+
+
+
+ Selects a using a JSONPath expression. Selects the token that matches the object path.
+
+
+ A that contains a JSONPath expression.
+
+ A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.
+ A .
+
+
+
+ Selects a collection of elements using a JSONPath expression.
+
+
+ A that contains a JSONPath expression.
+
+ An of that contains the selected elements.
+
+
+
+ Selects a collection of elements using a JSONPath expression.
+
+
+ A that contains a JSONPath expression.
+
+ A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.
+ An of that contains the selected elements.
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Creates a new instance of the . All child tokens are recursively cloned.
+
+ A new instance of the .
+
+
+
+ Adds an object to the annotation list of this .
+
+ The annotation to add.
+
+
+
+ Get the first annotation object of the specified type from this .
+
+ The type of the annotation to retrieve.
+ The first annotation object that matches the specified type, or null if no annotation is of the specified type.
+
+
+
+ Gets the first annotation object of the specified type from this .
+
+ The of the annotation to retrieve.
+ The first annotation object that matches the specified type, or null if no annotation is of the specified type.
+
+
+
+ Gets a collection of annotations of the specified type for this .
+
+ The type of the annotations to retrieve.
+ An that contains the annotations for this .
+
+
+
+ Gets a collection of annotations of the specified type for this .
+
+ The of the annotations to retrieve.
+ An of that contains the annotations that match the specified type for this .
+
+
+
+ Removes the annotations of the specified type from this .
+
+ The type of annotations to remove.
+
+
+
+ Removes the annotations of the specified type from this .
+
+ The of annotations to remove.
+
+
+
+ Compares tokens to determine whether they are equal.
+
+
+
+
+ Determines whether the specified objects are equal.
+
+ The first object of type to compare.
+ The second object of type to compare.
+
+ true if the specified objects are equal; otherwise, false.
+
+
+
+
+ Returns a hash code for the specified object.
+
+ The for which a hash code is to be returned.
+ A hash code for the specified object.
+ The type of is a reference type and is null.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
+
+
+
+
+ Gets the at the reader's current position.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The token to read from.
+
+
+
+ Initializes a new instance of the class.
+
+ The token to read from.
+ The initial path of the token. It is prepended to the returned .
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Specifies the type of token.
+
+
+
+
+ No token type has been set.
+
+
+
+
+ A JSON object.
+
+
+
+
+ A JSON array.
+
+
+
+
+ A JSON constructor.
+
+
+
+
+ A JSON object property.
+
+
+
+
+ A comment.
+
+
+
+
+ An integer value.
+
+
+
+
+ A float value.
+
+
+
+
+ A string value.
+
+
+
+
+ A boolean value.
+
+
+
+
+ A null value.
+
+
+
+
+ An undefined value.
+
+
+
+
+ A date value.
+
+
+
+
+ A raw JSON value.
+
+
+
+
+ A collection of bytes value.
+
+
+
+
+ A Guid value.
+
+
+
+
+ A Uri value.
+
+
+
+
+ A TimeSpan value.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Gets the at the writer's current position.
+
+
+
+
+ Gets the token being written.
+
+ The token being written.
+
+
+
+ Initializes a new instance of the class writing to the given .
+
+ The container being written to.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Flushes whatever is in the buffer to the underlying .
+
+
+
+
+ Closes this writer.
+ If is set to true, the JSON is auto-completed.
+
+
+ Setting to true has no additional effect, since the underlying is a type that cannot be closed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the end.
+
+ The token.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Writes a value.
+ An error will be raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Represents a value in JSON (string, integer, date, etc).
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Creates a comment with the given value.
+
+ The value.
+ A comment with the given value.
+
+
+
+ Creates a string with the given value.
+
+ The value.
+ A string with the given value.
+
+
+
+ Creates a null value.
+
+ A null value.
+
+
+
+ Creates a undefined value.
+
+ A undefined value.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets or sets the underlying token value.
+
+ The underlying token value.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of s which will be used when writing the token.
+
+
+
+ Indicates whether the current object is equal to another object of the same type.
+
+
+ true if the current object is equal to the parameter; otherwise, false.
+
+ An object to compare with this object.
+
+
+
+ Determines whether the specified is equal to the current .
+
+ The to compare with the current .
+
+ true if the specified is equal to the current ; otherwise, false.
+
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Returns a that represents this instance.
+
+
+ ToString() returns a non-JSON string value for tokens with a type of .
+ If you want the JSON for all token types then you should use .
+
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format.
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format provider.
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format.
+ The format provider.
+
+ A that represents this instance.
+
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
+
+ An object to compare with this instance.
+
+ A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings:
+ Value
+ Meaning
+ Less than zero
+ This instance is less than .
+ Zero
+ This instance is equal to .
+ Greater than zero
+ This instance is greater than .
+
+
+ is not of the same type as this instance.
+
+
+
+
+ Specifies how line information is handled when loading JSON.
+
+
+
+
+ Ignore line information.
+
+
+
+
+ Load line information.
+
+
+
+
+ Specifies how JSON arrays are merged together.
+
+
+
+ Concatenate arrays.
+
+
+ Union arrays, skipping items that already exist.
+
+
+ Replace all array items.
+
+
+ Merge array items together, matched by index.
+
+
+
+ Specifies how null value properties are merged.
+
+
+
+
+ The content's null value properties will be ignored during merging.
+
+
+
+
+ The content's null value properties will be merged.
+
+
+
+
+ Specifies the member serialization options for the .
+
+
+
+
+ All public members are serialized by default. Members can be excluded using or .
+ This is the default member serialization mode.
+
+
+
+
+ Only members marked with or are serialized.
+ This member serialization mode can also be set by marking the class with .
+
+
+
+
+ All public and private fields are serialized. Members can be excluded using or .
+ This member serialization mode can also be set by marking the class with
+ and setting IgnoreSerializableAttribute on to false.
+
+
+
+
+ Specifies metadata property handling options for the .
+
+
+
+
+ Read metadata properties located at the start of a JSON object.
+
+
+
+
+ Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance.
+
+
+
+
+ Do not try to read metadata properties.
+
+
+
+
+ Specifies missing member handling options for the .
+
+
+
+
+ Ignore a missing member and do not attempt to deserialize it.
+
+
+
+
+ Throw a when a missing member is encountered during deserialization.
+
+
+
+
+ Specifies null value handling options for the .
+
+
+
+
+
+
+
+
+ Include null values when serializing and deserializing objects.
+
+
+
+
+ Ignore null values when serializing and deserializing objects.
+
+
+
+
+ Specifies how object creation is handled by the .
+
+
+
+
+ Reuse existing objects, create new objects when needed.
+
+
+
+
+ Only reuse existing objects.
+
+
+
+
+ Always create new objects.
+
+
+
+
+ Specifies reference handling options for the .
+ Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement .
+
+
+
+
+
+
+
+ Do not preserve references when serializing types.
+
+
+
+
+ Preserve references when serializing into a JSON object structure.
+
+
+
+
+ Preserve references when serializing into a JSON array structure.
+
+
+
+
+ Preserve references when serializing.
+
+
+
+
+ Specifies reference loop handling options for the .
+
+
+
+
+ Throw a when a loop is encountered.
+
+
+
+
+ Ignore loop references and do not serialize.
+
+
+
+
+ Serialize loop references.
+
+
+
+
+ Indicating whether a property is required.
+
+
+
+
+ The property is not required. The default state.
+
+
+
+
+ The property must be defined in JSON but can be a null value.
+
+
+
+
+ The property must be defined in JSON and cannot be a null value.
+
+
+
+
+ The property is not required but it cannot be a null value.
+
+
+
+
+
+ Contains the JSON schema extension methods.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+
+ Determines whether the is valid.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+
+ true if the specified is valid; otherwise, false.
+
+
+
+
+
+ Determines whether the is valid.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+ When this method returns, contains any error messages generated while validating.
+
+ true if the specified is valid; otherwise, false.
+
+
+
+
+
+ Validates the specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+
+
+
+
+ Validates the specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+ The validation event handler.
+
+
+
+
+ An in-memory representation of a JSON Schema.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets the id.
+
+
+
+
+ Gets or sets the title.
+
+
+
+
+ Gets or sets whether the object is required.
+
+
+
+
+ Gets or sets whether the object is read-only.
+
+
+
+
+ Gets or sets whether the object is visible to users.
+
+
+
+
+ Gets or sets whether the object is transient.
+
+
+
+
+ Gets or sets the description of the object.
+
+
+
+
+ Gets or sets the types of values allowed by the object.
+
+ The type.
+
+
+
+ Gets or sets the pattern.
+
+ The pattern.
+
+
+
+ Gets or sets the minimum length.
+
+ The minimum length.
+
+
+
+ Gets or sets the maximum length.
+
+ The maximum length.
+
+
+
+ Gets or sets a number that the value should be divisible by.
+
+ A number that the value should be divisible by.
+
+
+
+ Gets or sets the minimum.
+
+ The minimum.
+
+
+
+ Gets or sets the maximum.
+
+ The maximum.
+
+
+
+ Gets or sets a flag indicating whether the value can not equal the number defined by the minimum attribute ().
+
+ A flag indicating whether the value can not equal the number defined by the minimum attribute ().
+
+
+
+ Gets or sets a flag indicating whether the value can not equal the number defined by the maximum attribute ().
+
+ A flag indicating whether the value can not equal the number defined by the maximum attribute ().
+
+
+
+ Gets or sets the minimum number of items.
+
+ The minimum number of items.
+
+
+
+ Gets or sets the maximum number of items.
+
+ The maximum number of items.
+
+
+
+ Gets or sets the of items.
+
+ The of items.
+
+
+
+ Gets or sets a value indicating whether items in an array are validated using the instance at their array position from .
+
+
+ true if items are validated using their array position; otherwise, false.
+
+
+
+
+ Gets or sets the of additional items.
+
+ The of additional items.
+
+
+
+ Gets or sets a value indicating whether additional items are allowed.
+
+
+ true if additional items are allowed; otherwise, false.
+
+
+
+
+ Gets or sets whether the array items must be unique.
+
+
+
+
+ Gets or sets the of properties.
+
+ The of properties.
+
+
+
+ Gets or sets the of additional properties.
+
+ The of additional properties.
+
+
+
+ Gets or sets the pattern properties.
+
+ The pattern properties.
+
+
+
+ Gets or sets a value indicating whether additional properties are allowed.
+
+
+ true if additional properties are allowed; otherwise, false.
+
+
+
+
+ Gets or sets the required property if this property is present.
+
+ The required property if this property is present.
+
+
+
+ Gets or sets the a collection of valid enum values allowed.
+
+ A collection of valid enum values allowed.
+
+
+
+ Gets or sets disallowed types.
+
+ The disallowed types.
+
+
+
+ Gets or sets the default value.
+
+ The default value.
+
+
+
+ Gets or sets the collection of that this schema extends.
+
+ The collection of that this schema extends.
+
+
+
+ Gets or sets the format.
+
+ The format.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads a from the specified .
+
+ The containing the JSON Schema to read.
+ The object representing the JSON Schema.
+
+
+
+ Reads a from the specified .
+
+ The containing the JSON Schema to read.
+ The to use when resolving schema references.
+ The object representing the JSON Schema.
+
+
+
+ Load a from a string that contains JSON Schema.
+
+ A that contains JSON Schema.
+ A populated from the string that contains JSON Schema.
+
+
+
+ Load a from a string that contains JSON Schema using the specified .
+
+ A that contains JSON Schema.
+ The resolver.
+ A populated from the string that contains JSON Schema.
+
+
+
+ Writes this schema to a .
+
+ A into which this method will write.
+
+
+
+ Writes this schema to a using the specified .
+
+ A into which this method will write.
+ The resolver used.
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+
+ Returns detailed information about the schema exception.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+
+ Generates a from a specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets how undefined schemas are handled by the serializer.
+
+
+
+
+ Gets or sets the contract resolver.
+
+ The contract resolver.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ The used to resolve schema references.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ Specify whether the generated root will be nullable.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ The used to resolve schema references.
+ Specify whether the generated root will be nullable.
+ A generated from the specified type.
+
+
+
+
+ Resolves from an id.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets the loaded schemas.
+
+ The loaded schemas.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets a for the specified reference.
+
+ The id.
+ A for the specified reference.
+
+
+
+
+ The value types allowed by the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ No type specified.
+
+
+
+
+ String type.
+
+
+
+
+ Float type.
+
+
+
+
+ Integer type.
+
+
+
+
+ Boolean type.
+
+
+
+
+ Object type.
+
+
+
+
+ Array type.
+
+
+
+
+ Null type.
+
+
+
+
+ Any type.
+
+
+
+
+
+ Specifies undefined schema Id handling options for the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Do not infer a schema Id.
+
+
+
+
+ Use the .NET type name as the schema Id.
+
+
+
+
+ Use the assembly qualified .NET type name as the schema Id.
+
+
+
+
+
+ Returns detailed information related to the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets the associated with the validation error.
+
+ The JsonSchemaException associated with the validation error.
+
+
+
+ Gets the path of the JSON location where the validation error occurred.
+
+ The path of the JSON location where the validation error occurred.
+
+
+
+ Gets the text description corresponding to the validation error.
+
+ The text description.
+
+
+
+
+ Represents the callback method that will handle JSON schema validation events and the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Allows users to control class loading and mandate what class to load.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object
+ The type of the object the formatter creates a new instance of.
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ A camel case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Resolves member mappings for a type, camel casing property names.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Used by to resolve a for a given .
+
+
+
+
+ Gets a value indicating whether members are being get and set using dynamic code generation.
+ This value is determined by the runtime permissions available.
+
+
+ true if using dynamic code generation; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether compiler generated members should be serialized.
+
+
+ true if serialized compiler generated members; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types.
+
+
+ true if the interface will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore the attribute when serializing and deserializing types.
+
+
+ true if the attribute will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore IsSpecified members when serializing and deserializing types.
+
+
+ true if the IsSpecified members will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore ShouldSerialize members when serializing and deserializing types.
+
+
+ true if the ShouldSerialize members will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets the naming strategy used to resolve how property names and dictionary keys are serialized.
+
+ The naming strategy used to resolve how property names and dictionary keys are serialized.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Gets the serializable members for the type.
+
+ The type to get serializable members for.
+ The serializable members for the type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates the constructor parameters.
+
+ The constructor to create properties for.
+ The type's member properties.
+ Properties for the given .
+
+
+
+ Creates a for the given .
+
+ The matching member property.
+ The constructor parameter.
+ A created for the given .
+
+
+
+ Resolves the default for the contract.
+
+ Type of the object.
+ The contract's default .
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Determines which contract type is created for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates properties for the given .
+
+ The type to create properties for.
+ /// The member serialization mode for the type.
+ Properties for the given .
+
+
+
+ Creates the used by the serializer to get and set values from a member.
+
+ The member.
+ The used by the serializer to get and set values from a member.
+
+
+
+ Creates a for the given .
+
+ The member's parent .
+ The member to create a for.
+ A created for the given .
+
+
+
+ Resolves the name of the property.
+
+ Name of the property.
+ Resolved name of the property.
+
+
+
+ Resolves the name of the extension data. By default no changes are made to extension data names.
+
+ Name of the extension data.
+ Resolved name of the extension data.
+
+
+
+ Resolves the key of the dictionary. By default is used to resolve dictionary keys.
+
+ Key of the dictionary.
+ Resolved key of the dictionary.
+
+
+
+ Gets the resolved name of the property.
+
+ Name of the property.
+ Name of the property.
+
+
+
+ The default naming strategy. Property names and dictionary keys are unchanged.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ The default serialization binder used when resolving and loading classes from type names.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+ The type of the object the formatter creates a new instance of.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ Provides information surrounding an error.
+
+
+
+
+ Gets the error.
+
+ The error.
+
+
+
+ Gets the original object that caused the error.
+
+ The original object that caused the error.
+
+
+
+ Gets the member that caused the error.
+
+ The member that caused the error.
+
+
+
+ Gets the path of the JSON location where the error occurred.
+
+ The path of the JSON location where the error occurred.
+
+
+
+ Gets or sets a value indicating whether this is handled.
+
+ true if handled; otherwise, false.
+
+
+
+ Provides data for the Error event.
+
+
+
+
+ Gets the current object the error event is being raised against.
+
+ The current object the error event is being raised against.
+
+
+
+ Gets the error context.
+
+ The error context.
+
+
+
+ Initializes a new instance of the class.
+
+ The current object.
+ The error context.
+
+
+
+ Get and set values for a using dynamic methods.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Provides methods to get attributes.
+
+
+
+
+ Returns a collection of all of the attributes, or an empty collection if there are no attributes.
+
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Returns a collection of attributes, identified by type, or an empty collection if there are no attributes.
+
+ The type of the attributes.
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Used by to resolve a for a given .
+
+
+
+
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Used to resolve references when serializing and deserializing JSON by the .
+
+
+
+
+ Resolves a reference to its object.
+
+ The serialization context.
+ The reference to resolve.
+ The object that was resolved from the reference.
+
+
+
+ Gets the reference for the specified object.
+
+ The serialization context.
+ The object to get a reference for.
+ The reference to the object.
+
+
+
+ Determines whether the specified object is referenced.
+
+ The serialization context.
+ The object to test for a reference.
+
+ true if the specified object is referenced; otherwise, false.
+
+
+
+
+ Adds a reference to the specified object.
+
+ The serialization context.
+ The reference.
+ The object to reference.
+
+
+
+ Allows users to control class loading and mandate what class to load.
+
+
+
+
+ When implemented, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object
+ The type of the object the formatter creates a new instance of.
+
+
+
+ When implemented, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ Represents a trace writer.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Provides methods to get and set values.
+
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the of the collection items.
+
+ The of the collection items.
+
+
+
+ Gets a value indicating whether the collection type is a multidimensional array.
+
+ true if the collection type is a multidimensional array; otherwise, false.
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+
+ The function used to create the object.
+
+
+
+ Gets a value indicating whether the creator has a parameter with the collection values.
+
+ true if the creator has a parameter with the collection values; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the default collection items .
+
+ The converter.
+
+
+
+ Gets or sets a value indicating whether the collection items preserve object references.
+
+ true if collection items preserve object references; otherwise, false.
+
+
+
+ Gets or sets the collection item reference loop handling.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the collection item type name handling.
+
+ The type name handling.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Handles serialization callback events.
+
+ The object that raised the callback event.
+ The streaming context.
+
+
+
+ Handles serialization error callback events.
+
+ The object that raised the callback event.
+ The streaming context.
+ The error context.
+
+
+
+ Sets extension data for an object during deserialization.
+
+ The object to set extension data on.
+ The extension data key.
+ The extension data value.
+
+
+
+ Gets extension data for an object during serialization.
+
+ The object to set extension data on.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the underlying type for the contract.
+
+ The underlying type for the contract.
+
+
+
+ Gets or sets the type created during deserialization.
+
+ The type created during deserialization.
+
+
+
+ Gets or sets whether this type contract is serialized as a reference.
+
+ Whether this type contract is serialized as a reference.
+
+
+
+ Gets or sets the default for this contract.
+
+ The converter.
+
+
+
+ Gets the internally resolved for the contract's type.
+ This converter is used as a fallback converter when no other converter is resolved.
+ Setting will always override this converter.
+
+
+
+
+ Gets or sets all methods called immediately after deserialization of the object.
+
+ The methods called immediately after deserialization of the object.
+
+
+
+ Gets or sets all methods called during deserialization of the object.
+
+ The methods called during deserialization of the object.
+
+
+
+ Gets or sets all methods called after serialization of the object graph.
+
+ The methods called after serialization of the object graph.
+
+
+
+ Gets or sets all methods called before serialization of the object.
+
+ The methods called before serialization of the object.
+
+
+
+ Gets or sets all method called when an error is thrown during the serialization of the object.
+
+ The methods called when an error is thrown during the serialization of the object.
+
+
+
+ Gets or sets the default creator method used to create the object.
+
+ The default creator method used to create the object.
+
+
+
+ Gets or sets a value indicating whether the default creator is non-public.
+
+ true if the default object creator is non-public; otherwise, false.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the dictionary key resolver.
+
+ The dictionary key resolver.
+
+
+
+ Gets the of the dictionary keys.
+
+ The of the dictionary keys.
+
+
+
+ Gets the of the dictionary values.
+
+ The of the dictionary values.
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+
+ The function used to create the object.
+
+
+
+ Gets a value indicating whether the creator has a parameter with the dictionary values.
+
+ true if the creator has a parameter with the dictionary values; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the object's properties.
+
+ The object's properties.
+
+
+
+ Gets or sets the property name resolver.
+
+ The property name resolver.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the object constructor.
+
+ The object constructor.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the object member serialization.
+
+ The member object serialization.
+
+
+
+ Gets or sets the missing member handling used when deserializing this object.
+
+ The missing member handling.
+
+
+
+ Gets or sets a value that indicates whether the object's properties are required.
+
+
+ A value indicating whether the object's properties are required.
+
+
+
+
+ Gets or sets how the object's properties with null values are handled during serialization and deserialization.
+
+ How the object's properties with null values are handled during serialization and deserialization.
+
+
+
+ Gets the object's properties.
+
+ The object's properties.
+
+
+
+ Gets a collection of instances that define the parameters used with .
+
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+ This function is called with a collection of arguments which are defined by the collection.
+
+ The function used to create the object.
+
+
+
+ Gets or sets the extension data setter.
+
+
+
+
+ Gets or sets the extension data getter.
+
+
+
+
+ Gets or sets the extension data value type.
+
+
+
+
+ Gets or sets the extension data name resolver.
+
+ The extension data name resolver.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Maps a JSON property to a .NET member or constructor parameter.
+
+
+
+
+ Gets or sets the name of the property.
+
+ The name of the property.
+
+
+
+ Gets or sets the type that declared this property.
+
+ The type that declared this property.
+
+
+
+ Gets or sets the order of serialization of a member.
+
+ The numeric order of serialization.
+
+
+
+ Gets or sets the name of the underlying member or parameter.
+
+ The name of the underlying member or parameter.
+
+
+
+ Gets the that will get and set the during serialization.
+
+ The that will get and set the during serialization.
+
+
+
+ Gets or sets the for this property.
+
+ The for this property.
+
+
+
+ Gets or sets the type of the property.
+
+ The type of the property.
+
+
+
+ Gets or sets the for the property.
+ If set this converter takes precedence over the contract converter for the property type.
+
+ The converter.
+
+
+
+ Gets or sets the member converter.
+
+ The member converter.
+
+
+
+ Gets or sets a value indicating whether this is ignored.
+
+ true if ignored; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this is readable.
+
+ true if readable; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this is writable.
+
+ true if writable; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this has a member attribute.
+
+ true if has a member attribute; otherwise, false.
+
+
+
+ Gets the default value.
+
+ The default value.
+
+
+
+ Gets or sets a value indicating whether this is required.
+
+ A value indicating whether this is required.
+
+
+
+ Gets a value indicating whether has a value specified.
+
+
+
+
+ Gets or sets a value indicating whether this property preserves object references.
+
+
+ true if this instance is reference; otherwise, false.
+
+
+
+
+ Gets or sets the property null value handling.
+
+ The null value handling.
+
+
+
+ Gets or sets the property default value handling.
+
+ The default value handling.
+
+
+
+ Gets or sets the property reference loop handling.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the property object creation handling.
+
+ The object creation handling.
+
+
+
+ Gets or sets or sets the type name handling.
+
+ The type name handling.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be serialized.
+
+ A predicate used to determine whether the property should be serialized.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be deserialized.
+
+ A predicate used to determine whether the property should be deserialized.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be serialized.
+
+ A predicate used to determine whether the property should be serialized.
+
+
+
+ Gets or sets an action used to set whether the property has been deserialized.
+
+ An action used to set whether the property has been deserialized.
+
+
+
+ Returns a that represents this instance.
+
+
+ A that represents this instance.
+
+
+
+
+ Gets or sets the converter used when serializing the property's collection items.
+
+ The collection's items converter.
+
+
+
+ Gets or sets whether this property's collection items are serialized as a reference.
+
+ Whether this property's collection items are serialized as a reference.
+
+
+
+ Gets or sets the type name handling used when serializing the property's collection items.
+
+ The collection's items type name handling.
+
+
+
+ Gets or sets the reference loop handling used when serializing the property's collection items.
+
+ The collection's items reference loop handling.
+
+
+
+ A collection of objects.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The type.
+
+
+
+ When implemented in a derived class, extracts the key from the specified element.
+
+ The element from which to extract the key.
+ The key for the specified element.
+
+
+
+ Adds a object.
+
+ The property to add to the collection.
+
+
+
+ Gets the closest matching object.
+ First attempts to get an exact case match of and then
+ a case insensitive match.
+
+ Name of the property.
+ A matching property if found.
+
+
+
+ Gets a property by property name.
+
+ The name of the property to get.
+ Type property name string comparison.
+ A matching property if found.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Lookup and create an instance of the type described by the argument.
+
+ The type to create.
+ Optional arguments to pass to an initializing constructor of the JsonConverter.
+ If null, the default constructor is used.
+
+
+
+ A kebab case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Represents a trace writer that writes to memory. When the trace message limit is
+ reached then old trace messages will be removed as new messages are added.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Returns an enumeration of the most recent trace messages.
+
+ An enumeration of the most recent trace messages.
+
+
+
+ Returns a of the most recent trace messages.
+
+
+ A of the most recent trace messages.
+
+
+
+
+ A base class for resolving how property names and dictionary keys are serialized.
+
+
+
+
+ A flag indicating whether dictionary keys should be processed.
+ Defaults to false.
+
+
+
+
+ A flag indicating whether extension data names should be processed.
+ Defaults to false.
+
+
+
+
+ A flag indicating whether explicitly specified property names,
+ e.g. a property name customized with a , should be processed.
+ Defaults to false.
+
+
+
+
+ Gets the serialized name for a given property name.
+
+ The initial property name.
+ A flag indicating whether the property has had a name explicitly specified.
+ The serialized property name.
+
+
+
+ Gets the serialized name for a given extension data name.
+
+ The initial extension data name.
+ The serialized extension data name.
+
+
+
+ Gets the serialized key for a given dictionary key.
+
+ The initial dictionary key.
+ The serialized dictionary key.
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Hash code calculation
+
+
+
+
+
+ Object equality implementation
+
+
+
+
+
+
+ Compare to another NamingStrategy
+
+
+
+
+
+
+ Represents a method that constructs an object.
+
+ The object type to create.
+
+
+
+ When applied to a method, specifies that the method is called when an error occurs serializing an object.
+
+
+
+
+ Provides methods to get attributes from a , , or .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The instance to get attributes for. This parameter should be a , , or .
+
+
+
+ Returns a collection of all of the attributes, or an empty collection if there are no attributes.
+
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Returns a collection of attributes, identified by type, or an empty collection if there are no attributes.
+
+ The type of the attributes.
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Get and set values for a using reflection.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ A snake case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Specifies how strings are escaped when writing JSON text.
+
+
+
+
+ Only control characters (e.g. newline) are escaped.
+
+
+
+
+ All non-ASCII and control characters (e.g. newline) are escaped.
+
+
+
+
+ HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped.
+
+
+
+
+ Specifies what messages to output for the class.
+
+
+
+
+ Output no tracing and debugging messages.
+
+
+
+
+ Output error-handling messages.
+
+
+
+
+ Output warnings and error-handling messages.
+
+
+
+
+ Output informational messages, warnings, and error-handling messages.
+
+
+
+
+ Output all debugging and tracing messages.
+
+
+
+
+ Indicates the method that will be used during deserialization for locating and loading assemblies.
+
+
+
+
+ In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the LoadWithPartialName method of the class is used to load the assembly.
+
+
+
+
+ In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The Load method of the class is used to load the assembly.
+
+
+
+
+ Specifies type name handling options for the .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+
+
+
+ Do not include the .NET type name when serializing types.
+
+
+
+
+ Include the .NET type name when serializing into a JSON object structure.
+
+
+
+
+ Include the .NET type name when serializing into a JSON array structure.
+
+
+
+
+ Always include the .NET type name when serializing.
+
+
+
+
+ Include the .NET type name when the type of the object being serialized is not the same as its declared type.
+ Note that this doesn't include the root serialized object by default. To include the root object's type name in JSON
+ you must specify a root type object with
+ or .
+
+
+
+
+ Determines whether the collection is null or empty.
+
+ The collection.
+
+ true if the collection is null or empty; otherwise, false.
+
+
+
+
+ Adds the elements of the specified collection to the specified generic .
+
+ The list to add to.
+ The collection of elements to add.
+
+
+
+ Converts the value to the specified type. If the value is unable to be converted, the
+ value is checked whether it assignable to the specified type.
+
+ The value to convert.
+ The culture to use when converting.
+ The type to convert or cast the value to.
+
+ The converted type. If conversion was unsuccessful, the initial value
+ is returned if assignable to the target type.
+
+
+
+
+ Helper method for generating a MetaObject which calls a
+ specific method on Dynamic that returns a result
+
+
+
+
+ Helper method for generating a MetaObject which calls a
+ specific method on Dynamic, but uses one of the arguments for
+ the result.
+
+
+
+
+ Helper method for generating a MetaObject which calls a
+ specific method on Dynamic, but uses one of the arguments for
+ the result.
+
+
+
+
+ Returns a Restrictions object which includes our current restrictions merged
+ with a restriction limiting our type
+
+
+
+
+ Helper class for serializing immutable collections.
+ Note that this is used by all builds, even those that don't support immutable collections, in case the DLL is GACed
+ https://github.com/JamesNK/Newtonsoft.Json/issues/652
+
+
+
+
+ List of primitive types which can be widened.
+
+
+
+
+ Widening masks for primitive types above.
+ Index of the value in this array defines a type we're widening,
+ while the bits in mask define types it can be widened to (including itself).
+
+ For example, value at index 0 defines a bool type, and it only has bit 0 set,
+ i.e. bool values can be assigned only to bool.
+
+
+
+
+ Checks if value of primitive type can be
+ assigned to parameter of primitive type .
+
+ Source primitive type.
+ Target primitive type.
+ true if source type can be widened to target type, false otherwise.
+
+
+
+ Checks if a set of values with given can be used
+ to invoke a method with specified .
+
+ Method parameters.
+ Argument types.
+ Try to pack extra arguments into the last parameter when it is marked up with .
+ true if method can be called with given arguments, false otherwise.
+
+
+
+ Compares two sets of parameters to determine
+ which one suits better for given argument types.
+
+
+
+
+ Returns a best method overload for given argument .
+
+ List of method candidates.
+ Argument types.
+ Best method overload, or null if none matched.
+
+
+
+ Gets the type of the typed collection's items.
+
+ The type.
+ The type of the typed collection's items.
+
+
+
+ Gets the member's underlying type.
+
+ The member.
+ The underlying type of the member.
+
+
+
+ Determines whether the property is an indexed property.
+
+ The property.
+
+ true if the property is an indexed property; otherwise, false.
+
+
+
+
+ Gets the member's value on the object.
+
+ The member.
+ The target object.
+ The member's value on the object.
+
+
+
+ Sets the member's value on the target object.
+
+ The member.
+ The target.
+ The value.
+
+
+
+ Determines whether the specified MemberInfo can be read.
+
+ The MemberInfo to determine whether can be read.
+ /// if set to true then allow the member to be gotten non-publicly.
+
+ true if the specified MemberInfo can be read; otherwise, false.
+
+
+
+
+ Determines whether the specified MemberInfo can be set.
+
+ The MemberInfo to determine whether can be set.
+ if set to true then allow the member to be set non-publicly.
+ if set to true then allow the member to be set if read-only.
+
+ true if the specified MemberInfo can be set; otherwise, false.
+
+
+
+
+ Builds a string. Unlike this class lets you reuse its internal buffer.
+
+
+
+
+ Determines whether the string is all white space. Empty string will return false.
+
+ The string to test whether it is all white space.
+
+ true if the string is all white space; otherwise, false.
+
+
+
+
+ Specifies the state of the .
+
+
+
+
+ An exception has been thrown, which has left the in an invalid state.
+ You may call the method to put the in the Closed state.
+ Any other method calls result in an being thrown.
+
+
+
+
+ The method has been called.
+
+
+
+
+ An object is being written.
+
+
+
+
+ An array is being written.
+
+
+
+
+ A constructor is being written.
+
+
+
+
+ A property is being written.
+
+
+
+
+ A write method has not been called.
+
+
+
+
+ Indicates the method that will be used during deserialization for locating and loading assemblies.
+
+
+
+
+ In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the method is used to load the assembly.
+
+
+
+
+ In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The is used to load the assembly.
+
+
+
+ Specifies that an output will not be null even if the corresponding type allows it.
+
+
+ Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it.
+
+
+ Initializes the attribute with the specified return value condition.
+
+ The return value condition. If the method returns this value, the associated parameter will not be null.
+
+
+
+ Gets the return value condition.
+
+
+ Specifies that an output may be null even if the corresponding type disallows it.
+
+
+ Specifies that null is allowed as an input even if the corresponding type disallows it.
+
+
+
+ Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
+ the associated parameter matches this value.
+
+
+
+ Gets the condition parameter value.
+
+
+
diff --git a/packages/Newtonsoft.Json.12.0.3/lib/netstandard2.0/Newtonsoft.Json.dll b/packages/Newtonsoft.Json.12.0.3/lib/netstandard2.0/Newtonsoft.Json.dll
new file mode 100644
index 00000000..b501fb6a
Binary files /dev/null and b/packages/Newtonsoft.Json.12.0.3/lib/netstandard2.0/Newtonsoft.Json.dll differ
diff --git a/packages/Newtonsoft.Json.12.0.3/lib/netstandard2.0/Newtonsoft.Json.xml b/packages/Newtonsoft.Json.12.0.3/lib/netstandard2.0/Newtonsoft.Json.xml
new file mode 100644
index 00000000..623cd931
--- /dev/null
+++ b/packages/Newtonsoft.Json.12.0.3/lib/netstandard2.0/Newtonsoft.Json.xml
@@ -0,0 +1,11237 @@
+
+
+
+ Newtonsoft.Json
+
+
+
+
+ Represents a BSON Oid (object id).
+
+
+
+
+ Gets or sets the value of the Oid.
+
+ The value of the Oid.
+
+
+
+ Initializes a new instance of the class.
+
+ The Oid value.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized BSON data.
+
+
+
+
+ Gets or sets a value indicating whether binary data reading should be compatible with incorrect Json.NET 3.5 written binary.
+
+
+ true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether the root object will be read as a JSON array.
+
+
+ true if the root object will be read as a JSON array; otherwise, false.
+
+
+
+
+ Gets or sets the used when reading values from BSON.
+
+ The used when reading values from BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+ if set to true the root object will be read as a JSON array.
+ The used when reading values from BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+ if set to true the root object will be read as a JSON array.
+ The used when reading values from BSON.
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating BSON data.
+
+
+
+
+ Gets or sets the used when writing values to BSON.
+ When set to no conversion will occur.
+
+ The used when writing values to BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The to write to.
+
+
+
+ Initializes a new instance of the class.
+
+ The to write to.
+
+
+
+ Flushes whatever is in the buffer to the underlying and also flushes the underlying stream.
+
+
+
+
+ Writes the end.
+
+ The token.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Closes this writer.
+ If is set to true, the underlying is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value that represents a BSON object id.
+
+ The Object ID value to write.
+
+
+
+ Writes a BSON regex.
+
+ The regex pattern.
+ The regex options.
+
+
+
+ Specifies how constructors are used when initializing objects during deserialization by the .
+
+
+
+
+ First attempt to use the public default constructor, then fall back to a single parameterized constructor, then to the non-public default constructor.
+
+
+
+
+ Json.NET will use a non-public default constructor before falling back to a parameterized constructor.
+
+
+
+
+ Converts a binary value to and from a base 64 string value.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON and BSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Creates a custom object.
+
+ The object type to convert.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Creates an object which will then be populated by the serializer.
+
+ Type of the object.
+ The created object.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+
+ true if this can write JSON; otherwise, false.
+
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified value type.
+
+ Type of the value.
+
+ true if this instance can convert the specified value type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified value type.
+
+ Type of the value.
+
+ true if this instance can convert the specified value type; otherwise, false.
+
+
+
+
+ Provides a base class for converting a to and from JSON.
+
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a F# discriminated union type to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an Entity Framework to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+
+ true if this can write JSON; otherwise, false.
+
+
+
+
+ Converts a to and from the ISO 8601 date format (e.g. "2008-04-12T12:53Z").
+
+
+
+
+ Gets or sets the date time styles used when converting a date to and from JSON.
+
+ The date time styles used when converting a date to and from JSON.
+
+
+
+ Gets or sets the date time format used when converting a date to and from JSON.
+
+ The date time format used when converting a date to and from JSON.
+
+
+
+ Gets or sets the culture used when converting a date to and from JSON.
+
+ The culture used when converting a date to and from JSON.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from a JavaScript Date constructor (e.g. new Date(52231943)).
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON and BSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an to and from its name string value.
+
+
+
+
+ Gets or sets a value indicating whether the written enum text should be camel case.
+ The default value is false.
+
+ true if the written enum text will be camel case; otherwise, false.
+
+
+
+ Gets or sets the naming strategy used to resolve how enum text is written.
+
+ The naming strategy used to resolve how enum text is written.
+
+
+
+ Gets or sets a value indicating whether integer values are allowed when serializing and deserializing.
+ The default value is true.
+
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ true if the written enum text will be camel case; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The naming strategy used to resolve how enum text is written.
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from Unix epoch time
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from a string (e.g. "1.2.3.4").
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts XML to and from JSON.
+
+
+
+
+ Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produced multiple root elements.
+
+ The name of the deserialized root element.
+
+
+
+ Gets or sets a value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ true if the array attribute is written to the XML; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether to write the root JSON object.
+
+ true if the JSON root object is omitted; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ true if special characters are encoded; otherwise, false.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The calling serializer.
+ The value.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Checks if the is a namespace attribute.
+
+ Attribute name to test.
+ The attribute name prefix if it has one, otherwise an empty string.
+ true if attribute name is for a namespace attribute, otherwise false.
+
+
+
+ Determines whether this instance can convert the specified value type.
+
+ Type of the value.
+
+ true if this instance can convert the specified value type; otherwise, false.
+
+
+
+
+ Specifies how dates are formatted when writing JSON text.
+
+
+
+
+ Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z".
+
+
+
+
+ Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/".
+
+
+
+
+ Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text.
+
+
+
+
+ Date formatted strings are not parsed to a date type and are read as strings.
+
+
+
+
+ Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to .
+
+
+
+
+ Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to .
+
+
+
+
+ Specifies how to treat the time value when converting between string and .
+
+
+
+
+ Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time.
+
+
+
+
+ Treat as a UTC. If the object represents a local time, it is converted to a UTC.
+
+
+
+
+ Treat as a local time if a is being converted to a string.
+ If a string is being converted to , convert to a local time if a time zone is specified.
+
+
+
+
+ Time zone information should be preserved when converting.
+
+
+
+
+ The default JSON name table implementation.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets a string containing the same characters as the specified range of characters in the given array.
+
+ The character array containing the name to find.
+ The zero-based index into the array specifying the first character of the name.
+ The number of characters in the name.
+ A string containing the same characters as the specified range of characters in the given array.
+
+
+
+ Adds the specified string into name table.
+
+ The string to add.
+ This method is not thread-safe.
+ The resolved string.
+
+
+
+ Specifies default value handling options for the .
+
+
+
+
+
+
+
+
+ Include members where the member value is the same as the member's default value when serializing objects.
+ Included members are written to JSON. Has no effect when deserializing.
+
+
+
+
+ Ignore members where the member value is the same as the member's default value when serializing objects
+ so that it is not written to JSON.
+ This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers,
+ decimals and floating point numbers; and false for booleans). The default value ignored can be changed by
+ placing the on the property.
+
+
+
+
+ Members with a default value but no JSON will be set to their default value when deserializing.
+
+
+
+
+ Ignore members where the member value is the same as the member's default value when serializing objects
+ and set members to their default value when deserializing.
+
+
+
+
+ Specifies float format handling options when writing special floating point numbers, e.g. ,
+ and with .
+
+
+
+
+ Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity".
+
+
+
+
+ Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity.
+ Note that this will produce non-valid JSON.
+
+
+
+
+ Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a of property.
+
+
+
+
+ Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+
+
+
+
+ Floating point numbers are parsed to .
+
+
+
+
+ Floating point numbers are parsed to .
+
+
+
+
+ Specifies formatting options for the .
+
+
+
+
+ No special formatting is applied. This is the default.
+
+
+
+
+ Causes child objects to be indented according to the and settings.
+
+
+
+
+ Provides an interface for using pooled arrays.
+
+ The array type content.
+
+
+
+ Rent an array from the pool. This array must be returned when it is no longer needed.
+
+ The minimum required length of the array. The returned array may be longer.
+ The rented array from the pool. This array must be returned when it is no longer needed.
+
+
+
+ Return an array to the pool.
+
+ The array that is being returned.
+
+
+
+ Provides an interface to enable a class to return line and position information.
+
+
+
+
+ Gets a value indicating whether the class can return line information.
+
+
+ true if and can be provided; otherwise, false.
+
+
+
+
+ Gets the current line number.
+
+ The current line number or 0 if no line information is available (for example, when returns false).
+
+
+
+ Gets the current line position.
+
+ The current line position or 0 if no line information is available (for example, when returns false).
+
+
+
+ Instructs the how to serialize the collection.
+
+
+
+
+ Gets or sets a value indicating whether null items are allowed in the collection.
+
+ true if null items are allowed in the collection; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with a flag indicating whether the array can contain null items.
+
+ A flag indicating whether the array can contain null items.
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Instructs the to use the specified constructor when deserializing that object.
+
+
+
+
+ Instructs the how to serialize the object.
+
+
+
+
+ Gets or sets the id.
+
+ The id.
+
+
+
+ Gets or sets the title.
+
+ The title.
+
+
+
+ Gets or sets the description.
+
+ The description.
+
+
+
+ Gets or sets the collection's items converter.
+
+ The collection's items converter.
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonContainer(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets a value that indicates whether to preserve object references.
+
+
+ true to keep object reference; otherwise, false. The default is false.
+
+
+
+
+ Gets or sets a value that indicates whether to preserve collection's items references.
+
+
+ true to keep collection's items object references; otherwise, false. The default is false.
+
+
+
+
+ Gets or sets the reference loop handling used when serializing the collection's items.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the type name handling used when serializing the collection's items.
+
+ The type name handling.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Provides methods for converting between .NET types and JSON types.
+
+
+
+
+
+
+
+ Gets or sets a function that creates default .
+ Default settings are automatically used by serialization methods on ,
+ and and on .
+ To serialize without using any default settings create a with
+ .
+
+
+
+
+ Represents JavaScript's boolean value true as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's boolean value false as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's null as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's undefined as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's positive infinity as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's negative infinity as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's NaN as a string. This field is read-only.
+
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation using the specified.
+
+ The value to convert.
+ The format the date will be converted to.
+ The time zone handling when the date is converted to a string.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation using the specified.
+
+ The value to convert.
+ The format the date will be converted to.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ The string delimiter character.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ The string delimiter character.
+ The string escape handling.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Serializes the specified object to a JSON string.
+
+ The object to serialize.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using formatting.
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a collection of .
+
+ The object to serialize.
+ A collection of converters used while serializing.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using formatting and a collection of .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ A collection of converters used while serializing.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using .
+
+ The object to serialize.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a type, formatting and .
+
+ The object to serialize.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using formatting and .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a type, formatting and .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+ A JSON string representation of the object.
+
+
+
+
+ Deserializes the JSON to a .NET object.
+
+ The JSON to deserialize.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to a .NET object using .
+
+ The JSON to deserialize.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type.
+
+ The JSON to deserialize.
+ The of object being deserialized.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type.
+
+ The type of the object to deserialize to.
+ The JSON to deserialize.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the given anonymous type.
+
+
+ The anonymous type to deserialize to. This can't be specified
+ traditionally and must be inferred from the anonymous type passed
+ as a parameter.
+
+ The JSON to deserialize.
+ The anonymous type object.
+ The deserialized anonymous type from the JSON string.
+
+
+
+ Deserializes the JSON to the given anonymous type using .
+
+
+ The anonymous type to deserialize to. This can't be specified
+ traditionally and must be inferred from the anonymous type passed
+ as a parameter.
+
+ The JSON to deserialize.
+ The anonymous type object.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized anonymous type from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using a collection of .
+
+ The type of the object to deserialize to.
+ The JSON to deserialize.
+ Converters to use while deserializing.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using .
+
+ The type of the object to deserialize to.
+ The object to deserialize.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using a collection of .
+
+ The JSON to deserialize.
+ The type of the object to deserialize.
+ Converters to use while deserializing.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using .
+
+ The JSON to deserialize.
+ The type of the object to deserialize to.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Populates the object with values from the JSON string.
+
+ The JSON to populate values from.
+ The target object to populate values onto.
+
+
+
+ Populates the object with values from the JSON string using .
+
+ The JSON to populate values from.
+ The target object to populate values onto.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+
+
+
+ Serializes the to a JSON string.
+
+ The node to serialize.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting and omits the root object if is true.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ Omits writing the root object.
+ A JSON string of the .
+
+
+
+ Deserializes the from a JSON string.
+
+ The JSON string.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by .
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by
+ and writes a Json.NET array attribute for collections.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by ,
+ writes a Json.NET array attribute for collections, and encodes special characters.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+
+ A value to indicate whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ The deserialized .
+
+
+
+ Serializes the to a JSON string.
+
+ The node to convert to JSON.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting.
+
+ The node to convert to JSON.
+ Indicates how the output should be formatted.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting and omits the root object if is true.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ Omits writing the root object.
+ A JSON string of the .
+
+
+
+ Deserializes the from a JSON string.
+
+ The JSON string.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by .
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by
+ and writes a Json.NET array attribute for collections.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by ,
+ writes a Json.NET array attribute for collections, and encodes special characters.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+
+ A value to indicate whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ The deserialized .
+
+
+
+ Converts an object to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can read JSON.
+
+ true if this can read JSON; otherwise, false.
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+ true if this can write JSON; otherwise, false.
+
+
+
+ Converts an object to and from JSON.
+
+ The object type to convert.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read. If there is no existing value then null will be used.
+ The existing value has a value.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Instructs the to use the specified when serializing the member or class.
+
+
+
+
+ Gets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+
+
+
+
+ Initializes a new instance of the class.
+
+ Type of the .
+
+
+
+ Initializes a new instance of the class.
+
+ Type of the .
+ Parameter list to use when constructing the . Can be null.
+
+
+
+ Represents a collection of .
+
+
+
+
+ Instructs the how to serialize the collection.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ The exception thrown when an error occurs during JSON serialization or deserialization.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Instructs the to deserialize properties with no matching class member into the specified collection
+ and write values during serialization.
+
+
+
+
+ Gets or sets a value that indicates whether to write extension data when serializing the object.
+
+
+ true to write extension data when serializing the object; otherwise, false. The default is true.
+
+
+
+
+ Gets or sets a value that indicates whether to read extension data when deserializing the object.
+
+
+ true to read extension data when deserializing the object; otherwise, false. The default is true.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Instructs the not to serialize the public field or public read/write property value.
+
+
+
+
+ Base class for a table of atomized string objects.
+
+
+
+
+ Gets a string containing the same characters as the specified range of characters in the given array.
+
+ The character array containing the name to find.
+ The zero-based index into the array specifying the first character of the name.
+ The number of characters in the name.
+ A string containing the same characters as the specified range of characters in the given array.
+
+
+
+ Instructs the how to serialize the object.
+
+
+
+
+ Gets or sets the member serialization.
+
+ The member serialization.
+
+
+
+ Gets or sets the missing member handling used when deserializing this object.
+
+ The missing member handling.
+
+
+
+ Gets or sets how the object's properties with null values are handled during serialization and deserialization.
+
+ How the object's properties with null values are handled during serialization and deserialization.
+
+
+
+ Gets or sets a value that indicates whether the object's properties are required.
+
+
+ A value indicating whether the object's properties are required.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified member serialization.
+
+ The member serialization.
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Instructs the to always serialize the member with the specified name.
+
+
+
+
+ Gets or sets the type used when serializing the property's collection items.
+
+ The collection's items type.
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonProperty(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the null value handling used when serializing this property.
+
+ The null value handling.
+
+
+
+ Gets or sets the default value handling used when serializing this property.
+
+ The default value handling.
+
+
+
+ Gets or sets the reference loop handling used when serializing this property.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the object creation handling used when deserializing this property.
+
+ The object creation handling.
+
+
+
+ Gets or sets the type name handling used when serializing this property.
+
+ The type name handling.
+
+
+
+ Gets or sets whether this property's value is serialized as a reference.
+
+ Whether this property's value is serialized as a reference.
+
+
+
+ Gets or sets the order of serialization of a member.
+
+ The numeric order of serialization.
+
+
+
+ Gets or sets a value indicating whether this property is required.
+
+
+ A value indicating whether this property is required.
+
+
+
+
+ Gets or sets the name of the property.
+
+ The name of the property.
+
+
+
+ Gets or sets the reference loop handling used when serializing the property's collection items.
+
+ The collection's items reference loop handling.
+
+
+
+ Gets or sets the type name handling used when serializing the property's collection items.
+
+ The collection's items type name handling.
+
+
+
+ Gets or sets whether this property's collection items are serialized as a reference.
+
+ Whether this property's collection items are serialized as a reference.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ Name of the property.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
+
+
+
+
+ Asynchronously reads the next JSON token from the source.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns true if the next token was read successfully; false if there are no more tokens to read.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously skips the children of the current token.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a [].
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the []. This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Specifies the state of the reader.
+
+
+
+
+ A read method has not been called.
+
+
+
+
+ The end of the file has been reached successfully.
+
+
+
+
+ Reader is at a property.
+
+
+
+
+ Reader is at the start of an object.
+
+
+
+
+ Reader is in an object.
+
+
+
+
+ Reader is at the start of an array.
+
+
+
+
+ Reader is in an array.
+
+
+
+
+ The method has been called.
+
+
+
+
+ Reader has just read a value.
+
+
+
+
+ Reader is at the start of a constructor.
+
+
+
+
+ Reader is in a constructor.
+
+
+
+
+ An error occurred that prevents the read operation from continuing.
+
+
+
+
+ The end of the file has been reached successfully.
+
+
+
+
+ Gets the current reader state.
+
+ The current reader state.
+
+
+
+ Gets or sets a value indicating whether the source should be closed when this reader is closed.
+
+
+ true to close the source when this reader is closed; otherwise false. The default is true.
+
+
+
+
+ Gets or sets a value indicating whether multiple pieces of JSON content can
+ be read from a continuous stream without erroring.
+
+
+ true to support reading multiple pieces of JSON content; otherwise false.
+ The default is false.
+
+
+
+
+ Gets the quotation mark character used to enclose the value of a string.
+
+
+
+
+ Gets or sets how time zones are handled when reading JSON.
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+
+
+
+
+ Gets or sets how custom date formatted strings are parsed when reading JSON.
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+
+
+
+
+ Gets the type of the current JSON token.
+
+
+
+
+ Gets the text value of the current JSON token.
+
+
+
+
+ Gets the .NET type for the current JSON token.
+
+
+
+
+ Gets the depth of the current token in the JSON document.
+
+ The depth of the current token in the JSON document.
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Gets or sets the culture used when reading JSON. Defaults to .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads the next JSON token from the source.
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a [].
+
+ A [] or null if the next JSON token is null. This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Skips the children of the current token.
+
+
+
+
+ Sets the current token.
+
+ The new token.
+
+
+
+ Sets the current token and value.
+
+ The new token.
+ The value.
+
+
+
+ Sets the current token and value.
+
+ The new token.
+ The value.
+ A flag indicating whether the position index inside an array should be updated.
+
+
+
+ Sets the state based on current token type.
+
+
+
+
+ Releases unmanaged and - optionally - managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the source is also closed.
+
+
+
+
+ The exception thrown when an error occurs while reading JSON text.
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The line number indicating where the error occurred.
+ The line position indicating where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Instructs the to always serialize the member, and to require that the member has a value.
+
+
+
+
+ The exception thrown when an error occurs during JSON serialization or deserialization.
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The line number indicating where the error occurred.
+ The line position indicating where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Serializes and deserializes objects into and from the JSON format.
+ The enables you to control how objects are encoded into JSON.
+
+
+
+
+ Occurs when the errors during serialization and deserialization.
+
+
+
+
+ Gets or sets the used by the serializer when resolving references.
+
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+
+
+
+ Gets or sets the used by the serializer when writing trace messages.
+
+ The trace writer.
+
+
+
+ Gets or sets the equality comparer used by the serializer when comparing references.
+
+ The equality comparer.
+
+
+
+ Gets or sets how type name writing and reading is handled by the serializer.
+ The default value is .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how object references are preserved by the serializer.
+ The default value is .
+
+
+
+
+ Gets or sets how reference loops (e.g. a class referencing itself) is handled.
+ The default value is .
+
+
+
+
+ Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how null values are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how default values are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how objects are created during deserialization.
+ The default value is .
+
+ The object creation handling.
+
+
+
+ Gets or sets how constructors are used during deserialization.
+ The default value is .
+
+ The constructor handling.
+
+
+
+ Gets or sets how metadata properties are used during deserialization.
+ The default value is .
+
+ The metadata properties handling.
+
+
+
+ Gets a collection that will be used during serialization.
+
+ Collection that will be used during serialization.
+
+
+
+ Gets or sets the contract resolver used by the serializer when
+ serializing .NET objects to JSON and vice versa.
+
+
+
+
+ Gets or sets the used by the serializer when invoking serialization callback methods.
+
+ The context.
+
+
+
+ Indicates how JSON text output is formatted.
+ The default value is .
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how time zones are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written as JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how and values are formatted when writing JSON text,
+ and the expected date format when reading JSON text.
+ The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
+
+
+
+
+ Gets or sets the culture used when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+ A null value means there is no maximum.
+ The default value is null.
+
+
+
+
+ Gets a value indicating whether there will be a check for additional JSON content after deserializing an object.
+ The default value is false.
+
+
+ true if there will be a check for additional JSON content after deserializing an object; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Creates a new instance.
+ The will not use default settings
+ from .
+
+
+ A new instance.
+ The will not use default settings
+ from .
+
+
+
+
+ Creates a new instance using the specified .
+ The will not use default settings
+ from .
+
+ The settings to be applied to the .
+
+ A new instance using the specified .
+ The will not use default settings
+ from .
+
+
+
+
+ Creates a new instance.
+ The will use default settings
+ from .
+
+
+ A new instance.
+ The will use default settings
+ from .
+
+
+
+
+ Creates a new instance using the specified .
+ The will use default settings
+ from as well as the specified .
+
+ The settings to be applied to the .
+
+ A new instance using the specified .
+ The will use default settings
+ from as well as the specified .
+
+
+
+
+ Populates the JSON values onto the target object.
+
+ The that contains the JSON structure to read values from.
+ The target object to populate values onto.
+
+
+
+ Populates the JSON values onto the target object.
+
+ The that contains the JSON structure to read values from.
+ The target object to populate values onto.
+
+
+
+ Deserializes the JSON structure contained by the specified .
+
+ The that contains the JSON structure to deserialize.
+ The being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The of object being deserialized.
+ The instance of being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The type of the object to deserialize.
+ The instance of being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The of object being deserialized.
+ The instance of being deserialized.
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+ The type of the value being serialized.
+ This parameter is used when is Auto to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+
+
+ Specifies the settings on a object.
+
+
+
+
+ Gets or sets how reference loops (e.g. a class referencing itself) are handled.
+ The default value is .
+
+ Reference loop handling.
+
+
+
+ Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
+ The default value is .
+
+ Missing member handling.
+
+
+
+ Gets or sets how objects are created during deserialization.
+ The default value is .
+
+ The object creation handling.
+
+
+
+ Gets or sets how null values are handled during serialization and deserialization.
+ The default value is .
+
+ Null value handling.
+
+
+
+ Gets or sets how default values are handled during serialization and deserialization.
+ The default value is .
+
+ The default value handling.
+
+
+
+ Gets or sets a collection that will be used during serialization.
+
+ The converters.
+
+
+
+ Gets or sets how object references are preserved by the serializer.
+ The default value is .
+
+ The preserve references handling.
+
+
+
+ Gets or sets how type name writing and reading is handled by the serializer.
+ The default value is .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+ The type name handling.
+
+
+
+ Gets or sets how metadata properties are used during deserialization.
+ The default value is .
+
+ The metadata properties handling.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how constructors are used during deserialization.
+ The default value is .
+
+ The constructor handling.
+
+
+
+ Gets or sets the contract resolver used by the serializer when
+ serializing .NET objects to JSON and vice versa.
+
+ The contract resolver.
+
+
+
+ Gets or sets the equality comparer used by the serializer when comparing references.
+
+ The equality comparer.
+
+
+
+ Gets or sets the used by the serializer when resolving references.
+
+ The reference resolver.
+
+
+
+ Gets or sets a function that creates the used by the serializer when resolving references.
+
+ A function that creates the used by the serializer when resolving references.
+
+
+
+ Gets or sets the used by the serializer when writing trace messages.
+
+ The trace writer.
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+ The binder.
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+ The binder.
+
+
+
+ Gets or sets the error handler called during serialization and deserialization.
+
+ The error handler called during serialization and deserialization.
+
+
+
+ Gets or sets the used by the serializer when invoking serialization callback methods.
+
+ The context.
+
+
+
+ Gets or sets how and values are formatted when writing JSON text,
+ and the expected date format when reading JSON text.
+ The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+ A null value means there is no maximum.
+ The default value is null.
+
+
+
+
+ Indicates how JSON text output is formatted.
+ The default value is .
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how time zones are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written as JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets the culture used when reading JSON.
+ The default value is .
+
+
+
+
+ Gets a value indicating whether there will be a check for additional content after deserializing an object.
+ The default value is false.
+
+
+ true if there will be a check for additional content after deserializing an object; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to JSON text data.
+
+
+
+
+ Asynchronously reads the next JSON token from the source.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns true if the next token was read successfully; false if there are no more tokens to read.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a [].
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the []. This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Initializes a new instance of the class with the specified .
+
+ The containing the JSON data to read.
+
+
+
+ Gets or sets the reader's property name table.
+
+
+
+
+ Gets or sets the reader's character buffer pool.
+
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a [].
+
+ A [] or null if the next JSON token is null. This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Gets a value indicating whether the class can return line information.
+
+
+ true if and can be provided; otherwise, false.
+
+
+
+
+ Gets the current line number.
+
+
+ The current line number or 0 if no line information is available (for example, returns false).
+
+
+
+
+ Gets the current line position.
+
+
+ The current line position or 0 if no line information is available (for example, returns false).
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the JSON value delimiter.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the specified end token.
+
+ The end token to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously closes this writer.
+ If is set to true, the destination is also closed.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of the current JSON object or array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes indent characters.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes an indent space.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a null value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the beginning of a JSON array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the beginning of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the start of a constructor with the given name.
+
+ The name of the constructor.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes an undefined value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the given white space.
+
+ The string of white space characters.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a [] value.
+
+ The [] value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of an array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of a constructor.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Gets or sets the writer's character array pool.
+
+
+
+
+ Gets or sets how many s to write for each level in the hierarchy when is set to .
+
+
+
+
+ Gets or sets which character to use to quote attribute values.
+
+
+
+
+ Gets or sets which character to use for indenting when is set to .
+
+
+
+
+ Gets or sets a value indicating whether object names will be surrounded with quotes.
+
+
+
+
+ Initializes a new instance of the class using the specified .
+
+ The to write to.
+
+
+
+ Flushes whatever is in the buffer to the underlying and also flushes the underlying .
+
+
+
+
+ Closes this writer.
+ If is set to true, the underlying is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the specified end token.
+
+ The end token to write.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+
+
+
+ Writes indent characters.
+
+
+
+
+ Writes the JSON value delimiter.
+
+
+
+
+ Writes an indent space.
+
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the given white space.
+
+ The string of white space characters.
+
+
+
+ Specifies the type of JSON token.
+
+
+
+
+ This is returned by the if a read method has not been called.
+
+
+
+
+ An object start token.
+
+
+
+
+ An array start token.
+
+
+
+
+ A constructor start token.
+
+
+
+
+ An object property name.
+
+
+
+
+ A comment.
+
+
+
+
+ Raw JSON.
+
+
+
+
+ An integer.
+
+
+
+
+ A float.
+
+
+
+
+ A string.
+
+
+
+
+ A boolean.
+
+
+
+
+ A null token.
+
+
+
+
+ An undefined token.
+
+
+
+
+ An object end token.
+
+
+
+
+ An array end token.
+
+
+
+
+ A constructor end token.
+
+
+
+
+ A Date.
+
+
+
+
+ Byte data.
+
+
+
+
+
+ Represents a reader that provides validation.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Sets an event handler for receiving schema validation errors.
+
+
+
+
+ Gets the text value of the current JSON token.
+
+
+
+
+
+ Gets the depth of the current token in the JSON document.
+
+ The depth of the current token in the JSON document.
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Gets the quotation mark character used to enclose the value of a string.
+
+
+
+
+
+ Gets the type of the current JSON token.
+
+
+
+
+
+ Gets the .NET type for the current JSON token.
+
+
+
+
+
+ Initializes a new instance of the class that
+ validates the content returned from the given .
+
+ The to read from while validating.
+
+
+
+ Gets or sets the schema.
+
+ The schema.
+
+
+
+ Gets the used to construct this .
+
+ The specified in the constructor.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a [].
+
+
+ A [] or null if the next JSON token is null.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Asynchronously closes this writer.
+ If is set to true, the destination is also closed.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the specified end token.
+
+ The end token to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes indent characters.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the JSON value delimiter.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes an indent space.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of the current JSON object or array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of an array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of a constructor.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a null value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the beginning of a JSON array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the start of a constructor with the given name.
+
+ The name of the constructor.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the beginning of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the current token.
+
+ The to read the token from.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the current token.
+
+ The to read the token from.
+ A flag indicating whether the current token's children should be written.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the token and its value.
+
+ The to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the token and its value.
+
+ The to write.
+
+ The value to write.
+ A value is only required for tokens that have an associated value, e.g. the property name for .
+ null can be passed to the method for tokens that don't have a value, e.g. .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a [] value.
+
+ The [] value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes an undefined value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the given white space.
+
+ The string of white space characters.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously ets the state of the .
+
+ The being written.
+ The value being written.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Gets or sets a value indicating whether the destination should be closed when this writer is closed.
+
+
+ true to close the destination when this writer is closed; otherwise false. The default is true.
+
+
+
+
+ Gets or sets a value indicating whether the JSON should be auto-completed when this writer is closed.
+
+
+ true to auto-complete the JSON when this writer is closed; otherwise false. The default is true.
+
+
+
+
+ Gets the top.
+
+ The top.
+
+
+
+ Gets the state of the writer.
+
+
+
+
+ Gets the path of the writer.
+
+
+
+
+ Gets or sets a value indicating how JSON text output should be formatted.
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+
+
+
+
+ Gets or sets how time zones are handled when writing JSON text.
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written to JSON text.
+
+
+
+
+ Gets or sets how and values are formatted when writing JSON text.
+
+
+
+
+ Gets or sets the culture used when writing JSON. Defaults to .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Flushes whatever is in the buffer to the destination and also flushes the destination.
+
+
+
+
+ Closes this writer.
+ If is set to true, the destination is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the end of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the end of an array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the end constructor.
+
+
+
+
+ Writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+
+
+
+ Writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+
+
+
+ Writes the end of the current JSON object or array.
+
+
+
+
+ Writes the current token and its children.
+
+ The to read the token from.
+
+
+
+ Writes the current token.
+
+ The to read the token from.
+ A flag indicating whether the current token's children should be written.
+
+
+
+ Writes the token and its value.
+
+ The to write.
+
+ The value to write.
+ A value is only required for tokens that have an associated value, e.g. the property name for .
+ null can be passed to the method for tokens that don't have a value, e.g. .
+
+
+
+
+ Writes the token.
+
+ The to write.
+
+
+
+ Writes the specified end token.
+
+ The end token to write.
+
+
+
+ Writes indent characters.
+
+
+
+
+ Writes the JSON value delimiter.
+
+
+
+
+ Writes an indent space.
+
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the given white space.
+
+ The string of white space characters.
+
+
+
+ Releases unmanaged and - optionally - managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Sets the state of the .
+
+ The being written.
+ The value being written.
+
+
+
+ The exception thrown when an error occurs while writing JSON text.
+
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Specifies how JSON comments are handled when loading JSON.
+
+
+
+
+ Ignore comments.
+
+
+
+
+ Load comments as a with type .
+
+
+
+
+ Specifies how duplicate property names are handled when loading JSON.
+
+
+
+
+ Replace the existing value when there is a duplicate property. The value of the last property in the JSON object will be used.
+
+
+
+
+ Ignore the new value when there is a duplicate property. The value of the first property in the JSON object will be used.
+
+
+
+
+ Throw a when a duplicate property is encountered.
+
+
+
+
+ Contains the LINQ to JSON extension methods.
+
+
+
+
+ Returns a collection of tokens that contains the ancestors of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains the ancestors of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains every token in the source collection, the ancestors of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains the descendants of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains the descendants of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains every token in the source collection, and the descendants of every token in the source collection.
+
+
+
+ Returns a collection of child properties of every object in the source collection.
+
+ An of that contains the source collection.
+ An of that contains the properties of every object in the source collection.
+
+
+
+ Returns a collection of child values of every object in the source collection with the given key.
+
+ An of that contains the source collection.
+ The token key.
+ An of that contains the values of every token in the source collection with the given key.
+
+
+
+ Returns a collection of child values of every object in the source collection.
+
+ An of that contains the source collection.
+ An of that contains the values of every token in the source collection.
+
+
+
+ Returns a collection of converted child values of every object in the source collection with the given key.
+
+ The type to convert the values to.
+ An of that contains the source collection.
+ The token key.
+ An that contains the converted values of every token in the source collection with the given key.
+
+
+
+ Returns a collection of converted child values of every object in the source collection.
+
+ The type to convert the values to.
+ An of that contains the source collection.
+ An that contains the converted values of every token in the source collection.
+
+
+
+ Converts the value.
+
+ The type to convert the value to.
+ A cast as a of .
+ A converted value.
+
+
+
+ Converts the value.
+
+ The source collection type.
+ The type to convert the value to.
+ A cast as a of .
+ A converted value.
+
+
+
+ Returns a collection of child tokens of every array in the source collection.
+
+ The source collection type.
+ An of that contains the source collection.
+ An of that contains the values of every token in the source collection.
+
+
+
+ Returns a collection of converted child tokens of every array in the source collection.
+
+ An of that contains the source collection.
+ The type to convert the values to.
+ The source collection type.
+ An that contains the converted values of every token in the source collection.
+
+
+
+ Returns the input typed as .
+
+ An of that contains the source collection.
+ The input typed as .
+
+
+
+ Returns the input typed as .
+
+ The source collection type.
+ An of that contains the source collection.
+ The input typed as .
+
+
+
+ Represents a collection of objects.
+
+ The type of token.
+
+
+
+ Gets the of with the specified key.
+
+
+
+
+
+ Represents a JSON array.
+
+
+
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous load. The property contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous load. The property contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the array.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the array.
+
+
+
+ Loads an from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads an from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+
+
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the values of the specified object.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ The that will be used to read the object.
+ A with the values of the specified object.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets or sets the at the specified index.
+
+
+
+
+
+ Determines the index of a specific item in the .
+
+ The object to locate in the .
+
+ The index of if found in the list; otherwise, -1.
+
+
+
+
+ Inserts an item to the at the specified index.
+
+ The zero-based index at which should be inserted.
+ The object to insert into the .
+
+ is not a valid index in the .
+
+
+
+
+ Removes the item at the specified index.
+
+ The zero-based index of the item to remove.
+
+ is not a valid index in the .
+
+
+
+
+ Returns an enumerator that iterates through the collection.
+
+
+ A of that can be used to iterate through the collection.
+
+
+
+
+ Adds an item to the .
+
+ The object to add to the .
+
+
+
+ Removes all items from the .
+
+
+
+
+ Determines whether the contains a specific value.
+
+ The object to locate in the .
+
+ true if is found in the ; otherwise, false.
+
+
+
+
+ Copies the elements of the to an array, starting at a particular array index.
+
+ The array.
+ Index of the array.
+
+
+
+ Gets a value indicating whether the is read-only.
+
+ true if the is read-only; otherwise, false.
+
+
+
+ Removes the first occurrence of a specific object from the .
+
+ The object to remove from the .
+
+ true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original .
+
+
+
+
+ Represents a JSON constructor.
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets or sets the name of this constructor.
+
+ The constructor name.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified name and content.
+
+ The constructor name.
+ The contents of the constructor.
+
+
+
+ Initializes a new instance of the class with the specified name and content.
+
+ The constructor name.
+ The contents of the constructor.
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ The constructor name.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Represents a token that can contain other tokens.
+
+
+
+
+ Occurs when the list changes or an item in the list changes.
+
+
+
+
+ Occurs before an item is added to the collection.
+
+
+
+
+ Occurs when the items list of the collection has changed, or the collection is reset.
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Get the first child token of this token.
+
+
+ A containing the first child token of the .
+
+
+
+
+ Get the last child token of this token.
+
+
+ A containing the last child token of the .
+
+
+
+
+ Returns a collection of the child tokens of this token, in document order.
+
+
+ An of containing the child tokens of this , in document order.
+
+
+
+
+ Returns a collection of the child values of this token, in document order.
+
+ The type to convert the values to.
+
+ A containing the child values of this , in document order.
+
+
+
+
+ Returns a collection of the descendant tokens for this token in document order.
+
+ An of containing the descendant tokens of the .
+
+
+
+ Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order.
+
+ An of containing this token, and all the descendant tokens of the .
+
+
+
+ Adds the specified content as children of this .
+
+ The content to be added.
+
+
+
+ Adds the specified content as the first children of this .
+
+ The content to be added.
+
+
+
+ Creates a that can be used to add tokens to the .
+
+ A that is ready to have content written to it.
+
+
+
+ Replaces the child nodes of this token with the specified content.
+
+ The content.
+
+
+
+ Removes the child nodes from this token.
+
+
+
+
+ Merge the specified content into this .
+
+ The content to be merged.
+
+
+
+ Merge the specified content into this using .
+
+ The content to be merged.
+ The used to merge the content.
+
+
+
+ Gets the count of child JSON tokens.
+
+ The count of child JSON tokens.
+
+
+
+ Represents a collection of objects.
+
+ The type of token.
+
+
+
+ An empty collection of objects.
+
+
+
+
+ Initializes a new instance of the struct.
+
+ The enumerable.
+
+
+
+ Returns an enumerator that can be used to iterate through the collection.
+
+
+ A that can be used to iterate through the collection.
+
+
+
+
+ Gets the of with the specified key.
+
+
+
+
+
+ Determines whether the specified is equal to this instance.
+
+ The to compare with this instance.
+
+ true if the specified is equal to this instance; otherwise, false.
+
+
+
+
+ Determines whether the specified is equal to this instance.
+
+ The to compare with this instance.
+
+ true if the specified is equal to this instance; otherwise, false.
+
+
+
+
+ Returns a hash code for this instance.
+
+
+ A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
+
+
+
+
+ Represents a JSON object.
+
+
+
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Occurs when a property value changes.
+
+
+
+
+ Occurs when a property value is changing.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the object.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the object.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets an of of this object's properties.
+
+ An of of this object's properties.
+
+
+
+ Gets a with the specified name.
+
+ The property name.
+ A with the specified name or null.
+
+
+
+ Gets the with the specified name.
+ The exact name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ The property name.
+ One of the enumeration values that specifies how the strings will be compared.
+ A matched with the specified name or null.
+
+
+
+ Gets a of of this object's property values.
+
+ A of of this object's property values.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets or sets the with the specified property name.
+
+
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+ is not valid JSON.
+
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+ is not valid JSON.
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+ is not valid JSON.
+
+
+
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+ is not valid JSON.
+
+
+
+
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the values of the specified object.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ The that will be used to read the object.
+ A with the values of the specified object.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified property name.
+
+ Name of the property.
+ The with the specified property name.
+
+
+
+ Gets the with the specified property name.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ Name of the property.
+ One of the enumeration values that specifies how the strings will be compared.
+ The with the specified property name.
+
+
+
+ Tries to get the with the specified property name.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ Name of the property.
+ The value.
+ One of the enumeration values that specifies how the strings will be compared.
+ true if a value was successfully retrieved; otherwise, false.
+
+
+
+ Adds the specified property name.
+
+ Name of the property.
+ The value.
+
+
+
+ Determines whether the JSON object has the specified property name.
+
+ Name of the property.
+ true if the JSON object has the specified property name; otherwise, false.
+
+
+
+ Removes the property with the specified name.
+
+ Name of the property.
+ true if item was successfully removed; otherwise, false.
+
+
+
+ Tries to get the with the specified property name.
+
+ Name of the property.
+ The value.
+ true if a value was successfully retrieved; otherwise, false.
+
+
+
+ Returns an enumerator that can be used to iterate through the collection.
+
+
+ A that can be used to iterate through the collection.
+
+
+
+
+ Raises the event with the provided arguments.
+
+ Name of the property.
+
+
+
+ Raises the event with the provided arguments.
+
+ Name of the property.
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Represents a JSON property.
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous creation. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous creation. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets the property name.
+
+ The property name.
+
+
+
+ Gets or sets the property value.
+
+ The property value.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+ The property name.
+ The property content.
+
+
+
+ Initializes a new instance of the class.
+
+ The property name.
+ The property content.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Represents a view of a .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The name.
+
+
+
+ When overridden in a derived class, returns whether resetting an object changes its value.
+
+
+ true if resetting the component changes its value; otherwise, false.
+
+ The component to test for reset capability.
+
+
+
+ When overridden in a derived class, gets the current value of the property on a component.
+
+
+ The value of a property for a given component.
+
+ The component with the property for which to retrieve the value.
+
+
+
+ When overridden in a derived class, resets the value for this property of the component to the default value.
+
+ The component with the property value that is to be reset to the default value.
+
+
+
+ When overridden in a derived class, sets the value of the component to a different value.
+
+ The component with the property value that is to be set.
+ The new value.
+
+
+
+ When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted.
+
+
+ true if the property should be persisted; otherwise, false.
+
+ The component with the property to be examined for persistence.
+
+
+
+ When overridden in a derived class, gets the type of the component this property is bound to.
+
+
+ A that represents the type of component this property is bound to.
+ When the or
+
+ methods are invoked, the object specified might be an instance of this type.
+
+
+
+
+ When overridden in a derived class, gets a value indicating whether this property is read-only.
+
+
+ true if the property is read-only; otherwise, false.
+
+
+
+
+ When overridden in a derived class, gets the type of the property.
+
+
+ A that represents the type of the property.
+
+
+
+
+ Gets the hash code for the name of the member.
+
+
+
+ The hash code for the name of the member.
+
+
+
+
+ Represents a raw JSON string.
+
+
+
+
+ Asynchronously creates an instance of with the content of the reader's current token.
+
+ The reader.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous creation. The
+ property returns an instance of with the content of the reader's current token.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class.
+
+ The raw json.
+
+
+
+ Creates an instance of with the content of the reader's current token.
+
+ The reader.
+ An instance of with the content of the reader's current token.
+
+
+
+ Specifies the settings used when loading JSON.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets or sets how JSON comments are handled when loading JSON.
+ The default value is .
+
+ The JSON comment handling.
+
+
+
+ Gets or sets how JSON line info is handled when loading JSON.
+ The default value is .
+
+ The JSON line info handling.
+
+
+
+ Gets or sets how duplicate property names in JSON objects are handled when loading JSON.
+ The default value is .
+
+ The JSON duplicate property name handling.
+
+
+
+ Specifies the settings used when merging JSON.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets or sets the method used when merging JSON arrays.
+
+ The method used when merging JSON arrays.
+
+
+
+ Gets or sets how null value properties are merged.
+
+ How null value properties are merged.
+
+
+
+ Gets or sets the comparison used to match property names while merging.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ The comparison used to match property names while merging.
+
+
+
+ Represents an abstract JSON token.
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously creates a from a .
+
+ An positioned at the token to read into this .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains
+ the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Asynchronously creates a from a .
+
+ An positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains
+ the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Asynchronously creates a from a .
+
+ A positioned at the token to read into this .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Asynchronously creates a from a .
+
+ A positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Gets a comparer that can compare two tokens for value equality.
+
+ A that can compare two nodes for value equality.
+
+
+
+ Gets or sets the parent.
+
+ The parent.
+
+
+
+ Gets the root of this .
+
+ The root of this .
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Compares the values of two tokens, including the values of all descendant tokens.
+
+ The first to compare.
+ The second to compare.
+ true if the tokens are equal; otherwise false.
+
+
+
+ Gets the next sibling token of this node.
+
+ The that contains the next sibling token.
+
+
+
+ Gets the previous sibling token of this node.
+
+ The that contains the previous sibling token.
+
+
+
+ Gets the path of the JSON token.
+
+
+
+
+ Adds the specified content immediately after this token.
+
+ A content object that contains simple content or a collection of content objects to be added after this token.
+
+
+
+ Adds the specified content immediately before this token.
+
+ A content object that contains simple content or a collection of content objects to be added before this token.
+
+
+
+ Returns a collection of the ancestor tokens of this token.
+
+ A collection of the ancestor tokens of this token.
+
+
+
+ Returns a collection of tokens that contain this token, and the ancestors of this token.
+
+ A collection of tokens that contain this token, and the ancestors of this token.
+
+
+
+ Returns a collection of the sibling tokens after this token, in document order.
+
+ A collection of the sibling tokens after this tokens, in document order.
+
+
+
+ Returns a collection of the sibling tokens before this token, in document order.
+
+ A collection of the sibling tokens before this token, in document order.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets the with the specified key converted to the specified type.
+
+ The type to convert the token to.
+ The token key.
+ The converted token value.
+
+
+
+ Get the first child token of this token.
+
+ A containing the first child token of the .
+
+
+
+ Get the last child token of this token.
+
+ A containing the last child token of the .
+
+
+
+ Returns a collection of the child tokens of this token, in document order.
+
+ An of containing the child tokens of this , in document order.
+
+
+
+ Returns a collection of the child tokens of this token, in document order, filtered by the specified type.
+
+ The type to filter the child tokens on.
+ A containing the child tokens of this , in document order.
+
+
+
+ Returns a collection of the child values of this token, in document order.
+
+ The type to convert the values to.
+ A containing the child values of this , in document order.
+
+
+
+ Removes this token from its parent.
+
+
+
+
+ Replaces this token with the specified token.
+
+ The value.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Returns the indented JSON for this token.
+
+
+ ToString() returns a non-JSON string value for tokens with a type of .
+ If you want the JSON for all token types then you should use .
+
+
+ The indented JSON for this token.
+
+
+
+
+ Returns the JSON for this token using the given formatting and converters.
+
+ Indicates how the output should be formatted.
+ A collection of s which will be used when writing the token.
+ The JSON for this token using the given formatting and converters.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to [].
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from [] to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Creates a for this token.
+
+ A that can be used to read this token and its descendants.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the value of the specified object.
+
+
+
+ Creates a from an object using the specified .
+
+ The object that will be used to create .
+ The that will be used when reading the object.
+ A with the value of the specified object.
+
+
+
+ Creates an instance of the specified .NET type from the .
+
+ The object type that the token will be deserialized to.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the .
+
+ The object type that the token will be deserialized to.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the using the specified .
+
+ The object type that the token will be deserialized to.
+ The that will be used when creating the object.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the using the specified .
+
+ The object type that the token will be deserialized to.
+ The that will be used when creating the object.
+ The new object created from the JSON value.
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Creates a from a .
+
+ An positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Selects a using a JSONPath expression. Selects the token that matches the object path.
+
+
+ A that contains a JSONPath expression.
+
+ A , or null.
+
+
+
+ Selects a using a JSONPath expression. Selects the token that matches the object path.
+
+
+ A that contains a JSONPath expression.
+
+ A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.
+ A .
+
+
+
+ Selects a collection of elements using a JSONPath expression.
+
+
+ A that contains a JSONPath expression.
+
+ An of that contains the selected elements.
+
+
+
+ Selects a collection of elements using a JSONPath expression.
+
+
+ A that contains a JSONPath expression.
+
+ A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.
+ An of that contains the selected elements.
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Creates a new instance of the . All child tokens are recursively cloned.
+
+ A new instance of the .
+
+
+
+ Adds an object to the annotation list of this .
+
+ The annotation to add.
+
+
+
+ Get the first annotation object of the specified type from this .
+
+ The type of the annotation to retrieve.
+ The first annotation object that matches the specified type, or null if no annotation is of the specified type.
+
+
+
+ Gets the first annotation object of the specified type from this .
+
+ The of the annotation to retrieve.
+ The first annotation object that matches the specified type, or null if no annotation is of the specified type.
+
+
+
+ Gets a collection of annotations of the specified type for this .
+
+ The type of the annotations to retrieve.
+ An that contains the annotations for this .
+
+
+
+ Gets a collection of annotations of the specified type for this .
+
+ The of the annotations to retrieve.
+ An of that contains the annotations that match the specified type for this .
+
+
+
+ Removes the annotations of the specified type from this .
+
+ The type of annotations to remove.
+
+
+
+ Removes the annotations of the specified type from this .
+
+ The of annotations to remove.
+
+
+
+ Compares tokens to determine whether they are equal.
+
+
+
+
+ Determines whether the specified objects are equal.
+
+ The first object of type to compare.
+ The second object of type to compare.
+
+ true if the specified objects are equal; otherwise, false.
+
+
+
+
+ Returns a hash code for the specified object.
+
+ The for which a hash code is to be returned.
+ A hash code for the specified object.
+ The type of is a reference type and is null.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
+
+
+
+
+ Gets the at the reader's current position.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The token to read from.
+
+
+
+ Initializes a new instance of the class.
+
+ The token to read from.
+ The initial path of the token. It is prepended to the returned .
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Specifies the type of token.
+
+
+
+
+ No token type has been set.
+
+
+
+
+ A JSON object.
+
+
+
+
+ A JSON array.
+
+
+
+
+ A JSON constructor.
+
+
+
+
+ A JSON object property.
+
+
+
+
+ A comment.
+
+
+
+
+ An integer value.
+
+
+
+
+ A float value.
+
+
+
+
+ A string value.
+
+
+
+
+ A boolean value.
+
+
+
+
+ A null value.
+
+
+
+
+ An undefined value.
+
+
+
+
+ A date value.
+
+
+
+
+ A raw JSON value.
+
+
+
+
+ A collection of bytes value.
+
+
+
+
+ A Guid value.
+
+
+
+
+ A Uri value.
+
+
+
+
+ A TimeSpan value.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Gets the at the writer's current position.
+
+
+
+
+ Gets the token being written.
+
+ The token being written.
+
+
+
+ Initializes a new instance of the class writing to the given .
+
+ The container being written to.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Flushes whatever is in the buffer to the underlying .
+
+
+
+
+ Closes this writer.
+ If is set to true, the JSON is auto-completed.
+
+
+ Setting to true has no additional effect, since the underlying is a type that cannot be closed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the end.
+
+ The token.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Writes a value.
+ An error will be raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Represents a value in JSON (string, integer, date, etc).
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Creates a comment with the given value.
+
+ The value.
+ A comment with the given value.
+
+
+
+ Creates a string with the given value.
+
+ The value.
+ A string with the given value.
+
+
+
+ Creates a null value.
+
+ A null value.
+
+
+
+ Creates a undefined value.
+
+ A undefined value.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets or sets the underlying token value.
+
+ The underlying token value.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of s which will be used when writing the token.
+
+
+
+ Indicates whether the current object is equal to another object of the same type.
+
+
+ true if the current object is equal to the parameter; otherwise, false.
+
+ An object to compare with this object.
+
+
+
+ Determines whether the specified is equal to the current .
+
+ The to compare with the current .
+
+ true if the specified is equal to the current ; otherwise, false.
+
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Returns a that represents this instance.
+
+
+ ToString() returns a non-JSON string value for tokens with a type of .
+ If you want the JSON for all token types then you should use .
+
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format.
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format provider.
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format.
+ The format provider.
+
+ A that represents this instance.
+
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
+
+ An object to compare with this instance.
+
+ A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings:
+ Value
+ Meaning
+ Less than zero
+ This instance is less than .
+ Zero
+ This instance is equal to .
+ Greater than zero
+ This instance is greater than .
+
+
+ is not of the same type as this instance.
+
+
+
+
+ Specifies how line information is handled when loading JSON.
+
+
+
+
+ Ignore line information.
+
+
+
+
+ Load line information.
+
+
+
+
+ Specifies how JSON arrays are merged together.
+
+
+
+ Concatenate arrays.
+
+
+ Union arrays, skipping items that already exist.
+
+
+ Replace all array items.
+
+
+ Merge array items together, matched by index.
+
+
+
+ Specifies how null value properties are merged.
+
+
+
+
+ The content's null value properties will be ignored during merging.
+
+
+
+
+ The content's null value properties will be merged.
+
+
+
+
+ Specifies the member serialization options for the .
+
+
+
+
+ All public members are serialized by default. Members can be excluded using or .
+ This is the default member serialization mode.
+
+
+
+
+ Only members marked with or are serialized.
+ This member serialization mode can also be set by marking the class with .
+
+
+
+
+ All public and private fields are serialized. Members can be excluded using or .
+ This member serialization mode can also be set by marking the class with
+ and setting IgnoreSerializableAttribute on to false.
+
+
+
+
+ Specifies metadata property handling options for the .
+
+
+
+
+ Read metadata properties located at the start of a JSON object.
+
+
+
+
+ Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance.
+
+
+
+
+ Do not try to read metadata properties.
+
+
+
+
+ Specifies missing member handling options for the .
+
+
+
+
+ Ignore a missing member and do not attempt to deserialize it.
+
+
+
+
+ Throw a when a missing member is encountered during deserialization.
+
+
+
+
+ Specifies null value handling options for the .
+
+
+
+
+
+
+
+
+ Include null values when serializing and deserializing objects.
+
+
+
+
+ Ignore null values when serializing and deserializing objects.
+
+
+
+
+ Specifies how object creation is handled by the .
+
+
+
+
+ Reuse existing objects, create new objects when needed.
+
+
+
+
+ Only reuse existing objects.
+
+
+
+
+ Always create new objects.
+
+
+
+
+ Specifies reference handling options for the .
+ Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement .
+
+
+
+
+
+
+
+ Do not preserve references when serializing types.
+
+
+
+
+ Preserve references when serializing into a JSON object structure.
+
+
+
+
+ Preserve references when serializing into a JSON array structure.
+
+
+
+
+ Preserve references when serializing.
+
+
+
+
+ Specifies reference loop handling options for the .
+
+
+
+
+ Throw a when a loop is encountered.
+
+
+
+
+ Ignore loop references and do not serialize.
+
+
+
+
+ Serialize loop references.
+
+
+
+
+ Indicating whether a property is required.
+
+
+
+
+ The property is not required. The default state.
+
+
+
+
+ The property must be defined in JSON but can be a null value.
+
+
+
+
+ The property must be defined in JSON and cannot be a null value.
+
+
+
+
+ The property is not required but it cannot be a null value.
+
+
+
+
+
+ Contains the JSON schema extension methods.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+
+ Determines whether the is valid.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+
+ true if the specified is valid; otherwise, false.
+
+
+
+
+
+ Determines whether the is valid.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+ When this method returns, contains any error messages generated while validating.
+
+ true if the specified is valid; otherwise, false.
+
+
+
+
+
+ Validates the specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+
+
+
+
+ Validates the specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+ The validation event handler.
+
+
+
+
+ An in-memory representation of a JSON Schema.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets the id.
+
+
+
+
+ Gets or sets the title.
+
+
+
+
+ Gets or sets whether the object is required.
+
+
+
+
+ Gets or sets whether the object is read-only.
+
+
+
+
+ Gets or sets whether the object is visible to users.
+
+
+
+
+ Gets or sets whether the object is transient.
+
+
+
+
+ Gets or sets the description of the object.
+
+
+
+
+ Gets or sets the types of values allowed by the object.
+
+ The type.
+
+
+
+ Gets or sets the pattern.
+
+ The pattern.
+
+
+
+ Gets or sets the minimum length.
+
+ The minimum length.
+
+
+
+ Gets or sets the maximum length.
+
+ The maximum length.
+
+
+
+ Gets or sets a number that the value should be divisible by.
+
+ A number that the value should be divisible by.
+
+
+
+ Gets or sets the minimum.
+
+ The minimum.
+
+
+
+ Gets or sets the maximum.
+
+ The maximum.
+
+
+
+ Gets or sets a flag indicating whether the value can not equal the number defined by the minimum attribute ().
+
+ A flag indicating whether the value can not equal the number defined by the minimum attribute ().
+
+
+
+ Gets or sets a flag indicating whether the value can not equal the number defined by the maximum attribute ().
+
+ A flag indicating whether the value can not equal the number defined by the maximum attribute ().
+
+
+
+ Gets or sets the minimum number of items.
+
+ The minimum number of items.
+
+
+
+ Gets or sets the maximum number of items.
+
+ The maximum number of items.
+
+
+
+ Gets or sets the of items.
+
+ The of items.
+
+
+
+ Gets or sets a value indicating whether items in an array are validated using the instance at their array position from .
+
+
+ true if items are validated using their array position; otherwise, false.
+
+
+
+
+ Gets or sets the of additional items.
+
+ The of additional items.
+
+
+
+ Gets or sets a value indicating whether additional items are allowed.
+
+
+ true if additional items are allowed; otherwise, false.
+
+
+
+
+ Gets or sets whether the array items must be unique.
+
+
+
+
+ Gets or sets the of properties.
+
+ The of properties.
+
+
+
+ Gets or sets the of additional properties.
+
+ The of additional properties.
+
+
+
+ Gets or sets the pattern properties.
+
+ The pattern properties.
+
+
+
+ Gets or sets a value indicating whether additional properties are allowed.
+
+
+ true if additional properties are allowed; otherwise, false.
+
+
+
+
+ Gets or sets the required property if this property is present.
+
+ The required property if this property is present.
+
+
+
+ Gets or sets the a collection of valid enum values allowed.
+
+ A collection of valid enum values allowed.
+
+
+
+ Gets or sets disallowed types.
+
+ The disallowed types.
+
+
+
+ Gets or sets the default value.
+
+ The default value.
+
+
+
+ Gets or sets the collection of that this schema extends.
+
+ The collection of that this schema extends.
+
+
+
+ Gets or sets the format.
+
+ The format.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads a from the specified .
+
+ The containing the JSON Schema to read.
+ The object representing the JSON Schema.
+
+
+
+ Reads a from the specified .
+
+ The containing the JSON Schema to read.
+ The to use when resolving schema references.
+ The object representing the JSON Schema.
+
+
+
+ Load a from a string that contains JSON Schema.
+
+ A that contains JSON Schema.
+ A populated from the string that contains JSON Schema.
+
+
+
+ Load a from a string that contains JSON Schema using the specified .
+
+ A that contains JSON Schema.
+ The resolver.
+ A populated from the string that contains JSON Schema.
+
+
+
+ Writes this schema to a .
+
+ A into which this method will write.
+
+
+
+ Writes this schema to a using the specified .
+
+ A into which this method will write.
+ The resolver used.
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+
+ Returns detailed information about the schema exception.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class.
+
+ The that holds the serialized object data about the exception being thrown.
+ The that contains contextual information about the source or destination.
+ The parameter is null.
+ The class name is null or is zero (0).
+
+
+
+
+ Generates a from a specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets how undefined schemas are handled by the serializer.
+
+
+
+
+ Gets or sets the contract resolver.
+
+ The contract resolver.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ The used to resolve schema references.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ Specify whether the generated root will be nullable.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ The used to resolve schema references.
+ Specify whether the generated root will be nullable.
+ A generated from the specified type.
+
+
+
+
+ Resolves from an id.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets the loaded schemas.
+
+ The loaded schemas.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets a for the specified reference.
+
+ The id.
+ A for the specified reference.
+
+
+
+
+ The value types allowed by the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ No type specified.
+
+
+
+
+ String type.
+
+
+
+
+ Float type.
+
+
+
+
+ Integer type.
+
+
+
+
+ Boolean type.
+
+
+
+
+ Object type.
+
+
+
+
+ Array type.
+
+
+
+
+ Null type.
+
+
+
+
+ Any type.
+
+
+
+
+
+ Specifies undefined schema Id handling options for the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Do not infer a schema Id.
+
+
+
+
+ Use the .NET type name as the schema Id.
+
+
+
+
+ Use the assembly qualified .NET type name as the schema Id.
+
+
+
+
+
+ Returns detailed information related to the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets the associated with the validation error.
+
+ The JsonSchemaException associated with the validation error.
+
+
+
+ Gets the path of the JSON location where the validation error occurred.
+
+ The path of the JSON location where the validation error occurred.
+
+
+
+ Gets the text description corresponding to the validation error.
+
+ The text description.
+
+
+
+
+ Represents the callback method that will handle JSON schema validation events and the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ A camel case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Resolves member mappings for a type, camel casing property names.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Used by to resolve a for a given .
+
+
+
+
+ Gets a value indicating whether members are being get and set using dynamic code generation.
+ This value is determined by the runtime permissions available.
+
+
+ true if using dynamic code generation; otherwise, false.
+
+
+
+
+ Gets or sets the default members search flags.
+
+ The default members search flags.
+
+
+
+ Gets or sets a value indicating whether compiler generated members should be serialized.
+
+
+ true if serialized compiler generated members; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types.
+
+
+ true if the interface will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore the attribute when serializing and deserializing types.
+
+
+ true if the attribute will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore IsSpecified members when serializing and deserializing types.
+
+
+ true if the IsSpecified members will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore ShouldSerialize members when serializing and deserializing types.
+
+
+ true if the ShouldSerialize members will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets the naming strategy used to resolve how property names and dictionary keys are serialized.
+
+ The naming strategy used to resolve how property names and dictionary keys are serialized.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Gets the serializable members for the type.
+
+ The type to get serializable members for.
+ The serializable members for the type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates the constructor parameters.
+
+ The constructor to create properties for.
+ The type's member properties.
+ Properties for the given .
+
+
+
+ Creates a for the given .
+
+ The matching member property.
+ The constructor parameter.
+ A created for the given .
+
+
+
+ Resolves the default for the contract.
+
+ Type of the object.
+ The contract's default .
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Determines which contract type is created for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates properties for the given .
+
+ The type to create properties for.
+ /// The member serialization mode for the type.
+ Properties for the given .
+
+
+
+ Creates the used by the serializer to get and set values from a member.
+
+ The member.
+ The used by the serializer to get and set values from a member.
+
+
+
+ Creates a for the given .
+
+ The member's parent .
+ The member to create a for.
+ A created for the given .
+
+
+
+ Resolves the name of the property.
+
+ Name of the property.
+ Resolved name of the property.
+
+
+
+ Resolves the name of the extension data. By default no changes are made to extension data names.
+
+ Name of the extension data.
+ Resolved name of the extension data.
+
+
+
+ Resolves the key of the dictionary. By default is used to resolve dictionary keys.
+
+ Key of the dictionary.
+ Resolved key of the dictionary.
+
+
+
+ Gets the resolved name of the property.
+
+ Name of the property.
+ Name of the property.
+
+
+
+ The default naming strategy. Property names and dictionary keys are unchanged.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ The default serialization binder used when resolving and loading classes from type names.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+ The type of the object the formatter creates a new instance of.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ Represents a trace writer that writes to the application's instances.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Provides information surrounding an error.
+
+
+
+
+ Gets the error.
+
+ The error.
+
+
+
+ Gets the original object that caused the error.
+
+ The original object that caused the error.
+
+
+
+ Gets the member that caused the error.
+
+ The member that caused the error.
+
+
+
+ Gets the path of the JSON location where the error occurred.
+
+ The path of the JSON location where the error occurred.
+
+
+
+ Gets or sets a value indicating whether this is handled.
+
+ true if handled; otherwise, false.
+
+
+
+ Provides data for the Error event.
+
+
+
+
+ Gets the current object the error event is being raised against.
+
+ The current object the error event is being raised against.
+
+
+
+ Gets the error context.
+
+ The error context.
+
+
+
+ Initializes a new instance of the class.
+
+ The current object.
+ The error context.
+
+
+
+ Get and set values for a using dynamic methods.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Provides methods to get attributes.
+
+
+
+
+ Returns a collection of all of the attributes, or an empty collection if there are no attributes.
+
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Returns a collection of attributes, identified by type, or an empty collection if there are no attributes.
+
+ The type of the attributes.
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Used by to resolve a for a given .
+
+
+
+
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Used to resolve references when serializing and deserializing JSON by the .
+
+
+
+
+ Resolves a reference to its object.
+
+ The serialization context.
+ The reference to resolve.
+ The object that was resolved from the reference.
+
+
+
+ Gets the reference for the specified object.
+
+ The serialization context.
+ The object to get a reference for.
+ The reference to the object.
+
+
+
+ Determines whether the specified object is referenced.
+
+ The serialization context.
+ The object to test for a reference.
+
+ true if the specified object is referenced; otherwise, false.
+
+
+
+
+ Adds a reference to the specified object.
+
+ The serialization context.
+ The reference.
+ The object to reference.
+
+
+
+ Allows users to control class loading and mandate what class to load.
+
+
+
+
+ When implemented, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object
+ The type of the object the formatter creates a new instance of.
+
+
+
+ When implemented, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ Represents a trace writer.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Provides methods to get and set values.
+
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the of the collection items.
+
+ The of the collection items.
+
+
+
+ Gets a value indicating whether the collection type is a multidimensional array.
+
+ true if the collection type is a multidimensional array; otherwise, false.
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+
+ The function used to create the object.
+
+
+
+ Gets a value indicating whether the creator has a parameter with the collection values.
+
+ true if the creator has a parameter with the collection values; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the default collection items .
+
+ The converter.
+
+
+
+ Gets or sets a value indicating whether the collection items preserve object references.
+
+ true if collection items preserve object references; otherwise, false.
+
+
+
+ Gets or sets the collection item reference loop handling.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the collection item type name handling.
+
+ The type name handling.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Handles serialization callback events.
+
+ The object that raised the callback event.
+ The streaming context.
+
+
+
+ Handles serialization error callback events.
+
+ The object that raised the callback event.
+ The streaming context.
+ The error context.
+
+
+
+ Sets extension data for an object during deserialization.
+
+ The object to set extension data on.
+ The extension data key.
+ The extension data value.
+
+
+
+ Gets extension data for an object during serialization.
+
+ The object to set extension data on.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the underlying type for the contract.
+
+ The underlying type for the contract.
+
+
+
+ Gets or sets the type created during deserialization.
+
+ The type created during deserialization.
+
+
+
+ Gets or sets whether this type contract is serialized as a reference.
+
+ Whether this type contract is serialized as a reference.
+
+
+
+ Gets or sets the default for this contract.
+
+ The converter.
+
+
+
+ Gets the internally resolved for the contract's type.
+ This converter is used as a fallback converter when no other converter is resolved.
+ Setting will always override this converter.
+
+
+
+
+ Gets or sets all methods called immediately after deserialization of the object.
+
+ The methods called immediately after deserialization of the object.
+
+
+
+ Gets or sets all methods called during deserialization of the object.
+
+ The methods called during deserialization of the object.
+
+
+
+ Gets or sets all methods called after serialization of the object graph.
+
+ The methods called after serialization of the object graph.
+
+
+
+ Gets or sets all methods called before serialization of the object.
+
+ The methods called before serialization of the object.
+
+
+
+ Gets or sets all method called when an error is thrown during the serialization of the object.
+
+ The methods called when an error is thrown during the serialization of the object.
+
+
+
+ Gets or sets the default creator method used to create the object.
+
+ The default creator method used to create the object.
+
+
+
+ Gets or sets a value indicating whether the default creator is non-public.
+
+ true if the default object creator is non-public; otherwise, false.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the dictionary key resolver.
+
+ The dictionary key resolver.
+
+
+
+ Gets the of the dictionary keys.
+
+ The of the dictionary keys.
+
+
+
+ Gets the of the dictionary values.
+
+ The of the dictionary values.
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+
+ The function used to create the object.
+
+
+
+ Gets a value indicating whether the creator has a parameter with the dictionary values.
+
+ true if the creator has a parameter with the dictionary values; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the object's properties.
+
+ The object's properties.
+
+
+
+ Gets or sets the property name resolver.
+
+ The property name resolver.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the object constructor.
+
+ The object constructor.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the object member serialization.
+
+ The member object serialization.
+
+
+
+ Gets or sets the missing member handling used when deserializing this object.
+
+ The missing member handling.
+
+
+
+ Gets or sets a value that indicates whether the object's properties are required.
+
+
+ A value indicating whether the object's properties are required.
+
+
+
+
+ Gets or sets how the object's properties with null values are handled during serialization and deserialization.
+
+ How the object's properties with null values are handled during serialization and deserialization.
+
+
+
+ Gets the object's properties.
+
+ The object's properties.
+
+
+
+ Gets a collection of instances that define the parameters used with .
+
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+ This function is called with a collection of arguments which are defined by the collection.
+
+ The function used to create the object.
+
+
+
+ Gets or sets the extension data setter.
+
+
+
+
+ Gets or sets the extension data getter.
+
+
+
+
+ Gets or sets the extension data value type.
+
+
+
+
+ Gets or sets the extension data name resolver.
+
+ The extension data name resolver.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Maps a JSON property to a .NET member or constructor parameter.
+
+
+
+
+ Gets or sets the name of the property.
+
+ The name of the property.
+
+
+
+ Gets or sets the type that declared this property.
+
+ The type that declared this property.
+
+
+
+ Gets or sets the order of serialization of a member.
+
+ The numeric order of serialization.
+
+
+
+ Gets or sets the name of the underlying member or parameter.
+
+ The name of the underlying member or parameter.
+
+
+
+ Gets the that will get and set the during serialization.
+
+ The that will get and set the during serialization.
+
+
+
+ Gets or sets the for this property.
+
+ The for this property.
+
+
+
+ Gets or sets the type of the property.
+
+ The type of the property.
+
+
+
+ Gets or sets the for the property.
+ If set this converter takes precedence over the contract converter for the property type.
+
+ The converter.
+
+
+
+ Gets or sets the member converter.
+
+ The member converter.
+
+
+
+ Gets or sets a value indicating whether this is ignored.
+
+ true if ignored; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this is readable.
+
+ true if readable; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this is writable.
+
+ true if writable; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this has a member attribute.
+
+ true if has a member attribute; otherwise, false.
+
+
+
+ Gets the default value.
+
+ The default value.
+
+
+
+ Gets or sets a value indicating whether this is required.
+
+ A value indicating whether this is required.
+
+
+
+ Gets a value indicating whether has a value specified.
+
+
+
+
+ Gets or sets a value indicating whether this property preserves object references.
+
+
+ true if this instance is reference; otherwise, false.
+
+
+
+
+ Gets or sets the property null value handling.
+
+ The null value handling.
+
+
+
+ Gets or sets the property default value handling.
+
+ The default value handling.
+
+
+
+ Gets or sets the property reference loop handling.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the property object creation handling.
+
+ The object creation handling.
+
+
+
+ Gets or sets or sets the type name handling.
+
+ The type name handling.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be serialized.
+
+ A predicate used to determine whether the property should be serialized.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be deserialized.
+
+ A predicate used to determine whether the property should be deserialized.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be serialized.
+
+ A predicate used to determine whether the property should be serialized.
+
+
+
+ Gets or sets an action used to set whether the property has been deserialized.
+
+ An action used to set whether the property has been deserialized.
+
+
+
+ Returns a that represents this instance.
+
+
+ A that represents this instance.
+
+
+
+
+ Gets or sets the converter used when serializing the property's collection items.
+
+ The collection's items converter.
+
+
+
+ Gets or sets whether this property's collection items are serialized as a reference.
+
+ Whether this property's collection items are serialized as a reference.
+
+
+
+ Gets or sets the type name handling used when serializing the property's collection items.
+
+ The collection's items type name handling.
+
+
+
+ Gets or sets the reference loop handling used when serializing the property's collection items.
+
+ The collection's items reference loop handling.
+
+
+
+ A collection of objects.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The type.
+
+
+
+ When implemented in a derived class, extracts the key from the specified element.
+
+ The element from which to extract the key.
+ The key for the specified element.
+
+
+
+ Adds a object.
+
+ The property to add to the collection.
+
+
+
+ Gets the closest matching object.
+ First attempts to get an exact case match of and then
+ a case insensitive match.
+
+ Name of the property.
+ A matching property if found.
+
+
+
+ Gets a property by property name.
+
+ The name of the property to get.
+ Type property name string comparison.
+ A matching property if found.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Lookup and create an instance of the type described by the argument.
+
+ The type to create.
+ Optional arguments to pass to an initializing constructor of the JsonConverter.
+ If null, the default constructor is used.
+
+
+
+ A kebab case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Represents a trace writer that writes to memory. When the trace message limit is
+ reached then old trace messages will be removed as new messages are added.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Returns an enumeration of the most recent trace messages.
+
+ An enumeration of the most recent trace messages.
+
+
+
+ Returns a of the most recent trace messages.
+
+
+ A of the most recent trace messages.
+
+
+
+
+ A base class for resolving how property names and dictionary keys are serialized.
+
+
+
+
+ A flag indicating whether dictionary keys should be processed.
+ Defaults to false.
+
+
+
+
+ A flag indicating whether extension data names should be processed.
+ Defaults to false.
+
+
+
+
+ A flag indicating whether explicitly specified property names,
+ e.g. a property name customized with a , should be processed.
+ Defaults to false.
+
+
+
+
+ Gets the serialized name for a given property name.
+
+ The initial property name.
+ A flag indicating whether the property has had a name explicitly specified.
+ The serialized property name.
+
+
+
+ Gets the serialized name for a given extension data name.
+
+ The initial extension data name.
+ The serialized extension data name.
+
+
+
+ Gets the serialized key for a given dictionary key.
+
+ The initial dictionary key.
+ The serialized dictionary key.
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Hash code calculation
+
+
+
+
+
+ Object equality implementation
+
+
+
+
+
+
+ Compare to another NamingStrategy
+
+
+
+
+
+
+ Represents a method that constructs an object.
+
+ The object type to create.
+
+
+
+ When applied to a method, specifies that the method is called when an error occurs serializing an object.
+
+
+
+
+ Provides methods to get attributes from a , , or .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The instance to get attributes for. This parameter should be a , , or .
+
+
+
+ Returns a collection of all of the attributes, or an empty collection if there are no attributes.
+
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Returns a collection of attributes, identified by type, or an empty collection if there are no attributes.
+
+ The type of the attributes.
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Get and set values for a using reflection.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ A snake case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Specifies how strings are escaped when writing JSON text.
+
+
+
+
+ Only control characters (e.g. newline) are escaped.
+
+
+
+
+ All non-ASCII and control characters (e.g. newline) are escaped.
+
+
+
+
+ HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped.
+
+
+
+
+ Indicates the method that will be used during deserialization for locating and loading assemblies.
+
+
+
+
+ In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the LoadWithPartialName method of the class is used to load the assembly.
+
+
+
+
+ In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The Load method of the class is used to load the assembly.
+
+
+
+
+ Specifies type name handling options for the .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+
+
+
+ Do not include the .NET type name when serializing types.
+
+
+
+
+ Include the .NET type name when serializing into a JSON object structure.
+
+
+
+
+ Include the .NET type name when serializing into a JSON array structure.
+
+
+
+
+ Always include the .NET type name when serializing.
+
+
+
+
+ Include the .NET type name when the type of the object being serialized is not the same as its declared type.
+ Note that this doesn't include the root serialized object by default. To include the root object's type name in JSON
+ you must specify a root type object with
+ or .
+
+
+
+
+ Determines whether the collection is null or empty.
+
+ The collection.
+
+ true if the collection is null or empty; otherwise, false.
+
+
+
+
+ Adds the elements of the specified collection to the specified generic .
+
+ The list to add to.
+ The collection of elements to add.
+
+
+
+ Converts the value to the specified type. If the value is unable to be converted, the
+ value is checked whether it assignable to the specified type.
+
+ The value to convert.
+ The culture to use when converting.
+ The type to convert or cast the value to.
+
+ The converted type. If conversion was unsuccessful, the initial value
+ is returned if assignable to the target type.
+
+
+
+
+ Helper method for generating a MetaObject which calls a
+ specific method on Dynamic that returns a result
+
+
+
+
+ Helper method for generating a MetaObject which calls a
+ specific method on Dynamic, but uses one of the arguments for
+ the result.
+
+
+
+
+ Helper method for generating a MetaObject which calls a
+ specific method on Dynamic, but uses one of the arguments for
+ the result.
+
+
+
+
+ Returns a Restrictions object which includes our current restrictions merged
+ with a restriction limiting our type
+
+
+
+
+ Helper class for serializing immutable collections.
+ Note that this is used by all builds, even those that don't support immutable collections, in case the DLL is GACed
+ https://github.com/JamesNK/Newtonsoft.Json/issues/652
+
+
+
+
+ Gets the type of the typed collection's items.
+
+ The type.
+ The type of the typed collection's items.
+
+
+
+ Gets the member's underlying type.
+
+ The member.
+ The underlying type of the member.
+
+
+
+ Determines whether the property is an indexed property.
+
+ The property.
+
+ true if the property is an indexed property; otherwise, false.
+
+
+
+
+ Gets the member's value on the object.
+
+ The member.
+ The target object.
+ The member's value on the object.
+
+
+
+ Sets the member's value on the target object.
+
+ The member.
+ The target.
+ The value.
+
+
+
+ Determines whether the specified MemberInfo can be read.
+
+ The MemberInfo to determine whether can be read.
+ /// if set to true then allow the member to be gotten non-publicly.
+
+ true if the specified MemberInfo can be read; otherwise, false.
+
+
+
+
+ Determines whether the specified MemberInfo can be set.
+
+ The MemberInfo to determine whether can be set.
+ if set to true then allow the member to be set non-publicly.
+ if set to true then allow the member to be set if read-only.
+
+ true if the specified MemberInfo can be set; otherwise, false.
+
+
+
+
+ Builds a string. Unlike this class lets you reuse its internal buffer.
+
+
+
+
+ Determines whether the string is all white space. Empty string will return false.
+
+ The string to test whether it is all white space.
+
+ true if the string is all white space; otherwise, false.
+
+
+
+
+ Specifies the state of the .
+
+
+
+
+ An exception has been thrown, which has left the in an invalid state.
+ You may call the method to put the in the Closed state.
+ Any other method calls result in an being thrown.
+
+
+
+
+ The method has been called.
+
+
+
+
+ An object is being written.
+
+
+
+
+ An array is being written.
+
+
+
+
+ A constructor is being written.
+
+
+
+
+ A property is being written.
+
+
+
+
+ A write method has not been called.
+
+
+
+ Specifies that an output will not be null even if the corresponding type allows it.
+
+
+ Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it.
+
+
+ Initializes the attribute with the specified return value condition.
+
+ The return value condition. If the method returns this value, the associated parameter will not be null.
+
+
+
+ Gets the return value condition.
+
+
+ Specifies that an output may be null even if the corresponding type disallows it.
+
+
+ Specifies that null is allowed as an input even if the corresponding type disallows it.
+
+
+
+ Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
+ the associated parameter matches this value.
+
+
+
+ Gets the condition parameter value.
+
+
+
diff --git a/packages/Newtonsoft.Json.12.0.3/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll b/packages/Newtonsoft.Json.12.0.3/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll
new file mode 100644
index 00000000..112c29ab
Binary files /dev/null and b/packages/Newtonsoft.Json.12.0.3/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll differ
diff --git a/packages/Newtonsoft.Json.12.0.3/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.xml b/packages/Newtonsoft.Json.12.0.3/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.xml
new file mode 100644
index 00000000..f00668b8
--- /dev/null
+++ b/packages/Newtonsoft.Json.12.0.3/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.xml
@@ -0,0 +1,9010 @@
+
+
+
+ Newtonsoft.Json
+
+
+
+
+ Represents a BSON Oid (object id).
+
+
+
+
+ Gets or sets the value of the Oid.
+
+ The value of the Oid.
+
+
+
+ Initializes a new instance of the class.
+
+ The Oid value.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized BSON data.
+
+
+
+
+ Gets or sets a value indicating whether binary data reading should be compatible with incorrect Json.NET 3.5 written binary.
+
+
+ true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether the root object will be read as a JSON array.
+
+
+ true if the root object will be read as a JSON array; otherwise, false.
+
+
+
+
+ Gets or sets the used when reading values from BSON.
+
+ The used when reading values from BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+ if set to true the root object will be read as a JSON array.
+ The used when reading values from BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+ if set to true the root object will be read as a JSON array.
+ The used when reading values from BSON.
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating BSON data.
+
+
+
+
+ Gets or sets the used when writing values to BSON.
+ When set to no conversion will occur.
+
+ The used when writing values to BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The to write to.
+
+
+
+ Initializes a new instance of the class.
+
+ The to write to.
+
+
+
+ Flushes whatever is in the buffer to the underlying and also flushes the underlying stream.
+
+
+
+
+ Writes the end.
+
+ The token.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Closes this writer.
+ If is set to true, the underlying is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value that represents a BSON object id.
+
+ The Object ID value to write.
+
+
+
+ Writes a BSON regex.
+
+ The regex pattern.
+ The regex options.
+
+
+
+ Specifies how constructors are used when initializing objects during deserialization by the .
+
+
+
+
+ First attempt to use the public default constructor, then fall back to a single parameterized constructor, then to the non-public default constructor.
+
+
+
+
+ Json.NET will use a non-public default constructor before falling back to a parameterized constructor.
+
+
+
+
+ Converts a binary value to and from a base 64 string value.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON and BSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Creates a custom object.
+
+ The object type to convert.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Creates an object which will then be populated by the serializer.
+
+ Type of the object.
+ The created object.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+
+ true if this can write JSON; otherwise, false.
+
+
+
+
+ Provides a base class for converting a to and from JSON.
+
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a F# discriminated union type to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from the ISO 8601 date format (e.g. "2008-04-12T12:53Z").
+
+
+
+
+ Gets or sets the date time styles used when converting a date to and from JSON.
+
+ The date time styles used when converting a date to and from JSON.
+
+
+
+ Gets or sets the date time format used when converting a date to and from JSON.
+
+ The date time format used when converting a date to and from JSON.
+
+
+
+ Gets or sets the culture used when converting a date to and from JSON.
+
+ The culture used when converting a date to and from JSON.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from a JavaScript Date constructor (e.g. new Date(52231943)).
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON and BSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an to and from its name string value.
+
+
+
+
+ Gets or sets a value indicating whether the written enum text should be camel case.
+ The default value is false.
+
+ true if the written enum text will be camel case; otherwise, false.
+
+
+
+ Gets or sets the naming strategy used to resolve how enum text is written.
+
+ The naming strategy used to resolve how enum text is written.
+
+
+
+ Gets or sets a value indicating whether integer values are allowed when serializing and deserializing.
+ The default value is true.
+
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ true if the written enum text will be camel case; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The naming strategy used to resolve how enum text is written.
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from Unix epoch time
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from a string (e.g. "1.2.3.4").
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Specifies how dates are formatted when writing JSON text.
+
+
+
+
+ Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z".
+
+
+
+
+ Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/".
+
+
+
+
+ Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text.
+
+
+
+
+ Date formatted strings are not parsed to a date type and are read as strings.
+
+
+
+
+ Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to .
+
+
+
+
+ Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to .
+
+
+
+
+ Specifies how to treat the time value when converting between string and .
+
+
+
+
+ Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time.
+
+
+
+
+ Treat as a UTC. If the object represents a local time, it is converted to a UTC.
+
+
+
+
+ Treat as a local time if a is being converted to a string.
+ If a string is being converted to , convert to a local time if a time zone is specified.
+
+
+
+
+ Time zone information should be preserved when converting.
+
+
+
+
+ The default JSON name table implementation.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets a string containing the same characters as the specified range of characters in the given array.
+
+ The character array containing the name to find.
+ The zero-based index into the array specifying the first character of the name.
+ The number of characters in the name.
+ A string containing the same characters as the specified range of characters in the given array.
+
+
+
+ Adds the specified string into name table.
+
+ The string to add.
+ This method is not thread-safe.
+ The resolved string.
+
+
+
+ Specifies default value handling options for the .
+
+
+
+
+
+
+
+
+ Include members where the member value is the same as the member's default value when serializing objects.
+ Included members are written to JSON. Has no effect when deserializing.
+
+
+
+
+ Ignore members where the member value is the same as the member's default value when serializing objects
+ so that it is not written to JSON.
+ This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers,
+ decimals and floating point numbers; and false for booleans). The default value ignored can be changed by
+ placing the on the property.
+
+
+
+
+ Members with a default value but no JSON will be set to their default value when deserializing.
+
+
+
+
+ Ignore members where the member value is the same as the member's default value when serializing objects
+ and set members to their default value when deserializing.
+
+
+
+
+ Specifies float format handling options when writing special floating point numbers, e.g. ,
+ and with .
+
+
+
+
+ Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity".
+
+
+
+
+ Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity.
+ Note that this will produce non-valid JSON.
+
+
+
+
+ Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a of property.
+
+
+
+
+ Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+
+
+
+
+ Floating point numbers are parsed to .
+
+
+
+
+ Floating point numbers are parsed to .
+
+
+
+
+ Specifies formatting options for the .
+
+
+
+
+ No special formatting is applied. This is the default.
+
+
+
+
+ Causes child objects to be indented according to the and settings.
+
+
+
+
+ Provides an interface for using pooled arrays.
+
+ The array type content.
+
+
+
+ Rent an array from the pool. This array must be returned when it is no longer needed.
+
+ The minimum required length of the array. The returned array may be longer.
+ The rented array from the pool. This array must be returned when it is no longer needed.
+
+
+
+ Return an array to the pool.
+
+ The array that is being returned.
+
+
+
+ Provides an interface to enable a class to return line and position information.
+
+
+
+
+ Gets a value indicating whether the class can return line information.
+
+
+ true if and can be provided; otherwise, false.
+
+
+
+
+ Gets the current line number.
+
+ The current line number or 0 if no line information is available (for example, when returns false).
+
+
+
+ Gets the current line position.
+
+ The current line position or 0 if no line information is available (for example, when returns false).
+
+
+
+ Instructs the how to serialize the collection.
+
+
+
+
+ Gets or sets a value indicating whether null items are allowed in the collection.
+
+ true if null items are allowed in the collection; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with a flag indicating whether the array can contain null items.
+
+ A flag indicating whether the array can contain null items.
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Instructs the to use the specified constructor when deserializing that object.
+
+
+
+
+ Instructs the how to serialize the object.
+
+
+
+
+ Gets or sets the id.
+
+ The id.
+
+
+
+ Gets or sets the title.
+
+ The title.
+
+
+
+ Gets or sets the description.
+
+ The description.
+
+
+
+ Gets or sets the collection's items converter.
+
+ The collection's items converter.
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonContainer(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets a value that indicates whether to preserve object references.
+
+
+ true to keep object reference; otherwise, false. The default is false.
+
+
+
+
+ Gets or sets a value that indicates whether to preserve collection's items references.
+
+
+ true to keep collection's items object references; otherwise, false. The default is false.
+
+
+
+
+ Gets or sets the reference loop handling used when serializing the collection's items.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the type name handling used when serializing the collection's items.
+
+ The type name handling.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Provides methods for converting between .NET types and JSON types.
+
+
+
+
+
+
+
+ Gets or sets a function that creates default .
+ Default settings are automatically used by serialization methods on ,
+ and and on .
+ To serialize without using any default settings create a with
+ .
+
+
+
+
+ Represents JavaScript's boolean value true as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's boolean value false as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's null as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's undefined as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's positive infinity as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's negative infinity as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's NaN as a string. This field is read-only.
+
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation using the specified.
+
+ The value to convert.
+ The format the date will be converted to.
+ The time zone handling when the date is converted to a string.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation using the specified.
+
+ The value to convert.
+ The format the date will be converted to.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ The string delimiter character.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ The string delimiter character.
+ The string escape handling.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Serializes the specified object to a JSON string.
+
+ The object to serialize.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using formatting.
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a collection of .
+
+ The object to serialize.
+ A collection of converters used while serializing.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using formatting and a collection of .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ A collection of converters used while serializing.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using .
+
+ The object to serialize.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a type, formatting and .
+
+ The object to serialize.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using formatting and .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a type, formatting and .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+ A JSON string representation of the object.
+
+
+
+
+ Deserializes the JSON to a .NET object.
+
+ The JSON to deserialize.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to a .NET object using .
+
+ The JSON to deserialize.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type.
+
+ The JSON to deserialize.
+ The of object being deserialized.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type.
+
+ The type of the object to deserialize to.
+ The JSON to deserialize.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the given anonymous type.
+
+
+ The anonymous type to deserialize to. This can't be specified
+ traditionally and must be inferred from the anonymous type passed
+ as a parameter.
+
+ The JSON to deserialize.
+ The anonymous type object.
+ The deserialized anonymous type from the JSON string.
+
+
+
+ Deserializes the JSON to the given anonymous type using .
+
+
+ The anonymous type to deserialize to. This can't be specified
+ traditionally and must be inferred from the anonymous type passed
+ as a parameter.
+
+ The JSON to deserialize.
+ The anonymous type object.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized anonymous type from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using a collection of .
+
+ The type of the object to deserialize to.
+ The JSON to deserialize.
+ Converters to use while deserializing.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using .
+
+ The type of the object to deserialize to.
+ The object to deserialize.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using a collection of .
+
+ The JSON to deserialize.
+ The type of the object to deserialize.
+ Converters to use while deserializing.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using .
+
+ The JSON to deserialize.
+ The type of the object to deserialize to.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Populates the object with values from the JSON string.
+
+ The JSON to populate values from.
+ The target object to populate values onto.
+
+
+
+ Populates the object with values from the JSON string using .
+
+ The JSON to populate values from.
+ The target object to populate values onto.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+
+
+
+ Converts an object to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can read JSON.
+
+ true if this can read JSON; otherwise, false.
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+ true if this can write JSON; otherwise, false.
+
+
+
+ Converts an object to and from JSON.
+
+ The object type to convert.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read. If there is no existing value then null will be used.
+ The existing value has a value.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Instructs the to use the specified when serializing the member or class.
+
+
+
+
+ Gets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+
+
+
+
+ Initializes a new instance of the class.
+
+ Type of the .
+
+
+
+ Initializes a new instance of the class.
+
+ Type of the .
+ Parameter list to use when constructing the . Can be null.
+
+
+
+ Represents a collection of .
+
+
+
+
+ Instructs the how to serialize the collection.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ The exception thrown when an error occurs during JSON serialization or deserialization.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Instructs the to deserialize properties with no matching class member into the specified collection
+ and write values during serialization.
+
+
+
+
+ Gets or sets a value that indicates whether to write extension data when serializing the object.
+
+
+ true to write extension data when serializing the object; otherwise, false. The default is true.
+
+
+
+
+ Gets or sets a value that indicates whether to read extension data when deserializing the object.
+
+
+ true to read extension data when deserializing the object; otherwise, false. The default is true.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Instructs the not to serialize the public field or public read/write property value.
+
+
+
+
+ Base class for a table of atomized string objects.
+
+
+
+
+ Gets a string containing the same characters as the specified range of characters in the given array.
+
+ The character array containing the name to find.
+ The zero-based index into the array specifying the first character of the name.
+ The number of characters in the name.
+ A string containing the same characters as the specified range of characters in the given array.
+
+
+
+ Instructs the how to serialize the object.
+
+
+
+
+ Gets or sets the member serialization.
+
+ The member serialization.
+
+
+
+ Gets or sets the missing member handling used when deserializing this object.
+
+ The missing member handling.
+
+
+
+ Gets or sets how the object's properties with null values are handled during serialization and deserialization.
+
+ How the object's properties with null values are handled during serialization and deserialization.
+
+
+
+ Gets or sets a value that indicates whether the object's properties are required.
+
+
+ A value indicating whether the object's properties are required.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified member serialization.
+
+ The member serialization.
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Instructs the to always serialize the member with the specified name.
+
+
+
+
+ Gets or sets the type used when serializing the property's collection items.
+
+ The collection's items type.
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonProperty(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the null value handling used when serializing this property.
+
+ The null value handling.
+
+
+
+ Gets or sets the default value handling used when serializing this property.
+
+ The default value handling.
+
+
+
+ Gets or sets the reference loop handling used when serializing this property.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the object creation handling used when deserializing this property.
+
+ The object creation handling.
+
+
+
+ Gets or sets the type name handling used when serializing this property.
+
+ The type name handling.
+
+
+
+ Gets or sets whether this property's value is serialized as a reference.
+
+ Whether this property's value is serialized as a reference.
+
+
+
+ Gets or sets the order of serialization of a member.
+
+ The numeric order of serialization.
+
+
+
+ Gets or sets a value indicating whether this property is required.
+
+
+ A value indicating whether this property is required.
+
+
+
+
+ Gets or sets the name of the property.
+
+ The name of the property.
+
+
+
+ Gets or sets the reference loop handling used when serializing the property's collection items.
+
+ The collection's items reference loop handling.
+
+
+
+ Gets or sets the type name handling used when serializing the property's collection items.
+
+ The collection's items type name handling.
+
+
+
+ Gets or sets whether this property's collection items are serialized as a reference.
+
+ Whether this property's collection items are serialized as a reference.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ Name of the property.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
+
+
+
+
+ Specifies the state of the reader.
+
+
+
+
+ A read method has not been called.
+
+
+
+
+ The end of the file has been reached successfully.
+
+
+
+
+ Reader is at a property.
+
+
+
+
+ Reader is at the start of an object.
+
+
+
+
+ Reader is in an object.
+
+
+
+
+ Reader is at the start of an array.
+
+
+
+
+ Reader is in an array.
+
+
+
+
+ The method has been called.
+
+
+
+
+ Reader has just read a value.
+
+
+
+
+ Reader is at the start of a constructor.
+
+
+
+
+ Reader is in a constructor.
+
+
+
+
+ An error occurred that prevents the read operation from continuing.
+
+
+
+
+ The end of the file has been reached successfully.
+
+
+
+
+ Gets the current reader state.
+
+ The current reader state.
+
+
+
+ Gets or sets a value indicating whether the source should be closed when this reader is closed.
+
+
+ true to close the source when this reader is closed; otherwise false. The default is true.
+
+
+
+
+ Gets or sets a value indicating whether multiple pieces of JSON content can
+ be read from a continuous stream without erroring.
+
+
+ true to support reading multiple pieces of JSON content; otherwise false.
+ The default is false.
+
+
+
+
+ Gets the quotation mark character used to enclose the value of a string.
+
+
+
+
+ Gets or sets how time zones are handled when reading JSON.
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+
+
+
+
+ Gets or sets how custom date formatted strings are parsed when reading JSON.
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+
+
+
+
+ Gets the type of the current JSON token.
+
+
+
+
+ Gets the text value of the current JSON token.
+
+
+
+
+ Gets the .NET type for the current JSON token.
+
+
+
+
+ Gets the depth of the current token in the JSON document.
+
+ The depth of the current token in the JSON document.
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Gets or sets the culture used when reading JSON. Defaults to .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads the next JSON token from the source.
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a [].
+
+ A [] or null if the next JSON token is null. This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Skips the children of the current token.
+
+
+
+
+ Sets the current token.
+
+ The new token.
+
+
+
+ Sets the current token and value.
+
+ The new token.
+ The value.
+
+
+
+ Sets the current token and value.
+
+ The new token.
+ The value.
+ A flag indicating whether the position index inside an array should be updated.
+
+
+
+ Sets the state based on current token type.
+
+
+
+
+ Releases unmanaged and - optionally - managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the source is also closed.
+
+
+
+
+ The exception thrown when an error occurs while reading JSON text.
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The line number indicating where the error occurred.
+ The line position indicating where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Instructs the to always serialize the member, and to require that the member has a value.
+
+
+
+
+ The exception thrown when an error occurs during JSON serialization or deserialization.
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The line number indicating where the error occurred.
+ The line position indicating where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Serializes and deserializes objects into and from the JSON format.
+ The enables you to control how objects are encoded into JSON.
+
+
+
+
+ Occurs when the errors during serialization and deserialization.
+
+
+
+
+ Gets or sets the used by the serializer when resolving references.
+
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+
+
+
+ Gets or sets the used by the serializer when writing trace messages.
+
+ The trace writer.
+
+
+
+ Gets or sets the equality comparer used by the serializer when comparing references.
+
+ The equality comparer.
+
+
+
+ Gets or sets how type name writing and reading is handled by the serializer.
+ The default value is .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how object references are preserved by the serializer.
+ The default value is .
+
+
+
+
+ Gets or sets how reference loops (e.g. a class referencing itself) is handled.
+ The default value is .
+
+
+
+
+ Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how null values are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how default values are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how objects are created during deserialization.
+ The default value is .
+
+ The object creation handling.
+
+
+
+ Gets or sets how constructors are used during deserialization.
+ The default value is .
+
+ The constructor handling.
+
+
+
+ Gets or sets how metadata properties are used during deserialization.
+ The default value is .
+
+ The metadata properties handling.
+
+
+
+ Gets a collection that will be used during serialization.
+
+ Collection that will be used during serialization.
+
+
+
+ Gets or sets the contract resolver used by the serializer when
+ serializing .NET objects to JSON and vice versa.
+
+
+
+
+ Gets or sets the used by the serializer when invoking serialization callback methods.
+
+ The context.
+
+
+
+ Indicates how JSON text output is formatted.
+ The default value is .
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how time zones are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written as JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how and values are formatted when writing JSON text,
+ and the expected date format when reading JSON text.
+ The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
+
+
+
+
+ Gets or sets the culture used when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+ A null value means there is no maximum.
+ The default value is null.
+
+
+
+
+ Gets a value indicating whether there will be a check for additional JSON content after deserializing an object.
+ The default value is false.
+
+
+ true if there will be a check for additional JSON content after deserializing an object; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Creates a new instance.
+ The will not use default settings
+ from .
+
+
+ A new instance.
+ The will not use default settings
+ from .
+
+
+
+
+ Creates a new instance using the specified .
+ The will not use default settings
+ from .
+
+ The settings to be applied to the .
+
+ A new instance using the specified .
+ The will not use default settings
+ from .
+
+
+
+
+ Creates a new instance.
+ The will use default settings
+ from .
+
+
+ A new instance.
+ The will use default settings
+ from .
+
+
+
+
+ Creates a new instance using the specified .
+ The will use default settings
+ from as well as the specified .
+
+ The settings to be applied to the .
+
+ A new instance using the specified .
+ The will use default settings
+ from as well as the specified .
+
+
+
+
+ Populates the JSON values onto the target object.
+
+ The that contains the JSON structure to read values from.
+ The target object to populate values onto.
+
+
+
+ Populates the JSON values onto the target object.
+
+ The that contains the JSON structure to read values from.
+ The target object to populate values onto.
+
+
+
+ Deserializes the JSON structure contained by the specified .
+
+ The that contains the JSON structure to deserialize.
+ The being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The of object being deserialized.
+ The instance of being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The type of the object to deserialize.
+ The instance of being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The of object being deserialized.
+ The instance of being deserialized.
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+ The type of the value being serialized.
+ This parameter is used when is Auto to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+
+
+ Specifies the settings on a object.
+
+
+
+
+ Gets or sets how reference loops (e.g. a class referencing itself) are handled.
+ The default value is .
+
+ Reference loop handling.
+
+
+
+ Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
+ The default value is .
+
+ Missing member handling.
+
+
+
+ Gets or sets how objects are created during deserialization.
+ The default value is .
+
+ The object creation handling.
+
+
+
+ Gets or sets how null values are handled during serialization and deserialization.
+ The default value is .
+
+ Null value handling.
+
+
+
+ Gets or sets how default values are handled during serialization and deserialization.
+ The default value is .
+
+ The default value handling.
+
+
+
+ Gets or sets a collection that will be used during serialization.
+
+ The converters.
+
+
+
+ Gets or sets how object references are preserved by the serializer.
+ The default value is .
+
+ The preserve references handling.
+
+
+
+ Gets or sets how type name writing and reading is handled by the serializer.
+ The default value is .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+ The type name handling.
+
+
+
+ Gets or sets how metadata properties are used during deserialization.
+ The default value is .
+
+ The metadata properties handling.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how constructors are used during deserialization.
+ The default value is .
+
+ The constructor handling.
+
+
+
+ Gets or sets the contract resolver used by the serializer when
+ serializing .NET objects to JSON and vice versa.
+
+ The contract resolver.
+
+
+
+ Gets or sets the equality comparer used by the serializer when comparing references.
+
+ The equality comparer.
+
+
+
+ Gets or sets the used by the serializer when resolving references.
+
+ The reference resolver.
+
+
+
+ Gets or sets a function that creates the used by the serializer when resolving references.
+
+ A function that creates the used by the serializer when resolving references.
+
+
+
+ Gets or sets the used by the serializer when writing trace messages.
+
+ The trace writer.
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+ The binder.
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+ The binder.
+
+
+
+ Gets or sets the error handler called during serialization and deserialization.
+
+ The error handler called during serialization and deserialization.
+
+
+
+ Gets or sets the used by the serializer when invoking serialization callback methods.
+
+ The context.
+
+
+
+ Gets or sets how and values are formatted when writing JSON text,
+ and the expected date format when reading JSON text.
+ The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+ A null value means there is no maximum.
+ The default value is null.
+
+
+
+
+ Indicates how JSON text output is formatted.
+ The default value is .
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how time zones are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written as JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets the culture used when reading JSON.
+ The default value is .
+
+
+
+
+ Gets a value indicating whether there will be a check for additional content after deserializing an object.
+ The default value is false.
+
+
+ true if there will be a check for additional content after deserializing an object; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to JSON text data.
+
+
+
+
+ Initializes a new instance of the class with the specified .
+
+ The containing the JSON data to read.
+
+
+
+ Gets or sets the reader's property name table.
+
+
+
+
+ Gets or sets the reader's character buffer pool.
+
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a [].
+
+ A [] or null if the next JSON token is null. This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Gets a value indicating whether the class can return line information.
+
+
+ true if and can be provided; otherwise, false.
+
+
+
+
+ Gets the current line number.
+
+
+ The current line number or 0 if no line information is available (for example, returns false).
+
+
+
+
+ Gets the current line position.
+
+
+ The current line position or 0 if no line information is available (for example, returns false).
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Gets or sets the writer's character array pool.
+
+
+
+
+ Gets or sets how many s to write for each level in the hierarchy when is set to .
+
+
+
+
+ Gets or sets which character to use to quote attribute values.
+
+
+
+
+ Gets or sets which character to use for indenting when is set to .
+
+
+
+
+ Gets or sets a value indicating whether object names will be surrounded with quotes.
+
+
+
+
+ Initializes a new instance of the class using the specified .
+
+ The to write to.
+
+
+
+ Flushes whatever is in the buffer to the underlying and also flushes the underlying .
+
+
+
+
+ Closes this writer.
+ If is set to true, the underlying is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the specified end token.
+
+ The end token to write.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+
+
+
+ Writes indent characters.
+
+
+
+
+ Writes the JSON value delimiter.
+
+
+
+
+ Writes an indent space.
+
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the given white space.
+
+ The string of white space characters.
+
+
+
+ Specifies the type of JSON token.
+
+
+
+
+ This is returned by the if a read method has not been called.
+
+
+
+
+ An object start token.
+
+
+
+
+ An array start token.
+
+
+
+
+ A constructor start token.
+
+
+
+
+ An object property name.
+
+
+
+
+ A comment.
+
+
+
+
+ Raw JSON.
+
+
+
+
+ An integer.
+
+
+
+
+ A float.
+
+
+
+
+ A string.
+
+
+
+
+ A boolean.
+
+
+
+
+ A null token.
+
+
+
+
+ An undefined token.
+
+
+
+
+ An object end token.
+
+
+
+
+ An array end token.
+
+
+
+
+ A constructor end token.
+
+
+
+
+ A Date.
+
+
+
+
+ Byte data.
+
+
+
+
+
+ Represents a reader that provides validation.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Sets an event handler for receiving schema validation errors.
+
+
+
+
+ Gets the text value of the current JSON token.
+
+
+
+
+
+ Gets the depth of the current token in the JSON document.
+
+ The depth of the current token in the JSON document.
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Gets the quotation mark character used to enclose the value of a string.
+
+
+
+
+
+ Gets the type of the current JSON token.
+
+
+
+
+
+ Gets the .NET type for the current JSON token.
+
+
+
+
+
+ Initializes a new instance of the class that
+ validates the content returned from the given .
+
+ The to read from while validating.
+
+
+
+ Gets or sets the schema.
+
+ The schema.
+
+
+
+ Gets the used to construct this .
+
+ The specified in the constructor.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a [].
+
+
+ A [] or null if the next JSON token is null.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Gets or sets a value indicating whether the destination should be closed when this writer is closed.
+
+
+ true to close the destination when this writer is closed; otherwise false. The default is true.
+
+
+
+
+ Gets or sets a value indicating whether the JSON should be auto-completed when this writer is closed.
+
+
+ true to auto-complete the JSON when this writer is closed; otherwise false. The default is true.
+
+
+
+
+ Gets the top.
+
+ The top.
+
+
+
+ Gets the state of the writer.
+
+
+
+
+ Gets the path of the writer.
+
+
+
+
+ Gets or sets a value indicating how JSON text output should be formatted.
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+
+
+
+
+ Gets or sets how time zones are handled when writing JSON text.
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written to JSON text.
+
+
+
+
+ Gets or sets how and values are formatted when writing JSON text.
+
+
+
+
+ Gets or sets the culture used when writing JSON. Defaults to .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Flushes whatever is in the buffer to the destination and also flushes the destination.
+
+
+
+
+ Closes this writer.
+ If is set to true, the destination is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the end of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the end of an array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the end constructor.
+
+
+
+
+ Writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+
+
+
+ Writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+
+
+
+ Writes the end of the current JSON object or array.
+
+
+
+
+ Writes the current token and its children.
+
+ The to read the token from.
+
+
+
+ Writes the current token.
+
+ The to read the token from.
+ A flag indicating whether the current token's children should be written.
+
+
+
+ Writes the token and its value.
+
+ The to write.
+
+ The value to write.
+ A value is only required for tokens that have an associated value, e.g. the property name for .
+ null can be passed to the method for tokens that don't have a value, e.g. .
+
+
+
+
+ Writes the token.
+
+ The to write.
+
+
+
+ Writes the specified end token.
+
+ The end token to write.
+
+
+
+ Writes indent characters.
+
+
+
+
+ Writes the JSON value delimiter.
+
+
+
+
+ Writes an indent space.
+
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the given white space.
+
+ The string of white space characters.
+
+
+
+ Releases unmanaged and - optionally - managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Sets the state of the .
+
+ The being written.
+ The value being written.
+
+
+
+ The exception thrown when an error occurs while writing JSON text.
+
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Specifies how JSON comments are handled when loading JSON.
+
+
+
+
+ Ignore comments.
+
+
+
+
+ Load comments as a with type .
+
+
+
+
+ Specifies how duplicate property names are handled when loading JSON.
+
+
+
+
+ Replace the existing value when there is a duplicate property. The value of the last property in the JSON object will be used.
+
+
+
+
+ Ignore the new value when there is a duplicate property. The value of the first property in the JSON object will be used.
+
+
+
+
+ Throw a when a duplicate property is encountered.
+
+
+
+
+ Contains the LINQ to JSON extension methods.
+
+
+
+
+ Returns a collection of tokens that contains the ancestors of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains the ancestors of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains every token in the source collection, the ancestors of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains the descendants of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains the descendants of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains every token in the source collection, and the descendants of every token in the source collection.
+
+
+
+ Returns a collection of child properties of every object in the source collection.
+
+ An of that contains the source collection.
+ An of that contains the properties of every object in the source collection.
+
+
+
+ Returns a collection of child values of every object in the source collection with the given key.
+
+ An of that contains the source collection.
+ The token key.
+ An of that contains the values of every token in the source collection with the given key.
+
+
+
+ Returns a collection of child values of every object in the source collection.
+
+ An of that contains the source collection.
+ An of that contains the values of every token in the source collection.
+
+
+
+ Returns a collection of converted child values of every object in the source collection with the given key.
+
+ The type to convert the values to.
+ An of that contains the source collection.
+ The token key.
+ An that contains the converted values of every token in the source collection with the given key.
+
+
+
+ Returns a collection of converted child values of every object in the source collection.
+
+ The type to convert the values to.
+ An of that contains the source collection.
+ An that contains the converted values of every token in the source collection.
+
+
+
+ Converts the value.
+
+ The type to convert the value to.
+ A cast as a of .
+ A converted value.
+
+
+
+ Converts the value.
+
+ The source collection type.
+ The type to convert the value to.
+ A cast as a of .
+ A converted value.
+
+
+
+ Returns a collection of child tokens of every array in the source collection.
+
+ The source collection type.
+ An of that contains the source collection.
+ An of that contains the values of every token in the source collection.
+
+
+
+ Returns a collection of converted child tokens of every array in the source collection.
+
+ An of that contains the source collection.
+ The type to convert the values to.
+ The source collection type.
+ An that contains the converted values of every token in the source collection.
+
+
+
+ Returns the input typed as .
+
+ An of that contains the source collection.
+ The input typed as .
+
+
+
+ Returns the input typed as .
+
+ The source collection type.
+ An of that contains the source collection.
+ The input typed as .
+
+
+
+ Represents a collection of objects.
+
+ The type of token.
+
+
+
+ Gets the of with the specified key.
+
+
+
+
+
+ Represents a JSON array.
+
+
+
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the array.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the array.
+
+
+
+ Loads an from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads an from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+
+
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the values of the specified object.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ The that will be used to read the object.
+ A with the values of the specified object.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets or sets the at the specified index.
+
+
+
+
+
+ Determines the index of a specific item in the .
+
+ The object to locate in the .
+
+ The index of if found in the list; otherwise, -1.
+
+
+
+
+ Inserts an item to the at the specified index.
+
+ The zero-based index at which should be inserted.
+ The object to insert into the .
+
+ is not a valid index in the .
+
+
+
+
+ Removes the item at the specified index.
+
+ The zero-based index of the item to remove.
+
+ is not a valid index in the .
+
+
+
+
+ Returns an enumerator that iterates through the collection.
+
+
+ A of that can be used to iterate through the collection.
+
+
+
+
+ Adds an item to the .
+
+ The object to add to the .
+
+
+
+ Removes all items from the .
+
+
+
+
+ Determines whether the contains a specific value.
+
+ The object to locate in the .
+
+ true if is found in the ; otherwise, false.
+
+
+
+
+ Copies the elements of the to an array, starting at a particular array index.
+
+ The array.
+ Index of the array.
+
+
+
+ Gets a value indicating whether the is read-only.
+
+ true if the is read-only; otherwise, false.
+
+
+
+ Removes the first occurrence of a specific object from the .
+
+ The object to remove from the .
+
+ true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original .
+
+
+
+
+ Represents a JSON constructor.
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets or sets the name of this constructor.
+
+ The constructor name.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified name and content.
+
+ The constructor name.
+ The contents of the constructor.
+
+
+
+ Initializes a new instance of the class with the specified name and content.
+
+ The constructor name.
+ The contents of the constructor.
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ The constructor name.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Represents a token that can contain other tokens.
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Get the first child token of this token.
+
+
+ A containing the first child token of the .
+
+
+
+
+ Get the last child token of this token.
+
+
+ A containing the last child token of the .
+
+
+
+
+ Returns a collection of the child tokens of this token, in document order.
+
+
+ An of containing the child tokens of this , in document order.
+
+
+
+
+ Returns a collection of the child values of this token, in document order.
+
+ The type to convert the values to.
+
+ A containing the child values of this , in document order.
+
+
+
+
+ Returns a collection of the descendant tokens for this token in document order.
+
+ An of containing the descendant tokens of the .
+
+
+
+ Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order.
+
+ An of containing this token, and all the descendant tokens of the .
+
+
+
+ Adds the specified content as children of this .
+
+ The content to be added.
+
+
+
+ Adds the specified content as the first children of this .
+
+ The content to be added.
+
+
+
+ Creates a that can be used to add tokens to the .
+
+ A that is ready to have content written to it.
+
+
+
+ Replaces the child nodes of this token with the specified content.
+
+ The content.
+
+
+
+ Removes the child nodes from this token.
+
+
+
+
+ Merge the specified content into this .
+
+ The content to be merged.
+
+
+
+ Merge the specified content into this using .
+
+ The content to be merged.
+ The used to merge the content.
+
+
+
+ Gets the count of child JSON tokens.
+
+ The count of child JSON tokens.
+
+
+
+ Represents a collection of objects.
+
+ The type of token.
+
+
+
+ An empty collection of objects.
+
+
+
+
+ Initializes a new instance of the struct.
+
+ The enumerable.
+
+
+
+ Returns an enumerator that can be used to iterate through the collection.
+
+
+ A that can be used to iterate through the collection.
+
+
+
+
+ Gets the of with the specified key.
+
+
+
+
+
+ Determines whether the specified is equal to this instance.
+
+ The to compare with this instance.
+
+ true if the specified is equal to this instance; otherwise, false.
+
+
+
+
+ Determines whether the specified is equal to this instance.
+
+ The to compare with this instance.
+
+ true if the specified is equal to this instance; otherwise, false.
+
+
+
+
+ Returns a hash code for this instance.
+
+
+ A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
+
+
+
+
+ Represents a JSON object.
+
+
+
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Occurs when a property value changes.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the object.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the object.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets an of of this object's properties.
+
+ An of of this object's properties.
+
+
+
+ Gets a with the specified name.
+
+ The property name.
+ A with the specified name or null.
+
+
+
+ Gets the with the specified name.
+ The exact name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ The property name.
+ One of the enumeration values that specifies how the strings will be compared.
+ A matched with the specified name or null.
+
+
+
+ Gets a of of this object's property values.
+
+ A of of this object's property values.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets or sets the with the specified property name.
+
+
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+ is not valid JSON.
+
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+ is not valid JSON.
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+ is not valid JSON.
+
+
+
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+ is not valid JSON.
+
+
+
+
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the values of the specified object.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ The that will be used to read the object.
+ A with the values of the specified object.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified property name.
+
+ Name of the property.
+ The with the specified property name.
+
+
+
+ Gets the with the specified property name.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ Name of the property.
+ One of the enumeration values that specifies how the strings will be compared.
+ The with the specified property name.
+
+
+
+ Tries to get the with the specified property name.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ Name of the property.
+ The value.
+ One of the enumeration values that specifies how the strings will be compared.
+ true if a value was successfully retrieved; otherwise, false.
+
+
+
+ Adds the specified property name.
+
+ Name of the property.
+ The value.
+
+
+
+ Determines whether the JSON object has the specified property name.
+
+ Name of the property.
+ true if the JSON object has the specified property name; otherwise, false.
+
+
+
+ Removes the property with the specified name.
+
+ Name of the property.
+ true if item was successfully removed; otherwise, false.
+
+
+
+ Tries to get the with the specified property name.
+
+ Name of the property.
+ The value.
+ true if a value was successfully retrieved; otherwise, false.
+
+
+
+ Returns an enumerator that can be used to iterate through the collection.
+
+
+ A that can be used to iterate through the collection.
+
+
+
+
+ Raises the event with the provided arguments.
+
+ Name of the property.
+
+
+
+ Represents a JSON property.
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets the property name.
+
+ The property name.
+
+
+
+ Gets or sets the property value.
+
+ The property value.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+ The property name.
+ The property content.
+
+
+
+ Initializes a new instance of the class.
+
+ The property name.
+ The property content.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Represents a raw JSON string.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class.
+
+ The raw json.
+
+
+
+ Creates an instance of with the content of the reader's current token.
+
+ The reader.
+ An instance of with the content of the reader's current token.
+
+
+
+ Specifies the settings used when loading JSON.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets or sets how JSON comments are handled when loading JSON.
+ The default value is .
+
+ The JSON comment handling.
+
+
+
+ Gets or sets how JSON line info is handled when loading JSON.
+ The default value is .
+
+ The JSON line info handling.
+
+
+
+ Gets or sets how duplicate property names in JSON objects are handled when loading JSON.
+ The default value is .
+
+ The JSON duplicate property name handling.
+
+
+
+ Specifies the settings used when merging JSON.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets or sets the method used when merging JSON arrays.
+
+ The method used when merging JSON arrays.
+
+
+
+ Gets or sets how null value properties are merged.
+
+ How null value properties are merged.
+
+
+
+ Gets or sets the comparison used to match property names while merging.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ The comparison used to match property names while merging.
+
+
+
+ Represents an abstract JSON token.
+
+
+
+
+ Gets a comparer that can compare two tokens for value equality.
+
+ A that can compare two nodes for value equality.
+
+
+
+ Gets or sets the parent.
+
+ The parent.
+
+
+
+ Gets the root of this .
+
+ The root of this .
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Compares the values of two tokens, including the values of all descendant tokens.
+
+ The first to compare.
+ The second to compare.
+ true if the tokens are equal; otherwise false.
+
+
+
+ Gets the next sibling token of this node.
+
+ The that contains the next sibling token.
+
+
+
+ Gets the previous sibling token of this node.
+
+ The that contains the previous sibling token.
+
+
+
+ Gets the path of the JSON token.
+
+
+
+
+ Adds the specified content immediately after this token.
+
+ A content object that contains simple content or a collection of content objects to be added after this token.
+
+
+
+ Adds the specified content immediately before this token.
+
+ A content object that contains simple content or a collection of content objects to be added before this token.
+
+
+
+ Returns a collection of the ancestor tokens of this token.
+
+ A collection of the ancestor tokens of this token.
+
+
+
+ Returns a collection of tokens that contain this token, and the ancestors of this token.
+
+ A collection of tokens that contain this token, and the ancestors of this token.
+
+
+
+ Returns a collection of the sibling tokens after this token, in document order.
+
+ A collection of the sibling tokens after this tokens, in document order.
+
+
+
+ Returns a collection of the sibling tokens before this token, in document order.
+
+ A collection of the sibling tokens before this token, in document order.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets the with the specified key converted to the specified type.
+
+ The type to convert the token to.
+ The token key.
+ The converted token value.
+
+
+
+ Get the first child token of this token.
+
+ A containing the first child token of the .
+
+
+
+ Get the last child token of this token.
+
+ A containing the last child token of the .
+
+
+
+ Returns a collection of the child tokens of this token, in document order.
+
+ An of containing the child tokens of this , in document order.
+
+
+
+ Returns a collection of the child tokens of this token, in document order, filtered by the specified type.
+
+ The type to filter the child tokens on.
+ A containing the child tokens of this , in document order.
+
+
+
+ Returns a collection of the child values of this token, in document order.
+
+ The type to convert the values to.
+ A containing the child values of this , in document order.
+
+
+
+ Removes this token from its parent.
+
+
+
+
+ Replaces this token with the specified token.
+
+ The value.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Returns the indented JSON for this token.
+
+
+ ToString() returns a non-JSON string value for tokens with a type of .
+ If you want the JSON for all token types then you should use .
+
+
+ The indented JSON for this token.
+
+
+
+
+ Returns the JSON for this token using the given formatting and converters.
+
+ Indicates how the output should be formatted.
+ A collection of s which will be used when writing the token.
+ The JSON for this token using the given formatting and converters.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to [].
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from [] to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Creates a for this token.
+
+ A that can be used to read this token and its descendants.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the value of the specified object.
+
+
+
+ Creates a from an object using the specified .
+
+ The object that will be used to create .
+ The that will be used when reading the object.
+ A with the value of the specified object.
+
+
+
+ Creates an instance of the specified .NET type from the .
+
+ The object type that the token will be deserialized to.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the .
+
+ The object type that the token will be deserialized to.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the using the specified .
+
+ The object type that the token will be deserialized to.
+ The that will be used when creating the object.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the using the specified .
+
+ The object type that the token will be deserialized to.
+ The that will be used when creating the object.
+ The new object created from the JSON value.
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Creates a from a .
+
+ An positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Selects a using a JSONPath expression. Selects the token that matches the object path.
+
+
+ A that contains a JSONPath expression.
+
+ A , or null.
+
+
+
+ Selects a using a JSONPath expression. Selects the token that matches the object path.
+
+
+ A that contains a JSONPath expression.
+
+ A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.
+ A .
+
+
+
+ Selects a collection of elements using a JSONPath expression.
+
+
+ A that contains a JSONPath expression.
+
+ An of that contains the selected elements.
+
+
+
+ Selects a collection of elements using a JSONPath expression.
+
+
+ A that contains a JSONPath expression.
+
+ A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.
+ An of that contains the selected elements.
+
+
+
+ Creates a new instance of the . All child tokens are recursively cloned.
+
+ A new instance of the .
+
+
+
+ Adds an object to the annotation list of this .
+
+ The annotation to add.
+
+
+
+ Get the first annotation object of the specified type from this .
+
+ The type of the annotation to retrieve.
+ The first annotation object that matches the specified type, or null if no annotation is of the specified type.
+
+
+
+ Gets the first annotation object of the specified type from this .
+
+ The of the annotation to retrieve.
+ The first annotation object that matches the specified type, or null if no annotation is of the specified type.
+
+
+
+ Gets a collection of annotations of the specified type for this .
+
+ The type of the annotations to retrieve.
+ An that contains the annotations for this .
+
+
+
+ Gets a collection of annotations of the specified type for this .
+
+ The of the annotations to retrieve.
+ An of that contains the annotations that match the specified type for this .
+
+
+
+ Removes the annotations of the specified type from this .
+
+ The type of annotations to remove.
+
+
+
+ Removes the annotations of the specified type from this .
+
+ The of annotations to remove.
+
+
+
+ Compares tokens to determine whether they are equal.
+
+
+
+
+ Determines whether the specified objects are equal.
+
+ The first object of type to compare.
+ The second object of type to compare.
+
+ true if the specified objects are equal; otherwise, false.
+
+
+
+
+ Returns a hash code for the specified object.
+
+ The for which a hash code is to be returned.
+ A hash code for the specified object.
+ The type of is a reference type and is null.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
+
+
+
+
+ Gets the at the reader's current position.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The token to read from.
+
+
+
+ Initializes a new instance of the class.
+
+ The token to read from.
+ The initial path of the token. It is prepended to the returned .
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Specifies the type of token.
+
+
+
+
+ No token type has been set.
+
+
+
+
+ A JSON object.
+
+
+
+
+ A JSON array.
+
+
+
+
+ A JSON constructor.
+
+
+
+
+ A JSON object property.
+
+
+
+
+ A comment.
+
+
+
+
+ An integer value.
+
+
+
+
+ A float value.
+
+
+
+
+ A string value.
+
+
+
+
+ A boolean value.
+
+
+
+
+ A null value.
+
+
+
+
+ An undefined value.
+
+
+
+
+ A date value.
+
+
+
+
+ A raw JSON value.
+
+
+
+
+ A collection of bytes value.
+
+
+
+
+ A Guid value.
+
+
+
+
+ A Uri value.
+
+
+
+
+ A TimeSpan value.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Gets the at the writer's current position.
+
+
+
+
+ Gets the token being written.
+
+ The token being written.
+
+
+
+ Initializes a new instance of the class writing to the given .
+
+ The container being written to.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Flushes whatever is in the buffer to the underlying .
+
+
+
+
+ Closes this writer.
+ If is set to true, the JSON is auto-completed.
+
+
+ Setting to true has no additional effect, since the underlying is a type that cannot be closed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the end.
+
+ The token.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Writes a value.
+ An error will be raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Represents a value in JSON (string, integer, date, etc).
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Creates a comment with the given value.
+
+ The value.
+ A comment with the given value.
+
+
+
+ Creates a string with the given value.
+
+ The value.
+ A string with the given value.
+
+
+
+ Creates a null value.
+
+ A null value.
+
+
+
+ Creates a undefined value.
+
+ A undefined value.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets or sets the underlying token value.
+
+ The underlying token value.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of s which will be used when writing the token.
+
+
+
+ Indicates whether the current object is equal to another object of the same type.
+
+
+ true if the current object is equal to the parameter; otherwise, false.
+
+ An object to compare with this object.
+
+
+
+ Determines whether the specified is equal to the current .
+
+ The to compare with the current .
+
+ true if the specified is equal to the current ; otherwise, false.
+
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Returns a that represents this instance.
+
+
+ ToString() returns a non-JSON string value for tokens with a type of .
+ If you want the JSON for all token types then you should use .
+
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format.
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format provider.
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format.
+ The format provider.
+
+ A that represents this instance.
+
+
+
+
+ Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
+
+ An object to compare with this instance.
+
+ A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings:
+ Value
+ Meaning
+ Less than zero
+ This instance is less than .
+ Zero
+ This instance is equal to .
+ Greater than zero
+ This instance is greater than .
+
+
+ is not of the same type as this instance.
+
+
+
+
+ Specifies how line information is handled when loading JSON.
+
+
+
+
+ Ignore line information.
+
+
+
+
+ Load line information.
+
+
+
+
+ Specifies how JSON arrays are merged together.
+
+
+
+ Concatenate arrays.
+
+
+ Union arrays, skipping items that already exist.
+
+
+ Replace all array items.
+
+
+ Merge array items together, matched by index.
+
+
+
+ Specifies how null value properties are merged.
+
+
+
+
+ The content's null value properties will be ignored during merging.
+
+
+
+
+ The content's null value properties will be merged.
+
+
+
+
+ Specifies the member serialization options for the .
+
+
+
+
+ All public members are serialized by default. Members can be excluded using or .
+ This is the default member serialization mode.
+
+
+
+
+ Only members marked with or are serialized.
+ This member serialization mode can also be set by marking the class with .
+
+
+
+
+ All public and private fields are serialized. Members can be excluded using or .
+ This member serialization mode can also be set by marking the class with
+ and setting IgnoreSerializableAttribute on to false.
+
+
+
+
+ Specifies metadata property handling options for the .
+
+
+
+
+ Read metadata properties located at the start of a JSON object.
+
+
+
+
+ Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance.
+
+
+
+
+ Do not try to read metadata properties.
+
+
+
+
+ Specifies missing member handling options for the .
+
+
+
+
+ Ignore a missing member and do not attempt to deserialize it.
+
+
+
+
+ Throw a when a missing member is encountered during deserialization.
+
+
+
+
+ Specifies null value handling options for the .
+
+
+
+
+
+
+
+
+ Include null values when serializing and deserializing objects.
+
+
+
+
+ Ignore null values when serializing and deserializing objects.
+
+
+
+
+ Specifies how object creation is handled by the .
+
+
+
+
+ Reuse existing objects, create new objects when needed.
+
+
+
+
+ Only reuse existing objects.
+
+
+
+
+ Always create new objects.
+
+
+
+
+ Specifies reference handling options for the .
+ Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement .
+
+
+
+
+
+
+
+ Do not preserve references when serializing types.
+
+
+
+
+ Preserve references when serializing into a JSON object structure.
+
+
+
+
+ Preserve references when serializing into a JSON array structure.
+
+
+
+
+ Preserve references when serializing.
+
+
+
+
+ Specifies reference loop handling options for the .
+
+
+
+
+ Throw a when a loop is encountered.
+
+
+
+
+ Ignore loop references and do not serialize.
+
+
+
+
+ Serialize loop references.
+
+
+
+
+ Indicating whether a property is required.
+
+
+
+
+ The property is not required. The default state.
+
+
+
+
+ The property must be defined in JSON but can be a null value.
+
+
+
+
+ The property must be defined in JSON and cannot be a null value.
+
+
+
+
+ The property is not required but it cannot be a null value.
+
+
+
+
+
+ Contains the JSON schema extension methods.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+
+ Determines whether the is valid.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+
+ true if the specified is valid; otherwise, false.
+
+
+
+
+
+ Determines whether the is valid.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+ When this method returns, contains any error messages generated while validating.
+
+ true if the specified is valid; otherwise, false.
+
+
+
+
+
+ Validates the specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+
+
+
+
+ Validates the specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+ The validation event handler.
+
+
+
+
+ An in-memory representation of a JSON Schema.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets the id.
+
+
+
+
+ Gets or sets the title.
+
+
+
+
+ Gets or sets whether the object is required.
+
+
+
+
+ Gets or sets whether the object is read-only.
+
+
+
+
+ Gets or sets whether the object is visible to users.
+
+
+
+
+ Gets or sets whether the object is transient.
+
+
+
+
+ Gets or sets the description of the object.
+
+
+
+
+ Gets or sets the types of values allowed by the object.
+
+ The type.
+
+
+
+ Gets or sets the pattern.
+
+ The pattern.
+
+
+
+ Gets or sets the minimum length.
+
+ The minimum length.
+
+
+
+ Gets or sets the maximum length.
+
+ The maximum length.
+
+
+
+ Gets or sets a number that the value should be divisible by.
+
+ A number that the value should be divisible by.
+
+
+
+ Gets or sets the minimum.
+
+ The minimum.
+
+
+
+ Gets or sets the maximum.
+
+ The maximum.
+
+
+
+ Gets or sets a flag indicating whether the value can not equal the number defined by the minimum attribute ().
+
+ A flag indicating whether the value can not equal the number defined by the minimum attribute ().
+
+
+
+ Gets or sets a flag indicating whether the value can not equal the number defined by the maximum attribute ().
+
+ A flag indicating whether the value can not equal the number defined by the maximum attribute ().
+
+
+
+ Gets or sets the minimum number of items.
+
+ The minimum number of items.
+
+
+
+ Gets or sets the maximum number of items.
+
+ The maximum number of items.
+
+
+
+ Gets or sets the of items.
+
+ The of items.
+
+
+
+ Gets or sets a value indicating whether items in an array are validated using the instance at their array position from .
+
+
+ true if items are validated using their array position; otherwise, false.
+
+
+
+
+ Gets or sets the of additional items.
+
+ The of additional items.
+
+
+
+ Gets or sets a value indicating whether additional items are allowed.
+
+
+ true if additional items are allowed; otherwise, false.
+
+
+
+
+ Gets or sets whether the array items must be unique.
+
+
+
+
+ Gets or sets the of properties.
+
+ The of properties.
+
+
+
+ Gets or sets the of additional properties.
+
+ The of additional properties.
+
+
+
+ Gets or sets the pattern properties.
+
+ The pattern properties.
+
+
+
+ Gets or sets a value indicating whether additional properties are allowed.
+
+
+ true if additional properties are allowed; otherwise, false.
+
+
+
+
+ Gets or sets the required property if this property is present.
+
+ The required property if this property is present.
+
+
+
+ Gets or sets the a collection of valid enum values allowed.
+
+ A collection of valid enum values allowed.
+
+
+
+ Gets or sets disallowed types.
+
+ The disallowed types.
+
+
+
+ Gets or sets the default value.
+
+ The default value.
+
+
+
+ Gets or sets the collection of that this schema extends.
+
+ The collection of that this schema extends.
+
+
+
+ Gets or sets the format.
+
+ The format.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads a from the specified .
+
+ The containing the JSON Schema to read.
+ The object representing the JSON Schema.
+
+
+
+ Reads a from the specified .
+
+ The containing the JSON Schema to read.
+ The to use when resolving schema references.
+ The object representing the JSON Schema.
+
+
+
+ Load a from a string that contains JSON Schema.
+
+ A that contains JSON Schema.
+ A populated from the string that contains JSON Schema.
+
+
+
+ Load a from a string that contains JSON Schema using the specified .
+
+ A that contains JSON Schema.
+ The resolver.
+ A populated from the string that contains JSON Schema.
+
+
+
+ Writes this schema to a .
+
+ A into which this method will write.
+
+
+
+ Writes this schema to a using the specified .
+
+ A into which this method will write.
+ The resolver used.
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+
+ Returns detailed information about the schema exception.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+
+ Generates a from a specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets how undefined schemas are handled by the serializer.
+
+
+
+
+ Gets or sets the contract resolver.
+
+ The contract resolver.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ The used to resolve schema references.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ Specify whether the generated root will be nullable.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ The used to resolve schema references.
+ Specify whether the generated root will be nullable.
+ A generated from the specified type.
+
+
+
+
+ Resolves from an id.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets the loaded schemas.
+
+ The loaded schemas.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets a for the specified reference.
+
+ The id.
+ A for the specified reference.
+
+
+
+
+ The value types allowed by the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ No type specified.
+
+
+
+
+ String type.
+
+
+
+
+ Float type.
+
+
+
+
+ Integer type.
+
+
+
+
+ Boolean type.
+
+
+
+
+ Object type.
+
+
+
+
+ Array type.
+
+
+
+
+ Null type.
+
+
+
+
+ Any type.
+
+
+
+
+
+ Specifies undefined schema Id handling options for the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Do not infer a schema Id.
+
+
+
+
+ Use the .NET type name as the schema Id.
+
+
+
+
+ Use the assembly qualified .NET type name as the schema Id.
+
+
+
+
+
+ Returns detailed information related to the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets the associated with the validation error.
+
+ The JsonSchemaException associated with the validation error.
+
+
+
+ Gets the path of the JSON location where the validation error occurred.
+
+ The path of the JSON location where the validation error occurred.
+
+
+
+ Gets the text description corresponding to the validation error.
+
+ The text description.
+
+
+
+
+ Represents the callback method that will handle JSON schema validation events and the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Allows users to control class loading and mandate what class to load.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object
+ The type of the object the formatter creates a new instance of.
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ A camel case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Resolves member mappings for a type, camel casing property names.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Used by to resolve a for a given .
+
+
+
+
+ Gets a value indicating whether members are being get and set using dynamic code generation.
+ This value is determined by the runtime permissions available.
+
+
+ true if using dynamic code generation; otherwise, false.
+
+
+
+
+ Gets or sets the default members search flags.
+
+ The default members search flags.
+
+
+
+ Gets or sets a value indicating whether compiler generated members should be serialized.
+
+
+ true if serialized compiler generated members; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore IsSpecified members when serializing and deserializing types.
+
+
+ true if the IsSpecified members will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore ShouldSerialize members when serializing and deserializing types.
+
+
+ true if the ShouldSerialize members will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets the naming strategy used to resolve how property names and dictionary keys are serialized.
+
+ The naming strategy used to resolve how property names and dictionary keys are serialized.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Gets the serializable members for the type.
+
+ The type to get serializable members for.
+ The serializable members for the type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates the constructor parameters.
+
+ The constructor to create properties for.
+ The type's member properties.
+ Properties for the given .
+
+
+
+ Creates a for the given .
+
+ The matching member property.
+ The constructor parameter.
+ A created for the given .
+
+
+
+ Resolves the default for the contract.
+
+ Type of the object.
+ The contract's default .
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Determines which contract type is created for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates properties for the given .
+
+ The type to create properties for.
+ /// The member serialization mode for the type.
+ Properties for the given .
+
+
+
+ Creates the used by the serializer to get and set values from a member.
+
+ The member.
+ The used by the serializer to get and set values from a member.
+
+
+
+ Creates a for the given .
+
+ The member's parent .
+ The member to create a for.
+ A created for the given .
+
+
+
+ Resolves the name of the property.
+
+ Name of the property.
+ Resolved name of the property.
+
+
+
+ Resolves the name of the extension data. By default no changes are made to extension data names.
+
+ Name of the extension data.
+ Resolved name of the extension data.
+
+
+
+ Resolves the key of the dictionary. By default is used to resolve dictionary keys.
+
+ Key of the dictionary.
+ Resolved key of the dictionary.
+
+
+
+ Gets the resolved name of the property.
+
+ Name of the property.
+ Name of the property.
+
+
+
+ The default naming strategy. Property names and dictionary keys are unchanged.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ The default serialization binder used when resolving and loading classes from type names.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+ The type of the object the formatter creates a new instance of.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ Provides information surrounding an error.
+
+
+
+
+ Gets the error.
+
+ The error.
+
+
+
+ Gets the original object that caused the error.
+
+ The original object that caused the error.
+
+
+
+ Gets the member that caused the error.
+
+ The member that caused the error.
+
+
+
+ Gets the path of the JSON location where the error occurred.
+
+ The path of the JSON location where the error occurred.
+
+
+
+ Gets or sets a value indicating whether this is handled.
+
+ true if handled; otherwise, false.
+
+
+
+ Provides data for the Error event.
+
+
+
+
+ Gets the current object the error event is being raised against.
+
+ The current object the error event is being raised against.
+
+
+
+ Gets the error context.
+
+ The error context.
+
+
+
+ Initializes a new instance of the class.
+
+ The current object.
+ The error context.
+
+
+
+ Get and set values for a using dynamic methods.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Provides methods to get attributes.
+
+
+
+
+ Returns a collection of all of the attributes, or an empty collection if there are no attributes.
+
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Returns a collection of attributes, identified by type, or an empty collection if there are no attributes.
+
+ The type of the attributes.
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Used by to resolve a for a given .
+
+
+
+
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Used to resolve references when serializing and deserializing JSON by the .
+
+
+
+
+ Resolves a reference to its object.
+
+ The serialization context.
+ The reference to resolve.
+ The object that was resolved from the reference.
+
+
+
+ Gets the reference for the specified object.
+
+ The serialization context.
+ The object to get a reference for.
+ The reference to the object.
+
+
+
+ Determines whether the specified object is referenced.
+
+ The serialization context.
+ The object to test for a reference.
+
+ true if the specified object is referenced; otherwise, false.
+
+
+
+
+ Adds a reference to the specified object.
+
+ The serialization context.
+ The reference.
+ The object to reference.
+
+
+
+ Allows users to control class loading and mandate what class to load.
+
+
+
+
+ When implemented, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object
+ The type of the object the formatter creates a new instance of.
+
+
+
+ When implemented, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ Represents a trace writer.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Provides methods to get and set values.
+
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the of the collection items.
+
+ The of the collection items.
+
+
+
+ Gets a value indicating whether the collection type is a multidimensional array.
+
+ true if the collection type is a multidimensional array; otherwise, false.
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+
+ The function used to create the object.
+
+
+
+ Gets a value indicating whether the creator has a parameter with the collection values.
+
+ true if the creator has a parameter with the collection values; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the default collection items .
+
+ The converter.
+
+
+
+ Gets or sets a value indicating whether the collection items preserve object references.
+
+ true if collection items preserve object references; otherwise, false.
+
+
+
+ Gets or sets the collection item reference loop handling.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the collection item type name handling.
+
+ The type name handling.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Handles serialization callback events.
+
+ The object that raised the callback event.
+ The streaming context.
+
+
+
+ Handles serialization error callback events.
+
+ The object that raised the callback event.
+ The streaming context.
+ The error context.
+
+
+
+ Sets extension data for an object during deserialization.
+
+ The object to set extension data on.
+ The extension data key.
+ The extension data value.
+
+
+
+ Gets extension data for an object during serialization.
+
+ The object to set extension data on.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the underlying type for the contract.
+
+ The underlying type for the contract.
+
+
+
+ Gets or sets the type created during deserialization.
+
+ The type created during deserialization.
+
+
+
+ Gets or sets whether this type contract is serialized as a reference.
+
+ Whether this type contract is serialized as a reference.
+
+
+
+ Gets or sets the default for this contract.
+
+ The converter.
+
+
+
+ Gets the internally resolved for the contract's type.
+ This converter is used as a fallback converter when no other converter is resolved.
+ Setting will always override this converter.
+
+
+
+
+ Gets or sets all methods called immediately after deserialization of the object.
+
+ The methods called immediately after deserialization of the object.
+
+
+
+ Gets or sets all methods called during deserialization of the object.
+
+ The methods called during deserialization of the object.
+
+
+
+ Gets or sets all methods called after serialization of the object graph.
+
+ The methods called after serialization of the object graph.
+
+
+
+ Gets or sets all methods called before serialization of the object.
+
+ The methods called before serialization of the object.
+
+
+
+ Gets or sets all method called when an error is thrown during the serialization of the object.
+
+ The methods called when an error is thrown during the serialization of the object.
+
+
+
+ Gets or sets the default creator method used to create the object.
+
+ The default creator method used to create the object.
+
+
+
+ Gets or sets a value indicating whether the default creator is non-public.
+
+ true if the default object creator is non-public; otherwise, false.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the dictionary key resolver.
+
+ The dictionary key resolver.
+
+
+
+ Gets the of the dictionary keys.
+
+ The of the dictionary keys.
+
+
+
+ Gets the of the dictionary values.
+
+ The of the dictionary values.
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+
+ The function used to create the object.
+
+
+
+ Gets a value indicating whether the creator has a parameter with the dictionary values.
+
+ true if the creator has a parameter with the dictionary values; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the object member serialization.
+
+ The member object serialization.
+
+
+
+ Gets or sets the missing member handling used when deserializing this object.
+
+ The missing member handling.
+
+
+
+ Gets or sets a value that indicates whether the object's properties are required.
+
+
+ A value indicating whether the object's properties are required.
+
+
+
+
+ Gets or sets how the object's properties with null values are handled during serialization and deserialization.
+
+ How the object's properties with null values are handled during serialization and deserialization.
+
+
+
+ Gets the object's properties.
+
+ The object's properties.
+
+
+
+ Gets a collection of instances that define the parameters used with .
+
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+ This function is called with a collection of arguments which are defined by the collection.
+
+ The function used to create the object.
+
+
+
+ Gets or sets the extension data setter.
+
+
+
+
+ Gets or sets the extension data getter.
+
+
+
+
+ Gets or sets the extension data value type.
+
+
+
+
+ Gets or sets the extension data name resolver.
+
+ The extension data name resolver.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Maps a JSON property to a .NET member or constructor parameter.
+
+
+
+
+ Gets or sets the name of the property.
+
+ The name of the property.
+
+
+
+ Gets or sets the type that declared this property.
+
+ The type that declared this property.
+
+
+
+ Gets or sets the order of serialization of a member.
+
+ The numeric order of serialization.
+
+
+
+ Gets or sets the name of the underlying member or parameter.
+
+ The name of the underlying member or parameter.
+
+
+
+ Gets the that will get and set the during serialization.
+
+ The that will get and set the during serialization.
+
+
+
+ Gets or sets the for this property.
+
+ The for this property.
+
+
+
+ Gets or sets the type of the property.
+
+ The type of the property.
+
+
+
+ Gets or sets the for the property.
+ If set this converter takes precedence over the contract converter for the property type.
+
+ The converter.
+
+
+
+ Gets or sets the member converter.
+
+ The member converter.
+
+
+
+ Gets or sets a value indicating whether this is ignored.
+
+ true if ignored; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this is readable.
+
+ true if readable; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this is writable.
+
+ true if writable; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this has a member attribute.
+
+ true if has a member attribute; otherwise, false.
+
+
+
+ Gets the default value.
+
+ The default value.
+
+
+
+ Gets or sets a value indicating whether this is required.
+
+ A value indicating whether this is required.
+
+
+
+ Gets a value indicating whether has a value specified.
+
+
+
+
+ Gets or sets a value indicating whether this property preserves object references.
+
+
+ true if this instance is reference; otherwise, false.
+
+
+
+
+ Gets or sets the property null value handling.
+
+ The null value handling.
+
+
+
+ Gets or sets the property default value handling.
+
+ The default value handling.
+
+
+
+ Gets or sets the property reference loop handling.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the property object creation handling.
+
+ The object creation handling.
+
+
+
+ Gets or sets or sets the type name handling.
+
+ The type name handling.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be serialized.
+
+ A predicate used to determine whether the property should be serialized.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be deserialized.
+
+ A predicate used to determine whether the property should be deserialized.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be serialized.
+
+ A predicate used to determine whether the property should be serialized.
+
+
+
+ Gets or sets an action used to set whether the property has been deserialized.
+
+ An action used to set whether the property has been deserialized.
+
+
+
+ Returns a that represents this instance.
+
+
+ A that represents this instance.
+
+
+
+
+ Gets or sets the converter used when serializing the property's collection items.
+
+ The collection's items converter.
+
+
+
+ Gets or sets whether this property's collection items are serialized as a reference.
+
+ Whether this property's collection items are serialized as a reference.
+
+
+
+ Gets or sets the type name handling used when serializing the property's collection items.
+
+ The collection's items type name handling.
+
+
+
+ Gets or sets the reference loop handling used when serializing the property's collection items.
+
+ The collection's items reference loop handling.
+
+
+
+ A collection of objects.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The type.
+
+
+
+ When implemented in a derived class, extracts the key from the specified element.
+
+ The element from which to extract the key.
+ The key for the specified element.
+
+
+
+ Adds a object.
+
+ The property to add to the collection.
+
+
+
+ Gets the closest matching object.
+ First attempts to get an exact case match of and then
+ a case insensitive match.
+
+ Name of the property.
+ A matching property if found.
+
+
+
+ Gets a property by property name.
+
+ The name of the property to get.
+ Type property name string comparison.
+ A matching property if found.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Lookup and create an instance of the type described by the argument.
+
+ The type to create.
+ Optional arguments to pass to an initializing constructor of the JsonConverter.
+ If null, the default constructor is used.
+
+
+
+ A kebab case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Represents a trace writer that writes to memory. When the trace message limit is
+ reached then old trace messages will be removed as new messages are added.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Returns an enumeration of the most recent trace messages.
+
+ An enumeration of the most recent trace messages.
+
+
+
+ Returns a of the most recent trace messages.
+
+
+ A of the most recent trace messages.
+
+
+
+
+ A base class for resolving how property names and dictionary keys are serialized.
+
+
+
+
+ A flag indicating whether dictionary keys should be processed.
+ Defaults to false.
+
+
+
+
+ A flag indicating whether extension data names should be processed.
+ Defaults to false.
+
+
+
+
+ A flag indicating whether explicitly specified property names,
+ e.g. a property name customized with a , should be processed.
+ Defaults to false.
+
+
+
+
+ Gets the serialized name for a given property name.
+
+ The initial property name.
+ A flag indicating whether the property has had a name explicitly specified.
+ The serialized property name.
+
+
+
+ Gets the serialized name for a given extension data name.
+
+ The initial extension data name.
+ The serialized extension data name.
+
+
+
+ Gets the serialized key for a given dictionary key.
+
+ The initial dictionary key.
+ The serialized dictionary key.
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Hash code calculation
+
+
+
+
+
+ Object equality implementation
+
+
+
+
+
+
+ Compare to another NamingStrategy
+
+
+
+
+
+
+ Represents a method that constructs an object.
+
+ The object type to create.
+
+
+
+ When applied to a method, specifies that the method is called when an error occurs serializing an object.
+
+
+
+
+ Provides methods to get attributes from a , , or .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The instance to get attributes for. This parameter should be a , , or .
+
+
+
+ Returns a collection of all of the attributes, or an empty collection if there are no attributes.
+
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Returns a collection of attributes, identified by type, or an empty collection if there are no attributes.
+
+ The type of the attributes.
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Get and set values for a using reflection.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ A snake case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Specifies how strings are escaped when writing JSON text.
+
+
+
+
+ Only control characters (e.g. newline) are escaped.
+
+
+
+
+ All non-ASCII and control characters (e.g. newline) are escaped.
+
+
+
+
+ HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped.
+
+
+
+
+ Specifies what messages to output for the class.
+
+
+
+
+ Output no tracing and debugging messages.
+
+
+
+
+ Output error-handling messages.
+
+
+
+
+ Output warnings and error-handling messages.
+
+
+
+
+ Output informational messages, warnings, and error-handling messages.
+
+
+
+
+ Output all debugging and tracing messages.
+
+
+
+
+ Indicates the method that will be used during deserialization for locating and loading assemblies.
+
+
+
+
+ In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the LoadWithPartialName method of the class is used to load the assembly.
+
+
+
+
+ In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The Load method of the class is used to load the assembly.
+
+
+
+
+ Specifies type name handling options for the .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+
+
+
+ Do not include the .NET type name when serializing types.
+
+
+
+
+ Include the .NET type name when serializing into a JSON object structure.
+
+
+
+
+ Include the .NET type name when serializing into a JSON array structure.
+
+
+
+
+ Always include the .NET type name when serializing.
+
+
+
+
+ Include the .NET type name when the type of the object being serialized is not the same as its declared type.
+ Note that this doesn't include the root serialized object by default. To include the root object's type name in JSON
+ you must specify a root type object with
+ or .
+
+
+
+
+ Determines whether the collection is null or empty.
+
+ The collection.
+
+ true if the collection is null or empty; otherwise, false.
+
+
+
+
+ Adds the elements of the specified collection to the specified generic .
+
+ The list to add to.
+ The collection of elements to add.
+
+
+
+ Converts the value to the specified type. If the value is unable to be converted, the
+ value is checked whether it assignable to the specified type.
+
+ The value to convert.
+ The culture to use when converting.
+ The type to convert or cast the value to.
+
+ The converted type. If conversion was unsuccessful, the initial value
+ is returned if assignable to the target type.
+
+
+
+
+ Helper class for serializing immutable collections.
+ Note that this is used by all builds, even those that don't support immutable collections, in case the DLL is GACed
+ https://github.com/JamesNK/Newtonsoft.Json/issues/652
+
+
+
+
+ Gets the type of the typed collection's items.
+
+ The type.
+ The type of the typed collection's items.
+
+
+
+ Gets the member's underlying type.
+
+ The member.
+ The underlying type of the member.
+
+
+
+ Determines whether the property is an indexed property.
+
+ The property.
+
+ true if the property is an indexed property; otherwise, false.
+
+
+
+
+ Gets the member's value on the object.
+
+ The member.
+ The target object.
+ The member's value on the object.
+
+
+
+ Sets the member's value on the target object.
+
+ The member.
+ The target.
+ The value.
+
+
+
+ Determines whether the specified MemberInfo can be read.
+
+ The MemberInfo to determine whether can be read.
+ /// if set to true then allow the member to be gotten non-publicly.
+
+ true if the specified MemberInfo can be read; otherwise, false.
+
+
+
+
+ Determines whether the specified MemberInfo can be set.
+
+ The MemberInfo to determine whether can be set.
+ if set to true then allow the member to be set non-publicly.
+ if set to true then allow the member to be set if read-only.
+
+ true if the specified MemberInfo can be set; otherwise, false.
+
+
+
+
+ Builds a string. Unlike this class lets you reuse its internal buffer.
+
+
+
+
+ Determines whether the string is all white space. Empty string will return false.
+
+ The string to test whether it is all white space.
+
+ true if the string is all white space; otherwise, false.
+
+
+
+
+ Specifies the state of the .
+
+
+
+
+ An exception has been thrown, which has left the in an invalid state.
+ You may call the method to put the in the Closed state.
+ Any other method calls result in an being thrown.
+
+
+
+
+ The method has been called.
+
+
+
+
+ An object is being written.
+
+
+
+
+ An array is being written.
+
+
+
+
+ A constructor is being written.
+
+
+
+
+ A property is being written.
+
+
+
+
+ A write method has not been called.
+
+
+
+
+ Indicates the method that will be used during deserialization for locating and loading assemblies.
+
+
+
+
+ In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the method is used to load the assembly.
+
+
+
+
+ In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The is used to load the assembly.
+
+
+
+ Specifies that an output will not be null even if the corresponding type allows it.
+
+
+ Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it.
+
+
+ Initializes the attribute with the specified return value condition.
+
+ The return value condition. If the method returns this value, the associated parameter will not be null.
+
+
+
+ Gets the return value condition.
+
+
+ Specifies that an output may be null even if the corresponding type disallows it.
+
+
+ Specifies that null is allowed as an input even if the corresponding type disallows it.
+
+
+
+ Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
+ the associated parameter matches this value.
+
+
+
+ Gets the condition parameter value.
+
+
+
diff --git a/packages/Newtonsoft.Json.12.0.3/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll b/packages/Newtonsoft.Json.12.0.3/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll
new file mode 100644
index 00000000..aa8843c3
Binary files /dev/null and b/packages/Newtonsoft.Json.12.0.3/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll differ
diff --git a/packages/Newtonsoft.Json.12.0.3/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.xml b/packages/Newtonsoft.Json.12.0.3/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.xml
new file mode 100644
index 00000000..b6108be8
--- /dev/null
+++ b/packages/Newtonsoft.Json.12.0.3/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.xml
@@ -0,0 +1,10950 @@
+
+
+
+ Newtonsoft.Json
+
+
+
+
+ Represents a BSON Oid (object id).
+
+
+
+
+ Gets or sets the value of the Oid.
+
+ The value of the Oid.
+
+
+
+ Initializes a new instance of the class.
+
+ The Oid value.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized BSON data.
+
+
+
+
+ Gets or sets a value indicating whether binary data reading should be compatible with incorrect Json.NET 3.5 written binary.
+
+
+ true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether the root object will be read as a JSON array.
+
+
+ true if the root object will be read as a JSON array; otherwise, false.
+
+
+
+
+ Gets or sets the used when reading values from BSON.
+
+ The used when reading values from BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+ if set to true the root object will be read as a JSON array.
+ The used when reading values from BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The containing the BSON data to read.
+ if set to true the root object will be read as a JSON array.
+ The used when reading values from BSON.
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating BSON data.
+
+
+
+
+ Gets or sets the used when writing values to BSON.
+ When set to no conversion will occur.
+
+ The used when writing values to BSON.
+
+
+
+ Initializes a new instance of the class.
+
+ The to write to.
+
+
+
+ Initializes a new instance of the class.
+
+ The to write to.
+
+
+
+ Flushes whatever is in the buffer to the underlying and also flushes the underlying stream.
+
+
+
+
+ Writes the end.
+
+ The token.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Closes this writer.
+ If is set to true, the underlying is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value that represents a BSON object id.
+
+ The Object ID value to write.
+
+
+
+ Writes a BSON regex.
+
+ The regex pattern.
+ The regex options.
+
+
+
+ Specifies how constructors are used when initializing objects during deserialization by the .
+
+
+
+
+ First attempt to use the public default constructor, then fall back to a single parameterized constructor, then to the non-public default constructor.
+
+
+
+
+ Json.NET will use a non-public default constructor before falling back to a parameterized constructor.
+
+
+
+
+ Converts a binary value to and from a base 64 string value.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON and BSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Creates a custom object.
+
+ The object type to convert.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Creates an object which will then be populated by the serializer.
+
+ Type of the object.
+ The created object.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+
+ true if this can write JSON; otherwise, false.
+
+
+
+
+ Provides a base class for converting a to and from JSON.
+
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a F# discriminated union type to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+
+ true if this can write JSON; otherwise, false.
+
+
+
+
+ Converts a to and from the ISO 8601 date format (e.g. "2008-04-12T12:53Z").
+
+
+
+
+ Gets or sets the date time styles used when converting a date to and from JSON.
+
+ The date time styles used when converting a date to and from JSON.
+
+
+
+ Gets or sets the date time format used when converting a date to and from JSON.
+
+ The date time format used when converting a date to and from JSON.
+
+
+
+ Gets or sets the culture used when converting a date to and from JSON.
+
+ The culture used when converting a date to and from JSON.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from a JavaScript Date constructor (e.g. new Date(52231943)).
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from JSON and BSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts an to and from its name string value.
+
+
+
+
+ Gets or sets a value indicating whether the written enum text should be camel case.
+ The default value is false.
+
+ true if the written enum text will be camel case; otherwise, false.
+
+
+
+ Gets or sets the naming strategy used to resolve how enum text is written.
+
+ The naming strategy used to resolve how enum text is written.
+
+
+
+ Gets or sets a value indicating whether integer values are allowed when serializing and deserializing.
+ The default value is true.
+
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class.
+
+ true if the written enum text will be camel case; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The naming strategy used to resolve how enum text is written.
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The of the used to write enum text.
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+ true if integers are allowed when serializing and deserializing; otherwise, false.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts a to and from Unix epoch time
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Converts a to and from a string (e.g. "1.2.3.4").
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing property value of the JSON that is being converted.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Converts XML to and from JSON.
+
+
+
+
+ Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produced multiple root elements.
+
+ The name of the deserialized root element.
+
+
+
+ Gets or sets a value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ true if the array attribute is written to the XML; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether to write the root JSON object.
+
+ true if the JSON root object is omitted; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ true if special characters are encoded; otherwise, false.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The calling serializer.
+ The value.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Checks if the is a namespace attribute.
+
+ Attribute name to test.
+ The attribute name prefix if it has one, otherwise an empty string.
+ true if attribute name is for a namespace attribute, otherwise false.
+
+
+
+ Determines whether this instance can convert the specified value type.
+
+ Type of the value.
+
+ true if this instance can convert the specified value type; otherwise, false.
+
+
+
+
+ Specifies how dates are formatted when writing JSON text.
+
+
+
+
+ Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z".
+
+
+
+
+ Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/".
+
+
+
+
+ Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text.
+
+
+
+
+ Date formatted strings are not parsed to a date type and are read as strings.
+
+
+
+
+ Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to .
+
+
+
+
+ Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to .
+
+
+
+
+ Specifies how to treat the time value when converting between string and .
+
+
+
+
+ Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time.
+
+
+
+
+ Treat as a UTC. If the object represents a local time, it is converted to a UTC.
+
+
+
+
+ Treat as a local time if a is being converted to a string.
+ If a string is being converted to , convert to a local time if a time zone is specified.
+
+
+
+
+ Time zone information should be preserved when converting.
+
+
+
+
+ The default JSON name table implementation.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets a string containing the same characters as the specified range of characters in the given array.
+
+ The character array containing the name to find.
+ The zero-based index into the array specifying the first character of the name.
+ The number of characters in the name.
+ A string containing the same characters as the specified range of characters in the given array.
+
+
+
+ Adds the specified string into name table.
+
+ The string to add.
+ This method is not thread-safe.
+ The resolved string.
+
+
+
+ Specifies default value handling options for the .
+
+
+
+
+
+
+
+
+ Include members where the member value is the same as the member's default value when serializing objects.
+ Included members are written to JSON. Has no effect when deserializing.
+
+
+
+
+ Ignore members where the member value is the same as the member's default value when serializing objects
+ so that it is not written to JSON.
+ This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers,
+ decimals and floating point numbers; and false for booleans). The default value ignored can be changed by
+ placing the on the property.
+
+
+
+
+ Members with a default value but no JSON will be set to their default value when deserializing.
+
+
+
+
+ Ignore members where the member value is the same as the member's default value when serializing objects
+ and set members to their default value when deserializing.
+
+
+
+
+ Specifies float format handling options when writing special floating point numbers, e.g. ,
+ and with .
+
+
+
+
+ Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity".
+
+
+
+
+ Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity.
+ Note that this will produce non-valid JSON.
+
+
+
+
+ Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a of property.
+
+
+
+
+ Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+
+
+
+
+ Floating point numbers are parsed to .
+
+
+
+
+ Floating point numbers are parsed to .
+
+
+
+
+ Specifies formatting options for the .
+
+
+
+
+ No special formatting is applied. This is the default.
+
+
+
+
+ Causes child objects to be indented according to the and settings.
+
+
+
+
+ Provides an interface for using pooled arrays.
+
+ The array type content.
+
+
+
+ Rent an array from the pool. This array must be returned when it is no longer needed.
+
+ The minimum required length of the array. The returned array may be longer.
+ The rented array from the pool. This array must be returned when it is no longer needed.
+
+
+
+ Return an array to the pool.
+
+ The array that is being returned.
+
+
+
+ Provides an interface to enable a class to return line and position information.
+
+
+
+
+ Gets a value indicating whether the class can return line information.
+
+
+ true if and can be provided; otherwise, false.
+
+
+
+
+ Gets the current line number.
+
+ The current line number or 0 if no line information is available (for example, when returns false).
+
+
+
+ Gets the current line position.
+
+ The current line position or 0 if no line information is available (for example, when returns false).
+
+
+
+ Instructs the how to serialize the collection.
+
+
+
+
+ Gets or sets a value indicating whether null items are allowed in the collection.
+
+ true if null items are allowed in the collection; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with a flag indicating whether the array can contain null items.
+
+ A flag indicating whether the array can contain null items.
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Instructs the to use the specified constructor when deserializing that object.
+
+
+
+
+ Instructs the how to serialize the object.
+
+
+
+
+ Gets or sets the id.
+
+ The id.
+
+
+
+ Gets or sets the title.
+
+ The title.
+
+
+
+ Gets or sets the description.
+
+ The description.
+
+
+
+ Gets or sets the collection's items converter.
+
+ The collection's items converter.
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonContainer(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets a value that indicates whether to preserve object references.
+
+
+ true to keep object reference; otherwise, false. The default is false.
+
+
+
+
+ Gets or sets a value that indicates whether to preserve collection's items references.
+
+
+ true to keep collection's items object references; otherwise, false. The default is false.
+
+
+
+
+ Gets or sets the reference loop handling used when serializing the collection's items.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the type name handling used when serializing the collection's items.
+
+ The type name handling.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Provides methods for converting between .NET types and JSON types.
+
+
+
+
+
+
+
+ Gets or sets a function that creates default .
+ Default settings are automatically used by serialization methods on ,
+ and and on .
+ To serialize without using any default settings create a with
+ .
+
+
+
+
+ Represents JavaScript's boolean value true as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's boolean value false as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's null as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's undefined as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's positive infinity as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's negative infinity as a string. This field is read-only.
+
+
+
+
+ Represents JavaScript's NaN as a string. This field is read-only.
+
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation using the specified.
+
+ The value to convert.
+ The format the date will be converted to.
+ The time zone handling when the date is converted to a string.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation using the specified.
+
+ The value to convert.
+ The format the date will be converted to.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ The string delimiter character.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ The string delimiter character.
+ The string escape handling.
+ A JSON string representation of the .
+
+
+
+ Converts the to its JSON string representation.
+
+ The value to convert.
+ A JSON string representation of the .
+
+
+
+ Serializes the specified object to a JSON string.
+
+ The object to serialize.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using formatting.
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a collection of .
+
+ The object to serialize.
+ A collection of converters used while serializing.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using formatting and a collection of .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ A collection of converters used while serializing.
+ A JSON string representation of the object.
+
+
+
+ Serializes the specified object to a JSON string using .
+
+ The object to serialize.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a type, formatting and .
+
+ The object to serialize.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using formatting and .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ A JSON string representation of the object.
+
+
+
+
+ Serializes the specified object to a JSON string using a type, formatting and .
+
+ The object to serialize.
+ Indicates how the output should be formatted.
+ The used to serialize the object.
+ If this is null, default serialization settings will be used.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+ A JSON string representation of the object.
+
+
+
+
+ Deserializes the JSON to a .NET object.
+
+ The JSON to deserialize.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to a .NET object using .
+
+ The JSON to deserialize.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type.
+
+ The JSON to deserialize.
+ The of object being deserialized.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type.
+
+ The type of the object to deserialize to.
+ The JSON to deserialize.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the given anonymous type.
+
+
+ The anonymous type to deserialize to. This can't be specified
+ traditionally and must be inferred from the anonymous type passed
+ as a parameter.
+
+ The JSON to deserialize.
+ The anonymous type object.
+ The deserialized anonymous type from the JSON string.
+
+
+
+ Deserializes the JSON to the given anonymous type using .
+
+
+ The anonymous type to deserialize to. This can't be specified
+ traditionally and must be inferred from the anonymous type passed
+ as a parameter.
+
+ The JSON to deserialize.
+ The anonymous type object.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized anonymous type from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using a collection of .
+
+ The type of the object to deserialize to.
+ The JSON to deserialize.
+ Converters to use while deserializing.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using .
+
+ The type of the object to deserialize to.
+ The object to deserialize.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using a collection of .
+
+ The JSON to deserialize.
+ The type of the object to deserialize.
+ Converters to use while deserializing.
+ The deserialized object from the JSON string.
+
+
+
+ Deserializes the JSON to the specified .NET type using .
+
+ The JSON to deserialize.
+ The type of the object to deserialize to.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+ The deserialized object from the JSON string.
+
+
+
+ Populates the object with values from the JSON string.
+
+ The JSON to populate values from.
+ The target object to populate values onto.
+
+
+
+ Populates the object with values from the JSON string using .
+
+ The JSON to populate values from.
+ The target object to populate values onto.
+
+ The used to deserialize the object.
+ If this is null, default serialization settings will be used.
+
+
+
+
+ Serializes the to a JSON string.
+
+ The node to convert to JSON.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting.
+
+ The node to convert to JSON.
+ Indicates how the output should be formatted.
+ A JSON string of the .
+
+
+
+ Serializes the to a JSON string using formatting and omits the root object if is true.
+
+ The node to serialize.
+ Indicates how the output should be formatted.
+ Omits writing the root object.
+ A JSON string of the .
+
+
+
+ Deserializes the from a JSON string.
+
+ The JSON string.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by .
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by
+ and writes a Json.NET array attribute for collections.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+ The deserialized .
+
+
+
+ Deserializes the from a JSON string nested in a root element specified by ,
+ writes a Json.NET array attribute for collections, and encodes special characters.
+
+ The JSON string.
+ The name of the root element to append when deserializing.
+
+ A value to indicate whether to write the Json.NET array attribute.
+ This attribute helps preserve arrays when converting the written XML back to JSON.
+
+
+ A value to indicate whether to encode special characters when converting JSON to XML.
+ If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify
+ XML namespaces, attributes or processing directives. Instead special characters are encoded and written
+ as part of the XML element name.
+
+ The deserialized .
+
+
+
+ Converts an object to and from JSON.
+
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Gets a value indicating whether this can read JSON.
+
+ true if this can read JSON; otherwise, false.
+
+
+
+ Gets a value indicating whether this can write JSON.
+
+ true if this can write JSON; otherwise, false.
+
+
+
+ Converts an object to and from JSON.
+
+ The object type to convert.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Writes the JSON representation of the object.
+
+ The to write to.
+ The value.
+ The calling serializer.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read.
+ The calling serializer.
+ The object value.
+
+
+
+ Reads the JSON representation of the object.
+
+ The to read from.
+ Type of the object.
+ The existing value of object being read. If there is no existing value then null will be used.
+ The existing value has a value.
+ The calling serializer.
+ The object value.
+
+
+
+ Determines whether this instance can convert the specified object type.
+
+ Type of the object.
+
+ true if this instance can convert the specified object type; otherwise, false.
+
+
+
+
+ Instructs the to use the specified when serializing the member or class.
+
+
+
+
+ Gets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+
+
+
+
+ Initializes a new instance of the class.
+
+ Type of the .
+
+
+
+ Initializes a new instance of the class.
+
+ Type of the .
+ Parameter list to use when constructing the . Can be null.
+
+
+
+ Represents a collection of .
+
+
+
+
+ Instructs the how to serialize the collection.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ The exception thrown when an error occurs during JSON serialization or deserialization.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Instructs the to deserialize properties with no matching class member into the specified collection
+ and write values during serialization.
+
+
+
+
+ Gets or sets a value that indicates whether to write extension data when serializing the object.
+
+
+ true to write extension data when serializing the object; otherwise, false. The default is true.
+
+
+
+
+ Gets or sets a value that indicates whether to read extension data when deserializing the object.
+
+
+ true to read extension data when deserializing the object; otherwise, false. The default is true.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Instructs the not to serialize the public field or public read/write property value.
+
+
+
+
+ Base class for a table of atomized string objects.
+
+
+
+
+ Gets a string containing the same characters as the specified range of characters in the given array.
+
+ The character array containing the name to find.
+ The zero-based index into the array specifying the first character of the name.
+ The number of characters in the name.
+ A string containing the same characters as the specified range of characters in the given array.
+
+
+
+ Instructs the how to serialize the object.
+
+
+
+
+ Gets or sets the member serialization.
+
+ The member serialization.
+
+
+
+ Gets or sets the missing member handling used when deserializing this object.
+
+ The missing member handling.
+
+
+
+ Gets or sets how the object's properties with null values are handled during serialization and deserialization.
+
+ How the object's properties with null values are handled during serialization and deserialization.
+
+
+
+ Gets or sets a value that indicates whether the object's properties are required.
+
+
+ A value indicating whether the object's properties are required.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified member serialization.
+
+ The member serialization.
+
+
+
+ Initializes a new instance of the class with the specified container Id.
+
+ The container Id.
+
+
+
+ Instructs the to always serialize the member with the specified name.
+
+
+
+
+ Gets or sets the type used when serializing the property's collection items.
+
+ The collection's items type.
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the of the .
+
+ The of the .
+
+
+
+ The parameter list to use when constructing the described by .
+ If null, the default constructor is used.
+ When non-null, there must be a constructor defined in the that exactly matches the number,
+ order, and type of these parameters.
+
+
+
+ [JsonProperty(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })]
+
+
+
+
+
+ Gets or sets the null value handling used when serializing this property.
+
+ The null value handling.
+
+
+
+ Gets or sets the default value handling used when serializing this property.
+
+ The default value handling.
+
+
+
+ Gets or sets the reference loop handling used when serializing this property.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the object creation handling used when deserializing this property.
+
+ The object creation handling.
+
+
+
+ Gets or sets the type name handling used when serializing this property.
+
+ The type name handling.
+
+
+
+ Gets or sets whether this property's value is serialized as a reference.
+
+ Whether this property's value is serialized as a reference.
+
+
+
+ Gets or sets the order of serialization of a member.
+
+ The numeric order of serialization.
+
+
+
+ Gets or sets a value indicating whether this property is required.
+
+
+ A value indicating whether this property is required.
+
+
+
+
+ Gets or sets the name of the property.
+
+ The name of the property.
+
+
+
+ Gets or sets the reference loop handling used when serializing the property's collection items.
+
+ The collection's items reference loop handling.
+
+
+
+ Gets or sets the type name handling used when serializing the property's collection items.
+
+ The collection's items type name handling.
+
+
+
+ Gets or sets whether this property's collection items are serialized as a reference.
+
+ Whether this property's collection items are serialized as a reference.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ Name of the property.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
+
+
+
+
+ Asynchronously reads the next JSON token from the source.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns true if the next token was read successfully; false if there are no more tokens to read.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously skips the children of the current token.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a [].
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the []. This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously reads the next JSON token from the source as a .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the . This result will be null at the end of an array.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Specifies the state of the reader.
+
+
+
+
+ A read method has not been called.
+
+
+
+
+ The end of the file has been reached successfully.
+
+
+
+
+ Reader is at a property.
+
+
+
+
+ Reader is at the start of an object.
+
+
+
+
+ Reader is in an object.
+
+
+
+
+ Reader is at the start of an array.
+
+
+
+
+ Reader is in an array.
+
+
+
+
+ The method has been called.
+
+
+
+
+ Reader has just read a value.
+
+
+
+
+ Reader is at the start of a constructor.
+
+
+
+
+ Reader is in a constructor.
+
+
+
+
+ An error occurred that prevents the read operation from continuing.
+
+
+
+
+ The end of the file has been reached successfully.
+
+
+
+
+ Gets the current reader state.
+
+ The current reader state.
+
+
+
+ Gets or sets a value indicating whether the source should be closed when this reader is closed.
+
+
+ true to close the source when this reader is closed; otherwise false. The default is true.
+
+
+
+
+ Gets or sets a value indicating whether multiple pieces of JSON content can
+ be read from a continuous stream without erroring.
+
+
+ true to support reading multiple pieces of JSON content; otherwise false.
+ The default is false.
+
+
+
+
+ Gets the quotation mark character used to enclose the value of a string.
+
+
+
+
+ Gets or sets how time zones are handled when reading JSON.
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+
+
+
+
+ Gets or sets how custom date formatted strings are parsed when reading JSON.
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+
+
+
+
+ Gets the type of the current JSON token.
+
+
+
+
+ Gets the text value of the current JSON token.
+
+
+
+
+ Gets the .NET type for the current JSON token.
+
+
+
+
+ Gets the depth of the current token in the JSON document.
+
+ The depth of the current token in the JSON document.
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Gets or sets the culture used when reading JSON. Defaults to .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads the next JSON token from the source.
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a [].
+
+ A [] or null if the next JSON token is null. This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the source as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Skips the children of the current token.
+
+
+
+
+ Sets the current token.
+
+ The new token.
+
+
+
+ Sets the current token and value.
+
+ The new token.
+ The value.
+
+
+
+ Sets the current token and value.
+
+ The new token.
+ The value.
+ A flag indicating whether the position index inside an array should be updated.
+
+
+
+ Sets the state based on current token type.
+
+
+
+
+ Releases unmanaged and - optionally - managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the source is also closed.
+
+
+
+
+ The exception thrown when an error occurs while reading JSON text.
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The line number indicating where the error occurred.
+ The line position indicating where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Instructs the to always serialize the member, and to require that the member has a value.
+
+
+
+
+ The exception thrown when an error occurs during JSON serialization or deserialization.
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The line number indicating where the error occurred.
+ The line position indicating where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Serializes and deserializes objects into and from the JSON format.
+ The enables you to control how objects are encoded into JSON.
+
+
+
+
+ Occurs when the errors during serialization and deserialization.
+
+
+
+
+ Gets or sets the used by the serializer when resolving references.
+
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+
+
+
+ Gets or sets the used by the serializer when writing trace messages.
+
+ The trace writer.
+
+
+
+ Gets or sets the equality comparer used by the serializer when comparing references.
+
+ The equality comparer.
+
+
+
+ Gets or sets how type name writing and reading is handled by the serializer.
+ The default value is .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how object references are preserved by the serializer.
+ The default value is .
+
+
+
+
+ Gets or sets how reference loops (e.g. a class referencing itself) is handled.
+ The default value is .
+
+
+
+
+ Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how null values are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how default values are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how objects are created during deserialization.
+ The default value is .
+
+ The object creation handling.
+
+
+
+ Gets or sets how constructors are used during deserialization.
+ The default value is .
+
+ The constructor handling.
+
+
+
+ Gets or sets how metadata properties are used during deserialization.
+ The default value is .
+
+ The metadata properties handling.
+
+
+
+ Gets a collection that will be used during serialization.
+
+ Collection that will be used during serialization.
+
+
+
+ Gets or sets the contract resolver used by the serializer when
+ serializing .NET objects to JSON and vice versa.
+
+
+
+
+ Gets or sets the used by the serializer when invoking serialization callback methods.
+
+ The context.
+
+
+
+ Indicates how JSON text output is formatted.
+ The default value is .
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how time zones are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written as JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how and values are formatted when writing JSON text,
+ and the expected date format when reading JSON text.
+ The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
+
+
+
+
+ Gets or sets the culture used when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+ A null value means there is no maximum.
+ The default value is null.
+
+
+
+
+ Gets a value indicating whether there will be a check for additional JSON content after deserializing an object.
+ The default value is false.
+
+
+ true if there will be a check for additional JSON content after deserializing an object; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Creates a new instance.
+ The will not use default settings
+ from .
+
+
+ A new instance.
+ The will not use default settings
+ from .
+
+
+
+
+ Creates a new instance using the specified .
+ The will not use default settings
+ from .
+
+ The settings to be applied to the .
+
+ A new instance using the specified .
+ The will not use default settings
+ from .
+
+
+
+
+ Creates a new instance.
+ The will use default settings
+ from .
+
+
+ A new instance.
+ The will use default settings
+ from .
+
+
+
+
+ Creates a new instance using the specified .
+ The will use default settings
+ from as well as the specified .
+
+ The settings to be applied to the .
+
+ A new instance using the specified .
+ The will use default settings
+ from as well as the specified .
+
+
+
+
+ Populates the JSON values onto the target object.
+
+ The that contains the JSON structure to read values from.
+ The target object to populate values onto.
+
+
+
+ Populates the JSON values onto the target object.
+
+ The that contains the JSON structure to read values from.
+ The target object to populate values onto.
+
+
+
+ Deserializes the JSON structure contained by the specified .
+
+ The that contains the JSON structure to deserialize.
+ The being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The of object being deserialized.
+ The instance of being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The type of the object to deserialize.
+ The instance of being deserialized.
+
+
+
+ Deserializes the JSON structure contained by the specified
+ into an instance of the specified type.
+
+ The containing the object.
+ The of object being deserialized.
+ The instance of being deserialized.
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+ The type of the value being serialized.
+ This parameter is used when is to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+ The type of the value being serialized.
+ This parameter is used when is Auto to write out the type name if the type of the value does not match.
+ Specifying the type is optional.
+
+
+
+
+ Serializes the specified and writes the JSON structure
+ using the specified .
+
+ The used to write the JSON structure.
+ The to serialize.
+
+
+
+ Specifies the settings on a object.
+
+
+
+
+ Gets or sets how reference loops (e.g. a class referencing itself) are handled.
+ The default value is .
+
+ Reference loop handling.
+
+
+
+ Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization.
+ The default value is .
+
+ Missing member handling.
+
+
+
+ Gets or sets how objects are created during deserialization.
+ The default value is .
+
+ The object creation handling.
+
+
+
+ Gets or sets how null values are handled during serialization and deserialization.
+ The default value is .
+
+ Null value handling.
+
+
+
+ Gets or sets how default values are handled during serialization and deserialization.
+ The default value is .
+
+ The default value handling.
+
+
+
+ Gets or sets a collection that will be used during serialization.
+
+ The converters.
+
+
+
+ Gets or sets how object references are preserved by the serializer.
+ The default value is .
+
+ The preserve references handling.
+
+
+
+ Gets or sets how type name writing and reading is handled by the serializer.
+ The default value is .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+ The type name handling.
+
+
+
+ Gets or sets how metadata properties are used during deserialization.
+ The default value is .
+
+ The metadata properties handling.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how a type name assembly is written and resolved by the serializer.
+ The default value is .
+
+ The type name assembly format.
+
+
+
+ Gets or sets how constructors are used during deserialization.
+ The default value is .
+
+ The constructor handling.
+
+
+
+ Gets or sets the contract resolver used by the serializer when
+ serializing .NET objects to JSON and vice versa.
+
+ The contract resolver.
+
+
+
+ Gets or sets the equality comparer used by the serializer when comparing references.
+
+ The equality comparer.
+
+
+
+ Gets or sets the used by the serializer when resolving references.
+
+ The reference resolver.
+
+
+
+ Gets or sets a function that creates the used by the serializer when resolving references.
+
+ A function that creates the used by the serializer when resolving references.
+
+
+
+ Gets or sets the used by the serializer when writing trace messages.
+
+ The trace writer.
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+ The binder.
+
+
+
+ Gets or sets the used by the serializer when resolving type names.
+
+ The binder.
+
+
+
+ Gets or sets the error handler called during serialization and deserialization.
+
+ The error handler called during serialization and deserialization.
+
+
+
+ Gets or sets the used by the serializer when invoking serialization callback methods.
+
+ The context.
+
+
+
+ Gets or sets how and values are formatted when writing JSON text,
+ and the expected date format when reading JSON text.
+ The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK".
+
+
+
+
+ Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a .
+ A null value means there is no maximum.
+ The default value is null.
+
+
+
+
+ Indicates how JSON text output is formatted.
+ The default value is .
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how time zones are handled during serialization and deserialization.
+ The default value is .
+
+
+
+
+ Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written as JSON.
+ The default value is .
+
+
+
+
+ Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+ The default value is .
+
+
+
+
+ Gets or sets the culture used when reading JSON.
+ The default value is .
+
+
+
+
+ Gets a value indicating whether there will be a check for additional content after deserializing an object.
+ The default value is false.
+
+
+ true if there will be a check for additional content after deserializing an object; otherwise, false.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to JSON text data.
+
+
+
+
+ Asynchronously reads the next JSON token from the source.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns true if the next token was read successfully; false if there are no more tokens to read.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a [].
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the []. This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a of .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the of . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously reads the next JSON token from the source as a .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous read. The
+ property returns the . This result will be null at the end of an array.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Initializes a new instance of the class with the specified .
+
+ The containing the JSON data to read.
+
+
+
+ Gets or sets the reader's property name table.
+
+
+
+
+ Gets or sets the reader's character buffer pool.
+
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a [].
+
+ A [] or null if the next JSON token is null. This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Gets a value indicating whether the class can return line information.
+
+
+ true if and can be provided; otherwise, false.
+
+
+
+
+ Gets the current line number.
+
+
+ The current line number or 0 if no line information is available (for example, returns false).
+
+
+
+
+ Gets the current line position.
+
+
+ The current line position or 0 if no line information is available (for example, returns false).
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the JSON value delimiter.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the specified end token.
+
+ The end token to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously closes this writer.
+ If is set to true, the destination is also closed.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of the current JSON object or array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes indent characters.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes an indent space.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a null value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the beginning of a JSON array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the beginning of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the start of a constructor with the given name.
+
+ The name of the constructor.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes an undefined value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the given white space.
+
+ The string of white space characters.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a [] value.
+
+ The [] value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of an array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of a constructor.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes the end of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Asynchronously writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ Derived classes must override this method to get asynchronous behaviour. Otherwise it will
+ execute synchronously, returning an already-completed task.
+
+
+
+ Gets or sets the writer's character array pool.
+
+
+
+
+ Gets or sets how many s to write for each level in the hierarchy when is set to .
+
+
+
+
+ Gets or sets which character to use to quote attribute values.
+
+
+
+
+ Gets or sets which character to use for indenting when is set to .
+
+
+
+
+ Gets or sets a value indicating whether object names will be surrounded with quotes.
+
+
+
+
+ Initializes a new instance of the class using the specified .
+
+ The to write to.
+
+
+
+ Flushes whatever is in the buffer to the underlying and also flushes the underlying .
+
+
+
+
+ Closes this writer.
+ If is set to true, the underlying is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the specified end token.
+
+ The end token to write.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+
+
+
+ Writes indent characters.
+
+
+
+
+ Writes the JSON value delimiter.
+
+
+
+
+ Writes an indent space.
+
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the given white space.
+
+ The string of white space characters.
+
+
+
+ Specifies the type of JSON token.
+
+
+
+
+ This is returned by the if a read method has not been called.
+
+
+
+
+ An object start token.
+
+
+
+
+ An array start token.
+
+
+
+
+ A constructor start token.
+
+
+
+
+ An object property name.
+
+
+
+
+ A comment.
+
+
+
+
+ Raw JSON.
+
+
+
+
+ An integer.
+
+
+
+
+ A float.
+
+
+
+
+ A string.
+
+
+
+
+ A boolean.
+
+
+
+
+ A null token.
+
+
+
+
+ An undefined token.
+
+
+
+
+ An object end token.
+
+
+
+
+ An array end token.
+
+
+
+
+ A constructor end token.
+
+
+
+
+ A Date.
+
+
+
+
+ Byte data.
+
+
+
+
+
+ Represents a reader that provides validation.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Sets an event handler for receiving schema validation errors.
+
+
+
+
+ Gets the text value of the current JSON token.
+
+
+
+
+
+ Gets the depth of the current token in the JSON document.
+
+ The depth of the current token in the JSON document.
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Gets the quotation mark character used to enclose the value of a string.
+
+
+
+
+
+ Gets the type of the current JSON token.
+
+
+
+
+
+ Gets the .NET type for the current JSON token.
+
+
+
+
+
+ Initializes a new instance of the class that
+ validates the content returned from the given .
+
+ The to read from while validating.
+
+
+
+ Gets or sets the schema.
+
+ The schema.
+
+
+
+ Gets the used to construct this .
+
+ The specified in the constructor.
+
+
+
+ Changes the reader's state to .
+ If is set to true, the underlying is also closed.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a [].
+
+
+ A [] or null if the next JSON token is null.
+
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying as a .
+
+ A . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of . This method will return null at the end of an array.
+
+
+
+ Reads the next JSON token from the underlying as a of .
+
+ A of .
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Asynchronously closes this writer.
+ If is set to true, the destination is also closed.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the specified end token.
+
+ The end token to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes indent characters.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the JSON value delimiter.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes an indent space.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of the current JSON object or array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of an array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of a constructor.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the end of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a null value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the beginning of a JSON array.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the start of a constructor with the given name.
+
+ The name of the constructor.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the beginning of a JSON object.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the current token.
+
+ The to read the token from.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the current token.
+
+ The to read the token from.
+ A flag indicating whether the current token's children should be written.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the token and its value.
+
+ The to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the token and its value.
+
+ The to write.
+
+ The value to write.
+ A value is only required for tokens that have an associated value, e.g. the property name for .
+ null can be passed to the method for tokens that don't have a value, e.g. .
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a [] value.
+
+ The [] value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a value.
+
+ The value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes a of value.
+
+ The of value to write.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes an undefined value.
+
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously writes the given white space.
+
+ The string of white space characters.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Asynchronously ets the state of the .
+
+ The being written.
+ The value being written.
+ The token to monitor for cancellation requests. The default value is .
+ A that represents the asynchronous operation.
+ The default behaviour is to execute synchronously, returning an already-completed task. Derived
+ classes can override this behaviour for true asynchronicity.
+
+
+
+ Gets or sets a value indicating whether the destination should be closed when this writer is closed.
+
+
+ true to close the destination when this writer is closed; otherwise false. The default is true.
+
+
+
+
+ Gets or sets a value indicating whether the JSON should be auto-completed when this writer is closed.
+
+
+ true to auto-complete the JSON when this writer is closed; otherwise false. The default is true.
+
+
+
+
+ Gets the top.
+
+ The top.
+
+
+
+ Gets the state of the writer.
+
+
+
+
+ Gets the path of the writer.
+
+
+
+
+ Gets or sets a value indicating how JSON text output should be formatted.
+
+
+
+
+ Gets or sets how dates are written to JSON text.
+
+
+
+
+ Gets or sets how time zones are handled when writing JSON text.
+
+
+
+
+ Gets or sets how strings are escaped when writing JSON text.
+
+
+
+
+ Gets or sets how special floating point numbers, e.g. ,
+ and ,
+ are written to JSON text.
+
+
+
+
+ Gets or sets how and values are formatted when writing JSON text.
+
+
+
+
+ Gets or sets the culture used when writing JSON. Defaults to .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Flushes whatever is in the buffer to the destination and also flushes the destination.
+
+
+
+
+ Closes this writer.
+ If is set to true, the destination is also closed.
+ If is set to true, the JSON is auto-completed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the end of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the end of an array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the end constructor.
+
+
+
+
+ Writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+
+
+
+ Writes the property name of a name/value pair of a JSON object.
+
+ The name of the property.
+ A flag to indicate whether the text should be escaped when it is written as a JSON property name.
+
+
+
+ Writes the end of the current JSON object or array.
+
+
+
+
+ Writes the current token and its children.
+
+ The to read the token from.
+
+
+
+ Writes the current token.
+
+ The to read the token from.
+ A flag indicating whether the current token's children should be written.
+
+
+
+ Writes the token and its value.
+
+ The to write.
+
+ The value to write.
+ A value is only required for tokens that have an associated value, e.g. the property name for .
+ null can be passed to the method for tokens that don't have a value, e.g. .
+
+
+
+
+ Writes the token.
+
+ The to write.
+
+
+
+ Writes the specified end token.
+
+ The end token to write.
+
+
+
+ Writes indent characters.
+
+
+
+
+ Writes the JSON value delimiter.
+
+
+
+
+ Writes an indent space.
+
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON without changing the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes raw JSON where a value is expected and updates the writer's state.
+
+ The raw JSON to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a of value.
+
+ The of value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+ An error will raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes the given white space.
+
+ The string of white space characters.
+
+
+
+ Releases unmanaged and - optionally - managed resources.
+
+ true to release both managed and unmanaged resources; false to release only unmanaged resources.
+
+
+
+ Sets the state of the .
+
+ The being written.
+ The value being written.
+
+
+
+ The exception thrown when an error occurs while writing JSON text.
+
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message, JSON path and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The path to the JSON where the error occurred.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+ Specifies how JSON comments are handled when loading JSON.
+
+
+
+
+ Ignore comments.
+
+
+
+
+ Load comments as a with type .
+
+
+
+
+ Specifies how duplicate property names are handled when loading JSON.
+
+
+
+
+ Replace the existing value when there is a duplicate property. The value of the last property in the JSON object will be used.
+
+
+
+
+ Ignore the new value when there is a duplicate property. The value of the first property in the JSON object will be used.
+
+
+
+
+ Throw a when a duplicate property is encountered.
+
+
+
+
+ Contains the LINQ to JSON extension methods.
+
+
+
+
+ Returns a collection of tokens that contains the ancestors of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains the ancestors of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains every token in the source collection, the ancestors of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains the descendants of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains the descendants of every token in the source collection.
+
+
+
+ Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection.
+
+ The type of the objects in source, constrained to .
+ An of that contains the source collection.
+ An of that contains every token in the source collection, and the descendants of every token in the source collection.
+
+
+
+ Returns a collection of child properties of every object in the source collection.
+
+ An of that contains the source collection.
+ An of that contains the properties of every object in the source collection.
+
+
+
+ Returns a collection of child values of every object in the source collection with the given key.
+
+ An of that contains the source collection.
+ The token key.
+ An of that contains the values of every token in the source collection with the given key.
+
+
+
+ Returns a collection of child values of every object in the source collection.
+
+ An of that contains the source collection.
+ An of that contains the values of every token in the source collection.
+
+
+
+ Returns a collection of converted child values of every object in the source collection with the given key.
+
+ The type to convert the values to.
+ An of that contains the source collection.
+ The token key.
+ An that contains the converted values of every token in the source collection with the given key.
+
+
+
+ Returns a collection of converted child values of every object in the source collection.
+
+ The type to convert the values to.
+ An of that contains the source collection.
+ An that contains the converted values of every token in the source collection.
+
+
+
+ Converts the value.
+
+ The type to convert the value to.
+ A cast as a of .
+ A converted value.
+
+
+
+ Converts the value.
+
+ The source collection type.
+ The type to convert the value to.
+ A cast as a of .
+ A converted value.
+
+
+
+ Returns a collection of child tokens of every array in the source collection.
+
+ The source collection type.
+ An of that contains the source collection.
+ An of that contains the values of every token in the source collection.
+
+
+
+ Returns a collection of converted child tokens of every array in the source collection.
+
+ An of that contains the source collection.
+ The type to convert the values to.
+ The source collection type.
+ An that contains the converted values of every token in the source collection.
+
+
+
+ Returns the input typed as .
+
+ An of that contains the source collection.
+ The input typed as .
+
+
+
+ Returns the input typed as .
+
+ The source collection type.
+ An of that contains the source collection.
+ The input typed as .
+
+
+
+ Represents a collection of objects.
+
+ The type of token.
+
+
+
+ Gets the of with the specified key.
+
+
+
+
+
+ Represents a JSON array.
+
+
+
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous load. The property contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous load. The property contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the array.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the array.
+
+
+
+ Loads an from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads an from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+
+
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the values of the specified object.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ The that will be used to read the object.
+ A with the values of the specified object.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets or sets the at the specified index.
+
+
+
+
+
+ Determines the index of a specific item in the .
+
+ The object to locate in the .
+
+ The index of if found in the list; otherwise, -1.
+
+
+
+
+ Inserts an item to the at the specified index.
+
+ The zero-based index at which should be inserted.
+ The object to insert into the .
+
+ is not a valid index in the .
+
+
+
+
+ Removes the item at the specified index.
+
+ The zero-based index of the item to remove.
+
+ is not a valid index in the .
+
+
+
+
+ Returns an enumerator that iterates through the collection.
+
+
+ A of that can be used to iterate through the collection.
+
+
+
+
+ Adds an item to the .
+
+ The object to add to the .
+
+
+
+ Removes all items from the .
+
+
+
+
+ Determines whether the contains a specific value.
+
+ The object to locate in the .
+
+ true if is found in the ; otherwise, false.
+
+
+
+
+ Copies the elements of the to an array, starting at a particular array index.
+
+ The array.
+ Index of the array.
+
+
+
+ Gets a value indicating whether the is read-only.
+
+ true if the is read-only; otherwise, false.
+
+
+
+ Removes the first occurrence of a specific object from the .
+
+ The object to remove from the .
+
+ true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original .
+
+
+
+
+ Represents a JSON constructor.
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets or sets the name of this constructor.
+
+ The constructor name.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified name and content.
+
+ The constructor name.
+ The contents of the constructor.
+
+
+
+ Initializes a new instance of the class with the specified name and content.
+
+ The constructor name.
+ The contents of the constructor.
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ The constructor name.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Represents a token that can contain other tokens.
+
+
+
+
+ Occurs when the items list of the collection has changed, or the collection is reset.
+
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Raises the event.
+
+ The instance containing the event data.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Get the first child token of this token.
+
+
+ A containing the first child token of the .
+
+
+
+
+ Get the last child token of this token.
+
+
+ A containing the last child token of the .
+
+
+
+
+ Returns a collection of the child tokens of this token, in document order.
+
+
+ An of containing the child tokens of this , in document order.
+
+
+
+
+ Returns a collection of the child values of this token, in document order.
+
+ The type to convert the values to.
+
+ A containing the child values of this , in document order.
+
+
+
+
+ Returns a collection of the descendant tokens for this token in document order.
+
+ An of containing the descendant tokens of the .
+
+
+
+ Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order.
+
+ An of containing this token, and all the descendant tokens of the .
+
+
+
+ Adds the specified content as children of this .
+
+ The content to be added.
+
+
+
+ Adds the specified content as the first children of this .
+
+ The content to be added.
+
+
+
+ Creates a that can be used to add tokens to the .
+
+ A that is ready to have content written to it.
+
+
+
+ Replaces the child nodes of this token with the specified content.
+
+ The content.
+
+
+
+ Removes the child nodes from this token.
+
+
+
+
+ Merge the specified content into this .
+
+ The content to be merged.
+
+
+
+ Merge the specified content into this using .
+
+ The content to be merged.
+ The used to merge the content.
+
+
+
+ Gets the count of child JSON tokens.
+
+ The count of child JSON tokens.
+
+
+
+ Represents a collection of objects.
+
+ The type of token.
+
+
+
+ An empty collection of objects.
+
+
+
+
+ Initializes a new instance of the struct.
+
+ The enumerable.
+
+
+
+ Returns an enumerator that can be used to iterate through the collection.
+
+
+ A that can be used to iterate through the collection.
+
+
+
+
+ Gets the of with the specified key.
+
+
+
+
+
+ Determines whether the specified is equal to this instance.
+
+ The to compare with this instance.
+
+ true if the specified is equal to this instance; otherwise, false.
+
+
+
+
+ Determines whether the specified is equal to this instance.
+
+ The to compare with this instance.
+
+ true if the specified is equal to this instance; otherwise, false.
+
+
+
+
+ Returns a hash code for this instance.
+
+
+ A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
+
+
+
+
+ Represents a JSON object.
+
+
+
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous load. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Occurs when a property value changes.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the object.
+
+
+
+ Initializes a new instance of the class with the specified content.
+
+ The contents of the object.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets an of of this object's properties.
+
+ An of of this object's properties.
+
+
+
+ Gets a with the specified name.
+
+ The property name.
+ A with the specified name or null.
+
+
+
+ Gets the with the specified name.
+ The exact name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ The property name.
+ One of the enumeration values that specifies how the strings will be compared.
+ A matched with the specified name or null.
+
+
+
+ Gets a of of this object's property values.
+
+ A of of this object's property values.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets or sets the with the specified property name.
+
+
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+ is not valid JSON.
+
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+ is not valid JSON.
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+ is not valid JSON.
+
+
+
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+ is not valid JSON.
+
+
+
+
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the values of the specified object.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ The that will be used to read the object.
+ A with the values of the specified object.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Gets the with the specified property name.
+
+ Name of the property.
+ The with the specified property name.
+
+
+
+ Gets the with the specified property name.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ Name of the property.
+ One of the enumeration values that specifies how the strings will be compared.
+ The with the specified property name.
+
+
+
+ Tries to get the with the specified property name.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ Name of the property.
+ The value.
+ One of the enumeration values that specifies how the strings will be compared.
+ true if a value was successfully retrieved; otherwise, false.
+
+
+
+ Adds the specified property name.
+
+ Name of the property.
+ The value.
+
+
+
+ Determines whether the JSON object has the specified property name.
+
+ Name of the property.
+ true if the JSON object has the specified property name; otherwise, false.
+
+
+
+ Removes the property with the specified name.
+
+ Name of the property.
+ true if item was successfully removed; otherwise, false.
+
+
+
+ Tries to get the with the specified property name.
+
+ Name of the property.
+ The value.
+ true if a value was successfully retrieved; otherwise, false.
+
+
+
+ Returns an enumerator that can be used to iterate through the collection.
+
+
+ A that can be used to iterate through the collection.
+
+
+
+
+ Raises the event with the provided arguments.
+
+ Name of the property.
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Represents a JSON property.
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous creation. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Asynchronously loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous creation. The
+ property returns a that contains the JSON that was read from the specified .
+
+
+
+ Gets the container's children tokens.
+
+ The container's children tokens.
+
+
+
+ Gets the property name.
+
+ The property name.
+
+
+
+ Gets or sets the property value.
+
+ The property value.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Initializes a new instance of the class.
+
+ The property name.
+ The property content.
+
+
+
+ Initializes a new instance of the class.
+
+ The property name.
+ The property content.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ A that contains the JSON that was read from the specified .
+
+
+
+ Loads a from a .
+
+ A that will be read for the content of the .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A that contains the JSON that was read from the specified .
+
+
+
+ Represents a raw JSON string.
+
+
+
+
+ Asynchronously creates an instance of with the content of the reader's current token.
+
+ The reader.
+ The token to monitor for cancellation requests. The default value is .
+ A representing the asynchronous creation. The
+ property returns an instance of with the content of the reader's current token.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class.
+
+ The raw json.
+
+
+
+ Creates an instance of with the content of the reader's current token.
+
+ The reader.
+ An instance of with the content of the reader's current token.
+
+
+
+ Specifies the settings used when loading JSON.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets or sets how JSON comments are handled when loading JSON.
+ The default value is .
+
+ The JSON comment handling.
+
+
+
+ Gets or sets how JSON line info is handled when loading JSON.
+ The default value is .
+
+ The JSON line info handling.
+
+
+
+ Gets or sets how duplicate property names in JSON objects are handled when loading JSON.
+ The default value is .
+
+ The JSON duplicate property name handling.
+
+
+
+ Specifies the settings used when merging JSON.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets or sets the method used when merging JSON arrays.
+
+ The method used when merging JSON arrays.
+
+
+
+ Gets or sets how null value properties are merged.
+
+ How null value properties are merged.
+
+
+
+ Gets or sets the comparison used to match property names while merging.
+ The exact property name will be searched for first and if no matching property is found then
+ the will be used to match a property.
+
+ The comparison used to match property names while merging.
+
+
+
+ Represents an abstract JSON token.
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Asynchronously creates a from a .
+
+ An positioned at the token to read into this .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains
+ the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Asynchronously creates a from a .
+
+ An positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains
+ the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Asynchronously creates a from a .
+
+ A positioned at the token to read into this .
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Asynchronously creates a from a .
+
+ A positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ The token to monitor for cancellation requests. The default value is .
+
+ A that represents the asynchronous creation. The
+ property returns a that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Gets a comparer that can compare two tokens for value equality.
+
+ A that can compare two nodes for value equality.
+
+
+
+ Gets or sets the parent.
+
+ The parent.
+
+
+
+ Gets the root of this .
+
+ The root of this .
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Compares the values of two tokens, including the values of all descendant tokens.
+
+ The first to compare.
+ The second to compare.
+ true if the tokens are equal; otherwise false.
+
+
+
+ Gets the next sibling token of this node.
+
+ The that contains the next sibling token.
+
+
+
+ Gets the previous sibling token of this node.
+
+ The that contains the previous sibling token.
+
+
+
+ Gets the path of the JSON token.
+
+
+
+
+ Adds the specified content immediately after this token.
+
+ A content object that contains simple content or a collection of content objects to be added after this token.
+
+
+
+ Adds the specified content immediately before this token.
+
+ A content object that contains simple content or a collection of content objects to be added before this token.
+
+
+
+ Returns a collection of the ancestor tokens of this token.
+
+ A collection of the ancestor tokens of this token.
+
+
+
+ Returns a collection of tokens that contain this token, and the ancestors of this token.
+
+ A collection of tokens that contain this token, and the ancestors of this token.
+
+
+
+ Returns a collection of the sibling tokens after this token, in document order.
+
+ A collection of the sibling tokens after this tokens, in document order.
+
+
+
+ Returns a collection of the sibling tokens before this token, in document order.
+
+ A collection of the sibling tokens before this token, in document order.
+
+
+
+ Gets the with the specified key.
+
+ The with the specified key.
+
+
+
+ Gets the with the specified key converted to the specified type.
+
+ The type to convert the token to.
+ The token key.
+ The converted token value.
+
+
+
+ Get the first child token of this token.
+
+ A containing the first child token of the .
+
+
+
+ Get the last child token of this token.
+
+ A containing the last child token of the .
+
+
+
+ Returns a collection of the child tokens of this token, in document order.
+
+ An of containing the child tokens of this , in document order.
+
+
+
+ Returns a collection of the child tokens of this token, in document order, filtered by the specified type.
+
+ The type to filter the child tokens on.
+ A containing the child tokens of this , in document order.
+
+
+
+ Returns a collection of the child values of this token, in document order.
+
+ The type to convert the values to.
+ A containing the child values of this , in document order.
+
+
+
+ Removes this token from its parent.
+
+
+
+
+ Replaces this token with the specified token.
+
+ The value.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of which will be used when writing the token.
+
+
+
+ Returns the indented JSON for this token.
+
+
+ ToString() returns a non-JSON string value for tokens with a type of .
+ If you want the JSON for all token types then you should use .
+
+
+ The indented JSON for this token.
+
+
+
+
+ Returns the JSON for this token using the given formatting and converters.
+
+ Indicates how the output should be formatted.
+ A collection of s which will be used when writing the token.
+ The JSON for this token using the given formatting and converters.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to [].
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to of .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an explicit conversion from to .
+
+ The value.
+ The result of the conversion.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from [] to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Performs an implicit conversion from of to .
+
+ The value to create a from.
+ The initialized with the specified value.
+
+
+
+ Creates a for this token.
+
+ A that can be used to read this token and its descendants.
+
+
+
+ Creates a from an object.
+
+ The object that will be used to create .
+ A with the value of the specified object.
+
+
+
+ Creates a from an object using the specified .
+
+ The object that will be used to create .
+ The that will be used when reading the object.
+ A with the value of the specified object.
+
+
+
+ Creates an instance of the specified .NET type from the .
+
+ The object type that the token will be deserialized to.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the .
+
+ The object type that the token will be deserialized to.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the using the specified .
+
+ The object type that the token will be deserialized to.
+ The that will be used when creating the object.
+ The new object created from the JSON value.
+
+
+
+ Creates an instance of the specified .NET type from the using the specified .
+
+ The object type that the token will be deserialized to.
+ The that will be used when creating the object.
+ The new object created from the JSON value.
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Creates a from a .
+
+ An positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ A populated from the string that contains JSON.
+
+
+
+ Load a from a string that contains JSON.
+
+ A that contains JSON.
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+ A populated from the string that contains JSON.
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+ The used to load the JSON.
+ If this is null, default load settings will be used.
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Creates a from a .
+
+ A positioned at the token to read into this .
+
+ A that contains the token and its descendant tokens
+ that were read from the reader. The runtime type of the token is determined
+ by the token type of the first token encountered in the reader.
+
+
+
+
+ Selects a using a JSONPath expression. Selects the token that matches the object path.
+
+
+ A that contains a JSONPath expression.
+
+ A , or null.
+
+
+
+ Selects a using a JSONPath expression. Selects the token that matches the object path.
+
+
+ A that contains a JSONPath expression.
+
+ A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.
+ A .
+
+
+
+ Selects a collection of elements using a JSONPath expression.
+
+
+ A that contains a JSONPath expression.
+
+ An of that contains the selected elements.
+
+
+
+ Selects a collection of elements using a JSONPath expression.
+
+
+ A that contains a JSONPath expression.
+
+ A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.
+ An of that contains the selected elements.
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Creates a new instance of the . All child tokens are recursively cloned.
+
+ A new instance of the .
+
+
+
+ Adds an object to the annotation list of this .
+
+ The annotation to add.
+
+
+
+ Get the first annotation object of the specified type from this .
+
+ The type of the annotation to retrieve.
+ The first annotation object that matches the specified type, or null if no annotation is of the specified type.
+
+
+
+ Gets the first annotation object of the specified type from this .
+
+ The of the annotation to retrieve.
+ The first annotation object that matches the specified type, or null if no annotation is of the specified type.
+
+
+
+ Gets a collection of annotations of the specified type for this .
+
+ The type of the annotations to retrieve.
+ An that contains the annotations for this .
+
+
+
+ Gets a collection of annotations of the specified type for this .
+
+ The of the annotations to retrieve.
+ An of that contains the annotations that match the specified type for this .
+
+
+
+ Removes the annotations of the specified type from this .
+
+ The type of annotations to remove.
+
+
+
+ Removes the annotations of the specified type from this .
+
+ The of annotations to remove.
+
+
+
+ Compares tokens to determine whether they are equal.
+
+
+
+
+ Determines whether the specified objects are equal.
+
+ The first object of type to compare.
+ The second object of type to compare.
+
+ true if the specified objects are equal; otherwise, false.
+
+
+
+
+ Returns a hash code for the specified object.
+
+ The for which a hash code is to be returned.
+ A hash code for the specified object.
+ The type of is a reference type and is null.
+
+
+
+ Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data.
+
+
+
+
+ Gets the at the reader's current position.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The token to read from.
+
+
+
+ Initializes a new instance of the class.
+
+ The token to read from.
+ The initial path of the token. It is prepended to the returned .
+
+
+
+ Reads the next JSON token from the underlying .
+
+
+ true if the next token was read successfully; false if there are no more tokens to read.
+
+
+
+
+ Gets the path of the current JSON token.
+
+
+
+
+ Specifies the type of token.
+
+
+
+
+ No token type has been set.
+
+
+
+
+ A JSON object.
+
+
+
+
+ A JSON array.
+
+
+
+
+ A JSON constructor.
+
+
+
+
+ A JSON object property.
+
+
+
+
+ A comment.
+
+
+
+
+ An integer value.
+
+
+
+
+ A float value.
+
+
+
+
+ A string value.
+
+
+
+
+ A boolean value.
+
+
+
+
+ A null value.
+
+
+
+
+ An undefined value.
+
+
+
+
+ A date value.
+
+
+
+
+ A raw JSON value.
+
+
+
+
+ A collection of bytes value.
+
+
+
+
+ A Guid value.
+
+
+
+
+ A Uri value.
+
+
+
+
+ A TimeSpan value.
+
+
+
+
+ Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data.
+
+
+
+
+ Gets the at the writer's current position.
+
+
+
+
+ Gets the token being written.
+
+ The token being written.
+
+
+
+ Initializes a new instance of the class writing to the given .
+
+ The container being written to.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Flushes whatever is in the buffer to the underlying .
+
+
+
+
+ Closes this writer.
+ If is set to true, the JSON is auto-completed.
+
+
+ Setting to true has no additional effect, since the underlying is a type that cannot be closed.
+
+
+
+
+ Writes the beginning of a JSON object.
+
+
+
+
+ Writes the beginning of a JSON array.
+
+
+
+
+ Writes the start of a constructor with the given name.
+
+ The name of the constructor.
+
+
+
+ Writes the end.
+
+ The token.
+
+
+
+ Writes the property name of a name/value pair on a JSON object.
+
+ The name of the property.
+
+
+
+ Writes a value.
+ An error will be raised if the value cannot be written as a single JSON token.
+
+ The value to write.
+
+
+
+ Writes a null value.
+
+
+
+
+ Writes an undefined value.
+
+
+
+
+ Writes raw JSON.
+
+ The raw JSON to write.
+
+
+
+ Writes a comment /*...*/ containing the specified text.
+
+ Text to place inside the comment.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a [] value.
+
+ The [] value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Writes a value.
+
+ The value to write.
+
+
+
+ Represents a value in JSON (string, integer, date, etc).
+
+
+
+
+ Writes this token to a asynchronously.
+
+ A into which this method will write.
+ The token to monitor for cancellation requests.
+ A collection of which will be used when writing the token.
+ A that represents the asynchronous write operation.
+
+
+
+ Initializes a new instance of the class from another object.
+
+ A object to copy from.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Initializes a new instance of the class with the given value.
+
+ The value.
+
+
+
+ Gets a value indicating whether this token has child tokens.
+
+
+ true if this token has child values; otherwise, false.
+
+
+
+
+ Creates a comment with the given value.
+
+ The value.
+ A comment with the given value.
+
+
+
+ Creates a string with the given value.
+
+ The value.
+ A string with the given value.
+
+
+
+ Creates a null value.
+
+ A null value.
+
+
+
+ Creates a undefined value.
+
+ A undefined value.
+
+
+
+ Gets the node type for this .
+
+ The type.
+
+
+
+ Gets or sets the underlying token value.
+
+ The underlying token value.
+
+
+
+ Writes this token to a .
+
+ A into which this method will write.
+ A collection of s which will be used when writing the token.
+
+
+
+ Indicates whether the current object is equal to another object of the same type.
+
+
+ true if the current object is equal to the parameter; otherwise, false.
+
+ An object to compare with this object.
+
+
+
+ Determines whether the specified is equal to the current .
+
+ The to compare with the current .
+
+ true if the specified is equal to the current ; otherwise, false.
+
+
+
+
+ Serves as a hash function for a particular type.
+
+
+ A hash code for the current .
+
+
+
+
+ Returns a that represents this instance.
+
+
+ ToString() returns a non-JSON string value for tokens with a type of .
+ If you want the JSON for all token types then you should use .
+
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format.
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format provider.
+
+ A that represents this instance.
+
+
+
+
+ Returns a that represents this instance.
+
+ The format.
+ The format provider.
+
+ A that represents this instance.
+
+
+
+
+ Returns the responsible for binding operations performed on this object.
+
+ The expression tree representation of the runtime value.
+
+ The to bind this object.
+
+
+
+
+ Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
+
+ An object to compare with this instance.
+
+ A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings:
+ Value
+ Meaning
+ Less than zero
+ This instance is less than .
+ Zero
+ This instance is equal to .
+ Greater than zero
+ This instance is greater than .
+
+
+ is not of the same type as this instance.
+
+
+
+
+ Specifies how line information is handled when loading JSON.
+
+
+
+
+ Ignore line information.
+
+
+
+
+ Load line information.
+
+
+
+
+ Specifies how JSON arrays are merged together.
+
+
+
+ Concatenate arrays.
+
+
+ Union arrays, skipping items that already exist.
+
+
+ Replace all array items.
+
+
+ Merge array items together, matched by index.
+
+
+
+ Specifies how null value properties are merged.
+
+
+
+
+ The content's null value properties will be ignored during merging.
+
+
+
+
+ The content's null value properties will be merged.
+
+
+
+
+ Specifies the member serialization options for the .
+
+
+
+
+ All public members are serialized by default. Members can be excluded using or .
+ This is the default member serialization mode.
+
+
+
+
+ Only members marked with or are serialized.
+ This member serialization mode can also be set by marking the class with .
+
+
+
+
+ All public and private fields are serialized. Members can be excluded using or .
+ This member serialization mode can also be set by marking the class with
+ and setting IgnoreSerializableAttribute on to false.
+
+
+
+
+ Specifies metadata property handling options for the .
+
+
+
+
+ Read metadata properties located at the start of a JSON object.
+
+
+
+
+ Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance.
+
+
+
+
+ Do not try to read metadata properties.
+
+
+
+
+ Specifies missing member handling options for the .
+
+
+
+
+ Ignore a missing member and do not attempt to deserialize it.
+
+
+
+
+ Throw a when a missing member is encountered during deserialization.
+
+
+
+
+ Specifies null value handling options for the .
+
+
+
+
+
+
+
+
+ Include null values when serializing and deserializing objects.
+
+
+
+
+ Ignore null values when serializing and deserializing objects.
+
+
+
+
+ Specifies how object creation is handled by the .
+
+
+
+
+ Reuse existing objects, create new objects when needed.
+
+
+
+
+ Only reuse existing objects.
+
+
+
+
+ Always create new objects.
+
+
+
+
+ Specifies reference handling options for the .
+ Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement .
+
+
+
+
+
+
+
+ Do not preserve references when serializing types.
+
+
+
+
+ Preserve references when serializing into a JSON object structure.
+
+
+
+
+ Preserve references when serializing into a JSON array structure.
+
+
+
+
+ Preserve references when serializing.
+
+
+
+
+ Specifies reference loop handling options for the .
+
+
+
+
+ Throw a when a loop is encountered.
+
+
+
+
+ Ignore loop references and do not serialize.
+
+
+
+
+ Serialize loop references.
+
+
+
+
+ Indicating whether a property is required.
+
+
+
+
+ The property is not required. The default state.
+
+
+
+
+ The property must be defined in JSON but can be a null value.
+
+
+
+
+ The property must be defined in JSON and cannot be a null value.
+
+
+
+
+ The property is not required but it cannot be a null value.
+
+
+
+
+
+ Contains the JSON schema extension methods.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+
+ Determines whether the is valid.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+
+ true if the specified is valid; otherwise, false.
+
+
+
+
+
+ Determines whether the is valid.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+ When this method returns, contains any error messages generated while validating.
+
+ true if the specified is valid; otherwise, false.
+
+
+
+
+
+ Validates the specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+
+
+
+
+ Validates the specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+ The source to test.
+ The schema to test with.
+ The validation event handler.
+
+
+
+
+ An in-memory representation of a JSON Schema.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets the id.
+
+
+
+
+ Gets or sets the title.
+
+
+
+
+ Gets or sets whether the object is required.
+
+
+
+
+ Gets or sets whether the object is read-only.
+
+
+
+
+ Gets or sets whether the object is visible to users.
+
+
+
+
+ Gets or sets whether the object is transient.
+
+
+
+
+ Gets or sets the description of the object.
+
+
+
+
+ Gets or sets the types of values allowed by the object.
+
+ The type.
+
+
+
+ Gets or sets the pattern.
+
+ The pattern.
+
+
+
+ Gets or sets the minimum length.
+
+ The minimum length.
+
+
+
+ Gets or sets the maximum length.
+
+ The maximum length.
+
+
+
+ Gets or sets a number that the value should be divisible by.
+
+ A number that the value should be divisible by.
+
+
+
+ Gets or sets the minimum.
+
+ The minimum.
+
+
+
+ Gets or sets the maximum.
+
+ The maximum.
+
+
+
+ Gets or sets a flag indicating whether the value can not equal the number defined by the minimum attribute ().
+
+ A flag indicating whether the value can not equal the number defined by the minimum attribute ().
+
+
+
+ Gets or sets a flag indicating whether the value can not equal the number defined by the maximum attribute ().
+
+ A flag indicating whether the value can not equal the number defined by the maximum attribute ().
+
+
+
+ Gets or sets the minimum number of items.
+
+ The minimum number of items.
+
+
+
+ Gets or sets the maximum number of items.
+
+ The maximum number of items.
+
+
+
+ Gets or sets the of items.
+
+ The of items.
+
+
+
+ Gets or sets a value indicating whether items in an array are validated using the instance at their array position from .
+
+
+ true if items are validated using their array position; otherwise, false.
+
+
+
+
+ Gets or sets the of additional items.
+
+ The of additional items.
+
+
+
+ Gets or sets a value indicating whether additional items are allowed.
+
+
+ true if additional items are allowed; otherwise, false.
+
+
+
+
+ Gets or sets whether the array items must be unique.
+
+
+
+
+ Gets or sets the of properties.
+
+ The of properties.
+
+
+
+ Gets or sets the of additional properties.
+
+ The of additional properties.
+
+
+
+ Gets or sets the pattern properties.
+
+ The pattern properties.
+
+
+
+ Gets or sets a value indicating whether additional properties are allowed.
+
+
+ true if additional properties are allowed; otherwise, false.
+
+
+
+
+ Gets or sets the required property if this property is present.
+
+ The required property if this property is present.
+
+
+
+ Gets or sets the a collection of valid enum values allowed.
+
+ A collection of valid enum values allowed.
+
+
+
+ Gets or sets disallowed types.
+
+ The disallowed types.
+
+
+
+ Gets or sets the default value.
+
+ The default value.
+
+
+
+ Gets or sets the collection of that this schema extends.
+
+ The collection of that this schema extends.
+
+
+
+ Gets or sets the format.
+
+ The format.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Reads a from the specified .
+
+ The containing the JSON Schema to read.
+ The object representing the JSON Schema.
+
+
+
+ Reads a from the specified .
+
+ The containing the JSON Schema to read.
+ The to use when resolving schema references.
+ The object representing the JSON Schema.
+
+
+
+ Load a from a string that contains JSON Schema.
+
+ A that contains JSON Schema.
+ A populated from the string that contains JSON Schema.
+
+
+
+ Load a from a string that contains JSON Schema using the specified .
+
+ A that contains JSON Schema.
+ The resolver.
+ A populated from the string that contains JSON Schema.
+
+
+
+ Writes this schema to a .
+
+ A into which this method will write.
+
+
+
+ Writes this schema to a using the specified .
+
+ A into which this method will write.
+ The resolver used.
+
+
+
+ Returns a that represents the current .
+
+
+ A that represents the current .
+
+
+
+
+
+ Returns detailed information about the schema exception.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets the line number indicating where the error occurred.
+
+ The line number indicating where the error occurred.
+
+
+
+ Gets the line position indicating where the error occurred.
+
+ The line position indicating where the error occurred.
+
+
+
+ Gets the path to the JSON where the error occurred.
+
+ The path to the JSON where the error occurred.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Initializes a new instance of the class
+ with a specified error message.
+
+ The error message that explains the reason for the exception.
+
+
+
+ Initializes a new instance of the class
+ with a specified error message and a reference to the inner exception that is the cause of this exception.
+
+ The error message that explains the reason for the exception.
+ The exception that is the cause of the current exception, or null if no inner exception is specified.
+
+
+
+
+ Generates a from a specified .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets how undefined schemas are handled by the serializer.
+
+
+
+
+ Gets or sets the contract resolver.
+
+ The contract resolver.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ The used to resolve schema references.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ Specify whether the generated root will be nullable.
+ A generated from the specified type.
+
+
+
+ Generate a from the specified type.
+
+ The type to generate a from.
+ The used to resolve schema references.
+ Specify whether the generated root will be nullable.
+ A generated from the specified type.
+
+
+
+
+ Resolves from an id.
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets or sets the loaded schemas.
+
+ The loaded schemas.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Gets a for the specified reference.
+
+ The id.
+ A for the specified reference.
+
+
+
+
+ The value types allowed by the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ No type specified.
+
+
+
+
+ String type.
+
+
+
+
+ Float type.
+
+
+
+
+ Integer type.
+
+
+
+
+ Boolean type.
+
+
+
+
+ Object type.
+
+
+
+
+ Array type.
+
+
+
+
+ Null type.
+
+
+
+
+ Any type.
+
+
+
+
+
+ Specifies undefined schema Id handling options for the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Do not infer a schema Id.
+
+
+
+
+ Use the .NET type name as the schema Id.
+
+
+
+
+ Use the assembly qualified .NET type name as the schema Id.
+
+
+
+
+
+ Returns detailed information related to the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Gets the associated with the validation error.
+
+ The JsonSchemaException associated with the validation error.
+
+
+
+ Gets the path of the JSON location where the validation error occurred.
+
+ The path of the JSON location where the validation error occurred.
+
+
+
+ Gets the text description corresponding to the validation error.
+
+ The text description.
+
+
+
+
+ Represents the callback method that will handle JSON schema validation events and the .
+
+
+ JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details.
+
+
+
+
+
+ Allows users to control class loading and mandate what class to load.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object
+ The type of the object the formatter creates a new instance of.
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ A camel case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Resolves member mappings for a type, camel casing property names.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Used by to resolve a for a given .
+
+
+
+
+ Gets a value indicating whether members are being get and set using dynamic code generation.
+ This value is determined by the runtime permissions available.
+
+
+ true if using dynamic code generation; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether compiler generated members should be serialized.
+
+
+ true if serialized compiler generated members; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore IsSpecified members when serializing and deserializing types.
+
+
+ true if the IsSpecified members will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets a value indicating whether to ignore ShouldSerialize members when serializing and deserializing types.
+
+
+ true if the ShouldSerialize members will be ignored when serializing and deserializing types; otherwise, false.
+
+
+
+
+ Gets or sets the naming strategy used to resolve how property names and dictionary keys are serialized.
+
+ The naming strategy used to resolve how property names and dictionary keys are serialized.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Gets the serializable members for the type.
+
+ The type to get serializable members for.
+ The serializable members for the type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates the constructor parameters.
+
+ The constructor to create properties for.
+ The type's member properties.
+ Properties for the given .
+
+
+
+ Creates a for the given .
+
+ The matching member property.
+ The constructor parameter.
+ A created for the given .
+
+
+
+ Resolves the default for the contract.
+
+ Type of the object.
+ The contract's default .
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates a for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Determines which contract type is created for the given type.
+
+ Type of the object.
+ A for the given type.
+
+
+
+ Creates properties for the given .
+
+ The type to create properties for.
+ /// The member serialization mode for the type.
+ Properties for the given .
+
+
+
+ Creates the used by the serializer to get and set values from a member.
+
+ The member.
+ The used by the serializer to get and set values from a member.
+
+
+
+ Creates a for the given .
+
+ The member's parent .
+ The member to create a for.
+ A created for the given .
+
+
+
+ Resolves the name of the property.
+
+ Name of the property.
+ Resolved name of the property.
+
+
+
+ Resolves the name of the extension data. By default no changes are made to extension data names.
+
+ Name of the extension data.
+ Resolved name of the extension data.
+
+
+
+ Resolves the key of the dictionary. By default is used to resolve dictionary keys.
+
+ Key of the dictionary.
+ Resolved key of the dictionary.
+
+
+
+ Gets the resolved name of the property.
+
+ Name of the property.
+ Name of the property.
+
+
+
+ The default naming strategy. Property names and dictionary keys are unchanged.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ The default serialization binder used when resolving and loading classes from type names.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+ The type of the object the formatter creates a new instance of.
+
+
+
+
+ When overridden in a derived class, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ Provides information surrounding an error.
+
+
+
+
+ Gets the error.
+
+ The error.
+
+
+
+ Gets the original object that caused the error.
+
+ The original object that caused the error.
+
+
+
+ Gets the member that caused the error.
+
+ The member that caused the error.
+
+
+
+ Gets the path of the JSON location where the error occurred.
+
+ The path of the JSON location where the error occurred.
+
+
+
+ Gets or sets a value indicating whether this is handled.
+
+ true if handled; otherwise, false.
+
+
+
+ Provides data for the Error event.
+
+
+
+
+ Gets the current object the error event is being raised against.
+
+ The current object the error event is being raised against.
+
+
+
+ Gets the error context.
+
+ The error context.
+
+
+
+ Initializes a new instance of the class.
+
+ The current object.
+ The error context.
+
+
+
+ Get and set values for a using dynamic methods.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Provides methods to get attributes.
+
+
+
+
+ Returns a collection of all of the attributes, or an empty collection if there are no attributes.
+
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Returns a collection of attributes, identified by type, or an empty collection if there are no attributes.
+
+ The type of the attributes.
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Used by to resolve a for a given .
+
+
+
+
+
+
+
+
+ Resolves the contract for a given type.
+
+ The type to resolve a contract for.
+ The contract for a given type.
+
+
+
+ Used to resolve references when serializing and deserializing JSON by the .
+
+
+
+
+ Resolves a reference to its object.
+
+ The serialization context.
+ The reference to resolve.
+ The object that was resolved from the reference.
+
+
+
+ Gets the reference for the specified object.
+
+ The serialization context.
+ The object to get a reference for.
+ The reference to the object.
+
+
+
+ Determines whether the specified object is referenced.
+
+ The serialization context.
+ The object to test for a reference.
+
+ true if the specified object is referenced; otherwise, false.
+
+
+
+
+ Adds a reference to the specified object.
+
+ The serialization context.
+ The reference.
+ The object to reference.
+
+
+
+ Allows users to control class loading and mandate what class to load.
+
+
+
+
+ When implemented, controls the binding of a serialized object to a type.
+
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object
+ The type of the object the formatter creates a new instance of.
+
+
+
+ When implemented, controls the binding of a serialized object to a type.
+
+ The type of the object the formatter creates a new instance of.
+ Specifies the name of the serialized object.
+ Specifies the name of the serialized object.
+
+
+
+ Represents a trace writer.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Provides methods to get and set values.
+
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the of the collection items.
+
+ The of the collection items.
+
+
+
+ Gets a value indicating whether the collection type is a multidimensional array.
+
+ true if the collection type is a multidimensional array; otherwise, false.
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+
+ The function used to create the object.
+
+
+
+ Gets a value indicating whether the creator has a parameter with the collection values.
+
+ true if the creator has a parameter with the collection values; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the default collection items .
+
+ The converter.
+
+
+
+ Gets or sets a value indicating whether the collection items preserve object references.
+
+ true if collection items preserve object references; otherwise, false.
+
+
+
+ Gets or sets the collection item reference loop handling.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the collection item type name handling.
+
+ The type name handling.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Handles serialization callback events.
+
+ The object that raised the callback event.
+ The streaming context.
+
+
+
+ Handles serialization error callback events.
+
+ The object that raised the callback event.
+ The streaming context.
+ The error context.
+
+
+
+ Sets extension data for an object during deserialization.
+
+ The object to set extension data on.
+ The extension data key.
+ The extension data value.
+
+
+
+ Gets extension data for an object during serialization.
+
+ The object to set extension data on.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the underlying type for the contract.
+
+ The underlying type for the contract.
+
+
+
+ Gets or sets the type created during deserialization.
+
+ The type created during deserialization.
+
+
+
+ Gets or sets whether this type contract is serialized as a reference.
+
+ Whether this type contract is serialized as a reference.
+
+
+
+ Gets or sets the default for this contract.
+
+ The converter.
+
+
+
+ Gets the internally resolved for the contract's type.
+ This converter is used as a fallback converter when no other converter is resolved.
+ Setting will always override this converter.
+
+
+
+
+ Gets or sets all methods called immediately after deserialization of the object.
+
+ The methods called immediately after deserialization of the object.
+
+
+
+ Gets or sets all methods called during deserialization of the object.
+
+ The methods called during deserialization of the object.
+
+
+
+ Gets or sets all methods called after serialization of the object graph.
+
+ The methods called after serialization of the object graph.
+
+
+
+ Gets or sets all methods called before serialization of the object.
+
+ The methods called before serialization of the object.
+
+
+
+ Gets or sets all method called when an error is thrown during the serialization of the object.
+
+ The methods called when an error is thrown during the serialization of the object.
+
+
+
+ Gets or sets the default creator method used to create the object.
+
+ The default creator method used to create the object.
+
+
+
+ Gets or sets a value indicating whether the default creator is non-public.
+
+ true if the default object creator is non-public; otherwise, false.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the dictionary key resolver.
+
+ The dictionary key resolver.
+
+
+
+ Gets the of the dictionary keys.
+
+ The of the dictionary keys.
+
+
+
+ Gets the of the dictionary values.
+
+ The of the dictionary values.
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+
+ The function used to create the object.
+
+
+
+ Gets a value indicating whether the creator has a parameter with the dictionary values.
+
+ true if the creator has a parameter with the dictionary values; otherwise, false.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets the object's properties.
+
+ The object's properties.
+
+
+
+ Gets or sets the property name resolver.
+
+ The property name resolver.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Gets or sets the object member serialization.
+
+ The member object serialization.
+
+
+
+ Gets or sets the missing member handling used when deserializing this object.
+
+ The missing member handling.
+
+
+
+ Gets or sets a value that indicates whether the object's properties are required.
+
+
+ A value indicating whether the object's properties are required.
+
+
+
+
+ Gets or sets how the object's properties with null values are handled during serialization and deserialization.
+
+ How the object's properties with null values are handled during serialization and deserialization.
+
+
+
+ Gets the object's properties.
+
+ The object's properties.
+
+
+
+ Gets a collection of instances that define the parameters used with .
+
+
+
+
+ Gets or sets the function used to create the object. When set this function will override .
+ This function is called with a collection of arguments which are defined by the collection.
+
+ The function used to create the object.
+
+
+
+ Gets or sets the extension data setter.
+
+
+
+
+ Gets or sets the extension data getter.
+
+
+
+
+ Gets or sets the extension data value type.
+
+
+
+
+ Gets or sets the extension data name resolver.
+
+ The extension data name resolver.
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Maps a JSON property to a .NET member or constructor parameter.
+
+
+
+
+ Gets or sets the name of the property.
+
+ The name of the property.
+
+
+
+ Gets or sets the type that declared this property.
+
+ The type that declared this property.
+
+
+
+ Gets or sets the order of serialization of a member.
+
+ The numeric order of serialization.
+
+
+
+ Gets or sets the name of the underlying member or parameter.
+
+ The name of the underlying member or parameter.
+
+
+
+ Gets the that will get and set the during serialization.
+
+ The that will get and set the during serialization.
+
+
+
+ Gets or sets the for this property.
+
+ The for this property.
+
+
+
+ Gets or sets the type of the property.
+
+ The type of the property.
+
+
+
+ Gets or sets the for the property.
+ If set this converter takes precedence over the contract converter for the property type.
+
+ The converter.
+
+
+
+ Gets or sets the member converter.
+
+ The member converter.
+
+
+
+ Gets or sets a value indicating whether this is ignored.
+
+ true if ignored; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this is readable.
+
+ true if readable; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this is writable.
+
+ true if writable; otherwise, false.
+
+
+
+ Gets or sets a value indicating whether this has a member attribute.
+
+ true if has a member attribute; otherwise, false.
+
+
+
+ Gets the default value.
+
+ The default value.
+
+
+
+ Gets or sets a value indicating whether this is required.
+
+ A value indicating whether this is required.
+
+
+
+ Gets a value indicating whether has a value specified.
+
+
+
+
+ Gets or sets a value indicating whether this property preserves object references.
+
+
+ true if this instance is reference; otherwise, false.
+
+
+
+
+ Gets or sets the property null value handling.
+
+ The null value handling.
+
+
+
+ Gets or sets the property default value handling.
+
+ The default value handling.
+
+
+
+ Gets or sets the property reference loop handling.
+
+ The reference loop handling.
+
+
+
+ Gets or sets the property object creation handling.
+
+ The object creation handling.
+
+
+
+ Gets or sets or sets the type name handling.
+
+ The type name handling.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be serialized.
+
+ A predicate used to determine whether the property should be serialized.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be deserialized.
+
+ A predicate used to determine whether the property should be deserialized.
+
+
+
+ Gets or sets a predicate used to determine whether the property should be serialized.
+
+ A predicate used to determine whether the property should be serialized.
+
+
+
+ Gets or sets an action used to set whether the property has been deserialized.
+
+ An action used to set whether the property has been deserialized.
+
+
+
+ Returns a that represents this instance.
+
+
+ A that represents this instance.
+
+
+
+
+ Gets or sets the converter used when serializing the property's collection items.
+
+ The collection's items converter.
+
+
+
+ Gets or sets whether this property's collection items are serialized as a reference.
+
+ Whether this property's collection items are serialized as a reference.
+
+
+
+ Gets or sets the type name handling used when serializing the property's collection items.
+
+ The collection's items type name handling.
+
+
+
+ Gets or sets the reference loop handling used when serializing the property's collection items.
+
+ The collection's items reference loop handling.
+
+
+
+ A collection of objects.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The type.
+
+
+
+ When implemented in a derived class, extracts the key from the specified element.
+
+ The element from which to extract the key.
+ The key for the specified element.
+
+
+
+ Adds a object.
+
+ The property to add to the collection.
+
+
+
+ Gets the closest matching object.
+ First attempts to get an exact case match of and then
+ a case insensitive match.
+
+ Name of the property.
+ A matching property if found.
+
+
+
+ Gets a property by property name.
+
+ The name of the property to get.
+ Type property name string comparison.
+ A matching property if found.
+
+
+
+ Contract details for a used by the .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The underlying type for the contract.
+
+
+
+ Lookup and create an instance of the type described by the argument.
+
+ The type to create.
+ Optional arguments to pass to an initializing constructor of the JsonConverter.
+ If null, the default constructor is used.
+
+
+
+ A kebab case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Represents a trace writer that writes to memory. When the trace message limit is
+ reached then old trace messages will be removed as new messages are added.
+
+
+
+
+ Gets the that will be used to filter the trace messages passed to the writer.
+ For example a filter level of will exclude messages and include ,
+ and messages.
+
+
+ The that will be used to filter the trace messages passed to the writer.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Writes the specified trace level, message and optional exception.
+
+ The at which to write this trace.
+ The trace message.
+ The trace exception. This parameter is optional.
+
+
+
+ Returns an enumeration of the most recent trace messages.
+
+ An enumeration of the most recent trace messages.
+
+
+
+ Returns a of the most recent trace messages.
+
+
+ A of the most recent trace messages.
+
+
+
+
+ A base class for resolving how property names and dictionary keys are serialized.
+
+
+
+
+ A flag indicating whether dictionary keys should be processed.
+ Defaults to false.
+
+
+
+
+ A flag indicating whether extension data names should be processed.
+ Defaults to false.
+
+
+
+
+ A flag indicating whether explicitly specified property names,
+ e.g. a property name customized with a , should be processed.
+ Defaults to false.
+
+
+
+
+ Gets the serialized name for a given property name.
+
+ The initial property name.
+ A flag indicating whether the property has had a name explicitly specified.
+ The serialized property name.
+
+
+
+ Gets the serialized name for a given extension data name.
+
+ The initial extension data name.
+ The serialized extension data name.
+
+
+
+ Gets the serialized key for a given dictionary key.
+
+ The initial dictionary key.
+ The serialized dictionary key.
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Hash code calculation
+
+
+
+
+
+ Object equality implementation
+
+
+
+
+
+
+ Compare to another NamingStrategy
+
+
+
+
+
+
+ Represents a method that constructs an object.
+
+ The object type to create.
+
+
+
+ When applied to a method, specifies that the method is called when an error occurs serializing an object.
+
+
+
+
+ Provides methods to get attributes from a , , or .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The instance to get attributes for. This parameter should be a , , or .
+
+
+
+ Returns a collection of all of the attributes, or an empty collection if there are no attributes.
+
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Returns a collection of attributes, identified by type, or an empty collection if there are no attributes.
+
+ The type of the attributes.
+ When true, look up the hierarchy chain for the inherited custom attribute.
+ A collection of s, or an empty collection.
+
+
+
+ Get and set values for a using reflection.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The member info.
+
+
+
+ Sets the value.
+
+ The target to set the value on.
+ The value to set on the target.
+
+
+
+ Gets the value.
+
+ The target to get the value from.
+ The value.
+
+
+
+ A snake case naming strategy.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ A flag indicating whether dictionary keys should be processed.
+
+
+ A flag indicating whether explicitly specified property names should be processed,
+ e.g. a property name customized with a .
+
+
+ A flag indicating whether extension data names should be processed.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Resolves the specified property name.
+
+ The property name to resolve.
+ The resolved property name.
+
+
+
+ Specifies how strings are escaped when writing JSON text.
+
+
+
+
+ Only control characters (e.g. newline) are escaped.
+
+
+
+
+ All non-ASCII and control characters (e.g. newline) are escaped.
+
+
+
+
+ HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped.
+
+
+
+
+ Specifies what messages to output for the class.
+
+
+
+
+ Output no tracing and debugging messages.
+
+
+
+
+ Output error-handling messages.
+
+
+
+
+ Output warnings and error-handling messages.
+
+
+
+
+ Output informational messages, warnings, and error-handling messages.
+
+
+
+
+ Output all debugging and tracing messages.
+
+
+
+
+ Indicates the method that will be used during deserialization for locating and loading assemblies.
+
+
+
+
+ In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the LoadWithPartialName method of the class is used to load the assembly.
+
+
+
+
+ In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The Load method of the class is used to load the assembly.
+
+
+
+
+ Specifies type name handling options for the .
+
+
+ should be used with caution when your application deserializes JSON from an external source.
+ Incoming types should be validated with a custom
+ when deserializing with a value other than .
+
+
+
+
+ Do not include the .NET type name when serializing types.
+
+
+
+
+ Include the .NET type name when serializing into a JSON object structure.
+
+
+
+
+ Include the .NET type name when serializing into a JSON array structure.
+
+
+
+
+ Always include the .NET type name when serializing.
+
+
+
+
+ Include the .NET type name when the type of the object being serialized is not the same as its declared type.
+ Note that this doesn't include the root serialized object by default. To include the root object's type name in JSON
+ you must specify a root type object with
+ or .
+
+
+
+
+ Determines whether the collection is null or empty.
+
+ The collection.
+
+ true if the collection is null or empty; otherwise, false.
+
+
+
+
+ Adds the elements of the specified collection to the specified generic .
+
+ The list to add to.
+ The collection of elements to add.
+
+
+
+ Converts the value to the specified type. If the value is unable to be converted, the
+ value is checked whether it assignable to the specified type.
+
+ The value to convert.
+ The culture to use when converting.
+ The type to convert or cast the value to.
+
+ The converted type. If conversion was unsuccessful, the initial value
+ is returned if assignable to the target type.
+
+
+
+
+ Helper method for generating a MetaObject which calls a
+ specific method on Dynamic that returns a result
+
+
+
+
+ Helper method for generating a MetaObject which calls a
+ specific method on Dynamic, but uses one of the arguments for
+ the result.
+
+
+
+
+ Helper method for generating a MetaObject which calls a
+ specific method on Dynamic, but uses one of the arguments for
+ the result.
+
+
+
+
+ Returns a Restrictions object which includes our current restrictions merged
+ with a restriction limiting our type
+
+
+
+
+ Helper class for serializing immutable collections.
+ Note that this is used by all builds, even those that don't support immutable collections, in case the DLL is GACed
+ https://github.com/JamesNK/Newtonsoft.Json/issues/652
+
+
+
+
+ List of primitive types which can be widened.
+
+
+
+
+ Widening masks for primitive types above.
+ Index of the value in this array defines a type we're widening,
+ while the bits in mask define types it can be widened to (including itself).
+
+ For example, value at index 0 defines a bool type, and it only has bit 0 set,
+ i.e. bool values can be assigned only to bool.
+
+
+
+
+ Checks if value of primitive type can be
+ assigned to parameter of primitive type .
+
+ Source primitive type.
+ Target primitive type.
+ true if source type can be widened to target type, false otherwise.
+
+
+
+ Checks if a set of values with given can be used
+ to invoke a method with specified .
+
+ Method parameters.
+ Argument types.
+ Try to pack extra arguments into the last parameter when it is marked up with .
+ true if method can be called with given arguments, false otherwise.
+
+
+
+ Compares two sets of parameters to determine
+ which one suits better for given argument types.
+
+
+
+
+ Returns a best method overload for given argument .
+
+ List of method candidates.
+ Argument types.
+ Best method overload, or null if none matched.
+
+
+
+ Gets the type of the typed collection's items.
+
+ The type.
+ The type of the typed collection's items.
+
+
+
+ Gets the member's underlying type.
+
+ The member.
+ The underlying type of the member.
+
+
+
+ Determines whether the property is an indexed property.
+
+ The property.
+
+ true if the property is an indexed property; otherwise, false.
+
+
+
+
+ Gets the member's value on the object.
+
+ The member.
+ The target object.
+ The member's value on the object.
+
+
+
+ Sets the member's value on the target object.
+
+ The member.
+ The target.
+ The value.
+
+
+
+ Determines whether the specified MemberInfo can be read.
+
+ The MemberInfo to determine whether can be read.
+ /// if set to true then allow the member to be gotten non-publicly.
+
+ true if the specified MemberInfo can be read; otherwise, false.
+
+
+
+
+ Determines whether the specified MemberInfo can be set.
+
+ The MemberInfo to determine whether can be set.
+ if set to true then allow the member to be set non-publicly.
+ if set to true then allow the member to be set if read-only.
+
+ true if the specified MemberInfo can be set; otherwise, false.
+
+
+
+
+ Builds a string. Unlike this class lets you reuse its internal buffer.
+
+
+
+
+ Determines whether the string is all white space. Empty string will return false.
+
+ The string to test whether it is all white space.
+
+ true if the string is all white space; otherwise, false.
+
+
+
+
+ Specifies the state of the .
+
+
+
+
+ An exception has been thrown, which has left the in an invalid state.
+ You may call the method to put the in the Closed state.
+ Any other method calls result in an being thrown.
+
+
+
+
+ The method has been called.
+
+
+
+
+ An object is being written.
+
+
+
+
+ An array is being written.
+
+
+
+
+ A constructor is being written.
+
+
+
+
+ A property is being written.
+
+
+
+
+ A write method has not been called.
+
+
+
+
+ Indicates the method that will be used during deserialization for locating and loading assemblies.
+
+
+
+
+ In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the method is used to load the assembly.
+
+
+
+
+ In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The is used to load the assembly.
+
+
+
+ Specifies that an output will not be null even if the corresponding type allows it.
+
+
+ Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it.
+
+
+ Initializes the attribute with the specified return value condition.
+
+ The return value condition. If the method returns this value, the associated parameter will not be null.
+
+
+
+ Gets the return value condition.
+
+
+ Specifies that an output may be null even if the corresponding type disallows it.
+
+
+ Specifies that null is allowed as an input even if the corresponding type disallows it.
+
+
+
+ Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+ The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to
+ the associated parameter matches this value.
+
+
+
+ Gets the condition parameter value.
+
+
+
diff --git a/packages/Newtonsoft.Json.12.0.3/packageIcon.png b/packages/Newtonsoft.Json.12.0.3/packageIcon.png
new file mode 100644
index 00000000..10c06a5c
Binary files /dev/null and b/packages/Newtonsoft.Json.12.0.3/packageIcon.png differ
diff --git a/websocket-sharp.sln b/websocket-sharp.sln
index 3c20e06a..c68989a3 100644
--- a/websocket-sharp.sln
+++ b/websocket-sharp.sln
@@ -11,6 +11,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Example2", "Example2\Exampl
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Example3", "Example3\Example3.csproj", "{C648BA25-77E5-4A40-A97F-D0AA37B9FB26}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestServer2", "TestServer2\TestServer2.csproj", "{874E9D0F-A2D7-4714-B790-F9631ED35582}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -59,6 +61,14 @@ Global
{C648BA25-77E5-4A40-A97F-D0AA37B9FB26}.Release_Ubuntu|Any CPU.Build.0 = Release_Ubuntu|Any CPU
{C648BA25-77E5-4A40-A97F-D0AA37B9FB26}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C648BA25-77E5-4A40-A97F-D0AA37B9FB26}.Release|Any CPU.Build.0 = Release|Any CPU
+ {874E9D0F-A2D7-4714-B790-F9631ED35582}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {874E9D0F-A2D7-4714-B790-F9631ED35582}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {874E9D0F-A2D7-4714-B790-F9631ED35582}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {874E9D0F-A2D7-4714-B790-F9631ED35582}.Release|Any CPU.Build.0 = Release|Any CPU
+ {874E9D0F-A2D7-4714-B790-F9631ED35582}.Debug_Ubuntu|Any CPU.ActiveCfg = Debug|Any CPU
+ {874E9D0F-A2D7-4714-B790-F9631ED35582}.Debug_Ubuntu|Any CPU.Build.0 = Debug|Any CPU
+ {874E9D0F-A2D7-4714-B790-F9631ED35582}.Release_Ubuntu|Any CPU.ActiveCfg = Debug|Any CPU
+ {874E9D0F-A2D7-4714-B790-F9631ED35582}.Release_Ubuntu|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = websocket-sharp\websocket-sharp.csproj
diff --git a/websocket-sharp/AssemblyInfo.cs b/websocket-sharp/AssemblyInfo.cs
index c85deaa4..c9f8be5b 100644
--- a/websocket-sharp/AssemblyInfo.cs
+++ b/websocket-sharp/AssemblyInfo.cs
@@ -1,26 +1,26 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// Information about this assembly is defined by the following attributes.
-// Change them to the values specific to your project.
-
-[assembly: AssemblyTitle("websocket-sharp")]
-[assembly: AssemblyDescription("A C# implementation of the WebSocket protocol client and server")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("websocket-sharp.dll")]
-[assembly: AssemblyCopyright("sta.blockhead")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
-// The form "{Major}.{Minor}.*" will automatically update the build and revision,
-// and "{Major}.{Minor}.{Build}.*" will update just the revision.
-
-[assembly: AssemblyVersion("1.0.2.*")]
-
-// The following attributes are used to specify the signing key for the assembly,
-// if desired. See the Mono documentation for more information about signing.
-
-//[assembly: AssemblyDelaySign(false)]
-//[assembly: AssemblyKeyFile("")]
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("websocket-sharp")]
+[assembly: AssemblyDescription("A C# implementation of the WebSocket protocol client and server")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("websocket-sharp.dll")]
+[assembly: AssemblyCopyright("sta.blockhead")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.2.*")]
+
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
diff --git a/websocket-sharp/ByteOrder.cs b/websocket-sharp/ByteOrder.cs
index 317f462e..37045bba 100644
--- a/websocket-sharp/ByteOrder.cs
+++ b/websocket-sharp/ByteOrder.cs
@@ -1,47 +1,47 @@
-#region License
-/*
- * ByteOrder.cs
- *
- * The MIT License
- *
- * Copyright (c) 2012-2015 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-using System;
-
-namespace WebSocketSharp
-{
- ///
- /// Specifies the byte order.
- ///
- public enum ByteOrder
- {
- ///
- /// Specifies Little-endian.
- ///
- Little,
- ///
- /// Specifies Big-endian.
- ///
- Big
- }
-}
+#region License
+/*
+ * ByteOrder.cs
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2012-2015 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+using System;
+
+namespace WebSocketSharp
+{
+ ///
+ /// Specifies the byte order.
+ ///
+ public enum ByteOrder
+ {
+ ///
+ /// Specifies Little-endian.
+ ///
+ Little,
+ ///
+ /// Specifies Big-endian.
+ ///
+ Big
+ }
+}
diff --git a/websocket-sharp/CloseEventArgs.cs b/websocket-sharp/CloseEventArgs.cs
index 8127ce41..4a08f27d 100644
--- a/websocket-sharp/CloseEventArgs.cs
+++ b/websocket-sharp/CloseEventArgs.cs
@@ -1,113 +1,113 @@
-#region License
-/*
- * CloseEventArgs.cs
- *
- * The MIT License
- *
- * Copyright (c) 2012-2019 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-using System;
-
-namespace WebSocketSharp
-{
- ///
- /// Represents the event data for the event.
- ///
- ///
- ///
- /// That event occurs when the WebSocket connection has been closed.
- ///
- ///
- /// If you would like to get the reason for the connection close, you should
- /// access the or property.
- ///
- ///
- public class CloseEventArgs : EventArgs
- {
- #region Private Fields
-
- private bool _clean;
- private PayloadData _payloadData;
-
- #endregion
-
- #region Internal Constructors
-
- internal CloseEventArgs (PayloadData payloadData, bool clean)
- {
- _payloadData = payloadData;
- _clean = clean;
- }
-
- internal CloseEventArgs (ushort code, string reason, bool clean)
- {
- _payloadData = new PayloadData (code, reason);
- _clean = clean;
- }
-
- #endregion
-
- #region Public Properties
-
- ///
- /// Gets the status code for the connection close.
- ///
- ///
- /// A that represents the status code for
- /// the connection close if present.
- ///
- public ushort Code {
- get {
- return _payloadData.Code;
- }
- }
-
- ///
- /// Gets the reason for the connection close.
- ///
- ///
- /// A that represents the reason for
- /// the connection close if present.
- ///
- public string Reason {
- get {
- return _payloadData.Reason;
- }
- }
-
- ///
- /// Gets a value indicating whether the connection has been closed cleanly.
- ///
- ///
- /// true if the connection has been closed cleanly; otherwise,
- /// false.
- ///
- public bool WasClean {
- get {
- return _clean;
- }
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * CloseEventArgs.cs
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2012-2019 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+using System;
+
+namespace WebSocketSharp
+{
+ ///
+ /// Represents the event data for the event.
+ ///
+ ///
+ ///
+ /// That event occurs when the WebSocket connection has been closed.
+ ///
+ ///
+ /// If you would like to get the reason for the connection close, you should
+ /// access the or property.
+ ///
+ ///
+ public class CloseEventArgs : EventArgs
+ {
+ #region Private Fields
+
+ private bool _clean;
+ private PayloadData _payloadData;
+
+ #endregion
+
+ #region Internal Constructors
+
+ internal CloseEventArgs (PayloadData payloadData, bool clean)
+ {
+ _payloadData = payloadData;
+ _clean = clean;
+ }
+
+ internal CloseEventArgs (ushort code, string reason, bool clean)
+ {
+ _payloadData = new PayloadData (code, reason);
+ _clean = clean;
+ }
+
+ #endregion
+
+ #region Public Properties
+
+ ///
+ /// Gets the status code for the connection close.
+ ///
+ ///
+ /// A that represents the status code for
+ /// the connection close if present.
+ ///
+ public ushort Code {
+ get {
+ return _payloadData.Code;
+ }
+ }
+
+ ///
+ /// Gets the reason for the connection close.
+ ///
+ ///
+ /// A that represents the reason for
+ /// the connection close if present.
+ ///
+ public string Reason {
+ get {
+ return _payloadData.Reason;
+ }
+ }
+
+ ///
+ /// Gets a value indicating whether the connection has been closed cleanly.
+ ///
+ ///
+ /// true if the connection has been closed cleanly; otherwise,
+ /// false.
+ ///
+ public bool WasClean {
+ get {
+ return _clean;
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/CloseStatusCode.cs b/websocket-sharp/CloseStatusCode.cs
index 81f3317a..ecafbed4 100644
--- a/websocket-sharp/CloseStatusCode.cs
+++ b/websocket-sharp/CloseStatusCode.cs
@@ -1,120 +1,120 @@
-#region License
-/*
- * CloseStatusCode.cs
- *
- * The MIT License
- *
- * Copyright (c) 2012-2016 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-using System;
-
-namespace WebSocketSharp
-{
- ///
- /// Indicates the status code for the WebSocket connection close.
- ///
- ///
- ///
- /// The values of this enumeration are defined in
- ///
- /// Section 7.4 of RFC 6455.
- ///
- ///
- /// "Reserved value" cannot be sent as a status code in
- /// closing handshake by an endpoint.
- ///
- ///
- public enum CloseStatusCode : ushort
- {
- ///
- /// Equivalent to close status 1000. Indicates normal close.
- ///
- Normal = 1000,
- ///
- /// Equivalent to close status 1001. Indicates that an endpoint is
- /// going away.
- ///
- Away = 1001,
- ///
- /// Equivalent to close status 1002. Indicates that an endpoint is
- /// terminating the connection due to a protocol error.
- ///
- ProtocolError = 1002,
- ///
- /// Equivalent to close status 1003. Indicates that an endpoint is
- /// terminating the connection because it has received a type of
- /// data that it cannot accept.
- ///
- UnsupportedData = 1003,
- ///
- /// Equivalent to close status 1004. Still undefined. A Reserved value.
- ///
- Undefined = 1004,
- ///
- /// Equivalent to close status 1005. Indicates that no status code was
- /// actually present. A Reserved value.
- ///
- NoStatus = 1005,
- ///
- /// Equivalent to close status 1006. Indicates that the connection was
- /// closed abnormally. A Reserved value.
- ///
- Abnormal = 1006,
- ///
- /// Equivalent to close status 1007. Indicates that an endpoint is
- /// terminating the connection because it has received a message that
- /// contains data that is not consistent with the type of the message.
- ///
- InvalidData = 1007,
- ///
- /// Equivalent to close status 1008. Indicates that an endpoint is
- /// terminating the connection because it has received a message that
- /// violates its policy.
- ///
- PolicyViolation = 1008,
- ///
- /// Equivalent to close status 1009. Indicates that an endpoint is
- /// terminating the connection because it has received a message that
- /// is too big to process.
- ///
- TooBig = 1009,
- ///
- /// Equivalent to close status 1010. Indicates that a client is
- /// terminating the connection because it has expected the server to
- /// negotiate one or more extension, but the server did not return
- /// them in the handshake response.
- ///
- MandatoryExtension = 1010,
- ///
- /// Equivalent to close status 1011. Indicates that a server is
- /// terminating the connection because it has encountered an unexpected
- /// condition that prevented it from fulfilling the request.
- ///
- ServerError = 1011,
- ///
- /// Equivalent to close status 1015. Indicates that the connection was
- /// closed due to a failure to perform a TLS handshake. A Reserved value.
- ///
- TlsHandshakeFailure = 1015
- }
-}
+#region License
+/*
+ * CloseStatusCode.cs
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2012-2016 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+using System;
+
+namespace WebSocketSharp
+{
+ ///
+ /// Indicates the status code for the WebSocket connection close.
+ ///
+ ///
+ ///
+ /// The values of this enumeration are defined in
+ ///
+ /// Section 7.4 of RFC 6455.
+ ///
+ ///
+ /// "Reserved value" cannot be sent as a status code in
+ /// closing handshake by an endpoint.
+ ///
+ ///
+ public enum CloseStatusCode : ushort
+ {
+ ///
+ /// Equivalent to close status 1000. Indicates normal close.
+ ///
+ Normal = 1000,
+ ///
+ /// Equivalent to close status 1001. Indicates that an endpoint is
+ /// going away.
+ ///
+ Away = 1001,
+ ///
+ /// Equivalent to close status 1002. Indicates that an endpoint is
+ /// terminating the connection due to a protocol error.
+ ///
+ ProtocolError = 1002,
+ ///
+ /// Equivalent to close status 1003. Indicates that an endpoint is
+ /// terminating the connection because it has received a type of
+ /// data that it cannot accept.
+ ///
+ UnsupportedData = 1003,
+ ///
+ /// Equivalent to close status 1004. Still undefined. A Reserved value.
+ ///
+ Undefined = 1004,
+ ///
+ /// Equivalent to close status 1005. Indicates that no status code was
+ /// actually present. A Reserved value.
+ ///
+ NoStatus = 1005,
+ ///
+ /// Equivalent to close status 1006. Indicates that the connection was
+ /// closed abnormally. A Reserved value.
+ ///
+ Abnormal = 1006,
+ ///
+ /// Equivalent to close status 1007. Indicates that an endpoint is
+ /// terminating the connection because it has received a message that
+ /// contains data that is not consistent with the type of the message.
+ ///
+ InvalidData = 1007,
+ ///
+ /// Equivalent to close status 1008. Indicates that an endpoint is
+ /// terminating the connection because it has received a message that
+ /// violates its policy.
+ ///
+ PolicyViolation = 1008,
+ ///
+ /// Equivalent to close status 1009. Indicates that an endpoint is
+ /// terminating the connection because it has received a message that
+ /// is too big to process.
+ ///
+ TooBig = 1009,
+ ///
+ /// Equivalent to close status 1010. Indicates that a client is
+ /// terminating the connection because it has expected the server to
+ /// negotiate one or more extension, but the server did not return
+ /// them in the handshake response.
+ ///
+ MandatoryExtension = 1010,
+ ///
+ /// Equivalent to close status 1011. Indicates that a server is
+ /// terminating the connection because it has encountered an unexpected
+ /// condition that prevented it from fulfilling the request.
+ ///
+ ServerError = 1011,
+ ///
+ /// Equivalent to close status 1015. Indicates that the connection was
+ /// closed due to a failure to perform a TLS handshake. A Reserved value.
+ ///
+ TlsHandshakeFailure = 1015
+ }
+}
diff --git a/websocket-sharp/CompressionMethod.cs b/websocket-sharp/CompressionMethod.cs
index 42ab230a..6458c9bd 100644
--- a/websocket-sharp/CompressionMethod.cs
+++ b/websocket-sharp/CompressionMethod.cs
@@ -1,52 +1,52 @@
-#region License
-/*
- * CompressionMethod.cs
- *
- * The MIT License
- *
- * Copyright (c) 2013-2017 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-using System;
-
-namespace WebSocketSharp
-{
- ///
- /// Specifies the method for compression.
- ///
- ///
- /// The methods are defined in
- ///
- /// Compression Extensions for WebSocket.
- ///
- public enum CompressionMethod : byte
- {
- ///
- /// Specifies no compression.
- ///
- None,
- ///
- /// Specifies DEFLATE.
- ///
- Deflate
- }
-}
+#region License
+/*
+ * CompressionMethod.cs
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2013-2017 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+using System;
+
+namespace WebSocketSharp
+{
+ ///
+ /// Specifies the method for compression.
+ ///
+ ///
+ /// The methods are defined in
+ ///
+ /// Compression Extensions for WebSocket.
+ ///
+ public enum CompressionMethod : byte
+ {
+ ///
+ /// Specifies no compression.
+ ///
+ None,
+ ///
+ /// Specifies DEFLATE.
+ ///
+ Deflate
+ }
+}
diff --git a/websocket-sharp/ErrorEventArgs.cs b/websocket-sharp/ErrorEventArgs.cs
index 41502ab0..3939af90 100644
--- a/websocket-sharp/ErrorEventArgs.cs
+++ b/websocket-sharp/ErrorEventArgs.cs
@@ -1,109 +1,109 @@
-#region License
-/*
- * ErrorEventArgs.cs
- *
- * The MIT License
- *
- * Copyright (c) 2012-2016 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-#region Contributors
-/*
- * Contributors:
- * - Frank Razenberg
- */
-#endregion
-
-using System;
-
-namespace WebSocketSharp
-{
- ///
- /// Represents the event data for the event.
- ///
- ///
- ///
- /// That event occurs when the gets an error.
- ///
- ///
- /// If you would like to get the error message, you should access
- /// the property.
- ///
- ///
- /// And if the error is due to an exception, you can get it by accessing
- /// the property.
- ///
- ///
- public class ErrorEventArgs : EventArgs
- {
- #region Private Fields
-
- private Exception _exception;
- private string _message;
-
- #endregion
-
- #region Internal Constructors
-
- internal ErrorEventArgs (string message)
- : this (message, null)
- {
- }
-
- internal ErrorEventArgs (string message, Exception exception)
- {
- _message = message;
- _exception = exception;
- }
-
- #endregion
-
- #region Public Properties
-
- ///
- /// Gets the exception that caused the error.
- ///
- ///
- /// An instance that represents the cause of
- /// the error if it is due to an exception; otherwise, .
- ///
- public Exception Exception {
- get {
- return _exception;
- }
- }
-
- ///
- /// Gets the error message.
- ///
- ///
- /// A that represents the error message.
- ///
- public string Message {
- get {
- return _message;
- }
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * ErrorEventArgs.cs
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2012-2016 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+#region Contributors
+/*
+ * Contributors:
+ * - Frank Razenberg
+ */
+#endregion
+
+using System;
+
+namespace WebSocketSharp
+{
+ ///
+ /// Represents the event data for the event.
+ ///
+ ///
+ ///
+ /// That event occurs when the gets an error.
+ ///
+ ///
+ /// If you would like to get the error message, you should access
+ /// the property.
+ ///
+ ///
+ /// And if the error is due to an exception, you can get it by accessing
+ /// the property.
+ ///
+ ///
+ public class ErrorEventArgs : EventArgs
+ {
+ #region Private Fields
+
+ private Exception _exception;
+ private string _message;
+
+ #endregion
+
+ #region Internal Constructors
+
+ internal ErrorEventArgs (string message)
+ : this (message, null)
+ {
+ }
+
+ internal ErrorEventArgs (string message, Exception exception)
+ {
+ _message = message;
+ _exception = exception;
+ }
+
+ #endregion
+
+ #region Public Properties
+
+ ///
+ /// Gets the exception that caused the error.
+ ///
+ ///
+ /// An instance that represents the cause of
+ /// the error if it is due to an exception; otherwise, .
+ ///
+ public Exception Exception {
+ get {
+ return _exception;
+ }
+ }
+
+ ///
+ /// Gets the error message.
+ ///
+ ///
+ /// A that represents the error message.
+ ///
+ public string Message {
+ get {
+ return _message;
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/Ext.cs b/websocket-sharp/Ext.cs
index 10c30bc6..47216254 100644
--- a/websocket-sharp/Ext.cs
+++ b/websocket-sharp/Ext.cs
@@ -1,2245 +1,2245 @@
-#region License
-/*
- * Ext.cs
- *
- * Some parts of this code are derived from Mono (http://www.mono-project.com):
- * - GetStatusDescription is derived from HttpListenerResponse.cs (System.Net)
- * - IsPredefinedScheme is derived from Uri.cs (System)
- * - MaybeUri is derived from Uri.cs (System)
- *
- * The MIT License
- *
- * Copyright (c) 2001 Garrett Rooney
- * Copyright (c) 2003 Ian MacLean
- * Copyright (c) 2003 Ben Maurer
- * Copyright (c) 2003, 2005, 2009 Novell, Inc. (http://www.novell.com)
- * Copyright (c) 2009 Stephane Delcroix
- * Copyright (c) 2010-2016 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-#region Contributors
-/*
- * Contributors:
- * - Liryna
- * - Nikola Kovacevic
- * - Chris Swiedler
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.IO;
-using System.IO.Compression;
-using System.Net.Sockets;
-using System.Security.Cryptography.X509Certificates;
-using System.Text;
-using WebSocketSharp.Net;
-using WebSocketSharp.Net.WebSockets;
-using WebSocketSharp.Server;
-
-namespace WebSocketSharp
-{
- ///
- /// Provides a set of static methods for websocket-sharp.
- ///
- public static class Ext
- {
- #region Private Fields
-
- private static readonly byte[] _last = new byte[] { 0x00 };
- private static readonly int _retry = 5;
- private const string _tspecials = "()<>@,;:\\\"/[]?={} \t";
-
- #endregion
-
- #region Private Methods
-
- private static byte[] compress (this byte[] data)
- {
- if (data.LongLength == 0)
- //return new byte[] { 0x00, 0x00, 0x00, 0xff, 0xff };
- return data;
-
- using (var input = new MemoryStream (data))
- return input.compressToArray ();
- }
-
- private static MemoryStream compress (this Stream stream)
- {
- var output = new MemoryStream ();
- if (stream.Length == 0)
- return output;
-
- stream.Position = 0;
- using (var ds = new DeflateStream (output, CompressionMode.Compress, true)) {
- stream.CopyTo (ds, 1024);
- ds.Close (); // BFINAL set to 1.
- output.Write (_last, 0, 1);
- output.Position = 0;
-
- return output;
- }
- }
-
- private static byte[] compressToArray (this Stream stream)
- {
- using (var output = stream.compress ()) {
- output.Close ();
- return output.ToArray ();
- }
- }
-
- private static byte[] decompress (this byte[] data)
- {
- if (data.LongLength == 0)
- return data;
-
- using (var input = new MemoryStream (data))
- return input.decompressToArray ();
- }
-
- private static MemoryStream decompress (this Stream stream)
- {
- var output = new MemoryStream ();
- if (stream.Length == 0)
- return output;
-
- stream.Position = 0;
- using (var ds = new DeflateStream (stream, CompressionMode.Decompress, true)) {
- ds.CopyTo (output, 1024);
- output.Position = 0;
-
- return output;
- }
- }
-
- private static byte[] decompressToArray (this Stream stream)
- {
- using (var output = stream.decompress ()) {
- output.Close ();
- return output.ToArray ();
- }
- }
-
- private static bool isHttpMethod (this string value)
- {
- return value == "GET"
- || value == "HEAD"
- || value == "POST"
- || value == "PUT"
- || value == "DELETE"
- || value == "CONNECT"
- || value == "OPTIONS"
- || value == "TRACE";
- }
-
- private static bool isHttpMethod10 (this string value)
- {
- return value == "GET"
- || value == "HEAD"
- || value == "POST";
- }
-
- #endregion
-
- #region Internal Methods
-
- internal static byte[] Append (this ushort code, string reason)
- {
- var bytes = code.InternalToByteArray (ByteOrder.Big);
-
- if (reason == null || reason.Length == 0)
- return bytes;
-
- var buff = new List (bytes);
- buff.AddRange (Encoding.UTF8.GetBytes (reason));
-
- return buff.ToArray ();
- }
-
- internal static byte[] Compress (this byte[] data, CompressionMethod method)
- {
- return method == CompressionMethod.Deflate
- ? data.compress ()
- : data;
- }
-
- internal static Stream Compress (this Stream stream, CompressionMethod method)
- {
- return method == CompressionMethod.Deflate
- ? stream.compress ()
- : stream;
- }
-
- internal static byte[] CompressToArray (this Stream stream, CompressionMethod method)
- {
- return method == CompressionMethod.Deflate
- ? stream.compressToArray ()
- : stream.ToByteArray ();
- }
-
- ///
- /// Determines whether the specified string contains any of characters in
- /// the specified array of .
- ///
- ///
- /// true if contains any of characters in
- /// ; otherwise, false.
- ///
- ///
- /// A to test.
- ///
- ///
- /// An array of that contains one or more characters to
- /// seek.
- ///
- internal static bool Contains (this string value, params char[] anyOf)
- {
- return anyOf != null && anyOf.Length > 0
- ? value.IndexOfAny (anyOf) > -1
- : false;
- }
-
- internal static bool Contains (
- this NameValueCollection collection, string name
- )
- {
- return collection[name] != null;
- }
-
- internal static bool Contains (
- this NameValueCollection collection,
- string name,
- string value,
- StringComparison comparisonTypeForValue
- )
- {
- var val = collection[name];
- if (val == null)
- return false;
-
- foreach (var elm in val.Split (',')) {
- if (elm.Trim ().Equals (value, comparisonTypeForValue))
- return true;
- }
-
- return false;
- }
-
- internal static bool Contains (
- this IEnumerable source, Func condition
- )
- {
- foreach (T elm in source) {
- if (condition (elm))
- return true;
- }
-
- return false;
- }
-
- internal static bool ContainsTwice (this string[] values)
- {
- var len = values.Length;
- var end = len - 1;
-
- Func seek = null;
- seek = idx => {
- if (idx == end)
- return false;
-
- var val = values[idx];
- for (var i = idx + 1; i < len; i++) {
- if (values[i] == val)
- return true;
- }
-
- return seek (++idx);
- };
-
- return seek (0);
- }
-
- internal static T[] Copy (this T[] source, int length)
- {
- var dest = new T[length];
- Array.Copy (source, 0, dest, 0, length);
-
- return dest;
- }
-
- internal static T[] Copy (this T[] source, long length)
- {
- var dest = new T[length];
- Array.Copy (source, 0, dest, 0, length);
-
- return dest;
- }
-
- internal static void CopyTo (
- this Stream source, Stream destination, int bufferLength
- )
- {
- var buff = new byte[bufferLength];
- var nread = 0;
-
- while (true) {
- nread = source.Read (buff, 0, bufferLength);
- if (nread <= 0)
- break;
-
- destination.Write (buff, 0, nread);
- }
- }
-
- internal static void CopyToAsync (
- this Stream source,
- Stream destination,
- int bufferLength,
- Action completed,
- Action error
- )
- {
- var buff = new byte[bufferLength];
-
- AsyncCallback callback = null;
- callback =
- ar => {
- try {
- var nread = source.EndRead (ar);
- if (nread <= 0) {
- if (completed != null)
- completed ();
-
- return;
- }
-
- destination.Write (buff, 0, nread);
- source.BeginRead (buff, 0, bufferLength, callback, null);
- }
- catch (Exception ex) {
- if (error != null)
- error (ex);
- }
- };
-
- try {
- source.BeginRead (buff, 0, bufferLength, callback, null);
- }
- catch (Exception ex) {
- if (error != null)
- error (ex);
- }
- }
-
- internal static byte[] Decompress (this byte[] data, CompressionMethod method)
- {
- return method == CompressionMethod.Deflate
- ? data.decompress ()
- : data;
- }
-
- internal static Stream Decompress (this Stream stream, CompressionMethod method)
- {
- return method == CompressionMethod.Deflate
- ? stream.decompress ()
- : stream;
- }
-
- internal static byte[] DecompressToArray (this Stream stream, CompressionMethod method)
- {
- return method == CompressionMethod.Deflate
- ? stream.decompressToArray ()
- : stream.ToByteArray ();
- }
-
- internal static void Emit (
- this EventHandler eventHandler, object sender, EventArgs e
- )
- {
- if (eventHandler == null)
- return;
-
- eventHandler (sender, e);
- }
-
- internal static void Emit (
- this EventHandler eventHandler, object sender, TEventArgs e
- )
- where TEventArgs : EventArgs
- {
- if (eventHandler == null)
- return;
-
- eventHandler (sender, e);
- }
-
- ///
- /// Determines whether the specified equals the specified ,
- /// and invokes the specified Action<int> delegate at the same time.
- ///
- ///
- /// true if equals ;
- /// otherwise, false.
- ///
- ///
- /// An to compare.
- ///
- ///
- /// A to compare.
- ///
- ///
- /// An Action<int> delegate that references the method(s) called
- /// at the same time as comparing. An parameter to pass to
- /// the method(s) is .
- ///
- internal static bool EqualsWith (this int value, char c, Action action)
- {
- action (value);
- return value == c - 0;
- }
-
- ///
- /// Gets the absolute path from the specified .
- ///
- ///
- /// A that represents the absolute path if it's successfully found;
- /// otherwise, .
- ///
- ///
- /// A that represents the URI to get the absolute path from.
- ///
- internal static string GetAbsolutePath (this Uri uri)
- {
- if (uri.IsAbsoluteUri)
- return uri.AbsolutePath;
-
- var original = uri.OriginalString;
- if (original[0] != '/')
- return null;
-
- var idx = original.IndexOfAny (new[] { '?', '#' });
- return idx > 0 ? original.Substring (0, idx) : original;
- }
-
- internal static CookieCollection GetCookies (
- this NameValueCollection headers, bool response
- )
- {
- var val = headers[response ? "Set-Cookie" : "Cookie"];
- return val != null
- ? CookieCollection.Parse (val, response)
- : new CookieCollection ();
- }
-
- internal static string GetDnsSafeHost (this Uri uri, bool bracketIPv6)
- {
- return bracketIPv6 && uri.HostNameType == UriHostNameType.IPv6
- ? uri.Host
- : uri.DnsSafeHost;
- }
-
- internal static string GetMessage (this CloseStatusCode code)
- {
- return code == CloseStatusCode.ProtocolError
- ? "A WebSocket protocol error has occurred."
- : code == CloseStatusCode.UnsupportedData
- ? "Unsupported data has been received."
- : code == CloseStatusCode.Abnormal
- ? "An exception has occurred."
- : code == CloseStatusCode.InvalidData
- ? "Invalid data has been received."
- : code == CloseStatusCode.PolicyViolation
- ? "A policy violation has occurred."
- : code == CloseStatusCode.TooBig
- ? "A too big message has been received."
- : code == CloseStatusCode.MandatoryExtension
- ? "WebSocket client didn't receive expected extension(s)."
- : code == CloseStatusCode.ServerError
- ? "WebSocket server got an internal error."
- : code == CloseStatusCode.TlsHandshakeFailure
- ? "An error has occurred during a TLS handshake."
- : String.Empty;
- }
-
- ///
- /// Gets the name from the specified string that contains a pair of
- /// name and value separated by a character.
- ///
- ///
- ///
- /// A that represents the name.
- ///
- ///
- /// if the name is not present.
- ///
- ///
- ///
- /// A that contains a pair of name and value.
- ///
- ///
- /// A used to separate name and value.
- ///
- internal static string GetName (this string nameAndValue, char separator)
- {
- var idx = nameAndValue.IndexOf (separator);
- return idx > 0 ? nameAndValue.Substring (0, idx).Trim () : null;
- }
-
- internal static string GetUTF8DecodedString (this byte[] bytes)
- {
- return Encoding.UTF8.GetString (bytes);
- }
-
- internal static byte[] GetUTF8EncodedBytes (this string s)
- {
- return Encoding.UTF8.GetBytes (s);
- }
-
- ///
- /// Gets the value from the specified string that contains a pair of
- /// name and value separated by a character.
- ///
- ///
- ///
- /// A that represents the value.
- ///
- ///
- /// if the value is not present.
- ///
- ///
- ///
- /// A that contains a pair of name and value.
- ///
- ///
- /// A used to separate name and value.
- ///
- internal static string GetValue (this string nameAndValue, char separator)
- {
- return nameAndValue.GetValue (separator, false);
- }
-
- ///
- /// Gets the value from the specified string that contains a pair of
- /// name and value separated by a character.
- ///
- ///
- ///
- /// A that represents the value.
- ///
- ///
- /// if the value is not present.
- ///
- ///
- ///
- /// A that contains a pair of name and value.
- ///
- ///
- /// A used to separate name and value.
- ///
- ///
- /// A : true if unquotes the value; otherwise,
- /// false.
- ///
- internal static string GetValue (
- this string nameAndValue, char separator, bool unquote
- )
- {
- var idx = nameAndValue.IndexOf (separator);
- if (idx < 0 || idx == nameAndValue.Length - 1)
- return null;
-
- var val = nameAndValue.Substring (idx + 1).Trim ();
- return unquote ? val.Unquote () : val;
- }
-
- internal static byte[] InternalToByteArray (
- this ushort value, ByteOrder order
- )
- {
- var ret = BitConverter.GetBytes (value);
-
- if (!order.IsHostOrder ())
- Array.Reverse (ret);
-
- return ret;
- }
-
- internal static byte[] InternalToByteArray (
- this ulong value, ByteOrder order
- )
- {
- var ret = BitConverter.GetBytes (value);
-
- if (!order.IsHostOrder ())
- Array.Reverse (ret);
-
- return ret;
- }
-
- internal static bool IsCompressionExtension (
- this string value, CompressionMethod method
- )
- {
- return value.StartsWith (method.ToExtensionString ());
- }
-
- internal static bool IsControl (this byte opcode)
- {
- return opcode > 0x7 && opcode < 0x10;
- }
-
- internal static bool IsControl (this Opcode opcode)
- {
- return opcode >= Opcode.Close;
- }
-
- internal static bool IsData (this byte opcode)
- {
- return opcode == 0x1 || opcode == 0x2;
- }
-
- internal static bool IsData (this Opcode opcode)
- {
- return opcode == Opcode.Text || opcode == Opcode.Binary;
- }
-
- internal static bool IsHttpMethod (this string value, Version version)
- {
- return version == HttpVersion.Version10
- ? value.isHttpMethod10 ()
- : value.isHttpMethod ();
- }
-
- internal static bool IsPortNumber (this int value)
- {
- return value > 0 && value < 65536;
- }
-
- internal static bool IsReserved (this ushort code)
- {
- return code == 1004
- || code == 1005
- || code == 1006
- || code == 1015;
- }
-
- internal static bool IsReserved (this CloseStatusCode code)
- {
- return code == CloseStatusCode.Undefined
- || code == CloseStatusCode.NoStatus
- || code == CloseStatusCode.Abnormal
- || code == CloseStatusCode.TlsHandshakeFailure;
- }
-
- internal static bool IsSupported (this byte opcode)
- {
- return Enum.IsDefined (typeof (Opcode), opcode);
- }
-
- internal static bool IsText (this string value)
- {
- var len = value.Length;
-
- for (var i = 0; i < len; i++) {
- var c = value[i];
- if (c < 0x20) {
- if ("\r\n\t".IndexOf (c) == -1)
- return false;
-
- if (c == '\n') {
- i++;
- if (i == len)
- break;
-
- c = value[i];
- if (" \t".IndexOf (c) == -1)
- return false;
- }
-
- continue;
- }
-
- if (c == 0x7f)
- return false;
- }
-
- return true;
- }
-
- internal static bool IsToken (this string value)
- {
- foreach (var c in value) {
- if (c < 0x20)
- return false;
-
- if (c > 0x7e)
- return false;
-
- if (_tspecials.IndexOf (c) > -1)
- return false;
- }
-
- return true;
- }
-
- internal static bool KeepsAlive (
- this NameValueCollection headers, Version version
- )
- {
- var comparison = StringComparison.OrdinalIgnoreCase;
- return version < HttpVersion.Version11
- ? headers.Contains ("Connection", "keep-alive", comparison)
- : !headers.Contains ("Connection", "close", comparison);
- }
-
- internal static string Quote (this string value)
- {
- return String.Format ("\"{0}\"", value.Replace ("\"", "\\\""));
- }
-
- internal static byte[] ReadBytes (this Stream stream, int length)
- {
- var buff = new byte[length];
- var offset = 0;
- var retry = 0;
- var nread = 0;
-
- while (length > 0) {
- nread = stream.Read (buff, offset, length);
- if (nread <= 0) {
- if (retry < _retry) {
- retry++;
- continue;
- }
-
- return buff.SubArray (0, offset);
- }
-
- retry = 0;
-
- offset += nread;
- length -= nread;
- }
-
- return buff;
- }
-
- internal static byte[] ReadBytes (
- this Stream stream, long length, int bufferLength
- )
- {
- using (var dest = new MemoryStream ()) {
- var buff = new byte[bufferLength];
- var retry = 0;
- var nread = 0;
-
- while (length > 0) {
- if (length < bufferLength)
- bufferLength = (int) length;
-
- nread = stream.Read (buff, 0, bufferLength);
- if (nread <= 0) {
- if (retry < _retry) {
- retry++;
- continue;
- }
-
- break;
- }
-
- retry = 0;
-
- dest.Write (buff, 0, nread);
- length -= nread;
- }
-
- dest.Close ();
- return dest.ToArray ();
- }
- }
-
- internal static void ReadBytesAsync (
- this Stream stream,
- int length,
- Action completed,
- Action error
- )
- {
- var buff = new byte[length];
- var offset = 0;
- var retry = 0;
-
- AsyncCallback callback = null;
- callback =
- ar => {
- try {
- var nread = stream.EndRead (ar);
- if (nread <= 0) {
- if (retry < _retry) {
- retry++;
- stream.BeginRead (buff, offset, length, callback, null);
-
- return;
- }
-
- if (completed != null)
- completed (buff.SubArray (0, offset));
-
- return;
- }
-
- if (nread == length) {
- if (completed != null)
- completed (buff);
-
- return;
- }
-
- retry = 0;
-
- offset += nread;
- length -= nread;
-
- stream.BeginRead (buff, offset, length, callback, null);
- }
- catch (Exception ex) {
- if (error != null)
- error (ex);
- }
- };
-
- try {
- stream.BeginRead (buff, offset, length, callback, null);
- }
- catch (Exception ex) {
- if (error != null)
- error (ex);
- }
- }
-
- internal static void ReadBytesAsync (
- this Stream stream,
- long length,
- int bufferLength,
- Action completed,
- Action error
- )
- {
- var dest = new MemoryStream ();
- var buff = new byte[bufferLength];
- var retry = 0;
-
- Action read = null;
- read =
- len => {
- if (len < bufferLength)
- bufferLength = (int) len;
-
- stream.BeginRead (
- buff,
- 0,
- bufferLength,
- ar => {
- try {
- var nread = stream.EndRead (ar);
- if (nread <= 0) {
- if (retry < _retry) {
- retry++;
- read (len);
-
- return;
- }
-
- if (completed != null) {
- dest.Close ();
- completed (dest.ToArray ());
- }
-
- dest.Dispose ();
- return;
- }
-
- dest.Write (buff, 0, nread);
-
- if (nread == len) {
- if (completed != null) {
- dest.Close ();
- completed (dest.ToArray ());
- }
-
- dest.Dispose ();
- return;
- }
-
- retry = 0;
-
- read (len - nread);
- }
- catch (Exception ex) {
- dest.Dispose ();
- if (error != null)
- error (ex);
- }
- },
- null
- );
- };
-
- try {
- read (length);
- }
- catch (Exception ex) {
- dest.Dispose ();
- if (error != null)
- error (ex);
- }
- }
-
- internal static T[] Reverse (this T[] array)
- {
- var len = array.Length;
- var ret = new T[len];
-
- var end = len - 1;
- for (var i = 0; i <= end; i++)
- ret[i] = array[end - i];
-
- return ret;
- }
-
- internal static IEnumerable SplitHeaderValue (
- this string value, params char[] separators
- )
- {
- var len = value.Length;
-
- var buff = new StringBuilder (32);
- var end = len - 1;
- var escaped = false;
- var quoted = false;
-
- for (var i = 0; i <= end; i++) {
- var c = value[i];
- buff.Append (c);
-
- if (c == '"') {
- if (escaped) {
- escaped = false;
- continue;
- }
-
- quoted = !quoted;
- continue;
- }
-
- if (c == '\\') {
- if (i == end)
- break;
-
- if (value[i + 1] == '"')
- escaped = true;
-
- continue;
- }
-
- if (Array.IndexOf (separators, c) > -1) {
- if (quoted)
- continue;
-
- buff.Length -= 1;
- yield return buff.ToString ();
-
- buff.Length = 0;
- continue;
- }
- }
-
- yield return buff.ToString ();
- }
-
- internal static byte[] ToByteArray (this Stream stream)
- {
- using (var output = new MemoryStream ()) {
- stream.Position = 0;
- stream.CopyTo (output, 1024);
- output.Close ();
-
- return output.ToArray ();
- }
- }
-
- internal static CompressionMethod ToCompressionMethod (this string value)
- {
- var methods = Enum.GetValues (typeof (CompressionMethod));
- foreach (CompressionMethod method in methods) {
- if (method.ToExtensionString () == value)
- return method;
- }
-
- return CompressionMethod.None;
- }
-
- internal static string ToExtensionString (
- this CompressionMethod method, params string[] parameters
- )
- {
- if (method == CompressionMethod.None)
- return String.Empty;
-
- var name = String.Format (
- "permessage-{0}", method.ToString ().ToLower ()
- );
-
- return parameters != null && parameters.Length > 0
- ? String.Format ("{0}; {1}", name, parameters.ToString ("; "))
- : name;
- }
-
- internal static System.Net.IPAddress ToIPAddress (this string value)
- {
- if (value == null || value.Length == 0)
- return null;
-
- System.Net.IPAddress addr;
- if (System.Net.IPAddress.TryParse (value, out addr))
- return addr;
-
- try {
- var addrs = System.Net.Dns.GetHostAddresses (value);
- return addrs[0];
- }
- catch {
- return null;
- }
- }
-
- internal static List ToList (
- this IEnumerable source
- )
- {
- return new List (source);
- }
-
- internal static string ToString (
- this System.Net.IPAddress address, bool bracketIPv6
- )
- {
- return bracketIPv6
- && address.AddressFamily == AddressFamily.InterNetworkV6
- ? String.Format ("[{0}]", address.ToString ())
- : address.ToString ();
- }
-
- internal static ushort ToUInt16 (this byte[] source, ByteOrder sourceOrder)
- {
- return BitConverter.ToUInt16 (source.ToHostOrder (sourceOrder), 0);
- }
-
- internal static ulong ToUInt64 (this byte[] source, ByteOrder sourceOrder)
- {
- return BitConverter.ToUInt64 (source.ToHostOrder (sourceOrder), 0);
- }
-
- internal static IEnumerable TrimEach (
- this IEnumerable source
- )
- {
- foreach (var elm in source)
- yield return elm.Trim ();
- }
-
- internal static string TrimSlashFromEnd (this string value)
- {
- var ret = value.TrimEnd ('/');
- return ret.Length > 0 ? ret : "/";
- }
-
- internal static string TrimSlashOrBackslashFromEnd (this string value)
- {
- var ret = value.TrimEnd ('/', '\\');
- return ret.Length > 0 ? ret : value[0].ToString ();
- }
-
- internal static bool TryCreateVersion (
- this string versionString, out Version result
- )
- {
- result = null;
-
- try {
- result = new Version (versionString);
- }
- catch {
- return false;
- }
-
- return true;
- }
-
- ///
- /// Tries to create a new for WebSocket with
- /// the specified .
- ///
- ///
- /// true if the was successfully created;
- /// otherwise, false.
- ///
- ///
- /// A that represents a WebSocket URL to try.
- ///
- ///
- /// When this method returns, a that
- /// represents the WebSocket URL or
- /// if is invalid.
- ///
- ///
- /// When this method returns, a that
- /// represents an error message or
- /// if is valid.
- ///
- internal static bool TryCreateWebSocketUri (
- this string uriString, out Uri result, out string message
- )
- {
- result = null;
- message = null;
-
- var uri = uriString.ToUri ();
- if (uri == null) {
- message = "An invalid URI string.";
- return false;
- }
-
- if (!uri.IsAbsoluteUri) {
- message = "A relative URI.";
- return false;
- }
-
- var schm = uri.Scheme;
- if (!(schm == "ws" || schm == "wss")) {
- message = "The scheme part is not 'ws' or 'wss'.";
- return false;
- }
-
- var port = uri.Port;
- if (port == 0) {
- message = "The port part is zero.";
- return false;
- }
-
- if (uri.Fragment.Length > 0) {
- message = "It includes the fragment component.";
- return false;
- }
-
- result = port != -1
- ? uri
- : new Uri (
- String.Format (
- "{0}://{1}:{2}{3}",
- schm,
- uri.Host,
- schm == "ws" ? 80 : 443,
- uri.PathAndQuery
- )
- );
-
- return true;
- }
-
- internal static bool TryGetUTF8DecodedString (this byte[] bytes, out string s)
- {
- s = null;
-
- try {
- s = Encoding.UTF8.GetString (bytes);
- }
- catch {
- return false;
- }
-
- return true;
- }
-
- internal static bool TryGetUTF8EncodedBytes (this string s, out byte[] bytes)
- {
- bytes = null;
-
- try {
- bytes = Encoding.UTF8.GetBytes (s);
- }
- catch {
- return false;
- }
-
- return true;
- }
-
- internal static bool TryOpenRead (
- this FileInfo fileInfo, out FileStream fileStream
- )
- {
- fileStream = null;
-
- try {
- fileStream = fileInfo.OpenRead ();
- }
- catch {
- return false;
- }
-
- return true;
- }
-
- internal static string Unquote (this string value)
- {
- var start = value.IndexOf ('"');
- if (start == -1)
- return value;
-
- var end = value.LastIndexOf ('"');
- if (end == start)
- return value;
-
- var len = end - start - 1;
- return len > 0
- ? value.Substring (start + 1, len).Replace ("\\\"", "\"")
- : String.Empty;
- }
-
- internal static bool Upgrades (
- this NameValueCollection headers, string protocol
- )
- {
- var comparison = StringComparison.OrdinalIgnoreCase;
- return headers.Contains ("Upgrade", protocol, comparison)
- && headers.Contains ("Connection", "Upgrade", comparison);
- }
-
- internal static string UrlDecode (this string value, Encoding encoding)
- {
- return HttpUtility.UrlDecode (value, encoding);
- }
-
- internal static string UrlEncode (this string value, Encoding encoding)
- {
- return HttpUtility.UrlEncode (value, encoding);
- }
-
- internal static void WriteBytes (
- this Stream stream, byte[] bytes, int bufferLength
- )
- {
- using (var src = new MemoryStream (bytes))
- src.CopyTo (stream, bufferLength);
- }
-
- internal static void WriteBytesAsync (
- this Stream stream,
- byte[] bytes,
- int bufferLength,
- Action completed,
- Action error
- )
- {
- var src = new MemoryStream (bytes);
- src.CopyToAsync (
- stream,
- bufferLength,
- () => {
- if (completed != null)
- completed ();
-
- src.Dispose ();
- },
- ex => {
- src.Dispose ();
- if (error != null)
- error (ex);
- }
- );
- }
-
- #endregion
-
- #region Public Methods
-
- ///
- /// Gets the description of the specified HTTP status code.
- ///
- ///
- /// A that represents the description of
- /// the HTTP status code.
- ///
- ///
- ///
- /// One of the enum values.
- ///
- ///
- /// It specifies the HTTP status code.
- ///
- ///
- public static string GetDescription (this HttpStatusCode code)
- {
- return ((int) code).GetStatusDescription ();
- }
-
- ///
- /// Gets the description of the specified HTTP status code.
- ///
- ///
- ///
- /// A that represents the description of
- /// the HTTP status code.
- ///
- ///
- /// An empty string if the description is not present.
- ///
- ///
- ///
- /// An that specifies the HTTP status code.
- ///
- public static string GetStatusDescription (this int code)
- {
- switch (code) {
- case 100: return "Continue";
- case 101: return "Switching Protocols";
- case 102: return "Processing";
- case 200: return "OK";
- case 201: return "Created";
- case 202: return "Accepted";
- case 203: return "Non-Authoritative Information";
- case 204: return "No Content";
- case 205: return "Reset Content";
- case 206: return "Partial Content";
- case 207: return "Multi-Status";
- case 300: return "Multiple Choices";
- case 301: return "Moved Permanently";
- case 302: return "Found";
- case 303: return "See Other";
- case 304: return "Not Modified";
- case 305: return "Use Proxy";
- case 307: return "Temporary Redirect";
- case 400: return "Bad Request";
- case 401: return "Unauthorized";
- case 402: return "Payment Required";
- case 403: return "Forbidden";
- case 404: return "Not Found";
- case 405: return "Method Not Allowed";
- case 406: return "Not Acceptable";
- case 407: return "Proxy Authentication Required";
- case 408: return "Request Timeout";
- case 409: return "Conflict";
- case 410: return "Gone";
- case 411: return "Length Required";
- case 412: return "Precondition Failed";
- case 413: return "Request Entity Too Large";
- case 414: return "Request-Uri Too Long";
- case 415: return "Unsupported Media Type";
- case 416: return "Requested Range Not Satisfiable";
- case 417: return "Expectation Failed";
- case 422: return "Unprocessable Entity";
- case 423: return "Locked";
- case 424: return "Failed Dependency";
- case 500: return "Internal Server Error";
- case 501: return "Not Implemented";
- case 502: return "Bad Gateway";
- case 503: return "Service Unavailable";
- case 504: return "Gateway Timeout";
- case 505: return "Http Version Not Supported";
- case 507: return "Insufficient Storage";
- }
-
- return String.Empty;
- }
-
- ///
- /// Determines whether the specified ushort is in the range of
- /// the status code for the WebSocket connection close.
- ///
- ///
- ///
- /// The ranges are the following:
- ///
- ///
- /// -
- ///
- /// 1000-2999: These numbers are reserved for definition by
- /// the WebSocket protocol.
- ///
- ///
- /// -
- ///
- /// 3000-3999: These numbers are reserved for use by libraries,
- /// frameworks, and applications.
- ///
- ///
- /// -
- ///
- /// 4000-4999: These numbers are reserved for private use.
- ///
- ///
- ///
- ///
- ///
- /// true if is in the range of
- /// the status code for the close; otherwise, false.
- ///
- ///
- /// A to test.
- ///
- public static bool IsCloseStatusCode (this ushort value)
- {
- return value > 999 && value < 5000;
- }
-
- ///
- /// Determines whether the specified string is enclosed in
- /// the specified character.
- ///
- ///
- /// true if is enclosed in
- /// ; otherwise, false.
- ///
- ///
- /// A to test.
- ///
- ///
- /// A to find.
- ///
- public static bool IsEnclosedIn (this string value, char c)
- {
- if (value == null)
- return false;
-
- var len = value.Length;
- if (len < 2)
- return false;
-
- return value[0] == c && value[len - 1] == c;
- }
-
- ///
- /// Determines whether the specified byte order is host (this computer
- /// architecture) byte order.
- ///
- ///
- /// true if is host byte order; otherwise,
- /// false.
- ///
- ///
- /// One of the enum values to test.
- ///
- public static bool IsHostOrder (this ByteOrder order)
- {
- // true: !(true ^ true) or !(false ^ false)
- // false: !(true ^ false) or !(false ^ true)
- return !(BitConverter.IsLittleEndian ^ (order == ByteOrder.Little));
- }
-
- ///
- /// Determines whether the specified IP address is a local IP address.
- ///
- ///
- /// This local means NOT REMOTE for the current host.
- ///
- ///
- /// true if is a local IP address;
- /// otherwise, false.
- ///
- ///
- /// A to test.
- ///
- ///
- /// is .
- ///
- public static bool IsLocal (this System.Net.IPAddress address)
- {
- if (address == null)
- throw new ArgumentNullException ("address");
-
- if (address.Equals (System.Net.IPAddress.Any))
- return true;
-
- if (address.Equals (System.Net.IPAddress.Loopback))
- return true;
-
- if (Socket.OSSupportsIPv6) {
- if (address.Equals (System.Net.IPAddress.IPv6Any))
- return true;
-
- if (address.Equals (System.Net.IPAddress.IPv6Loopback))
- return true;
- }
-
- var host = System.Net.Dns.GetHostName ();
- var addrs = System.Net.Dns.GetHostAddresses (host);
- foreach (var addr in addrs) {
- if (address.Equals (addr))
- return true;
- }
-
- return false;
- }
-
- ///
- /// Determines whether the specified string is or
- /// an empty string.
- ///
- ///
- /// true if is or
- /// an empty string; otherwise, false.
- ///
- ///
- /// A to test.
- ///
- public static bool IsNullOrEmpty (this string value)
- {
- return value == null || value.Length == 0;
- }
-
- ///
- /// Determines whether the specified string is a predefined scheme.
- ///
- ///
- /// true if is a predefined scheme;
- /// otherwise, false.
- ///
- ///
- /// A to test.
- ///
- public static bool IsPredefinedScheme (this string value)
- {
- if (value == null || value.Length < 2)
- return false;
-
- var c = value[0];
- if (c == 'h')
- return value == "http" || value == "https";
-
- if (c == 'w')
- return value == "ws" || value == "wss";
-
- if (c == 'f')
- return value == "file" || value == "ftp";
-
- if (c == 'g')
- return value == "gopher";
-
- if (c == 'm')
- return value == "mailto";
-
- if (c == 'n') {
- c = value[1];
- return c == 'e'
- ? value == "news" || value == "net.pipe" || value == "net.tcp"
- : value == "nntp";
- }
-
- return false;
- }
-
- ///
- /// Determines whether the specified string is a URI string.
- ///
- ///
- /// true if may be a URI string;
- /// otherwise, false.
- ///
- ///
- /// A to test.
- ///
- public static bool MaybeUri (this string value)
- {
- if (value == null)
- return false;
-
- if (value.Length == 0)
- return false;
-
- var idx = value.IndexOf (':');
- if (idx == -1)
- return false;
-
- if (idx >= 10)
- return false;
-
- var schm = value.Substring (0, idx);
- return schm.IsPredefinedScheme ();
- }
-
- ///
- /// Retrieves a sub-array from the specified array. A sub-array starts at
- /// the specified index in the array.
- ///
- ///
- /// An array of T that receives a sub-array.
- ///
- ///
- /// An array of T from which to retrieve a sub-array.
- ///
- ///
- /// An that represents the zero-based index in the array
- /// at which retrieving starts.
- ///
- ///
- /// An that represents the number of elements to retrieve.
- ///
- ///
- /// The type of elements in the array.
- ///
- ///
- /// is .
- ///
- ///
- ///
- /// is less than zero.
- ///
- ///
- /// -or-
- ///
- ///
- /// is greater than the end of the array.
- ///
- ///
- /// -or-
- ///
- ///
- /// is less than zero.
- ///
- ///
- /// -or-
- ///
- ///
- /// is greater than the number of elements from
- /// to the end of the array.
- ///
- ///
- public static T[] SubArray (this T[] array, int startIndex, int length)
- {
- if (array == null)
- throw new ArgumentNullException ("array");
-
- var len = array.Length;
- if (len == 0) {
- if (startIndex != 0)
- throw new ArgumentOutOfRangeException ("startIndex");
-
- if (length != 0)
- throw new ArgumentOutOfRangeException ("length");
-
- return array;
- }
-
- if (startIndex < 0 || startIndex >= len)
- throw new ArgumentOutOfRangeException ("startIndex");
-
- if (length < 0 || length > len - startIndex)
- throw new ArgumentOutOfRangeException ("length");
-
- if (length == 0)
- return new T[0];
-
- if (length == len)
- return array;
-
- var subArray = new T[length];
- Array.Copy (array, startIndex, subArray, 0, length);
-
- return subArray;
- }
-
- ///
- /// Retrieves a sub-array from the specified array. A sub-array starts at
- /// the specified index in the array.
- ///
- ///
- /// An array of T that receives a sub-array.
- ///
- ///
- /// An array of T from which to retrieve a sub-array.
- ///
- ///
- /// A that represents the zero-based index in the array
- /// at which retrieving starts.
- ///
- ///
- /// A that represents the number of elements to retrieve.
- ///
- ///
- /// The type of elements in the array.
- ///
- ///
- /// is .
- ///
- ///
- ///
- /// is less than zero.
- ///
- ///
- /// -or-
- ///
- ///
- /// is greater than the end of the array.
- ///
- ///
- /// -or-
- ///
- ///
- /// is less than zero.
- ///
- ///
- /// -or-
- ///
- ///
- /// is greater than the number of elements from
- /// to the end of the array.
- ///
- ///
- public static T[] SubArray (this T[] array, long startIndex, long length)
- {
- if (array == null)
- throw new ArgumentNullException ("array");
-
- var len = array.LongLength;
- if (len == 0) {
- if (startIndex != 0)
- throw new ArgumentOutOfRangeException ("startIndex");
-
- if (length != 0)
- throw new ArgumentOutOfRangeException ("length");
-
- return array;
- }
-
- if (startIndex < 0 || startIndex >= len)
- throw new ArgumentOutOfRangeException ("startIndex");
-
- if (length < 0 || length > len - startIndex)
- throw new ArgumentOutOfRangeException ("length");
-
- if (length == 0)
- return new T[0];
-
- if (length == len)
- return array;
-
- var subArray = new T[length];
- Array.Copy (array, startIndex, subArray, 0, length);
-
- return subArray;
- }
-
- ///
- /// Executes the specified delegate times.
- ///
- ///
- /// An that specifies the number of times to execute.
- ///
- ///
- /// An delegate to execute.
- ///
- public static void Times (this int n, Action action)
- {
- if (n <= 0)
- return;
-
- if (action == null)
- return;
-
- for (int i = 0; i < n; i++)
- action ();
- }
-
- ///
- /// Executes the specified delegate times.
- ///
- ///
- /// A that specifies the number of times to execute.
- ///
- ///
- /// An delegate to execute.
- ///
- public static void Times (this long n, Action action)
- {
- if (n <= 0)
- return;
-
- if (action == null)
- return;
-
- for (long i = 0; i < n; i++)
- action ();
- }
-
- ///
- /// Executes the specified delegate times.
- ///
- ///
- /// A that specifies the number of times to execute.
- ///
- ///
- /// An delegate to execute.
- ///
- public static void Times (this uint n, Action action)
- {
- if (n == 0)
- return;
-
- if (action == null)
- return;
-
- for (uint i = 0; i < n; i++)
- action ();
- }
-
- ///
- /// Executes the specified delegate times.
- ///
- ///
- /// A that specifies the number of times to execute.
- ///
- ///
- /// An delegate to execute.
- ///
- public static void Times (this ulong n, Action action)
- {
- if (n == 0)
- return;
-
- if (action == null)
- return;
-
- for (ulong i = 0; i < n; i++)
- action ();
- }
-
- ///
- /// Executes the specified delegate times.
- ///
- ///
- /// An that specifies the number of times to execute.
- ///
- ///
- ///
- /// An Action<int> delegate to execute.
- ///
- ///
- /// The parameter is the zero-based count of iteration.
- ///
- ///
- public static void Times (this int n, Action action)
- {
- if (n <= 0)
- return;
-
- if (action == null)
- return;
-
- for (int i = 0; i < n; i++)
- action (i);
- }
-
- ///
- /// Executes the specified delegate times.
- ///
- ///
- /// A that specifies the number of times to execute.
- ///
- ///
- ///
- /// An Action<long> delegate to execute.
- ///
- ///
- /// The parameter is the zero-based count of iteration.
- ///
- ///
- public static void Times (this long n, Action action)
- {
- if (n <= 0)
- return;
-
- if (action == null)
- return;
-
- for (long i = 0; i < n; i++)
- action (i);
- }
-
- ///
- /// Executes the specified delegate times.
- ///
- ///
- /// A that specifies the number of times to execute.
- ///
- ///
- ///
- /// An Action<uint> delegate to execute.
- ///
- ///
- /// The parameter is the zero-based count of iteration.
- ///
- ///
- public static void Times (this uint n, Action action)
- {
- if (n == 0)
- return;
-
- if (action == null)
- return;
-
- for (uint i = 0; i < n; i++)
- action (i);
- }
-
- ///
- /// Executes the specified delegate times.
- ///
- ///
- /// A that specifies the number of times to execute.
- ///
- ///
- ///
- /// An Action<ulong> delegate to execute.
- ///
- ///
- /// The parameter is the zero-based count of iteration.
- ///
- ///
- public static void Times (this ulong n, Action action)
- {
- if (n == 0)
- return;
-
- if (action == null)
- return;
-
- for (ulong i = 0; i < n; i++)
- action (i);
- }
-
- ///
- /// Converts the specified byte array to the specified type value.
- ///
- ///
- ///
- /// A T converted from .
- ///
- ///
- /// The default value of T if not converted.
- ///
- ///
- ///
- /// An array of to convert.
- ///
- ///
- ///
- /// One of the enum values.
- ///
- ///
- /// It specifies the byte order of .
- ///
- ///
- ///
- ///
- /// The type of the return.
- ///
- ///
- /// , , ,
- /// , , ,
- /// , , ,
- /// or .
- ///
- ///
- ///
- /// is .
- ///
- [Obsolete ("This method will be removed.")]
- public static T To (this byte[] source, ByteOrder sourceOrder)
- where T : struct
- {
- if (source == null)
- throw new ArgumentNullException ("source");
-
- if (source.Length == 0)
- return default (T);
-
- var type = typeof (T);
- var val = source.ToHostOrder (sourceOrder);
-
- return type == typeof (Boolean)
- ? (T)(object) BitConverter.ToBoolean (val, 0)
- : type == typeof (Char)
- ? (T)(object) BitConverter.ToChar (val, 0)
- : type == typeof (Double)
- ? (T)(object) BitConverter.ToDouble (val, 0)
- : type == typeof (Int16)
- ? (T)(object) BitConverter.ToInt16 (val, 0)
- : type == typeof (Int32)
- ? (T)(object) BitConverter.ToInt32 (val, 0)
- : type == typeof (Int64)
- ? (T)(object) BitConverter.ToInt64 (val, 0)
- : type == typeof (Single)
- ? (T)(object) BitConverter.ToSingle (val, 0)
- : type == typeof (UInt16)
- ? (T)(object) BitConverter.ToUInt16 (val, 0)
- : type == typeof (UInt32)
- ? (T)(object) BitConverter.ToUInt32 (val, 0)
- : type == typeof (UInt64)
- ? (T)(object) BitConverter.ToUInt64 (val, 0)
- : default (T);
- }
-
- ///
- /// Converts the specified value to a byte array.
- ///
- ///
- /// An array of converted from .
- ///
- ///
- /// A T to convert.
- ///
- ///
- ///
- /// One of the enum values.
- ///
- ///
- /// It specifies the byte order of the return.
- ///
- ///
- ///
- ///
- /// The type of .
- ///
- ///
- /// , , ,
- /// , , ,
- /// , , ,
- /// , or .
- ///
- ///
- [Obsolete ("This method will be removed.")]
- public static byte[] ToByteArray (this T value, ByteOrder order)
- where T : struct
- {
- var type = typeof (T);
- var bytes = type == typeof (Boolean)
- ? BitConverter.GetBytes ((Boolean)(object) value)
- : type == typeof (Byte)
- ? new byte[] { (Byte)(object) value }
- : type == typeof (Char)
- ? BitConverter.GetBytes ((Char)(object) value)
- : type == typeof (Double)
- ? BitConverter.GetBytes ((Double)(object) value)
- : type == typeof (Int16)
- ? BitConverter.GetBytes ((Int16)(object) value)
- : type == typeof (Int32)
- ? BitConverter.GetBytes ((Int32)(object) value)
- : type == typeof (Int64)
- ? BitConverter.GetBytes ((Int64)(object) value)
- : type == typeof (Single)
- ? BitConverter.GetBytes ((Single)(object) value)
- : type == typeof (UInt16)
- ? BitConverter.GetBytes ((UInt16)(object) value)
- : type == typeof (UInt32)
- ? BitConverter.GetBytes ((UInt32)(object) value)
- : type == typeof (UInt64)
- ? BitConverter.GetBytes ((UInt64)(object) value)
- : WebSocket.EmptyBytes;
-
- if (bytes.Length > 1) {
- if (!order.IsHostOrder ())
- Array.Reverse (bytes);
- }
-
- return bytes;
- }
-
- ///
- /// Converts the order of elements in the specified byte array to
- /// host (this computer architecture) byte order.
- ///
- ///
- ///
- /// An array of converted from
- /// .
- ///
- ///
- /// if the number of elements in
- /// it is less than 2 or is
- /// same as host byte order.
- ///
- ///
- ///
- /// An array of to convert.
- ///
- ///
- ///
- /// One of the enum values.
- ///
- ///
- /// It specifies the order of elements in .
- ///
- ///
- ///
- /// is .
- ///
- public static byte[] ToHostOrder (this byte[] source, ByteOrder sourceOrder)
- {
- if (source == null)
- throw new ArgumentNullException ("source");
-
- if (source.Length < 2)
- return source;
-
- if (sourceOrder.IsHostOrder ())
- return source;
-
- return source.Reverse ();
- }
-
- ///
- /// Converts the specified array to a string.
- ///
- ///
- ///
- /// A converted by concatenating each element of
- /// across .
- ///
- ///
- /// An empty string if is an empty array.
- ///
- ///
- ///
- /// An array of T to convert.
- ///
- ///
- /// A used to separate each element of
- /// .
- ///
- ///
- /// The type of elements in .
- ///
- ///
- /// is .
- ///
- public static string ToString (this T[] array, string separator)
- {
- if (array == null)
- throw new ArgumentNullException ("array");
-
- var len = array.Length;
- if (len == 0)
- return String.Empty;
-
- if (separator == null)
- separator = String.Empty;
-
- var buff = new StringBuilder (64);
- var end = len - 1;
-
- for (var i = 0; i < end; i++)
- buff.AppendFormat ("{0}{1}", array[i], separator);
-
- buff.Append (array[end].ToString ());
- return buff.ToString ();
- }
-
- ///
- /// Converts the specified string to a .
- ///
- ///
- ///
- /// A converted from .
- ///
- ///
- /// if the conversion has failed.
- ///
- ///
- ///
- /// A to convert.
- ///
- public static Uri ToUri (this string value)
- {
- Uri ret;
- Uri.TryCreate (
- value, value.MaybeUri () ? UriKind.Absolute : UriKind.Relative, out ret
- );
-
- return ret;
- }
-
- ///
- /// Sends the specified content data with the HTTP response.
- ///
- ///
- /// A that represents the HTTP response
- /// used to send the content data.
- ///
- ///
- /// An array of that specifies the content data to send.
- ///
- ///
- ///
- /// is .
- ///
- ///
- /// -or-
- ///
- ///
- /// is .
- ///
- ///
- [Obsolete ("This method will be removed.")]
- public static void WriteContent (
- this HttpListenerResponse response, byte[] content
- )
- {
- if (response == null)
- throw new ArgumentNullException ("response");
-
- if (content == null)
- throw new ArgumentNullException ("content");
-
- var len = content.LongLength;
- if (len == 0) {
- response.Close ();
- return;
- }
-
- response.ContentLength64 = len;
-
- var output = response.OutputStream;
-
- if (len <= Int32.MaxValue)
- output.Write (content, 0, (int) len);
- else
- output.WriteBytes (content, 1024);
-
- output.Close ();
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * Ext.cs
+ *
+ * Some parts of this code are derived from Mono (http://www.mono-project.com):
+ * - GetStatusDescription is derived from HttpListenerResponse.cs (System.Net)
+ * - IsPredefinedScheme is derived from Uri.cs (System)
+ * - MaybeUri is derived from Uri.cs (System)
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2001 Garrett Rooney
+ * Copyright (c) 2003 Ian MacLean
+ * Copyright (c) 2003 Ben Maurer
+ * Copyright (c) 2003, 2005, 2009 Novell, Inc. (http://www.novell.com)
+ * Copyright (c) 2009 Stephane Delcroix
+ * Copyright (c) 2010-2016 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+#region Contributors
+/*
+ * Contributors:
+ * - Liryna
+ * - Nikola Kovacevic
+ * - Chris Swiedler
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.IO;
+using System.IO.Compression;
+using System.Net.Sockets;
+using System.Security.Cryptography.X509Certificates;
+using System.Text;
+using WebSocketSharp.Net;
+using WebSocketSharp.Net.WebSockets;
+using WebSocketSharp.Server;
+
+namespace WebSocketSharp
+{
+ ///
+ /// Provides a set of static methods for websocket-sharp.
+ ///
+ public static class Ext
+ {
+ #region Private Fields
+
+ private static readonly byte[] _last = new byte[] { 0x00 };
+ private static readonly int _retry = 5;
+ private const string _tspecials = "()<>@,;:\\\"/[]?={} \t";
+
+ #endregion
+
+ #region Private Methods
+
+ private static byte[] compress (this byte[] data)
+ {
+ if (data.LongLength == 0)
+ //return new byte[] { 0x00, 0x00, 0x00, 0xff, 0xff };
+ return data;
+
+ using (var input = new MemoryStream (data))
+ return input.compressToArray ();
+ }
+
+ private static MemoryStream compress (this Stream stream)
+ {
+ var output = new MemoryStream ();
+ if (stream.Length == 0)
+ return output;
+
+ stream.Position = 0;
+ using (var ds = new DeflateStream (output, CompressionMode.Compress, true)) {
+ stream.CopyTo (ds, 1024);
+ ds.Close (); // BFINAL set to 1.
+ output.Write (_last, 0, 1);
+ output.Position = 0;
+
+ return output;
+ }
+ }
+
+ private static byte[] compressToArray (this Stream stream)
+ {
+ using (var output = stream.compress ()) {
+ output.Close ();
+ return output.ToArray ();
+ }
+ }
+
+ private static byte[] decompress (this byte[] data)
+ {
+ if (data.LongLength == 0)
+ return data;
+
+ using (var input = new MemoryStream (data))
+ return input.decompressToArray ();
+ }
+
+ private static MemoryStream decompress (this Stream stream)
+ {
+ var output = new MemoryStream ();
+ if (stream.Length == 0)
+ return output;
+
+ stream.Position = 0;
+ using (var ds = new DeflateStream (stream, CompressionMode.Decompress, true)) {
+ ds.CopyTo (output, 1024);
+ output.Position = 0;
+
+ return output;
+ }
+ }
+
+ private static byte[] decompressToArray (this Stream stream)
+ {
+ using (var output = stream.decompress ()) {
+ output.Close ();
+ return output.ToArray ();
+ }
+ }
+
+ private static bool isHttpMethod (this string value)
+ {
+ return value == "GET"
+ || value == "HEAD"
+ || value == "POST"
+ || value == "PUT"
+ || value == "DELETE"
+ || value == "CONNECT"
+ || value == "OPTIONS"
+ || value == "TRACE";
+ }
+
+ private static bool isHttpMethod10 (this string value)
+ {
+ return value == "GET"
+ || value == "HEAD"
+ || value == "POST";
+ }
+
+ #endregion
+
+ #region Internal Methods
+
+ internal static byte[] Append (this ushort code, string reason)
+ {
+ var bytes = code.InternalToByteArray (ByteOrder.Big);
+
+ if (reason == null || reason.Length == 0)
+ return bytes;
+
+ var buff = new List (bytes);
+ buff.AddRange (Encoding.UTF8.GetBytes (reason));
+
+ return buff.ToArray ();
+ }
+
+ internal static byte[] Compress (this byte[] data, CompressionMethod method)
+ {
+ return method == CompressionMethod.Deflate
+ ? data.compress ()
+ : data;
+ }
+
+ internal static Stream Compress (this Stream stream, CompressionMethod method)
+ {
+ return method == CompressionMethod.Deflate
+ ? stream.compress ()
+ : stream;
+ }
+
+ internal static byte[] CompressToArray (this Stream stream, CompressionMethod method)
+ {
+ return method == CompressionMethod.Deflate
+ ? stream.compressToArray ()
+ : stream.ToByteArray ();
+ }
+
+ ///
+ /// Determines whether the specified string contains any of characters in
+ /// the specified array of .
+ ///
+ ///
+ /// true if contains any of characters in
+ /// ; otherwise, false.
+ ///
+ ///
+ /// A to test.
+ ///
+ ///
+ /// An array of that contains one or more characters to
+ /// seek.
+ ///
+ internal static bool Contains (this string value, params char[] anyOf)
+ {
+ return anyOf != null && anyOf.Length > 0
+ ? value.IndexOfAny (anyOf) > -1
+ : false;
+ }
+
+ internal static bool Contains (
+ this NameValueCollection collection, string name
+ )
+ {
+ return collection[name] != null;
+ }
+
+ internal static bool Contains (
+ this NameValueCollection collection,
+ string name,
+ string value,
+ StringComparison comparisonTypeForValue
+ )
+ {
+ var val = collection[name];
+ if (val == null)
+ return false;
+
+ foreach (var elm in val.Split (',')) {
+ if (elm.Trim ().Equals (value, comparisonTypeForValue))
+ return true;
+ }
+
+ return false;
+ }
+
+ internal static bool Contains (
+ this IEnumerable source, Func condition
+ )
+ {
+ foreach (T elm in source) {
+ if (condition (elm))
+ return true;
+ }
+
+ return false;
+ }
+
+ internal static bool ContainsTwice (this string[] values)
+ {
+ var len = values.Length;
+ var end = len - 1;
+
+ Func seek = null;
+ seek = idx => {
+ if (idx == end)
+ return false;
+
+ var val = values[idx];
+ for (var i = idx + 1; i < len; i++) {
+ if (values[i] == val)
+ return true;
+ }
+
+ return seek (++idx);
+ };
+
+ return seek (0);
+ }
+
+ internal static T[] Copy (this T[] source, int length)
+ {
+ var dest = new T[length];
+ Array.Copy (source, 0, dest, 0, length);
+
+ return dest;
+ }
+
+ internal static T[] Copy (this T[] source, long length)
+ {
+ var dest = new T[length];
+ Array.Copy (source, 0, dest, 0, length);
+
+ return dest;
+ }
+
+ internal static void CopyTo (
+ this Stream source, Stream destination, int bufferLength
+ )
+ {
+ var buff = new byte[bufferLength];
+ var nread = 0;
+
+ while (true) {
+ nread = source.Read (buff, 0, bufferLength);
+ if (nread <= 0)
+ break;
+
+ destination.Write (buff, 0, nread);
+ }
+ }
+
+ internal static void CopyToAsync (
+ this Stream source,
+ Stream destination,
+ int bufferLength,
+ Action completed,
+ Action error
+ )
+ {
+ var buff = new byte[bufferLength];
+
+ AsyncCallback callback = null;
+ callback =
+ ar => {
+ try {
+ var nread = source.EndRead (ar);
+ if (nread <= 0) {
+ if (completed != null)
+ completed ();
+
+ return;
+ }
+
+ destination.Write (buff, 0, nread);
+ source.BeginRead (buff, 0, bufferLength, callback, null);
+ }
+ catch (Exception ex) {
+ if (error != null)
+ error (ex);
+ }
+ };
+
+ try {
+ source.BeginRead (buff, 0, bufferLength, callback, null);
+ }
+ catch (Exception ex) {
+ if (error != null)
+ error (ex);
+ }
+ }
+
+ internal static byte[] Decompress (this byte[] data, CompressionMethod method)
+ {
+ return method == CompressionMethod.Deflate
+ ? data.decompress ()
+ : data;
+ }
+
+ internal static Stream Decompress (this Stream stream, CompressionMethod method)
+ {
+ return method == CompressionMethod.Deflate
+ ? stream.decompress ()
+ : stream;
+ }
+
+ internal static byte[] DecompressToArray (this Stream stream, CompressionMethod method)
+ {
+ return method == CompressionMethod.Deflate
+ ? stream.decompressToArray ()
+ : stream.ToByteArray ();
+ }
+
+ internal static void Emit (
+ this EventHandler eventHandler, object sender, EventArgs e
+ )
+ {
+ if (eventHandler == null)
+ return;
+
+ eventHandler (sender, e);
+ }
+
+ internal static void Emit (
+ this EventHandler eventHandler, object sender, TEventArgs e
+ )
+ where TEventArgs : EventArgs
+ {
+ if (eventHandler == null)
+ return;
+
+ eventHandler (sender, e);
+ }
+
+ ///
+ /// Determines whether the specified equals the specified ,
+ /// and invokes the specified Action<int> delegate at the same time.
+ ///
+ ///
+ /// true if equals ;
+ /// otherwise, false.
+ ///
+ ///
+ /// An to compare.
+ ///
+ ///
+ /// A to compare.
+ ///
+ ///
+ /// An Action<int> delegate that references the method(s) called
+ /// at the same time as comparing. An parameter to pass to
+ /// the method(s) is .
+ ///
+ internal static bool EqualsWith (this int value, char c, Action action)
+ {
+ action (value);
+ return value == c - 0;
+ }
+
+ ///
+ /// Gets the absolute path from the specified .
+ ///
+ ///
+ /// A that represents the absolute path if it's successfully found;
+ /// otherwise, .
+ ///
+ ///
+ /// A that represents the URI to get the absolute path from.
+ ///
+ internal static string GetAbsolutePath (this Uri uri)
+ {
+ if (uri.IsAbsoluteUri)
+ return uri.AbsolutePath;
+
+ var original = uri.OriginalString;
+ if (original[0] != '/')
+ return null;
+
+ var idx = original.IndexOfAny (new[] { '?', '#' });
+ return idx > 0 ? original.Substring (0, idx) : original;
+ }
+
+ internal static CookieCollection GetCookies (
+ this NameValueCollection headers, bool response
+ )
+ {
+ var val = headers[response ? "Set-Cookie" : "Cookie"];
+ return val != null
+ ? CookieCollection.Parse (val, response)
+ : new CookieCollection ();
+ }
+
+ internal static string GetDnsSafeHost (this Uri uri, bool bracketIPv6)
+ {
+ return bracketIPv6 && uri.HostNameType == UriHostNameType.IPv6
+ ? uri.Host
+ : uri.DnsSafeHost;
+ }
+
+ internal static string GetMessage (this CloseStatusCode code)
+ {
+ return code == CloseStatusCode.ProtocolError
+ ? "A WebSocket protocol error has occurred."
+ : code == CloseStatusCode.UnsupportedData
+ ? "Unsupported data has been received."
+ : code == CloseStatusCode.Abnormal
+ ? "An exception has occurred."
+ : code == CloseStatusCode.InvalidData
+ ? "Invalid data has been received."
+ : code == CloseStatusCode.PolicyViolation
+ ? "A policy violation has occurred."
+ : code == CloseStatusCode.TooBig
+ ? "A too big message has been received."
+ : code == CloseStatusCode.MandatoryExtension
+ ? "WebSocket client didn't receive expected extension(s)."
+ : code == CloseStatusCode.ServerError
+ ? "WebSocket server got an internal error."
+ : code == CloseStatusCode.TlsHandshakeFailure
+ ? "An error has occurred during a TLS handshake."
+ : String.Empty;
+ }
+
+ ///
+ /// Gets the name from the specified string that contains a pair of
+ /// name and value separated by a character.
+ ///
+ ///
+ ///
+ /// A that represents the name.
+ ///
+ ///
+ /// if the name is not present.
+ ///
+ ///
+ ///
+ /// A that contains a pair of name and value.
+ ///
+ ///
+ /// A used to separate name and value.
+ ///
+ internal static string GetName (this string nameAndValue, char separator)
+ {
+ var idx = nameAndValue.IndexOf (separator);
+ return idx > 0 ? nameAndValue.Substring (0, idx).Trim () : null;
+ }
+
+ internal static string GetUTF8DecodedString (this byte[] bytes)
+ {
+ return Encoding.UTF8.GetString (bytes);
+ }
+
+ internal static byte[] GetUTF8EncodedBytes (this string s)
+ {
+ return Encoding.UTF8.GetBytes (s);
+ }
+
+ ///
+ /// Gets the value from the specified string that contains a pair of
+ /// name and value separated by a character.
+ ///
+ ///
+ ///
+ /// A that represents the value.
+ ///
+ ///
+ /// if the value is not present.
+ ///
+ ///
+ ///
+ /// A that contains a pair of name and value.
+ ///
+ ///
+ /// A used to separate name and value.
+ ///
+ internal static string GetValue (this string nameAndValue, char separator)
+ {
+ return nameAndValue.GetValue (separator, false);
+ }
+
+ ///
+ /// Gets the value from the specified string that contains a pair of
+ /// name and value separated by a character.
+ ///
+ ///
+ ///
+ /// A that represents the value.
+ ///
+ ///
+ /// if the value is not present.
+ ///
+ ///
+ ///
+ /// A that contains a pair of name and value.
+ ///
+ ///
+ /// A used to separate name and value.
+ ///
+ ///
+ /// A : true if unquotes the value; otherwise,
+ /// false.
+ ///
+ internal static string GetValue (
+ this string nameAndValue, char separator, bool unquote
+ )
+ {
+ var idx = nameAndValue.IndexOf (separator);
+ if (idx < 0 || idx == nameAndValue.Length - 1)
+ return null;
+
+ var val = nameAndValue.Substring (idx + 1).Trim ();
+ return unquote ? val.Unquote () : val;
+ }
+
+ internal static byte[] InternalToByteArray (
+ this ushort value, ByteOrder order
+ )
+ {
+ var ret = BitConverter.GetBytes (value);
+
+ if (!order.IsHostOrder ())
+ Array.Reverse (ret);
+
+ return ret;
+ }
+
+ internal static byte[] InternalToByteArray (
+ this ulong value, ByteOrder order
+ )
+ {
+ var ret = BitConverter.GetBytes (value);
+
+ if (!order.IsHostOrder ())
+ Array.Reverse (ret);
+
+ return ret;
+ }
+
+ internal static bool IsCompressionExtension (
+ this string value, CompressionMethod method
+ )
+ {
+ return value.StartsWith (method.ToExtensionString ());
+ }
+
+ internal static bool IsControl (this byte opcode)
+ {
+ return opcode > 0x7 && opcode < 0x10;
+ }
+
+ internal static bool IsControl (this Opcode opcode)
+ {
+ return opcode >= Opcode.Close;
+ }
+
+ internal static bool IsData (this byte opcode)
+ {
+ return opcode == 0x1 || opcode == 0x2;
+ }
+
+ internal static bool IsData (this Opcode opcode)
+ {
+ return opcode == Opcode.Text || opcode == Opcode.Binary;
+ }
+
+ internal static bool IsHttpMethod (this string value, Version version)
+ {
+ return version == HttpVersion.Version10
+ ? value.isHttpMethod10 ()
+ : value.isHttpMethod ();
+ }
+
+ internal static bool IsPortNumber (this int value)
+ {
+ return value > 0 && value < 65536;
+ }
+
+ internal static bool IsReserved (this ushort code)
+ {
+ return code == 1004
+ || code == 1005
+ || code == 1006
+ || code == 1015;
+ }
+
+ internal static bool IsReserved (this CloseStatusCode code)
+ {
+ return code == CloseStatusCode.Undefined
+ || code == CloseStatusCode.NoStatus
+ || code == CloseStatusCode.Abnormal
+ || code == CloseStatusCode.TlsHandshakeFailure;
+ }
+
+ internal static bool IsSupported (this byte opcode)
+ {
+ return Enum.IsDefined (typeof (Opcode), opcode);
+ }
+
+ internal static bool IsText (this string value)
+ {
+ var len = value.Length;
+
+ for (var i = 0; i < len; i++) {
+ var c = value[i];
+ if (c < 0x20) {
+ if ("\r\n\t".IndexOf (c) == -1)
+ return false;
+
+ if (c == '\n') {
+ i++;
+ if (i == len)
+ break;
+
+ c = value[i];
+ if (" \t".IndexOf (c) == -1)
+ return false;
+ }
+
+ continue;
+ }
+
+ if (c == 0x7f)
+ return false;
+ }
+
+ return true;
+ }
+
+ internal static bool IsToken (this string value)
+ {
+ foreach (var c in value) {
+ if (c < 0x20)
+ return false;
+
+ if (c > 0x7e)
+ return false;
+
+ if (_tspecials.IndexOf (c) > -1)
+ return false;
+ }
+
+ return true;
+ }
+
+ internal static bool KeepsAlive (
+ this NameValueCollection headers, Version version
+ )
+ {
+ var comparison = StringComparison.OrdinalIgnoreCase;
+ return version < HttpVersion.Version11
+ ? headers.Contains ("Connection", "keep-alive", comparison)
+ : !headers.Contains ("Connection", "close", comparison);
+ }
+
+ internal static string Quote (this string value)
+ {
+ return String.Format ("\"{0}\"", value.Replace ("\"", "\\\""));
+ }
+
+ internal static byte[] ReadBytes (this Stream stream, int length)
+ {
+ var buff = new byte[length];
+ var offset = 0;
+ var retry = 0;
+ var nread = 0;
+
+ while (length > 0) {
+ nread = stream.Read (buff, offset, length);
+ if (nread <= 0) {
+ if (retry < _retry) {
+ retry++;
+ continue;
+ }
+
+ return buff.SubArray (0, offset);
+ }
+
+ retry = 0;
+
+ offset += nread;
+ length -= nread;
+ }
+
+ return buff;
+ }
+
+ internal static byte[] ReadBytes (
+ this Stream stream, long length, int bufferLength
+ )
+ {
+ using (var dest = new MemoryStream ()) {
+ var buff = new byte[bufferLength];
+ var retry = 0;
+ var nread = 0;
+
+ while (length > 0) {
+ if (length < bufferLength)
+ bufferLength = (int) length;
+
+ nread = stream.Read (buff, 0, bufferLength);
+ if (nread <= 0) {
+ if (retry < _retry) {
+ retry++;
+ continue;
+ }
+
+ break;
+ }
+
+ retry = 0;
+
+ dest.Write (buff, 0, nread);
+ length -= nread;
+ }
+
+ dest.Close ();
+ return dest.ToArray ();
+ }
+ }
+
+ internal static void ReadBytesAsync (
+ this Stream stream,
+ int length,
+ Action completed,
+ Action error
+ )
+ {
+ var buff = new byte[length];
+ var offset = 0;
+ var retry = 0;
+
+ AsyncCallback callback = null;
+ callback =
+ ar => {
+ try {
+ var nread = stream.EndRead (ar);
+ if (nread <= 0) {
+ if (retry < _retry) {
+ retry++;
+ stream.BeginRead (buff, offset, length, callback, null);
+
+ return;
+ }
+
+ if (completed != null)
+ completed (buff.SubArray (0, offset));
+
+ return;
+ }
+
+ if (nread == length) {
+ if (completed != null)
+ completed (buff);
+
+ return;
+ }
+
+ retry = 0;
+
+ offset += nread;
+ length -= nread;
+
+ stream.BeginRead (buff, offset, length, callback, null);
+ }
+ catch (Exception ex) {
+ if (error != null)
+ error (ex);
+ }
+ };
+
+ try {
+ stream.BeginRead (buff, offset, length, callback, null);
+ }
+ catch (Exception ex) {
+ if (error != null)
+ error (ex);
+ }
+ }
+
+ internal static void ReadBytesAsync (
+ this Stream stream,
+ long length,
+ int bufferLength,
+ Action completed,
+ Action error
+ )
+ {
+ var dest = new MemoryStream ();
+ var buff = new byte[bufferLength];
+ var retry = 0;
+
+ Action read = null;
+ read =
+ len => {
+ if (len < bufferLength)
+ bufferLength = (int) len;
+
+ stream.BeginRead (
+ buff,
+ 0,
+ bufferLength,
+ ar => {
+ try {
+ var nread = stream.EndRead (ar);
+ if (nread <= 0) {
+ if (retry < _retry) {
+ retry++;
+ read (len);
+
+ return;
+ }
+
+ if (completed != null) {
+ dest.Close ();
+ completed (dest.ToArray ());
+ }
+
+ dest.Dispose ();
+ return;
+ }
+
+ dest.Write (buff, 0, nread);
+
+ if (nread == len) {
+ if (completed != null) {
+ dest.Close ();
+ completed (dest.ToArray ());
+ }
+
+ dest.Dispose ();
+ return;
+ }
+
+ retry = 0;
+
+ read (len - nread);
+ }
+ catch (Exception ex) {
+ dest.Dispose ();
+ if (error != null)
+ error (ex);
+ }
+ },
+ null
+ );
+ };
+
+ try {
+ read (length);
+ }
+ catch (Exception ex) {
+ dest.Dispose ();
+ if (error != null)
+ error (ex);
+ }
+ }
+
+ internal static T[] Reverse (this T[] array)
+ {
+ var len = array.Length;
+ var ret = new T[len];
+
+ var end = len - 1;
+ for (var i = 0; i <= end; i++)
+ ret[i] = array[end - i];
+
+ return ret;
+ }
+
+ internal static IEnumerable SplitHeaderValue (
+ this string value, params char[] separators
+ )
+ {
+ var len = value.Length;
+
+ var buff = new StringBuilder (32);
+ var end = len - 1;
+ var escaped = false;
+ var quoted = false;
+
+ for (var i = 0; i <= end; i++) {
+ var c = value[i];
+ buff.Append (c);
+
+ if (c == '"') {
+ if (escaped) {
+ escaped = false;
+ continue;
+ }
+
+ quoted = !quoted;
+ continue;
+ }
+
+ if (c == '\\') {
+ if (i == end)
+ break;
+
+ if (value[i + 1] == '"')
+ escaped = true;
+
+ continue;
+ }
+
+ if (Array.IndexOf (separators, c) > -1) {
+ if (quoted)
+ continue;
+
+ buff.Length -= 1;
+ yield return buff.ToString ();
+
+ buff.Length = 0;
+ continue;
+ }
+ }
+
+ yield return buff.ToString ();
+ }
+
+ internal static byte[] ToByteArray (this Stream stream)
+ {
+ using (var output = new MemoryStream ()) {
+ stream.Position = 0;
+ stream.CopyTo (output, 1024);
+ output.Close ();
+
+ return output.ToArray ();
+ }
+ }
+
+ internal static CompressionMethod ToCompressionMethod (this string value)
+ {
+ var methods = Enum.GetValues (typeof (CompressionMethod));
+ foreach (CompressionMethod method in methods) {
+ if (method.ToExtensionString () == value)
+ return method;
+ }
+
+ return CompressionMethod.None;
+ }
+
+ internal static string ToExtensionString (
+ this CompressionMethod method, params string[] parameters
+ )
+ {
+ if (method == CompressionMethod.None)
+ return String.Empty;
+
+ var name = String.Format (
+ "permessage-{0}", method.ToString ().ToLower ()
+ );
+
+ return parameters != null && parameters.Length > 0
+ ? String.Format ("{0}; {1}", name, parameters.ToString ("; "))
+ : name;
+ }
+
+ internal static System.Net.IPAddress ToIPAddress (this string value)
+ {
+ if (value == null || value.Length == 0)
+ return null;
+
+ System.Net.IPAddress addr;
+ if (System.Net.IPAddress.TryParse (value, out addr))
+ return addr;
+
+ try {
+ var addrs = System.Net.Dns.GetHostAddresses (value);
+ return addrs[0];
+ }
+ catch {
+ return null;
+ }
+ }
+
+ internal static List ToList (
+ this IEnumerable source
+ )
+ {
+ return new List (source);
+ }
+
+ internal static string ToString (
+ this System.Net.IPAddress address, bool bracketIPv6
+ )
+ {
+ return bracketIPv6
+ && address.AddressFamily == AddressFamily.InterNetworkV6
+ ? String.Format ("[{0}]", address.ToString ())
+ : address.ToString ();
+ }
+
+ internal static ushort ToUInt16 (this byte[] source, ByteOrder sourceOrder)
+ {
+ return BitConverter.ToUInt16 (source.ToHostOrder (sourceOrder), 0);
+ }
+
+ internal static ulong ToUInt64 (this byte[] source, ByteOrder sourceOrder)
+ {
+ return BitConverter.ToUInt64 (source.ToHostOrder (sourceOrder), 0);
+ }
+
+ internal static IEnumerable TrimEach (
+ this IEnumerable source
+ )
+ {
+ foreach (var elm in source)
+ yield return elm.Trim ();
+ }
+
+ internal static string TrimSlashFromEnd (this string value)
+ {
+ var ret = value.TrimEnd ('/');
+ return ret.Length > 0 ? ret : "/";
+ }
+
+ internal static string TrimSlashOrBackslashFromEnd (this string value)
+ {
+ var ret = value.TrimEnd ('/', '\\');
+ return ret.Length > 0 ? ret : value[0].ToString ();
+ }
+
+ internal static bool TryCreateVersion (
+ this string versionString, out Version result
+ )
+ {
+ result = null;
+
+ try {
+ result = new Version (versionString);
+ }
+ catch {
+ return false;
+ }
+
+ return true;
+ }
+
+ ///
+ /// Tries to create a new for WebSocket with
+ /// the specified .
+ ///
+ ///
+ /// true if the was successfully created;
+ /// otherwise, false.
+ ///
+ ///
+ /// A that represents a WebSocket URL to try.
+ ///
+ ///
+ /// When this method returns, a that
+ /// represents the WebSocket URL or
+ /// if is invalid.
+ ///
+ ///
+ /// When this method returns, a that
+ /// represents an error message or
+ /// if is valid.
+ ///
+ internal static bool TryCreateWebSocketUri (
+ this string uriString, out Uri result, out string message
+ )
+ {
+ result = null;
+ message = null;
+
+ var uri = uriString.ToUri ();
+ if (uri == null) {
+ message = "An invalid URI string.";
+ return false;
+ }
+
+ if (!uri.IsAbsoluteUri) {
+ message = "A relative URI.";
+ return false;
+ }
+
+ var schm = uri.Scheme;
+ if (!(schm == "ws" || schm == "wss")) {
+ message = "The scheme part is not 'ws' or 'wss'.";
+ return false;
+ }
+
+ var port = uri.Port;
+ if (port == 0) {
+ message = "The port part is zero.";
+ return false;
+ }
+
+ if (uri.Fragment.Length > 0) {
+ message = "It includes the fragment component.";
+ return false;
+ }
+
+ result = port != -1
+ ? uri
+ : new Uri (
+ String.Format (
+ "{0}://{1}:{2}{3}",
+ schm,
+ uri.Host,
+ schm == "ws" ? 80 : 443,
+ uri.PathAndQuery
+ )
+ );
+
+ return true;
+ }
+
+ internal static bool TryGetUTF8DecodedString (this byte[] bytes, out string s)
+ {
+ s = null;
+
+ try {
+ s = Encoding.UTF8.GetString (bytes);
+ }
+ catch {
+ return false;
+ }
+
+ return true;
+ }
+
+ internal static bool TryGetUTF8EncodedBytes (this string s, out byte[] bytes)
+ {
+ bytes = null;
+
+ try {
+ bytes = Encoding.UTF8.GetBytes (s);
+ }
+ catch {
+ return false;
+ }
+
+ return true;
+ }
+
+ internal static bool TryOpenRead (
+ this FileInfo fileInfo, out FileStream fileStream
+ )
+ {
+ fileStream = null;
+
+ try {
+ fileStream = fileInfo.OpenRead ();
+ }
+ catch {
+ return false;
+ }
+
+ return true;
+ }
+
+ internal static string Unquote (this string value)
+ {
+ var start = value.IndexOf ('"');
+ if (start == -1)
+ return value;
+
+ var end = value.LastIndexOf ('"');
+ if (end == start)
+ return value;
+
+ var len = end - start - 1;
+ return len > 0
+ ? value.Substring (start + 1, len).Replace ("\\\"", "\"")
+ : String.Empty;
+ }
+
+ internal static bool Upgrades (
+ this NameValueCollection headers, string protocol
+ )
+ {
+ var comparison = StringComparison.OrdinalIgnoreCase;
+ return headers.Contains ("Upgrade", protocol, comparison)
+ && headers.Contains ("Connection", "Upgrade", comparison);
+ }
+
+ internal static string UrlDecode (this string value, Encoding encoding)
+ {
+ return HttpUtility.UrlDecode (value, encoding);
+ }
+
+ internal static string UrlEncode (this string value, Encoding encoding)
+ {
+ return HttpUtility.UrlEncode (value, encoding);
+ }
+
+ internal static void WriteBytes (
+ this Stream stream, byte[] bytes, int bufferLength
+ )
+ {
+ using (var src = new MemoryStream (bytes))
+ src.CopyTo (stream, bufferLength);
+ }
+
+ internal static void WriteBytesAsync (
+ this Stream stream,
+ byte[] bytes,
+ int bufferLength,
+ Action completed,
+ Action error
+ )
+ {
+ var src = new MemoryStream (bytes);
+ src.CopyToAsync (
+ stream,
+ bufferLength,
+ () => {
+ if (completed != null)
+ completed ();
+
+ src.Dispose ();
+ },
+ ex => {
+ src.Dispose ();
+ if (error != null)
+ error (ex);
+ }
+ );
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ ///
+ /// Gets the description of the specified HTTP status code.
+ ///
+ ///
+ /// A that represents the description of
+ /// the HTTP status code.
+ ///
+ ///
+ ///
+ /// One of the enum values.
+ ///
+ ///
+ /// It specifies the HTTP status code.
+ ///
+ ///
+ public static string GetDescription (this HttpStatusCode code)
+ {
+ return ((int) code).GetStatusDescription ();
+ }
+
+ ///
+ /// Gets the description of the specified HTTP status code.
+ ///
+ ///
+ ///
+ /// A that represents the description of
+ /// the HTTP status code.
+ ///
+ ///
+ /// An empty string if the description is not present.
+ ///
+ ///
+ ///
+ /// An that specifies the HTTP status code.
+ ///
+ public static string GetStatusDescription (this int code)
+ {
+ switch (code) {
+ case 100: return "Continue";
+ case 101: return "Switching Protocols";
+ case 102: return "Processing";
+ case 200: return "OK";
+ case 201: return "Created";
+ case 202: return "Accepted";
+ case 203: return "Non-Authoritative Information";
+ case 204: return "No Content";
+ case 205: return "Reset Content";
+ case 206: return "Partial Content";
+ case 207: return "Multi-Status";
+ case 300: return "Multiple Choices";
+ case 301: return "Moved Permanently";
+ case 302: return "Found";
+ case 303: return "See Other";
+ case 304: return "Not Modified";
+ case 305: return "Use Proxy";
+ case 307: return "Temporary Redirect";
+ case 400: return "Bad Request";
+ case 401: return "Unauthorized";
+ case 402: return "Payment Required";
+ case 403: return "Forbidden";
+ case 404: return "Not Found";
+ case 405: return "Method Not Allowed";
+ case 406: return "Not Acceptable";
+ case 407: return "Proxy Authentication Required";
+ case 408: return "Request Timeout";
+ case 409: return "Conflict";
+ case 410: return "Gone";
+ case 411: return "Length Required";
+ case 412: return "Precondition Failed";
+ case 413: return "Request Entity Too Large";
+ case 414: return "Request-Uri Too Long";
+ case 415: return "Unsupported Media Type";
+ case 416: return "Requested Range Not Satisfiable";
+ case 417: return "Expectation Failed";
+ case 422: return "Unprocessable Entity";
+ case 423: return "Locked";
+ case 424: return "Failed Dependency";
+ case 500: return "Internal Server Error";
+ case 501: return "Not Implemented";
+ case 502: return "Bad Gateway";
+ case 503: return "Service Unavailable";
+ case 504: return "Gateway Timeout";
+ case 505: return "Http Version Not Supported";
+ case 507: return "Insufficient Storage";
+ }
+
+ return String.Empty;
+ }
+
+ ///
+ /// Determines whether the specified ushort is in the range of
+ /// the status code for the WebSocket connection close.
+ ///
+ ///
+ ///
+ /// The ranges are the following:
+ ///
+ ///
+ /// -
+ ///
+ /// 1000-2999: These numbers are reserved for definition by
+ /// the WebSocket protocol.
+ ///
+ ///
+ /// -
+ ///
+ /// 3000-3999: These numbers are reserved for use by libraries,
+ /// frameworks, and applications.
+ ///
+ ///
+ /// -
+ ///
+ /// 4000-4999: These numbers are reserved for private use.
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// true if is in the range of
+ /// the status code for the close; otherwise, false.
+ ///
+ ///
+ /// A to test.
+ ///
+ public static bool IsCloseStatusCode (this ushort value)
+ {
+ return value > 999 && value < 5000;
+ }
+
+ ///
+ /// Determines whether the specified string is enclosed in
+ /// the specified character.
+ ///
+ ///
+ /// true if is enclosed in
+ /// ; otherwise, false.
+ ///
+ ///
+ /// A to test.
+ ///
+ ///
+ /// A to find.
+ ///
+ public static bool IsEnclosedIn (this string value, char c)
+ {
+ if (value == null)
+ return false;
+
+ var len = value.Length;
+ if (len < 2)
+ return false;
+
+ return value[0] == c && value[len - 1] == c;
+ }
+
+ ///
+ /// Determines whether the specified byte order is host (this computer
+ /// architecture) byte order.
+ ///
+ ///
+ /// true if is host byte order; otherwise,
+ /// false.
+ ///
+ ///
+ /// One of the enum values to test.
+ ///
+ public static bool IsHostOrder (this ByteOrder order)
+ {
+ // true: !(true ^ true) or !(false ^ false)
+ // false: !(true ^ false) or !(false ^ true)
+ return !(BitConverter.IsLittleEndian ^ (order == ByteOrder.Little));
+ }
+
+ ///
+ /// Determines whether the specified IP address is a local IP address.
+ ///
+ ///
+ /// This local means NOT REMOTE for the current host.
+ ///
+ ///
+ /// true if is a local IP address;
+ /// otherwise, false.
+ ///
+ ///
+ /// A to test.
+ ///
+ ///
+ /// is .
+ ///
+ public static bool IsLocal (this System.Net.IPAddress address)
+ {
+ if (address == null)
+ throw new ArgumentNullException ("address");
+
+ if (address.Equals (System.Net.IPAddress.Any))
+ return true;
+
+ if (address.Equals (System.Net.IPAddress.Loopback))
+ return true;
+
+ if (Socket.OSSupportsIPv6) {
+ if (address.Equals (System.Net.IPAddress.IPv6Any))
+ return true;
+
+ if (address.Equals (System.Net.IPAddress.IPv6Loopback))
+ return true;
+ }
+
+ var host = System.Net.Dns.GetHostName ();
+ var addrs = System.Net.Dns.GetHostAddresses (host);
+ foreach (var addr in addrs) {
+ if (address.Equals (addr))
+ return true;
+ }
+
+ return false;
+ }
+
+ ///
+ /// Determines whether the specified string is or
+ /// an empty string.
+ ///
+ ///
+ /// true if is or
+ /// an empty string; otherwise, false.
+ ///
+ ///
+ /// A to test.
+ ///
+ public static bool IsNullOrEmpty (this string value)
+ {
+ return value == null || value.Length == 0;
+ }
+
+ ///
+ /// Determines whether the specified string is a predefined scheme.
+ ///
+ ///
+ /// true if is a predefined scheme;
+ /// otherwise, false.
+ ///
+ ///
+ /// A to test.
+ ///
+ public static bool IsPredefinedScheme (this string value)
+ {
+ if (value == null || value.Length < 2)
+ return false;
+
+ var c = value[0];
+ if (c == 'h')
+ return value == "http" || value == "https";
+
+ if (c == 'w')
+ return value == "ws" || value == "wss";
+
+ if (c == 'f')
+ return value == "file" || value == "ftp";
+
+ if (c == 'g')
+ return value == "gopher";
+
+ if (c == 'm')
+ return value == "mailto";
+
+ if (c == 'n') {
+ c = value[1];
+ return c == 'e'
+ ? value == "news" || value == "net.pipe" || value == "net.tcp"
+ : value == "nntp";
+ }
+
+ return false;
+ }
+
+ ///
+ /// Determines whether the specified string is a URI string.
+ ///
+ ///
+ /// true if may be a URI string;
+ /// otherwise, false.
+ ///
+ ///
+ /// A to test.
+ ///
+ public static bool MaybeUri (this string value)
+ {
+ if (value == null)
+ return false;
+
+ if (value.Length == 0)
+ return false;
+
+ var idx = value.IndexOf (':');
+ if (idx == -1)
+ return false;
+
+ if (idx >= 10)
+ return false;
+
+ var schm = value.Substring (0, idx);
+ return schm.IsPredefinedScheme ();
+ }
+
+ ///
+ /// Retrieves a sub-array from the specified array. A sub-array starts at
+ /// the specified index in the array.
+ ///
+ ///
+ /// An array of T that receives a sub-array.
+ ///
+ ///
+ /// An array of T from which to retrieve a sub-array.
+ ///
+ ///
+ /// An that represents the zero-based index in the array
+ /// at which retrieving starts.
+ ///
+ ///
+ /// An that represents the number of elements to retrieve.
+ ///
+ ///
+ /// The type of elements in the array.
+ ///
+ ///
+ /// is .
+ ///
+ ///
+ ///
+ /// is less than zero.
+ ///
+ ///
+ /// -or-
+ ///
+ ///
+ /// is greater than the end of the array.
+ ///
+ ///
+ /// -or-
+ ///
+ ///
+ /// is less than zero.
+ ///
+ ///
+ /// -or-
+ ///
+ ///
+ /// is greater than the number of elements from
+ /// to the end of the array.
+ ///
+ ///
+ public static T[] SubArray (this T[] array, int startIndex, int length)
+ {
+ if (array == null)
+ throw new ArgumentNullException ("array");
+
+ var len = array.Length;
+ if (len == 0) {
+ if (startIndex != 0)
+ throw new ArgumentOutOfRangeException ("startIndex");
+
+ if (length != 0)
+ throw new ArgumentOutOfRangeException ("length");
+
+ return array;
+ }
+
+ if (startIndex < 0 || startIndex >= len)
+ throw new ArgumentOutOfRangeException ("startIndex");
+
+ if (length < 0 || length > len - startIndex)
+ throw new ArgumentOutOfRangeException ("length");
+
+ if (length == 0)
+ return new T[0];
+
+ if (length == len)
+ return array;
+
+ var subArray = new T[length];
+ Array.Copy (array, startIndex, subArray, 0, length);
+
+ return subArray;
+ }
+
+ ///
+ /// Retrieves a sub-array from the specified array. A sub-array starts at
+ /// the specified index in the array.
+ ///
+ ///
+ /// An array of T that receives a sub-array.
+ ///
+ ///
+ /// An array of T from which to retrieve a sub-array.
+ ///
+ ///
+ /// A that represents the zero-based index in the array
+ /// at which retrieving starts.
+ ///
+ ///
+ /// A that represents the number of elements to retrieve.
+ ///
+ ///
+ /// The type of elements in the array.
+ ///
+ ///
+ /// is .
+ ///
+ ///
+ ///
+ /// is less than zero.
+ ///
+ ///
+ /// -or-
+ ///
+ ///
+ /// is greater than the end of the array.
+ ///
+ ///
+ /// -or-
+ ///
+ ///
+ /// is less than zero.
+ ///
+ ///
+ /// -or-
+ ///
+ ///
+ /// is greater than the number of elements from
+ /// to the end of the array.
+ ///
+ ///
+ public static T[] SubArray (this T[] array, long startIndex, long length)
+ {
+ if (array == null)
+ throw new ArgumentNullException ("array");
+
+ var len = array.LongLength;
+ if (len == 0) {
+ if (startIndex != 0)
+ throw new ArgumentOutOfRangeException ("startIndex");
+
+ if (length != 0)
+ throw new ArgumentOutOfRangeException ("length");
+
+ return array;
+ }
+
+ if (startIndex < 0 || startIndex >= len)
+ throw new ArgumentOutOfRangeException ("startIndex");
+
+ if (length < 0 || length > len - startIndex)
+ throw new ArgumentOutOfRangeException ("length");
+
+ if (length == 0)
+ return new T[0];
+
+ if (length == len)
+ return array;
+
+ var subArray = new T[length];
+ Array.Copy (array, startIndex, subArray, 0, length);
+
+ return subArray;
+ }
+
+ ///
+ /// Executes the specified delegate times.
+ ///
+ ///
+ /// An that specifies the number of times to execute.
+ ///
+ ///
+ /// An delegate to execute.
+ ///
+ public static void Times (this int n, Action action)
+ {
+ if (n <= 0)
+ return;
+
+ if (action == null)
+ return;
+
+ for (int i = 0; i < n; i++)
+ action ();
+ }
+
+ ///
+ /// Executes the specified delegate times.
+ ///
+ ///
+ /// A that specifies the number of times to execute.
+ ///
+ ///
+ /// An delegate to execute.
+ ///
+ public static void Times (this long n, Action action)
+ {
+ if (n <= 0)
+ return;
+
+ if (action == null)
+ return;
+
+ for (long i = 0; i < n; i++)
+ action ();
+ }
+
+ ///
+ /// Executes the specified delegate times.
+ ///
+ ///
+ /// A that specifies the number of times to execute.
+ ///
+ ///
+ /// An delegate to execute.
+ ///
+ public static void Times (this uint n, Action action)
+ {
+ if (n == 0)
+ return;
+
+ if (action == null)
+ return;
+
+ for (uint i = 0; i < n; i++)
+ action ();
+ }
+
+ ///
+ /// Executes the specified delegate times.
+ ///
+ ///
+ /// A that specifies the number of times to execute.
+ ///
+ ///
+ /// An delegate to execute.
+ ///
+ public static void Times (this ulong n, Action action)
+ {
+ if (n == 0)
+ return;
+
+ if (action == null)
+ return;
+
+ for (ulong i = 0; i < n; i++)
+ action ();
+ }
+
+ ///
+ /// Executes the specified delegate times.
+ ///
+ ///
+ /// An that specifies the number of times to execute.
+ ///
+ ///
+ ///
+ /// An Action<int> delegate to execute.
+ ///
+ ///
+ /// The parameter is the zero-based count of iteration.
+ ///
+ ///
+ public static void Times (this int n, Action action)
+ {
+ if (n <= 0)
+ return;
+
+ if (action == null)
+ return;
+
+ for (int i = 0; i < n; i++)
+ action (i);
+ }
+
+ ///
+ /// Executes the specified delegate times.
+ ///
+ ///
+ /// A that specifies the number of times to execute.
+ ///
+ ///
+ ///
+ /// An Action<long> delegate to execute.
+ ///
+ ///
+ /// The parameter is the zero-based count of iteration.
+ ///
+ ///
+ public static void Times (this long n, Action action)
+ {
+ if (n <= 0)
+ return;
+
+ if (action == null)
+ return;
+
+ for (long i = 0; i < n; i++)
+ action (i);
+ }
+
+ ///
+ /// Executes the specified delegate times.
+ ///
+ ///
+ /// A that specifies the number of times to execute.
+ ///
+ ///
+ ///
+ /// An Action<uint> delegate to execute.
+ ///
+ ///
+ /// The parameter is the zero-based count of iteration.
+ ///
+ ///
+ public static void Times (this uint n, Action action)
+ {
+ if (n == 0)
+ return;
+
+ if (action == null)
+ return;
+
+ for (uint i = 0; i < n; i++)
+ action (i);
+ }
+
+ ///
+ /// Executes the specified delegate times.
+ ///
+ ///
+ /// A that specifies the number of times to execute.
+ ///
+ ///
+ ///
+ /// An Action<ulong> delegate to execute.
+ ///
+ ///
+ /// The parameter is the zero-based count of iteration.
+ ///
+ ///
+ public static void Times (this ulong n, Action action)
+ {
+ if (n == 0)
+ return;
+
+ if (action == null)
+ return;
+
+ for (ulong i = 0; i < n; i++)
+ action (i);
+ }
+
+ ///
+ /// Converts the specified byte array to the specified type value.
+ ///
+ ///
+ ///
+ /// A T converted from .
+ ///
+ ///
+ /// The default value of T if not converted.
+ ///
+ ///
+ ///
+ /// An array of to convert.
+ ///
+ ///
+ ///
+ /// One of the enum values.
+ ///
+ ///
+ /// It specifies the byte order of .
+ ///
+ ///
+ ///
+ ///
+ /// The type of the return.
+ ///
+ ///
+ /// , , ,
+ /// , , ,
+ /// , , ,
+ /// or .
+ ///
+ ///
+ ///
+ /// is .
+ ///
+ [Obsolete ("This method will be removed.")]
+ public static T To (this byte[] source, ByteOrder sourceOrder)
+ where T : struct
+ {
+ if (source == null)
+ throw new ArgumentNullException ("source");
+
+ if (source.Length == 0)
+ return default (T);
+
+ var type = typeof (T);
+ var val = source.ToHostOrder (sourceOrder);
+
+ return type == typeof (Boolean)
+ ? (T)(object) BitConverter.ToBoolean (val, 0)
+ : type == typeof (Char)
+ ? (T)(object) BitConverter.ToChar (val, 0)
+ : type == typeof (Double)
+ ? (T)(object) BitConverter.ToDouble (val, 0)
+ : type == typeof (Int16)
+ ? (T)(object) BitConverter.ToInt16 (val, 0)
+ : type == typeof (Int32)
+ ? (T)(object) BitConverter.ToInt32 (val, 0)
+ : type == typeof (Int64)
+ ? (T)(object) BitConverter.ToInt64 (val, 0)
+ : type == typeof (Single)
+ ? (T)(object) BitConverter.ToSingle (val, 0)
+ : type == typeof (UInt16)
+ ? (T)(object) BitConverter.ToUInt16 (val, 0)
+ : type == typeof (UInt32)
+ ? (T)(object) BitConverter.ToUInt32 (val, 0)
+ : type == typeof (UInt64)
+ ? (T)(object) BitConverter.ToUInt64 (val, 0)
+ : default (T);
+ }
+
+ ///
+ /// Converts the specified value to a byte array.
+ ///
+ ///
+ /// An array of converted from .
+ ///
+ ///
+ /// A T to convert.
+ ///
+ ///
+ ///
+ /// One of the enum values.
+ ///
+ ///
+ /// It specifies the byte order of the return.
+ ///
+ ///
+ ///
+ ///
+ /// The type of .
+ ///
+ ///
+ /// , , ,
+ /// , , ,
+ /// , , ,
+ /// , or .
+ ///
+ ///
+ [Obsolete ("This method will be removed.")]
+ public static byte[] ToByteArray (this T value, ByteOrder order)
+ where T : struct
+ {
+ var type = typeof (T);
+ var bytes = type == typeof (Boolean)
+ ? BitConverter.GetBytes ((Boolean)(object) value)
+ : type == typeof (Byte)
+ ? new byte[] { (Byte)(object) value }
+ : type == typeof (Char)
+ ? BitConverter.GetBytes ((Char)(object) value)
+ : type == typeof (Double)
+ ? BitConverter.GetBytes ((Double)(object) value)
+ : type == typeof (Int16)
+ ? BitConverter.GetBytes ((Int16)(object) value)
+ : type == typeof (Int32)
+ ? BitConverter.GetBytes ((Int32)(object) value)
+ : type == typeof (Int64)
+ ? BitConverter.GetBytes ((Int64)(object) value)
+ : type == typeof (Single)
+ ? BitConverter.GetBytes ((Single)(object) value)
+ : type == typeof (UInt16)
+ ? BitConverter.GetBytes ((UInt16)(object) value)
+ : type == typeof (UInt32)
+ ? BitConverter.GetBytes ((UInt32)(object) value)
+ : type == typeof (UInt64)
+ ? BitConverter.GetBytes ((UInt64)(object) value)
+ : WebSocket.EmptyBytes;
+
+ if (bytes.Length > 1) {
+ if (!order.IsHostOrder ())
+ Array.Reverse (bytes);
+ }
+
+ return bytes;
+ }
+
+ ///
+ /// Converts the order of elements in the specified byte array to
+ /// host (this computer architecture) byte order.
+ ///
+ ///
+ ///
+ /// An array of converted from
+ /// .
+ ///
+ ///
+ /// if the number of elements in
+ /// it is less than 2 or is
+ /// same as host byte order.
+ ///
+ ///
+ ///
+ /// An array of to convert.
+ ///
+ ///
+ ///
+ /// One of the enum values.
+ ///
+ ///
+ /// It specifies the order of elements in .
+ ///
+ ///
+ ///
+ /// is .
+ ///
+ public static byte[] ToHostOrder (this byte[] source, ByteOrder sourceOrder)
+ {
+ if (source == null)
+ throw new ArgumentNullException ("source");
+
+ if (source.Length < 2)
+ return source;
+
+ if (sourceOrder.IsHostOrder ())
+ return source;
+
+ return source.Reverse ();
+ }
+
+ ///
+ /// Converts the specified array to a string.
+ ///
+ ///
+ ///
+ /// A converted by concatenating each element of
+ /// across .
+ ///
+ ///
+ /// An empty string if is an empty array.
+ ///
+ ///
+ ///
+ /// An array of T to convert.
+ ///
+ ///
+ /// A used to separate each element of
+ /// .
+ ///
+ ///
+ /// The type of elements in .
+ ///
+ ///
+ /// is .
+ ///
+ public static string ToString (this T[] array, string separator)
+ {
+ if (array == null)
+ throw new ArgumentNullException ("array");
+
+ var len = array.Length;
+ if (len == 0)
+ return String.Empty;
+
+ if (separator == null)
+ separator = String.Empty;
+
+ var buff = new StringBuilder (64);
+ var end = len - 1;
+
+ for (var i = 0; i < end; i++)
+ buff.AppendFormat ("{0}{1}", array[i], separator);
+
+ buff.Append (array[end].ToString ());
+ return buff.ToString ();
+ }
+
+ ///
+ /// Converts the specified string to a .
+ ///
+ ///
+ ///
+ /// A converted from .
+ ///
+ ///
+ /// if the conversion has failed.
+ ///
+ ///
+ ///
+ /// A to convert.
+ ///
+ public static Uri ToUri (this string value)
+ {
+ Uri ret;
+ Uri.TryCreate (
+ value, value.MaybeUri () ? UriKind.Absolute : UriKind.Relative, out ret
+ );
+
+ return ret;
+ }
+
+ ///
+ /// Sends the specified content data with the HTTP response.
+ ///
+ ///
+ /// A that represents the HTTP response
+ /// used to send the content data.
+ ///
+ ///
+ /// An array of that specifies the content data to send.
+ ///
+ ///
+ ///
+ /// is .
+ ///
+ ///
+ /// -or-
+ ///
+ ///
+ /// is .
+ ///
+ ///
+ [Obsolete ("This method will be removed.")]
+ public static void WriteContent (
+ this HttpListenerResponse response, byte[] content
+ )
+ {
+ if (response == null)
+ throw new ArgumentNullException ("response");
+
+ if (content == null)
+ throw new ArgumentNullException ("content");
+
+ var len = content.LongLength;
+ if (len == 0) {
+ response.Close ();
+ return;
+ }
+
+ response.ContentLength64 = len;
+
+ var output = response.OutputStream;
+
+ if (len <= Int32.MaxValue)
+ output.Write (content, 0, (int) len);
+ else
+ output.WriteBytes (content, 1024);
+
+ output.Close ();
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/Fin.cs b/websocket-sharp/Fin.cs
index 8965c378..ac5c4039 100644
--- a/websocket-sharp/Fin.cs
+++ b/websocket-sharp/Fin.cs
@@ -1,51 +1,51 @@
-#region License
-/*
- * Fin.cs
- *
- * The MIT License
- *
- * Copyright (c) 2012-2015 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-using System;
-
-namespace WebSocketSharp
-{
- ///
- /// Indicates whether a WebSocket frame is the final frame of a message.
- ///
- ///
- /// The values of this enumeration are defined in
- /// Section 5.2 of RFC 6455.
- ///
- internal enum Fin : byte
- {
- ///
- /// Equivalent to numeric value 0. Indicates more frames of a message follow.
- ///
- More = 0x0,
- ///
- /// Equivalent to numeric value 1. Indicates the final frame of a message.
- ///
- Final = 0x1
- }
-}
+#region License
+/*
+ * Fin.cs
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2012-2015 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+using System;
+
+namespace WebSocketSharp
+{
+ ///
+ /// Indicates whether a WebSocket frame is the final frame of a message.
+ ///
+ ///
+ /// The values of this enumeration are defined in
+ /// Section 5.2 of RFC 6455.
+ ///
+ internal enum Fin : byte
+ {
+ ///
+ /// Equivalent to numeric value 0. Indicates more frames of a message follow.
+ ///
+ More = 0x0,
+ ///
+ /// Equivalent to numeric value 1. Indicates the final frame of a message.
+ ///
+ Final = 0x1
+ }
+}
diff --git a/websocket-sharp/HttpBase.cs b/websocket-sharp/HttpBase.cs
index a7dbd402..5cf98915 100644
--- a/websocket-sharp/HttpBase.cs
+++ b/websocket-sharp/HttpBase.cs
@@ -1,208 +1,208 @@
-#region License
-/*
- * HttpBase.cs
- *
- * The MIT License
- *
- * Copyright (c) 2012-2014 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Collections.Specialized;
-using System.IO;
-using System.Text;
-using System.Threading;
-using WebSocketSharp.Net;
-
-namespace WebSocketSharp
-{
- internal abstract class HttpBase
- {
- #region Private Fields
-
- private NameValueCollection _headers;
- private const int _headersMaxLength = 8192;
- private Version _version;
-
- #endregion
-
- #region Internal Fields
-
- internal byte[] EntityBodyData;
-
- #endregion
-
- #region Protected Fields
-
- protected const string CrLf = "\r\n";
-
- #endregion
-
- #region Protected Constructors
-
- protected HttpBase (Version version, NameValueCollection headers)
- {
- _version = version;
- _headers = headers;
- }
-
- #endregion
-
- #region Public Properties
-
- public string EntityBody {
- get {
- if (EntityBodyData == null || EntityBodyData.LongLength == 0)
- return String.Empty;
-
- Encoding enc = null;
-
- var contentType = _headers["Content-Type"];
- if (contentType != null && contentType.Length > 0)
- enc = HttpUtility.GetEncoding (contentType);
-
- return (enc ?? Encoding.UTF8).GetString (EntityBodyData);
- }
- }
-
- public NameValueCollection Headers {
- get {
- return _headers;
- }
- }
-
- public Version ProtocolVersion {
- get {
- return _version;
- }
- }
-
- #endregion
-
- #region Private Methods
-
- private static byte[] readEntityBody (Stream stream, string length)
- {
- long len;
- if (!Int64.TryParse (length, out len))
- throw new ArgumentException ("Cannot be parsed.", "length");
-
- if (len < 0)
- throw new ArgumentOutOfRangeException ("length", "Less than zero.");
-
- return len > 1024
- ? stream.ReadBytes (len, 1024)
- : len > 0
- ? stream.ReadBytes ((int) len)
- : null;
- }
-
- private static string[] readHeaders (Stream stream, int maxLength)
- {
- var buff = new List ();
- var cnt = 0;
- Action add = i => {
- if (i == -1)
- throw new EndOfStreamException ("The header cannot be read from the data source.");
-
- buff.Add ((byte) i);
- cnt++;
- };
-
- var read = false;
- while (cnt < maxLength) {
- if (stream.ReadByte ().EqualsWith ('\r', add) &&
- stream.ReadByte ().EqualsWith ('\n', add) &&
- stream.ReadByte ().EqualsWith ('\r', add) &&
- stream.ReadByte ().EqualsWith ('\n', add)) {
- read = true;
- break;
- }
- }
-
- if (!read)
- throw new WebSocketException ("The length of header part is greater than the max length.");
-
- return Encoding.UTF8.GetString (buff.ToArray ())
- .Replace (CrLf + " ", " ")
- .Replace (CrLf + "\t", " ")
- .Split (new[] { CrLf }, StringSplitOptions.RemoveEmptyEntries);
- }
-
- #endregion
-
- #region Protected Methods
-
- protected static T Read (Stream stream, Func parser, int millisecondsTimeout)
- where T : HttpBase
- {
- var timeout = false;
- var timer = new Timer (
- state => {
- timeout = true;
- stream.Close ();
- },
- null,
- millisecondsTimeout,
- -1);
-
- T http = null;
- Exception exception = null;
- try {
- http = parser (readHeaders (stream, _headersMaxLength));
- var contentLen = http.Headers["Content-Length"];
- if (contentLen != null && contentLen.Length > 0)
- http.EntityBodyData = readEntityBody (stream, contentLen);
- }
- catch (Exception ex) {
- exception = ex;
- }
- finally {
- timer.Change (-1, -1);
- timer.Dispose ();
- }
-
- var msg = timeout
- ? "A timeout has occurred while reading an HTTP request/response."
- : exception != null
- ? "An exception has occurred while reading an HTTP request/response."
- : null;
-
- if (msg != null)
- throw new WebSocketException (msg, exception);
-
- return http;
- }
-
- #endregion
-
- #region Public Methods
-
- public byte[] ToByteArray ()
- {
- return Encoding.UTF8.GetBytes (ToString ());
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * HttpBase.cs
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2012-2014 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.IO;
+using System.Text;
+using System.Threading;
+using WebSocketSharp.Net;
+
+namespace WebSocketSharp
+{
+ internal abstract class HttpBase
+ {
+ #region Private Fields
+
+ private NameValueCollection _headers;
+ private const int _headersMaxLength = 8192;
+ private Version _version;
+
+ #endregion
+
+ #region Internal Fields
+
+ internal byte[] EntityBodyData;
+
+ #endregion
+
+ #region Protected Fields
+
+ protected const string CrLf = "\r\n";
+
+ #endregion
+
+ #region Protected Constructors
+
+ protected HttpBase (Version version, NameValueCollection headers)
+ {
+ _version = version;
+ _headers = headers;
+ }
+
+ #endregion
+
+ #region Public Properties
+
+ public string EntityBody {
+ get {
+ if (EntityBodyData == null || EntityBodyData.LongLength == 0)
+ return String.Empty;
+
+ Encoding enc = null;
+
+ var contentType = _headers["Content-Type"];
+ if (contentType != null && contentType.Length > 0)
+ enc = HttpUtility.GetEncoding (contentType);
+
+ return (enc ?? Encoding.UTF8).GetString (EntityBodyData);
+ }
+ }
+
+ public NameValueCollection Headers {
+ get {
+ return _headers;
+ }
+ }
+
+ public Version ProtocolVersion {
+ get {
+ return _version;
+ }
+ }
+
+ #endregion
+
+ #region Private Methods
+
+ private static byte[] readEntityBody (Stream stream, string length)
+ {
+ long len;
+ if (!Int64.TryParse (length, out len))
+ throw new ArgumentException ("Cannot be parsed.", "length");
+
+ if (len < 0)
+ throw new ArgumentOutOfRangeException ("length", "Less than zero.");
+
+ return len > 1024
+ ? stream.ReadBytes (len, 1024)
+ : len > 0
+ ? stream.ReadBytes ((int) len)
+ : null;
+ }
+
+ private static string[] readHeaders (Stream stream, int maxLength)
+ {
+ var buff = new List ();
+ var cnt = 0;
+ Action add = i => {
+ if (i == -1)
+ throw new EndOfStreamException ("The header cannot be read from the data source.");
+
+ buff.Add ((byte) i);
+ cnt++;
+ };
+
+ var read = false;
+ while (cnt < maxLength) {
+ if (stream.ReadByte ().EqualsWith ('\r', add) &&
+ stream.ReadByte ().EqualsWith ('\n', add) &&
+ stream.ReadByte ().EqualsWith ('\r', add) &&
+ stream.ReadByte ().EqualsWith ('\n', add)) {
+ read = true;
+ break;
+ }
+ }
+
+ if (!read)
+ throw new WebSocketException ("The length of header part is greater than the max length.");
+
+ return Encoding.UTF8.GetString (buff.ToArray ())
+ .Replace (CrLf + " ", " ")
+ .Replace (CrLf + "\t", " ")
+ .Split (new[] { CrLf }, StringSplitOptions.RemoveEmptyEntries);
+ }
+
+ #endregion
+
+ #region Protected Methods
+
+ protected static T Read (Stream stream, Func parser, int millisecondsTimeout)
+ where T : HttpBase
+ {
+ var timeout = false;
+ var timer = new Timer (
+ state => {
+ timeout = true;
+ stream.Close ();
+ },
+ null,
+ millisecondsTimeout,
+ -1);
+
+ T http = null;
+ Exception exception = null;
+ try {
+ http = parser (readHeaders (stream, _headersMaxLength));
+ var contentLen = http.Headers["Content-Length"];
+ if (contentLen != null && contentLen.Length > 0)
+ http.EntityBodyData = readEntityBody (stream, contentLen);
+ }
+ catch (Exception ex) {
+ exception = ex;
+ }
+ finally {
+ timer.Change (-1, -1);
+ timer.Dispose ();
+ }
+
+ var msg = timeout
+ ? "A timeout has occurred while reading an HTTP request/response."
+ : exception != null
+ ? "An exception has occurred while reading an HTTP request/response."
+ : null;
+
+ if (msg != null)
+ throw new WebSocketException (msg, exception);
+
+ return http;
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ public byte[] ToByteArray ()
+ {
+ return Encoding.UTF8.GetBytes (ToString ());
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/HttpRequest.cs b/websocket-sharp/HttpRequest.cs
index fe74d5af..c5202c29 100644
--- a/websocket-sharp/HttpRequest.cs
+++ b/websocket-sharp/HttpRequest.cs
@@ -1,217 +1,217 @@
-#region License
-/*
- * HttpRequest.cs
- *
- * The MIT License
- *
- * Copyright (c) 2012-2015 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-#region Contributors
-/*
- * Contributors:
- * - David Burhans
- */
-#endregion
-
-using System;
-using System.Collections.Specialized;
-using System.IO;
-using System.Text;
-using WebSocketSharp.Net;
-
-namespace WebSocketSharp
-{
- internal class HttpRequest : HttpBase
- {
- #region Private Fields
-
- private CookieCollection _cookies;
- private string _method;
- private string _uri;
-
- #endregion
-
- #region Private Constructors
-
- private HttpRequest (string method, string uri, Version version, NameValueCollection headers)
- : base (version, headers)
- {
- _method = method;
- _uri = uri;
- }
-
- #endregion
-
- #region Internal Constructors
-
- internal HttpRequest (string method, string uri)
- : this (method, uri, HttpVersion.Version11, new NameValueCollection ())
- {
- Headers["User-Agent"] = "websocket-sharp/1.0";
- }
-
- #endregion
-
- #region Public Properties
-
- public AuthenticationResponse AuthenticationResponse {
- get {
- var res = Headers["Authorization"];
- return res != null && res.Length > 0
- ? AuthenticationResponse.Parse (res)
- : null;
- }
- }
-
- public CookieCollection Cookies {
- get {
- if (_cookies == null)
- _cookies = Headers.GetCookies (false);
-
- return _cookies;
- }
- }
-
- public string HttpMethod {
- get {
- return _method;
- }
- }
-
- public bool IsWebSocketRequest {
- get {
- return _method == "GET"
- && ProtocolVersion > HttpVersion.Version10
- && Headers.Upgrades ("websocket");
- }
- }
-
- public string RequestUri {
- get {
- return _uri;
- }
- }
-
- #endregion
-
- #region Internal Methods
-
- internal static HttpRequest CreateConnectRequest (Uri uri)
- {
- var host = uri.DnsSafeHost;
- var port = uri.Port;
- var authority = String.Format ("{0}:{1}", host, port);
- var req = new HttpRequest ("CONNECT", authority);
- req.Headers["Host"] = port == 80 ? host : authority;
-
- return req;
- }
-
- internal static HttpRequest CreateWebSocketRequest (Uri uri)
- {
- var req = new HttpRequest ("GET", uri.PathAndQuery);
- var headers = req.Headers;
-
- // Only includes a port number in the Host header value if it's non-default.
- // See: https://tools.ietf.org/html/rfc6455#page-17
- var port = uri.Port;
- var schm = uri.Scheme;
- headers["Host"] = (port == 80 && schm == "ws") || (port == 443 && schm == "wss")
- ? uri.DnsSafeHost
- : uri.Authority;
-
- headers["Upgrade"] = "websocket";
- headers["Connection"] = "Upgrade";
-
- return req;
- }
-
- internal HttpResponse GetResponse (Stream stream, int millisecondsTimeout)
- {
- var buff = ToByteArray ();
- stream.Write (buff, 0, buff.Length);
-
- return Read (stream, HttpResponse.Parse, millisecondsTimeout);
- }
-
- internal static HttpRequest Parse (string[] headerParts)
- {
- var requestLine = headerParts[0].Split (new[] { ' ' }, 3);
- if (requestLine.Length != 3)
- throw new ArgumentException ("Invalid request line: " + headerParts[0]);
-
- var headers = new WebHeaderCollection ();
- for (int i = 1; i < headerParts.Length; i++)
- headers.InternalSet (headerParts[i], false);
-
- return new HttpRequest (
- requestLine[0], requestLine[1], new Version (requestLine[2].Substring (5)), headers);
- }
-
- internal static HttpRequest Read (Stream stream, int millisecondsTimeout)
- {
- return Read (stream, Parse, millisecondsTimeout);
- }
-
- #endregion
-
- #region Public Methods
-
- public void SetCookies (CookieCollection cookies)
- {
- if (cookies == null || cookies.Count == 0)
- return;
-
- var buff = new StringBuilder (64);
- foreach (var cookie in cookies.Sorted)
- if (!cookie.Expired)
- buff.AppendFormat ("{0}; ", cookie.ToString ());
-
- var len = buff.Length;
- if (len > 2) {
- buff.Length = len - 2;
- Headers["Cookie"] = buff.ToString ();
- }
- }
-
- public override string ToString ()
- {
- var output = new StringBuilder (64);
- output.AppendFormat ("{0} {1} HTTP/{2}{3}", _method, _uri, ProtocolVersion, CrLf);
-
- var headers = Headers;
- foreach (var key in headers.AllKeys)
- output.AppendFormat ("{0}: {1}{2}", key, headers[key], CrLf);
-
- output.Append (CrLf);
-
- var entity = EntityBody;
- if (entity.Length > 0)
- output.Append (entity);
-
- return output.ToString ();
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * HttpRequest.cs
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2012-2015 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+#region Contributors
+/*
+ * Contributors:
+ * - David Burhans
+ */
+#endregion
+
+using System;
+using System.Collections.Specialized;
+using System.IO;
+using System.Text;
+using WebSocketSharp.Net;
+
+namespace WebSocketSharp
+{
+ internal class HttpRequest : HttpBase
+ {
+ #region Private Fields
+
+ private CookieCollection _cookies;
+ private string _method;
+ private string _uri;
+
+ #endregion
+
+ #region Private Constructors
+
+ private HttpRequest (string method, string uri, Version version, NameValueCollection headers)
+ : base (version, headers)
+ {
+ _method = method;
+ _uri = uri;
+ }
+
+ #endregion
+
+ #region Internal Constructors
+
+ internal HttpRequest (string method, string uri)
+ : this (method, uri, HttpVersion.Version11, new NameValueCollection ())
+ {
+ Headers["User-Agent"] = "websocket-sharp/1.0";
+ }
+
+ #endregion
+
+ #region Public Properties
+
+ public AuthenticationResponse AuthenticationResponse {
+ get {
+ var res = Headers["Authorization"];
+ return res != null && res.Length > 0
+ ? AuthenticationResponse.Parse (res)
+ : null;
+ }
+ }
+
+ public CookieCollection Cookies {
+ get {
+ if (_cookies == null)
+ _cookies = Headers.GetCookies (false);
+
+ return _cookies;
+ }
+ }
+
+ public string HttpMethod {
+ get {
+ return _method;
+ }
+ }
+
+ public bool IsWebSocketRequest {
+ get {
+ return _method == "GET"
+ && ProtocolVersion > HttpVersion.Version10
+ && Headers.Upgrades ("websocket");
+ }
+ }
+
+ public string RequestUri {
+ get {
+ return _uri;
+ }
+ }
+
+ #endregion
+
+ #region Internal Methods
+
+ internal static HttpRequest CreateConnectRequest (Uri uri)
+ {
+ var host = uri.DnsSafeHost;
+ var port = uri.Port;
+ var authority = String.Format ("{0}:{1}", host, port);
+ var req = new HttpRequest ("CONNECT", authority);
+ req.Headers["Host"] = port == 80 ? host : authority;
+
+ return req;
+ }
+
+ internal static HttpRequest CreateWebSocketRequest (Uri uri)
+ {
+ var req = new HttpRequest ("GET", uri.PathAndQuery);
+ var headers = req.Headers;
+
+ // Only includes a port number in the Host header value if it's non-default.
+ // See: https://tools.ietf.org/html/rfc6455#page-17
+ var port = uri.Port;
+ var schm = uri.Scheme;
+ headers["Host"] = (port == 80 && schm == "ws") || (port == 443 && schm == "wss")
+ ? uri.DnsSafeHost
+ : uri.Authority;
+
+ headers["Upgrade"] = "websocket";
+ headers["Connection"] = "Upgrade";
+
+ return req;
+ }
+
+ internal HttpResponse GetResponse (Stream stream, int millisecondsTimeout)
+ {
+ var buff = ToByteArray ();
+ stream.Write (buff, 0, buff.Length);
+
+ return Read (stream, HttpResponse.Parse, millisecondsTimeout);
+ }
+
+ internal static HttpRequest Parse (string[] headerParts)
+ {
+ var requestLine = headerParts[0].Split (new[] { ' ' }, 3);
+ if (requestLine.Length != 3)
+ throw new ArgumentException ("Invalid request line: " + headerParts[0]);
+
+ var headers = new WebHeaderCollection ();
+ for (int i = 1; i < headerParts.Length; i++)
+ headers.InternalSet (headerParts[i], false);
+
+ return new HttpRequest (
+ requestLine[0], requestLine[1], new Version (requestLine[2].Substring (5)), headers);
+ }
+
+ internal static HttpRequest Read (Stream stream, int millisecondsTimeout)
+ {
+ return Read (stream, Parse, millisecondsTimeout);
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ public void SetCookies (CookieCollection cookies)
+ {
+ if (cookies == null || cookies.Count == 0)
+ return;
+
+ var buff = new StringBuilder (64);
+ foreach (var cookie in cookies.Sorted)
+ if (!cookie.Expired)
+ buff.AppendFormat ("{0}; ", cookie.ToString ());
+
+ var len = buff.Length;
+ if (len > 2) {
+ buff.Length = len - 2;
+ Headers["Cookie"] = buff.ToString ();
+ }
+ }
+
+ public override string ToString ()
+ {
+ var output = new StringBuilder (64);
+ output.AppendFormat ("{0} {1} HTTP/{2}{3}", _method, _uri, ProtocolVersion, CrLf);
+
+ var headers = Headers;
+ foreach (var key in headers.AllKeys)
+ output.AppendFormat ("{0}: {1}{2}", key, headers[key], CrLf);
+
+ output.Append (CrLf);
+
+ var entity = EntityBody;
+ if (entity.Length > 0)
+ output.Append (entity);
+
+ return output.ToString ();
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/HttpResponse.cs b/websocket-sharp/HttpResponse.cs
index 831b7278..caaa9c21 100644
--- a/websocket-sharp/HttpResponse.cs
+++ b/websocket-sharp/HttpResponse.cs
@@ -1,209 +1,209 @@
-#region License
-/*
- * HttpResponse.cs
- *
- * The MIT License
- *
- * Copyright (c) 2012-2014 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-using System;
-using System.Collections.Specialized;
-using System.IO;
-using System.Text;
-using WebSocketSharp.Net;
-
-namespace WebSocketSharp
-{
- internal class HttpResponse : HttpBase
- {
- #region Private Fields
-
- private string _code;
- private string _reason;
-
- #endregion
-
- #region Private Constructors
-
- private HttpResponse (string code, string reason, Version version, NameValueCollection headers)
- : base (version, headers)
- {
- _code = code;
- _reason = reason;
- }
-
- #endregion
-
- #region Internal Constructors
-
- internal HttpResponse (HttpStatusCode code)
- : this (code, code.GetDescription ())
- {
- }
-
- internal HttpResponse (HttpStatusCode code, string reason)
- : this (((int) code).ToString (), reason, HttpVersion.Version11, new NameValueCollection ())
- {
- Headers["Server"] = "websocket-sharp/1.0";
- }
-
- #endregion
-
- #region Public Properties
-
- public CookieCollection Cookies {
- get {
- return Headers.GetCookies (true);
- }
- }
-
- public bool HasConnectionClose {
- get {
- var comparison = StringComparison.OrdinalIgnoreCase;
- return Headers.Contains ("Connection", "close", comparison);
- }
- }
-
- public bool IsProxyAuthenticationRequired {
- get {
- return _code == "407";
- }
- }
-
- public bool IsRedirect {
- get {
- return _code == "301" || _code == "302";
- }
- }
-
- public bool IsUnauthorized {
- get {
- return _code == "401";
- }
- }
-
- public bool IsWebSocketResponse {
- get {
- return ProtocolVersion > HttpVersion.Version10
- && _code == "101"
- && Headers.Upgrades ("websocket");
- }
- }
-
- public string Reason {
- get {
- return _reason;
- }
- }
-
- public string StatusCode {
- get {
- return _code;
- }
- }
-
- #endregion
-
- #region Internal Methods
-
- internal static HttpResponse CreateCloseResponse (HttpStatusCode code)
- {
- var res = new HttpResponse (code);
- res.Headers["Connection"] = "close";
-
- return res;
- }
-
- internal static HttpResponse CreateUnauthorizedResponse (string challenge)
- {
- var res = new HttpResponse (HttpStatusCode.Unauthorized);
- res.Headers["WWW-Authenticate"] = challenge;
-
- return res;
- }
-
- internal static HttpResponse CreateWebSocketResponse ()
- {
- var res = new HttpResponse (HttpStatusCode.SwitchingProtocols);
-
- var headers = res.Headers;
- headers["Upgrade"] = "websocket";
- headers["Connection"] = "Upgrade";
-
- return res;
- }
-
- internal static HttpResponse Parse (string[] headerParts)
- {
- var statusLine = headerParts[0].Split (new[] { ' ' }, 3);
- if (statusLine.Length != 3)
- throw new ArgumentException ("Invalid status line: " + headerParts[0]);
-
- var headers = new WebHeaderCollection ();
- for (int i = 1; i < headerParts.Length; i++)
- headers.InternalSet (headerParts[i], true);
-
- return new HttpResponse (
- statusLine[1], statusLine[2], new Version (statusLine[0].Substring (5)), headers);
- }
-
- internal static HttpResponse Read (Stream stream, int millisecondsTimeout)
- {
- return Read (stream, Parse, millisecondsTimeout);
- }
-
- #endregion
-
- #region Public Methods
-
- public void SetCookies (CookieCollection cookies)
- {
- if (cookies == null || cookies.Count == 0)
- return;
-
- var headers = Headers;
- foreach (var cookie in cookies.Sorted)
- headers.Add ("Set-Cookie", cookie.ToResponseString ());
- }
-
- public override string ToString ()
- {
- var output = new StringBuilder (64);
- output.AppendFormat ("HTTP/{0} {1} {2}{3}", ProtocolVersion, _code, _reason, CrLf);
-
- var headers = Headers;
- foreach (var key in headers.AllKeys)
- output.AppendFormat ("{0}: {1}{2}", key, headers[key], CrLf);
-
- output.Append (CrLf);
-
- var entity = EntityBody;
- if (entity.Length > 0)
- output.Append (entity);
-
- return output.ToString ();
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * HttpResponse.cs
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2012-2014 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+using System;
+using System.Collections.Specialized;
+using System.IO;
+using System.Text;
+using WebSocketSharp.Net;
+
+namespace WebSocketSharp
+{
+ internal class HttpResponse : HttpBase
+ {
+ #region Private Fields
+
+ private string _code;
+ private string _reason;
+
+ #endregion
+
+ #region Private Constructors
+
+ private HttpResponse (string code, string reason, Version version, NameValueCollection headers)
+ : base (version, headers)
+ {
+ _code = code;
+ _reason = reason;
+ }
+
+ #endregion
+
+ #region Internal Constructors
+
+ internal HttpResponse (HttpStatusCode code)
+ : this (code, code.GetDescription ())
+ {
+ }
+
+ internal HttpResponse (HttpStatusCode code, string reason)
+ : this (((int) code).ToString (), reason, HttpVersion.Version11, new NameValueCollection ())
+ {
+ Headers["Server"] = "websocket-sharp/1.0";
+ }
+
+ #endregion
+
+ #region Public Properties
+
+ public CookieCollection Cookies {
+ get {
+ return Headers.GetCookies (true);
+ }
+ }
+
+ public bool HasConnectionClose {
+ get {
+ var comparison = StringComparison.OrdinalIgnoreCase;
+ return Headers.Contains ("Connection", "close", comparison);
+ }
+ }
+
+ public bool IsProxyAuthenticationRequired {
+ get {
+ return _code == "407";
+ }
+ }
+
+ public bool IsRedirect {
+ get {
+ return _code == "301" || _code == "302";
+ }
+ }
+
+ public bool IsUnauthorized {
+ get {
+ return _code == "401";
+ }
+ }
+
+ public bool IsWebSocketResponse {
+ get {
+ return ProtocolVersion > HttpVersion.Version10
+ && _code == "101"
+ && Headers.Upgrades ("websocket");
+ }
+ }
+
+ public string Reason {
+ get {
+ return _reason;
+ }
+ }
+
+ public string StatusCode {
+ get {
+ return _code;
+ }
+ }
+
+ #endregion
+
+ #region Internal Methods
+
+ internal static HttpResponse CreateCloseResponse (HttpStatusCode code)
+ {
+ var res = new HttpResponse (code);
+ res.Headers["Connection"] = "close";
+
+ return res;
+ }
+
+ internal static HttpResponse CreateUnauthorizedResponse (string challenge)
+ {
+ var res = new HttpResponse (HttpStatusCode.Unauthorized);
+ res.Headers["WWW-Authenticate"] = challenge;
+
+ return res;
+ }
+
+ internal static HttpResponse CreateWebSocketResponse ()
+ {
+ var res = new HttpResponse (HttpStatusCode.SwitchingProtocols);
+
+ var headers = res.Headers;
+ headers["Upgrade"] = "websocket";
+ headers["Connection"] = "Upgrade";
+
+ return res;
+ }
+
+ internal static HttpResponse Parse (string[] headerParts)
+ {
+ var statusLine = headerParts[0].Split (new[] { ' ' }, 3);
+ if (statusLine.Length != 3)
+ throw new ArgumentException ("Invalid status line: " + headerParts[0]);
+
+ var headers = new WebHeaderCollection ();
+ for (int i = 1; i < headerParts.Length; i++)
+ headers.InternalSet (headerParts[i], true);
+
+ return new HttpResponse (
+ statusLine[1], statusLine[2], new Version (statusLine[0].Substring (5)), headers);
+ }
+
+ internal static HttpResponse Read (Stream stream, int millisecondsTimeout)
+ {
+ return Read (stream, Parse, millisecondsTimeout);
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ public void SetCookies (CookieCollection cookies)
+ {
+ if (cookies == null || cookies.Count == 0)
+ return;
+
+ var headers = Headers;
+ foreach (var cookie in cookies.Sorted)
+ headers.Add ("Set-Cookie", cookie.ToResponseString ());
+ }
+
+ public override string ToString ()
+ {
+ var output = new StringBuilder (64);
+ output.AppendFormat ("HTTP/{0} {1} {2}{3}", ProtocolVersion, _code, _reason, CrLf);
+
+ var headers = Headers;
+ foreach (var key in headers.AllKeys)
+ output.AppendFormat ("{0}: {1}{2}", key, headers[key], CrLf);
+
+ output.Append (CrLf);
+
+ var entity = EntityBody;
+ if (entity.Length > 0)
+ output.Append (entity);
+
+ return output.ToString ();
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/LogData.cs b/websocket-sharp/LogData.cs
index 9c084309..a72ff9c7 100644
--- a/websocket-sharp/LogData.cs
+++ b/websocket-sharp/LogData.cs
@@ -1,149 +1,149 @@
-#region License
-/*
- * LogData.cs
- *
- * The MIT License
- *
- * Copyright (c) 2013-2015 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-using System;
-using System.Diagnostics;
-using System.Text;
-
-namespace WebSocketSharp
-{
- ///
- /// Represents a log data used by the class.
- ///
- public class LogData
- {
- #region Private Fields
-
- private StackFrame _caller;
- private DateTime _date;
- private LogLevel _level;
- private string _message;
-
- #endregion
-
- #region Internal Constructors
-
- internal LogData (LogLevel level, StackFrame caller, string message)
- {
- _level = level;
- _caller = caller;
- _message = message ?? String.Empty;
- _date = DateTime.Now;
- }
-
- #endregion
-
- #region Public Properties
-
- ///
- /// Gets the information of the logging method caller.
- ///
- ///
- /// A that provides the information of the logging method caller.
- ///
- public StackFrame Caller {
- get {
- return _caller;
- }
- }
-
- ///
- /// Gets the date and time when the log data was created.
- ///
- ///
- /// A that represents the date and time when the log data was created.
- ///
- public DateTime Date {
- get {
- return _date;
- }
- }
-
- ///
- /// Gets the logging level of the log data.
- ///
- ///
- /// One of the enum values, indicates the logging level of the log data.
- ///
- public LogLevel Level {
- get {
- return _level;
- }
- }
-
- ///
- /// Gets the message of the log data.
- ///
- ///
- /// A that represents the message of the log data.
- ///
- public string Message {
- get {
- return _message;
- }
- }
-
- #endregion
-
- #region Public Methods
-
- ///
- /// Returns a that represents the current .
- ///
- ///
- /// A that represents the current .
- ///
- public override string ToString ()
- {
- var header = String.Format ("{0}|{1,-5}|", _date, _level);
- var method = _caller.GetMethod ();
- var type = method.DeclaringType;
-#if DEBUG
- var lineNum = _caller.GetFileLineNumber ();
- var headerAndCaller =
- String.Format ("{0}{1}.{2}:{3}|", header, type.Name, method.Name, lineNum);
-#else
- var headerAndCaller = String.Format ("{0}{1}.{2}|", header, type.Name, method.Name);
-#endif
- var msgs = _message.Replace ("\r\n", "\n").TrimEnd ('\n').Split ('\n');
- if (msgs.Length <= 1)
- return String.Format ("{0}{1}", headerAndCaller, _message);
-
- var buff = new StringBuilder (String.Format ("{0}{1}\n", headerAndCaller, msgs[0]), 64);
-
- var fmt = String.Format ("{{0,{0}}}{{1}}\n", header.Length);
- for (var i = 1; i < msgs.Length; i++)
- buff.AppendFormat (fmt, "", msgs[i]);
-
- buff.Length--;
- return buff.ToString ();
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * LogData.cs
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2013-2015 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+using System;
+using System.Diagnostics;
+using System.Text;
+
+namespace WebSocketSharp
+{
+ ///
+ /// Represents a log data used by the class.
+ ///
+ public class LogData
+ {
+ #region Private Fields
+
+ private StackFrame _caller;
+ private DateTime _date;
+ private LogLevel _level;
+ private string _message;
+
+ #endregion
+
+ #region Internal Constructors
+
+ internal LogData (LogLevel level, StackFrame caller, string message)
+ {
+ _level = level;
+ _caller = caller;
+ _message = message ?? String.Empty;
+ _date = DateTime.Now;
+ }
+
+ #endregion
+
+ #region Public Properties
+
+ ///
+ /// Gets the information of the logging method caller.
+ ///
+ ///
+ /// A that provides the information of the logging method caller.
+ ///
+ public StackFrame Caller {
+ get {
+ return _caller;
+ }
+ }
+
+ ///
+ /// Gets the date and time when the log data was created.
+ ///
+ ///
+ /// A that represents the date and time when the log data was created.
+ ///
+ public DateTime Date {
+ get {
+ return _date;
+ }
+ }
+
+ ///
+ /// Gets the logging level of the log data.
+ ///
+ ///
+ /// One of the enum values, indicates the logging level of the log data.
+ ///
+ public LogLevel Level {
+ get {
+ return _level;
+ }
+ }
+
+ ///
+ /// Gets the message of the log data.
+ ///
+ ///
+ /// A that represents the message of the log data.
+ ///
+ public string Message {
+ get {
+ return _message;
+ }
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ ///
+ /// Returns a that represents the current .
+ ///
+ ///
+ /// A that represents the current .
+ ///
+ public override string ToString ()
+ {
+ var header = String.Format ("{0}|{1,-5}|", _date, _level);
+ var method = _caller.GetMethod ();
+ var type = method.DeclaringType;
+#if DEBUG
+ var lineNum = _caller.GetFileLineNumber ();
+ var headerAndCaller =
+ String.Format ("{0}{1}.{2}:{3}|", header, type.Name, method.Name, lineNum);
+#else
+ var headerAndCaller = String.Format ("{0}{1}.{2}|", header, type.Name, method.Name);
+#endif
+ var msgs = _message.Replace ("\r\n", "\n").TrimEnd ('\n').Split ('\n');
+ if (msgs.Length <= 1)
+ return String.Format ("{0}{1}", headerAndCaller, _message);
+
+ var buff = new StringBuilder (String.Format ("{0}{1}\n", headerAndCaller, msgs[0]), 64);
+
+ var fmt = String.Format ("{{0,{0}}}{{1}}\n", header.Length);
+ for (var i = 1; i < msgs.Length; i++)
+ buff.AppendFormat (fmt, "", msgs[i]);
+
+ buff.Length--;
+ return buff.ToString ();
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/LogLevel.cs b/websocket-sharp/LogLevel.cs
index ef996772..cce8ccc9 100644
--- a/websocket-sharp/LogLevel.cs
+++ b/websocket-sharp/LogLevel.cs
@@ -1,63 +1,63 @@
-#region License
-/*
- * LogLevel.cs
- *
- * The MIT License
- *
- * Copyright (c) 2013-2015 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-using System;
-
-namespace WebSocketSharp
-{
- ///
- /// Specifies the logging level.
- ///
- public enum LogLevel
- {
- ///
- /// Specifies the bottom logging level.
- ///
- Trace,
- ///
- /// Specifies the 2nd logging level from the bottom.
- ///
- Debug,
- ///
- /// Specifies the 3rd logging level from the bottom.
- ///
- Info,
- ///
- /// Specifies the 3rd logging level from the top.
- ///
- Warn,
- ///
- /// Specifies the 2nd logging level from the top.
- ///
- Error,
- ///
- /// Specifies the top logging level.
- ///
- Fatal
- }
-}
+#region License
+/*
+ * LogLevel.cs
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2013-2015 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+using System;
+
+namespace WebSocketSharp
+{
+ ///
+ /// Specifies the logging level.
+ ///
+ public enum LogLevel
+ {
+ ///
+ /// Specifies the bottom logging level.
+ ///
+ Trace,
+ ///
+ /// Specifies the 2nd logging level from the bottom.
+ ///
+ Debug,
+ ///
+ /// Specifies the 3rd logging level from the bottom.
+ ///
+ Info,
+ ///
+ /// Specifies the 3rd logging level from the top.
+ ///
+ Warn,
+ ///
+ /// Specifies the 2nd logging level from the top.
+ ///
+ Error,
+ ///
+ /// Specifies the top logging level.
+ ///
+ Fatal
+ }
+}
diff --git a/websocket-sharp/Logger.cs b/websocket-sharp/Logger.cs
index 17850e67..552c0a56 100644
--- a/websocket-sharp/Logger.cs
+++ b/websocket-sharp/Logger.cs
@@ -1,330 +1,330 @@
-#region License
-/*
- * Logger.cs
- *
- * The MIT License
- *
- * Copyright (c) 2013-2015 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-using System;
-using System.Diagnostics;
-using System.IO;
-
-namespace WebSocketSharp
-{
- ///
- /// Provides a set of methods and properties for logging.
- ///
- ///
- ///
- /// If you output a log with lower than the value of the property,
- /// it cannot be outputted.
- ///
- ///
- /// The default output action writes a log to the standard output stream and the log file
- /// if the property has a valid path to it.
- ///
- ///
- /// If you would like to use the custom output action, you should set
- /// the property to any Action<LogData, string>
- /// delegate.
- ///
- ///
- public class Logger
- {
- #region Private Fields
-
- private volatile string _file;
- private volatile LogLevel _level;
- private Action _output;
- private object _sync;
-
- #endregion
-
- #region Public Constructors
-
- ///
- /// Initializes a new instance of the class.
- ///
- ///
- /// This constructor initializes the current logging level with .
- ///
- public Logger ()
- : this (LogLevel.Error, null, null)
- {
- }
-
- ///
- /// Initializes a new instance of the class with
- /// the specified logging .
- ///
- ///
- /// One of the enum values.
- ///
- public Logger (LogLevel level)
- : this (level, null, null)
- {
- }
-
- ///
- /// Initializes a new instance of the class with
- /// the specified logging , path to the log ,
- /// and action.
- ///
- ///
- /// One of the enum values.
- ///
- ///
- /// A that represents the path to the log file.
- ///
- ///
- /// An Action<LogData, string> delegate that references the method(s) used to
- /// output a log. A parameter passed to this delegate is
- /// .
- ///
- public Logger (LogLevel level, string file, Action output)
- {
- _level = level;
- _file = file;
- _output = output ?? defaultOutput;
- _sync = new object ();
- }
-
- #endregion
-
- #region Public Properties
-
- ///
- /// Gets or sets the current path to the log file.
- ///
- ///
- /// A that represents the current path to the log file if any.
- ///
- public string File {
- get {
- return _file;
- }
-
- set {
- lock (_sync) {
- _file = value;
- Warn (
- String.Format ("The current path to the log file has been changed to {0}.", _file));
- }
- }
- }
-
- ///
- /// Gets or sets the current logging level.
- ///
- ///
- /// A log with lower than the value of this property cannot be outputted.
- ///
- ///
- /// One of the enum values, specifies the current logging level.
- ///
- public LogLevel Level {
- get {
- return _level;
- }
-
- set {
- lock (_sync) {
- _level = value;
- Warn (String.Format ("The current logging level has been changed to {0}.", _level));
- }
- }
- }
-
- ///
- /// Gets or sets the current output action used to output a log.
- ///
- ///
- ///
- /// An Action<LogData, string> delegate that references the method(s) used to
- /// output a log. A parameter passed to this delegate is the value of
- /// the property.
- ///
- ///
- /// If the value to set is , the current output action is changed to
- /// the default output action.
- ///
- ///
- public Action Output {
- get {
- return _output;
- }
-
- set {
- lock (_sync) {
- _output = value ?? defaultOutput;
- Warn ("The current output action has been changed.");
- }
- }
- }
-
- #endregion
-
- #region Private Methods
-
- private static void defaultOutput (LogData data, string path)
- {
- var log = data.ToString ();
- Console.WriteLine (log);
- if (path != null && path.Length > 0)
- writeToFile (log, path);
- }
-
- private void output (string message, LogLevel level)
- {
- lock (_sync) {
- if (_level > level)
- return;
-
- LogData data = null;
- try {
- data = new LogData (level, new StackFrame (2, true), message);
- _output (data, _file);
- }
- catch (Exception ex) {
- data = new LogData (LogLevel.Fatal, new StackFrame (0, true), ex.Message);
- Console.WriteLine (data.ToString ());
- }
- }
- }
-
- private static void writeToFile (string value, string path)
- {
- using (var writer = new StreamWriter (path, true))
- using (var syncWriter = TextWriter.Synchronized (writer))
- syncWriter.WriteLine (value);
- }
-
- #endregion
-
- #region Public Methods
-
- ///
- /// Outputs as a log with .
- ///
- ///
- /// If the current logging level is higher than ,
- /// this method doesn't output as a log.
- ///
- ///
- /// A that represents the message to output as a log.
- ///
- public void Debug (string message)
- {
- if (_level > LogLevel.Debug)
- return;
-
- output (message, LogLevel.Debug);
- }
-
- ///
- /// Outputs as a log with .
- ///
- ///
- /// If the current logging level is higher than ,
- /// this method doesn't output as a log.
- ///
- ///
- /// A that represents the message to output as a log.
- ///
- public void Error (string message)
- {
- if (_level > LogLevel.Error)
- return;
-
- output (message, LogLevel.Error);
- }
-
- ///
- /// Outputs as a log with .
- ///
- ///
- /// A that represents the message to output as a log.
- ///
- public void Fatal (string message)
- {
- output (message, LogLevel.Fatal);
- }
-
- ///
- /// Outputs as a log with .
- ///
- ///
- /// If the current logging level is higher than ,
- /// this method doesn't output as a log.
- ///
- ///
- /// A that represents the message to output as a log.
- ///
- public void Info (string message)
- {
- if (_level > LogLevel.Info)
- return;
-
- output (message, LogLevel.Info);
- }
-
- ///
- /// Outputs as a log with .
- ///
- ///
- /// If the current logging level is higher than ,
- /// this method doesn't output as a log.
- ///
- ///
- /// A that represents the message to output as a log.
- ///
- public void Trace (string message)
- {
- if (_level > LogLevel.Trace)
- return;
-
- output (message, LogLevel.Trace);
- }
-
- ///
- /// Outputs as a log with .
- ///
- ///
- /// If the current logging level is higher than ,
- /// this method doesn't output as a log.
- ///
- ///
- /// A that represents the message to output as a log.
- ///
- public void Warn (string message)
- {
- if (_level > LogLevel.Warn)
- return;
-
- output (message, LogLevel.Warn);
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * Logger.cs
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2013-2015 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+using System;
+using System.Diagnostics;
+using System.IO;
+
+namespace WebSocketSharp
+{
+ ///
+ /// Provides a set of methods and properties for logging.
+ ///
+ ///
+ ///
+ /// If you output a log with lower than the value of the property,
+ /// it cannot be outputted.
+ ///
+ ///
+ /// The default output action writes a log to the standard output stream and the log file
+ /// if the property has a valid path to it.
+ ///
+ ///
+ /// If you would like to use the custom output action, you should set
+ /// the property to any Action<LogData, string>
+ /// delegate.
+ ///
+ ///
+ public class Logger
+ {
+ #region Private Fields
+
+ private volatile string _file;
+ private volatile LogLevel _level;
+ private Action _output;
+ private object _sync;
+
+ #endregion
+
+ #region Public Constructors
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// This constructor initializes the current logging level with .
+ ///
+ public Logger ()
+ : this (LogLevel.Error, null, null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class with
+ /// the specified logging .
+ ///
+ ///
+ /// One of the enum values.
+ ///
+ public Logger (LogLevel level)
+ : this (level, null, null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class with
+ /// the specified logging , path to the log ,
+ /// and action.
+ ///
+ ///
+ /// One of the enum values.
+ ///
+ ///
+ /// A that represents the path to the log file.
+ ///
+ ///
+ /// An Action<LogData, string> delegate that references the method(s) used to
+ /// output a log. A parameter passed to this delegate is
+ /// .
+ ///
+ public Logger (LogLevel level, string file, Action output)
+ {
+ _level = level;
+ _file = file;
+ _output = output ?? defaultOutput;
+ _sync = new object ();
+ }
+
+ #endregion
+
+ #region Public Properties
+
+ ///
+ /// Gets or sets the current path to the log file.
+ ///
+ ///
+ /// A that represents the current path to the log file if any.
+ ///
+ public string File {
+ get {
+ return _file;
+ }
+
+ set {
+ lock (_sync) {
+ _file = value;
+ Warn (
+ String.Format ("The current path to the log file has been changed to {0}.", _file));
+ }
+ }
+ }
+
+ ///
+ /// Gets or sets the current logging level.
+ ///
+ ///
+ /// A log with lower than the value of this property cannot be outputted.
+ ///
+ ///
+ /// One of the enum values, specifies the current logging level.
+ ///
+ public LogLevel Level {
+ get {
+ return _level;
+ }
+
+ set {
+ lock (_sync) {
+ _level = value;
+ Warn (String.Format ("The current logging level has been changed to {0}.", _level));
+ }
+ }
+ }
+
+ ///
+ /// Gets or sets the current output action used to output a log.
+ ///
+ ///
+ ///
+ /// An Action<LogData, string> delegate that references the method(s) used to
+ /// output a log. A parameter passed to this delegate is the value of
+ /// the property.
+ ///
+ ///
+ /// If the value to set is , the current output action is changed to
+ /// the default output action.
+ ///
+ ///
+ public Action Output {
+ get {
+ return _output;
+ }
+
+ set {
+ lock (_sync) {
+ _output = value ?? defaultOutput;
+ Warn ("The current output action has been changed.");
+ }
+ }
+ }
+
+ #endregion
+
+ #region Private Methods
+
+ private static void defaultOutput (LogData data, string path)
+ {
+ var log = data.ToString ();
+ Console.WriteLine (log);
+ if (path != null && path.Length > 0)
+ writeToFile (log, path);
+ }
+
+ private void output (string message, LogLevel level)
+ {
+ lock (_sync) {
+ if (_level > level)
+ return;
+
+ LogData data = null;
+ try {
+ data = new LogData (level, new StackFrame (2, true), message);
+ _output (data, _file);
+ }
+ catch (Exception ex) {
+ data = new LogData (LogLevel.Fatal, new StackFrame (0, true), ex.Message);
+ Console.WriteLine (data.ToString ());
+ }
+ }
+ }
+
+ private static void writeToFile (string value, string path)
+ {
+ using (var writer = new StreamWriter (path, true))
+ using (var syncWriter = TextWriter.Synchronized (writer))
+ syncWriter.WriteLine (value);
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ ///
+ /// Outputs as a log with .
+ ///
+ ///
+ /// If the current logging level is higher than ,
+ /// this method doesn't output as a log.
+ ///
+ ///
+ /// A that represents the message to output as a log.
+ ///
+ public void Debug (string message)
+ {
+ if (_level > LogLevel.Debug)
+ return;
+
+ output (message, LogLevel.Debug);
+ }
+
+ ///
+ /// Outputs as a log with .
+ ///
+ ///
+ /// If the current logging level is higher than ,
+ /// this method doesn't output as a log.
+ ///
+ ///
+ /// A that represents the message to output as a log.
+ ///
+ public void Error (string message)
+ {
+ if (_level > LogLevel.Error)
+ return;
+
+ output (message, LogLevel.Error);
+ }
+
+ ///
+ /// Outputs as a log with .
+ ///
+ ///
+ /// A that represents the message to output as a log.
+ ///
+ public void Fatal (string message)
+ {
+ output (message, LogLevel.Fatal);
+ }
+
+ ///
+ /// Outputs as a log with .
+ ///
+ ///
+ /// If the current logging level is higher than ,
+ /// this method doesn't output as a log.
+ ///
+ ///
+ /// A that represents the message to output as a log.
+ ///
+ public void Info (string message)
+ {
+ if (_level > LogLevel.Info)
+ return;
+
+ output (message, LogLevel.Info);
+ }
+
+ ///
+ /// Outputs as a log with .
+ ///
+ ///
+ /// If the current logging level is higher than ,
+ /// this method doesn't output as a log.
+ ///
+ ///
+ /// A that represents the message to output as a log.
+ ///
+ public void Trace (string message)
+ {
+ if (_level > LogLevel.Trace)
+ return;
+
+ output (message, LogLevel.Trace);
+ }
+
+ ///
+ /// Outputs as a log with .
+ ///
+ ///
+ /// If the current logging level is higher than ,
+ /// this method doesn't output as a log.
+ ///
+ ///
+ /// A that represents the message to output as a log.
+ ///
+ public void Warn (string message)
+ {
+ if (_level > LogLevel.Warn)
+ return;
+
+ output (message, LogLevel.Warn);
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/Mask.cs b/websocket-sharp/Mask.cs
index fcafac80..b86ea232 100644
--- a/websocket-sharp/Mask.cs
+++ b/websocket-sharp/Mask.cs
@@ -1,51 +1,51 @@
-#region License
-/*
- * Mask.cs
- *
- * The MIT License
- *
- * Copyright (c) 2012-2015 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-using System;
-
-namespace WebSocketSharp
-{
- ///
- /// Indicates whether the payload data of a WebSocket frame is masked.
- ///
- ///
- /// The values of this enumeration are defined in
- /// Section 5.2 of RFC 6455.
- ///
- internal enum Mask : byte
- {
- ///
- /// Equivalent to numeric value 0. Indicates not masked.
- ///
- Off = 0x0,
- ///
- /// Equivalent to numeric value 1. Indicates masked.
- ///
- On = 0x1
- }
-}
+#region License
+/*
+ * Mask.cs
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2012-2015 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+using System;
+
+namespace WebSocketSharp
+{
+ ///
+ /// Indicates whether the payload data of a WebSocket frame is masked.
+ ///
+ ///
+ /// The values of this enumeration are defined in
+ /// Section 5.2 of RFC 6455.
+ ///
+ internal enum Mask : byte
+ {
+ ///
+ /// Equivalent to numeric value 0. Indicates not masked.
+ ///
+ Off = 0x0,
+ ///
+ /// Equivalent to numeric value 1. Indicates masked.
+ ///
+ On = 0x1
+ }
+}
diff --git a/websocket-sharp/MessageEventArgs.cs b/websocket-sharp/MessageEventArgs.cs
index 7940f98b..b437f92c 100644
--- a/websocket-sharp/MessageEventArgs.cs
+++ b/websocket-sharp/MessageEventArgs.cs
@@ -1,183 +1,183 @@
-#region License
-/*
- * MessageEventArgs.cs
- *
- * The MIT License
- *
- * Copyright (c) 2012-2016 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-using System;
-
-namespace WebSocketSharp
-{
- ///
- /// Represents the event data for the event.
- ///
- ///
- ///
- /// That event occurs when the receives
- /// a message or a ping if the
- /// property is set to true.
- ///
- ///
- /// If you would like to get the message data, you should access
- /// the or property.
- ///
- ///
- public class MessageEventArgs : EventArgs
- {
- #region Private Fields
-
- private string _data;
- private bool _dataSet;
- private Opcode _opcode;
- private byte[] _rawData;
-
- #endregion
-
- #region Internal Constructors
-
- internal MessageEventArgs (WebSocketFrame frame)
- {
- _opcode = frame.Opcode;
- _rawData = frame.PayloadData.ApplicationData;
- }
-
- internal MessageEventArgs (Opcode opcode, byte[] rawData)
- {
- if ((ulong) rawData.LongLength > PayloadData.MaxLength)
- throw new WebSocketException (CloseStatusCode.TooBig);
-
- _opcode = opcode;
- _rawData = rawData;
- }
-
- #endregion
-
- #region Internal Properties
-
- ///
- /// Gets the opcode for the message.
- ///
- ///
- /// , ,
- /// or .
- ///
- internal Opcode Opcode {
- get {
- return _opcode;
- }
- }
-
- #endregion
-
- #region Public Properties
-
- ///
- /// Gets the message data as a .
- ///
- ///
- /// A that represents the message data if its type is
- /// text or ping and if decoding it to a string has successfully done;
- /// otherwise, .
- ///
- public string Data {
- get {
- setData ();
- return _data;
- }
- }
-
- ///
- /// Gets a value indicating whether the message type is binary.
- ///
- ///
- /// true if the message type is binary; otherwise, false.
- ///
- public bool IsBinary {
- get {
- return _opcode == Opcode.Binary;
- }
- }
-
- ///
- /// Gets a value indicating whether the message type is ping.
- ///
- ///
- /// true if the message type is ping; otherwise, false.
- ///
- public bool IsPing {
- get {
- return _opcode == Opcode.Ping;
- }
- }
-
- ///
- /// Gets a value indicating whether the message type is text.
- ///
- ///
- /// true if the message type is text; otherwise, false.
- ///
- public bool IsText {
- get {
- return _opcode == Opcode.Text;
- }
- }
-
- ///
- /// Gets the message data as an array of .
- ///
- ///
- /// An array of that represents the message data.
- ///
- public byte[] RawData {
- get {
- setData ();
- return _rawData;
- }
- }
-
- #endregion
-
- #region Private Methods
-
- private void setData ()
- {
- if (_dataSet)
- return;
-
- if (_opcode == Opcode.Binary) {
- _dataSet = true;
- return;
- }
-
- string data;
- if (_rawData.TryGetUTF8DecodedString (out data))
- _data = data;
-
- _dataSet = true;
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * MessageEventArgs.cs
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2012-2016 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+using System;
+
+namespace WebSocketSharp
+{
+ ///
+ /// Represents the event data for the event.
+ ///
+ ///
+ ///
+ /// That event occurs when the receives
+ /// a message or a ping if the
+ /// property is set to true.
+ ///
+ ///
+ /// If you would like to get the message data, you should access
+ /// the or property.
+ ///
+ ///
+ public class MessageEventArgs : EventArgs
+ {
+ #region Private Fields
+
+ private string _data;
+ private bool _dataSet;
+ private Opcode _opcode;
+ private byte[] _rawData;
+
+ #endregion
+
+ #region Internal Constructors
+
+ internal MessageEventArgs (WebSocketFrame frame)
+ {
+ _opcode = frame.Opcode;
+ _rawData = frame.PayloadData.ApplicationData;
+ }
+
+ internal MessageEventArgs (Opcode opcode, byte[] rawData)
+ {
+ if ((ulong) rawData.LongLength > PayloadData.MaxLength)
+ throw new WebSocketException (CloseStatusCode.TooBig);
+
+ _opcode = opcode;
+ _rawData = rawData;
+ }
+
+ #endregion
+
+ #region Internal Properties
+
+ ///
+ /// Gets the opcode for the message.
+ ///
+ ///
+ /// , ,
+ /// or .
+ ///
+ internal Opcode Opcode {
+ get {
+ return _opcode;
+ }
+ }
+
+ #endregion
+
+ #region Public Properties
+
+ ///
+ /// Gets the message data as a .
+ ///
+ ///
+ /// A that represents the message data if its type is
+ /// text or ping and if decoding it to a string has successfully done;
+ /// otherwise, .
+ ///
+ public string Data {
+ get {
+ setData ();
+ return _data;
+ }
+ }
+
+ ///
+ /// Gets a value indicating whether the message type is binary.
+ ///
+ ///
+ /// true if the message type is binary; otherwise, false.
+ ///
+ public bool IsBinary {
+ get {
+ return _opcode == Opcode.Binary;
+ }
+ }
+
+ ///
+ /// Gets a value indicating whether the message type is ping.
+ ///
+ ///
+ /// true if the message type is ping; otherwise, false.
+ ///
+ public bool IsPing {
+ get {
+ return _opcode == Opcode.Ping;
+ }
+ }
+
+ ///
+ /// Gets a value indicating whether the message type is text.
+ ///
+ ///
+ /// true if the message type is text; otherwise, false.
+ ///
+ public bool IsText {
+ get {
+ return _opcode == Opcode.Text;
+ }
+ }
+
+ ///
+ /// Gets the message data as an array of .
+ ///
+ ///
+ /// An array of that represents the message data.
+ ///
+ public byte[] RawData {
+ get {
+ setData ();
+ return _rawData;
+ }
+ }
+
+ #endregion
+
+ #region Private Methods
+
+ private void setData ()
+ {
+ if (_dataSet)
+ return;
+
+ if (_opcode == Opcode.Binary) {
+ _dataSet = true;
+ return;
+ }
+
+ string data;
+ if (_rawData.TryGetUTF8DecodedString (out data))
+ _data = data;
+
+ _dataSet = true;
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/Net/AuthenticationBase.cs b/websocket-sharp/Net/AuthenticationBase.cs
index 10775049..e0482015 100644
--- a/websocket-sharp/Net/AuthenticationBase.cs
+++ b/websocket-sharp/Net/AuthenticationBase.cs
@@ -1,151 +1,151 @@
-#region License
-/*
- * AuthenticationBase.cs
- *
- * The MIT License
- *
- * Copyright (c) 2014 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-using System;
-using System.Collections.Specialized;
-using System.Text;
-
-namespace WebSocketSharp.Net
-{
- internal abstract class AuthenticationBase
- {
- #region Private Fields
-
- private AuthenticationSchemes _scheme;
-
- #endregion
-
- #region Internal Fields
-
- internal NameValueCollection Parameters;
-
- #endregion
-
- #region Protected Constructors
-
- protected AuthenticationBase (AuthenticationSchemes scheme, NameValueCollection parameters)
- {
- _scheme = scheme;
- Parameters = parameters;
- }
-
- #endregion
-
- #region Public Properties
-
- public string Algorithm {
- get {
- return Parameters["algorithm"];
- }
- }
-
- public string Nonce {
- get {
- return Parameters["nonce"];
- }
- }
-
- public string Opaque {
- get {
- return Parameters["opaque"];
- }
- }
-
- public string Qop {
- get {
- return Parameters["qop"];
- }
- }
-
- public string Realm {
- get {
- return Parameters["realm"];
- }
- }
-
- public AuthenticationSchemes Scheme {
- get {
- return _scheme;
- }
- }
-
- #endregion
-
- #region Internal Methods
-
- internal static string CreateNonceValue ()
- {
- var src = new byte[16];
- var rand = new Random ();
- rand.NextBytes (src);
-
- var res = new StringBuilder (32);
- foreach (var b in src)
- res.Append (b.ToString ("x2"));
-
- return res.ToString ();
- }
-
- internal static NameValueCollection ParseParameters (string value)
- {
- var res = new NameValueCollection ();
- foreach (var param in value.SplitHeaderValue (',')) {
- var i = param.IndexOf ('=');
- var name = i > 0 ? param.Substring (0, i).Trim () : null;
- var val = i < 0
- ? param.Trim ().Trim ('"')
- : i < param.Length - 1
- ? param.Substring (i + 1).Trim ().Trim ('"')
- : String.Empty;
-
- res.Add (name, val);
- }
-
- return res;
- }
-
- internal abstract string ToBasicString ();
-
- internal abstract string ToDigestString ();
-
- #endregion
-
- #region Public Methods
-
- public override string ToString ()
- {
- return _scheme == AuthenticationSchemes.Basic
- ? ToBasicString ()
- : _scheme == AuthenticationSchemes.Digest
- ? ToDigestString ()
- : String.Empty;
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * AuthenticationBase.cs
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2014 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+using System;
+using System.Collections.Specialized;
+using System.Text;
+
+namespace WebSocketSharp.Net
+{
+ internal abstract class AuthenticationBase
+ {
+ #region Private Fields
+
+ private AuthenticationSchemes _scheme;
+
+ #endregion
+
+ #region Internal Fields
+
+ internal NameValueCollection Parameters;
+
+ #endregion
+
+ #region Protected Constructors
+
+ protected AuthenticationBase (AuthenticationSchemes scheme, NameValueCollection parameters)
+ {
+ _scheme = scheme;
+ Parameters = parameters;
+ }
+
+ #endregion
+
+ #region Public Properties
+
+ public string Algorithm {
+ get {
+ return Parameters["algorithm"];
+ }
+ }
+
+ public string Nonce {
+ get {
+ return Parameters["nonce"];
+ }
+ }
+
+ public string Opaque {
+ get {
+ return Parameters["opaque"];
+ }
+ }
+
+ public string Qop {
+ get {
+ return Parameters["qop"];
+ }
+ }
+
+ public string Realm {
+ get {
+ return Parameters["realm"];
+ }
+ }
+
+ public AuthenticationSchemes Scheme {
+ get {
+ return _scheme;
+ }
+ }
+
+ #endregion
+
+ #region Internal Methods
+
+ internal static string CreateNonceValue ()
+ {
+ var src = new byte[16];
+ var rand = new Random ();
+ rand.NextBytes (src);
+
+ var res = new StringBuilder (32);
+ foreach (var b in src)
+ res.Append (b.ToString ("x2"));
+
+ return res.ToString ();
+ }
+
+ internal static NameValueCollection ParseParameters (string value)
+ {
+ var res = new NameValueCollection ();
+ foreach (var param in value.SplitHeaderValue (',')) {
+ var i = param.IndexOf ('=');
+ var name = i > 0 ? param.Substring (0, i).Trim () : null;
+ var val = i < 0
+ ? param.Trim ().Trim ('"')
+ : i < param.Length - 1
+ ? param.Substring (i + 1).Trim ().Trim ('"')
+ : String.Empty;
+
+ res.Add (name, val);
+ }
+
+ return res;
+ }
+
+ internal abstract string ToBasicString ();
+
+ internal abstract string ToDigestString ();
+
+ #endregion
+
+ #region Public Methods
+
+ public override string ToString ()
+ {
+ return _scheme == AuthenticationSchemes.Basic
+ ? ToBasicString ()
+ : _scheme == AuthenticationSchemes.Digest
+ ? ToDigestString ()
+ : String.Empty;
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/Net/AuthenticationChallenge.cs b/websocket-sharp/Net/AuthenticationChallenge.cs
index 3472204b..9d0ebcb3 100644
--- a/websocket-sharp/Net/AuthenticationChallenge.cs
+++ b/websocket-sharp/Net/AuthenticationChallenge.cs
@@ -1,146 +1,146 @@
-#region License
-/*
- * AuthenticationChallenge.cs
- *
- * The MIT License
- *
- * Copyright (c) 2013-2014 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-using System;
-using System.Collections.Specialized;
-using System.Text;
-
-namespace WebSocketSharp.Net
-{
- internal class AuthenticationChallenge : AuthenticationBase
- {
- #region Private Constructors
-
- private AuthenticationChallenge (AuthenticationSchemes scheme, NameValueCollection parameters)
- : base (scheme, parameters)
- {
- }
-
- #endregion
-
- #region Internal Constructors
-
- internal AuthenticationChallenge (AuthenticationSchemes scheme, string realm)
- : base (scheme, new NameValueCollection ())
- {
- Parameters["realm"] = realm;
- if (scheme == AuthenticationSchemes.Digest) {
- Parameters["nonce"] = CreateNonceValue ();
- Parameters["algorithm"] = "MD5";
- Parameters["qop"] = "auth";
- }
- }
-
- #endregion
-
- #region Public Properties
-
- public string Domain {
- get {
- return Parameters["domain"];
- }
- }
-
- public string Stale {
- get {
- return Parameters["stale"];
- }
- }
-
- #endregion
-
- #region Internal Methods
-
- internal static AuthenticationChallenge CreateBasicChallenge (string realm)
- {
- return new AuthenticationChallenge (AuthenticationSchemes.Basic, realm);
- }
-
- internal static AuthenticationChallenge CreateDigestChallenge (string realm)
- {
- return new AuthenticationChallenge (AuthenticationSchemes.Digest, realm);
- }
-
- internal static AuthenticationChallenge Parse (string value)
- {
- var chal = value.Split (new[] { ' ' }, 2);
- if (chal.Length != 2)
- return null;
-
- var schm = chal[0].ToLower ();
- return schm == "basic"
- ? new AuthenticationChallenge (
- AuthenticationSchemes.Basic, ParseParameters (chal[1]))
- : schm == "digest"
- ? new AuthenticationChallenge (
- AuthenticationSchemes.Digest, ParseParameters (chal[1]))
- : null;
- }
-
- internal override string ToBasicString ()
- {
- return String.Format ("Basic realm=\"{0}\"", Parameters["realm"]);
- }
-
- internal override string ToDigestString ()
- {
- var output = new StringBuilder (128);
-
- var domain = Parameters["domain"];
- if (domain != null)
- output.AppendFormat (
- "Digest realm=\"{0}\", domain=\"{1}\", nonce=\"{2}\"",
- Parameters["realm"],
- domain,
- Parameters["nonce"]);
- else
- output.AppendFormat (
- "Digest realm=\"{0}\", nonce=\"{1}\"", Parameters["realm"], Parameters["nonce"]);
-
- var opaque = Parameters["opaque"];
- if (opaque != null)
- output.AppendFormat (", opaque=\"{0}\"", opaque);
-
- var stale = Parameters["stale"];
- if (stale != null)
- output.AppendFormat (", stale={0}", stale);
-
- var algo = Parameters["algorithm"];
- if (algo != null)
- output.AppendFormat (", algorithm={0}", algo);
-
- var qop = Parameters["qop"];
- if (qop != null)
- output.AppendFormat (", qop=\"{0}\"", qop);
-
- return output.ToString ();
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * AuthenticationChallenge.cs
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2013-2014 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+using System;
+using System.Collections.Specialized;
+using System.Text;
+
+namespace WebSocketSharp.Net
+{
+ internal class AuthenticationChallenge : AuthenticationBase
+ {
+ #region Private Constructors
+
+ private AuthenticationChallenge (AuthenticationSchemes scheme, NameValueCollection parameters)
+ : base (scheme, parameters)
+ {
+ }
+
+ #endregion
+
+ #region Internal Constructors
+
+ internal AuthenticationChallenge (AuthenticationSchemes scheme, string realm)
+ : base (scheme, new NameValueCollection ())
+ {
+ Parameters["realm"] = realm;
+ if (scheme == AuthenticationSchemes.Digest) {
+ Parameters["nonce"] = CreateNonceValue ();
+ Parameters["algorithm"] = "MD5";
+ Parameters["qop"] = "auth";
+ }
+ }
+
+ #endregion
+
+ #region Public Properties
+
+ public string Domain {
+ get {
+ return Parameters["domain"];
+ }
+ }
+
+ public string Stale {
+ get {
+ return Parameters["stale"];
+ }
+ }
+
+ #endregion
+
+ #region Internal Methods
+
+ internal static AuthenticationChallenge CreateBasicChallenge (string realm)
+ {
+ return new AuthenticationChallenge (AuthenticationSchemes.Basic, realm);
+ }
+
+ internal static AuthenticationChallenge CreateDigestChallenge (string realm)
+ {
+ return new AuthenticationChallenge (AuthenticationSchemes.Digest, realm);
+ }
+
+ internal static AuthenticationChallenge Parse (string value)
+ {
+ var chal = value.Split (new[] { ' ' }, 2);
+ if (chal.Length != 2)
+ return null;
+
+ var schm = chal[0].ToLower ();
+ return schm == "basic"
+ ? new AuthenticationChallenge (
+ AuthenticationSchemes.Basic, ParseParameters (chal[1]))
+ : schm == "digest"
+ ? new AuthenticationChallenge (
+ AuthenticationSchemes.Digest, ParseParameters (chal[1]))
+ : null;
+ }
+
+ internal override string ToBasicString ()
+ {
+ return String.Format ("Basic realm=\"{0}\"", Parameters["realm"]);
+ }
+
+ internal override string ToDigestString ()
+ {
+ var output = new StringBuilder (128);
+
+ var domain = Parameters["domain"];
+ if (domain != null)
+ output.AppendFormat (
+ "Digest realm=\"{0}\", domain=\"{1}\", nonce=\"{2}\"",
+ Parameters["realm"],
+ domain,
+ Parameters["nonce"]);
+ else
+ output.AppendFormat (
+ "Digest realm=\"{0}\", nonce=\"{1}\"", Parameters["realm"], Parameters["nonce"]);
+
+ var opaque = Parameters["opaque"];
+ if (opaque != null)
+ output.AppendFormat (", opaque=\"{0}\"", opaque);
+
+ var stale = Parameters["stale"];
+ if (stale != null)
+ output.AppendFormat (", stale={0}", stale);
+
+ var algo = Parameters["algorithm"];
+ if (algo != null)
+ output.AppendFormat (", algorithm={0}", algo);
+
+ var qop = Parameters["qop"];
+ if (qop != null)
+ output.AppendFormat (", qop=\"{0}\"", qop);
+
+ return output.ToString ();
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/Net/AuthenticationResponse.cs b/websocket-sharp/Net/AuthenticationResponse.cs
index 0257d85b..40615d05 100644
--- a/websocket-sharp/Net/AuthenticationResponse.cs
+++ b/websocket-sharp/Net/AuthenticationResponse.cs
@@ -1,323 +1,323 @@
-#region License
-/*
- * AuthenticationResponse.cs
- *
- * ParseBasicCredentials is derived from System.Net.HttpListenerContext.cs of Mono
- * (http://www.mono-project.com).
- *
- * The MIT License
- *
- * Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
- * Copyright (c) 2013-2014 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-using System;
-using System.Collections.Specialized;
-using System.Security.Cryptography;
-using System.Security.Principal;
-using System.Text;
-
-namespace WebSocketSharp.Net
-{
- internal class AuthenticationResponse : AuthenticationBase
- {
- #region Private Fields
-
- private uint _nonceCount;
-
- #endregion
-
- #region Private Constructors
-
- private AuthenticationResponse (AuthenticationSchemes scheme, NameValueCollection parameters)
- : base (scheme, parameters)
- {
- }
-
- #endregion
-
- #region Internal Constructors
-
- internal AuthenticationResponse (NetworkCredential credentials)
- : this (AuthenticationSchemes.Basic, new NameValueCollection (), credentials, 0)
- {
- }
-
- internal AuthenticationResponse (
- AuthenticationChallenge challenge, NetworkCredential credentials, uint nonceCount)
- : this (challenge.Scheme, challenge.Parameters, credentials, nonceCount)
- {
- }
-
- internal AuthenticationResponse (
- AuthenticationSchemes scheme,
- NameValueCollection parameters,
- NetworkCredential credentials,
- uint nonceCount)
- : base (scheme, parameters)
- {
- Parameters["username"] = credentials.Username;
- Parameters["password"] = credentials.Password;
- Parameters["uri"] = credentials.Domain;
- _nonceCount = nonceCount;
- if (scheme == AuthenticationSchemes.Digest)
- initAsDigest ();
- }
-
- #endregion
-
- #region Internal Properties
-
- internal uint NonceCount {
- get {
- return _nonceCount < UInt32.MaxValue
- ? _nonceCount
- : 0;
- }
- }
-
- #endregion
-
- #region Public Properties
-
- public string Cnonce {
- get {
- return Parameters["cnonce"];
- }
- }
-
- public string Nc {
- get {
- return Parameters["nc"];
- }
- }
-
- public string Password {
- get {
- return Parameters["password"];
- }
- }
-
- public string Response {
- get {
- return Parameters["response"];
- }
- }
-
- public string Uri {
- get {
- return Parameters["uri"];
- }
- }
-
- public string UserName {
- get {
- return Parameters["username"];
- }
- }
-
- #endregion
-
- #region Private Methods
-
- private static string createA1 (string username, string password, string realm)
- {
- return String.Format ("{0}:{1}:{2}", username, realm, password);
- }
-
- private static string createA1 (
- string username, string password, string realm, string nonce, string cnonce)
- {
- return String.Format (
- "{0}:{1}:{2}", hash (createA1 (username, password, realm)), nonce, cnonce);
- }
-
- private static string createA2 (string method, string uri)
- {
- return String.Format ("{0}:{1}", method, uri);
- }
-
- private static string createA2 (string method, string uri, string entity)
- {
- return String.Format ("{0}:{1}:{2}", method, uri, hash (entity));
- }
-
- private static string hash (string value)
- {
- var src = Encoding.UTF8.GetBytes (value);
- var md5 = MD5.Create ();
- var hashed = md5.ComputeHash (src);
-
- var res = new StringBuilder (64);
- foreach (var b in hashed)
- res.Append (b.ToString ("x2"));
-
- return res.ToString ();
- }
-
- private void initAsDigest ()
- {
- var qops = Parameters["qop"];
- if (qops != null) {
- if (qops.Split (',').Contains (qop => qop.Trim ().ToLower () == "auth")) {
- Parameters["qop"] = "auth";
- Parameters["cnonce"] = CreateNonceValue ();
- Parameters["nc"] = String.Format ("{0:x8}", ++_nonceCount);
- }
- else {
- Parameters["qop"] = null;
- }
- }
-
- Parameters["method"] = "GET";
- Parameters["response"] = CreateRequestDigest (Parameters);
- }
-
- #endregion
-
- #region Internal Methods
-
- internal static string CreateRequestDigest (NameValueCollection parameters)
- {
- var user = parameters["username"];
- var pass = parameters["password"];
- var realm = parameters["realm"];
- var nonce = parameters["nonce"];
- var uri = parameters["uri"];
- var algo = parameters["algorithm"];
- var qop = parameters["qop"];
- var cnonce = parameters["cnonce"];
- var nc = parameters["nc"];
- var method = parameters["method"];
-
- var a1 = algo != null && algo.ToLower () == "md5-sess"
- ? createA1 (user, pass, realm, nonce, cnonce)
- : createA1 (user, pass, realm);
-
- var a2 = qop != null && qop.ToLower () == "auth-int"
- ? createA2 (method, uri, parameters["entity"])
- : createA2 (method, uri);
-
- var secret = hash (a1);
- var data = qop != null
- ? String.Format ("{0}:{1}:{2}:{3}:{4}", nonce, nc, cnonce, qop, hash (a2))
- : String.Format ("{0}:{1}", nonce, hash (a2));
-
- return hash (String.Format ("{0}:{1}", secret, data));
- }
-
- internal static AuthenticationResponse Parse (string value)
- {
- try {
- var cred = value.Split (new[] { ' ' }, 2);
- if (cred.Length != 2)
- return null;
-
- var schm = cred[0].ToLower ();
- return schm == "basic"
- ? new AuthenticationResponse (
- AuthenticationSchemes.Basic, ParseBasicCredentials (cred[1]))
- : schm == "digest"
- ? new AuthenticationResponse (
- AuthenticationSchemes.Digest, ParseParameters (cred[1]))
- : null;
- }
- catch {
- }
-
- return null;
- }
-
- internal static NameValueCollection ParseBasicCredentials (string value)
- {
- // Decode the basic-credentials (a Base64 encoded string).
- var userPass = Encoding.Default.GetString (Convert.FromBase64String (value));
-
- // The format is [\]:.
- var i = userPass.IndexOf (':');
- var user = userPass.Substring (0, i);
- var pass = i < userPass.Length - 1 ? userPass.Substring (i + 1) : String.Empty;
-
- // Check if 'domain' exists.
- i = user.IndexOf ('\\');
- if (i > -1)
- user = user.Substring (i + 1);
-
- var res = new NameValueCollection ();
- res["username"] = user;
- res["password"] = pass;
-
- return res;
- }
-
- internal override string ToBasicString ()
- {
- var userPass = String.Format ("{0}:{1}", Parameters["username"], Parameters["password"]);
- var cred = Convert.ToBase64String (Encoding.UTF8.GetBytes (userPass));
-
- return "Basic " + cred;
- }
-
- internal override string ToDigestString ()
- {
- var output = new StringBuilder (256);
- output.AppendFormat (
- "Digest username=\"{0}\", realm=\"{1}\", nonce=\"{2}\", uri=\"{3}\", response=\"{4}\"",
- Parameters["username"],
- Parameters["realm"],
- Parameters["nonce"],
- Parameters["uri"],
- Parameters["response"]);
-
- var opaque = Parameters["opaque"];
- if (opaque != null)
- output.AppendFormat (", opaque=\"{0}\"", opaque);
-
- var algo = Parameters["algorithm"];
- if (algo != null)
- output.AppendFormat (", algorithm={0}", algo);
-
- var qop = Parameters["qop"];
- if (qop != null)
- output.AppendFormat (
- ", qop={0}, cnonce=\"{1}\", nc={2}", qop, Parameters["cnonce"], Parameters["nc"]);
-
- return output.ToString ();
- }
-
- #endregion
-
- #region Public Methods
-
- public IIdentity ToIdentity ()
- {
- var schm = Scheme;
- return schm == AuthenticationSchemes.Basic
- ? new HttpBasicIdentity (Parameters["username"], Parameters["password"]) as IIdentity
- : schm == AuthenticationSchemes.Digest
- ? new HttpDigestIdentity (Parameters)
- : null;
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * AuthenticationResponse.cs
+ *
+ * ParseBasicCredentials is derived from System.Net.HttpListenerContext.cs of Mono
+ * (http://www.mono-project.com).
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
+ * Copyright (c) 2013-2014 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+using System;
+using System.Collections.Specialized;
+using System.Security.Cryptography;
+using System.Security.Principal;
+using System.Text;
+
+namespace WebSocketSharp.Net
+{
+ internal class AuthenticationResponse : AuthenticationBase
+ {
+ #region Private Fields
+
+ private uint _nonceCount;
+
+ #endregion
+
+ #region Private Constructors
+
+ private AuthenticationResponse (AuthenticationSchemes scheme, NameValueCollection parameters)
+ : base (scheme, parameters)
+ {
+ }
+
+ #endregion
+
+ #region Internal Constructors
+
+ internal AuthenticationResponse (NetworkCredential credentials)
+ : this (AuthenticationSchemes.Basic, new NameValueCollection (), credentials, 0)
+ {
+ }
+
+ internal AuthenticationResponse (
+ AuthenticationChallenge challenge, NetworkCredential credentials, uint nonceCount)
+ : this (challenge.Scheme, challenge.Parameters, credentials, nonceCount)
+ {
+ }
+
+ internal AuthenticationResponse (
+ AuthenticationSchemes scheme,
+ NameValueCollection parameters,
+ NetworkCredential credentials,
+ uint nonceCount)
+ : base (scheme, parameters)
+ {
+ Parameters["username"] = credentials.Username;
+ Parameters["password"] = credentials.Password;
+ Parameters["uri"] = credentials.Domain;
+ _nonceCount = nonceCount;
+ if (scheme == AuthenticationSchemes.Digest)
+ initAsDigest ();
+ }
+
+ #endregion
+
+ #region Internal Properties
+
+ internal uint NonceCount {
+ get {
+ return _nonceCount < UInt32.MaxValue
+ ? _nonceCount
+ : 0;
+ }
+ }
+
+ #endregion
+
+ #region Public Properties
+
+ public string Cnonce {
+ get {
+ return Parameters["cnonce"];
+ }
+ }
+
+ public string Nc {
+ get {
+ return Parameters["nc"];
+ }
+ }
+
+ public string Password {
+ get {
+ return Parameters["password"];
+ }
+ }
+
+ public string Response {
+ get {
+ return Parameters["response"];
+ }
+ }
+
+ public string Uri {
+ get {
+ return Parameters["uri"];
+ }
+ }
+
+ public string UserName {
+ get {
+ return Parameters["username"];
+ }
+ }
+
+ #endregion
+
+ #region Private Methods
+
+ private static string createA1 (string username, string password, string realm)
+ {
+ return String.Format ("{0}:{1}:{2}", username, realm, password);
+ }
+
+ private static string createA1 (
+ string username, string password, string realm, string nonce, string cnonce)
+ {
+ return String.Format (
+ "{0}:{1}:{2}", hash (createA1 (username, password, realm)), nonce, cnonce);
+ }
+
+ private static string createA2 (string method, string uri)
+ {
+ return String.Format ("{0}:{1}", method, uri);
+ }
+
+ private static string createA2 (string method, string uri, string entity)
+ {
+ return String.Format ("{0}:{1}:{2}", method, uri, hash (entity));
+ }
+
+ private static string hash (string value)
+ {
+ var src = Encoding.UTF8.GetBytes (value);
+ var md5 = MD5.Create ();
+ var hashed = md5.ComputeHash (src);
+
+ var res = new StringBuilder (64);
+ foreach (var b in hashed)
+ res.Append (b.ToString ("x2"));
+
+ return res.ToString ();
+ }
+
+ private void initAsDigest ()
+ {
+ var qops = Parameters["qop"];
+ if (qops != null) {
+ if (qops.Split (',').Contains (qop => qop.Trim ().ToLower () == "auth")) {
+ Parameters["qop"] = "auth";
+ Parameters["cnonce"] = CreateNonceValue ();
+ Parameters["nc"] = String.Format ("{0:x8}", ++_nonceCount);
+ }
+ else {
+ Parameters["qop"] = null;
+ }
+ }
+
+ Parameters["method"] = "GET";
+ Parameters["response"] = CreateRequestDigest (Parameters);
+ }
+
+ #endregion
+
+ #region Internal Methods
+
+ internal static string CreateRequestDigest (NameValueCollection parameters)
+ {
+ var user = parameters["username"];
+ var pass = parameters["password"];
+ var realm = parameters["realm"];
+ var nonce = parameters["nonce"];
+ var uri = parameters["uri"];
+ var algo = parameters["algorithm"];
+ var qop = parameters["qop"];
+ var cnonce = parameters["cnonce"];
+ var nc = parameters["nc"];
+ var method = parameters["method"];
+
+ var a1 = algo != null && algo.ToLower () == "md5-sess"
+ ? createA1 (user, pass, realm, nonce, cnonce)
+ : createA1 (user, pass, realm);
+
+ var a2 = qop != null && qop.ToLower () == "auth-int"
+ ? createA2 (method, uri, parameters["entity"])
+ : createA2 (method, uri);
+
+ var secret = hash (a1);
+ var data = qop != null
+ ? String.Format ("{0}:{1}:{2}:{3}:{4}", nonce, nc, cnonce, qop, hash (a2))
+ : String.Format ("{0}:{1}", nonce, hash (a2));
+
+ return hash (String.Format ("{0}:{1}", secret, data));
+ }
+
+ internal static AuthenticationResponse Parse (string value)
+ {
+ try {
+ var cred = value.Split (new[] { ' ' }, 2);
+ if (cred.Length != 2)
+ return null;
+
+ var schm = cred[0].ToLower ();
+ return schm == "basic"
+ ? new AuthenticationResponse (
+ AuthenticationSchemes.Basic, ParseBasicCredentials (cred[1]))
+ : schm == "digest"
+ ? new AuthenticationResponse (
+ AuthenticationSchemes.Digest, ParseParameters (cred[1]))
+ : null;
+ }
+ catch {
+ }
+
+ return null;
+ }
+
+ internal static NameValueCollection ParseBasicCredentials (string value)
+ {
+ // Decode the basic-credentials (a Base64 encoded string).
+ var userPass = Encoding.Default.GetString (Convert.FromBase64String (value));
+
+ // The format is [\]:.
+ var i = userPass.IndexOf (':');
+ var user = userPass.Substring (0, i);
+ var pass = i < userPass.Length - 1 ? userPass.Substring (i + 1) : String.Empty;
+
+ // Check if 'domain' exists.
+ i = user.IndexOf ('\\');
+ if (i > -1)
+ user = user.Substring (i + 1);
+
+ var res = new NameValueCollection ();
+ res["username"] = user;
+ res["password"] = pass;
+
+ return res;
+ }
+
+ internal override string ToBasicString ()
+ {
+ var userPass = String.Format ("{0}:{1}", Parameters["username"], Parameters["password"]);
+ var cred = Convert.ToBase64String (Encoding.UTF8.GetBytes (userPass));
+
+ return "Basic " + cred;
+ }
+
+ internal override string ToDigestString ()
+ {
+ var output = new StringBuilder (256);
+ output.AppendFormat (
+ "Digest username=\"{0}\", realm=\"{1}\", nonce=\"{2}\", uri=\"{3}\", response=\"{4}\"",
+ Parameters["username"],
+ Parameters["realm"],
+ Parameters["nonce"],
+ Parameters["uri"],
+ Parameters["response"]);
+
+ var opaque = Parameters["opaque"];
+ if (opaque != null)
+ output.AppendFormat (", opaque=\"{0}\"", opaque);
+
+ var algo = Parameters["algorithm"];
+ if (algo != null)
+ output.AppendFormat (", algorithm={0}", algo);
+
+ var qop = Parameters["qop"];
+ if (qop != null)
+ output.AppendFormat (
+ ", qop={0}, cnonce=\"{1}\", nc={2}", qop, Parameters["cnonce"], Parameters["nc"]);
+
+ return output.ToString ();
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ public IIdentity ToIdentity ()
+ {
+ var schm = Scheme;
+ return schm == AuthenticationSchemes.Basic
+ ? new HttpBasicIdentity (Parameters["username"], Parameters["password"]) as IIdentity
+ : schm == AuthenticationSchemes.Digest
+ ? new HttpDigestIdentity (Parameters)
+ : null;
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/Net/AuthenticationSchemes.cs b/websocket-sharp/Net/AuthenticationSchemes.cs
index ab7721a1..c45b3777 100644
--- a/websocket-sharp/Net/AuthenticationSchemes.cs
+++ b/websocket-sharp/Net/AuthenticationSchemes.cs
@@ -1,66 +1,66 @@
-#region License
-/*
- * AuthenticationSchemes.cs
- *
- * This code is derived from AuthenticationSchemes.cs (System.Net) of Mono
- * (http://www.mono-project.com).
- *
- * The MIT License
- *
- * Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
- * Copyright (c) 2012-2016 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-#region Authors
-/*
- * Authors:
- * - Atsushi Enomoto
- */
-#endregion
-
-using System;
-
-namespace WebSocketSharp.Net
-{
- ///
- /// Specifies the scheme for authentication.
- ///
- public enum AuthenticationSchemes
- {
- ///
- /// No authentication is allowed.
- ///
- None,
- ///
- /// Specifies digest authentication.
- ///
- Digest = 1,
- ///
- /// Specifies basic authentication.
- ///
- Basic = 8,
- ///
- /// Specifies anonymous authentication.
- ///
- Anonymous = 0x8000
- }
-}
+#region License
+/*
+ * AuthenticationSchemes.cs
+ *
+ * This code is derived from AuthenticationSchemes.cs (System.Net) of Mono
+ * (http://www.mono-project.com).
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
+ * Copyright (c) 2012-2016 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+#region Authors
+/*
+ * Authors:
+ * - Atsushi Enomoto
+ */
+#endregion
+
+using System;
+
+namespace WebSocketSharp.Net
+{
+ ///
+ /// Specifies the scheme for authentication.
+ ///
+ public enum AuthenticationSchemes
+ {
+ ///
+ /// No authentication is allowed.
+ ///
+ None,
+ ///
+ /// Specifies digest authentication.
+ ///
+ Digest = 1,
+ ///
+ /// Specifies basic authentication.
+ ///
+ Basic = 8,
+ ///
+ /// Specifies anonymous authentication.
+ ///
+ Anonymous = 0x8000
+ }
+}
diff --git a/websocket-sharp/Net/Chunk.cs b/websocket-sharp/Net/Chunk.cs
index 7b6268b7..915a0e5e 100644
--- a/websocket-sharp/Net/Chunk.cs
+++ b/websocket-sharp/Net/Chunk.cs
@@ -1,91 +1,91 @@
-#region License
-/*
- * Chunk.cs
- *
- * This code is derived from ChunkStream.cs (System.Net) of Mono
- * (http://www.mono-project.com).
- *
- * The MIT License
- *
- * Copyright (c) 2003 Ximian, Inc (http://www.ximian.com)
- * Copyright (c) 2014-2015 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-#region Authors
-/*
- * Authors:
- * - Gonzalo Paniagua Javier
- */
-#endregion
-
-using System;
-
-namespace WebSocketSharp.Net
-{
- internal class Chunk
- {
- #region Private Fields
-
- private byte[] _data;
- private int _offset;
-
- #endregion
-
- #region Public Constructors
-
- public Chunk (byte[] data)
- {
- _data = data;
- }
-
- #endregion
-
- #region Public Properties
-
- public int ReadLeft {
- get {
- return _data.Length - _offset;
- }
- }
-
- #endregion
-
- #region Public Methods
-
- public int Read (byte[] buffer, int offset, int count)
- {
- var left = _data.Length - _offset;
- if (left == 0)
- return left;
-
- if (count > left)
- count = left;
-
- Buffer.BlockCopy (_data, _offset, buffer, offset, count);
- _offset += count;
-
- return count;
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * Chunk.cs
+ *
+ * This code is derived from ChunkStream.cs (System.Net) of Mono
+ * (http://www.mono-project.com).
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2003 Ximian, Inc (http://www.ximian.com)
+ * Copyright (c) 2014-2015 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+#region Authors
+/*
+ * Authors:
+ * - Gonzalo Paniagua Javier
+ */
+#endregion
+
+using System;
+
+namespace WebSocketSharp.Net
+{
+ internal class Chunk
+ {
+ #region Private Fields
+
+ private byte[] _data;
+ private int _offset;
+
+ #endregion
+
+ #region Public Constructors
+
+ public Chunk (byte[] data)
+ {
+ _data = data;
+ }
+
+ #endregion
+
+ #region Public Properties
+
+ public int ReadLeft {
+ get {
+ return _data.Length - _offset;
+ }
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ public int Read (byte[] buffer, int offset, int count)
+ {
+ var left = _data.Length - _offset;
+ if (left == 0)
+ return left;
+
+ if (count > left)
+ count = left;
+
+ Buffer.BlockCopy (_data, _offset, buffer, offset, count);
+ _offset += count;
+
+ return count;
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/Net/ChunkStream.cs b/websocket-sharp/Net/ChunkStream.cs
index a5271b57..5a1fc3d6 100644
--- a/websocket-sharp/Net/ChunkStream.cs
+++ b/websocket-sharp/Net/ChunkStream.cs
@@ -1,360 +1,360 @@
-#region License
-/*
- * ChunkStream.cs
- *
- * This code is derived from ChunkStream.cs (System.Net) of Mono
- * (http://www.mono-project.com).
- *
- * The MIT License
- *
- * Copyright (c) 2003 Ximian, Inc (http://www.ximian.com)
- * Copyright (c) 2012-2015 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-#region Authors
-/*
- * Authors:
- * - Gonzalo Paniagua Javier
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.IO;
-using System.Net;
-using System.Text;
-
-namespace WebSocketSharp.Net
-{
- internal class ChunkStream
- {
- #region Private Fields
-
- private int _chunkRead;
- private int _chunkSize;
- private List _chunks;
- private bool _gotIt;
- private WebHeaderCollection _headers;
- private StringBuilder _saved;
- private bool _sawCr;
- private InputChunkState _state;
- private int _trailerState;
-
- #endregion
-
- #region Public Constructors
-
- public ChunkStream (WebHeaderCollection headers)
- {
- _headers = headers;
- _chunkSize = -1;
- _chunks = new List ();
- _saved = new StringBuilder ();
- }
-
- public ChunkStream (byte[] buffer, int offset, int count, WebHeaderCollection headers)
- : this (headers)
- {
- Write (buffer, offset, count);
- }
-
- #endregion
-
- #region Internal Properties
-
- internal WebHeaderCollection Headers {
- get {
- return _headers;
- }
- }
-
- #endregion
-
- #region Public Properties
-
- public int ChunkLeft {
- get {
- return _chunkSize - _chunkRead;
- }
- }
-
- public bool WantMore {
- get {
- return _state != InputChunkState.End;
- }
- }
-
- #endregion
-
- #region Private Methods
-
- private int read (byte[] buffer, int offset, int count)
- {
- var nread = 0;
-
- var cnt = _chunks.Count;
- for (var i = 0; i < cnt; i++) {
- var chunk = _chunks[i];
- if (chunk == null)
- continue;
-
- if (chunk.ReadLeft == 0) {
- _chunks[i] = null;
- continue;
- }
-
- nread += chunk.Read (buffer, offset + nread, count - nread);
- if (nread == count)
- break;
- }
-
- return nread;
- }
-
- private static string removeChunkExtension (string value)
- {
- var idx = value.IndexOf (';');
- return idx > -1 ? value.Substring (0, idx) : value;
- }
-
- private InputChunkState seekCrLf (byte[] buffer, ref int offset, int length)
- {
- if (!_sawCr) {
- if (buffer[offset++] != 13)
- throwProtocolViolation ("CR is expected.");
-
- _sawCr = true;
- if (offset == length)
- return InputChunkState.DataEnded;
- }
-
- if (buffer[offset++] != 10)
- throwProtocolViolation ("LF is expected.");
-
- return InputChunkState.None;
- }
-
- private InputChunkState setChunkSize (byte[] buffer, ref int offset, int length)
- {
- byte b = 0;
- while (offset < length) {
- b = buffer[offset++];
- if (_sawCr) {
- if (b != 10)
- throwProtocolViolation ("LF is expected.");
-
- break;
- }
-
- if (b == 13) {
- _sawCr = true;
- continue;
- }
-
- if (b == 10)
- throwProtocolViolation ("LF is unexpected.");
-
- if (b == 32) // SP
- _gotIt = true;
-
- if (!_gotIt)
- _saved.Append ((char) b);
-
- if (_saved.Length > 20)
- throwProtocolViolation ("The chunk size is too long.");
- }
-
- if (!_sawCr || b != 10)
- return InputChunkState.None;
-
- _chunkRead = 0;
- try {
- _chunkSize = Int32.Parse (
- removeChunkExtension (_saved.ToString ()), NumberStyles.HexNumber);
- }
- catch {
- throwProtocolViolation ("The chunk size cannot be parsed.");
- }
-
- if (_chunkSize == 0) {
- _trailerState = 2;
- return InputChunkState.Trailer;
- }
-
- return InputChunkState.Data;
- }
-
- private InputChunkState setTrailer (byte[] buffer, ref int offset, int length)
- {
- // Check if no trailer.
- if (_trailerState == 2 && buffer[offset] == 13 && _saved.Length == 0) {
- offset++;
- if (offset < length && buffer[offset] == 10) {
- offset++;
- return InputChunkState.End;
- }
-
- offset--;
- }
-
- while (offset < length && _trailerState < 4) {
- var b = buffer[offset++];
- _saved.Append ((char) b);
- if (_saved.Length > 4196)
- throwProtocolViolation ("The trailer is too long.");
-
- if (_trailerState == 1 || _trailerState == 3) {
- if (b != 10)
- throwProtocolViolation ("LF is expected.");
-
- _trailerState++;
- continue;
- }
-
- if (b == 13) {
- _trailerState++;
- continue;
- }
-
- if (b == 10)
- throwProtocolViolation ("LF is unexpected.");
-
- _trailerState = 0;
- }
-
- if (_trailerState < 4)
- return InputChunkState.Trailer;
-
- _saved.Length -= 2;
- var reader = new StringReader (_saved.ToString ());
-
- string line;
- while ((line = reader.ReadLine ()) != null && line.Length > 0)
- _headers.Add (line);
-
- return InputChunkState.End;
- }
-
- private static void throwProtocolViolation (string message)
- {
- throw new WebException (message, null, WebExceptionStatus.ServerProtocolViolation, null);
- }
-
- private void write (byte[] buffer, ref int offset, int length)
- {
- if (_state == InputChunkState.End)
- throwProtocolViolation ("The chunks were ended.");
-
- if (_state == InputChunkState.None) {
- _state = setChunkSize (buffer, ref offset, length);
- if (_state == InputChunkState.None)
- return;
-
- _saved.Length = 0;
- _sawCr = false;
- _gotIt = false;
- }
-
- if (_state == InputChunkState.Data && offset < length) {
- _state = writeData (buffer, ref offset, length);
- if (_state == InputChunkState.Data)
- return;
- }
-
- if (_state == InputChunkState.DataEnded && offset < length) {
- _state = seekCrLf (buffer, ref offset, length);
- if (_state == InputChunkState.DataEnded)
- return;
-
- _sawCr = false;
- }
-
- if (_state == InputChunkState.Trailer && offset < length) {
- _state = setTrailer (buffer, ref offset, length);
- if (_state == InputChunkState.Trailer)
- return;
-
- _saved.Length = 0;
- }
-
- if (offset < length)
- write (buffer, ref offset, length);
- }
-
- private InputChunkState writeData (byte[] buffer, ref int offset, int length)
- {
- var cnt = length - offset;
- var left = _chunkSize - _chunkRead;
- if (cnt > left)
- cnt = left;
-
- var data = new byte[cnt];
- Buffer.BlockCopy (buffer, offset, data, 0, cnt);
- _chunks.Add (new Chunk (data));
-
- offset += cnt;
- _chunkRead += cnt;
-
- return _chunkRead == _chunkSize ? InputChunkState.DataEnded : InputChunkState.Data;
- }
-
- #endregion
-
- #region Internal Methods
-
- internal void ResetBuffer ()
- {
- _chunkRead = 0;
- _chunkSize = -1;
- _chunks.Clear ();
- }
-
- internal int WriteAndReadBack (byte[] buffer, int offset, int writeCount, int readCount)
- {
- Write (buffer, offset, writeCount);
- return Read (buffer, offset, readCount);
- }
-
- #endregion
-
- #region Public Methods
-
- public int Read (byte[] buffer, int offset, int count)
- {
- if (count <= 0)
- return 0;
-
- return read (buffer, offset, count);
- }
-
- public void Write (byte[] buffer, int offset, int count)
- {
- if (count <= 0)
- return;
-
- write (buffer, ref offset, offset + count);
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * ChunkStream.cs
+ *
+ * This code is derived from ChunkStream.cs (System.Net) of Mono
+ * (http://www.mono-project.com).
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2003 Ximian, Inc (http://www.ximian.com)
+ * Copyright (c) 2012-2015 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+#region Authors
+/*
+ * Authors:
+ * - Gonzalo Paniagua Javier
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Text;
+
+namespace WebSocketSharp.Net
+{
+ internal class ChunkStream
+ {
+ #region Private Fields
+
+ private int _chunkRead;
+ private int _chunkSize;
+ private List _chunks;
+ private bool _gotIt;
+ private WebHeaderCollection _headers;
+ private StringBuilder _saved;
+ private bool _sawCr;
+ private InputChunkState _state;
+ private int _trailerState;
+
+ #endregion
+
+ #region Public Constructors
+
+ public ChunkStream (WebHeaderCollection headers)
+ {
+ _headers = headers;
+ _chunkSize = -1;
+ _chunks = new List ();
+ _saved = new StringBuilder ();
+ }
+
+ public ChunkStream (byte[] buffer, int offset, int count, WebHeaderCollection headers)
+ : this (headers)
+ {
+ Write (buffer, offset, count);
+ }
+
+ #endregion
+
+ #region Internal Properties
+
+ internal WebHeaderCollection Headers {
+ get {
+ return _headers;
+ }
+ }
+
+ #endregion
+
+ #region Public Properties
+
+ public int ChunkLeft {
+ get {
+ return _chunkSize - _chunkRead;
+ }
+ }
+
+ public bool WantMore {
+ get {
+ return _state != InputChunkState.End;
+ }
+ }
+
+ #endregion
+
+ #region Private Methods
+
+ private int read (byte[] buffer, int offset, int count)
+ {
+ var nread = 0;
+
+ var cnt = _chunks.Count;
+ for (var i = 0; i < cnt; i++) {
+ var chunk = _chunks[i];
+ if (chunk == null)
+ continue;
+
+ if (chunk.ReadLeft == 0) {
+ _chunks[i] = null;
+ continue;
+ }
+
+ nread += chunk.Read (buffer, offset + nread, count - nread);
+ if (nread == count)
+ break;
+ }
+
+ return nread;
+ }
+
+ private static string removeChunkExtension (string value)
+ {
+ var idx = value.IndexOf (';');
+ return idx > -1 ? value.Substring (0, idx) : value;
+ }
+
+ private InputChunkState seekCrLf (byte[] buffer, ref int offset, int length)
+ {
+ if (!_sawCr) {
+ if (buffer[offset++] != 13)
+ throwProtocolViolation ("CR is expected.");
+
+ _sawCr = true;
+ if (offset == length)
+ return InputChunkState.DataEnded;
+ }
+
+ if (buffer[offset++] != 10)
+ throwProtocolViolation ("LF is expected.");
+
+ return InputChunkState.None;
+ }
+
+ private InputChunkState setChunkSize (byte[] buffer, ref int offset, int length)
+ {
+ byte b = 0;
+ while (offset < length) {
+ b = buffer[offset++];
+ if (_sawCr) {
+ if (b != 10)
+ throwProtocolViolation ("LF is expected.");
+
+ break;
+ }
+
+ if (b == 13) {
+ _sawCr = true;
+ continue;
+ }
+
+ if (b == 10)
+ throwProtocolViolation ("LF is unexpected.");
+
+ if (b == 32) // SP
+ _gotIt = true;
+
+ if (!_gotIt)
+ _saved.Append ((char) b);
+
+ if (_saved.Length > 20)
+ throwProtocolViolation ("The chunk size is too long.");
+ }
+
+ if (!_sawCr || b != 10)
+ return InputChunkState.None;
+
+ _chunkRead = 0;
+ try {
+ _chunkSize = Int32.Parse (
+ removeChunkExtension (_saved.ToString ()), NumberStyles.HexNumber);
+ }
+ catch {
+ throwProtocolViolation ("The chunk size cannot be parsed.");
+ }
+
+ if (_chunkSize == 0) {
+ _trailerState = 2;
+ return InputChunkState.Trailer;
+ }
+
+ return InputChunkState.Data;
+ }
+
+ private InputChunkState setTrailer (byte[] buffer, ref int offset, int length)
+ {
+ // Check if no trailer.
+ if (_trailerState == 2 && buffer[offset] == 13 && _saved.Length == 0) {
+ offset++;
+ if (offset < length && buffer[offset] == 10) {
+ offset++;
+ return InputChunkState.End;
+ }
+
+ offset--;
+ }
+
+ while (offset < length && _trailerState < 4) {
+ var b = buffer[offset++];
+ _saved.Append ((char) b);
+ if (_saved.Length > 4196)
+ throwProtocolViolation ("The trailer is too long.");
+
+ if (_trailerState == 1 || _trailerState == 3) {
+ if (b != 10)
+ throwProtocolViolation ("LF is expected.");
+
+ _trailerState++;
+ continue;
+ }
+
+ if (b == 13) {
+ _trailerState++;
+ continue;
+ }
+
+ if (b == 10)
+ throwProtocolViolation ("LF is unexpected.");
+
+ _trailerState = 0;
+ }
+
+ if (_trailerState < 4)
+ return InputChunkState.Trailer;
+
+ _saved.Length -= 2;
+ var reader = new StringReader (_saved.ToString ());
+
+ string line;
+ while ((line = reader.ReadLine ()) != null && line.Length > 0)
+ _headers.Add (line);
+
+ return InputChunkState.End;
+ }
+
+ private static void throwProtocolViolation (string message)
+ {
+ throw new WebException (message, null, WebExceptionStatus.ServerProtocolViolation, null);
+ }
+
+ private void write (byte[] buffer, ref int offset, int length)
+ {
+ if (_state == InputChunkState.End)
+ throwProtocolViolation ("The chunks were ended.");
+
+ if (_state == InputChunkState.None) {
+ _state = setChunkSize (buffer, ref offset, length);
+ if (_state == InputChunkState.None)
+ return;
+
+ _saved.Length = 0;
+ _sawCr = false;
+ _gotIt = false;
+ }
+
+ if (_state == InputChunkState.Data && offset < length) {
+ _state = writeData (buffer, ref offset, length);
+ if (_state == InputChunkState.Data)
+ return;
+ }
+
+ if (_state == InputChunkState.DataEnded && offset < length) {
+ _state = seekCrLf (buffer, ref offset, length);
+ if (_state == InputChunkState.DataEnded)
+ return;
+
+ _sawCr = false;
+ }
+
+ if (_state == InputChunkState.Trailer && offset < length) {
+ _state = setTrailer (buffer, ref offset, length);
+ if (_state == InputChunkState.Trailer)
+ return;
+
+ _saved.Length = 0;
+ }
+
+ if (offset < length)
+ write (buffer, ref offset, length);
+ }
+
+ private InputChunkState writeData (byte[] buffer, ref int offset, int length)
+ {
+ var cnt = length - offset;
+ var left = _chunkSize - _chunkRead;
+ if (cnt > left)
+ cnt = left;
+
+ var data = new byte[cnt];
+ Buffer.BlockCopy (buffer, offset, data, 0, cnt);
+ _chunks.Add (new Chunk (data));
+
+ offset += cnt;
+ _chunkRead += cnt;
+
+ return _chunkRead == _chunkSize ? InputChunkState.DataEnded : InputChunkState.Data;
+ }
+
+ #endregion
+
+ #region Internal Methods
+
+ internal void ResetBuffer ()
+ {
+ _chunkRead = 0;
+ _chunkSize = -1;
+ _chunks.Clear ();
+ }
+
+ internal int WriteAndReadBack (byte[] buffer, int offset, int writeCount, int readCount)
+ {
+ Write (buffer, offset, writeCount);
+ return Read (buffer, offset, readCount);
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ public int Read (byte[] buffer, int offset, int count)
+ {
+ if (count <= 0)
+ return 0;
+
+ return read (buffer, offset, count);
+ }
+
+ public void Write (byte[] buffer, int offset, int count)
+ {
+ if (count <= 0)
+ return;
+
+ write (buffer, ref offset, offset + count);
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/Net/ChunkedRequestStream.cs b/websocket-sharp/Net/ChunkedRequestStream.cs
index 0eb366a5..6b76a0dc 100644
--- a/websocket-sharp/Net/ChunkedRequestStream.cs
+++ b/websocket-sharp/Net/ChunkedRequestStream.cs
@@ -1,213 +1,213 @@
-#region License
-/*
- * ChunkedRequestStream.cs
- *
- * This code is derived from ChunkedInputStream.cs (System.Net) of Mono
- * (http://www.mono-project.com).
- *
- * The MIT License
- *
- * Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
- * Copyright (c) 2012-2015 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-#region Authors
-/*
- * Authors:
- * - Gonzalo Paniagua Javier
- */
-#endregion
-
-using System;
-using System.IO;
-
-namespace WebSocketSharp.Net
-{
- internal class ChunkedRequestStream : RequestStream
- {
- #region Private Fields
-
- private const int _bufferLength = 8192;
- private HttpListenerContext _context;
- private ChunkStream _decoder;
- private bool _disposed;
- private bool _noMoreData;
-
- #endregion
-
- #region Internal Constructors
-
- internal ChunkedRequestStream (
- Stream stream, byte[] buffer, int offset, int count, HttpListenerContext context)
- : base (stream, buffer, offset, count)
- {
- _context = context;
- _decoder = new ChunkStream ((WebHeaderCollection) context.Request.Headers);
- }
-
- #endregion
-
- #region Internal Properties
-
- internal ChunkStream Decoder {
- get {
- return _decoder;
- }
-
- set {
- _decoder = value;
- }
- }
-
- #endregion
-
- #region Private Methods
-
- private void onRead (IAsyncResult asyncResult)
- {
- var rstate = (ReadBufferState) asyncResult.AsyncState;
- var ares = rstate.AsyncResult;
- try {
- var nread = base.EndRead (asyncResult);
- _decoder.Write (ares.Buffer, ares.Offset, nread);
- nread = _decoder.Read (rstate.Buffer, rstate.Offset, rstate.Count);
- rstate.Offset += nread;
- rstate.Count -= nread;
- if (rstate.Count == 0 || !_decoder.WantMore || nread == 0) {
- _noMoreData = !_decoder.WantMore && nread == 0;
- ares.Count = rstate.InitialCount - rstate.Count;
- ares.Complete ();
-
- return;
- }
-
- ares.Offset = 0;
- ares.Count = Math.Min (_bufferLength, _decoder.ChunkLeft + 6);
- base.BeginRead (ares.Buffer, ares.Offset, ares.Count, onRead, rstate);
- }
- catch (Exception ex) {
- _context.ErrorMessage = ex.Message;
- _context.SendError ();
-
- ares.Complete (ex);
- }
- }
-
- #endregion
-
- #region Public Methods
-
- public override IAsyncResult BeginRead (
- byte[] buffer, int offset, int count, AsyncCallback callback, object state)
- {
- if (_disposed)
- throw new ObjectDisposedException (GetType ().ToString ());
-
- if (buffer == null)
- throw new ArgumentNullException ("buffer");
-
- if (offset < 0)
- throw new ArgumentOutOfRangeException ("offset", "A negative value.");
-
- if (count < 0)
- throw new ArgumentOutOfRangeException ("count", "A negative value.");
-
- var len = buffer.Length;
- if (offset + count > len)
- throw new ArgumentException (
- "The sum of 'offset' and 'count' is greater than 'buffer' length.");
-
- var ares = new HttpStreamAsyncResult (callback, state);
- if (_noMoreData) {
- ares.Complete ();
- return ares;
- }
-
- var nread = _decoder.Read (buffer, offset, count);
- offset += nread;
- count -= nread;
- if (count == 0) {
- // Got all we wanted, no need to bother the decoder yet.
- ares.Count = nread;
- ares.Complete ();
-
- return ares;
- }
-
- if (!_decoder.WantMore) {
- _noMoreData = nread == 0;
- ares.Count = nread;
- ares.Complete ();
-
- return ares;
- }
-
- ares.Buffer = new byte[_bufferLength];
- ares.Offset = 0;
- ares.Count = _bufferLength;
-
- var rstate = new ReadBufferState (buffer, offset, count, ares);
- rstate.InitialCount += nread;
- base.BeginRead (ares.Buffer, ares.Offset, ares.Count, onRead, rstate);
-
- return ares;
- }
-
- public override void Close ()
- {
- if (_disposed)
- return;
-
- _disposed = true;
- base.Close ();
- }
-
- public override int EndRead (IAsyncResult asyncResult)
- {
- if (_disposed)
- throw new ObjectDisposedException (GetType ().ToString ());
-
- if (asyncResult == null)
- throw new ArgumentNullException ("asyncResult");
-
- var ares = asyncResult as HttpStreamAsyncResult;
- if (ares == null)
- throw new ArgumentException ("A wrong IAsyncResult.", "asyncResult");
-
- if (!ares.IsCompleted)
- ares.AsyncWaitHandle.WaitOne ();
-
- if (ares.HasException)
- throw new HttpListenerException (400, "I/O operation aborted.");
-
- return ares.Count;
- }
-
- public override int Read (byte[] buffer, int offset, int count)
- {
- var ares = BeginRead (buffer, offset, count, null, null);
- return EndRead (ares);
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * ChunkedRequestStream.cs
+ *
+ * This code is derived from ChunkedInputStream.cs (System.Net) of Mono
+ * (http://www.mono-project.com).
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
+ * Copyright (c) 2012-2015 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+#region Authors
+/*
+ * Authors:
+ * - Gonzalo Paniagua Javier
+ */
+#endregion
+
+using System;
+using System.IO;
+
+namespace WebSocketSharp.Net
+{
+ internal class ChunkedRequestStream : RequestStream
+ {
+ #region Private Fields
+
+ private const int _bufferLength = 8192;
+ private HttpListenerContext _context;
+ private ChunkStream _decoder;
+ private bool _disposed;
+ private bool _noMoreData;
+
+ #endregion
+
+ #region Internal Constructors
+
+ internal ChunkedRequestStream (
+ Stream stream, byte[] buffer, int offset, int count, HttpListenerContext context)
+ : base (stream, buffer, offset, count)
+ {
+ _context = context;
+ _decoder = new ChunkStream ((WebHeaderCollection) context.Request.Headers);
+ }
+
+ #endregion
+
+ #region Internal Properties
+
+ internal ChunkStream Decoder {
+ get {
+ return _decoder;
+ }
+
+ set {
+ _decoder = value;
+ }
+ }
+
+ #endregion
+
+ #region Private Methods
+
+ private void onRead (IAsyncResult asyncResult)
+ {
+ var rstate = (ReadBufferState) asyncResult.AsyncState;
+ var ares = rstate.AsyncResult;
+ try {
+ var nread = base.EndRead (asyncResult);
+ _decoder.Write (ares.Buffer, ares.Offset, nread);
+ nread = _decoder.Read (rstate.Buffer, rstate.Offset, rstate.Count);
+ rstate.Offset += nread;
+ rstate.Count -= nread;
+ if (rstate.Count == 0 || !_decoder.WantMore || nread == 0) {
+ _noMoreData = !_decoder.WantMore && nread == 0;
+ ares.Count = rstate.InitialCount - rstate.Count;
+ ares.Complete ();
+
+ return;
+ }
+
+ ares.Offset = 0;
+ ares.Count = Math.Min (_bufferLength, _decoder.ChunkLeft + 6);
+ base.BeginRead (ares.Buffer, ares.Offset, ares.Count, onRead, rstate);
+ }
+ catch (Exception ex) {
+ _context.ErrorMessage = ex.Message;
+ _context.SendError ();
+
+ ares.Complete (ex);
+ }
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ public override IAsyncResult BeginRead (
+ byte[] buffer, int offset, int count, AsyncCallback callback, object state)
+ {
+ if (_disposed)
+ throw new ObjectDisposedException (GetType ().ToString ());
+
+ if (buffer == null)
+ throw new ArgumentNullException ("buffer");
+
+ if (offset < 0)
+ throw new ArgumentOutOfRangeException ("offset", "A negative value.");
+
+ if (count < 0)
+ throw new ArgumentOutOfRangeException ("count", "A negative value.");
+
+ var len = buffer.Length;
+ if (offset + count > len)
+ throw new ArgumentException (
+ "The sum of 'offset' and 'count' is greater than 'buffer' length.");
+
+ var ares = new HttpStreamAsyncResult (callback, state);
+ if (_noMoreData) {
+ ares.Complete ();
+ return ares;
+ }
+
+ var nread = _decoder.Read (buffer, offset, count);
+ offset += nread;
+ count -= nread;
+ if (count == 0) {
+ // Got all we wanted, no need to bother the decoder yet.
+ ares.Count = nread;
+ ares.Complete ();
+
+ return ares;
+ }
+
+ if (!_decoder.WantMore) {
+ _noMoreData = nread == 0;
+ ares.Count = nread;
+ ares.Complete ();
+
+ return ares;
+ }
+
+ ares.Buffer = new byte[_bufferLength];
+ ares.Offset = 0;
+ ares.Count = _bufferLength;
+
+ var rstate = new ReadBufferState (buffer, offset, count, ares);
+ rstate.InitialCount += nread;
+ base.BeginRead (ares.Buffer, ares.Offset, ares.Count, onRead, rstate);
+
+ return ares;
+ }
+
+ public override void Close ()
+ {
+ if (_disposed)
+ return;
+
+ _disposed = true;
+ base.Close ();
+ }
+
+ public override int EndRead (IAsyncResult asyncResult)
+ {
+ if (_disposed)
+ throw new ObjectDisposedException (GetType ().ToString ());
+
+ if (asyncResult == null)
+ throw new ArgumentNullException ("asyncResult");
+
+ var ares = asyncResult as HttpStreamAsyncResult;
+ if (ares == null)
+ throw new ArgumentException ("A wrong IAsyncResult.", "asyncResult");
+
+ if (!ares.IsCompleted)
+ ares.AsyncWaitHandle.WaitOne ();
+
+ if (ares.HasException)
+ throw new HttpListenerException (400, "I/O operation aborted.");
+
+ return ares.Count;
+ }
+
+ public override int Read (byte[] buffer, int offset, int count)
+ {
+ var ares = BeginRead (buffer, offset, count, null, null);
+ return EndRead (ares);
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/Net/ClientSslConfiguration.cs b/websocket-sharp/Net/ClientSslConfiguration.cs
index 7816e030..f96f8698 100644
--- a/websocket-sharp/Net/ClientSslConfiguration.cs
+++ b/websocket-sharp/Net/ClientSslConfiguration.cs
@@ -1,303 +1,303 @@
-#region License
-/*
- * ClientSslConfiguration.cs
- *
- * The MIT License
- *
- * Copyright (c) 2014 liryna
- * Copyright (c) 2014-2020 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-#region Authors
-/*
- * Authors:
- * - Liryna
- */
-#endregion
-
-using System;
-using System.Net.Security;
-using System.Security.Authentication;
-using System.Security.Cryptography.X509Certificates;
-
-namespace WebSocketSharp.Net
-{
- ///
- /// Stores the parameters for the used by clients.
- ///
- public class ClientSslConfiguration
- {
- #region Private Fields
-
- private bool _checkCertRevocation;
- private LocalCertificateSelectionCallback _clientCertSelectionCallback;
- private X509CertificateCollection _clientCerts;
- private SslProtocols _enabledSslProtocols;
- private RemoteCertificateValidationCallback _serverCertValidationCallback;
- private string _targetHost;
-
- #endregion
-
- #region Public Constructors
-
- ///
- /// Initializes a new instance of the
- /// class with the specified target host server name.
- ///
- ///
- /// A that specifies the target host server name.
- ///
- ///
- /// is .
- ///
- ///
- /// is an empty string.
- ///
- public ClientSslConfiguration (string targetHost)
- {
- if (targetHost == null)
- throw new ArgumentNullException ("targetHost");
-
- if (targetHost.Length == 0)
- throw new ArgumentException ("An empty string.", "targetHost");
-
- _targetHost = targetHost;
-
- _enabledSslProtocols = SslProtocols.None;
- }
-
- ///
- /// Initializes a new instance of the
- /// class that stores the parameters copied from the specified configuration.
- ///
- ///
- /// A from which to copy.
- ///
- ///
- /// is .
- ///
- public ClientSslConfiguration (ClientSslConfiguration configuration)
- {
- if (configuration == null)
- throw new ArgumentNullException ("configuration");
-
- _checkCertRevocation = configuration._checkCertRevocation;
- _clientCertSelectionCallback = configuration._clientCertSelectionCallback;
- _clientCerts = configuration._clientCerts;
- _enabledSslProtocols = configuration._enabledSslProtocols;
- _serverCertValidationCallback = configuration._serverCertValidationCallback;
- _targetHost = configuration._targetHost;
- }
-
- #endregion
-
- #region Public Properties
-
- ///
- /// Gets or sets a value indicating whether the certificate revocation
- /// list is checked during authentication.
- ///
- ///
- ///
- /// true if the certificate revocation list is checked during
- /// authentication; otherwise, false.
- ///
- ///
- /// The default value is false.
- ///
- ///
- public bool CheckCertificateRevocation {
- get {
- return _checkCertRevocation;
- }
-
- set {
- _checkCertRevocation = value;
- }
- }
-
- ///
- /// Gets or sets the collection of client certificates from which to select
- /// one to supply to the server.
- ///
- ///
- ///
- /// A or .
- ///
- ///
- /// The collection contains client certificates from which to select.
- ///
- ///
- /// The default value is .
- ///
- ///
- public X509CertificateCollection ClientCertificates {
- get {
- return _clientCerts;
- }
-
- set {
- _clientCerts = value;
- }
- }
-
- ///
- /// Gets or sets the callback used to select the certificate to supply to
- /// the server.
- ///
- ///
- /// No certificate is supplied if the callback returns .
- ///
- ///
- ///
- /// A delegate that
- /// invokes the method called for selecting the certificate.
- ///
- ///
- /// The default value is a delegate that invokes a method that only
- /// returns .
- ///
- ///
- public LocalCertificateSelectionCallback ClientCertificateSelectionCallback {
- get {
- if (_clientCertSelectionCallback == null)
- _clientCertSelectionCallback = defaultSelectClientCertificate;
-
- return _clientCertSelectionCallback;
- }
-
- set {
- _clientCertSelectionCallback = value;
- }
- }
-
- ///
- /// Gets or sets the protocols used for authentication.
- ///
- ///
- ///
- /// Any of the enum values.
- ///
- ///
- /// It represents the protocols used for authentication.
- ///
- ///
- /// The default value is .
- ///
- ///
- public SslProtocols EnabledSslProtocols {
- get {
- return _enabledSslProtocols;
- }
-
- set {
- _enabledSslProtocols = value;
- }
- }
-
- ///
- /// Gets or sets the callback used to validate the certificate supplied by
- /// the server.
- ///
- ///
- /// The certificate is valid if the callback returns true.
- ///
- ///
- ///
- /// A delegate that
- /// invokes the method called for validating the certificate.
- ///
- ///
- /// The default value is a delegate that invokes a method that only
- /// returns true.
- ///
- ///
- public RemoteCertificateValidationCallback ServerCertificateValidationCallback {
- get {
- if (_serverCertValidationCallback == null)
- _serverCertValidationCallback = defaultValidateServerCertificate;
-
- return _serverCertValidationCallback;
- }
-
- set {
- _serverCertValidationCallback = value;
- }
- }
-
- ///
- /// Gets or sets the target host server name.
- ///
- ///
- /// A that represents the name of the server that
- /// will share a secure connection with a client.
- ///
- ///
- /// The value specified for a set operation is .
- ///
- ///
- /// The value specified for a set operation is an empty string.
- ///
- public string TargetHost {
- get {
- return _targetHost;
- }
-
- set {
- if (value == null)
- throw new ArgumentNullException ("value");
-
- if (value.Length == 0)
- throw new ArgumentException ("An empty string.", "value");
-
- _targetHost = value;
- }
- }
-
- #endregion
-
- #region Private Methods
-
- private static X509Certificate defaultSelectClientCertificate (
- object sender,
- string targetHost,
- X509CertificateCollection clientCertificates,
- X509Certificate serverCertificate,
- string[] acceptableIssuers
- )
- {
- return null;
- }
-
- private static bool defaultValidateServerCertificate (
- object sender,
- X509Certificate certificate,
- X509Chain chain,
- SslPolicyErrors sslPolicyErrors
- )
- {
- return true;
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * ClientSslConfiguration.cs
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2014 liryna
+ * Copyright (c) 2014-2020 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+#region Authors
+/*
+ * Authors:
+ * - Liryna
+ */
+#endregion
+
+using System;
+using System.Net.Security;
+using System.Security.Authentication;
+using System.Security.Cryptography.X509Certificates;
+
+namespace WebSocketSharp.Net
+{
+ ///
+ /// Stores the parameters for the used by clients.
+ ///
+ public class ClientSslConfiguration
+ {
+ #region Private Fields
+
+ private bool _checkCertRevocation;
+ private LocalCertificateSelectionCallback _clientCertSelectionCallback;
+ private X509CertificateCollection _clientCerts;
+ private SslProtocols _enabledSslProtocols;
+ private RemoteCertificateValidationCallback _serverCertValidationCallback;
+ private string _targetHost;
+
+ #endregion
+
+ #region Public Constructors
+
+ ///
+ /// Initializes a new instance of the
+ /// class with the specified target host server name.
+ ///
+ ///
+ /// A that specifies the target host server name.
+ ///
+ ///
+ /// is .
+ ///
+ ///
+ /// is an empty string.
+ ///
+ public ClientSslConfiguration (string targetHost)
+ {
+ if (targetHost == null)
+ throw new ArgumentNullException ("targetHost");
+
+ if (targetHost.Length == 0)
+ throw new ArgumentException ("An empty string.", "targetHost");
+
+ _targetHost = targetHost;
+
+ _enabledSslProtocols = SslProtocols.None;
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// class that stores the parameters copied from the specified configuration.
+ ///
+ ///
+ /// A from which to copy.
+ ///
+ ///
+ /// is .
+ ///
+ public ClientSslConfiguration (ClientSslConfiguration configuration)
+ {
+ if (configuration == null)
+ throw new ArgumentNullException ("configuration");
+
+ _checkCertRevocation = configuration._checkCertRevocation;
+ _clientCertSelectionCallback = configuration._clientCertSelectionCallback;
+ _clientCerts = configuration._clientCerts;
+ _enabledSslProtocols = configuration._enabledSslProtocols;
+ _serverCertValidationCallback = configuration._serverCertValidationCallback;
+ _targetHost = configuration._targetHost;
+ }
+
+ #endregion
+
+ #region Public Properties
+
+ ///
+ /// Gets or sets a value indicating whether the certificate revocation
+ /// list is checked during authentication.
+ ///
+ ///
+ ///
+ /// true if the certificate revocation list is checked during
+ /// authentication; otherwise, false.
+ ///
+ ///
+ /// The default value is false.
+ ///
+ ///
+ public bool CheckCertificateRevocation {
+ get {
+ return _checkCertRevocation;
+ }
+
+ set {
+ _checkCertRevocation = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the collection of client certificates from which to select
+ /// one to supply to the server.
+ ///
+ ///
+ ///
+ /// A or .
+ ///
+ ///
+ /// The collection contains client certificates from which to select.
+ ///
+ ///
+ /// The default value is .
+ ///
+ ///
+ public X509CertificateCollection ClientCertificates {
+ get {
+ return _clientCerts;
+ }
+
+ set {
+ _clientCerts = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the callback used to select the certificate to supply to
+ /// the server.
+ ///
+ ///
+ /// No certificate is supplied if the callback returns .
+ ///
+ ///
+ ///
+ /// A delegate that
+ /// invokes the method called for selecting the certificate.
+ ///
+ ///
+ /// The default value is a delegate that invokes a method that only
+ /// returns .
+ ///
+ ///
+ public LocalCertificateSelectionCallback ClientCertificateSelectionCallback {
+ get {
+ if (_clientCertSelectionCallback == null)
+ _clientCertSelectionCallback = defaultSelectClientCertificate;
+
+ return _clientCertSelectionCallback;
+ }
+
+ set {
+ _clientCertSelectionCallback = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the protocols used for authentication.
+ ///
+ ///
+ ///
+ /// Any of the enum values.
+ ///
+ ///
+ /// It represents the protocols used for authentication.
+ ///
+ ///
+ /// The default value is .
+ ///
+ ///
+ public SslProtocols EnabledSslProtocols {
+ get {
+ return _enabledSslProtocols;
+ }
+
+ set {
+ _enabledSslProtocols = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the callback used to validate the certificate supplied by
+ /// the server.
+ ///
+ ///
+ /// The certificate is valid if the callback returns true.
+ ///
+ ///
+ ///
+ /// A delegate that
+ /// invokes the method called for validating the certificate.
+ ///
+ ///
+ /// The default value is a delegate that invokes a method that only
+ /// returns true.
+ ///
+ ///
+ public RemoteCertificateValidationCallback ServerCertificateValidationCallback {
+ get {
+ if (_serverCertValidationCallback == null)
+ _serverCertValidationCallback = defaultValidateServerCertificate;
+
+ return _serverCertValidationCallback;
+ }
+
+ set {
+ _serverCertValidationCallback = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the target host server name.
+ ///
+ ///
+ /// A that represents the name of the server that
+ /// will share a secure connection with a client.
+ ///
+ ///
+ /// The value specified for a set operation is .
+ ///
+ ///
+ /// The value specified for a set operation is an empty string.
+ ///
+ public string TargetHost {
+ get {
+ return _targetHost;
+ }
+
+ set {
+ if (value == null)
+ throw new ArgumentNullException ("value");
+
+ if (value.Length == 0)
+ throw new ArgumentException ("An empty string.", "value");
+
+ _targetHost = value;
+ }
+ }
+
+ #endregion
+
+ #region Private Methods
+
+ private static X509Certificate defaultSelectClientCertificate (
+ object sender,
+ string targetHost,
+ X509CertificateCollection clientCertificates,
+ X509Certificate serverCertificate,
+ string[] acceptableIssuers
+ )
+ {
+ return null;
+ }
+
+ private static bool defaultValidateServerCertificate (
+ object sender,
+ X509Certificate certificate,
+ X509Chain chain,
+ SslPolicyErrors sslPolicyErrors
+ )
+ {
+ return true;
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/Net/Cookie.cs b/websocket-sharp/Net/Cookie.cs
index 1c5a4bf2..dab4a6fc 100644
--- a/websocket-sharp/Net/Cookie.cs
+++ b/websocket-sharp/Net/Cookie.cs
@@ -1,1016 +1,1016 @@
-#region License
-/*
- * Cookie.cs
- *
- * This code is derived from Cookie.cs (System.Net) of Mono
- * (http://www.mono-project.com).
- *
- * The MIT License
- *
- * Copyright (c) 2004,2009 Novell, Inc. (http://www.novell.com)
- * Copyright (c) 2012-2019 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-#region Authors
-/*
- * Authors:
- * - Lawrence Pit
- * - Gonzalo Paniagua Javier
- * - Daniel Nauck
- * - Sebastien Pouliot
- */
-#endregion
-
-using System;
-using System.Globalization;
-using System.Text;
-
-namespace WebSocketSharp.Net
-{
- ///
- /// Provides a set of methods and properties used to manage an HTTP cookie.
- ///
- ///
- ///
- /// This class refers to the following specifications:
- ///
- ///
- /// -
- ///
- /// Netscape specification
- ///
- ///
- /// -
- ///
- /// RFC 2109
- ///
- ///
- /// -
- ///
- /// RFC 2965
- ///
- ///
- /// -
- ///
- /// RFC 6265
- ///
- ///
- ///
- ///
- /// This class cannot be inherited.
- ///
- ///
- [Serializable]
- public sealed class Cookie
- {
- #region Private Fields
-
- private string _comment;
- private Uri _commentUri;
- private bool _discard;
- private string _domain;
- private static readonly int[] _emptyPorts;
- private DateTime _expires;
- private bool _httpOnly;
- private string _name;
- private string _path;
- private string _port;
- private int[] _ports;
- private static readonly char[] _reservedCharsForValue;
- private string _sameSite;
- private bool _secure;
- private DateTime _timeStamp;
- private string _value;
- private int _version;
-
- #endregion
-
- #region Static Constructor
-
- static Cookie ()
- {
- _emptyPorts = new int[0];
- _reservedCharsForValue = new[] { ';', ',' };
- }
-
- #endregion
-
- #region Internal Constructors
-
- ///
- /// Initializes a new instance of the class.
- ///
- internal Cookie ()
- {
- init (String.Empty, String.Empty, String.Empty, String.Empty);
- }
-
- #endregion
-
- #region Public Constructors
-
- ///
- /// Initializes a new instance of the class with
- /// the specified name and value.
- ///
- ///
- ///
- /// A that specifies the name of the cookie.
- ///
- ///
- /// The name must be a token defined in
- ///
- /// RFC 2616.
- ///
- ///
- ///
- /// A that specifies the value of the cookie.
- ///
- ///
- /// is .
- ///
- ///
- ///
- /// is an empty string.
- ///
- ///
- /// - or -
- ///
- ///
- /// starts with a dollar sign.
- ///
- ///
- /// - or -
- ///
- ///
- /// contains an invalid character.
- ///
- ///
- /// - or -
- ///
- ///
- /// is a string not enclosed in double quotes
- /// that contains an invalid character.
- ///
- ///
- public Cookie (string name, string value)
- : this (name, value, String.Empty, String.Empty)
- {
- }
-
- ///
- /// Initializes a new instance of the class with
- /// the specified name, value, and path.
- ///
- ///
- ///
- /// A that specifies the name of the cookie.
- ///
- ///
- /// The name must be a token defined in
- ///
- /// RFC 2616.
- ///
- ///
- ///
- /// A that specifies the value of the cookie.
- ///
- ///
- /// A that specifies the value of the Path
- /// attribute of the cookie.
- ///
- ///
- /// is .
- ///
- ///
- ///
- /// is an empty string.
- ///
- ///
- /// - or -
- ///
- ///
- /// starts with a dollar sign.
- ///
- ///
- /// - or -
- ///
- ///
- /// contains an invalid character.
- ///
- ///
- /// - or -
- ///
- ///
- /// is a string not enclosed in double quotes
- /// that contains an invalid character.
- ///
- ///
- public Cookie (string name, string value, string path)
- : this (name, value, path, String.Empty)
- {
- }
-
- ///
- /// Initializes a new instance of the class with
- /// the specified name, value, path, and domain.
- ///
- ///
- ///
- /// A that specifies the name of the cookie.
- ///
- ///
- /// The name must be a token defined in
- ///
- /// RFC 2616.
- ///
- ///
- ///
- /// A that specifies the value of the cookie.
- ///
- ///
- /// A that specifies the value of the Path
- /// attribute of the cookie.
- ///
- ///
- /// A that specifies the value of the Domain
- /// attribute of the cookie.
- ///
- ///
- /// is .
- ///
- ///
- ///
- /// is an empty string.
- ///
- ///
- /// - or -
- ///
- ///
- /// starts with a dollar sign.
- ///
- ///
- /// - or -
- ///
- ///
- /// contains an invalid character.
- ///
- ///
- /// - or -
- ///
- ///
- /// is a string not enclosed in double quotes
- /// that contains an invalid character.
- ///
- ///
- public Cookie (string name, string value, string path, string domain)
- {
- if (name == null)
- throw new ArgumentNullException ("name");
-
- if (name.Length == 0)
- throw new ArgumentException ("An empty string.", "name");
-
- if (name[0] == '$') {
- var msg = "It starts with a dollar sign.";
- throw new ArgumentException (msg, "name");
- }
-
- if (!name.IsToken ()) {
- var msg = "It contains an invalid character.";
- throw new ArgumentException (msg, "name");
- }
-
- if (value == null)
- value = String.Empty;
-
- if (value.Contains (_reservedCharsForValue)) {
- if (!value.IsEnclosedIn ('"')) {
- var msg = "A string not enclosed in double quotes.";
- throw new ArgumentException (msg, "value");
- }
- }
-
- init (name, value, path ?? String.Empty, domain ?? String.Empty);
- }
-
- #endregion
-
- #region Internal Properties
-
- internal bool ExactDomain {
- get {
- return _domain.Length == 0 || _domain[0] != '.';
- }
- }
-
- internal int MaxAge {
- get {
- if (_expires == DateTime.MinValue)
- return 0;
-
- var expires = _expires.Kind != DateTimeKind.Local
- ? _expires.ToLocalTime ()
- : _expires;
-
- var span = expires - DateTime.Now;
- return span > TimeSpan.Zero
- ? (int) span.TotalSeconds
- : 0;
- }
-
- set {
- _expires = value > 0
- ? DateTime.Now.AddSeconds ((double) value)
- : DateTime.Now;
- }
- }
-
- internal int[] Ports {
- get {
- return _ports ?? _emptyPorts;
- }
- }
-
- internal string SameSite {
- get {
- return _sameSite;
- }
-
- set {
- _sameSite = value;
- }
- }
-
- #endregion
-
- #region Public Properties
-
- ///
- /// Gets the value of the Comment attribute of the cookie.
- ///
- ///
- ///
- /// A that represents the comment to document
- /// intended use of the cookie.
- ///
- ///
- /// if not present.
- ///
- ///
- /// The default value is .
- ///
- ///
- public string Comment {
- get {
- return _comment;
- }
-
- internal set {
- _comment = value;
- }
- }
-
- ///
- /// Gets the value of the CommentURL attribute of the cookie.
- ///
- ///
- ///
- /// A that represents the URI that provides
- /// the comment to document intended use of the cookie.
- ///
- ///
- /// if not present.
- ///
- ///
- /// The default value is .
- ///
- ///
- public Uri CommentUri {
- get {
- return _commentUri;
- }
-
- internal set {
- _commentUri = value;
- }
- }
-
- ///
- /// Gets a value indicating whether the client discards the cookie
- /// unconditionally when the client terminates.
- ///
- ///
- ///
- /// true if the client discards the cookie unconditionally
- /// when the client terminates; otherwise, false.
- ///
- ///
- /// The default value is false.
- ///
- ///
- public bool Discard {
- get {
- return _discard;
- }
-
- internal set {
- _discard = value;
- }
- }
-
- ///
- /// Gets or sets the value of the Domain attribute of the cookie.
- ///
- ///
- ///
- /// A that represents the domain name that
- /// the cookie is valid for.
- ///
- ///
- /// An empty string if this attribute is not needed.
- ///
- ///
- public string Domain {
- get {
- return _domain;
- }
-
- set {
- _domain = value ?? String.Empty;
- }
- }
-
- ///
- /// Gets or sets a value indicating whether the cookie has expired.
- ///
- ///
- ///
- /// true if the cookie has expired; otherwise, false.
- ///
- ///
- /// The default value is false.
- ///
- ///
- public bool Expired {
- get {
- return _expires != DateTime.MinValue && _expires <= DateTime.Now;
- }
-
- set {
- _expires = value ? DateTime.Now : DateTime.MinValue;
- }
- }
-
- ///
- /// Gets or sets the value of the Expires attribute of the cookie.
- ///
- ///
- ///
- /// A that represents the date and time that
- /// the cookie expires on.
- ///
- ///
- /// if this attribute is not needed.
- ///
- ///
- /// The default value is .
- ///
- ///
- public DateTime Expires {
- get {
- return _expires;
- }
-
- set {
- _expires = value;
- }
- }
-
- ///
- /// Gets or sets a value indicating whether non-HTTP APIs can access
- /// the cookie.
- ///
- ///
- ///
- /// true if non-HTTP APIs cannot access the cookie; otherwise,
- /// false.
- ///
- ///
- /// The default value is false.
- ///
- ///
- public bool HttpOnly {
- get {
- return _httpOnly;
- }
-
- set {
- _httpOnly = value;
- }
- }
-
- ///
- /// Gets or sets the name of the cookie.
- ///
- ///
- ///
- /// A that represents the name of the cookie.
- ///
- ///
- /// The name must be a token defined in
- ///
- /// RFC 2616.
- ///
- ///
- ///
- /// The value specified for a set operation is .
- ///
- ///
- ///
- /// The value specified for a set operation is an empty string.
- ///
- ///
- /// - or -
- ///
- ///
- /// The value specified for a set operation starts with a dollar sign.
- ///
- ///
- /// - or -
- ///
- ///
- /// The value specified for a set operation contains an invalid character.
- ///
- ///
- public string Name {
- get {
- return _name;
- }
-
- set {
- if (value == null)
- throw new ArgumentNullException ("value");
-
- if (value.Length == 0)
- throw new ArgumentException ("An empty string.", "value");
-
- if (value[0] == '$') {
- var msg = "It starts with a dollar sign.";
- throw new ArgumentException (msg, "value");
- }
-
- if (!value.IsToken ()) {
- var msg = "It contains an invalid character.";
- throw new ArgumentException (msg, "value");
- }
-
- _name = value;
- }
- }
-
- ///
- /// Gets or sets the value of the Path attribute of the cookie.
- ///
- ///
- /// A that represents the subset of URI on
- /// the origin server that the cookie applies to.
- ///
- public string Path {
- get {
- return _path;
- }
-
- set {
- _path = value ?? String.Empty;
- }
- }
-
- ///
- /// Gets the value of the Port attribute of the cookie.
- ///
- ///
- ///
- /// A that represents the list of TCP ports
- /// that the cookie applies to.
- ///
- ///
- /// if not present.
- ///
- ///
- /// The default value is .
- ///
- ///
- public string Port {
- get {
- return _port;
- }
-
- internal set {
- int[] ports;
- if (!tryCreatePorts (value, out ports))
- return;
-
- _port = value;
- _ports = ports;
- }
- }
-
- ///
- /// Gets or sets a value indicating whether the security level of
- /// the cookie is secure.
- ///
- ///
- /// When this property is true, the cookie may be included in
- /// the request only if the request is transmitted over HTTPS.
- ///
- ///
- ///
- /// true if the security level of the cookie is secure;
- /// otherwise, false.
- ///
- ///
- /// The default value is false.
- ///
- ///
- public bool Secure {
- get {
- return _secure;
- }
-
- set {
- _secure = value;
- }
- }
-
- ///
- /// Gets the time when the cookie was issued.
- ///
- ///
- /// A that represents the time when
- /// the cookie was issued.
- ///
- public DateTime TimeStamp {
- get {
- return _timeStamp;
- }
- }
-
- ///
- /// Gets or sets the value of the cookie.
- ///
- ///
- /// A that represents the value of the cookie.
- ///
- ///
- /// The value specified for a set operation is a string not enclosed in
- /// double quotes that contains an invalid character.
- ///
- public string Value {
- get {
- return _value;
- }
-
- set {
- if (value == null)
- value = String.Empty;
-
- if (value.Contains (_reservedCharsForValue)) {
- if (!value.IsEnclosedIn ('"')) {
- var msg = "A string not enclosed in double quotes.";
- throw new ArgumentException (msg, "value");
- }
- }
-
- _value = value;
- }
- }
-
- ///
- /// Gets the value of the Version attribute of the cookie.
- ///
- ///
- ///
- /// An that represents the version of HTTP state
- /// management that the cookie conforms to.
- ///
- ///
- /// 0 or 1. 0 if not present.
- ///
- ///
- /// The default value is 0.
- ///
- ///
- public int Version {
- get {
- return _version;
- }
-
- internal set {
- if (value < 0 || value > 1)
- return;
-
- _version = value;
- }
- }
-
- #endregion
-
- #region Private Methods
-
- private static int hash (int i, int j, int k, int l, int m)
- {
- return i
- ^ (j << 13 | j >> 19)
- ^ (k << 26 | k >> 6)
- ^ (l << 7 | l >> 25)
- ^ (m << 20 | m >> 12);
- }
-
- private void init (string name, string value, string path, string domain)
- {
- _name = name;
- _value = value;
- _path = path;
- _domain = domain;
-
- _expires = DateTime.MinValue;
- _timeStamp = DateTime.Now;
- }
-
- private string toResponseStringVersion0 ()
- {
- var buff = new StringBuilder (64);
-
- buff.AppendFormat ("{0}={1}", _name, _value);
-
- if (_expires != DateTime.MinValue) {
- buff.AppendFormat (
- "; Expires={0}",
- _expires.ToUniversalTime ().ToString (
- "ddd, dd'-'MMM'-'yyyy HH':'mm':'ss 'GMT'",
- CultureInfo.CreateSpecificCulture ("en-US")
- )
- );
- }
-
- if (!_path.IsNullOrEmpty ())
- buff.AppendFormat ("; Path={0}", _path);
-
- if (!_domain.IsNullOrEmpty ())
- buff.AppendFormat ("; Domain={0}", _domain);
-
- if (!_sameSite.IsNullOrEmpty ())
- buff.AppendFormat ("; SameSite={0}", _sameSite);
-
- if (_secure)
- buff.Append ("; Secure");
-
- if (_httpOnly)
- buff.Append ("; HttpOnly");
-
- return buff.ToString ();
- }
-
- private string toResponseStringVersion1 ()
- {
- var buff = new StringBuilder (64);
-
- buff.AppendFormat ("{0}={1}; Version={2}", _name, _value, _version);
-
- if (_expires != DateTime.MinValue)
- buff.AppendFormat ("; Max-Age={0}", MaxAge);
-
- if (!_path.IsNullOrEmpty ())
- buff.AppendFormat ("; Path={0}", _path);
-
- if (!_domain.IsNullOrEmpty ())
- buff.AppendFormat ("; Domain={0}", _domain);
-
- if (_port != null) {
- if (_port != "\"\"")
- buff.AppendFormat ("; Port={0}", _port);
- else
- buff.Append ("; Port");
- }
-
- if (_comment != null)
- buff.AppendFormat ("; Comment={0}", HttpUtility.UrlEncode (_comment));
-
- if (_commentUri != null) {
- var url = _commentUri.OriginalString;
- buff.AppendFormat (
- "; CommentURL={0}", !url.IsToken () ? url.Quote () : url
- );
- }
-
- if (_discard)
- buff.Append ("; Discard");
-
- if (_secure)
- buff.Append ("; Secure");
-
- return buff.ToString ();
- }
-
- private static bool tryCreatePorts (string value, out int[] result)
- {
- result = null;
-
- var arr = value.Trim ('"').Split (',');
- var len = arr.Length;
- var res = new int[len];
-
- for (var i = 0; i < len; i++) {
- var s = arr[i].Trim ();
- if (s.Length == 0) {
- res[i] = Int32.MinValue;
- continue;
- }
-
- if (!Int32.TryParse (s, out res[i]))
- return false;
- }
-
- result = res;
- return true;
- }
-
- #endregion
-
- #region Internal Methods
-
- internal bool EqualsWithoutValue (Cookie cookie)
- {
- var caseSensitive = StringComparison.InvariantCulture;
- var caseInsensitive = StringComparison.InvariantCultureIgnoreCase;
-
- return _name.Equals (cookie._name, caseInsensitive)
- && _path.Equals (cookie._path, caseSensitive)
- && _domain.Equals (cookie._domain, caseInsensitive)
- && _version == cookie._version;
- }
-
- internal bool EqualsWithoutValueAndVersion (Cookie cookie)
- {
- var caseSensitive = StringComparison.InvariantCulture;
- var caseInsensitive = StringComparison.InvariantCultureIgnoreCase;
-
- return _name.Equals (cookie._name, caseInsensitive)
- && _path.Equals (cookie._path, caseSensitive)
- && _domain.Equals (cookie._domain, caseInsensitive);
- }
-
- internal string ToRequestString (Uri uri)
- {
- if (_name.Length == 0)
- return String.Empty;
-
- if (_version == 0)
- return String.Format ("{0}={1}", _name, _value);
-
- var buff = new StringBuilder (64);
-
- buff.AppendFormat ("$Version={0}; {1}={2}", _version, _name, _value);
-
- if (!_path.IsNullOrEmpty ())
- buff.AppendFormat ("; $Path={0}", _path);
- else if (uri != null)
- buff.AppendFormat ("; $Path={0}", uri.GetAbsolutePath ());
- else
- buff.Append ("; $Path=/");
-
- if (!_domain.IsNullOrEmpty ()) {
- if (uri == null || uri.Host != _domain)
- buff.AppendFormat ("; $Domain={0}", _domain);
- }
-
- if (_port != null) {
- if (_port != "\"\"")
- buff.AppendFormat ("; $Port={0}", _port);
- else
- buff.Append ("; $Port");
- }
-
- return buff.ToString ();
- }
-
- ///
- /// Returns a string that represents the current cookie instance.
- ///
- ///
- /// A that is suitable for the Set-Cookie response
- /// header.
- ///
- internal string ToResponseString ()
- {
- return _name.Length == 0
- ? String.Empty
- : _version == 0
- ? toResponseStringVersion0 ()
- : toResponseStringVersion1 ();
- }
-
- internal static bool TryCreate (
- string name, string value, out Cookie result
- )
- {
- result = null;
-
- try {
- result = new Cookie (name, value);
- }
- catch {
- return false;
- }
-
- return true;
- }
-
- #endregion
-
- #region Public Methods
-
- ///
- /// Determines whether the current cookie instance is equal to
- /// the specified instance.
- ///
- ///
- ///
- /// An instance to compare with
- /// the current cookie instance.
- ///
- ///
- /// An reference to a instance.
- ///
- ///
- ///
- /// true if the current cookie instance is equal to
- /// ; otherwise, false.
- ///
- public override bool Equals (object comparand)
- {
- var cookie = comparand as Cookie;
- if (cookie == null)
- return false;
-
- var caseSensitive = StringComparison.InvariantCulture;
- var caseInsensitive = StringComparison.InvariantCultureIgnoreCase;
-
- return _name.Equals (cookie._name, caseInsensitive)
- && _value.Equals (cookie._value, caseSensitive)
- && _path.Equals (cookie._path, caseSensitive)
- && _domain.Equals (cookie._domain, caseInsensitive)
- && _version == cookie._version;
- }
-
- ///
- /// Gets a hash code for the current cookie instance.
- ///
- ///
- /// An that represents the hash code.
- ///
- public override int GetHashCode ()
- {
- return hash (
- StringComparer.InvariantCultureIgnoreCase.GetHashCode (_name),
- _value.GetHashCode (),
- _path.GetHashCode (),
- StringComparer.InvariantCultureIgnoreCase.GetHashCode (_domain),
- _version
- );
- }
-
- ///
- /// Returns a string that represents the current cookie instance.
- ///
- ///
- /// A that is suitable for the Cookie request header.
- ///
- public override string ToString ()
- {
- return ToRequestString (null);
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * Cookie.cs
+ *
+ * This code is derived from Cookie.cs (System.Net) of Mono
+ * (http://www.mono-project.com).
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2004,2009 Novell, Inc. (http://www.novell.com)
+ * Copyright (c) 2012-2019 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+#region Authors
+/*
+ * Authors:
+ * - Lawrence Pit
+ * - Gonzalo Paniagua Javier
+ * - Daniel Nauck
+ * - Sebastien Pouliot
+ */
+#endregion
+
+using System;
+using System.Globalization;
+using System.Text;
+
+namespace WebSocketSharp.Net
+{
+ ///
+ /// Provides a set of methods and properties used to manage an HTTP cookie.
+ ///
+ ///
+ ///
+ /// This class refers to the following specifications:
+ ///
+ ///
+ /// -
+ ///
+ /// Netscape specification
+ ///
+ ///
+ /// -
+ ///
+ /// RFC 2109
+ ///
+ ///
+ /// -
+ ///
+ /// RFC 2965
+ ///
+ ///
+ /// -
+ ///
+ /// RFC 6265
+ ///
+ ///
+ ///
+ ///
+ /// This class cannot be inherited.
+ ///
+ ///
+ [Serializable]
+ public sealed class Cookie
+ {
+ #region Private Fields
+
+ private string _comment;
+ private Uri _commentUri;
+ private bool _discard;
+ private string _domain;
+ private static readonly int[] _emptyPorts;
+ private DateTime _expires;
+ private bool _httpOnly;
+ private string _name;
+ private string _path;
+ private string _port;
+ private int[] _ports;
+ private static readonly char[] _reservedCharsForValue;
+ private string _sameSite;
+ private bool _secure;
+ private DateTime _timeStamp;
+ private string _value;
+ private int _version;
+
+ #endregion
+
+ #region Static Constructor
+
+ static Cookie ()
+ {
+ _emptyPorts = new int[0];
+ _reservedCharsForValue = new[] { ';', ',' };
+ }
+
+ #endregion
+
+ #region Internal Constructors
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ internal Cookie ()
+ {
+ init (String.Empty, String.Empty, String.Empty, String.Empty);
+ }
+
+ #endregion
+
+ #region Public Constructors
+
+ ///
+ /// Initializes a new instance of the class with
+ /// the specified name and value.
+ ///
+ ///
+ ///
+ /// A that specifies the name of the cookie.
+ ///
+ ///
+ /// The name must be a token defined in
+ ///
+ /// RFC 2616.
+ ///
+ ///
+ ///
+ /// A that specifies the value of the cookie.
+ ///
+ ///
+ /// is .
+ ///
+ ///
+ ///
+ /// is an empty string.
+ ///
+ ///
+ /// - or -
+ ///
+ ///
+ /// starts with a dollar sign.
+ ///
+ ///
+ /// - or -
+ ///
+ ///
+ /// contains an invalid character.
+ ///
+ ///
+ /// - or -
+ ///
+ ///
+ /// is a string not enclosed in double quotes
+ /// that contains an invalid character.
+ ///
+ ///
+ public Cookie (string name, string value)
+ : this (name, value, String.Empty, String.Empty)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class with
+ /// the specified name, value, and path.
+ ///
+ ///
+ ///
+ /// A that specifies the name of the cookie.
+ ///
+ ///
+ /// The name must be a token defined in
+ ///
+ /// RFC 2616.
+ ///
+ ///
+ ///
+ /// A that specifies the value of the cookie.
+ ///
+ ///
+ /// A that specifies the value of the Path
+ /// attribute of the cookie.
+ ///
+ ///
+ /// is .
+ ///
+ ///
+ ///
+ /// is an empty string.
+ ///
+ ///
+ /// - or -
+ ///
+ ///
+ /// starts with a dollar sign.
+ ///
+ ///
+ /// - or -
+ ///
+ ///
+ /// contains an invalid character.
+ ///
+ ///
+ /// - or -
+ ///
+ ///
+ /// is a string not enclosed in double quotes
+ /// that contains an invalid character.
+ ///
+ ///
+ public Cookie (string name, string value, string path)
+ : this (name, value, path, String.Empty)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class with
+ /// the specified name, value, path, and domain.
+ ///
+ ///
+ ///
+ /// A that specifies the name of the cookie.
+ ///
+ ///
+ /// The name must be a token defined in
+ ///
+ /// RFC 2616.
+ ///
+ ///
+ ///
+ /// A that specifies the value of the cookie.
+ ///
+ ///
+ /// A that specifies the value of the Path
+ /// attribute of the cookie.
+ ///
+ ///
+ /// A that specifies the value of the Domain
+ /// attribute of the cookie.
+ ///
+ ///
+ /// is .
+ ///
+ ///
+ ///
+ /// is an empty string.
+ ///
+ ///
+ /// - or -
+ ///
+ ///
+ /// starts with a dollar sign.
+ ///
+ ///
+ /// - or -
+ ///
+ ///
+ /// contains an invalid character.
+ ///
+ ///
+ /// - or -
+ ///
+ ///
+ /// is a string not enclosed in double quotes
+ /// that contains an invalid character.
+ ///
+ ///
+ public Cookie (string name, string value, string path, string domain)
+ {
+ if (name == null)
+ throw new ArgumentNullException ("name");
+
+ if (name.Length == 0)
+ throw new ArgumentException ("An empty string.", "name");
+
+ if (name[0] == '$') {
+ var msg = "It starts with a dollar sign.";
+ throw new ArgumentException (msg, "name");
+ }
+
+ if (!name.IsToken ()) {
+ var msg = "It contains an invalid character.";
+ throw new ArgumentException (msg, "name");
+ }
+
+ if (value == null)
+ value = String.Empty;
+
+ if (value.Contains (_reservedCharsForValue)) {
+ if (!value.IsEnclosedIn ('"')) {
+ var msg = "A string not enclosed in double quotes.";
+ throw new ArgumentException (msg, "value");
+ }
+ }
+
+ init (name, value, path ?? String.Empty, domain ?? String.Empty);
+ }
+
+ #endregion
+
+ #region Internal Properties
+
+ internal bool ExactDomain {
+ get {
+ return _domain.Length == 0 || _domain[0] != '.';
+ }
+ }
+
+ internal int MaxAge {
+ get {
+ if (_expires == DateTime.MinValue)
+ return 0;
+
+ var expires = _expires.Kind != DateTimeKind.Local
+ ? _expires.ToLocalTime ()
+ : _expires;
+
+ var span = expires - DateTime.Now;
+ return span > TimeSpan.Zero
+ ? (int) span.TotalSeconds
+ : 0;
+ }
+
+ set {
+ _expires = value > 0
+ ? DateTime.Now.AddSeconds ((double) value)
+ : DateTime.Now;
+ }
+ }
+
+ internal int[] Ports {
+ get {
+ return _ports ?? _emptyPorts;
+ }
+ }
+
+ internal string SameSite {
+ get {
+ return _sameSite;
+ }
+
+ set {
+ _sameSite = value;
+ }
+ }
+
+ #endregion
+
+ #region Public Properties
+
+ ///
+ /// Gets the value of the Comment attribute of the cookie.
+ ///
+ ///
+ ///
+ /// A that represents the comment to document
+ /// intended use of the cookie.
+ ///
+ ///
+ /// if not present.
+ ///
+ ///
+ /// The default value is .
+ ///
+ ///
+ public string Comment {
+ get {
+ return _comment;
+ }
+
+ internal set {
+ _comment = value;
+ }
+ }
+
+ ///
+ /// Gets the value of the CommentURL attribute of the cookie.
+ ///
+ ///
+ ///
+ /// A that represents the URI that provides
+ /// the comment to document intended use of the cookie.
+ ///
+ ///
+ /// if not present.
+ ///
+ ///
+ /// The default value is .
+ ///
+ ///
+ public Uri CommentUri {
+ get {
+ return _commentUri;
+ }
+
+ internal set {
+ _commentUri = value;
+ }
+ }
+
+ ///
+ /// Gets a value indicating whether the client discards the cookie
+ /// unconditionally when the client terminates.
+ ///
+ ///
+ ///
+ /// true if the client discards the cookie unconditionally
+ /// when the client terminates; otherwise, false.
+ ///
+ ///
+ /// The default value is false.
+ ///
+ ///
+ public bool Discard {
+ get {
+ return _discard;
+ }
+
+ internal set {
+ _discard = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the value of the Domain attribute of the cookie.
+ ///
+ ///
+ ///
+ /// A that represents the domain name that
+ /// the cookie is valid for.
+ ///
+ ///
+ /// An empty string if this attribute is not needed.
+ ///
+ ///
+ public string Domain {
+ get {
+ return _domain;
+ }
+
+ set {
+ _domain = value ?? String.Empty;
+ }
+ }
+
+ ///
+ /// Gets or sets a value indicating whether the cookie has expired.
+ ///
+ ///
+ ///
+ /// true if the cookie has expired; otherwise, false.
+ ///
+ ///
+ /// The default value is false.
+ ///
+ ///
+ public bool Expired {
+ get {
+ return _expires != DateTime.MinValue && _expires <= DateTime.Now;
+ }
+
+ set {
+ _expires = value ? DateTime.Now : DateTime.MinValue;
+ }
+ }
+
+ ///
+ /// Gets or sets the value of the Expires attribute of the cookie.
+ ///
+ ///
+ ///
+ /// A that represents the date and time that
+ /// the cookie expires on.
+ ///
+ ///
+ /// if this attribute is not needed.
+ ///
+ ///
+ /// The default value is .
+ ///
+ ///
+ public DateTime Expires {
+ get {
+ return _expires;
+ }
+
+ set {
+ _expires = value;
+ }
+ }
+
+ ///
+ /// Gets or sets a value indicating whether non-HTTP APIs can access
+ /// the cookie.
+ ///
+ ///
+ ///
+ /// true if non-HTTP APIs cannot access the cookie; otherwise,
+ /// false.
+ ///
+ ///
+ /// The default value is false.
+ ///
+ ///
+ public bool HttpOnly {
+ get {
+ return _httpOnly;
+ }
+
+ set {
+ _httpOnly = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the name of the cookie.
+ ///
+ ///
+ ///
+ /// A that represents the name of the cookie.
+ ///
+ ///
+ /// The name must be a token defined in
+ ///
+ /// RFC 2616.
+ ///
+ ///
+ ///
+ /// The value specified for a set operation is .
+ ///
+ ///
+ ///
+ /// The value specified for a set operation is an empty string.
+ ///
+ ///
+ /// - or -
+ ///
+ ///
+ /// The value specified for a set operation starts with a dollar sign.
+ ///
+ ///
+ /// - or -
+ ///
+ ///
+ /// The value specified for a set operation contains an invalid character.
+ ///
+ ///
+ public string Name {
+ get {
+ return _name;
+ }
+
+ set {
+ if (value == null)
+ throw new ArgumentNullException ("value");
+
+ if (value.Length == 0)
+ throw new ArgumentException ("An empty string.", "value");
+
+ if (value[0] == '$') {
+ var msg = "It starts with a dollar sign.";
+ throw new ArgumentException (msg, "value");
+ }
+
+ if (!value.IsToken ()) {
+ var msg = "It contains an invalid character.";
+ throw new ArgumentException (msg, "value");
+ }
+
+ _name = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the value of the Path attribute of the cookie.
+ ///
+ ///
+ /// A that represents the subset of URI on
+ /// the origin server that the cookie applies to.
+ ///
+ public string Path {
+ get {
+ return _path;
+ }
+
+ set {
+ _path = value ?? String.Empty;
+ }
+ }
+
+ ///
+ /// Gets the value of the Port attribute of the cookie.
+ ///
+ ///
+ ///
+ /// A that represents the list of TCP ports
+ /// that the cookie applies to.
+ ///
+ ///
+ /// if not present.
+ ///
+ ///
+ /// The default value is .
+ ///
+ ///
+ public string Port {
+ get {
+ return _port;
+ }
+
+ internal set {
+ int[] ports;
+ if (!tryCreatePorts (value, out ports))
+ return;
+
+ _port = value;
+ _ports = ports;
+ }
+ }
+
+ ///
+ /// Gets or sets a value indicating whether the security level of
+ /// the cookie is secure.
+ ///
+ ///
+ /// When this property is true, the cookie may be included in
+ /// the request only if the request is transmitted over HTTPS.
+ ///
+ ///
+ ///
+ /// true if the security level of the cookie is secure;
+ /// otherwise, false.
+ ///
+ ///
+ /// The default value is false.
+ ///
+ ///
+ public bool Secure {
+ get {
+ return _secure;
+ }
+
+ set {
+ _secure = value;
+ }
+ }
+
+ ///
+ /// Gets the time when the cookie was issued.
+ ///
+ ///
+ /// A that represents the time when
+ /// the cookie was issued.
+ ///
+ public DateTime TimeStamp {
+ get {
+ return _timeStamp;
+ }
+ }
+
+ ///
+ /// Gets or sets the value of the cookie.
+ ///
+ ///
+ /// A that represents the value of the cookie.
+ ///
+ ///
+ /// The value specified for a set operation is a string not enclosed in
+ /// double quotes that contains an invalid character.
+ ///
+ public string Value {
+ get {
+ return _value;
+ }
+
+ set {
+ if (value == null)
+ value = String.Empty;
+
+ if (value.Contains (_reservedCharsForValue)) {
+ if (!value.IsEnclosedIn ('"')) {
+ var msg = "A string not enclosed in double quotes.";
+ throw new ArgumentException (msg, "value");
+ }
+ }
+
+ _value = value;
+ }
+ }
+
+ ///
+ /// Gets the value of the Version attribute of the cookie.
+ ///
+ ///
+ ///
+ /// An that represents the version of HTTP state
+ /// management that the cookie conforms to.
+ ///
+ ///
+ /// 0 or 1. 0 if not present.
+ ///
+ ///
+ /// The default value is 0.
+ ///
+ ///
+ public int Version {
+ get {
+ return _version;
+ }
+
+ internal set {
+ if (value < 0 || value > 1)
+ return;
+
+ _version = value;
+ }
+ }
+
+ #endregion
+
+ #region Private Methods
+
+ private static int hash (int i, int j, int k, int l, int m)
+ {
+ return i
+ ^ (j << 13 | j >> 19)
+ ^ (k << 26 | k >> 6)
+ ^ (l << 7 | l >> 25)
+ ^ (m << 20 | m >> 12);
+ }
+
+ private void init (string name, string value, string path, string domain)
+ {
+ _name = name;
+ _value = value;
+ _path = path;
+ _domain = domain;
+
+ _expires = DateTime.MinValue;
+ _timeStamp = DateTime.Now;
+ }
+
+ private string toResponseStringVersion0 ()
+ {
+ var buff = new StringBuilder (64);
+
+ buff.AppendFormat ("{0}={1}", _name, _value);
+
+ if (_expires != DateTime.MinValue) {
+ buff.AppendFormat (
+ "; Expires={0}",
+ _expires.ToUniversalTime ().ToString (
+ "ddd, dd'-'MMM'-'yyyy HH':'mm':'ss 'GMT'",
+ CultureInfo.CreateSpecificCulture ("en-US")
+ )
+ );
+ }
+
+ if (!_path.IsNullOrEmpty ())
+ buff.AppendFormat ("; Path={0}", _path);
+
+ if (!_domain.IsNullOrEmpty ())
+ buff.AppendFormat ("; Domain={0}", _domain);
+
+ if (!_sameSite.IsNullOrEmpty ())
+ buff.AppendFormat ("; SameSite={0}", _sameSite);
+
+ if (_secure)
+ buff.Append ("; Secure");
+
+ if (_httpOnly)
+ buff.Append ("; HttpOnly");
+
+ return buff.ToString ();
+ }
+
+ private string toResponseStringVersion1 ()
+ {
+ var buff = new StringBuilder (64);
+
+ buff.AppendFormat ("{0}={1}; Version={2}", _name, _value, _version);
+
+ if (_expires != DateTime.MinValue)
+ buff.AppendFormat ("; Max-Age={0}", MaxAge);
+
+ if (!_path.IsNullOrEmpty ())
+ buff.AppendFormat ("; Path={0}", _path);
+
+ if (!_domain.IsNullOrEmpty ())
+ buff.AppendFormat ("; Domain={0}", _domain);
+
+ if (_port != null) {
+ if (_port != "\"\"")
+ buff.AppendFormat ("; Port={0}", _port);
+ else
+ buff.Append ("; Port");
+ }
+
+ if (_comment != null)
+ buff.AppendFormat ("; Comment={0}", HttpUtility.UrlEncode (_comment));
+
+ if (_commentUri != null) {
+ var url = _commentUri.OriginalString;
+ buff.AppendFormat (
+ "; CommentURL={0}", !url.IsToken () ? url.Quote () : url
+ );
+ }
+
+ if (_discard)
+ buff.Append ("; Discard");
+
+ if (_secure)
+ buff.Append ("; Secure");
+
+ return buff.ToString ();
+ }
+
+ private static bool tryCreatePorts (string value, out int[] result)
+ {
+ result = null;
+
+ var arr = value.Trim ('"').Split (',');
+ var len = arr.Length;
+ var res = new int[len];
+
+ for (var i = 0; i < len; i++) {
+ var s = arr[i].Trim ();
+ if (s.Length == 0) {
+ res[i] = Int32.MinValue;
+ continue;
+ }
+
+ if (!Int32.TryParse (s, out res[i]))
+ return false;
+ }
+
+ result = res;
+ return true;
+ }
+
+ #endregion
+
+ #region Internal Methods
+
+ internal bool EqualsWithoutValue (Cookie cookie)
+ {
+ var caseSensitive = StringComparison.InvariantCulture;
+ var caseInsensitive = StringComparison.InvariantCultureIgnoreCase;
+
+ return _name.Equals (cookie._name, caseInsensitive)
+ && _path.Equals (cookie._path, caseSensitive)
+ && _domain.Equals (cookie._domain, caseInsensitive)
+ && _version == cookie._version;
+ }
+
+ internal bool EqualsWithoutValueAndVersion (Cookie cookie)
+ {
+ var caseSensitive = StringComparison.InvariantCulture;
+ var caseInsensitive = StringComparison.InvariantCultureIgnoreCase;
+
+ return _name.Equals (cookie._name, caseInsensitive)
+ && _path.Equals (cookie._path, caseSensitive)
+ && _domain.Equals (cookie._domain, caseInsensitive);
+ }
+
+ internal string ToRequestString (Uri uri)
+ {
+ if (_name.Length == 0)
+ return String.Empty;
+
+ if (_version == 0)
+ return String.Format ("{0}={1}", _name, _value);
+
+ var buff = new StringBuilder (64);
+
+ buff.AppendFormat ("$Version={0}; {1}={2}", _version, _name, _value);
+
+ if (!_path.IsNullOrEmpty ())
+ buff.AppendFormat ("; $Path={0}", _path);
+ else if (uri != null)
+ buff.AppendFormat ("; $Path={0}", uri.GetAbsolutePath ());
+ else
+ buff.Append ("; $Path=/");
+
+ if (!_domain.IsNullOrEmpty ()) {
+ if (uri == null || uri.Host != _domain)
+ buff.AppendFormat ("; $Domain={0}", _domain);
+ }
+
+ if (_port != null) {
+ if (_port != "\"\"")
+ buff.AppendFormat ("; $Port={0}", _port);
+ else
+ buff.Append ("; $Port");
+ }
+
+ return buff.ToString ();
+ }
+
+ ///
+ /// Returns a string that represents the current cookie instance.
+ ///
+ ///
+ /// A that is suitable for the Set-Cookie response
+ /// header.
+ ///
+ internal string ToResponseString ()
+ {
+ return _name.Length == 0
+ ? String.Empty
+ : _version == 0
+ ? toResponseStringVersion0 ()
+ : toResponseStringVersion1 ();
+ }
+
+ internal static bool TryCreate (
+ string name, string value, out Cookie result
+ )
+ {
+ result = null;
+
+ try {
+ result = new Cookie (name, value);
+ }
+ catch {
+ return false;
+ }
+
+ return true;
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ ///
+ /// Determines whether the current cookie instance is equal to
+ /// the specified instance.
+ ///
+ ///
+ ///
+ /// An instance to compare with
+ /// the current cookie instance.
+ ///
+ ///
+ /// An reference to a instance.
+ ///
+ ///
+ ///
+ /// true if the current cookie instance is equal to
+ /// ; otherwise, false.
+ ///
+ public override bool Equals (object comparand)
+ {
+ var cookie = comparand as Cookie;
+ if (cookie == null)
+ return false;
+
+ var caseSensitive = StringComparison.InvariantCulture;
+ var caseInsensitive = StringComparison.InvariantCultureIgnoreCase;
+
+ return _name.Equals (cookie._name, caseInsensitive)
+ && _value.Equals (cookie._value, caseSensitive)
+ && _path.Equals (cookie._path, caseSensitive)
+ && _domain.Equals (cookie._domain, caseInsensitive)
+ && _version == cookie._version;
+ }
+
+ ///
+ /// Gets a hash code for the current cookie instance.
+ ///
+ ///
+ /// An that represents the hash code.
+ ///
+ public override int GetHashCode ()
+ {
+ return hash (
+ StringComparer.InvariantCultureIgnoreCase.GetHashCode (_name),
+ _value.GetHashCode (),
+ _path.GetHashCode (),
+ StringComparer.InvariantCultureIgnoreCase.GetHashCode (_domain),
+ _version
+ );
+ }
+
+ ///
+ /// Returns a string that represents the current cookie instance.
+ ///
+ ///
+ /// A that is suitable for the Cookie request header.
+ ///
+ public override string ToString ()
+ {
+ return ToRequestString (null);
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/Net/CookieCollection.cs b/websocket-sharp/Net/CookieCollection.cs
index 8c0322bd..f572d9a6 100644
--- a/websocket-sharp/Net/CookieCollection.cs
+++ b/websocket-sharp/Net/CookieCollection.cs
@@ -1,821 +1,821 @@
-#region License
-/*
- * CookieCollection.cs
- *
- * This code is derived from CookieCollection.cs (System.Net) of Mono
- * (http://www.mono-project.com).
- *
- * The MIT License
- *
- * Copyright (c) 2004,2009 Novell, Inc. (http://www.novell.com)
- * Copyright (c) 2012-2019 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-#region Authors
-/*
- * Authors:
- * - Lawrence Pit
- * - Gonzalo Paniagua Javier
- * - Sebastien Pouliot
- */
-#endregion
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Text;
-
-namespace WebSocketSharp.Net
-{
- ///
- /// Provides a collection of instances of the class.
- ///
- [Serializable]
- public class CookieCollection : ICollection
- {
- #region Private Fields
-
- private List _list;
- private bool _readOnly;
- private object _sync;
-
- #endregion
-
- #region Public Constructors
-
- ///
- /// Initializes a new instance of the class.
- ///
- public CookieCollection ()
- {
- _list = new List ();
- _sync = ((ICollection) _list).SyncRoot;
- }
-
- #endregion
-
- #region Internal Properties
-
- internal IList List {
- get {
- return _list;
- }
- }
-
- internal IEnumerable Sorted {
- get {
- var list = new List (_list);
- if (list.Count > 1)
- list.Sort (compareForSorted);
-
- return list;
- }
- }
-
- #endregion
-
- #region Public Properties
-
- ///
- /// Gets the number of cookies in the collection.
- ///
- ///
- /// An that represents the number of cookies in
- /// the collection.
- ///
- public int Count {
- get {
- return _list.Count;
- }
- }
-
- ///
- /// Gets a value indicating whether the collection is read-only.
- ///
- ///
- ///
- /// true if the collection is read-only; otherwise, false.
- ///
- ///
- /// The default value is false.
- ///
- ///
- public bool IsReadOnly {
- get {
- return _readOnly;
- }
-
- internal set {
- _readOnly = value;
- }
- }
-
- ///
- /// Gets a value indicating whether the access to the collection is
- /// thread safe.
- ///
- ///
- ///
- /// true if the access to the collection is thread safe;
- /// otherwise, false.
- ///
- ///
- /// The default value is false.
- ///
- ///
- public bool IsSynchronized {
- get {
- return false;
- }
- }
-
- ///
- /// Gets the cookie at the specified index from the collection.
- ///
- ///
- /// A at the specified index in the collection.
- ///
- ///
- /// An that specifies the zero-based index of the cookie
- /// to find.
- ///
- ///
- /// is out of allowable range for the collection.
- ///
- public Cookie this[int index] {
- get {
- if (index < 0 || index >= _list.Count)
- throw new ArgumentOutOfRangeException ("index");
-
- return _list[index];
- }
- }
-
- ///
- /// Gets the cookie with the specified name from the collection.
- ///
- ///
- ///
- /// A with the specified name in the collection.
- ///
- ///
- /// if not found.
- ///
- ///
- ///
- /// A that specifies the name of the cookie to find.
- ///
- ///
- /// is .
- ///
- public Cookie this[string name] {
- get {
- if (name == null)
- throw new ArgumentNullException ("name");
-
- var caseInsensitive = StringComparison.InvariantCultureIgnoreCase;
-
- foreach (var cookie in Sorted) {
- if (cookie.Name.Equals (name, caseInsensitive))
- return cookie;
- }
-
- return null;
- }
- }
-
- ///
- /// Gets an object used to synchronize access to the collection.
- ///
- ///
- /// An used to synchronize access to the collection.
- ///
- public object SyncRoot {
- get {
- return _sync;
- }
- }
-
- #endregion
-
- #region Private Methods
-
- private void add (Cookie cookie)
- {
- var idx = search (cookie);
- if (idx == -1) {
- _list.Add (cookie);
- return;
- }
-
- _list[idx] = cookie;
- }
-
- private static int compareForSort (Cookie x, Cookie y)
- {
- return (x.Name.Length + x.Value.Length)
- - (y.Name.Length + y.Value.Length);
- }
-
- private static int compareForSorted (Cookie x, Cookie y)
- {
- var ret = x.Version - y.Version;
- return ret != 0
- ? ret
- : (ret = x.Name.CompareTo (y.Name)) != 0
- ? ret
- : y.Path.Length - x.Path.Length;
- }
-
- private static CookieCollection parseRequest (string value)
- {
- var ret = new CookieCollection ();
-
- Cookie cookie = null;
- var ver = 0;
-
- var caseInsensitive = StringComparison.InvariantCultureIgnoreCase;
- var pairs = value.SplitHeaderValue (',', ';').ToList ();
-
- for (var i = 0; i < pairs.Count; i++) {
- var pair = pairs[i].Trim ();
- if (pair.Length == 0)
- continue;
-
- var idx = pair.IndexOf ('=');
- if (idx == -1) {
- if (cookie == null)
- continue;
-
- if (pair.Equals ("$port", caseInsensitive)) {
- cookie.Port = "\"\"";
- continue;
- }
-
- continue;
- }
-
- if (idx == 0) {
- if (cookie != null) {
- ret.add (cookie);
- cookie = null;
- }
-
- continue;
- }
-
- var name = pair.Substring (0, idx).TrimEnd (' ');
- var val = idx < pair.Length - 1
- ? pair.Substring (idx + 1).TrimStart (' ')
- : String.Empty;
-
- if (name.Equals ("$version", caseInsensitive)) {
- if (val.Length == 0)
- continue;
-
- int num;
- if (!Int32.TryParse (val.Unquote (), out num))
- continue;
-
- ver = num;
- continue;
- }
-
- if (name.Equals ("$path", caseInsensitive)) {
- if (cookie == null)
- continue;
-
- if (val.Length == 0)
- continue;
-
- cookie.Path = val;
- continue;
- }
-
- if (name.Equals ("$domain", caseInsensitive)) {
- if (cookie == null)
- continue;
-
- if (val.Length == 0)
- continue;
-
- cookie.Domain = val;
- continue;
- }
-
- if (name.Equals ("$port", caseInsensitive)) {
- if (cookie == null)
- continue;
-
- if (val.Length == 0)
- continue;
-
- cookie.Port = val;
- continue;
- }
-
- if (cookie != null)
- ret.add (cookie);
-
- if (!Cookie.TryCreate (name, val, out cookie))
- continue;
-
- if (ver != 0)
- cookie.Version = ver;
- }
-
- if (cookie != null)
- ret.add (cookie);
-
- return ret;
- }
-
- private static CookieCollection parseResponse (string value)
- {
- var ret = new CookieCollection ();
-
- Cookie cookie = null;
-
- var caseInsensitive = StringComparison.InvariantCultureIgnoreCase;
- var pairs = value.SplitHeaderValue (',', ';').ToList ();
-
- for (var i = 0; i < pairs.Count; i++) {
- var pair = pairs[i].Trim ();
- if (pair.Length == 0)
- continue;
-
- var idx = pair.IndexOf ('=');
- if (idx == -1) {
- if (cookie == null)
- continue;
-
- if (pair.Equals ("port", caseInsensitive)) {
- cookie.Port = "\"\"";
- continue;
- }
-
- if (pair.Equals ("discard", caseInsensitive)) {
- cookie.Discard = true;
- continue;
- }
-
- if (pair.Equals ("secure", caseInsensitive)) {
- cookie.Secure = true;
- continue;
- }
-
- if (pair.Equals ("httponly", caseInsensitive)) {
- cookie.HttpOnly = true;
- continue;
- }
-
- continue;
- }
-
- if (idx == 0) {
- if (cookie != null) {
- ret.add (cookie);
- cookie = null;
- }
-
- continue;
- }
-
- var name = pair.Substring (0, idx).TrimEnd (' ');
- var val = idx < pair.Length - 1
- ? pair.Substring (idx + 1).TrimStart (' ')
- : String.Empty;
-
- if (name.Equals ("version", caseInsensitive)) {
- if (cookie == null)
- continue;
-
- if (val.Length == 0)
- continue;
-
- int num;
- if (!Int32.TryParse (val.Unquote (), out num))
- continue;
-
- cookie.Version = num;
- continue;
- }
-
- if (name.Equals ("expires", caseInsensitive)) {
- if (val.Length == 0)
- continue;
-
- if (i == pairs.Count - 1)
- break;
-
- i++;
-
- if (cookie == null)
- continue;
-
- if (cookie.Expires != DateTime.MinValue)
- continue;
-
- var buff = new StringBuilder (val, 32);
- buff.AppendFormat (", {0}", pairs[i].Trim ());
-
- DateTime expires;
- if (
- !DateTime.TryParseExact (
- buff.ToString (),
- new[] { "ddd, dd'-'MMM'-'yyyy HH':'mm':'ss 'GMT'", "r" },
- CultureInfo.CreateSpecificCulture ("en-US"),
- DateTimeStyles.AdjustToUniversal
- | DateTimeStyles.AssumeUniversal,
- out expires
- )
- )
- continue;
-
- cookie.Expires = expires.ToLocalTime ();
- continue;
- }
-
- if (name.Equals ("max-age", caseInsensitive)) {
- if (cookie == null)
- continue;
-
- if (val.Length == 0)
- continue;
-
- int num;
- if (!Int32.TryParse (val.Unquote (), out num))
- continue;
-
- cookie.MaxAge = num;
- continue;
- }
-
- if (name.Equals ("path", caseInsensitive)) {
- if (cookie == null)
- continue;
-
- if (val.Length == 0)
- continue;
-
- cookie.Path = val;
- continue;
- }
-
- if (name.Equals ("domain", caseInsensitive)) {
- if (cookie == null)
- continue;
-
- if (val.Length == 0)
- continue;
-
- cookie.Domain = val;
- continue;
- }
-
- if (name.Equals ("port", caseInsensitive)) {
- if (cookie == null)
- continue;
-
- if (val.Length == 0)
- continue;
-
- cookie.Port = val;
- continue;
- }
-
- if (name.Equals ("comment", caseInsensitive)) {
- if (cookie == null)
- continue;
-
- if (val.Length == 0)
- continue;
-
- cookie.Comment = urlDecode (val, Encoding.UTF8);
- continue;
- }
-
- if (name.Equals ("commenturl", caseInsensitive)) {
- if (cookie == null)
- continue;
-
- if (val.Length == 0)
- continue;
-
- cookie.CommentUri = val.Unquote ().ToUri ();
- continue;
- }
-
- if (name.Equals ("samesite", caseInsensitive)) {
- if (cookie == null)
- continue;
-
- if (val.Length == 0)
- continue;
-
- cookie.SameSite = val.Unquote ();
- continue;
- }
-
- if (cookie != null)
- ret.add (cookie);
-
- Cookie.TryCreate (name, val, out cookie);
- }
-
- if (cookie != null)
- ret.add (cookie);
-
- return ret;
- }
-
- private int search (Cookie cookie)
- {
- for (var i = _list.Count - 1; i >= 0; i--) {
- if (_list[i].EqualsWithoutValue (cookie))
- return i;
- }
-
- return -1;
- }
-
- private static string urlDecode (string s, Encoding encoding)
- {
- if (s.IndexOfAny (new[] { '%', '+' }) == -1)
- return s;
-
- try {
- return HttpUtility.UrlDecode (s, encoding);
- }
- catch {
- return null;
- }
- }
-
- #endregion
-
- #region Internal Methods
-
- internal static CookieCollection Parse (string value, bool response)
- {
- try {
- return response
- ? parseResponse (value)
- : parseRequest (value);
- }
- catch (Exception ex) {
- throw new CookieException ("It could not be parsed.", ex);
- }
- }
-
- internal void SetOrRemove (Cookie cookie)
- {
- var idx = search (cookie);
- if (idx == -1) {
- if (cookie.Expired)
- return;
-
- _list.Add (cookie);
- return;
- }
-
- if (cookie.Expired) {
- _list.RemoveAt (idx);
- return;
- }
-
- _list[idx] = cookie;
- }
-
- internal void SetOrRemove (CookieCollection cookies)
- {
- foreach (var cookie in cookies._list)
- SetOrRemove (cookie);
- }
-
- internal void Sort ()
- {
- if (_list.Count > 1)
- _list.Sort (compareForSort);
- }
-
- #endregion
-
- #region Public Methods
-
- ///
- /// Adds the specified cookie to the collection.
- ///
- ///
- /// A to add.
- ///
- ///
- /// The collection is read-only.
- ///
- ///
- /// is .
- ///
- public void Add (Cookie cookie)
- {
- if (_readOnly) {
- var msg = "The collection is read-only.";
- throw new InvalidOperationException (msg);
- }
-
- if (cookie == null)
- throw new ArgumentNullException ("cookie");
-
- add (cookie);
- }
-
- ///
- /// Adds the specified cookies to the collection.
- ///
- ///
- /// A that contains the cookies to add.
- ///
- ///
- /// The collection is read-only.
- ///
- ///
- /// is .
- ///
- public void Add (CookieCollection cookies)
- {
- if (_readOnly) {
- var msg = "The collection is read-only.";
- throw new InvalidOperationException (msg);
- }
-
- if (cookies == null)
- throw new ArgumentNullException ("cookies");
-
- foreach (var cookie in cookies._list)
- add (cookie);
- }
-
- ///
- /// Removes all cookies from the collection.
- ///
- ///
- /// The collection is read-only.
- ///
- public void Clear ()
- {
- if (_readOnly) {
- var msg = "The collection is read-only.";
- throw new InvalidOperationException (msg);
- }
-
- _list.Clear ();
- }
-
- ///
- /// Determines whether the collection contains the specified cookie.
- ///
- ///
- /// true if the cookie is found in the collection; otherwise,
- /// false.
- ///
- ///
- /// A to find.
- ///
- ///
- /// is .
- ///
- public bool Contains (Cookie cookie)
- {
- if (cookie == null)
- throw new ArgumentNullException ("cookie");
-
- return search (cookie) > -1;
- }
-
- ///
- /// Copies the elements of the collection to the specified array,
- /// starting at the specified index.
- ///
- ///
- /// An array of that specifies the destination of
- /// the elements copied from the collection.
- ///
- ///
- /// An that specifies the zero-based index in
- /// the array at which copying starts.
- ///
- ///
- /// is .
- ///
- ///
- /// is less than zero.
- ///
- ///
- /// The space from to the end of
- /// is not enough to copy to.
- ///
- public void CopyTo (Cookie[] array, int index)
- {
- if (array == null)
- throw new ArgumentNullException ("array");
-
- if (index < 0)
- throw new ArgumentOutOfRangeException ("index", "Less than zero.");
-
- if (array.Length - index < _list.Count) {
- var msg = "The available space of the array is not enough to copy to.";
- throw new ArgumentException (msg);
- }
-
- _list.CopyTo (array, index);
- }
-
- ///
- /// Gets the enumerator that iterates through the collection.
- ///
- ///
- /// An
- /// instance that can be used to iterate through the collection.
- ///
- public IEnumerator GetEnumerator ()
- {
- return _list.GetEnumerator ();
- }
-
- ///
- /// Removes the specified cookie from the collection.
- ///
- ///
- ///
- /// true if the cookie is successfully removed; otherwise,
- /// false.
- ///
- ///
- /// false if the cookie is not found in the collection.
- ///
- ///
- ///
- /// A to remove.
- ///
- ///
- /// The collection is read-only.
- ///
- ///
- /// is .
- ///
- public bool Remove (Cookie cookie)
- {
- if (_readOnly) {
- var msg = "The collection is read-only.";
- throw new InvalidOperationException (msg);
- }
-
- if (cookie == null)
- throw new ArgumentNullException ("cookie");
-
- var idx = search (cookie);
- if (idx == -1)
- return false;
-
- _list.RemoveAt (idx);
- return true;
- }
-
- #endregion
-
- #region Explicit Interface Implementations
-
- ///
- /// Gets the enumerator that iterates through the collection.
- ///
- ///
- /// An instance that can be used to iterate
- /// through the collection.
- ///
- IEnumerator IEnumerable.GetEnumerator ()
- {
- return _list.GetEnumerator ();
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * CookieCollection.cs
+ *
+ * This code is derived from CookieCollection.cs (System.Net) of Mono
+ * (http://www.mono-project.com).
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2004,2009 Novell, Inc. (http://www.novell.com)
+ * Copyright (c) 2012-2019 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+#region Authors
+/*
+ * Authors:
+ * - Lawrence Pit
+ * - Gonzalo Paniagua Javier
+ * - Sebastien Pouliot
+ */
+#endregion
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Text;
+
+namespace WebSocketSharp.Net
+{
+ ///
+ /// Provides a collection of instances of the class.
+ ///
+ [Serializable]
+ public class CookieCollection : ICollection
+ {
+ #region Private Fields
+
+ private List _list;
+ private bool _readOnly;
+ private object _sync;
+
+ #endregion
+
+ #region Public Constructors
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public CookieCollection ()
+ {
+ _list = new List ();
+ _sync = ((ICollection) _list).SyncRoot;
+ }
+
+ #endregion
+
+ #region Internal Properties
+
+ internal IList List {
+ get {
+ return _list;
+ }
+ }
+
+ internal IEnumerable Sorted {
+ get {
+ var list = new List (_list);
+ if (list.Count > 1)
+ list.Sort (compareForSorted);
+
+ return list;
+ }
+ }
+
+ #endregion
+
+ #region Public Properties
+
+ ///
+ /// Gets the number of cookies in the collection.
+ ///
+ ///
+ /// An that represents the number of cookies in
+ /// the collection.
+ ///
+ public int Count {
+ get {
+ return _list.Count;
+ }
+ }
+
+ ///
+ /// Gets a value indicating whether the collection is read-only.
+ ///
+ ///
+ ///
+ /// true if the collection is read-only; otherwise, false.
+ ///
+ ///
+ /// The default value is false.
+ ///
+ ///
+ public bool IsReadOnly {
+ get {
+ return _readOnly;
+ }
+
+ internal set {
+ _readOnly = value;
+ }
+ }
+
+ ///
+ /// Gets a value indicating whether the access to the collection is
+ /// thread safe.
+ ///
+ ///
+ ///
+ /// true if the access to the collection is thread safe;
+ /// otherwise, false.
+ ///
+ ///
+ /// The default value is false.
+ ///
+ ///
+ public bool IsSynchronized {
+ get {
+ return false;
+ }
+ }
+
+ ///
+ /// Gets the cookie at the specified index from the collection.
+ ///
+ ///
+ /// A at the specified index in the collection.
+ ///
+ ///
+ /// An that specifies the zero-based index of the cookie
+ /// to find.
+ ///
+ ///
+ /// is out of allowable range for the collection.
+ ///
+ public Cookie this[int index] {
+ get {
+ if (index < 0 || index >= _list.Count)
+ throw new ArgumentOutOfRangeException ("index");
+
+ return _list[index];
+ }
+ }
+
+ ///
+ /// Gets the cookie with the specified name from the collection.
+ ///
+ ///
+ ///
+ /// A with the specified name in the collection.
+ ///
+ ///
+ /// if not found.
+ ///
+ ///
+ ///
+ /// A that specifies the name of the cookie to find.
+ ///
+ ///
+ /// is .
+ ///
+ public Cookie this[string name] {
+ get {
+ if (name == null)
+ throw new ArgumentNullException ("name");
+
+ var caseInsensitive = StringComparison.InvariantCultureIgnoreCase;
+
+ foreach (var cookie in Sorted) {
+ if (cookie.Name.Equals (name, caseInsensitive))
+ return cookie;
+ }
+
+ return null;
+ }
+ }
+
+ ///
+ /// Gets an object used to synchronize access to the collection.
+ ///
+ ///
+ /// An used to synchronize access to the collection.
+ ///
+ public object SyncRoot {
+ get {
+ return _sync;
+ }
+ }
+
+ #endregion
+
+ #region Private Methods
+
+ private void add (Cookie cookie)
+ {
+ var idx = search (cookie);
+ if (idx == -1) {
+ _list.Add (cookie);
+ return;
+ }
+
+ _list[idx] = cookie;
+ }
+
+ private static int compareForSort (Cookie x, Cookie y)
+ {
+ return (x.Name.Length + x.Value.Length)
+ - (y.Name.Length + y.Value.Length);
+ }
+
+ private static int compareForSorted (Cookie x, Cookie y)
+ {
+ var ret = x.Version - y.Version;
+ return ret != 0
+ ? ret
+ : (ret = x.Name.CompareTo (y.Name)) != 0
+ ? ret
+ : y.Path.Length - x.Path.Length;
+ }
+
+ private static CookieCollection parseRequest (string value)
+ {
+ var ret = new CookieCollection ();
+
+ Cookie cookie = null;
+ var ver = 0;
+
+ var caseInsensitive = StringComparison.InvariantCultureIgnoreCase;
+ var pairs = value.SplitHeaderValue (',', ';').ToList ();
+
+ for (var i = 0; i < pairs.Count; i++) {
+ var pair = pairs[i].Trim ();
+ if (pair.Length == 0)
+ continue;
+
+ var idx = pair.IndexOf ('=');
+ if (idx == -1) {
+ if (cookie == null)
+ continue;
+
+ if (pair.Equals ("$port", caseInsensitive)) {
+ cookie.Port = "\"\"";
+ continue;
+ }
+
+ continue;
+ }
+
+ if (idx == 0) {
+ if (cookie != null) {
+ ret.add (cookie);
+ cookie = null;
+ }
+
+ continue;
+ }
+
+ var name = pair.Substring (0, idx).TrimEnd (' ');
+ var val = idx < pair.Length - 1
+ ? pair.Substring (idx + 1).TrimStart (' ')
+ : String.Empty;
+
+ if (name.Equals ("$version", caseInsensitive)) {
+ if (val.Length == 0)
+ continue;
+
+ int num;
+ if (!Int32.TryParse (val.Unquote (), out num))
+ continue;
+
+ ver = num;
+ continue;
+ }
+
+ if (name.Equals ("$path", caseInsensitive)) {
+ if (cookie == null)
+ continue;
+
+ if (val.Length == 0)
+ continue;
+
+ cookie.Path = val;
+ continue;
+ }
+
+ if (name.Equals ("$domain", caseInsensitive)) {
+ if (cookie == null)
+ continue;
+
+ if (val.Length == 0)
+ continue;
+
+ cookie.Domain = val;
+ continue;
+ }
+
+ if (name.Equals ("$port", caseInsensitive)) {
+ if (cookie == null)
+ continue;
+
+ if (val.Length == 0)
+ continue;
+
+ cookie.Port = val;
+ continue;
+ }
+
+ if (cookie != null)
+ ret.add (cookie);
+
+ if (!Cookie.TryCreate (name, val, out cookie))
+ continue;
+
+ if (ver != 0)
+ cookie.Version = ver;
+ }
+
+ if (cookie != null)
+ ret.add (cookie);
+
+ return ret;
+ }
+
+ private static CookieCollection parseResponse (string value)
+ {
+ var ret = new CookieCollection ();
+
+ Cookie cookie = null;
+
+ var caseInsensitive = StringComparison.InvariantCultureIgnoreCase;
+ var pairs = value.SplitHeaderValue (',', ';').ToList ();
+
+ for (var i = 0; i < pairs.Count; i++) {
+ var pair = pairs[i].Trim ();
+ if (pair.Length == 0)
+ continue;
+
+ var idx = pair.IndexOf ('=');
+ if (idx == -1) {
+ if (cookie == null)
+ continue;
+
+ if (pair.Equals ("port", caseInsensitive)) {
+ cookie.Port = "\"\"";
+ continue;
+ }
+
+ if (pair.Equals ("discard", caseInsensitive)) {
+ cookie.Discard = true;
+ continue;
+ }
+
+ if (pair.Equals ("secure", caseInsensitive)) {
+ cookie.Secure = true;
+ continue;
+ }
+
+ if (pair.Equals ("httponly", caseInsensitive)) {
+ cookie.HttpOnly = true;
+ continue;
+ }
+
+ continue;
+ }
+
+ if (idx == 0) {
+ if (cookie != null) {
+ ret.add (cookie);
+ cookie = null;
+ }
+
+ continue;
+ }
+
+ var name = pair.Substring (0, idx).TrimEnd (' ');
+ var val = idx < pair.Length - 1
+ ? pair.Substring (idx + 1).TrimStart (' ')
+ : String.Empty;
+
+ if (name.Equals ("version", caseInsensitive)) {
+ if (cookie == null)
+ continue;
+
+ if (val.Length == 0)
+ continue;
+
+ int num;
+ if (!Int32.TryParse (val.Unquote (), out num))
+ continue;
+
+ cookie.Version = num;
+ continue;
+ }
+
+ if (name.Equals ("expires", caseInsensitive)) {
+ if (val.Length == 0)
+ continue;
+
+ if (i == pairs.Count - 1)
+ break;
+
+ i++;
+
+ if (cookie == null)
+ continue;
+
+ if (cookie.Expires != DateTime.MinValue)
+ continue;
+
+ var buff = new StringBuilder (val, 32);
+ buff.AppendFormat (", {0}", pairs[i].Trim ());
+
+ DateTime expires;
+ if (
+ !DateTime.TryParseExact (
+ buff.ToString (),
+ new[] { "ddd, dd'-'MMM'-'yyyy HH':'mm':'ss 'GMT'", "r" },
+ CultureInfo.CreateSpecificCulture ("en-US"),
+ DateTimeStyles.AdjustToUniversal
+ | DateTimeStyles.AssumeUniversal,
+ out expires
+ )
+ )
+ continue;
+
+ cookie.Expires = expires.ToLocalTime ();
+ continue;
+ }
+
+ if (name.Equals ("max-age", caseInsensitive)) {
+ if (cookie == null)
+ continue;
+
+ if (val.Length == 0)
+ continue;
+
+ int num;
+ if (!Int32.TryParse (val.Unquote (), out num))
+ continue;
+
+ cookie.MaxAge = num;
+ continue;
+ }
+
+ if (name.Equals ("path", caseInsensitive)) {
+ if (cookie == null)
+ continue;
+
+ if (val.Length == 0)
+ continue;
+
+ cookie.Path = val;
+ continue;
+ }
+
+ if (name.Equals ("domain", caseInsensitive)) {
+ if (cookie == null)
+ continue;
+
+ if (val.Length == 0)
+ continue;
+
+ cookie.Domain = val;
+ continue;
+ }
+
+ if (name.Equals ("port", caseInsensitive)) {
+ if (cookie == null)
+ continue;
+
+ if (val.Length == 0)
+ continue;
+
+ cookie.Port = val;
+ continue;
+ }
+
+ if (name.Equals ("comment", caseInsensitive)) {
+ if (cookie == null)
+ continue;
+
+ if (val.Length == 0)
+ continue;
+
+ cookie.Comment = urlDecode (val, Encoding.UTF8);
+ continue;
+ }
+
+ if (name.Equals ("commenturl", caseInsensitive)) {
+ if (cookie == null)
+ continue;
+
+ if (val.Length == 0)
+ continue;
+
+ cookie.CommentUri = val.Unquote ().ToUri ();
+ continue;
+ }
+
+ if (name.Equals ("samesite", caseInsensitive)) {
+ if (cookie == null)
+ continue;
+
+ if (val.Length == 0)
+ continue;
+
+ cookie.SameSite = val.Unquote ();
+ continue;
+ }
+
+ if (cookie != null)
+ ret.add (cookie);
+
+ Cookie.TryCreate (name, val, out cookie);
+ }
+
+ if (cookie != null)
+ ret.add (cookie);
+
+ return ret;
+ }
+
+ private int search (Cookie cookie)
+ {
+ for (var i = _list.Count - 1; i >= 0; i--) {
+ if (_list[i].EqualsWithoutValue (cookie))
+ return i;
+ }
+
+ return -1;
+ }
+
+ private static string urlDecode (string s, Encoding encoding)
+ {
+ if (s.IndexOfAny (new[] { '%', '+' }) == -1)
+ return s;
+
+ try {
+ return HttpUtility.UrlDecode (s, encoding);
+ }
+ catch {
+ return null;
+ }
+ }
+
+ #endregion
+
+ #region Internal Methods
+
+ internal static CookieCollection Parse (string value, bool response)
+ {
+ try {
+ return response
+ ? parseResponse (value)
+ : parseRequest (value);
+ }
+ catch (Exception ex) {
+ throw new CookieException ("It could not be parsed.", ex);
+ }
+ }
+
+ internal void SetOrRemove (Cookie cookie)
+ {
+ var idx = search (cookie);
+ if (idx == -1) {
+ if (cookie.Expired)
+ return;
+
+ _list.Add (cookie);
+ return;
+ }
+
+ if (cookie.Expired) {
+ _list.RemoveAt (idx);
+ return;
+ }
+
+ _list[idx] = cookie;
+ }
+
+ internal void SetOrRemove (CookieCollection cookies)
+ {
+ foreach (var cookie in cookies._list)
+ SetOrRemove (cookie);
+ }
+
+ internal void Sort ()
+ {
+ if (_list.Count > 1)
+ _list.Sort (compareForSort);
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ ///
+ /// Adds the specified cookie to the collection.
+ ///
+ ///
+ /// A to add.
+ ///
+ ///
+ /// The collection is read-only.
+ ///
+ ///
+ /// is .
+ ///
+ public void Add (Cookie cookie)
+ {
+ if (_readOnly) {
+ var msg = "The collection is read-only.";
+ throw new InvalidOperationException (msg);
+ }
+
+ if (cookie == null)
+ throw new ArgumentNullException ("cookie");
+
+ add (cookie);
+ }
+
+ ///
+ /// Adds the specified cookies to the collection.
+ ///
+ ///
+ /// A that contains the cookies to add.
+ ///
+ ///
+ /// The collection is read-only.
+ ///
+ ///
+ /// is .
+ ///
+ public void Add (CookieCollection cookies)
+ {
+ if (_readOnly) {
+ var msg = "The collection is read-only.";
+ throw new InvalidOperationException (msg);
+ }
+
+ if (cookies == null)
+ throw new ArgumentNullException ("cookies");
+
+ foreach (var cookie in cookies._list)
+ add (cookie);
+ }
+
+ ///
+ /// Removes all cookies from the collection.
+ ///
+ ///
+ /// The collection is read-only.
+ ///
+ public void Clear ()
+ {
+ if (_readOnly) {
+ var msg = "The collection is read-only.";
+ throw new InvalidOperationException (msg);
+ }
+
+ _list.Clear ();
+ }
+
+ ///
+ /// Determines whether the collection contains the specified cookie.
+ ///
+ ///
+ /// true if the cookie is found in the collection; otherwise,
+ /// false.
+ ///
+ ///
+ /// A to find.
+ ///
+ ///
+ /// is .
+ ///
+ public bool Contains (Cookie cookie)
+ {
+ if (cookie == null)
+ throw new ArgumentNullException ("cookie");
+
+ return search (cookie) > -1;
+ }
+
+ ///
+ /// Copies the elements of the collection to the specified array,
+ /// starting at the specified index.
+ ///
+ ///
+ /// An array of that specifies the destination of
+ /// the elements copied from the collection.
+ ///
+ ///
+ /// An that specifies the zero-based index in
+ /// the array at which copying starts.
+ ///
+ ///
+ /// is .
+ ///
+ ///
+ /// is less than zero.
+ ///
+ ///
+ /// The space from to the end of
+ /// is not enough to copy to.
+ ///
+ public void CopyTo (Cookie[] array, int index)
+ {
+ if (array == null)
+ throw new ArgumentNullException ("array");
+
+ if (index < 0)
+ throw new ArgumentOutOfRangeException ("index", "Less than zero.");
+
+ if (array.Length - index < _list.Count) {
+ var msg = "The available space of the array is not enough to copy to.";
+ throw new ArgumentException (msg);
+ }
+
+ _list.CopyTo (array, index);
+ }
+
+ ///
+ /// Gets the enumerator that iterates through the collection.
+ ///
+ ///
+ /// An
+ /// instance that can be used to iterate through the collection.
+ ///
+ public IEnumerator GetEnumerator ()
+ {
+ return _list.GetEnumerator ();
+ }
+
+ ///
+ /// Removes the specified cookie from the collection.
+ ///
+ ///
+ ///
+ /// true if the cookie is successfully removed; otherwise,
+ /// false.
+ ///
+ ///
+ /// false if the cookie is not found in the collection.
+ ///
+ ///
+ ///
+ /// A to remove.
+ ///
+ ///
+ /// The collection is read-only.
+ ///
+ ///
+ /// is .
+ ///
+ public bool Remove (Cookie cookie)
+ {
+ if (_readOnly) {
+ var msg = "The collection is read-only.";
+ throw new InvalidOperationException (msg);
+ }
+
+ if (cookie == null)
+ throw new ArgumentNullException ("cookie");
+
+ var idx = search (cookie);
+ if (idx == -1)
+ return false;
+
+ _list.RemoveAt (idx);
+ return true;
+ }
+
+ #endregion
+
+ #region Explicit Interface Implementations
+
+ ///
+ /// Gets the enumerator that iterates through the collection.
+ ///
+ ///
+ /// An instance that can be used to iterate
+ /// through the collection.
+ ///
+ IEnumerator IEnumerable.GetEnumerator ()
+ {
+ return _list.GetEnumerator ();
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/Net/CookieException.cs b/websocket-sharp/Net/CookieException.cs
index 2a5abe98..fe979efb 100644
--- a/websocket-sharp/Net/CookieException.cs
+++ b/websocket-sharp/Net/CookieException.cs
@@ -1,165 +1,165 @@
-#region License
-/*
- * CookieException.cs
- *
- * This code is derived from CookieException.cs (System.Net) of Mono
- * (http://www.mono-project.com).
- *
- * The MIT License
- *
- * Copyright (c) 2012-2019 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-#region Authors
-/*
- * Authors:
- * - Lawrence Pit
- */
-#endregion
-
-using System;
-using System.Runtime.Serialization;
-using System.Security.Permissions;
-
-namespace WebSocketSharp.Net
-{
- ///
- /// The exception that is thrown when a gets an error.
- ///
- [Serializable]
- public class CookieException : FormatException, ISerializable
- {
- #region Internal Constructors
-
- internal CookieException (string message)
- : base (message)
- {
- }
-
- internal CookieException (string message, Exception innerException)
- : base (message, innerException)
- {
- }
-
- #endregion
-
- #region Protected Constructors
-
- ///
- /// Initializes a new instance of the class
- /// with the serialized data.
- ///
- ///
- /// A that holds the serialized object data.
- ///
- ///
- /// A that specifies the source for
- /// the deserialization.
- ///
- ///
- /// is .
- ///
- protected CookieException (
- SerializationInfo serializationInfo, StreamingContext streamingContext
- )
- : base (serializationInfo, streamingContext)
- {
- }
-
- #endregion
-
- #region Public Constructors
-
- ///
- /// Initializes a new instance of the class.
- ///
- public CookieException ()
- : base ()
- {
- }
-
- #endregion
-
- #region Public Methods
-
- ///
- /// Populates the specified instance with
- /// the data needed to serialize the current instance.
- ///
- ///
- /// A that holds the serialized object data.
- ///
- ///
- /// A that specifies the destination for
- /// the serialization.
- ///
- ///
- /// is .
- ///
- [
- SecurityPermission (
- SecurityAction.LinkDemand,
- Flags = SecurityPermissionFlag.SerializationFormatter
- )
- ]
- public override void GetObjectData (
- SerializationInfo serializationInfo, StreamingContext streamingContext
- )
- {
- base.GetObjectData (serializationInfo, streamingContext);
- }
-
- #endregion
-
- #region Explicit Interface Implementation
-
- ///
- /// Populates the specified instance with
- /// the data needed to serialize the current instance.
- ///
- ///
- /// A that holds the serialized object data.
- ///
- ///
- /// A that specifies the destination for
- /// the serialization.
- ///
- ///
- /// is .
- ///
- [
- SecurityPermission (
- SecurityAction.LinkDemand,
- Flags = SecurityPermissionFlag.SerializationFormatter,
- SerializationFormatter = true
- )
- ]
- void ISerializable.GetObjectData (
- SerializationInfo serializationInfo, StreamingContext streamingContext
- )
- {
- base.GetObjectData (serializationInfo, streamingContext);
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * CookieException.cs
+ *
+ * This code is derived from CookieException.cs (System.Net) of Mono
+ * (http://www.mono-project.com).
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2012-2019 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+#region Authors
+/*
+ * Authors:
+ * - Lawrence Pit
+ */
+#endregion
+
+using System;
+using System.Runtime.Serialization;
+using System.Security.Permissions;
+
+namespace WebSocketSharp.Net
+{
+ ///
+ /// The exception that is thrown when a gets an error.
+ ///
+ [Serializable]
+ public class CookieException : FormatException, ISerializable
+ {
+ #region Internal Constructors
+
+ internal CookieException (string message)
+ : base (message)
+ {
+ }
+
+ internal CookieException (string message, Exception innerException)
+ : base (message, innerException)
+ {
+ }
+
+ #endregion
+
+ #region Protected Constructors
+
+ ///
+ /// Initializes a new instance of the class
+ /// with the serialized data.
+ ///
+ ///
+ /// A that holds the serialized object data.
+ ///
+ ///
+ /// A that specifies the source for
+ /// the deserialization.
+ ///
+ ///
+ /// is .
+ ///
+ protected CookieException (
+ SerializationInfo serializationInfo, StreamingContext streamingContext
+ )
+ : base (serializationInfo, streamingContext)
+ {
+ }
+
+ #endregion
+
+ #region Public Constructors
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public CookieException ()
+ : base ()
+ {
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ ///
+ /// Populates the specified instance with
+ /// the data needed to serialize the current instance.
+ ///
+ ///
+ /// A that holds the serialized object data.
+ ///
+ ///
+ /// A that specifies the destination for
+ /// the serialization.
+ ///
+ ///
+ /// is .
+ ///
+ [
+ SecurityPermission (
+ SecurityAction.LinkDemand,
+ Flags = SecurityPermissionFlag.SerializationFormatter
+ )
+ ]
+ public override void GetObjectData (
+ SerializationInfo serializationInfo, StreamingContext streamingContext
+ )
+ {
+ base.GetObjectData (serializationInfo, streamingContext);
+ }
+
+ #endregion
+
+ #region Explicit Interface Implementation
+
+ ///
+ /// Populates the specified instance with
+ /// the data needed to serialize the current instance.
+ ///
+ ///
+ /// A that holds the serialized object data.
+ ///
+ ///
+ /// A that specifies the destination for
+ /// the serialization.
+ ///
+ ///
+ /// is .
+ ///
+ [
+ SecurityPermission (
+ SecurityAction.LinkDemand,
+ Flags = SecurityPermissionFlag.SerializationFormatter,
+ SerializationFormatter = true
+ )
+ ]
+ void ISerializable.GetObjectData (
+ SerializationInfo serializationInfo, StreamingContext streamingContext
+ )
+ {
+ base.GetObjectData (serializationInfo, streamingContext);
+ }
+
+ #endregion
+ }
+}
diff --git a/websocket-sharp/Net/EndPointListener.cs b/websocket-sharp/Net/EndPointListener.cs
index 86402f72..b638ef43 100644
--- a/websocket-sharp/Net/EndPointListener.cs
+++ b/websocket-sharp/Net/EndPointListener.cs
@@ -1,582 +1,582 @@
-#region License
-/*
- * EndPointListener.cs
- *
- * This code is derived from EndPointListener.cs (System.Net) of Mono
- * (http://www.mono-project.com).
- *
- * The MIT License
- *
- * Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
- * Copyright (c) 2012-2020 sta.blockhead
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-#endregion
-
-#region Authors
-/*
- * Authors:
- * - Gonzalo Paniagua Javier
- */
-#endregion
-
-#region Contributors
-/*
- * Contributors:
- * - Liryna
- * - Nicholas Devenish
- */
-#endregion
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.IO;
-using System.Net;
-using System.Net.Sockets;
-using System.Security.Cryptography;
-using System.Security.Cryptography.X509Certificates;
-using System.Threading;
-
-namespace WebSocketSharp.Net
-{
- internal sealed class EndPointListener
- {
- #region Private Fields
-
- private List _all; // host == '+'
- private static readonly string _defaultCertFolderPath;
- private IPEndPoint _endpoint;
- private List _prefixes;
- private bool _secure;
- private Socket _socket;
- private ServerSslConfiguration _sslConfig;
- private List _unhandled; // host == '*'
- private List _unregistered;
- private object _unregisteredSync;
-
- #endregion
-
- #region Static Constructor
-
- static EndPointListener ()
- {
- _defaultCertFolderPath = Environment.GetFolderPath (
- Environment.SpecialFolder.ApplicationData
- );
- }
-
- #endregion
-
- #region Internal Constructors
-
- internal EndPointListener (
- IPEndPoint endpoint,
- bool secure,
- string certificateFolderPath,
- ServerSslConfiguration sslConfig,
- bool reuseAddress
- )
- {
- _endpoint = endpoint;
-
- if (secure) {
- var cert = getCertificate (
- endpoint.Port,
- certificateFolderPath,
- sslConfig.ServerCertificate
- );
-
- if (cert == null) {
- var msg = "No server certificate could be found.";
-
- throw new ArgumentException (msg);
- }
-
- _secure = true;
- _sslConfig = new ServerSslConfiguration (sslConfig);
- _sslConfig.ServerCertificate = cert;
- }
-
- _prefixes = new List ();
- _unregistered = new List ();
- _unregisteredSync = ((ICollection) _unregistered).SyncRoot;
-
- _socket = new Socket (
- endpoint.Address.AddressFamily,
- SocketType.Stream,
- ProtocolType.Tcp
- );
-
- if (reuseAddress) {
- _socket.SetSocketOption (
- SocketOptionLevel.Socket,
- SocketOptionName.ReuseAddress,
- true
- );
- }
-
- _socket.Bind (endpoint);
- _socket.Listen (500);
- _socket.BeginAccept (onAccept, this);
- }
-
- #endregion
-
- #region Public Properties
-
- public IPAddress Address {
- get {
- return _endpoint.Address;
- }
- }
-
- public bool IsSecure {
- get {
- return _secure;
- }
- }
-
- public int Port {
- get {
- return _endpoint.Port;
- }
- }
-
- public ServerSslConfiguration SslConfiguration {
- get {
- return _sslConfig;
- }
- }
-
- #endregion
-
- #region Private Methods
-
- private static void addSpecial (
- List prefixes, HttpListenerPrefix prefix
- )
- {
- var path = prefix.Path;
-
- foreach (var pref in prefixes) {
- if (pref.Path == path) {
- var msg = "The prefix is already in use.";
-
- throw new HttpListenerException (87, msg);
- }
- }
-
- prefixes.Add (prefix);
- }
-
- private void clearConnections ()
- {
- HttpConnection[] conns = null;
-
- var cnt = 0;
-
- lock (_unregisteredSync) {
- cnt = _unregistered.Count;
-
- if (cnt == 0)
- return;
-
- conns = new HttpConnection[cnt];
-
- _unregistered.CopyTo (conns, 0);
- _unregistered.Clear ();
- }
-
- for (var i = cnt - 1; i >= 0; i--)
- conns[i].Close (true);
- }
-
- private static RSACryptoServiceProvider createRSAFromFile (string path)
- {
- var rsa = new RSACryptoServiceProvider ();
-
- var key = File.ReadAllBytes (path);
- rsa.ImportCspBlob (key);
-
- return rsa;
- }
-
- private static X509Certificate2 getCertificate (
- int port, string folderPath, X509Certificate2 defaultCertificate
- )
- {
- if (folderPath == null || folderPath.Length == 0)
- folderPath = _defaultCertFolderPath;
-
- try {
- var cer = Path.Combine (folderPath, String.Format ("{0}.cer", port));
- var key = Path.Combine (folderPath, String.Format ("{0}.key", port));
-
- if (File.Exists (cer) && File.Exists (key)) {
- var cert = new X509Certificate2 (cer);
- cert.PrivateKey = createRSAFromFile (key);
-
- return cert;
- }
- }
- catch {
- }
-
- return defaultCertificate;
- }
-
- private void leaveIfNoPrefix ()
- {
- if (_prefixes.Count > 0)
- return;
-
- var prefs = _unhandled;
-
- if (prefs != null && prefs.Count > 0)
- return;
-
- prefs = _all;
-
- if (prefs != null && prefs.Count > 0)
- return;
-
- Close ();
- }
-
- private static void onAccept (IAsyncResult asyncResult)
- {
- var lsnr = (EndPointListener) asyncResult.AsyncState;
-
- Socket sock = null;
-
- try {
- sock = lsnr._socket.EndAccept (asyncResult);
- }
- catch (ObjectDisposedException) {
- return;
- }
- catch (Exception) {
- // TODO: Logging.
- }
-
- try {
- lsnr._socket.BeginAccept (onAccept, lsnr);
- }
- catch (Exception) {
- // TODO: Logging.
-
- if (sock != null)
- sock.Close ();
-
- return;
- }
-
- if (sock == null)
- return;
-
- processAccepted (sock, lsnr);
- }
-
- private static void processAccepted (
- Socket socket, EndPointListener listener
- )
- {
- HttpConnection conn = null;
-
- try {
- conn = new HttpConnection (socket, listener);
- }
- catch (Exception) {
- // TODO: Logging.
-
- socket.Close ();
-
- return;
- }
-
- lock (listener._unregisteredSync)
- listener._unregistered.Add (conn);
-
- conn.BeginReadRequest ();
- }
-
- private static bool removeSpecial (
- List prefixes, HttpListenerPrefix prefix
- )
- {
- var path = prefix.Path;
- var cnt = prefixes.Count;
-
- for (var i = 0; i < cnt; i++) {
- if (prefixes[i].Path == path) {
- prefixes.RemoveAt (i);
-
- return true;
- }
- }
-
- return false;
- }
-
- private static HttpListener searchHttpListenerFromSpecial (
- string path, List prefixes
- )
- {
- if (prefixes == null)
- return null;
-
- HttpListener ret = null;
-
- var bestLen = -1;
-
- foreach (var pref in prefixes) {
- var prefPath = pref.Path;
- var len = prefPath.Length;
-
- if (len < bestLen)
- continue;
-
- if (path.StartsWith (prefPath, StringComparison.Ordinal)) {
- bestLen = len;
- ret = pref.Listener;
- }
- }
-
- return ret;
- }
-
- #endregion
-
- #region Internal Methods
-
- internal static bool CertificateExists (int port, string folderPath)
- {
- if (folderPath == null || folderPath.Length == 0)
- folderPath = _defaultCertFolderPath;
-
- var cer = Path.Combine (folderPath, String.Format ("{0}.cer", port));
- var key = Path.Combine (folderPath, String.Format ("{0}.key", port));
-
- return File.Exists (cer) && File.Exists (key);
- }
-
- internal void RemoveConnection (HttpConnection connection)
- {
- lock (_unregisteredSync)
- _unregistered.Remove (connection);
- }
-
- internal bool TrySearchHttpListener (Uri uri, out HttpListener listener)
- {
- listener = null;
-
- if (uri == null)
- return false;
-
- var host = uri.Host;
- var dns = Uri.CheckHostName (host) == UriHostNameType.Dns;
- var port = uri.Port.ToString ();
- var path = HttpUtility.UrlDecode (uri.AbsolutePath);
-
- if (path[path.Length - 1] != '/')
- path += "/";
-
- if (host != null && host.Length > 0) {
- var prefs = _prefixes;
- var bestLen = -1;
-
- foreach (var pref in prefs) {
- if (dns) {
- var prefHost = pref.Host;
- var prefDns = Uri.CheckHostName (prefHost) == UriHostNameType.Dns;
-
- if (prefDns) {
- if (prefHost != host)
- continue;
- }
- }
-
- if (pref.Port != port)
- continue;
-
- var prefPath = pref.Path;
- var len = prefPath.Length;
-
- if (len < bestLen)
- continue;
-
- if (path.StartsWith (prefPath, StringComparison.Ordinal)) {
- bestLen = len;
- listener = pref.Listener;
- }
- }
-
- if (bestLen != -1)
- return true;
- }
-
- listener = searchHttpListenerFromSpecial (path, _unhandled);
-
- if (listener != null)
- return true;
-
- listener = searchHttpListenerFromSpecial (path, _all);
-
- return listener != null;
- }
-
- #endregion
-
- #region Public Methods
-
- public void AddPrefix (HttpListenerPrefix prefix)
- {
- List current, future;
-
- if (prefix.Host == "*") {
- do {
- current = _unhandled;
- future = current != null
- ? new List (current)
- : new List ();
-
- addSpecial (future, prefix);
- }
- while (
- Interlocked.CompareExchange (ref _unhandled, future, current) != current
- );
-
- return;
- }
-
- if (prefix.Host == "+") {
- do {
- current = _all;
- future = current != null
- ? new List (current)
- : new List ();
-
- addSpecial (future, prefix);
- }
- while (
- Interlocked.CompareExchange (ref _all, future, current) != current
- );
-
- return;
- }
-
- do {
- current = _prefixes;
- var idx = current.IndexOf (prefix);
-
- if (idx > -1) {
- if (current[idx].Listener != prefix.Listener) {
- var msg = String.Format (
- "There is another listener for {0}.", prefix
- );
-
- throw new HttpListenerException (87, msg);
- }
-
- return;
- }
-
- future = new List (current);
- future.Add (prefix);
- }
- while (
- Interlocked.CompareExchange (ref _prefixes, future, current) != current
- );
- }
-
- public void Close ()
- {
- _socket.Close ();
-
- clearConnections ();
- EndPointManager.RemoveEndPoint (_endpoint);
- }
-
- public void RemovePrefix (HttpListenerPrefix prefix)
- {
- List current, future;
-
- if (prefix.Host == "*") {
- do {
- current = _unhandled;
-
- if (current == null)
- break;
-
- future = new List (current);
-
- if (!removeSpecial (future, prefix))
- break;
- }
- while (
- Interlocked.CompareExchange (ref _unhandled, future, current) != current
- );
-
- leaveIfNoPrefix ();
-
- return;
- }
-
- if (prefix.Host == "+") {
- do {
- current = _all;
-
- if (current == null)
- break;
-
- future = new List (current);
-
- if (!removeSpecial (future, prefix))
- break;
- }
- while (
- Interlocked.CompareExchange (ref _all, future, current) != current
- );
-
- leaveIfNoPrefix ();
-
- return;
- }
-
- do {
- current = _prefixes;
-
- if (!current.Contains (prefix))
- break;
-
- future = new List (current);
- future.Remove (prefix);
- }
- while (
- Interlocked.CompareExchange (ref _prefixes, future, current) != current
- );
-
- leaveIfNoPrefix ();
- }
-
- #endregion
- }
-}
+#region License
+/*
+ * EndPointListener.cs
+ *
+ * This code is derived from EndPointListener.cs (System.Net) of Mono
+ * (http://www.mono-project.com).
+ *
+ * The MIT License
+ *
+ * Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
+ * Copyright (c) 2012-2020 sta.blockhead
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+#endregion
+
+#region Authors
+/*
+ * Authors:
+ * - Gonzalo Paniagua Javier
+ */
+#endregion
+
+#region Contributors
+/*
+ * Contributors:
+ * - Liryna
+ * - Nicholas Devenish
+ */
+#endregion
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.IO;
+using System.Net;
+using System.Net.Sockets;
+using System.Security.Cryptography;
+using System.Security.Cryptography.X509Certificates;
+using System.Threading;
+
+namespace WebSocketSharp.Net
+{
+ internal sealed class EndPointListener
+ {
+ #region Private Fields
+
+ private List _all; // host == '+'
+ private static readonly string _defaultCertFolderPath;
+ private IPEndPoint _endpoint;
+ private List _prefixes;
+ private bool _secure;
+ private Socket _socket;
+ private ServerSslConfiguration _sslConfig;
+ private List _unhandled; // host == '*'
+ private List _unregistered;
+ private object _unregisteredSync;
+
+ #endregion
+
+ #region Static Constructor
+
+ static EndPointListener ()
+ {
+ _defaultCertFolderPath = Environment.GetFolderPath (
+ Environment.SpecialFolder.ApplicationData
+ );
+ }
+
+ #endregion
+
+ #region Internal Constructors
+
+ internal EndPointListener (
+ IPEndPoint endpoint,
+ bool secure,
+ string certificateFolderPath,
+ ServerSslConfiguration sslConfig,
+ bool reuseAddress
+ )
+ {
+ _endpoint = endpoint;
+
+ if (secure) {
+ var cert = getCertificate (
+ endpoint.Port,
+ certificateFolderPath,
+ sslConfig.ServerCertificate
+ );
+
+ if (cert == null) {
+ var msg = "No server certificate could be found.";
+
+ throw new ArgumentException (msg);
+ }
+
+ _secure = true;
+ _sslConfig = new ServerSslConfiguration (sslConfig);
+ _sslConfig.ServerCertificate = cert;
+ }
+
+ _prefixes = new List ();
+ _unregistered = new List ();
+ _unregisteredSync = ((ICollection) _unregistered).SyncRoot;
+
+ _socket = new Socket (
+ endpoint.Address.AddressFamily,
+ SocketType.Stream,
+ ProtocolType.Tcp
+ );
+
+ if (reuseAddress) {
+ _socket.SetSocketOption (
+ SocketOptionLevel.Socket,
+ SocketOptionName.ReuseAddress,
+ true
+ );
+ }
+
+ _socket.Bind (endpoint);
+ _socket.Listen (500);
+ _socket.BeginAccept (onAccept, this);
+ }
+
+ #endregion
+
+ #region Public Properties
+
+ public IPAddress Address {
+ get {
+ return _endpoint.Address;
+ }
+ }
+
+ public bool IsSecure {
+ get {
+ return _secure;
+ }
+ }
+
+ public int Port {
+ get {
+ return _endpoint.Port;
+ }
+ }
+
+ public ServerSslConfiguration SslConfiguration {
+ get {
+ return _sslConfig;
+ }
+ }
+
+ #endregion
+
+ #region Private Methods
+
+ private static void addSpecial (
+ List prefixes, HttpListenerPrefix prefix
+ )
+ {
+ var path = prefix.Path;
+
+ foreach (var pref in prefixes) {
+ if (pref.Path == path) {
+ var msg = "The prefix is already in use.";
+
+ throw new HttpListenerException (87, msg);
+ }
+ }
+
+ prefixes.Add (prefix);
+ }
+
+ private void clearConnections ()
+ {
+ HttpConnection[] conns = null;
+
+ var cnt = 0;
+
+ lock (_unregisteredSync) {
+ cnt = _unregistered.Count;
+
+ if (cnt == 0)
+ return;
+
+ conns = new HttpConnection[cnt];
+
+ _unregistered.CopyTo (conns, 0);
+ _unregistered.Clear ();
+ }
+
+ for (var i = cnt - 1; i >= 0; i--)
+ conns[i].Close (true);
+ }
+
+ private static RSACryptoServiceProvider createRSAFromFile (string path)
+ {
+ var rsa = new RSACryptoServiceProvider ();
+
+ var key = File.ReadAllBytes (path);
+ rsa.ImportCspBlob (key);
+
+ return rsa;
+ }
+
+ private static X509Certificate2 getCertificate (
+ int port, string folderPath, X509Certificate2 defaultCertificate
+ )
+ {
+ if (folderPath == null || folderPath.Length == 0)
+ folderPath = _defaultCertFolderPath;
+
+ try {
+ var cer = Path.Combine (folderPath, String.Format ("{0}.cer", port));
+ var key = Path.Combine (folderPath, String.Format ("{0}.key", port));
+
+ if (File.Exists (cer) && File.Exists (key)) {
+ var cert = new X509Certificate2 (cer);
+ cert.PrivateKey = createRSAFromFile (key);
+
+ return cert;
+ }
+ }
+ catch {
+ }
+
+ return defaultCertificate;
+ }
+
+ private void leaveIfNoPrefix ()
+ {
+ if (_prefixes.Count > 0)
+ return;
+
+ var prefs = _unhandled;
+
+ if (prefs != null && prefs.Count > 0)
+ return;
+
+ prefs = _all;
+
+ if (prefs != null && prefs.Count > 0)
+ return;
+
+ Close ();
+ }
+
+ private static void onAccept (IAsyncResult asyncResult)
+ {
+ var lsnr = (EndPointListener) asyncResult.AsyncState;
+
+ Socket sock = null;
+
+ try {
+ sock = lsnr._socket.EndAccept (asyncResult);
+ }
+ catch (ObjectDisposedException) {
+ return;
+ }
+ catch (Exception) {
+ // TODO: Logging.
+ }
+
+ try {
+ lsnr._socket.BeginAccept (onAccept, lsnr);
+ }
+ catch (Exception) {
+ // TODO: Logging.
+
+ if (sock != null)
+ sock.Close ();
+
+ return;
+ }
+
+ if (sock == null)
+ return;
+
+ processAccepted (sock, lsnr);
+ }
+
+ private static void processAccepted (
+ Socket socket, EndPointListener listener
+ )
+ {
+ HttpConnection conn = null;
+
+ try {
+ conn = new HttpConnection (socket, listener);
+ }
+ catch (Exception) {
+ // TODO: Logging.
+
+ socket.Close ();
+
+ return;
+ }
+
+ lock (listener._unregisteredSync)
+ listener._unregistered.Add (conn);
+
+ conn.BeginReadRequest ();
+ }
+
+ private static bool removeSpecial (
+ List prefixes, HttpListenerPrefix prefix
+ )
+ {
+ var path = prefix.Path;
+ var cnt = prefixes.Count;
+
+ for (var i = 0; i < cnt; i++) {
+ if (prefixes[i].Path == path) {
+ prefixes.RemoveAt (i);
+
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private static HttpListener searchHttpListenerFromSpecial (
+ string path, List prefixes
+ )
+ {
+ if (prefixes == null)
+ return null;
+
+ HttpListener ret = null;
+
+ var bestLen = -1;
+
+ foreach (var pref in prefixes) {
+ var prefPath = pref.Path;
+ var len = prefPath.Length;
+
+ if (len < bestLen)
+ continue;
+
+ if (path.StartsWith (prefPath, StringComparison.Ordinal)) {
+ bestLen = len;
+ ret = pref.Listener;
+ }
+ }
+
+ return ret;
+ }
+
+ #endregion
+
+ #region Internal Methods
+
+ internal static bool CertificateExists (int port, string folderPath)
+ {
+ if (folderPath == null || folderPath.Length == 0)
+ folderPath = _defaultCertFolderPath;
+
+ var cer = Path.Combine (folderPath, String.Format ("{0}.cer", port));
+ var key = Path.Combine (folderPath, String.Format ("{0}.key", port));
+
+ return File.Exists (cer) && File.Exists (key);
+ }
+
+ internal void RemoveConnection (HttpConnection connection)
+ {
+ lock (_unregisteredSync)
+ _unregistered.Remove (connection);
+ }
+
+ internal bool TrySearchHttpListener (Uri uri, out HttpListener listener)
+ {
+ listener = null;
+
+ if (uri == null)
+ return false;
+
+ var host = uri.Host;
+ var dns = Uri.CheckHostName (host) == UriHostNameType.Dns;
+ var port = uri.Port.ToString ();
+ var path = HttpUtility.UrlDecode (uri.AbsolutePath);
+
+ if (path[path.Length - 1] != '/')
+ path += "/";
+
+ if (host != null && host.Length > 0) {
+ var prefs = _prefixes;
+ var bestLen = -1;
+
+ foreach (var pref in prefs) {
+ if (dns) {
+ var prefHost = pref.Host;
+ var prefDns = Uri.CheckHostName (prefHost) == UriHostNameType.Dns;
+
+ if (prefDns) {
+ if (prefHost != host)
+ continue;
+ }
+ }
+
+ if (pref.Port != port)
+ continue;
+
+ var prefPath = pref.Path;
+ var len = prefPath.Length;
+
+ if (len < bestLen)
+ continue;
+
+ if (path.StartsWith (prefPath, StringComparison.Ordinal)) {
+ bestLen = len;
+ listener = pref.Listener;
+ }
+ }
+
+ if (bestLen != -1)
+ return true;
+ }
+
+ listener = searchHttpListenerFromSpecial (path, _unhandled);
+
+ if (listener != null)
+ return true;
+
+ listener = searchHttpListenerFromSpecial (path, _all);
+
+ return listener != null;
+ }
+
+ #endregion
+
+ #region Public Methods
+
+ public void AddPrefix (HttpListenerPrefix prefix)
+ {
+ List current, future;
+
+ if (prefix.Host == "*") {
+ do {
+ current = _unhandled;
+ future = current != null
+ ? new List (current)
+ : new List ();
+
+ addSpecial (future, prefix);
+ }
+ while (
+ Interlocked.CompareExchange (ref _unhandled, future, current) != current
+ );
+
+ return;
+ }
+
+ if (prefix.Host == "+") {
+ do {
+ current = _all;
+ future = current != null
+ ? new List (current)
+ : new List ();
+
+ addSpecial (future, prefix);
+ }
+ while (
+ Interlocked.CompareExchange (ref _all, future, current) != current
+ );
+
+ return;
+ }
+
+ do {
+ current = _prefixes;
+ var idx = current.IndexOf (prefix);
+
+ if (idx > -1) {
+ if (current[idx].Listener != prefix.Listener) {
+ var msg = String.Format (
+ "There is another listener for {0}.", prefix
+ );
+
+ throw new HttpListenerException (87, msg);
+ }
+
+ return;
+ }
+
+ future = new List