diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e964c77..e0ddbaa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,123 @@ +**2017-01-10** + +最新版本v7.2.2.0,适用于.NET Framework 2.0+ 和.NET Core + +更新:HTTP模块现在可以加入请求Header内容。 + +* * * + +**2017-01-09** + +最新版本v7.2.0.0,适用于.NET Framework 2.0+ 和.NET Core + +更新:函数命名风格统一,部分细节修改。 + +* * * + +**2017-01-06** + +最新版本v7.1.3.0,适用于.NET Framework 2.0+ 和.NET Core + +新增:`Qiniu.RS`模块增加`Bucket`功能,用于获取某bucket的属性信息。 + +修改:.NET Framework 4.0版本Http请求管理器改回HttpWebRequest/HttpWebResponse方式。 + +* * * + +**2017-01-05** + +最新版本v7.1.2.0,适用于.NET Framework 2.0+ 和.NET Core + +优化项目结构。 + +* * * + +**2017-01-03** + +最新版本v7.1.1.0,适用于.NET Framework 2.0+ 和.NET Core + +修复部分细节BUG + +更新CR.Date至2017 + +* * * + +**2016-12-30** + +最新版本v7.1.0.0,适用于.NET Framework 2.0+ 和.NET Core + +已发布至NuGet,请搜索`Qiniu.Shared` + +* * * + +**2016-12-30** + +最新版本v7.1.0.0,适用于.NET Framework 2.0+ 和.NET Core + +优化:HTTP返回消息(`HttpResult`)的对象复制操作(`Shadow`)中,参考信息(`RefText`)被正确叠加。 + +* * * + +**2016-12-29** + +最新版本v7.1.0.0,适用于.NET Framework 2.0+ 和.NET Core + +新增:HTTP请求的返回消息(`HttpResult`)中加入参考代码(`RefCode`)和参考信息(`RefInfo`) + +新增:断点/分片上传(`ResumableUploader`)加入CRC32校验及重试逻辑(参见`UploadFileAdvanced`的说明) + +* * * + +**2016-12-27** + +最新版本v7.1.0.0,适用于.NET Framework 2.0+ 和.NET Core + +* * * + +**2016-12-22** + +最新版本v7.1.0.0,适用于.NET Framework 4.0+ 和.NET Core + +新增:HTTPS支持(CDN/Fusion模块除外) + +* * * + +**2016-12-14** + +最新版本v7.1.0.0,适用于.NET Framework 4.0+ 和.NET Core + +新增:Fusion模块中增加HotLink("时间戳防盗链"功能) + +新增:UrlHelper增加URL分析(Host,Path,File,Query分拆) + +* * * + +**2016-12-12** + +最新版本v7.1.0.0,适用于.NET Framework 4.0+ 和.NET Core + +新增:增加代码文档 + +* * * + +**2016-12-08** + +最新版本v7.1.0.0,适用于.NET Framework 4.0+ 和.NET Core + +新增:优化代码易读性 + +* * * + +**2016-12-07** + +最新版本v7.1.0.0,适用于.NET Framework 4.0+ 和.NET Core + +新特性:.NET Framework 4.0+和.NET Core共用一套代码 + +新增:更新文件生命周期(BucketManager.UpdateLifecycle) + +* * * + **2016-12-01** 最新版本v7.0.0.5 diff --git "a/Docs/SDK\344\275\277\347\224\250\346\214\207\345\215\227v1.0.pdf" "b/Docs/SDK\344\275\277\347\224\250\346\214\207\345\215\227v1.0.pdf" deleted file mode 100644 index 3ebc7fde..00000000 Binary files "a/Docs/SDK\344\275\277\347\224\250\346\214\207\345\215\227v1.0.pdf" and /dev/null differ diff --git a/Docs/imgs/Auth.png b/Docs/imgs/Auth.png deleted file mode 100644 index da3a5499..00000000 Binary files a/Docs/imgs/Auth.png and /dev/null differ diff --git a/Docs/imgs/BucketManager.png b/Docs/imgs/BucketManager.png deleted file mode 100644 index 2a889974..00000000 Binary files a/Docs/imgs/BucketManager.png and /dev/null differ diff --git a/Docs/imgs/FormUploader.png b/Docs/imgs/FormUploader.png deleted file mode 100644 index 1c7920b2..00000000 Binary files a/Docs/imgs/FormUploader.png and /dev/null differ diff --git a/Docs/imgs/HttpManager.png b/Docs/imgs/HttpManager.png deleted file mode 100644 index bd9eddc5..00000000 Binary files a/Docs/imgs/HttpManager.png and /dev/null differ diff --git a/Docs/imgs/PutPolicy.png b/Docs/imgs/PutPolicy.png deleted file mode 100644 index dd658c90..00000000 Binary files a/Docs/imgs/PutPolicy.png and /dev/null differ diff --git a/Docs/imgs/ResumeUploader.png b/Docs/imgs/ResumeUploader.png deleted file mode 100644 index 9d21fe4d..00000000 Binary files a/Docs/imgs/ResumeUploader.png and /dev/null differ diff --git a/Docs/imgs/SDKdg.png b/Docs/imgs/SDKdg.png deleted file mode 100644 index 54172160..00000000 Binary files a/Docs/imgs/SDKdg.png and /dev/null differ diff --git a/Docs/imgs/UploadManager.png b/Docs/imgs/UploadManager.png deleted file mode 100644 index 8dc48bae..00000000 Binary files a/Docs/imgs/UploadManager.png and /dev/null differ diff --git a/Docs/imgs/pfop.png b/Docs/imgs/pfop.png deleted file mode 100644 index 879faa81..00000000 Binary files a/Docs/imgs/pfop.png and /dev/null differ diff --git a/LICENSE b/LICENSE index 800439d3..c13b41d8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 Jemy Graw +Copyright (c) 2017 http://fengyh.cn/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Qiniu.Test/BucketManagerTest.cs b/Qiniu.Test/BucketManagerTest.cs deleted file mode 100644 index 557ee277..00000000 --- a/Qiniu.Test/BucketManagerTest.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Qiniu.Storage; -using Qiniu.Util; -using Qiniu.Storage.Model; - -namespace QiniuTest -{ - /// - /// Test class of BucketManager - /// - [TestClass] - public class BucketManagerTest - { - /// - /// get/set - /// - public TestContext Instance - { - get; - set; - } - - /// - /// Test method of BucketManager - /// - [TestMethod] - public void bktMgrTest() - { - //Settings.load(); - Settings.LoadFromFile(); - string testResUrl = "http://test.fengyh.cn/qiniu/files/hello.txt"; - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - BucketManager target = new BucketManager(mac); - - target.fetch(testResUrl, Settings.Bucket, "test_BucketManager.txt"); - - target.stat(Settings.Bucket, "test_BucketManager.txt"); - - target.copy(Settings.Bucket, "test_BucketManager.txt", Settings.Bucket, "copy_BucketManager.txt", true); - - target.move(Settings.Bucket, "copy_BucketManager.txt", Settings.Bucket, "move_BucketManager.txt", true); - - target.delete(Settings.Bucket, "test_BucketManager.txt"); - - DomainsResult domainsResult = target.domains(Settings.Bucket); - - BucketsResult bucketsResult = target.buckets(); - } - } -} diff --git a/Qiniu.Test/FormUploaderTest.cs b/Qiniu.Test/FormUploaderTest.cs deleted file mode 100644 index d40f8acb..00000000 --- a/Qiniu.Test/FormUploaderTest.cs +++ /dev/null @@ -1,119 +0,0 @@ -using Qiniu.Storage; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System.Text; -using Qiniu.Util; -using Qiniu.Http; - -namespace QiniuTest -{ - /// - ///This is a test class for FormUploaderTest and is intended - ///to contain all FormUploaderTest Unit Tests - /// - [TestClass()] - public class FormUploaderTest - { - private TestContext testContextInstance; - - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get - { - return testContextInstance; - } - set - { - testContextInstance = value; - } - } - - #region Additional test attributes - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - //[ClassInitialize()] - //public static void MyClassInitialize(TestContext testContext) - //{ - //} - // - //Use ClassCleanup to run code after all tests in a class have run - //[ClassCleanup()] - //public static void MyClassCleanup() - //{ - //} - // - //Use TestInitialize to run code before running each test - //[TestInitialize()] - //public void MyTestInitialize() - //{ - //} - // - //Use TestCleanup to run code after each test has run - //[TestCleanup()] - //public void MyTestCleanup() - //{ - //} - // - #endregion - - - /// - ///A test for uploadData - /// - [TestMethod()] - public void uploadDataTest() - { - //Settings.load(); - Settings.LoadFromFile("F:\\test.cfg"); - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - FormUploader target = new FormUploader(); - byte[] data = Encoding.UTF8.GetBytes("hello world"); - string key = "test_FormUploaderUploadData.txt"; - - PutPolicy putPolicy = new PutPolicy(); - putPolicy.Scope = Settings.Bucket; - putPolicy.SetExpires(3600); - putPolicy.DeleteAfterDays = 1; - string token = Auth.createUploadToken(putPolicy, mac); - UploadOptions uploadOptions = null; - UpCompletionHandler upCompletionHandler = new UpCompletionHandler(delegate(string fileKey, ResponseInfo respInfo, string response) - { - Assert.AreEqual(200, respInfo.StatusCode); - }); - target.uploadData(data, key, token, uploadOptions, upCompletionHandler); - } - - /// - ///A test for uploadFile - /// - [TestMethod()] - public void uploadFileTest() - { - //Settings.load(); - Settings.LoadFromFile(); - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - string key = "test_FormUploaderUploadFile.png"; - - FormUploader target = new FormUploader(); - string filePath = "F:\\test.png"; - - PutPolicy putPolicy = new PutPolicy(); - putPolicy.Scope = Settings.Bucket; - putPolicy.SetExpires(3600); - putPolicy.DeleteAfterDays = 1; - string token = Auth.createUploadToken(putPolicy, mac); - UploadOptions uploadOptions = null; - - UpCompletionHandler upCompletionHandler = new UpCompletionHandler(delegate(string fileKey, ResponseInfo respInfo, string response) - { - Assert.AreEqual(200, respInfo.StatusCode); - }); - target.uploadFile(filePath, key, token, uploadOptions, upCompletionHandler); - } - } -} diff --git a/Qiniu.Test/FusionManagerTest.cs b/Qiniu.Test/FusionManagerTest.cs deleted file mode 100644 index 8ebd475e..00000000 --- a/Qiniu.Test/FusionManagerTest.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Qiniu.Fusion; -using Qiniu.Fusion.Model; -using Qiniu.Util; - -namespace QiniuTest -{ - /// - /// Test class of BucketManager - /// - [TestClass] - public class FusionManagerTest - { - /// - /// get/set - /// - public TestContext Instance - { - get; - set; - } - - /// - /// Test method of BucketManager - /// - [TestMethod] - public void fusionMgrTest() - { - //Settings.load(); - Settings.LoadFromFile(); - string testResUrl = "http://test.fengyh.cn/qiniu/files/hello.txt"; - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - FusionManager target = new FusionManager(mac); - - // - } - } -} diff --git a/Qiniu.Test/HttpManager2Test.cs b/Qiniu.Test/HttpManager2Test.cs deleted file mode 100644 index aecf490e..00000000 --- a/Qiniu.Test/HttpManager2Test.cs +++ /dev/null @@ -1,104 +0,0 @@ -using Qiniu.Http; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; -using System.Collections.Generic; - -namespace QiniuTest -{ - - - /// - ///This is a test class for HttpManager2Test and is intended - ///to contain all HttpManager2Test Unit Tests - /// - [TestClass()] - public class HttpManager2Test - { - - - private TestContext testContextInstance; - - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get - { - return testContextInstance; - } - set - { - testContextInstance = value; - } - } - - #region Additional test attributes - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - //[ClassInitialize()] - //public static void MyClassInitialize(TestContext testContext) - //{ - //} - // - //Use ClassCleanup to run code after all tests in a class have run - //[ClassCleanup()] - //public static void MyClassCleanup() - //{ - //} - // - //Use TestInitialize to run code before running each test - //[TestInitialize()] - //public void MyTestInitialize() - //{ - //} - // - //Use TestCleanup to run code after each test has run - //[TestCleanup()] - //public void MyTestCleanup() - //{ - //} - // - #endregion - - - /// - ///A test for reqGet - /// - [TestMethod()] - public void reqGetTest() - { - HttpManager target = new HttpManager(); - string url = "http://ip.taobao.com/service/getIpInfo.php?ip=100.123.199.44"; - Dictionary pHeaders = new Dictionary(); - pHeaders.Add("X-Reqid", "TestReqId"); - CompletionHandler pCompletionHandler = new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - Assert.AreEqual(respInfo.StatusCode, 200); - }); - target.get(url, pHeaders, pCompletionHandler); - } - - /// - ///A test for reqPost - /// - [TestMethod()] - public void reqPostTest() - { - HttpManager target = new HttpManager(); - string pUrl = "http://ip.taobao.com/service/getIpInfo.php"; - Dictionary pHeaders = new Dictionary(); - Dictionary pPostParams = new Dictionary(); - pPostParams.Add("ip", new string[] { "100.123.199.44", "100.123.199.45" }); - - CompletionHandler pCompletionHandler = new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - Assert.AreEqual(respInfo.StatusCode, 200); - }); - target.postForm(pUrl, pHeaders, pPostParams, pCompletionHandler); - } - } -} diff --git a/Qiniu.Test/Properties/AssemblyInfo.cs b/Qiniu.Test/Properties/AssemblyInfo.cs deleted file mode 100644 index e754142a..00000000 --- a/Qiniu.Test/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -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("Qiniu Cloud Storage C# SDK Test")] -[assembly: AssemblyDescription("Qiniu Cloud Storage C# SDK Test")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("QINIU")] -[assembly: AssemblyProduct("Qiniu.Test")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[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("536c8b17-af56-42db-b48e-241fc09ce6d2")] - -// 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")] diff --git a/Qiniu.Test/Qiniu.Test.csproj b/Qiniu.Test/Qiniu.Test.csproj deleted file mode 100644 index fddc75ea..00000000 --- a/Qiniu.Test/Qiniu.Test.csproj +++ /dev/null @@ -1,106 +0,0 @@ - - - - Debug - AnyCPU - {353CEFE0-58AF-4049-998B-336CE1212F1E} - Library - Properties - Qiniu.Test - Qiniu.Test - v4.0 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - true - full - false - ..\bin\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\bin\ - TRACE - prompt - 4 - - - - ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll - - - - 4.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {E5A764FD-FC95-4B51-BB10-9A807ED25652} - Qiniu - - - - - - - False - - - False - - - False - - - False - - - - - - - - \ No newline at end of file diff --git a/Qiniu.Test/ResumeUploaderTest.cs b/Qiniu.Test/ResumeUploaderTest.cs deleted file mode 100644 index 8b7fc61b..00000000 --- a/Qiniu.Test/ResumeUploaderTest.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Qiniu.Storage; -using Qiniu.Util; -using Qiniu.Storage.Persistent; -using System.IO; - -namespace QiniuTest -{ - /// - /// Test class of ResumeUploader - /// - [TestClass] - public class ResumeUploaderTest - { - /// - /// get/set - /// - public TestContext Instance - { - get; - set; - } - - /// - /// Test method of BucketManager - /// - [TestMethod] - public void resumeUploadTest() - { - //Settings.load(); - Settings.LoadFromFile(); - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - - ResumeRecorder recorder = new ResumeRecorder("dir"); - string token = ""; - ResumeUploader target = new ResumeUploader(recorder, "big.record", "F:\\big.dat", "big_ResumeUpload.dat", token, null, null); - target.uploadFile(); - - } - } -} diff --git a/Qiniu.Test/Settings.cs b/Qiniu.Test/Settings.cs deleted file mode 100644 index 557b2e74..00000000 --- a/Qiniu.Test/Settings.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace QiniuTest -{ - class Settings - { - //see ak sk from https://portal.qiniu.com/user/key - public static string AccessKey; - public static string SecretKey; - public static string Bucket; - private static bool loaded = false; - - public static void load() - { - if (!loaded) - { - AccessKey = ""; - SecretKey = ""; - Bucket = ""; - - loaded = true; - } - } - - /// - /// 仅在测试时使用,文本文件(cFile)中逐行存放:AK,SK,Bucket - /// - /// - public static void LoadFromFile(string cFile="F:\\test.cfg") - { - if (!loaded) - { - using (System.IO.StreamReader sr = new System.IO.StreamReader(cFile)) - { - AccessKey = sr.ReadLine(); - SecretKey = sr.ReadLine(); - Bucket = sr.ReadLine(); - sr.Close(); - } - - loaded = true; - } - } - } -} diff --git a/Qiniu.Test/UploadManagerTest.cs b/Qiniu.Test/UploadManagerTest.cs deleted file mode 100644 index eed1c4c2..00000000 --- a/Qiniu.Test/UploadManagerTest.cs +++ /dev/null @@ -1,122 +0,0 @@ -using Qiniu.Storage; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Qiniu.Util; -using Qiniu.Http; -using System.IO; - -namespace QiniuTest -{ - - - /// - ///This is a test class for UploadManagerTest and is intended - ///to contain all UploadManagerTest Unit Tests - /// - [TestClass()] - public class UploadManagerTest - { - - - private TestContext testContextInstance; - - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get - { - return testContextInstance; - } - set - { - testContextInstance = value; - } - } - - #region Additional test attributes - // - //You can use the following additional attributes as you write your tests: - // - //Use ClassInitialize to run code before running the first test in the class - //[ClassInitialize()] - //public static void MyClassInitialize(TestContext testContext) - //{ - //} - // - //Use ClassCleanup to run code after all tests in a class have run - //[ClassCleanup()] - //public static void MyClassCleanup() - //{ - //} - // - //Use TestInitialize to run code before running each test - //[TestInitialize()] - //public void MyTestInitialize() - //{ - //} - // - //Use TestCleanup to run code after each test has run - //[TestCleanup()] - //public void MyTestCleanup() - //{ - //} - // - #endregion - - - /// - ///A test for uploadFile - /// - [TestMethod()] - public void uploadFileTest() - { - //Settings.load(); - Settings.LoadFromFile(); - UploadManager target = new UploadManager(); - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - string key = "test_UploadManagerUploadFile.png"; - string filePath = "F:\\test.png"; - - PutPolicy putPolicy = new PutPolicy(); - putPolicy.Scope = Settings.Bucket; - putPolicy.SetExpires(3600); - putPolicy.DeleteAfterDays = 1; - string token = Auth.createUploadToken(putPolicy, mac); - UploadOptions uploadOptions = null; - - UpCompletionHandler upCompletionHandler = new UpCompletionHandler(delegate (string fileKey, ResponseInfo respInfo, string response) - { - Assert.AreEqual(200, respInfo.StatusCode); - }); - target.uploadFile(filePath, key, token, uploadOptions, upCompletionHandler); - } - - [TestMethod()] - public void uploadStreamTest() - { - //Settings.load(); - Settings.LoadFromFile(); - UploadManager target = new UploadManager(); - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - string key = "test_UploadManagerUploadStream.png"; - string filePath = "F:\\test.png"; - - FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read); - - PutPolicy putPolicy = new PutPolicy(); - putPolicy.Scope = Settings.Bucket; - putPolicy.SetExpires(3600); - putPolicy.DeleteAfterDays = 1; - string token = Auth.createUploadToken(putPolicy, mac); - UploadOptions uploadOptions = null; - - UpCompletionHandler upCompletionHandler = new UpCompletionHandler(delegate (string fileKey, ResponseInfo respInfo, string response) - { - Assert.AreEqual(200, respInfo.StatusCode); - }); - target.uploadStream(fs, key, token, uploadOptions, upCompletionHandler); - } - } -} diff --git a/Qiniu.Test/ZoneConfigTest.cs b/Qiniu.Test/ZoneConfigTest.cs deleted file mode 100644 index b2aa1607..00000000 --- a/Qiniu.Test/ZoneConfigTest.cs +++ /dev/null @@ -1,64 +0,0 @@ -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Qiniu.Common; - -namespace QiniuTest -{ - /// - /// Zone&Config - /// - [TestClass()] - public class ZoneConfigTest - { - private TestContext testContextInstance; - - /// - ///Gets or sets the test context which provides - ///information about and functionality for the current test run. - /// - public TestContext TestContext - { - get - { - return testContextInstance; - } - set - { - testContextInstance = value; - } - } - - /// - /// A test for Zone - /// - [TestMethod()] - public void zoneTest() - { - Zone v1 = new Zone(); - Zone v2 = Zone.ZONE_CN_East(); - Zone v3 = Zone.ZONE_CN_North(); - Zone v4 = Zone.ZONE_CN_South(); - Zone v5 = Zone.ZONE_US_North(); - } - - /// - /// A test for AutoZone - /// 设置AK和Bucket后通过测试 - /// - [TestMethod()] - public void autoZoneTest() - { - //Settings.load(); - Settings.LoadFromFile(); - ZoneID zid = AutoZone.Query(Settings.AccessKey, Settings.Bucket); - } - - /// - /// A test for Config - /// - [TestMethod()] - public void configTest() - { - Config.ConfigZone(ZoneID.CN_East); - } - } -} diff --git a/Qiniu/Common/Config.cs b/Qiniu/Common/Config.cs deleted file mode 100644 index 003c5123..00000000 --- a/Qiniu/Common/Config.cs +++ /dev/null @@ -1,80 +0,0 @@ - -namespace Qiniu.Common -{ - /// - /// 配置信息,主要包括Zone配置 - /// - public class Config - { - // SDK的版本号 - 更新至7.0.0.5 - public const string VERSION = "7.0.0.5"; - - // 上传时,是否使用CDN (默认:否) - public static bool UploadFromCDN = false; - - // 空间所在的区域(Zone) - public static Zone ZONE = Zone.ZONE_Default(); - - // Fusion API - public const string FUSION_API_HOST = "http://fusion.qiniuapi.com"; - - //分片上传块的大小,固定为4M,不可修改 - public const int BLOCK_SIZE = 4 * 1024 * 1024; - - //上传失败重试次数 - public static int RETRY_MAX = 5; - - // 上传重试是否启用时间间隔 (默认:否) - public static bool RetryWaitForNext = false; - - // 上传重试的时间间隔(单位:毫秒, 默认1000ms) - public static int RETRY_INTERVAL_MILISEC = 1000; - - //回复超时时间,单位微秒 - public const int TIMEOUT_INTERVAL = 30 * 1000; - - //分片上传切片大小 - public static int CHUNK_SIZE = 2 * 1024 * 1024; - - //分片上传的阈值,文件超过该大小采用分片上传 - public static int PUT_THRESHOLD = 512 * 1024; - - /// - /// 根据Zone配置对应参数(RS_HOST,API_HOST等) - /// - /// ZoneID - public static void ConfigZone(ZoneID zoneId) - { - switch (zoneId) - { - case ZoneID.CN_East: - ZONE = Zone.ZONE_CN_East(); - break; - case ZoneID.CN_North: - ZONE = Zone.ZONE_CN_North(); - break; - case ZoneID.CN_South: - ZONE = Zone.ZONE_CN_South(); - break; - case ZoneID.US_North: - ZONE = Zone.ZONE_US_North(); - break; - default: - ZONE = Zone.ZONE_Default(); - break; - } - } - - /// - /// 自动配置Zone - /// - /// - /// - public static void ConfigZoneAuto(string accessKey,string bucket) - { - ZoneID zoneId = AutoZone.Query(accessKey, bucket); - ConfigZone(zoneId); - } - - } -} \ No newline at end of file diff --git a/Qiniu/Common/Zone.cs b/Qiniu/Common/Zone.cs deleted file mode 100644 index 63424ece..00000000 --- a/Qiniu/Common/Zone.cs +++ /dev/null @@ -1,122 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Net; -using System.IO; - -namespace Qiniu.Common -{ - /// 华东(CN_East) - /// 华北(CN_North) - /// 华南(CN_South) - /// 北美(US_North) - public enum ZoneID - { - CN_East, - CN_North, - CN_South, - US_North, - Default=CN_East - }; - - /// - /// 目前已支持的区域:华东/华北/华南/北美 - /// - public class Zone - { - // 资源管理 - public string RsHost { set; get; } - - // 资源列表 - public string RsfHost { set; get; } - - // 数据处理 - public string ApiHost { set; get; } - - // 镜像刷新、资源抓取 - public string IovipHost { set; get; } - - // 资源上传 - public string UpHost { set; get; } - - // CDN加速 - public string UploadHost { set; get; } - - /// - /// 默认(华东) - /// - /// - public static Zone ZONE_Default() - { - return ZONE_CN_East(); - } - - /// - /// 华东 - /// xx-(NULL) - /// - public static Zone ZONE_CN_East() - { - return new Zone() - { - RsHost = "http://rs.qbox.me", - RsfHost = "http://rsf.qbox.me", - ApiHost = "http://api.qiniu.com", - IovipHost = "http://iovip.qbox.me", - UpHost = "http://up.qiniu.com", - UploadHost = "http://upload.qiniu.com" - }; - } - - /// - /// 华北 - /// xx-z1 - /// - public static Zone ZONE_CN_North() - { - return new Zone() - { - RsHost = "http://rs-z1.qbox.me", - RsfHost = "http://rsf-z1.qbox.me", - ApiHost = "http://api-z1.qiniu.com", - IovipHost = "http://iovip-z1.qbox.me", - UpHost = "http://up-z1.qiniu.com", - UploadHost = "http://upload-z1.qiniu.com" - }; - } - - /// - /// 华南 - /// xx-z2 - /// - public static Zone ZONE_CN_South() - { - return new Zone() - { - RsHost = "http://rs-z2.qbox.me", - RsfHost = "http://rsf-z2.qbox.me", - ApiHost = "http://api-z2.qiniu.com", - IovipHost = "http://iovip-z2.qbox.me", - UpHost = "http://up-z2.qiniu.com", - UploadHost = "http://upload-z2.qiniu.com" - }; - } - - /// - /// 北美 - /// xx-na0 - /// - public static Zone ZONE_US_North() - { - return new Zone() - { - RsHost = "http://rs-na0.qbox.me", - RsfHost = "http://rsf-na0.qbox.me", - ApiHost = "http://api-na0.qiniu.com", - IovipHost = "http://iovip-na0.qbox.me", - UpHost = "http://up-na0.qiniu.com", - UploadHost = "http://upload-na0.qiniu.com" - }; - } - - } -} diff --git a/Qiniu/Fusion/FusionManager.cs b/Qiniu/Fusion/FusionManager.cs deleted file mode 100644 index 7f86148c..00000000 --- a/Qiniu/Fusion/FusionManager.cs +++ /dev/null @@ -1,230 +0,0 @@ -using System; -using System.Security.Cryptography; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Qiniu.Util; -using Qiniu.Fusion.Model; -using System.Net; -using Qiniu.Http; -using Newtonsoft.Json; -using System.Text.RegularExpressions; - -namespace Qiniu.Fusion -{ - public class FusionManager - { - private Mac mac; - private HttpManager httpMgr; - - public FusionManager(Mac mac) - { - this.mac = mac; - httpMgr = new HttpManager(); - } - - private string refreshUrl() - { - return string.Format("{0}/v2/tune/refresh", Common.Config.FUSION_API_HOST); - } - - private string prefetchUrl() - { - return string.Format("{0}/v2/tune/prefetch", Common.Config.FUSION_API_HOST); - } - - private string bandwidthUrl() - { - return string.Format("{0}/v2/tune/bandwidth", Common.Config.FUSION_API_HOST); - } - - private string fluxUrl() - { - return string.Format("{0}/v2/tune/flux", Common.Config.FUSION_API_HOST); - } - - private string loglistUrl() - { - return string.Format("{0}/v2/tune/log/list", Common.Config.FUSION_API_HOST); - } - - /// - /// 缓存刷新 - /// - /// - /// - public RefreshResult Refresh(RefreshRequest request) - { - RefreshResult result = new RefreshResult(); - - string url = refreshUrl(); - string body = request.ToJsonStr(); - byte[] data = Encoding.UTF8.GetBytes(body); - - string token = Auth.createManageToken(url, null, mac); - - Dictionary headers = new Dictionary(); - headers.Add("Authorization", token); - - httpMgr.postData(url, headers, data, HttpManager.FORM_MIME_JSON, - new CompletionHandler(delegate(ResponseInfo respInfo,string respJson) - { - if(respInfo.StatusCode!=200) - { - Console.WriteLine(respInfo); - } - - result = JsonConvert.DeserializeObject(respJson); - })); - - - return result; - } - - /// - /// 文件预取 - /// - /// - /// - public PrefetchResult Prefetch(PrefetchRequest request) - { - PrefetchResult result = new PrefetchResult(); - - string url = prefetchUrl(); - string body = request.ToJsonStr(); - byte[] data = Encoding.UTF8.GetBytes(body); - - string token = Auth.createManageToken(url, null, mac); - - Dictionary headers = new Dictionary(); - headers.Add("Authorization", token); - - httpMgr.postData(url, headers, data, HttpManager.FORM_MIME_JSON, - new CompletionHandler(delegate (ResponseInfo respInfo, string respJson) - { - if (respInfo.StatusCode != 200) - { - Console.WriteLine(respInfo); - } - - result = JsonConvert.DeserializeObject(respJson); - })); - - return result; - } - - /// - /// 带宽 - /// - /// - /// - public BandwidthResult Bandwidth(BandwidthRequest request) - { - BandwidthResult result = new BandwidthResult(); - - string url = bandwidthUrl(); - string body = request.ToJsonStr(); - byte[] data = Encoding.UTF8.GetBytes(body); - - string token = Auth.createManageToken(url, null, mac); - - Dictionary headers = new Dictionary(); - headers.Add("Authorization", token); - - httpMgr.postData(url, headers, data, HttpManager.FORM_MIME_JSON, - new CompletionHandler(delegate (ResponseInfo respInfo, string respJson) - { - if (respInfo.StatusCode != 200) - { - Console.WriteLine(respInfo); - } - - result = JsonConvert.DeserializeObject(respJson); - })); - - return result; - } - - /// - /// 流量 - /// - /// - /// - public FluxResult Flux(FluxRequest request) - { - FluxResult result = new FluxResult(); - - string url = fluxUrl(); - string body = request.ToJsonStr(); - byte[] data = Encoding.UTF8.GetBytes(body); - - string token = Auth.createManageToken(url, null, mac); - - Dictionary headers = new Dictionary(); - headers.Add("Authorization", token); - - httpMgr.postData(url, headers, data, HttpManager.FORM_MIME_JSON, - new CompletionHandler(delegate (ResponseInfo respInfo, string respJson) - { - if (respInfo.StatusCode != 200) - { - Console.WriteLine(respInfo); - } - - result = JsonConvert.DeserializeObject(respJson); - })); - - return result; - } - - /// - /// 日志列表 - /// - /// - /// - public LogListResult LogList(LogListRequest request) - { - LogListResult result = new LogListResult(); - - string url = loglistUrl(); - string body = request.ToJsonStr(); - byte[] data = Encoding.UTF8.GetBytes(body); - - string token = Auth.createManageToken(url, null, mac); - - Dictionary headers = new Dictionary(); - headers.Add("Authorization", token); - - httpMgr.postData(url, headers, data, HttpManager.FORM_MIME_JSON, - new CompletionHandler(delegate (ResponseInfo respInfo, string respJson) - { - result = JsonConvert.DeserializeObject(respJson); - result.Code = respInfo.StatusCode; - if (respInfo.StatusCode != 200) - { - Console.WriteLine(respInfo); - } - })); - - return result; - } - - /// - /// 时间戳防盗链 - /// - /// - /// - public string HotLink(HotLinkRequest request) - { - string RAW = request.RawUrl; - - string key = request.Key; - string path = Uri.EscapeUriString(request.Path); - string file = request.File; - string ts = (int.Parse(request.Timestamp)).ToString("x"); - string SIGN = StringUtils.md5Hash(key + path + file + ts); - - return string.Format("{0}&sign={1}&t={2}", RAW, SIGN, ts); - } - } -} diff --git a/Qiniu/Fusion/Model/BandwidthResult.cs b/Qiniu/Fusion/Model/BandwidthResult.cs deleted file mode 100644 index 64470d38..00000000 --- a/Qiniu/Fusion/Model/BandwidthResult.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System.Collections.Generic; -using System.Text; - -namespace Qiniu.Fusion.Model -{ - public class BandwidthResult - { - public int Code { get; set; } - - public string Error { get; set; } - - public List Time { get; set; } - - public Dictionary Data { get; set; } - - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - - sb.AppendFormat("code:{0}\n", Code); - sb.AppendFormat("error:{0}\n", Error); - sb.Append("time:"); - foreach (var t in Time) - { - sb.Append(t + " "); - } - sb.Append("\n"); - sb.Append("bandwidth:"); - foreach (var kvp in Data) - { - sb.AppendFormat("{0}:\n{1}\n", kvp.Key, kvp.Value); - } - sb.Append("\n"); - - return sb.ToString(); - } - } - - public class BandWidthData - { - public List China { get; set; } - - public List Oversea { get; set; } - - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("China:"); - if (China != null) - { - foreach (var c in China) - { - sb.AppendFormat("{0} ", c); - } - } - sb.Append("\n"); - sb.Append("Oversea:"); - if (Oversea != null) - { - foreach (var x in Oversea) - { - sb.AppendFormat("{0} ", x); - } - } - sb.Append("\n"); - - return sb.ToString(); - } - } -} diff --git a/Qiniu/Fusion/Model/FluxResult.cs b/Qiniu/Fusion/Model/FluxResult.cs deleted file mode 100644 index e20fe8e6..00000000 --- a/Qiniu/Fusion/Model/FluxResult.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System.Collections.Generic; -using System.Text; - -namespace Qiniu.Fusion.Model -{ - public class FluxResult - { - public int Code { get; set; } - - public string Error { get; set; } - - public List Time { get; set; } - - public Dictionary Data { get; set; } - - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - - sb.AppendFormat("code:{0}\n", Code); - sb.AppendFormat("error:{0}\n", Error); - sb.Append("time:"); - foreach (var t in Time) - { - sb.Append(t + " "); - } - sb.Append("\n"); - sb.Append("flux:"); - foreach (var kvp in Data) - { - sb.AppendFormat("{0}:\n{1}\n", kvp.Key, kvp.Value); - } - sb.Append("\n"); - - return sb.ToString(); - } - - public class FluxData - { - public List China { get; set; } - - public List Oversea { get; set; } - - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("China:"); - if (China != null) - { - foreach (var c in China) - { - sb.AppendFormat("{0} ", c); - } - } - sb.Append("\n"); - sb.Append("Oversea:"); - if (Oversea != null) - { - foreach (var x in Oversea) - { - sb.AppendFormat("{0} ", x); - } - } - sb.Append("\n"); - - return sb.ToString(); - } - } - - } -} diff --git a/Qiniu/Fusion/Model/HotLinkRequest.cs b/Qiniu/Fusion/Model/HotLinkRequest.cs deleted file mode 100644 index 07abb3ae..00000000 --- a/Qiniu/Fusion/Model/HotLinkRequest.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Qiniu.Util; - -namespace Qiniu.Fusion.Model -{ - public class HotLinkRequest - { - public string RawUrl - { - get - { - return Host + Path + File + Query; - } - } - - public string Host { get; set; } - - public string Path { get; set; } - - public string File { get; set; } - - public string Query { get; set; } - - public string Key { get; set; } - - public string Timestamp { get; set; } - - public HotLinkRequest() - { - Host = ""; - Path = ""; - File = ""; - Query = ""; - Key = ""; - Timestamp = ""; - } - - public HotLinkRequest(string url, string key, int expire) - { - string host, path, file, query; - UrlHelper.UrlSplit(url, out host, out path, out file, out query); - - Host = host; - Path = path; - File = file; - Query = query; - Key = key; - - SetLinkExpire(expire); - } - - public void SetLinkExpire(int seconds) - { - DateTime dt0 = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); - DateTime dt1 = DateTime.Now.AddSeconds(seconds); - TimeSpan tsx = dt1.Subtract(dt0); - string sts = tsx.Ticks.ToString(); - Timestamp = sts.Substring(0, sts.Length - 7); - } - - public void SetLinkExpire(DateTime stopAt) - { - DateTime dt0 = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); - TimeSpan tsx = stopAt.Subtract(dt0); - string sts = tsx.Ticks.ToString(); - Timestamp = sts.Substring(0, sts.Length - 7); - } - } -} diff --git a/Qiniu/Fusion/Model/LogListResult.cs b/Qiniu/Fusion/Model/LogListResult.cs deleted file mode 100644 index 1978179d..00000000 --- a/Qiniu/Fusion/Model/LogListResult.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System.Collections.Generic; -using System.Text; - -namespace Qiniu.Fusion.Model -{ - public class LogListResult - { - public int Code { get; set; } - - public string Error { get; set; } - - public Dictionary> Data { get; set; } - - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - - sb.AppendFormat("code:{0}\n", Code); - sb.AppendFormat("error:{0}\n", Error); - sb.Append("logs:\n"); - if (Data != null) - { - foreach (var key in Data.Keys) - { - sb.AppendFormat("{0}:\n", key); - foreach (var s in Data[key]) - { - sb.Append(s + " "); - } - sb.Append("\n"); - } - } - - return sb.ToString(); - } - } - - public class LogData - { - // 文件名 - public string Name { get; set; } - - // 文件大小,单位为 Byte - public long Size { get; set; } - - // 文件修改时间,Unix 时间戳 - public long Mtime { get; set; } - - // 下载链接 - public string Url { get; set; } - - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - - sb.AppendFormat("name:{0}\n", Name); - sb.AppendFormat("size:{0}\n", Size); - sb.AppendFormat("mtime:{0}\n", Mtime); - sb.AppendFormat("url:{0}\n", Url); - - return sb.ToString(); - } - } -} diff --git a/Qiniu/Fusion/Model/PrefetchRequest.cs b/Qiniu/Fusion/Model/PrefetchRequest.cs deleted file mode 100644 index 95f04ae3..00000000 --- a/Qiniu/Fusion/Model/PrefetchRequest.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Collections.Generic; -using System.Text; - -namespace Qiniu.Fusion.Model -{ - public class PrefetchRequest - { - public List Urls { get; set; } - - public PrefetchRequest() - { - Urls = new List(); - } - - public PrefetchRequest(IEnumerable urls) - { - Urls = new List(urls); - } - - public void AddUrls(IEnumerable urls) - { - Urls.AddRange(urls); - } - - public string ToJsonStr() - { - StringBuilder sb = new StringBuilder(); - sb.Append("{ "); - - sb.Append("\"urls\":["); - for (int i = 0; i < Urls.Count; ++i) - { - string url = Urls[i]; - if (!UrlHelper.IsValidUrl(url)) - { - continue; - } - - if (i < Urls.Count - 1) - { - sb.Append(string.Format("\"{0}\",", url)); - } - else - { - sb.Append(string.Format("\"{0}\"", url)); - } - } - sb.Append("] }"); - - return sb.ToString(); - } - } -} diff --git a/Qiniu/Fusion/Model/PrefetchResult.cs b/Qiniu/Fusion/Model/PrefetchResult.cs deleted file mode 100644 index 84899032..00000000 --- a/Qiniu/Fusion/Model/PrefetchResult.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.Collections.Generic; -using System.Text; - -namespace Qiniu.Fusion.Model -{ - public class PrefetchResult - { - public int Code { get; set; } - - public string Error { get; set; } - - public string RequestId { get; set; } - - public List InvalidUrls { get; set; } - - public int QuotaDay { get; set; } - - public int SurplusaDay { get; set; } - - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - - sb.AppendFormat("code:{0}\n", Code); - sb.AppendFormat("error:{0}\n", Error); - sb.AppendFormat("requestId:{0}\n", RequestId); - sb.Append("invalidUrls:"); - if (InvalidUrls != null) - { - foreach (var s in InvalidUrls) - { - sb.Append(s + " "); - } - } - sb.Append("\n"); - sb.AppendFormat("quotaDay:{0}\n", QuotaDay); - sb.AppendFormat("surplusaDay:{0}\n", SurplusaDay); - - return sb.ToString(); - } - } -} diff --git a/Qiniu/Fusion/Model/RefreshResult.cs b/Qiniu/Fusion/Model/RefreshResult.cs deleted file mode 100644 index b9d27af5..00000000 --- a/Qiniu/Fusion/Model/RefreshResult.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Qiniu.Fusion.Model -{ - public class RefreshResult - { - public int Code { get; set; } - - public string Error { get; set; } - - public string RequestId { get; set; } - - public List InvalidUrls { get; set; } - - public List InvalidDirs { get; set; } - - public int UrlQuotaDay { get; set; } - - public int UrlSurplusaDay { get; set; } - - public int DirQuotaDay { get; set; } - - public int DirSurplusaDay { get; set; } - - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - - sb.AppendFormat("code:{0}\n", Code); - sb.AppendFormat("error:{0}\n", Error); - sb.AppendFormat("requestId:{0}\n", RequestId); - sb.Append("invalidUrls:"); - if (InvalidUrls != null) - { - foreach (var s in InvalidUrls) - { - sb.Append(s + " "); - } - } - sb.Append("\n"); - sb.Append("invalidDirs:"); - if (InvalidDirs != null) - { - foreach (var s in InvalidDirs) - { - sb.Append(s + " "); - } - } - sb.Append("\n"); - sb.AppendFormat("urlQuotaDay:{0}\n", UrlQuotaDay); - sb.AppendFormat("urlSurplusaDay:{0}\n", UrlSurplusaDay); - sb.AppendFormat("dirQuotaDay:{0}\n", DirQuotaDay); - sb.AppendFormat("dirSurplusaDay:{0}\n", DirSurplusaDay); - - return sb.ToString(); - } - } -} diff --git a/Qiniu/Fusion/Model/UrlHelper.cs b/Qiniu/Fusion/Model/UrlHelper.cs deleted file mode 100644 index dde2ab54..00000000 --- a/Qiniu/Fusion/Model/UrlHelper.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System.Text.RegularExpressions; - -namespace Qiniu.Fusion.Model -{ - public class UrlHelper - { - private static Regex regx = new Regex(@"(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?"); - - private static Regex regu = new Regex(@"(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,/~\+#]*)?"); - - private static Regex regd = new Regex(@"(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,/~\+#]*)?/"); - - public static bool IsValidUrl(string _url) - { - return regx.IsMatch(_url); - } - - public static bool IsNormalUrl(string _url) - { - return regu.IsMatch(_url); - } - - public static bool IsValidDir(string _dir) - { - return regd.IsMatch(_dir); - } - - public static string GetNormalUrl(string _url) - { - var m = regu.Match(_url); - return m.Value; - } - - public static void UrlSplit(string url, out string host, out string path, out string file, out string query) - { - int start = 0; - - Regex regHost = new Regex(@"(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+"); - host = regHost.Match(url, start).Value; - start += host.Length; - - Regex regPath = new Regex(@"(/(\w|\-)*)+/"); - path = regPath.Match(url, start).Value; - if(string.IsNullOrEmpty(path)) - { - path = "/"; - } - start += path.Length; - - int index = url.IndexOf('?', start); - file = url.Substring(start, index - start); - - query = url.Substring(index); - } - } -} diff --git a/Qiniu/Http/CancellationSignal.cs b/Qiniu/Http/CancellationSignal.cs deleted file mode 100644 index 3272c3b6..00000000 --- a/Qiniu/Http/CancellationSignal.cs +++ /dev/null @@ -1,9 +0,0 @@ - -namespace Qiniu.Http -{ - /// - /// HTTP请求取消信号 - /// - /// true取消,false继续 - public delegate bool CancellationSignal(); -} diff --git a/Qiniu/Http/CompletionHandler.cs b/Qiniu/Http/CompletionHandler.cs deleted file mode 100644 index 17eb318c..00000000 --- a/Qiniu/Http/CompletionHandler.cs +++ /dev/null @@ -1,18 +0,0 @@ - -namespace Qiniu.Http -{ - /// - /// HTTP请求结果处理 - /// - /// 请求回复信息 - /// 请求回复内容 - public delegate void CompletionHandler(ResponseInfo respInfo, string response); - - /// - /// HTTP请求结果(非json/二进制数据) - /// - /// - /// - public delegate void RecvDataHandler(ResponseInfo respInfo, byte[] respData); - -} \ No newline at end of file diff --git a/Qiniu/Http/HttpCode.cs b/Qiniu/Http/HttpCode.cs deleted file mode 100644 index fa67e262..00000000 --- a/Qiniu/Http/HttpCode.cs +++ /dev/null @@ -1,130 +0,0 @@ -using System.Collections.Generic; - -// Created by fengyh -// 2016-08-17 - -namespace Qiniu.Http -{ - #region HTTP-CODE - // 参考http://developer.qiniu.com/article/developer/response-body.html - // @fengyh 2016-08-17 18:28 - public enum HCODE - { - OK = 200, - PART_OK = 298, - REQUEST_ERR = 400, - AUTHENTICATION_ERR = 401, - ACCESS_DENIED = 403, - OBJECT_NOT_FOUND = 404, - BAD_REQUEST = 405, - CRC32_CHECk_ERR = 406, - FSIZE_LIMIT_EXCEED = 413, - ACCOUNT_BLOCKED = 419, - MIRR2ORG_ERR = 478, - BAD_GATEWAY = 502, - SERVICE_UNAVAILABLE = 503, - SERVER_TIMEOUT = 504, - TOO_FREQUENT = 573, - CALLBACK_FAILED = 579, - SERVER_SIDE_FAILURE = 599, - CONTENT_MODIFIED = 608, - RESOURCE_NOT_EXSISTS = 612, - RESOURCE_ALREADY_EXISTS = 614, - NUM_OF_BUCKETS_EXCEEDS = 630, - BUCKET_NOT_EXSISTS = 631, - INVALID_LIST_MARKER = 640, - RESUMABLE_UPLOAD_ERR = 701, - }; - - #endregion HTTP-CODE - - /// - /// 用于解析HTTP Status Code - /// 参考http://developer.qiniu.com/article/developer/response-body.html - /// @fengyh 2016-08-17 18:28 - /// - public class HttpCode - { - private static Dictionary codeTable = new Dictionary() - { - #region TABLE-ITEMS - {HCODE.OK,"success"}, - {HCODE.PART_OK, "partial success"}, - {HCODE.REQUEST_ERR, "request error or null-response"}, - {HCODE.AUTHENTICATION_ERR, "authentication failed"}, - {HCODE.ACCESS_DENIED, "access denied"}, - {HCODE.OBJECT_NOT_FOUND, "object not found"}, - {HCODE.BAD_REQUEST, "bad request"}, - {HCODE.CRC32_CHECk_ERR, "crc32 check failed"}, - {HCODE.FSIZE_LIMIT_EXCEED, "size limit exceeded"}, - {HCODE.ACCOUNT_BLOCKED, "account blocked"}, - {HCODE.MIRR2ORG_ERR, "mirror-to-origin failed"}, - {HCODE.BAD_GATEWAY, "bad gateway"}, - {HCODE.SERVICE_UNAVAILABLE, "service unavailable"}, - {HCODE.SERVER_TIMEOUT, "server timeout"}, - {HCODE.TOO_FREQUENT, "too frequently access to one file"}, - {HCODE.CALLBACK_FAILED, "upload success but callbak failed"}, - {HCODE.SERVER_SIDE_FAILURE, "failure on server-side-ops"}, - {HCODE.CONTENT_MODIFIED, "content modified"}, - {HCODE.RESOURCE_NOT_EXSISTS, "resource not found or removed"}, - {HCODE.RESOURCE_ALREADY_EXISTS, "resource already exists"}, - {HCODE.NUM_OF_BUCKETS_EXCEEDS, "the number of space is up to limit"}, - {HCODE.BUCKET_NOT_EXSISTS, "bucket not exsists"}, - {HCODE.INVALID_LIST_MARKER, "invalid param marker in list-interface"}, - {HCODE.RESUMABLE_UPLOAD_ERR, "resumable upload error"} - #endregion TABLE-ITEMS - }; - - public static string GetMessage(int code) - { - string msg = string.Format("HTTP_CODE({0})", code); - - if(codeTable.ContainsKey((HCODE)code)) - { - msg = codeTable[(HCODE)code]; - } - - return msg; - } - - public static bool GetErrorMessage(int code,out string errorMsg) - { - bool isOtherCode = false; - - switch (code) - { - case (int)HCODE.PART_OK: - case (int)HCODE.REQUEST_ERR: - case (int)HCODE.AUTHENTICATION_ERR: - case (int)HCODE.ACCESS_DENIED: - case (int)HCODE.OBJECT_NOT_FOUND: - case (int)HCODE.BAD_REQUEST: - case (int)HCODE.CRC32_CHECk_ERR: - case (int)HCODE.FSIZE_LIMIT_EXCEED: - case (int)HCODE.ACCOUNT_BLOCKED: - case (int)HCODE.MIRR2ORG_ERR: - case (int)HCODE.BAD_GATEWAY: - case (int)HCODE.SERVICE_UNAVAILABLE: - case (int)HCODE.SERVER_TIMEOUT: - case (int)HCODE.TOO_FREQUENT: - case (int)HCODE.CALLBACK_FAILED: - case (int)HCODE.SERVER_SIDE_FAILURE: - case (int)HCODE.CONTENT_MODIFIED: - case (int)HCODE.RESOURCE_NOT_EXSISTS: - case (int)HCODE.RESOURCE_ALREADY_EXISTS: - case (int)HCODE.NUM_OF_BUCKETS_EXCEEDS: - case (int)HCODE.BUCKET_NOT_EXSISTS: - case (int)HCODE.INVALID_LIST_MARKER: - case (int)HCODE.RESUMABLE_UPLOAD_ERR: - errorMsg = HttpCode.GetMessage(code); - break; - default: - errorMsg = ""; - isOtherCode = true; - break; - } - - return isOtherCode; - } - } -} diff --git a/Qiniu/Http/HttpFileType.cs b/Qiniu/Http/HttpFileType.cs deleted file mode 100644 index 5c1ec9bd..00000000 --- a/Qiniu/Http/HttpFileType.cs +++ /dev/null @@ -1,11 +0,0 @@ - -namespace Qiniu.Http -{ - public enum HttpFileType - { - FILE_PATH, - FILE_STREAM, - DATA_BYTES, - DATA_SLICE - } -} \ No newline at end of file diff --git a/Qiniu/Http/HttpFormFile.cs b/Qiniu/Http/HttpFormFile.cs deleted file mode 100644 index 657f5d25..00000000 --- a/Qiniu/Http/HttpFormFile.cs +++ /dev/null @@ -1,100 +0,0 @@ -using System.IO; - -namespace Qiniu.Http -{ - public class HttpFormFile - { - public string Filename { set; get; } - public string ContentType { set; get; } - public HttpFileType BodyType { set; get; } - public Stream BodyStream { set; get; } - public string BodyFile { set; get; } - public byte[] BodyBytes { set; get; } - public int Offset { set; get; } - public int Count { set; get; } - - private HttpFormFile() - { - } - - private static HttpFormFile newObject(string filename, string contentType, object body) - { - HttpFormFile obj = new HttpFormFile(); - obj.Filename = filename; - obj.ContentType = contentType; - if (body is Stream) - { - obj.BodyStream = (Stream)body; - } - else if (body is byte[]) - { - obj.BodyBytes = (byte[])body; - } - else if (body is string) - { - obj.BodyFile = (string)body; - } - return obj; - } - - /// - /// - /// - /// - /// - /// - /// - public static HttpFormFile NewFileFromPath(string filename, string contentType, string filepath) - { - HttpFormFile obj = newObject(filename, contentType, filepath); - obj.BodyType = HttpFileType.FILE_PATH; - return obj; - } - - /// - /// - /// - /// - /// - /// - /// - public static HttpFormFile NewFileFromStream(string filename, string contentType, Stream stream) - { - HttpFormFile obj = newObject(filename, contentType, stream); - obj.BodyType = HttpFileType.FILE_STREAM; - return obj; - } - - /// - /// - /// - /// - /// - /// - /// - public static HttpFormFile NewFileFromBytes(string filename, string contentType, byte[] fileData) - { - HttpFormFile obj = newObject(filename, contentType, fileData); - obj.BodyType = HttpFileType.DATA_BYTES; - return obj; - } - - /// - /// - /// - /// - /// - /// - /// - /// - /// - public static HttpFormFile NewFileFromSlice(string filename, string contentType, byte[] fileData, int offset, int count) - { - HttpFormFile obj = newObject(filename, contentType, fileData); - obj.BodyType = HttpFileType.DATA_SLICE; - obj.Offset = offset; - obj.Count = count; - return obj; - } - } -} diff --git a/Qiniu/Http/HttpManager.cs b/Qiniu/Http/HttpManager.cs deleted file mode 100644 index b00a1a11..00000000 --- a/Qiniu/Http/HttpManager.cs +++ /dev/null @@ -1,1167 +0,0 @@ -using Newtonsoft.Json; -using Qiniu.Common; -using System; -using System.Collections.Generic; -using System.IO; -using System.Net; -using System.Text; - -namespace Qiniu.Http -{ - /// - // instance of this class can be sahred - /// - public class HttpManager - { - public static string FORM_MIME_URLENCODED = "application/x-www-form-urlencoded"; - public static string FORM_MIME_OCTECT = "application/octect-stream"; - public static string FORM_MIME_JSON = "application/json"; - public static string FORM_BOUNDARY_TAG = "--"; - public static int COPY_BYTES_BUFFER = 40 * 1024 * 1024; //40 KB - - private string getUserAgent() - { - return string.Format("QiniuCSharpSDK/{0} ({1}; {2}; {3})", - Config.VERSION, - Environment.MachineName, - Environment.OSVersion.Platform, - Environment.OSVersion.Version); - } - - private string createFormDataBoundary() - { - string now = DateTime.Now.ToLongTimeString(); - return string.Format("-------QiniuCSharpSDKBoundary{0}", Qiniu.Util.StringUtils.md5Hash(now)); - } - - private string createRandomFilename() - { - string now = DateTime.Now.ToLongTimeString(); - return string.Format("randomfile{0}", Qiniu.Util.StringUtils.urlSafeBase64Encode(now)); - } - - /// - /// get info from remote server - /// - /// - /// - /// - public void get(string pUrl, Dictionary pHeaders, - CompletionHandler pCompletionHandler) - { - HttpWebRequest vWebReq = null; - HttpWebResponse vWebResp = null; - try - { - vWebReq = (HttpWebRequest)WebRequest.Create(pUrl); - } - catch(WebException wexp) - { - // FIX-HTTP 4xx/5xx Error 2016-11-22, 17:00 @fengyh - HttpWebResponse xWebResp = wexp.Response as HttpWebResponse; - handleErrorWebResponse(xWebResp, pCompletionHandler, wexp); - } - catch (Exception ex) - { - if (pCompletionHandler != null) - { - pCompletionHandler(ResponseInfo.invalidRequest(ex.Message), ""); - } - return; - } - - try - { - vWebReq.AllowAutoRedirect = false; - vWebReq.Method = "GET"; - vWebReq.UserAgent = this.getUserAgent(); - if (pHeaders != null) - { - foreach (KeyValuePair kvp in pHeaders) - { - if (!kvp.Key.Equals("Content-Type")) - { - vWebReq.Headers.Add(kvp.Key, kvp.Value); - } - } - } - - //fire request - vWebResp = (HttpWebResponse)vWebReq.GetResponse(); - handleWebResponse(vWebResp, pCompletionHandler); - } - catch (WebException wexp) - { - // FIX-HTTP 4xx/5xx Error 2016-11-22, 17:00 @fengyh - HttpWebResponse xWebResp = wexp.Response as HttpWebResponse; - handleErrorWebResponse(xWebResp, pCompletionHandler, wexp); - } - catch (Exception exp) - { - handleErrorWebResponse(vWebResp, pCompletionHandler, exp); - } - finally - { - if(vWebResp!=null) - { - vWebResp.Close(); - vWebResp = null; - } - - if(vWebReq!=null) - { - vWebReq.Abort(); - vWebReq = null; - } - } - } - - public void getRaw(string pUrl,RecvDataHandler pRecvDataHandler) - { - HttpWebRequest vWebReq = null; - HttpWebResponse vWebResp = null; - try - { - vWebReq = (HttpWebRequest)WebRequest.Create(pUrl); - } - catch (Exception ex) - { - if (pRecvDataHandler != null) - { - pRecvDataHandler(ResponseInfo.invalidRequest(ex.Message), null); - } - return; - } - - try - { - vWebReq.AllowAutoRedirect = false; - vWebReq.Method = "GET"; - vWebReq.UserAgent = this.getUserAgent(); - - //fire request - vWebResp = (HttpWebResponse)vWebReq.GetResponse(); - handleWebResponse(vWebResp, pRecvDataHandler); - } - catch (Exception exp) - { - - if (pRecvDataHandler != null) - { - pRecvDataHandler(ResponseInfo.networkError(exp.Message), null); - } - } - finally - { - if (vWebResp != null) - { - vWebResp.Close(); - vWebResp = null; - } - - if (vWebReq != null) - { - vWebReq.Abort(); - vWebReq = null; - } - } - } - - /// - /// post the url encoded form to remote server - /// - /// - /// - /// - /// - public void postForm(string pUrl, Dictionary pHeaders, - Dictionary pPostParams, CompletionHandler pCompletionHandler) - { - HttpWebRequest vWebReq = null; - HttpWebResponse vWebResp = null; - try - { - vWebReq = (HttpWebRequest)WebRequest.Create(pUrl); - } - catch (Exception ex) - { - if (pCompletionHandler != null) - { - pCompletionHandler(ResponseInfo.invalidRequest(ex.Message), ""); - } - return; - } - - try - { - vWebReq.UserAgent = this.getUserAgent(); - vWebReq.AllowAutoRedirect = false; - vWebReq.Method = "POST"; - vWebReq.ContentType = FORM_MIME_URLENCODED; - if (pHeaders != null) - { - foreach (KeyValuePair kvp in pHeaders) - { - if (!kvp.Key.Equals("Content-Type")) - { - vWebReq.Headers.Add(kvp.Key, kvp.Value); - } - } - } - - // format the post body - StringBuilder vPostBody = new StringBuilder(); - if (pPostParams != null) - { - foreach (KeyValuePair kvp in pPostParams) - { - foreach (string vVal in kvp.Value) - { - vPostBody.AppendFormat("{0}={1}&", - Uri.EscapeDataString(kvp.Key), Uri.EscapeDataString(vVal)); - } - } - // write data - vWebReq.AllowWriteStreamBuffering = true; - using (Stream vWebReqStream = vWebReq.GetRequestStream()) - { - vWebReqStream.Write(Encoding.UTF8.GetBytes(vPostBody.ToString()), - 0, vPostBody.Length - 1); - vWebReqStream.Flush(); - } - } - - //fire request - vWebResp = (HttpWebResponse)vWebReq.GetResponse(); - handleWebResponse(vWebResp, pCompletionHandler); - } - catch (WebException wexp) - { - // FIX-HTTP 4xx/5xx Error 2016-11-22, 17:00 @fengyh - HttpWebResponse xWebResp = wexp.Response as HttpWebResponse; - handleErrorWebResponse(xWebResp, pCompletionHandler, wexp); - } - catch (Exception exp) - { - handleErrorWebResponse(vWebResp, pCompletionHandler, exp); - } - finally - { - if (vWebResp != null) - { - vWebResp.Close(); - vWebResp = null; - } - - if (vWebReq != null) - { - vWebReq.Abort(); - vWebReq = null; - } - } - } - - /// - /// post data from raw - /// - /// - /// - /// - public void postFormRaw(string pUrl, Dictionary pHeaders, RecvDataHandler pRecvDataHandler) - { - HttpWebRequest vWebReq = null; - HttpWebResponse vWebResp = null; - try - { - vWebReq = (HttpWebRequest)WebRequest.Create(pUrl); - } - catch (Exception ex) - { - if (pRecvDataHandler != null) - { - pRecvDataHandler(ResponseInfo.invalidRequest(ex.Message), null); - } - return; - } - - try - { - vWebReq.UserAgent = this.getUserAgent(); - vWebReq.AllowAutoRedirect = false; - vWebReq.Method = "POST"; - vWebReq.ContentType = FORM_MIME_URLENCODED; - if (pHeaders != null) - { - foreach (KeyValuePair kvp in pHeaders) - { - if (!kvp.Key.Equals("Content-Type")) - { - vWebReq.Headers.Add(kvp.Key, kvp.Value); - } - } - } - - //fire request - vWebResp = (HttpWebResponse)vWebReq.GetResponse(); - handleWebResponse(vWebResp, pRecvDataHandler); - } - catch (Exception exp) - { - if (pRecvDataHandler != null) - { - pRecvDataHandler(ResponseInfo.networkError(exp.Message), null); - } - } - finally - { - if (vWebResp != null) - { - vWebResp.Close(); - vWebResp = null; - } - - if (vWebReq != null) - { - vWebReq.Abort(); - vWebReq = null; - } - } - } - - - /// - /// post the binary data to the remote server - /// - /// - /// - /// - /// - public void postData(string pUrl, Dictionary pHeaders, - byte[] pPostData, string contentType, CompletionHandler pCompletionHandler) - { - HttpWebRequest vWebReq = null; - HttpWebResponse vWebResp = null; - try - { - vWebReq = (HttpWebRequest)WebRequest.Create(pUrl); - vWebReq.ServicePoint.Expect100Continue = false; - } - catch (Exception ex) - { - if (pCompletionHandler != null) - { - pCompletionHandler(ResponseInfo.invalidRequest(ex.Message), ""); - } - return; - } - - try - { - vWebReq.UserAgent = this.getUserAgent(); - vWebReq.AllowAutoRedirect = false; - vWebReq.Method = "POST"; - if (!string.IsNullOrEmpty(contentType)) - { - vWebReq.ContentType = contentType; - } - else - { - vWebReq.ContentType = FORM_MIME_OCTECT; - } - if (pHeaders != null) - { - foreach (KeyValuePair kvp in pHeaders) - { - if (!kvp.Key.Equals("Content-Type")) - { - vWebReq.Headers.Add(kvp.Key, kvp.Value); - } - } - } - - vWebReq.AllowWriteStreamBuffering = true; - // write data - using (Stream vWebReqStream = vWebReq.GetRequestStream()) - { - vWebReqStream.Write(pPostData, 0, pPostData.Length); - vWebReqStream.Flush(); - } - - //fire request - vWebResp = (HttpWebResponse)vWebReq.GetResponse(); - handleWebResponse(vWebResp, pCompletionHandler); - } - catch (WebException wexp) - { - // FIX-HTTP 4xx/5xx Error 2016-11-22, 17:00 @fengyh - HttpWebResponse xWebResp = wexp.Response as HttpWebResponse; - handleErrorWebResponse(xWebResp, pCompletionHandler, wexp); - } - catch (Exception exp) - { - handleErrorWebResponse(vWebResp, pCompletionHandler, exp); - } - finally - { - if (vWebResp != null) - { - vWebResp.Close(); - vWebResp = null; - } - - if (vWebReq != null) - { - vWebReq.Abort(); - vWebReq = null; - } - } - } - - /// - /// post binary data to remote server - /// - /// - /// - /// - /// - /// - /// - public void postData(string pUrl, Dictionary pHeaders, - byte[] pPostData, int offset, int count, string contentType, - CompletionHandler pCompletionHandler) - { - HttpWebRequest vWebReq = null; - HttpWebResponse vWebResp = null; - try - { - vWebReq = (HttpWebRequest)WebRequest.Create(pUrl); - } - catch (Exception ex) - { - if (pCompletionHandler != null) - { - pCompletionHandler(ResponseInfo.invalidRequest(ex.Message), ""); - } - return; - } - - try - { - vWebReq.UserAgent = this.getUserAgent(); - vWebReq.AllowAutoRedirect = false; - vWebReq.Method = "POST"; - if (!string.IsNullOrEmpty(contentType)) - { - vWebReq.ContentType = contentType; - } - else - { - vWebReq.ContentType = FORM_MIME_OCTECT; - } - if (pHeaders != null) - { - foreach (KeyValuePair kvp in pHeaders) - { - if (!kvp.Key.Equals("Content-Type")) - { - vWebReq.Headers.Add(kvp.Key, kvp.Value); - } - } - } - - vWebReq.AllowWriteStreamBuffering = true; - // write data - using (Stream vWebReqStream = vWebReq.GetRequestStream()) - { - vWebReqStream.Write(pPostData, offset, count); - vWebReqStream.Flush(); - } - - //fire request - vWebResp = (HttpWebResponse)vWebReq.GetResponse(); - handleWebResponse(vWebResp, pCompletionHandler); - } - catch (WebException wexp) - { - // FIX-HTTP 4xx/5xx Error 2016-11-22, 17:00 @fengyh - HttpWebResponse xWebResp = wexp.Response as HttpWebResponse; - handleErrorWebResponse(xWebResp, pCompletionHandler, wexp); - } - catch (Exception exp) - { - handleErrorWebResponse(vWebResp, pCompletionHandler, exp); - } - finally - { - if (vWebResp != null) - { - vWebResp.Close(); - vWebResp = null; - } - - if (vWebReq != null) - { - vWebReq.Abort(); - vWebReq = null; - } - } - } - - /// - /// post multi-part data form to remote server - /// used to upload file - /// - /// - /// - /// - /// - /// - /// - public void postMultipartDataForm(string pUrl, Dictionary pHeaders, - Dictionary pPostParams, HttpFormFile pFormFile, - ProgressHandler pProgressHandler, CompletionHandler pCompletionHandler) - { - if (pFormFile == null) - { - if (pCompletionHandler != null) - { - pCompletionHandler(ResponseInfo.fileError(new Exception("no file specified")), ""); - } - return; - } - - HttpWebRequest vWebReq = null; - HttpWebResponse vWebResp = null; - try - { - vWebReq = (HttpWebRequest)WebRequest.Create(pUrl); - vWebReq.ServicePoint.Expect100Continue = false; - } - catch (Exception ex) - { - if (pCompletionHandler != null) - { - pCompletionHandler(ResponseInfo.invalidRequest(ex.Message), ""); - } - return; - } - - try - { - vWebReq.UserAgent = this.getUserAgent(); - vWebReq.AllowAutoRedirect = false; - vWebReq.Method = "POST"; - - //create boundary - string formBoundaryStr = this.createFormDataBoundary(); - string contentType = string.Format("multipart/form-data; boundary={0}", formBoundaryStr); - vWebReq.ContentType = contentType; - if (pHeaders != null) - { - foreach (KeyValuePair kvp in pHeaders) - { - if (!kvp.Key.Equals("Content-Type")) - { - vWebReq.Headers.Add(kvp.Key, kvp.Value); - } - } - } - - //write post body - vWebReq.AllowWriteStreamBuffering = true; - - byte[] formBoundaryBytes = Encoding.UTF8.GetBytes(string.Format("{0}{1}\r\n", - FORM_BOUNDARY_TAG, formBoundaryStr)); - byte[] formBoundaryEndBytes = Encoding.UTF8.GetBytes(string.Format("\r\n{0}{1}{2}\r\n", - FORM_BOUNDARY_TAG, formBoundaryStr, FORM_BOUNDARY_TAG)); - - using (Stream vWebReqStream = vWebReq.GetRequestStream()) - { - //write params - if (pPostParams != null) - { - foreach (KeyValuePair kvp in pPostParams) - { - vWebReqStream.Write(formBoundaryBytes, 0, formBoundaryBytes.Length); - - byte[] formPartTitleData = Encoding.UTF8.GetBytes( - string.Format("Content-Disposition: form-data; name=\"{0}\"\r\n", kvp.Key)); - vWebReqStream.Write(formPartTitleData, 0, formPartTitleData.Length); - - byte[] formPartBodyData = Encoding.UTF8.GetBytes(string.Format("\r\n{0}\r\n", kvp.Value)); - vWebReqStream.Write(formPartBodyData, 0, formPartBodyData.Length); - } - } - - vWebReqStream.Write(formBoundaryBytes, 0, formBoundaryBytes.Length); - - //write file name - string filename = pFormFile.Filename; - if (string.IsNullOrEmpty(filename)) - { - filename = this.createRandomFilename(); - } - byte[] filePartTitleData = Encoding.UTF8.GetBytes( - string.Format("Content-Disposition: form-data; name=\"file\"; filename=\"{0}\"\r\n", filename)); - vWebReqStream.Write(filePartTitleData, 0, filePartTitleData.Length); - //write content type - string mimeType = FORM_MIME_OCTECT; //!!!注意这里 @fengyh 2016-08-17 15:00 - if (!string.IsNullOrEmpty(pFormFile.ContentType)) - { - mimeType = pFormFile.ContentType; - } - byte[] filePartMimeData = Encoding.UTF8.GetBytes(string.Format("Content-Type: {0}\r\n\r\n", mimeType)); - vWebReqStream.Write(filePartMimeData, 0, filePartMimeData.Length); - - //write file data - switch (pFormFile.BodyType) - { - case HttpFileType.FILE_PATH: - try - { - FileStream fs = File.Open(pFormFile.BodyFile, FileMode.Open, FileAccess.Read); - this.writeHttpRequestBody(fs, vWebReqStream); - } - catch (Exception fex) - { - if (pCompletionHandler != null) - { - pCompletionHandler(ResponseInfo.fileError(fex), ""); - } - } - break; - case HttpFileType.FILE_STREAM: - this.writeHttpRequestBody(pFormFile.BodyStream, vWebReqStream); - break; - case HttpFileType.DATA_BYTES: - vWebReqStream.Write(pFormFile.BodyBytes, 0, pFormFile.BodyBytes.Length); - break; - case HttpFileType.DATA_SLICE: - vWebReqStream.Write(pFormFile.BodyBytes, pFormFile.Offset, pFormFile.Count); - break; - } - - vWebReqStream.Write(formBoundaryEndBytes, 0, formBoundaryEndBytes.Length); - vWebReqStream.Flush(); - } - - //fire request - vWebResp = (HttpWebResponse)vWebReq.GetResponse(); - handleWebResponse(vWebResp, pCompletionHandler); - } - catch (WebException wexp) - { - // FIX-HTTP 4xx/5xx Error 2016-11-22, 17:00 @fengyh - HttpWebResponse xWebResp = wexp.Response as HttpWebResponse; - handleErrorWebResponse(xWebResp, pCompletionHandler, wexp); - } - catch (Exception exp) - { - handleErrorWebResponse(vWebResp, pCompletionHandler, exp); - } - finally - { - if (vWebResp != null) - { - vWebResp.Close(); - vWebResp = null; - } - - if (vWebReq != null) - { - vWebReq.Abort(); - vWebReq = null; - } - } - } - - /// - /// post multi-part data form to remote server - /// used to upload file - /// - /// - /// - /// - /// - /// - /// - public void postMultipartDataRaw(string pUrl, Dictionary pHeaders, - HttpFormFile pFormFile, ProgressHandler pProgressHandler, RecvDataHandler pRecvDataHandler) - { - if (pFormFile == null) - { - if (pRecvDataHandler != null) - { - pRecvDataHandler(ResponseInfo.fileError(new Exception("no file specified")), null); - } - return; - } - - HttpWebRequest vWebReq = null; - HttpWebResponse vWebResp = null; - try - { - vWebReq = (HttpWebRequest)WebRequest.Create(pUrl); - vWebReq.ServicePoint.Expect100Continue = false; - } - catch (Exception ex) - { - if (pRecvDataHandler != null) - { - pRecvDataHandler(ResponseInfo.invalidRequest(ex.Message), null); - } - return; - } - - try - { - vWebReq.UserAgent = this.getUserAgent(); - vWebReq.AllowAutoRedirect = false; - vWebReq.Method = "POST"; - - //create boundary - string formBoundaryStr = this.createFormDataBoundary(); - string contentType = string.Format("multipart/form-data; boundary={0}", formBoundaryStr); - vWebReq.ContentType = contentType; - if (pHeaders != null) - { - foreach (KeyValuePair kvp in pHeaders) - { - if (!kvp.Key.Equals("Content-Type")) - { - vWebReq.Headers.Add(kvp.Key, kvp.Value); - } - } - } - - //write post body - vWebReq.AllowWriteStreamBuffering = true; - - byte[] formBoundaryBytes = Encoding.UTF8.GetBytes(string.Format("{0}{1}\r\n", - FORM_BOUNDARY_TAG, formBoundaryStr)); - byte[] formBoundaryEndBytes = Encoding.UTF8.GetBytes(string.Format("\r\n{0}{1}{2}\r\n", - FORM_BOUNDARY_TAG, formBoundaryStr, FORM_BOUNDARY_TAG)); - - using (Stream vWebReqStream = vWebReq.GetRequestStream()) - { - vWebReqStream.Write(formBoundaryBytes, 0, formBoundaryBytes.Length); - - //write file name - string filename = pFormFile.Filename; - if (string.IsNullOrEmpty(filename)) - { - filename = this.createRandomFilename(); - } - byte[] filePartTitleData = Encoding.UTF8.GetBytes( - string.Format("Content-Disposition: form-data; name=\"data\"; filename=\"{0}\"\r\n", filename)); - vWebReqStream.Write(filePartTitleData, 0, filePartTitleData.Length); - //write content type - string mimeType = FORM_MIME_OCTECT; //!!!注意这里 @fengyh 2016-08-17 15:00 - if (!string.IsNullOrEmpty(pFormFile.ContentType)) - { - mimeType = pFormFile.ContentType; - } - byte[] filePartMimeData = Encoding.UTF8.GetBytes(string.Format("Content-Type: {0}\r\n\r\n", mimeType)); - vWebReqStream.Write(filePartMimeData, 0, filePartMimeData.Length); - - //write file data - switch (pFormFile.BodyType) - { - case HttpFileType.FILE_PATH: - try - { - FileStream fs = File.Open(pFormFile.BodyFile, FileMode.Open, FileAccess.Read); - this.writeHttpRequestBody(fs, vWebReqStream); - } - catch (Exception fex) - { - if (pRecvDataHandler != null) - { - pRecvDataHandler(ResponseInfo.fileError(fex), null); - } - } - break; - case HttpFileType.FILE_STREAM: - this.writeHttpRequestBody(pFormFile.BodyStream, vWebReqStream); - break; - case HttpFileType.DATA_BYTES: - vWebReqStream.Write(pFormFile.BodyBytes, 0, pFormFile.BodyBytes.Length); - break; - case HttpFileType.DATA_SLICE: - vWebReqStream.Write(pFormFile.BodyBytes, pFormFile.Offset, pFormFile.Count); - break; - } - - vWebReqStream.Write(formBoundaryEndBytes, 0, formBoundaryEndBytes.Length); - vWebReqStream.Flush(); - } - - //fire request - vWebResp = (HttpWebResponse)vWebReq.GetResponse(); - handleWebResponse(vWebResp, pRecvDataHandler); - } - catch (Exception exp) - { - if(pRecvDataHandler!=null) - { - pRecvDataHandler(ResponseInfo.networkError(exp.Message), null); - } - } - finally - { - if (vWebResp != null) - { - vWebResp.Close(); - vWebResp = null; - } - - if (vWebReq != null) - { - vWebReq.Abort(); - vWebReq = null; - } - } - } - - private void writeHttpRequestBody(Stream fromStream, Stream toStream) - { - byte[] buffer = new byte[COPY_BYTES_BUFFER]; - int count = -1; - using (fromStream) - { - while ((count = fromStream.Read(buffer, 0, buffer.Length)) != 0) - { - toStream.Write(buffer, 0, count); - } - } - } - - private void handleWebResponse(HttpWebResponse pWebResp, CompletionHandler pCompletionHandler) - { - DateTime startTime = DateTime.Now; - //check for exception - int statusCode = ResponseInfo.NetworkError; - string reqId = null; - string xlog = null; - string ip = null; - string xvia = null; - string error = null; - string host = null; - string respData = null; - int contentLength = -1; - - if (pWebResp != null) - { - statusCode = (int)pWebResp.StatusCode; - - if (pWebResp.Headers != null) - { - WebHeaderCollection respHeaders = pWebResp.Headers; - foreach (string headerName in respHeaders.AllKeys) - { - if (headerName.Equals("X-Reqid")) - { - reqId = respHeaders[headerName].ToString(); - } - else if (headerName.Equals("X-Log")) - { - xlog = respHeaders[headerName].ToString(); - } - else if (headerName.Equals("X-Via")) - { - xvia = respHeaders[headerName].ToString(); - } - else if (headerName.Equals("X-Px")) - { - xvia = respHeaders[headerName].ToString(); - } - else if (headerName.Equals("Fw-Via")) - { - xvia = respHeaders[headerName].ToString(); - } - else if (headerName.Equals("Host")) - { - host = respHeaders[headerName].ToString(); - } - else if (headerName.Equals("Content-Length")) - { - contentLength = int.Parse(respHeaders[headerName].ToString()); - } - } - } - - if (contentLength > 0) - { - Stream ps = pWebResp.GetResponseStream(); - byte[] raw = new byte[contentLength]; - int bytesRead = 0; // 已读取的字节数 - int bytesLeft = contentLength; // 剩余字节数 - while (bytesLeft > 0) - { - bytesRead = ps.Read(raw, contentLength - bytesLeft, bytesLeft); - bytesLeft -= bytesRead; - } - - respData = Encoding.UTF8.GetString(raw); - - try - { - ///////////////////////////////////////////////////////////// - // 改进Response的error解析, 根据HttpStatusCode - // @fengyh 2016-08-17 18:29 - ///////////////////////////////////////////////////////////// - if (statusCode != (int)HCODE.OK) - { - bool isOtherCode = HttpCode.GetErrorMessage(statusCode, out error); - - if (isOtherCode) - { - Dictionary errorDict = JsonConvert.DeserializeObject>(respData); - error = errorDict["error"]; - } - } - } - catch (Exception) { } - } - else - { - //statusCode = -1; - //error = "response err"; - } - } - else - { - error = "invalid response"; - statusCode = -1; - } - - double duration = DateTime.Now.Subtract(startTime).TotalSeconds; - ResponseInfo respInfo = new ResponseInfo(statusCode, reqId, xlog, xvia, host, ip, duration, error); - if (pCompletionHandler != null) - { - pCompletionHandler(respInfo, respData); - } - } - - private void handleErrorWebResponse(HttpWebResponse pWebResp, CompletionHandler pCompletionHandler, Exception pExp) - { - DateTime startTime = DateTime.Now; - int statusCode = ResponseInfo.NetworkError; - //parse self defined code from the error message - string expMsg = pExp.Message; - int indexStart = expMsg.IndexOf("("); - if (indexStart != -1) - { - int indexEnd = expMsg.IndexOf(")", indexStart); - if (indexStart != -1 && indexEnd != -1) - { - string statusCodeStr = expMsg.Substring(indexStart + 1, indexEnd - indexStart - 1); - try - { - statusCode = Convert.ToInt32(statusCodeStr); - } - catch (Exception) { } - } - } - //check for exception - string reqId = null; - string xlog = null; - string ip = null; - string xvia = null; - string error = null; - string host = null; - string respData = null; - int contentLength = -1; - - if (pWebResp != null) - { - if (pWebResp.Headers != null) - { - WebHeaderCollection respHeaders = pWebResp.Headers; - foreach (string headerName in respHeaders.AllKeys) - { - if (headerName.Equals("X-Reqid")) - { - reqId = respHeaders[headerName].ToString(); - } - else if (headerName.Equals("X-Log")) - { - xlog = respHeaders[headerName].ToString(); - } - else if (headerName.Equals("X-Via")) - { - xvia = respHeaders[headerName].ToString(); - } - else if (headerName.Equals("X-Px")) - { - xvia = respHeaders[headerName].ToString(); - } - else if (headerName.Equals("Fw-Via")) - { - xvia = respHeaders[headerName].ToString(); - } - else if (headerName.Equals("Host")) - { - host = respHeaders[headerName].ToString(); - } - else if (headerName.Equals("Content-Length")) - { - contentLength = int.Parse(respHeaders[headerName].ToString()); - } - } - } - - if (contentLength > 0) - { - Stream ps = pWebResp.GetResponseStream(); - byte[] raw = new byte[contentLength]; - int bytesRead = 0; // 已读取的字节数 - int bytesLeft = contentLength; // 剩余字节数 - while (bytesLeft > 0) - { - bytesRead = ps.Read(raw, contentLength - bytesLeft, bytesLeft); - bytesLeft -= bytesRead; - } - - respData = Encoding.UTF8.GetString(raw); - - try - { - ///////////////////////////////////////////////////////////// - // 改进Response的error解析, 根据HttpStatusCode - // @fengyh 2016-08-17 18:29 - ///////////////////////////////////////////////////////////// - if (statusCode != (int)HCODE.OK) - { - bool isOtherCode = HttpCode.GetErrorMessage(statusCode, out error); - - if (isOtherCode) - { - Dictionary errorDict = JsonConvert.DeserializeObject>(respData); - error = errorDict["error"]; - } - } - } - catch (Exception) { } - } - else - { - statusCode = -1; - error = "response err"; - } - } - else - { - error = pExp.Message; - } - - double duration = DateTime.Now.Subtract(startTime).TotalSeconds; - ResponseInfo respInfo = new ResponseInfo(statusCode, reqId, xlog, xvia, host, ip, duration, error); - if (pCompletionHandler != null) - { - pCompletionHandler(respInfo, respData); - } - } - - private void handleWebResponse(HttpWebResponse pWebResp, RecvDataHandler pRecvDataHandler) - { - DateTime startTime = DateTime.Now; - //check for exception - int statusCode = ResponseInfo.NetworkError; - string reqId = null; - string xlog = null; - string ip = null; - string xvia = null; - string error = null; - string host = null; - byte[] respData = null; - int contentLength = -1; - - if (pWebResp != null) - { - statusCode = (int)pWebResp.StatusCode; - - if (pWebResp.Headers != null) - { - WebHeaderCollection respHeaders = pWebResp.Headers; - foreach (string headerName in respHeaders.AllKeys) - { - if (headerName.Equals("X-Reqid")) - { - reqId = respHeaders[headerName].ToString(); - } - else if (headerName.Equals("X-Log")) - { - xlog = respHeaders[headerName].ToString(); - } - else if (headerName.Equals("X-Via")) - { - xvia = respHeaders[headerName].ToString(); - } - else if (headerName.Equals("X-Px")) - { - xvia = respHeaders[headerName].ToString(); - } - else if (headerName.Equals("Fw-Via")) - { - xvia = respHeaders[headerName].ToString(); - } - else if (headerName.Equals("Host")) - { - host = respHeaders[headerName].ToString(); - } - else if (headerName.Equals("Content-Length")) - { - contentLength = int.Parse(respHeaders["Content-Length"]); - } - } - } - - if (contentLength > 0) - { - Stream ps = pWebResp.GetResponseStream(); - respData = new byte[contentLength]; - int bytesRead = 0; // 已读取的字节数 - int bytesLeft = contentLength; // 剩余字节数 - while (bytesLeft > 0) - { - bytesRead = ps.Read(respData, contentLength - bytesLeft, bytesLeft); - bytesLeft -= bytesRead; - } - - try - { - ///////////////////////////////////////////////////////////// - // 改进Response的error解析, 根据HttpStatusCode - // @fengyh 2016-08-17 18:29 - ///////////////////////////////////////////////////////////// - if (statusCode != (int)HCODE.OK) - { - bool isOtherCode = HttpCode.GetErrorMessage(statusCode, out error); - - if (isOtherCode) - { - string respJson = Encoding.UTF8.GetString(respData); - Dictionary errorDict = JsonConvert.DeserializeObject>(respJson); - error = errorDict["error"]; - } - } - } - catch (Exception) { } - } - else - { - error = "response error"; - } - } - - double duration = DateTime.Now.Subtract(startTime).TotalSeconds; - ResponseInfo respInfo = new ResponseInfo(statusCode, reqId, xlog, xvia, host, ip, duration, error); - if (pRecvDataHandler != null) - { - pRecvDataHandler(respInfo, respData); - } - } - } -} - diff --git a/Qiniu/Http/HttpResult.cs b/Qiniu/Http/HttpResult.cs deleted file mode 100644 index ae2ae25f..00000000 --- a/Qiniu/Http/HttpResult.cs +++ /dev/null @@ -1,17 +0,0 @@ - -namespace Qiniu.Http -{ - public class HttpResult - { - public ResponseInfo ResponseInfo { set; get; } - public string Response { set; get; } - - public HttpResult() { } - - public HttpResult(ResponseInfo respInfo, string response) - { - this.ResponseInfo = respInfo; - this.Response = response; - } - } -} diff --git a/Qiniu/Http/ProgressHandler.cs b/Qiniu/Http/ProgressHandler.cs deleted file mode 100644 index a2c40fd7..00000000 --- a/Qiniu/Http/ProgressHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ - -namespace Qiniu.Http -{ - /// - /// HTTP请求发送进度处理 - /// - /// 已写入字节数 - /// 总字节数 - public delegate void ProgressHandler(long bytesWritten, long totalBytes); -} \ No newline at end of file diff --git a/Qiniu/Http/ResponseInfo.cs b/Qiniu/Http/ResponseInfo.cs deleted file mode 100644 index 7730a3b5..00000000 --- a/Qiniu/Http/ResponseInfo.cs +++ /dev/null @@ -1,146 +0,0 @@ -using System; - -namespace Qiniu.Http -{ - /// - /// 请求回复信息 - /// - public class ResponseInfo - { - public const int InvalidRequest = -5; - public const int InvalidArgument = -4; - public const int InvalidFile = -3; - public const int Cancelled = -2; - public const int NetworkError = -1; - - public int StatusCode { set; get; } - public string ReqId { set; get; } - public string Xlog { set; get; } - public string Xvia { set; get; } - public string Error { set; get; } - public double Duration { set; get; } - public string Host { set; get; } - public string Ip { set; get; } - - /// - /// 构建请求回复对象 - /// - /// 状态码 - /// 七牛头部ReqId - /// 七牛头部Xlog - /// 七牛头部Xvia - /// 主机 - /// Ip地址 - /// 持续时间 - /// 错误信息 - public ResponseInfo(int statusCode, string reqId, string xlog, string xvia, - string host, string ip, double duration, string error) - { - this.StatusCode = statusCode; - this.ReqId = reqId; - this.Xlog = xlog; - this.Xvia = xvia; - this.Host = host; - this.Ip = ip; - this.Duration = duration; - this.Error = error; - } - - /// - /// 客户端取消 - /// - /// 回复对象 - public static ResponseInfo cancelled() - { - return new ResponseInfo(Cancelled, "", "", "", "", "", 0, "cancelled by user"); - } - - /// - /// 网络故障 - /// - public static ResponseInfo networkError(string message) - { - return new ResponseInfo(NetworkError, "", "", "", "", "", 0, message); - } - /// - /// 参数不合法 - /// - /// 错误信息 - /// 回复对象 - public static ResponseInfo invalidArgument(string message) - { - return new ResponseInfo(InvalidArgument, "", "", "", "", "", 0, message); - } - - public static ResponseInfo invalidRequest(string message) - { - return new ResponseInfo(InvalidRequest, "", "", "", "", "", 0, message); - } - - /// - /// 客户端文件访问错误 - /// - /// IO异常对象 - /// 回复对象 - public static ResponseInfo fileError(Exception e) - { - return new ResponseInfo(InvalidFile, "", "", "", "", "", 0, e.Message); - } - - /// - /// 判断是否客户端取消 - /// - /// 取消状态 - public bool isCancelled() - { - return StatusCode == Cancelled; - } - - /// - /// 文件上传请求是否完全成功 - /// - /// 成功状态 - public bool isOk() - { - return StatusCode == 200 && Error == null && ReqId != null; - } - - /// - /// 检测是否网络故障 - /// - /// 网络状态 - public bool isNetworkBroken() - { - return StatusCode == NetworkError; - } - - /// - /// 检测是否七牛服务器错误 - /// - /// 服务器状态 - public bool isServerError() - { - return (StatusCode >= 500 && StatusCode < 600 && StatusCode != 579) || StatusCode == 996; - } - - /// - /// 检测客户端是否需要重试上传请求 - /// - /// 是否重试 - public bool needRetry() - { - return isNetworkBroken() || isServerError() || StatusCode == 404 || StatusCode == 406 || (StatusCode == 200 && Error != null); - } - - private string toStr(string val) - { - return (val == null) ? "null" : val; - } - - public override string ToString() - { - return string.Format("ResponseInfo: status:{0}, reqId:{1}, xlog:{2}, xvia:{3}, host:{4}, ip:{5}, duration:{6} s, error:{7}", - StatusCode, toStr(ReqId), toStr(Xlog), toStr(Xvia), toStr(Host), toStr(Ip), Duration, toStr(Error)); - } - } -} diff --git a/Qiniu/Processing/Dfop.cs b/Qiniu/Processing/Dfop.cs deleted file mode 100644 index d9e66493..00000000 --- a/Qiniu/Processing/Dfop.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Qiniu.Util; -using Qiniu.Http; - -namespace Qiniu.Processing -{ - public class Dfop - { - private HttpManager mHttpManager; - public Mac mac { set; get; } - - private const string API_HOST = "http://api.qiniu.com"; - - public Dfop(Mac mac) - { - this.mHttpManager = new HttpManager(); - this.mac = mac; - } - - public DfopResult dfop(string fop,string url) - { - DfopResult dfopResult = new DfopResult(); - - string encodedUrl = StringUtils.urlencode(url); - - string dfopUrl = string.Format("{0}/dfop?fop={1}&url={2}", API_HOST, fop, encodedUrl); - string token = Auth.createManageToken(dfopUrl, null, mac); - - Dictionary dfopHeaders = new Dictionary(); - dfopHeaders.Add("Authorization", token); - - RecvDataHandler dfopRecvDataHandler = new RecvDataHandler(delegate (ResponseInfo respInfo, byte[] respData) - { - dfopResult.ResponseInfo = respInfo; - dfopResult.ResponseData = respData; - }); - - mHttpManager.postFormRaw(dfopUrl, dfopHeaders, dfopRecvDataHandler); - - return dfopResult; - } - - public DfopResult dfop(string fop,byte[] data) - { - DfopResult dfopResult = new DfopResult(); - HttpFormFile dfopData = HttpFormFile.NewFileFromBytes("netFx.png", "application/octet-stream", data); - - string dfopUrl = string.Format("{0}/dfop?fop={1}", API_HOST, fop); - string token = Auth.createManageToken(dfopUrl, null, mac); - - Dictionary dfopHeaders = new Dictionary(); - dfopHeaders.Add("Authorization", token); - - RecvDataHandler dfopRecvDataHandler = new RecvDataHandler(delegate (ResponseInfo respInfo, byte[] respData) - { - dfopResult.ResponseInfo = respInfo; - dfopResult.ResponseData = respData; - }); - - mHttpManager.postMultipartDataRaw(dfopUrl, dfopHeaders, dfopData, null, dfopRecvDataHandler); - - return dfopResult; - } - - } -} diff --git a/Qiniu/Processing/DfopResult.cs b/Qiniu/Processing/DfopResult.cs deleted file mode 100644 index 7c54b964..00000000 --- a/Qiniu/Processing/DfopResult.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Qiniu.Http; - -namespace Qiniu.Processing -{ - public class DfopResult - { - public ResponseInfo ResponseInfo { get; set; } - - public byte[] ResponseData { get; set; } - - public string Response() - { - return Encoding.UTF8.GetString(ResponseData); - } - } -} diff --git a/Qiniu/Processing/Pfop.cs b/Qiniu/Processing/Pfop.cs deleted file mode 100644 index 8887206f..00000000 --- a/Qiniu/Processing/Pfop.cs +++ /dev/null @@ -1,71 +0,0 @@ -using Qiniu.Common; -using Qiniu.Http; -using Qiniu.Util; -using System.Collections.Generic; -using System.Text; - -namespace Qiniu.Processing -{ - public class Pfop - { - private HttpManager mHttpManager; - public Mac Mac { set; get; } - - public Pfop(Mac mac) - { - this.mHttpManager = new HttpManager(); - this.Mac = mac; - } - - public PfopResult pfop(string bucket, string key, string fops, string pipeline, string notifyUrl, bool force) - { - PfopResult pfopResult = null; - - Dictionary pfopParams = new Dictionary(); - pfopParams.Add("bucket", new string[] { bucket }); - pfopParams.Add("key", new string[] { key }); - pfopParams.Add("fops", new string[] { fops }); - if (!string.IsNullOrEmpty(notifyUrl)) - { - pfopParams.Add("notifyURL", new string[] { notifyUrl }); - } - if (force) - { - pfopParams.Add("force", new string[] { "1" }); - } - if (!string.IsNullOrEmpty(pipeline)) - { - pfopParams.Add("pipeline", new string[] { pipeline }); - } - - string pfopUrl = Config.ZONE.ApiHost + "/pfop/"; - - string accessToken = Auth.createManageToken(pfopUrl, Encoding.UTF8.GetBytes(StringUtils.urlValuesEncode(pfopParams)), this.Mac); - Dictionary pfopHeaders = new Dictionary(); - pfopHeaders.Add("Authorization", accessToken); - - CompletionHandler pfopCompletionHandler = new CompletionHandler(delegate (ResponseInfo respInfo, string response) - { - if (respInfo.isOk()) - { - pfopResult = StringUtils.jsonDecode(response); - } - else - { - pfopResult = new PfopResult(); - } - pfopResult.ResponseInfo = respInfo; - pfopResult.Response = response; - }); - - this.mHttpManager.postForm(pfopUrl, pfopHeaders, pfopParams, pfopCompletionHandler); - return pfopResult; - } - - public PfopResult pfop(string bucket, string key, string[] fops, string pipeline, string notifyUrl, bool force) - { - string newFops = string.Join(";", fops); - return pfop(bucket, key, newFops, pipeline, notifyUrl, force); - } - } -} \ No newline at end of file diff --git a/Qiniu/Processing/PfopResult.cs b/Qiniu/Processing/PfopResult.cs deleted file mode 100644 index 7aa3e5b5..00000000 --- a/Qiniu/Processing/PfopResult.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json; -using Qiniu.Http; - -namespace Qiniu.Processing -{ - [JsonObject(MemberSerialization.OptIn)] - public class PfopResult : HttpResult - { - [JsonProperty("persistentId")] - public string PersistentId { set; get; } - public PfopResult() { } - } -} diff --git a/Qiniu/Processing/Prefop.cs b/Qiniu/Processing/Prefop.cs deleted file mode 100644 index 54c7be40..00000000 --- a/Qiniu/Processing/Prefop.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Qiniu.Common; -using Qiniu.Http; -using Qiniu.Util; - -namespace Qiniu.Processing -{ - public class Prefop - { - private HttpManager mHttpManager; - public string PersistentId { set; get; } - public Prefop(string persistentId) - { - this.mHttpManager = new HttpManager(); - this.PersistentId = persistentId; - } - - public PrefopResult prefop() - { - PrefopResult prefopResult = null; - - CompletionHandler prefopCompletionHandler = new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - if (respInfo.isOk()) - { - prefopResult = StringUtils.jsonDecode(response); - } - else - { - prefopResult = new PrefopResult(); - } - prefopResult.ResponseInfo = respInfo; - prefopResult.Response = response; - }); - string qUrl = string.Format(Config.ZONE.ApiHost + "/status/get/prefop?id={0}", this.PersistentId); - this.mHttpManager.get(qUrl, null, prefopCompletionHandler); - return prefopResult; - } - } -} diff --git a/Qiniu/Processing/PrefopResult.cs b/Qiniu/Processing/PrefopResult.cs deleted file mode 100644 index 9bbe50d5..00000000 --- a/Qiniu/Processing/PrefopResult.cs +++ /dev/null @@ -1,44 +0,0 @@ -using Newtonsoft.Json; -using Qiniu.Http; -using System.Collections.Generic; - -namespace Qiniu.Processing -{ - [JsonObject(MemberSerialization.OptIn)] - public class PrefopResult : HttpResult - { - [JsonProperty("id")] - public string Id { set; get; } - [JsonProperty("code")] - public int Code { set; get; } - [JsonProperty("desc")] - public string Desc { set; get; } - [JsonProperty("inputBucket")] - public string InputBucket { set; get; } - [JsonProperty("inputKey")] - public string InputKey { set; get; } - [JsonProperty("items")] - public List Items { set; get; } - - public PrefopResult() { } - } - - [JsonObject(MemberSerialization.OptIn)] - public class PfopItem - { - [JsonProperty("cmd")] - public string Cmd { set; get; } - [JsonProperty("code")] - public string Code { set; get; } - [JsonProperty("desc")] - public string Desc { set; get; } - [JsonProperty("error")] - public string Error { set; get; } - [JsonProperty("hash")] - public string Hash { set; get; } - [JsonProperty("key")] - public string Key { set; get; } - [JsonProperty("keys")] - public List Keys { set; get; } - } -} diff --git a/Qiniu/Properties/AssemblyInfo.cs b/Qiniu/Properties/AssemblyInfo.cs deleted file mode 100644 index 8df4b5b0..00000000 --- a/Qiniu/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -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("Qiniu (Storage) C# SDK v7.0.0.5 (.NET4.0)")] -[assembly: AssemblyDescription("Qiniu (Storage) C# SDK v7.0.0.5 (.NET4.0)")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("QINIU")] -[assembly: AssemblyProduct("Qiniu (Storage) C# SDK v7.0.0.5 (.NET4.0)")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[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("20e1ce07-0157-4a09-aadd-a324287bb4e3")] - -// 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("7.0.0.5")] -[assembly: AssemblyFileVersion("7.0.0.5")] diff --git a/Qiniu/Qiniu.csproj b/Qiniu/Qiniu.csproj deleted file mode 100644 index f9368f04..00000000 --- a/Qiniu/Qiniu.csproj +++ /dev/null @@ -1,118 +0,0 @@ - - - - - Release - AnyCPU - {E5A764FD-FC95-4B51-BB10-9A807ED25652} - Library - Properties - Qiniu - Qiniu - v4.0 - 512 - - - true - full - false - ..\bin\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - ..\bin\ - TRACE - prompt - 4 - - - true - - - - - - - - ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Qiniu/Storage/BucketManager.cs b/Qiniu/Storage/BucketManager.cs deleted file mode 100644 index 79d0c322..00000000 --- a/Qiniu/Storage/BucketManager.cs +++ /dev/null @@ -1,525 +0,0 @@ -using Newtonsoft.Json; -using Qiniu.Common; -using Qiniu.Http; -using Qiniu.Storage.Model; -using Qiniu.Util; -using System.Collections.Generic; -using System.Text; - -namespace Qiniu.Storage -{ - public class BucketManager - { - private Mac mac; - private HttpManager mHttpManager; - - public BucketManager(Mac mac) - { - this.mac = mac; - this.mHttpManager = new HttpManager(); - } - - public StatResult stat(string bucket, string key) - { - StatResult statResult = null; - string statUrl = string.Format("{0}{1}", Config.ZONE.RsHost, statOp(bucket, key)); - string accessToken = Auth.createManageToken(statUrl, null, this.mac); - - Dictionary statHeaders = new Dictionary(); - statHeaders.Add("Authorization", accessToken); - CompletionHandler statCompletionHandler = new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - if (respInfo.isOk()) - { - statResult = StringUtils.jsonDecode(response); - } - else - { - statResult = new StatResult(); - } - statResult.Response = response; - statResult.ResponseInfo = respInfo; - }); - - this.mHttpManager.get(statUrl, statHeaders, statCompletionHandler); - return statResult; - } - - public HttpResult delete(string bucket, string key) - { - HttpResult deleteResult = null; - string deleteUrl = string.Format("{0}{1}", Config.ZONE.RsHost, deleteOp(bucket, key)); - string accessToken = Auth.createManageToken(deleteUrl, null, this.mac); - Dictionary deleteHeaders = new Dictionary(); - deleteHeaders.Add("Authorization", accessToken); - CompletionHandler deleteCompletionHandler = new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - deleteResult = new HttpResult(); - deleteResult.Response = response; - deleteResult.ResponseInfo = respInfo; - }); - - this.mHttpManager.postForm(deleteUrl, deleteHeaders, null, deleteCompletionHandler); - return deleteResult; - } - - public HttpResult copy(string srcBucket, string srcKey, string destBucket, string destKey) - { - HttpResult copyResult = null; - string copyUrl = string.Format("{0}{1}", Config.ZONE.RsHost, copyOp(srcBucket, srcKey, destBucket, destKey)); - string accessToken = Auth.createManageToken(copyUrl, null, this.mac); - Dictionary copyHeaders = new Dictionary(); - copyHeaders.Add("Authorization", accessToken); - CompletionHandler copyCompletionHandler = new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - copyResult = new HttpResult(); - copyResult.Response = response; - copyResult.ResponseInfo = respInfo; - }); - - this.mHttpManager.postForm(copyUrl, copyHeaders, null, copyCompletionHandler); - return copyResult; - } - - // ADD 'force' param - // 2016-08-22 14:58 @fengyh - public HttpResult copy(string srcBucket, string srcKey, string destBucket, string destKey, bool force) - { - HttpResult copyResult = null; - string copyUrl = string.Format("{0}{1}", Config.ZONE.RsHost, copyOp(srcBucket, srcKey, destBucket, destKey, force)); - string accessToken = Auth.createManageToken(copyUrl, null, this.mac); - Dictionary copyHeaders = new Dictionary(); - copyHeaders.Add("Authorization", accessToken); - CompletionHandler copyCompletionHandler = new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - copyResult = new HttpResult(); - copyResult.Response = response; - copyResult.ResponseInfo = respInfo; - }); - - this.mHttpManager.postForm(copyUrl, copyHeaders, null, copyCompletionHandler); - return copyResult; - } - - public HttpResult move(string srcBucket, string srcKey, string destBucket, string destKey) - { - HttpResult moveResult = null; - string moveUrl = string.Format("{0}{1}", Config.ZONE.RsHost, moveOp(srcBucket, srcKey, destBucket, destKey)); - string accessToken = Auth.createManageToken(moveUrl, null, this.mac); - Dictionary moveHeaders = new Dictionary(); - moveHeaders.Add("Authorization", accessToken); - CompletionHandler moveCompletionHandler = new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - moveResult = new HttpResult(); - moveResult.Response = response; - moveResult.ResponseInfo = respInfo; - }); - - this.mHttpManager.postForm(moveUrl, moveHeaders, null, moveCompletionHandler); - return moveResult; - } - - // ADD 'force' param - // 2016-08-22 14:58 @fengyh - public HttpResult move(string srcBucket, string srcKey, string destBucket, string destKey, bool force) - { - HttpResult moveResult = null; - string moveUrl = string.Format("{0}{1}", Config.ZONE.RsHost, moveOp(srcBucket, srcKey, destBucket, destKey, force)); - string accessToken = Auth.createManageToken(moveUrl, null, this.mac); - Dictionary moveHeaders = new Dictionary(); - moveHeaders.Add("Authorization", accessToken); - CompletionHandler moveCompletionHandler = new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - moveResult = new HttpResult(); - moveResult.Response = response; - moveResult.ResponseInfo = respInfo; - }); - - this.mHttpManager.postForm(moveUrl, moveHeaders, null, moveCompletionHandler); - return moveResult; - } - - public HttpResult chgm(string bucket, string key, string mimeType) - { - HttpResult chgmResult = null; - string chgmUrl = string.Format("{0}{1}", Config.ZONE.RsHost, chgmOp(bucket, key, mimeType)); - string accessToken = Auth.createManageToken(chgmUrl, null, this.mac); - Dictionary chgmHeaders = new Dictionary(); - chgmHeaders.Add("Authorization", accessToken); - CompletionHandler chgmCompletionHandler = new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - chgmResult = new HttpResult(); - chgmResult.Response = response; - chgmResult.ResponseInfo = respInfo; - }); - - this.mHttpManager.postForm(chgmUrl, chgmHeaders, null, chgmCompletionHandler); - return chgmResult; - } - - public HttpResult batch(string ops) - { - HttpResult batchResult = null; - string batchUrl = string.Format("{0}{1}", Config.ZONE.RsHost, "/batch"); - string accessToken = Auth.createManageToken(batchUrl, Encoding.UTF8.GetBytes(ops), this.mac); - Dictionary batchHeaders = new Dictionary(); - batchHeaders.Add("Authorization", accessToken); - CompletionHandler batchCompletionHandler = new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - batchResult = new FetchResult(); - batchResult.Response = response; - batchResult.ResponseInfo = respInfo; - }); - - - this.mHttpManager.postData(batchUrl, batchHeaders, Encoding.UTF8.GetBytes(ops), - HttpManager.FORM_MIME_URLENCODED, batchCompletionHandler); - return batchResult; - } - - /// - /// - /// - /// - /// - public HttpResult batch(string[] ops) - { - HttpResult batchResult = null; - string batchUrl = string.Format("{0}{1}", Config.ZONE.RsHost, "/batch"); - - StringBuilder opsBuilder = new StringBuilder(); - for (int i = 0; i < ops.Length; i++) - { - opsBuilder.AppendFormat("op={0}", ops[i]); - if (i < ops.Length - 1) - { - opsBuilder.Append("&"); - } - } - string accessToken = Auth.createManageToken(batchUrl, Encoding.UTF8.GetBytes(opsBuilder.ToString()), this.mac); - Dictionary batchHeaders = new Dictionary(); - batchHeaders.Add("Authorization", accessToken); - CompletionHandler batchCompletionHandler = new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - batchResult = new FetchResult(); - batchResult.Response = response; - batchResult.ResponseInfo = respInfo; - }); - - Dictionary batchParams = new Dictionary(); - batchParams.Add("op", ops); - this.mHttpManager.postForm(batchUrl, batchHeaders, batchParams, batchCompletionHandler); - return batchResult; - } - - public FetchResult fetch(string remoteResUrl, string bucket, string key) - { - FetchResult fetchResult = null; - string fetchUrl = string.Format("{0}{1}", Config.ZONE.IovipHost, fetchOp(remoteResUrl, bucket, key)); - string accessToken = Auth.createManageToken(fetchUrl, null, this.mac); - Dictionary fetchHeaders = new Dictionary(); - fetchHeaders.Add("Authorization", accessToken); - CompletionHandler fetchCompletionHandler = new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - if (respInfo.isOk()) - { - fetchResult = StringUtils.jsonDecode(response); - } - else - { - fetchResult = new FetchResult(); - } - fetchResult.Response = response; - fetchResult.ResponseInfo = respInfo; - }); - - this.mHttpManager.postForm(fetchUrl, fetchHeaders, null, fetchCompletionHandler); - return fetchResult; - } - - public HttpResult prefetch(string bucket, string key) - { - HttpResult prefetchResult = null; - string prefetchUrl = string.Format("{0}{1}", Config.ZONE.IovipHost, prefetchOp(bucket, key)); - string accessToken = Auth.createManageToken(prefetchUrl, null, this.mac); - Dictionary prefetchHeaders = new Dictionary(); - prefetchHeaders.Add("Authorization", accessToken); - CompletionHandler prefetchCompletionHandler = new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - prefetchResult = new FetchResult(); - prefetchResult.Response = response; - prefetchResult.ResponseInfo = respInfo; - }); - - this.mHttpManager.postForm(prefetchUrl, prefetchHeaders, null, prefetchCompletionHandler); - return prefetchResult; - } - - public BucketsResult buckets() - { - BucketsResult bucketsResult = null; - List buckets = new List(); - string bucketsUrl = string.Format("{0}/buckets", Config.ZONE.RsHost); - string accessToken = Auth.createManageToken(bucketsUrl, null, this.mac); - Dictionary bucketsHeaders = new Dictionary(); - bucketsHeaders.Add("Authorization", accessToken); - CompletionHandler bucketsCompletionHandler = new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - bucketsResult = new BucketsResult(); - bucketsResult.Response = response; - bucketsResult.ResponseInfo = respInfo; - if (respInfo.isOk()) - { - buckets = JsonConvert.DeserializeObject>(response); - bucketsResult.Buckets = buckets; - } - }); - - this.mHttpManager.get(bucketsUrl, bucketsHeaders, bucketsCompletionHandler); - return bucketsResult; - } - - public DomainsResult domains(string bucket) - { - DomainsResult domainsResult = null; - List domains = new List(); - string domainsUrl = string.Format("{0}/v6/domain/list", Config.ZONE.ApiHost); - string postBody = string.Format("tbl={0}", bucket); - string accessToken = Auth.createManageToken(domainsUrl, Encoding.UTF8.GetBytes(postBody), this.mac); - - Dictionary domainsHeaders = new Dictionary(); - domainsHeaders.Add("Authorization", accessToken); - - CompletionHandler domainsCompletionHandler = new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - domainsResult = new DomainsResult(); - domainsResult.Response = response; - domainsResult.ResponseInfo = respInfo; - if (respInfo.isOk()) - { - domains = JsonConvert.DeserializeObject>(response); - domainsResult.Domains = domains; - } - }); - - Dictionary postParams = new Dictionary(); - postParams.Add("tbl", new string[] { bucket }); - this.mHttpManager.postForm(domainsUrl, domainsHeaders, postParams, domainsCompletionHandler); - return domainsResult; - } - - public CdnRefreshResult cdnRefresh(List urls, List dirs) - { - CdnRefreshResult result = null; - if (urls == null && dirs == null) - { - return result; - } - - int urlsCount = 0; - int dirsCount = 0; - if (urls != null) - { - urlsCount = urls.Count; - } - if (dirs != null) - { - dirsCount = dirs.Count; - } - - if (urlsCount == 0 && dirsCount == 0) - { - return result; - } - - CdnRefreshRequest req = new CdnRefreshRequest(); - if (urls != null && urls.Count > 0) - { - req.Urls = urls; - } - if (dirs != null && dirs.Count > 0) - { - req.Dirs = dirs; - } - - string postData = JsonConvert.SerializeObject(req); - string refreshUrl = string.Format("{0}/refresh", Config.FUSION_API_HOST); - string accessToken = Auth.createManageToken(refreshUrl, null, this.mac); - Dictionary refreshHeaders = new Dictionary(); - refreshHeaders.Add("Authorization", accessToken); - - CompletionHandler refreshCompletionHandler = new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - result = new CdnRefreshResult(); - result.Response = response; - result.ResponseInfo = respInfo; - if (respInfo.isOk()) - { - result = JsonConvert.DeserializeObject(response); - } - }); - - this.mHttpManager.postData(refreshUrl, refreshHeaders, Encoding.UTF8.GetBytes(postData), - HttpManager.FORM_MIME_JSON, refreshCompletionHandler); - return result; - } - - /// - /// - /// 获取空间文件列表 - /// listFiles(bucket, prefix, marker, limit, delimiter) - /// - /// bucket: 目标空间名称 - /// - /// prefix: 返回指定文件名前缀的文件列表(prefix可设为null) - /// - /// marker: 考虑到设置limit后返回的文件列表可能不全(需要重复执行listFiles操作) - /// 执行listFiles操作时使用marker标记来追加新的结果 - /// 特别注意首次执行listFiles操作时marker为null - /// - /// limit: 每次返回结果所包含的文件总数限制(limit<=1000,建议值100) - /// - /// delimiter: 分隔符,比如-或者/等等,可以模拟作为目录结构(参考下述示例) - /// 假设指定空间中有2个文件 fakepath/1.txt fakepath/2.txt - /// 现设置分隔符delimiter = / 得到返回结果items =[],commonPrefixes = [fakepath/] - /// 然后调整prefix = fakepath/ delimiter = null 得到所需结果items = [1.txt,2.txt] - /// 于是可以在本地先创建一个目录fakepath,然后在该目录下写入items中的文件 - /// - /// - public ListFilesResult listFiles(string bucket,string prefix,string marker,int limit,string delimiter) - { - ListFilesResult result = null; - - StringBuilder sb = new StringBuilder("bucket=" + bucket); - - if (!string.IsNullOrEmpty(marker)) - { - sb.Append("&marker=" + marker); - } - - if(!string.IsNullOrEmpty(prefix)) - { - sb.Append("&prefix=" + prefix); - } - - if(!string.IsNullOrEmpty(delimiter)) - { - sb.Append("&delimiter=" + delimiter); - } - - if(limit>1000||limit<1) - { - sb.Append("&limit=1000"); - } - else - { - sb.Append("&limit=" + limit); - } - - string listFilesUrl = Config.ZONE.RsfHost + "/list?" + sb.ToString(); - string accessToken = Auth.createManageToken(listFilesUrl, null, mac); - - Dictionary listFilesHeaders = new Dictionary(); - listFilesHeaders.Add("Authorization", accessToken); - - CompletionHandler listFilesCompletionHandler = new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - result = new ListFilesResult(); - result.Response = response; - result.ResponseInfo = respInfo; - if (respInfo.isOk()) - { - ListFilesResponse resp = JsonConvert.DeserializeObject(response); - - result.Marker = resp.Marker; - result.Items = resp.Items; - result.CommonPrefixes = resp.CommonPrefixes; - } - }); - - this.mHttpManager.postForm(listFilesUrl, listFilesHeaders, null, listFilesCompletionHandler); - - return result; - } - - public HttpResult updateLifecycle(string bucket,string key,int deleteAfterDays) - { - HttpResult updateResult = null; - - string updateUrl = string.Format("{0}{1}", Config.ZONE.RsHost, updateLifecycleOp(bucket, key, deleteAfterDays)); - string accessToken = Auth.createManageToken(updateUrl, null, this.mac); - Dictionary updateHeaders = new Dictionary(); - updateHeaders.Add("Authorization", accessToken); - CompletionHandler updateCompletionHandler = new CompletionHandler(delegate (ResponseInfo respInfo, string response) - { - updateResult = new HttpResult(); - updateResult.Response = response; - updateResult.ResponseInfo = respInfo; - }); - - this.mHttpManager.postForm(updateUrl, updateHeaders, null, updateCompletionHandler); - return updateResult; - } - - public string statOp(string bucket, string key) - { - return string.Format("/stat/{0}", StringUtils.encodedEntry(bucket, key)); - } - - public string deleteOp(string bucket, string key) - { - return string.Format("/delete/{0}", StringUtils.encodedEntry(bucket, key)); - } - - public string copyOp(string srcBucket, string srcKey, string destBucket, string destKey) - { - return string.Format("/copy/{0}/{1}", StringUtils.encodedEntry(srcBucket, srcKey), - StringUtils.encodedEntry(destBucket, destKey)); - } - - // ADD 'force' param - // 2016-08-22 14:58 @fengyh - public string copyOp(string srcBucket, string srcKey, string destBucket, string destKey, bool force) - { - string fx = force ? "force/true" : "force/false"; - return string.Format("/copy/{0}/{1}/{2}", StringUtils.encodedEntry(srcBucket, srcKey), - StringUtils.encodedEntry(destBucket, destKey), fx); - } - - public string moveOp(string srcBucket, string srcKey, string destBucket, string destKey) - { - return string.Format("/move/{0}/{1}", StringUtils.encodedEntry(srcBucket, srcKey), - StringUtils.encodedEntry(destBucket, destKey)); - } - - // ADD 'force' param - // 2016-08-22 14:58 @fengyh - public string moveOp(string srcBucket, string srcKey, string destBucket, string destKey, bool force) - { - string fx = force ? "force/true" : "force/false"; - return string.Format("/move/{0}/{1}/{2}", StringUtils.encodedEntry(srcBucket, srcKey), - StringUtils.encodedEntry(destBucket, destKey), fx); - } - public string chgmOp(string bucket, string key, string mimeType) - { - return string.Format("/chgm/{0}/mime/{1}", StringUtils.encodedEntry(bucket, key), - StringUtils.urlSafeBase64Encode(mimeType)); - } - - public string fetchOp(string url, string bucket, string key) - { - return string.Format("/fetch/{0}/to/{1}", StringUtils.urlSafeBase64Encode(url), - StringUtils.encodedEntry(bucket, key)); - } - - public string prefetchOp(string bucket, string key) - { - return string.Format("/prefetch/{0}", StringUtils.encodedEntry(bucket, key)); - } - - public string updateLifecycleOp(string bucket,string key,int deleteAfterDays) - { - return string.Format("/deleteAfterDays/{0}/{1}", StringUtils.encodedEntry(bucket, key), deleteAfterDays); - } - } -} diff --git a/Qiniu/Storage/FormUploader.cs b/Qiniu/Storage/FormUploader.cs deleted file mode 100644 index af471a3b..00000000 --- a/Qiniu/Storage/FormUploader.cs +++ /dev/null @@ -1,235 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using Qiniu.Http; -using Qiniu.Common; -using Qiniu.Util; -using System; - -namespace Qiniu.Storage -{ - /// - /// 数据或者文件的表单上传方式 - /// - public class FormUploader - { - private HttpManager mHttpManager; - - public FormUploader() - { - this.mHttpManager = new HttpManager(); - } - - public void uploadData(byte[] data, int offset, int count, string key, string token, - UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler) - { - HttpFormFile fFile = HttpFormFile.NewFileFromSlice(key, null, data, offset, count); - upload(fFile, key, token, uploadOptions, upCompletionHandler); - } - - /// - /// 以表单方式上传字节数据 - /// - /// 字节数据 - /// 保存在七牛的文件名 - /// 上传凭证 - /// 上传可选设置 - /// 上传完成结果处理器 - public void uploadData(byte[] data, string key, - string token, UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler) - { - HttpFormFile fFile = HttpFormFile.NewFileFromBytes(key, null, data); - // 此处未设置FormFile.ContentType,稍后设置(在upload中已设置) @fengyh 2016-08-17 15:03 - upload(fFile, key, token, uploadOptions, upCompletionHandler); - } - - /// - /// 以表单方式上传数据流 - /// - /// 文件数据流 - /// 保存在七牛的文件名 - /// 上传凭证 - /// 上传可选设置 - /// 上传完成结果处理器 - public void uploadStream(Stream stream, string key, string token, - UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler) - { - HttpFormFile fFile = HttpFormFile.NewFileFromStream(key, null, stream); - upload(fFile, key, token, uploadOptions, upCompletionHandler); - } - - /// - /// 上传文件 - /// - /// HttpManager对象 - /// 文件的完整路径 - /// 保存在七牛的文件名 - /// 上传凭证 - /// 上传可选设置 - /// 上传完成结果处理器 - public void uploadFile(string filePath, string key, - string token, UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler) - { - HttpFormFile fFile = HttpFormFile.NewFileFromPath(key, null, filePath); - upload(fFile, key, token, uploadOptions, upCompletionHandler); - } - - private void upload(HttpFormFile fFile, string key, string token, - UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler) - { - string uploadHost = ""; - string uploadHostRetry = ""; - if(Config.UploadFromCDN) - { - uploadHost = Config.ZONE.UploadHost; - uploadHostRetry = Config.ZONE.UpHost; - } - else - { - uploadHost = Config.ZONE.UpHost; - uploadHostRetry = Config.ZONE.UploadHost; - } - - if (uploadOptions == null) - { - uploadOptions = UploadOptions.defaultOptions(); - } - Dictionary vPostParams = new Dictionary(); - //设置key - if (!string.IsNullOrEmpty(key)) - { - vPostParams.Add("key", key); - } - //设置token - vPostParams.Add("token", token); - //设置crc32校验 - if (uploadOptions.CheckCrc32) - { - switch (fFile.BodyType) - { - case HttpFileType.DATA_SLICE: - vPostParams.Add("crc32", string.Format("{0}", CRC32.CheckSumSlice(fFile.BodyBytes, fFile.Offset, fFile.Count))); - break; - case HttpFileType.DATA_BYTES: - vPostParams.Add("crc32", string.Format("{0}", CRC32.CheckSumBytes(fFile.BodyBytes))); - break; - case HttpFileType.FILE_STREAM: - long streamLength = fFile.BodyStream.Length; - byte[] buffer = new byte[streamLength]; - int cnt = fFile.BodyStream.Read(buffer, 0, (int)streamLength); - vPostParams.Add("crc32", string.Format("{0}", CRC32.CheckSumSlice(buffer, 0, cnt))); - fFile.BodyStream.Seek(0, SeekOrigin.Begin); - break; - case HttpFileType.FILE_PATH: - vPostParams.Add("crc32", string.Format("{0}", CRC32.CheckSumFile(fFile.BodyFile))); - break; - } - } - - //设置MimeType - // FIX: (添加了下一行代码) - // 修正上传文件MIME总为octect-stream(原因:未初始化FormFile.ContentType)的问题 - // @fengyh 2016-08-17 14:50 - fFile.ContentType = uploadOptions.MimeType; - //设置扩展参数 - foreach (KeyValuePair kvp in uploadOptions.ExtraParams) - { - vPostParams.Add(kvp.Key, kvp.Value); - } - //设置进度处理和取消信号 - ProgressHandler fUpProgressHandler = new ProgressHandler(delegate (long bytesWritten, long totalBytes) - { - double percent = (double)bytesWritten / totalBytes; - //这样做是为了等待回复 - if (percent > 0.95) - { - percent = 0.95; - } - uploadOptions.ProgressHandler(key, percent); - }); - - CancellationSignal fCancelSignal = new CancellationSignal(delegate () - { - return uploadOptions.CancellationSignal(); - }); - - - // 第一次失败后使用备用域名重试一次 - CompletionHandler fUpCompletionHandler = new CompletionHandler(delegate (ResponseInfo respInfo, string response) - { - Console.WriteLine("form upload result, {0}",respInfo.StatusCode); - - if (respInfo.needRetry()) // 需要重试 - { - Console.WriteLine(string.Format("form upload retry")); - - if (Config.RetryWaitForNext) - { - Console.WriteLine(string.Format("wait for {0} milisecond(s)", Config.RETRY_INTERVAL_MILISEC)); - System.Threading.Thread.Sleep(Config.RETRY_INTERVAL_MILISEC); - } - - if (fFile.BodyStream != null) - { - fFile.BodyStream.Seek(0, SeekOrigin.Begin); - } - - CompletionHandler retried = new CompletionHandler(delegate (ResponseInfo retryRespInfo, string retryResponse) - { - Console.WriteLine("form upload retry result, {0}",retryRespInfo.StatusCode); - if (respInfo.isOk()) - { - uploadOptions.ProgressHandler(key, 1.0); - } - - if (fFile.BodyStream != null) - { - fFile.BodyStream.Close(); - } - - if (upCompletionHandler != null) - { - try - { - upCompletionHandler(key, retryRespInfo, retryResponse); - } - catch (Exception ex) - { - Console.WriteLine("form upload retry completion error, {0}", ex.Message); - } - } - }); - - // 使用UPLOAD_HOST_RETRY重试 - this.mHttpManager.postMultipartDataForm(uploadHostRetry, null, vPostParams, fFile, fUpProgressHandler, retried); - } - else // 不需要重试 - { - if (respInfo.isOk()) - { - uploadOptions.ProgressHandler(key, 1.0); - } - - if (fFile.BodyStream != null) - { - fFile.BodyStream.Close(); - } - - if (upCompletionHandler != null) - { - try - { - upCompletionHandler(key, respInfo, response); - } - catch (Exception ex) - { - Console.WriteLine("form upload completion error, {0}", ex.Message); - } - } - } - }); - - // 使用UPLOAD_HOST上传 - this.mHttpManager.postMultipartDataForm(uploadHost, null, vPostParams, fFile, fUpProgressHandler, fUpCompletionHandler); - } - } -} \ No newline at end of file diff --git a/Qiniu/Storage/Model/BucketsResult.cs b/Qiniu/Storage/Model/BucketsResult.cs deleted file mode 100644 index fa4db4e4..00000000 --- a/Qiniu/Storage/Model/BucketsResult.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Qiniu.Http; -using System.Collections.Generic; - -namespace Qiniu.Storage.Model -{ - public class BucketsResult : HttpResult - { - public List Buckets { set; get; } - public BucketsResult() { } - } -} diff --git a/Qiniu/Storage/Model/CdnRefreshRequest.cs b/Qiniu/Storage/Model/CdnRefreshRequest.cs deleted file mode 100644 index 8dea30a1..00000000 --- a/Qiniu/Storage/Model/CdnRefreshRequest.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Newtonsoft.Json; -using System.Collections.Generic; - -namespace Qiniu.Storage.Model -{ - [JsonObject(MemberSerialization.OptIn)] - public class CdnRefreshRequest - { - [JsonProperty("urls")] - public List Urls { set; get; } - [JsonProperty("dirs")] - public List Dirs { set; get; } - } -} diff --git a/Qiniu/Storage/Model/CdnRefreshResult.cs b/Qiniu/Storage/Model/CdnRefreshResult.cs deleted file mode 100644 index 9033b546..00000000 --- a/Qiniu/Storage/Model/CdnRefreshResult.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Newtonsoft.Json; -using Qiniu.Http; - -namespace Qiniu.Storage.Model -{ - [JsonObject(MemberSerialization.OptIn)] - public class CdnRefreshResult : HttpResult - { - [JsonProperty("code")] - public int Code { set; get; } - [JsonProperty("error")] - public string Error { set; get; } - [JsonProperty("requestId")] - public string RequestId { set; get; } - [JsonProperty("invalidUrls")] - public string[] InvalidUrls { set; get; } - [JsonProperty("invalidDirs")] - public string[] InvalidDirs { set; get; } - } -} diff --git a/Qiniu/Storage/Model/DomainsResult.cs b/Qiniu/Storage/Model/DomainsResult.cs deleted file mode 100644 index 614d276f..00000000 --- a/Qiniu/Storage/Model/DomainsResult.cs +++ /dev/null @@ -1,11 +0,0 @@ -using Qiniu.Http; -using System.Collections.Generic; - -namespace Qiniu.Storage.Model -{ - public class DomainsResult : HttpResult - { - public List Domains { set; get; } - public DomainsResult() { } - } -} \ No newline at end of file diff --git a/Qiniu/Storage/Model/FetchResult.cs b/Qiniu/Storage/Model/FetchResult.cs deleted file mode 100644 index a946ae51..00000000 --- a/Qiniu/Storage/Model/FetchResult.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Newtonsoft.Json; -using Qiniu.Http; - -namespace Qiniu.Storage.Model -{ - [JsonObject(MemberSerialization.OptIn)] - public class FetchResult : HttpResult - { - [JsonProperty("hash")] - public string Hash { set; get; } - [JsonProperty("key")] - public string Key { set; get; } - } -} diff --git a/Qiniu/Storage/Model/ListFilesResult.cs b/Qiniu/Storage/Model/ListFilesResult.cs deleted file mode 100644 index 9765a297..00000000 --- a/Qiniu/Storage/Model/ListFilesResult.cs +++ /dev/null @@ -1,62 +0,0 @@ -using Qiniu.Http; -using System.Collections.Generic; - -namespace Qiniu.Storage.Model -{ - /// - /// 获取空间文件列表 - /// - public class ListFilesResult : HttpResult - { - public string Marker { get; set; } - public List Items { set; get; } - - public List CommonPrefixes { get; set; } - public ListFilesResult() { } - } - - /// - /// 返回JSON字符串 - /// - /// { - /// "marker":"MARKER", - /// "items": - /// [ - /// { - /// "key":"KEY", - /// "hash":"HASH", - /// "fsize":FSIZE, - /// "mimeType":"MIME_TYPE", - /// "putTime":PUT_TIME - /// }, - /// { - /// ... - /// } - /// ], - /// "CmmonPrefixes":"COMMON_PREFIXES" - /// } - /// - /// - public class ListFilesResponse - { - public string Marker { get; set; } - - public List Items { get; set; } - - public List CommonPrefixes { get; set; } - } - - public class FileDesc - { - public string Key { get; set; } - - public string Hash { get; set; } - - public long Fsize { get; set; } - - public string MimeType { get; set; } - - public long PutTime { get; set; } - } - -} diff --git a/Qiniu/Storage/Model/StatResult.cs b/Qiniu/Storage/Model/StatResult.cs deleted file mode 100644 index 27a4f536..00000000 --- a/Qiniu/Storage/Model/StatResult.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Newtonsoft.Json; -using Qiniu.Http; - -namespace Qiniu.Storage.Model -{ - [JsonObject(MemberSerialization.OptIn)] - public class StatResult : HttpResult - { - [JsonProperty("fsize")] - public long Fsize { set; get; } - [JsonProperty("hash")] - public string Hash { set; get; } - [JsonProperty("mimeType")] - public string MimeType { set; get; } - [JsonProperty("putTime")] - public long PutTime { set; get; } - public StatResult() { } - } -} \ No newline at end of file diff --git a/Qiniu/Storage/Persistent/KeyGenerator.cs b/Qiniu/Storage/Persistent/KeyGenerator.cs deleted file mode 100644 index 4c553126..00000000 --- a/Qiniu/Storage/Persistent/KeyGenerator.cs +++ /dev/null @@ -1,9 +0,0 @@ - -namespace Qiniu.Storage.Persistent -{ - /// - /// 分片上传进度文件记录名称 - /// - /// - public delegate string KeyGenerator(); -} diff --git a/Qiniu/Storage/Persistent/ResumeRecord.cs b/Qiniu/Storage/Persistent/ResumeRecord.cs deleted file mode 100644 index 10a95d53..00000000 --- a/Qiniu/Storage/Persistent/ResumeRecord.cs +++ /dev/null @@ -1,52 +0,0 @@ -using Newtonsoft.Json; -using Qiniu.Util; - -namespace Qiniu.Storage.Persistent -{ - /// - /// 分片上传进度记录内容 - /// - public class ResumeRecord - { - public long Size { get; private set; } - public long Offset { get; private set; } - public long LastModified { get; private set; } - public string[] Contexts { get; private set; } - - /// - /// 构建上传进度记录对象 - /// - /// 文件总大小 - /// 已上传偏移位置 - /// 文件最后修改时间 - /// 已上传块的Context集合 - public ResumeRecord(long size, long offset, long lastModified, string[] contexts) - { - this.Size = size; - this.Offset = offset; - this.LastModified = lastModified; - this.Contexts = contexts; - } - - /// - /// 从文件记录构建上传进度对象 - /// - /// 文件内容 - /// 上传进度对象 - public static ResumeRecord fromJsonData(string jsonData) - { - ResumeRecord record = JsonConvert.DeserializeObject(jsonData); - return record; - } - - /// - /// 序列化上传进度记录 - /// - /// 序列化后的上传进度字符串 - public string toJsonData() - { - return string.Format("{{\"size\":{0}, \"offset\":{1}, \"modify_time\":{2}, \"contexts\":[{3}]}}", - this.Size, this.Offset, this.LastModified, StringUtils.jsonJoin(this.Contexts)); - } - } -} diff --git a/Qiniu/Storage/Persistent/ResumeRecorder.cs b/Qiniu/Storage/Persistent/ResumeRecorder.cs deleted file mode 100644 index 9df455ca..00000000 --- a/Qiniu/Storage/Persistent/ResumeRecorder.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using System.IO; - -namespace Qiniu.Storage.Persistent -{ - /// - /// 分片上传进度记录器 - /// - public class ResumeRecorder - { - //上传进度记录目录 - private string dir; - - /// - /// 构建上传进度记录器 - /// - /// 保存目录 - public ResumeRecorder(string dir) - { - this.dir = dir; - createDirIfNotExist(); - } - - /// - /// 如果指定目录不存在,则创建 - /// - private void createDirIfNotExist() - { - if(!Directory.Exists (this.dir)) - { - Directory.CreateDirectory (this.dir); - } - } - - /// - /// 写入或更新上传进度记录 - /// - /// 记录文件名 - /// 上传进度数据 - public void set(string key, byte[] data) - { - string filePath = Path.Combine(this.dir, key); - using (FileStream stream = - new FileStream(filePath, FileMode.Create, FileAccess.Write)) - { - stream.Write(data, 0, data.Length); - stream.Flush(); - } - } - - /// - /// 获取上传进度记录 - /// - /// 记录文件名 - /// 上传进度数据 - public byte[] get(string key) - { - byte[] data = null; - string filePath = Path.Combine(this.dir, key); - try - { - using (FileStream stream = - new FileStream(filePath, FileMode.Open, FileAccess.Read)) - { - data = new byte[stream.Length]; - stream.Read(data, 0, data.Length); - } - } - catch (Exception) - { - - } - return data; - } - - /// - /// 删除上传进度记录 - /// - /// 记录文件名 - public void del(string key) - { - string filePath = Path.Combine(this.dir, key); - try - { - File.Delete(filePath); - } - catch (Exception) - { - - } - } - } -} diff --git a/Qiniu/Storage/ResumeUploader.cs b/Qiniu/Storage/ResumeUploader.cs deleted file mode 100644 index 1fca8ba4..00000000 --- a/Qiniu/Storage/ResumeUploader.cs +++ /dev/null @@ -1,532 +0,0 @@ -using Newtonsoft.Json; -using Qiniu.Common; -using Qiniu.Http; -using Qiniu.Storage.Persistent; -using Qiniu.Util; -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; - -namespace Qiniu.Storage -{ - /// - /// 文件分片上传 - /// - public class ResumeUploader - { - private HttpManager mHttpManager; - private UploadOptions uploadOptions; - private UpCompletionHandler upCompletionHandler; - private string key; - private long size; - private string[] contexts; - private byte[] chunkBuffer; - private ResumeRecorder resumeRecorder; - private string recordKey; - private long lastModifyTime; - private string filePath; - private long crc32; - private Stream fileStream; - private Dictionary upHeaders; - - /// - /// 构建分片上传对象 - /// - /// 分片上传进度记录器 - /// 分片上传进度记录文件名 - /// 上传的文件全路径 - /// 保存在七牛的文件名 - /// 上传凭证 - /// 上传可选设置 - /// 上传完成结果处理器 - public ResumeUploader(ResumeRecorder recorder, string recordKey, string filePath, - string key, string token, UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler) - { - this.mHttpManager = new HttpManager(); - this.resumeRecorder = recorder; - this.recordKey = recordKey; - this.filePath = filePath; - this.key = key; - this.uploadOptions = (uploadOptions == null) ? UploadOptions.defaultOptions() : uploadOptions; - this.upCompletionHandler = new UpCompletionHandler(delegate(string fileKey, ResponseInfo respInfo, string response) - { - if (respInfo.isOk()) - { - this.uploadOptions.ProgressHandler(key, 1.0); - } - - if (this.fileStream != null) - { - try - { - this.fileStream.Close(); - this.fileStream = null; - } - catch (Exception) { } - } - - try - { - if (upCompletionHandler != null) - { - upCompletionHandler(key, respInfo, response); - } - } - catch (Exception ex) - { - Console.WriteLine("resumable upload completion error, {0}", ex.Message); - } - }); - string upTokenHeader = string.Format("UpToken {0}", token); - this.upHeaders = new Dictionary(); - this.upHeaders.Add("Authorization", upTokenHeader); - this.chunkBuffer = new byte[Config.CHUNK_SIZE]; - } - - public ResumeUploader(ResumeRecorder recorder, string recordKey, Stream stream, - string key, string token, UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler) - { - this.mHttpManager =new HttpManager() ; - this.resumeRecorder = recorder; - this.recordKey = recordKey; - this.fileStream = stream; - this.key = key; - this.uploadOptions = (uploadOptions == null) ? UploadOptions.defaultOptions() : uploadOptions; - this.upCompletionHandler = new UpCompletionHandler(delegate(string fileKey, ResponseInfo respInfo, string response) - { - if (respInfo.isOk()) - { - this.uploadOptions.ProgressHandler(key, 1.0); - } - - if (this.fileStream != null) - { - try - { - this.fileStream.Close(); - this.fileStream = null; - } - catch (Exception) { } - } - - try - { - if (upCompletionHandler != null) - { - upCompletionHandler(key, respInfo, response); - } - } - catch (Exception ex) - { - Console.WriteLine("resumable upload completion error, {0}", ex.Message); - } - }); - string upTokenHeader = string.Format("UpToken {0}", token); - this.upHeaders = new Dictionary(); - this.upHeaders.Add("Authorization", upTokenHeader); - this.chunkBuffer = new byte[Config.CHUNK_SIZE]; - } - - ~ResumeUploader() - { - this.chunkBuffer = null; - this.contexts = null; - this.fileStream = null; - this.upHeaders = null; - } - - #region 发送mkblk请求 - private void makeBlock(string upHost, long offset, int blockSize, int chunkSize, - ProgressHandler progressHandler, CompletionHandler completionHandler) - { - string url = string.Format("{0}/mkblk/{1}", upHost, blockSize); - try - { - this.fileStream.Read(this.chunkBuffer, 0, chunkSize); - } - catch (Exception ex) - { - this.upCompletionHandler(this.key, ResponseInfo.fileError(ex), ""); - return; - } - this.crc32 = CRC32.CheckSumSlice(this.chunkBuffer, 0, chunkSize); - this.mHttpManager.postData(url, this.upHeaders, this.chunkBuffer, 0, chunkSize, - HttpManager.FORM_MIME_OCTECT, new CompletionHandler(delegate (ResponseInfo respInfo, string response) - { - progressHandler(offset, this.size); - completionHandler(respInfo, response); - })); - } - #endregion - - #region 发送bput请求 - private void putChunk(string upHost, long offset, int chunkSize, string context, - ProgressHandler progressHandler, CompletionHandler completionHandler) - { - int chunkOffset = (int)(offset % Config.BLOCK_SIZE); - string url = string.Format("{0}/bput/{1}/{2}", upHost, context, chunkOffset); - try - { - this.fileStream.Read(this.chunkBuffer, 0, chunkSize); - } - catch (Exception ex) - { - this.upCompletionHandler(this.key, ResponseInfo.fileError(ex), ""); - return; - } - this.crc32 = CRC32.CheckSumSlice(this.chunkBuffer, 0, chunkSize); - this.mHttpManager.postData(url, this.upHeaders, this.chunkBuffer, 0, chunkSize, - HttpManager.FORM_MIME_OCTECT, new CompletionHandler(delegate(ResponseInfo respInfo,string response) - { - progressHandler(offset, this.size); - completionHandler(respInfo, response); - })); - } - #endregion - - #region 发送mkfile请求 - private void makeFile(string upHost, CompletionHandler completionHandler) - { - string fname = this.key; - if (!string.IsNullOrEmpty(this.filePath)) - { - fname = Path.GetFileName(this.filePath); - } - - string fnameStr = ""; - if (!string.IsNullOrEmpty(fname)) - { - fnameStr = string.Format("/fname/{0}", StringUtils.urlSafeBase64Encode(fname)); - } - - string mimeTypeStr = string.Format("/mimeType/{0}", StringUtils.urlSafeBase64Encode(this.uploadOptions.MimeType)); - - string keyStr = ""; - if (this.key != null) - { - keyStr = string.Format("/key/{0}", StringUtils.urlSafeBase64Encode(this.key)); - } - - string paramsStr = ""; - if (this.uploadOptions.ExtraParams.Count > 0) - { - string[] paramArray = new string[this.uploadOptions.ExtraParams.Count]; - int j = 0; - foreach (KeyValuePair kvp in this.uploadOptions.ExtraParams) - { - paramArray[j++] = string.Format("{0}/{1}", kvp.Key, StringUtils.urlSafeBase64Encode(kvp.Value)); - } - paramsStr = "/" + StringUtils.join(paramArray, "/"); - } - - string url = string.Format("{0}/mkfile/{1}{2}{3}{4}{5}", upHost, this.size, mimeTypeStr, fnameStr, keyStr, paramsStr); - string postBody = StringUtils.join(this.contexts, ","); - byte[] postBodyData = Encoding.UTF8.GetBytes(postBody); - this.mHttpManager.postData(url, upHeaders, postBodyData, HttpManager.FORM_MIME_URLENCODED, completionHandler); - } - #endregion - /// - /// 分片方式上传文件 - /// - #region 上传文件 - public void uploadFile() - { - // 正常上传,使用UPLOAD_HOST - string uploadHost = Config.UploadFromCDN ? Config.ZONE.UploadHost : Config.ZONE.UpHost; - - try - { - this.fileStream = File.Open(this.filePath, FileMode.Open, FileAccess.Read); - this.lastModifyTime = File.GetLastWriteTime(this.filePath).ToFileTime(); - this.size = this.fileStream.Length; - //long blockCount = (this.size % Config.BLOCK_SIZE == 0) ? (this.size / Config.BLOCK_SIZE) : (this.size / Config.BLOCK_SIZE + 1); - long blockCount = (this.size - 1) / Config.BLOCK_SIZE + 1; - this.contexts = new string[blockCount]; - } - catch (Exception ex) - { - this.upCompletionHandler(this.key, ResponseInfo.fileError(ex), ""); - return; - } - - long offset = recoveryFromResumeRecord(); - this.fileStream.Seek(offset, SeekOrigin.Begin); - this.nextTask(offset, 0, uploadHost); - } - #endregion - - /// - /// 分片方式上传文件流 - /// - #region 上传文件流 - public void uploadStream() - { - // 正常上传,使用UPLOAD_HOST - string uploadHost = Config.UploadFromCDN ? Config.ZONE.UploadHost : Config.ZONE.UpHost; - - try - { - this.lastModifyTime = DateTime.Now.ToFileTime(); - this.size = this.fileStream.Length; - //long blockCount = (this.size % Config.BLOCK_SIZE == 0) ? (this.size / Config.BLOCK_SIZE) : (this.size / Config.BLOCK_SIZE + 1); - long blockCount = (this.size - 1) / Config.BLOCK_SIZE + 1; - this.contexts = new string[blockCount]; - } - catch (Exception ex) - { - this.upCompletionHandler(this.key, ResponseInfo.fileError(ex), ""); - return; - } - - long offset = recoveryFromResumeRecord(); - this.fileStream.Seek(offset, SeekOrigin.Begin); - this.nextTask(offset, 0, uploadHost); - } - #endregion - - #region 从中断日志中读取上传进度 - private long recoveryFromResumeRecord() - { - long offset = 0; - if (this.resumeRecorder != null && this.recordKey != null) - { - byte[] data = this.resumeRecorder.get(this.recordKey); - if (data != null) - { - ResumeRecord r = ResumeRecord.fromJsonData(Encoding.UTF8.GetString(data, 0, data.Length)); - offset = r.Offset; - for (int i = 0; i < r.Contexts.Length; i++) - { - this.contexts[i] = r.Contexts[i]; - } - } - } - return offset; - } - #endregion - - #region 记录/更新上传进度信息 - private void record(long offset) - { - if (this.resumeRecorder == null || offset == 0) - { - return; - } - ResumeRecord r = new ResumeRecord(this.size, offset, this.lastModifyTime, this.contexts); - this.resumeRecorder.set(this.recordKey, Encoding.UTF8.GetBytes(r.toJsonData())); - } - #endregion - - #region 删除上传进度信息 - private void removeRecord() - { - if (this.resumeRecorder != null && this.recordKey != null) - { - this.resumeRecorder.del(this.recordKey); - } - } - #endregion - - #region 判断上传是否被取消 - private bool isCancelled() - { - return this.uploadOptions.CancellationSignal(); - } - #endregion - - #region 计算每次上传的分片大小 - private int calcBPutChunkSize(long offset) - { - int chunkSize = Config.CHUNK_SIZE; - long defaultChunkSize = Config.CHUNK_SIZE; - long left = this.size - offset; - if (left < defaultChunkSize) - { - chunkSize = (int)left; - } - return chunkSize; - } - #endregion - - #region 计算每次创建的块大小 - private int calcMakeBlockSize(long offset) - { - int blockSize = Config.BLOCK_SIZE; - long defaultBlockSize = Config.BLOCK_SIZE; - - long left = this.size - offset; - if (left < defaultBlockSize) - { - blockSize = (int)left; - } - return blockSize; - } - #endregion - - #region 文件上传任务 - private void nextTask(long offset, int retried, string upHost) - { - //上传中途触发停止 - if (this.isCancelled()) - { - this.upCompletionHandler(this.key, ResponseInfo.cancelled(), null); - return; - } - //所有分片已上传 - if (offset == this.size) - { - this.makeFile(upHost, new CompletionHandler(delegate(ResponseInfo respInfo, string response) - { - //makeFile成功 - if (respInfo.isOk()) - { - removeRecord(); - Console.WriteLine("mkfile ok, upload done!"); - this.upCompletionHandler(this.key, respInfo, response); - return; - } - - //失败重试,如果614,则不重试 - if (respInfo.StatusCode != 614) - { - if (respInfo.needRetry() && retried < Config.RETRY_MAX) - { - Console.WriteLine("mkfile retrying due to {0}...", respInfo.StatusCode); - //string upHost2 = Config.ZONE.UploadHost; - fileStream.Seek(offset, SeekOrigin.Begin); - nextTask(offset, retried + 1, upHost); - return; - } - } - - Console.WriteLine("mkfile error, upload failed due to {0}", respInfo.StatusCode); - this.upCompletionHandler(key, respInfo, response); - })); - return; - } - - //创建块或上传分片 - int chunkSize = calcBPutChunkSize(offset); - ProgressHandler progressHandler = new ProgressHandler(delegate(long bytesWritten, long totalBytes) - { - double percent = (double)(offset) / this.size; - Console.WriteLine("resumable upload progress {0}", percent); - // why 0.95 - //if (percent > 0.95) - //{ - // percent = 0.95; - //} - this.uploadOptions.ProgressHandler(this.key, percent); - }); - - CompletionHandler completionHandler = new CompletionHandler(delegate (ResponseInfo respInfo, string response) - { - if (offset % Config.BLOCK_SIZE == 0) - { - Console.WriteLine("mkblk result {0}, offset {1}", respInfo.StatusCode, offset); - } - else - { - Console.WriteLine("bput result {0}, offset {1}", respInfo.StatusCode, offset); - } - - if (!respInfo.isOk()) - { - //如果是701错误,为mkblk的ctx过期 - if (respInfo.StatusCode == 701) - { - Console.WriteLine("mkblk ctx is out of date, re-do upload"); - offset = (offset / Config.BLOCK_SIZE) * Config.BLOCK_SIZE; - fileStream.Seek(offset, SeekOrigin.Begin); - nextTask(offset, retried, upHost); - return; - } - - if (retried >= Config.RETRY_MAX || !respInfo.needRetry()) - { - Console.WriteLine("retried " + retried + " times, all failed"); - this.upCompletionHandler(key, respInfo, response); - return; - } - - // 下一个任务,使用uploadHost - string uploadHost = upHost; - if (respInfo.needRetry()) - { - Console.WriteLine(string.Format("upload-retry #{0}", retried + 1)); - - if (Config.RetryWaitForNext) - { - Console.WriteLine(string.Format("wait for {0} milisecond(s)", Config.RETRY_INTERVAL_MILISEC)); - // 如果需要重试,并且设置了多次重试之间的时间间隔 - System.Threading.Thread.Sleep(Config.RETRY_INTERVAL_MILISEC); - } - - //// 交替使用两个域名重试 - //if (retried % 2 != 0) - //{ - // uploadHost = Config.UploadFromCDN ? Config.ZONE.UploadHost : Config.ZONE.UpHost; - //} - //else - //{ - // uploadHost = Config.UploadFromCDN ? Config.ZONE.UpHost : Config.ZONE.UploadHost; - //} - } - fileStream.Seek(offset, SeekOrigin.Begin); - nextTask(offset, retried + 1, uploadHost); - return; - } - - //请求成功 - string chunkContext = null; - if (response == null || string.IsNullOrEmpty(response)) - { - fileStream.Seek(offset, SeekOrigin.Begin); - nextTask(offset, retried + 1, upHost); - return; - } - - long chunkCrc32 = 0; - - Dictionary respDict = JsonConvert.DeserializeObject>(response); - if (respDict.ContainsKey("ctx")) - { - chunkContext = respDict["ctx"]; - } - if (respDict.ContainsKey("crc32")) - { - chunkCrc32 = Convert.ToInt64(respDict["crc32"]); - } - //if(respDict.ContainsKey("host")) - //{ - // upHost = respDict["host"]; - //} - - if (chunkContext == null || chunkCrc32 != this.crc32) - { - fileStream.Seek(offset, SeekOrigin.Begin); - nextTask(offset, retried + 1, upHost); - return; - } - - this.contexts[offset / Config.BLOCK_SIZE] = chunkContext; - record(offset + chunkSize); - nextTask(offset + chunkSize, retried, upHost); - }); - - //创建块 - if (offset % Config.BLOCK_SIZE == 0) - { - int blockSize = calcMakeBlockSize(offset); - this.makeBlock(upHost, offset, blockSize, chunkSize, progressHandler, completionHandler); - return; - } - - //上传分片 - string context = this.contexts[offset / Config.BLOCK_SIZE]; - this.putChunk(upHost, offset, chunkSize, context, progressHandler, completionHandler); - } - #endregion - } -} \ No newline at end of file diff --git a/Qiniu/Storage/UpCancellationSignal.cs b/Qiniu/Storage/UpCancellationSignal.cs deleted file mode 100644 index a616413c..00000000 --- a/Qiniu/Storage/UpCancellationSignal.cs +++ /dev/null @@ -1,9 +0,0 @@ - -namespace Qiniu.Storage -{ - /// - /// 文件上传取消信号 - /// - /// 取消状态,true为取消,false为继续 - public delegate bool UpCancellationSignal(); -} diff --git a/Qiniu/Storage/UpCompletionHandler.cs b/Qiniu/Storage/UpCompletionHandler.cs deleted file mode 100644 index 38565966..00000000 --- a/Qiniu/Storage/UpCompletionHandler.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Qiniu.Http; - -namespace Qiniu.Storage -{ - /// - /// 上传完成结果处理器 - /// - /// 上传文件的key - /// 上传请求回复信息 - /// 上传请求回复内容 - public delegate void UpCompletionHandler(string key, ResponseInfo respInfo, string response); -} diff --git a/Qiniu/Storage/UpProgressHandler.cs b/Qiniu/Storage/UpProgressHandler.cs deleted file mode 100644 index 46907a2d..00000000 --- a/Qiniu/Storage/UpProgressHandler.cs +++ /dev/null @@ -1,10 +0,0 @@ - -namespace Qiniu.Storage -{ - /// - /// 上传进度处理器 - /// - /// 文件key - /// 上传进度百分比 - public delegate void UpProgressHandler(string key, double percent); -} \ No newline at end of file diff --git a/Qiniu/Storage/UploadManager.cs b/Qiniu/Storage/UploadManager.cs deleted file mode 100644 index 1afd9190..00000000 --- a/Qiniu/Storage/UploadManager.cs +++ /dev/null @@ -1,166 +0,0 @@ -using Qiniu.Common; -using Qiniu.Http; -using Qiniu.Storage.Persistent; -using System; -using System.IO; - -namespace Qiniu.Storage -{ - /// - /// 上传管理器,可以通过该上传管理器自动判断上传的内容是 - /// 采用表单上传还是分片上传。 - /// - /// 对于二进制数据和文件流,目前仅支持表单上传 - /// 对于沙盒文件,目前支持以表单方式和分片方式上传 - /// - public class UploadManager - { - private ResumeRecorder resumeRecorder; - private KeyGenerator keyGenerator; - - /// - /// 默认上传管理器 - /// - public UploadManager() - { - this.resumeRecorder = null; - this.keyGenerator = null; - } - - /// - /// 以指定的分片上传进度记录器和分片上传记录文件名构建上传管理器 - /// - /// 可以指定这两个参数来使分片上传支持断点续传功能 - /// - /// 分片上传进度记录器 - /// 分片上传进度记录文件名 - public UploadManager(ResumeRecorder recorder, KeyGenerator generator) - { - this.resumeRecorder = recorder; - this.keyGenerator = generator; - } - - /// - /// 上传字节数据 - /// - /// 二进制数据 - /// 保存在七牛的文件名 - /// 上传凭证 - /// 上传可选设置 - /// 上传结果处理器 - #region 上传字节数据 - public void uploadData(byte[] data, string key, - string token, UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler) - { - new FormUploader().uploadData(data, key, token, uploadOptions, upCompletionHandler); - } - #endregion - - /// - /// 上传文件流 - /// - /// 文件流对象 - /// 保存在七牛的文件名 - /// 上传凭证 - /// 上传可选设置 - /// 上传结果处理器 - #region 上传文件流 - public void uploadStream(Stream stream, string key, string token, - UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler) - { - long fileSize = stream.Length; - if (fileSize <= Config.PUT_THRESHOLD) - { - new FormUploader().uploadStream(stream, key, token, uploadOptions, upCompletionHandler); - } - else - { - if (this.resumeRecorder == null) - { - string home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); - this.resumeRecorder = new ResumeRecorder(home); - } - - string recorderKey = null; - - if (this.keyGenerator == null) - { - recorderKey = string.Format("qiniu_{0}.resume", Util.StringUtils.md5Hash(key)); - } - else - { - recorderKey = this.keyGenerator(); - } - - new ResumeUploader(this.resumeRecorder, recorderKey, stream, key, token, uploadOptions, upCompletionHandler).uploadStream(); - } - } - #endregion - - /// - /// 上传沙盒文件 - /// - /// 沙盒文件全路径 - /// 保存在七牛的文件名 - /// 上传凭证 - /// 上传可选设置 - /// 上传结果处理器 - #region 上传文件 - public void uploadFile(string filePath, string key, string token, - UploadOptions uploadOptions, UpCompletionHandler upCompletionHandler) - { - try - { - if(upCompletionHandler==null) - { - upCompletionHandler = DefaultUpCompletionHandler; - } - - long fileSize = 0; - FileInfo s = new FileInfo(filePath); - fileSize = s.Length; - - //判断文件大小,选择上传方式 - if (fileSize <= Config.PUT_THRESHOLD) - { - new FormUploader().uploadFile(filePath, key, token, uploadOptions, upCompletionHandler); - } - else - { - if(this.resumeRecorder==null) - { - string home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); - this.resumeRecorder = new ResumeRecorder(home); - } - - string recorderKey = null; - - if (this.keyGenerator == null) - { - recorderKey = string.Format("qiniu_{0}.resume", Util.StringUtils.md5Hash(filePath + key)); - } - else - { - recorderKey = this.keyGenerator(); - } - - new ResumeUploader(this.resumeRecorder, recorderKey, filePath, key, token, uploadOptions, upCompletionHandler).uploadFile(); - } - } - catch (Exception ex) - { - if (upCompletionHandler != null) - { - upCompletionHandler(key, ResponseInfo.fileError(ex), null); - } - } - } - #endregion - - - private void DefaultUpCompletionHandler(string key,ResponseInfo respInfo,string respJson) - { - Console.WriteLine(string.Format("key={0}\nrespInfo={1}\nresponse={2}", key, respInfo, respJson)); - } - } -} \ No newline at end of file diff --git a/Qiniu/Storage/UploadOptions.cs b/Qiniu/Storage/UploadOptions.cs deleted file mode 100644 index 6a0cab40..00000000 --- a/Qiniu/Storage/UploadOptions.cs +++ /dev/null @@ -1,107 +0,0 @@ -using System.Collections.Generic; -using System.Diagnostics; - -namespace Qiniu.Storage -{ - /// - /// 上传可选设置 - /// - public class UploadOptions - { - //扩展变量,名词必须以x:开头,另外值不能为空 - private Dictionary extraParams; - //上传数据或文件的mimeType - public string MimeType { set; get; } - //是否对上传文件或数据做crc32校验 - public bool CheckCrc32 { set; get; } - //上传进度处理器 - public UpProgressHandler ProgressHandler { set; get; } - //上传取消信号 - public UpCancellationSignal CancellationSignal { set; get; } - - /// - /// 过滤掉所有不符合规则的扩展参数 - /// - public Dictionary ExtraParams - { - get - { - return filterParams(extraParams); - } - set - { - this.extraParams = value; - } - } - - /// - /// 构建上传可选设置对象 - /// - /// 在构造函数内部会设置默认的值来回避对象null检测 - /// - /// 扩展参数 - /// 文件MimeType - /// 检查crc32开关 - /// 上传进度处理器 - /// 上传取消信号 - public UploadOptions(Dictionary extraParams, string mimeType, bool checkCrc32, - UpProgressHandler upProgressHandler, UpCancellationSignal upCancellationSignal) - { - this.ExtraParams = extraParams; - this.MimeType = mime(mimeType); - this.CheckCrc32 = checkCrc32; - this.CancellationSignal = (upCancellationSignal != null) ? upCancellationSignal : new UpCancellationSignal(delegate() - { - return false; - }); - this.ProgressHandler = (upProgressHandler != null) ? upProgressHandler : new UpProgressHandler(delegate(string key, double percent) - { - Debug.WriteLine("qiniu up progress " + percent); - }); - } - - /// - /// 默认的上传可选设置对象 - /// - /// 上传可选设置对象 - public static UploadOptions defaultOptions() - { - return new UploadOptions(null, null, false, null, null); - } - - /// - /// 过滤掉所有非x:开头的或者值为空的扩展变量 - /// - /// 待过滤参数 - /// 已过滤参数 - private Dictionary filterParams(Dictionary extraParamsToFilter) - { - Dictionary filtered = new Dictionary(); - if (extraParamsToFilter != null) - { - foreach (KeyValuePair kvp in extraParamsToFilter) - { - if (kvp.Key.StartsWith("x:") && kvp.Value != null && kvp.Value.Trim().Length > 0) - { - filtered.Add(kvp.Key, kvp.Value); - } - } - } - return filtered; - } - - /// - /// 检测MimeType - /// - /// mimeType参数 - /// mimeType值 - private string mime(string mimeType) - { - if (mimeType == null || mimeType.Trim().Length == 0) - { - return "application/octet-stream"; - } - return mimeType; - } - } -} \ No newline at end of file diff --git a/Qiniu/Util/Auth.cs b/Qiniu/Util/Auth.cs deleted file mode 100644 index d877b3d5..00000000 --- a/Qiniu/Util/Auth.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Text; - -namespace Qiniu.Util -{ - public class Auth - { - public static string createUploadToken(PutPolicy putPolicy, Mac mac) - { - string jsonData = putPolicy.ToString(); - return mac.SignWithData(Encoding.UTF8.GetBytes(jsonData)); - } - - public static string createManageToken(string url, byte[] reqBody, Mac mac) - { - return string.Format("QBox {0}", mac.SignRequest(url, reqBody)); - } - - public static string createDownloadToken(string rawUrl, Mac mac) - { - return mac.Sign(Encoding.UTF8.GetBytes(rawUrl)); - } - } -} diff --git a/Qiniu/Util/Mac.cs b/Qiniu/Util/Mac.cs deleted file mode 100644 index 6110d468..00000000 --- a/Qiniu/Util/Mac.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using System.IO; -using System.Security.Cryptography; -using System.Text; - -namespace Qiniu.Util -{ - public class Mac - { - public string AccessKey { set; get; } - public string SecretKey { set; get; } - public Mac(string accessKey, string secretKey) - { - this.AccessKey = accessKey; - this.SecretKey = secretKey; - } - - private string _sign(byte[] data) - { - HMACSHA1 hmac = new HMACSHA1(Encoding.UTF8.GetBytes(this.SecretKey)); - byte[] digest = hmac.ComputeHash(data); - return StringUtils.urlSafeBase64Encode(digest); - } - - public string Sign(byte[] data) - { - return string.Format("{0}:{1}", this.AccessKey, this._sign(data)); - } - - public string SignWithData(byte[] data) - { - string encodedData = StringUtils.urlSafeBase64Encode(data); - return string.Format("{0}:{1}:{2}", this.AccessKey, this._sign(Encoding.UTF8.GetBytes(encodedData)), encodedData); - } - - public string SignRequest(string url, byte[] reqBody) - { - Uri u = new Uri(url); - using (HMACSHA1 hmac = new HMACSHA1(Encoding.UTF8.GetBytes(this.SecretKey))) - { - string pathAndQuery = u.PathAndQuery; - byte[] pathAndQueryBytes = Encoding.UTF8.GetBytes(pathAndQuery); - using (MemoryStream buffer = new MemoryStream()) - { - buffer.Write(pathAndQueryBytes, 0, pathAndQueryBytes.Length); - buffer.WriteByte((byte)'\n'); - if (reqBody!=null && reqBody.Length > 0) - { - buffer.Write(reqBody, 0, reqBody.Length); - } - byte[] digest = hmac.ComputeHash(buffer.ToArray()); - string digestBase64 = StringUtils.urlSafeBase64Encode(digest); - return string.Format("{0}:{1}", this.AccessKey, digestBase64); - } - } - } - } -} \ No newline at end of file diff --git a/Qiniu/Util/PutPolicy.cs b/Qiniu/Util/PutPolicy.cs deleted file mode 100644 index 88a4186f..00000000 --- a/Qiniu/Util/PutPolicy.cs +++ /dev/null @@ -1,64 +0,0 @@ -using Newtonsoft.Json; -using System; - -namespace Qiniu.Util -{ - [JsonObject(MemberSerialization.OptIn)] - public class PutPolicy - { - [JsonProperty("scope")] - public string Scope { set; get; } - [JsonProperty("deadline")] - public int Deadline { set; get; } - [JsonProperty("insertOnly")] - public int? InsertOnly { set; get; } - [JsonProperty("saveKey")] - public string SaveKey { set; get; } - [JsonProperty("endUser")] - public string EndUser { set; get; } - - [JsonProperty("returnUrl")] - public string ReturnUrl { set; get; } - [JsonProperty("returnBody")] - public string ReturnBody { set; get; } - - [JsonProperty("callbackUrl")] - public string CallbackUrl { set; get; } - [JsonProperty("callbackBody")] - public string CallbackBody { set; get; } - [JsonProperty("callbackBodyType")] - public string CallbackBodyType { set; get; } - [JsonProperty("callbackHost")] - public string CallbackHost { set; get; } - [JsonProperty("callbackFetchKey")] - public int? CallbackFetchKey { set; get; } - - [JsonProperty("persistentOps")] - public string PersistentOps { set; get; } - [JsonProperty("persistentNotifyUrl")] - public string PersistentNotifyUrl { set; get; } - [JsonProperty("persistentPipeline")] - public string PersistentPipeline { set; get; } - - [JsonProperty("fsizeLimit")] - public int? FsizeLimit { set; get; } - [JsonProperty("detectMime")] - public int? DetectMime { set; get; } - [JsonProperty("mimeLimit")] - public string MimeLimit { set; get; } - - [JsonProperty("deleteAfterDays")] - public int? DeleteAfterDays { set; get; } - - public void SetExpires(int expireInSeconds) - { - TimeSpan ts = DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1, 0, 0, 0)); - this.Deadline = (int)ts.TotalSeconds + expireInSeconds; - } - - public override string ToString() - { - return StringUtils.jsonEncode(this); - } - } -} diff --git a/README.md b/README.md index 906387e8..95213101 100644 --- a/README.md +++ b/README.md @@ -1,623 +1,209 @@ -# Qiniu Resource (Cloud) Storage SDK for C# # +#Qiniu (Cloud) C# SDK ##关于 -此 C# SDK 适用于.NET Framework 2.0以上版本,基于七牛云API参考手册构建。使用此 SDK 构建您的网络应用程序,能让您以非常便捷地方式将数据安全地存储到七牛云存储上。无论您的网络应用是一个网站程序,还是包括从云端(服务端程序)到终端(手持设备应用)的架构的服务或应用,通过七牛云存储及其 SDK,都能让您应用程序的终端用户高速上传和下载,同时也让您的服务端更加轻盈。 +此 C# SDK 适用于.NET Framework 2.0+ 和 .NET Core,基于七牛云API参考手册构建。使用此 SDK 构建您的网络应用程序,能让您以非常便捷地方式将数据安全地存储到七牛云存储上。无论您的网络应用是一个网站程序,还是包括从云端(服务端程序)到终端(手持设备应用)的架构的服务或应用,通过七牛云存储及其 SDK,都能让您应用程序的终端用户高速上传和下载,同时也让您的服务端更加轻盈。 -###使用准备 +##SDK文档 -####下载安装 +以下文档用于检索SDK接口、属性说明,它将有助于您理解SDK的结构。 -######源码下载 +* [HTML在线浏览](http://oiy037d6a.bkt.clouddn.com/csharp-sdk-ref-v7.2.2/index.html) -``` -git clone https://github.com/qiniu/csharp-sdk -``` - -**注意** - -当前最新版本为v7(master),另请参考 [v7.0.0.5 release](https://github.com/qiniu/csharp-sdk/releases/tag/v7.0.0.5) - -######添加引用 - -获取编译好的Qiniu.dll后,在项目中添加Qiniu.dll引用 - -######附加依赖项 - -C# SDK引用了第三方的开源项目[Json.NET](http://www.newtonsoft.com/json)因此,您需要在项目中引用它,或者使用NuGet安装 - -``` -Install-Package Newtonsoft.Json -``` -######NuGet安装 - -此外,您也可以使用NuGet来管理SDK包,在Visul Studio中打开包管理器即可搜索到。 - -####秘钥配置 - -要接入七牛云存储,您需要拥有一对有效的 Access Key (以下简称AK) 和 Secret Key (以下简称SK) 用来进行签名认证。步骤如下: +* [CHM文件下载](http://oiy037d6a.bkt.clouddn.com/QiniuCSharpSDK-Ref-v7.2.2.chm) -1. 登录七牛开发者平台,查看 [AK 和 SK](https://portal.qiniu.com/user/key),如果没有账号,可以开通一个[七牛开发者帐号](https://portal.qiniu.com/signup) +以下文档/链接提供一些基本示例,参考这些示例可以帮助您更快熟悉如何使用这套SDK。 -2. 在适当位置(比如程序中的settings模块)配置 AK & SK +* [github | csharp-sdk-examples](https://github.com/fengyhack/csharp-sdk-shared-examples) -3. 接下来就可以调用七牛API服务,如文件上传、数据处理等 +* [C# SDK使用指南 | 代码示例](http://oiy037d6a.bkt.clouddn.com/csharp-sdk-man-v7.2.2/index.html) -###使用示例 +##如何安装 -在QSunSync和qiniulab这两个工具中,都用到了此SDK,研究它们的源代码也能帮助您更好地了解此SDK: +当前最新版本及最新改动同步在master分支。 -* [QSunSync](https://github.com/qiniu/QSunSync) +以下是安装SDK的几种不同的方式,您可以根据需要来选择。 -* [QiniulaLab](https://github.com/qiniu/qiniulab) +**1. 直接添加DLL引用** -您也可以参考官方文档 [C# SDK 使用指南](http://developer.qiniu.com/code/v7/sdk/csharp.html) +您可以在[这里](https://github.com/qiniu/csharp-sdk/releases)找到所有的Release,选择您需要的版本下载,解压后将*.dll文件添加至项目引用。需要注意的是,此SDK依赖[Json.NET](http://www.newtonsoft.com/json),可以添加对应版本Newtonsoft.Json.dll引用或者使用NuGet来安装它: -**注意** - -不同的空间(bucket)可能位于不同的机房(区域/Zone),因此文件管理等操作需要正确配置Zone(位于Qiniu.Common命名空间),默认配置为"华东机房",用户可以有以下两种方法配置Zone: - -1.直接配置( 如果确定机房所在Zone,可以使用此方法) - -```csharp -// XXX是其中之一: CN_East CN_South CN_North US_North -Qiniu.Common.Config.ZONE = Qiniu.Common.Zone.ZONE_XXX(); - -// 或者使用ZoneID (CN_East CN_South CN_North US_North) -Qiniu.Common.Config.ConfigZone(zoneId); ``` - -2.使用AutoZone自动配置(推荐使用这个方法) - -```csharp -// AK = ACCESS_KEY -Qiniu.Common.Config.ConfigZoneAuto(AK,BUCKET); +Install-Package Newtonsoft.Json ``` -示例代码中没有特别指明有关Zone的设置,请特别注意。 - -####上传文件 - -#####上传流程 - -为了尽可能地改善终端用户的上传体验,七牛云存储首创了客户端直传功能。更多信息请参阅[业务流程](http://developer.qiniu.com/article/developer/programming-model.html#workflow)。 - -#####普通上传 +**2. 包管理器(NuGet)安装** -推荐使用UploadManager,以下代码示意了如何使用UploadManager来上传一个本地文件(请注意Zone设置,下同): +或者从NuGet来安装,以Visual Studio 2013/2015为例,打开NuGet程序包管理器搜索Qiniu.Shared或者在控制台中键入以下命令: -```csharp -using System; -using Qiniu.Util; -using Qiniu.Storage; -using System.IO; - -namespace ConsoleDemo -{ - class SimpleUploadDemo - { - public static void Main(string[] args) - { - string AK = "ACCESS_KEY"; - string SK = "SECRET_KEY"; - // 目标空间名 - string bucket = "TARGET_BUCKET"; - // 目标文件名 - string saveKey = "SAVE_KEY"; - // 本地文件 - string localFile = "LOCAL_FILE"; - - // 上传策略 - PutPolicy putPolicy = new PutPolicy(); - // 设置要上传的目标空间 - putPolicy.Scope = bucket; - // 上传策略的过期时间(单位:秒) - putPolicy.SetExpires(3600); - // 文件上传完毕后,在多少天后自动被删除 - putPolicy.DeleteAfterDays = 1; - - // 请注意这里的Zone设置(如果不设置,就默认为华东机房) - // var zoneId = Qiniu.Common.AutoZone.Query(AK,BUCKET); - // Qiniu.Common.Config.ConfigZone(zoneId); - - Mac mac = new Mac(AK, SK); // Use AK & SK here - // 生成上传凭证 - string uploadToken = Auth.createUploadToken(putPolicy, mac); - - UploadOptions uploadOptions = null; - - // 上传完毕事件处理 - UpCompletionHandler uploadCompleted = new UpCompletionHandler(OnUploadCompleted); - - // 方式1:使用UploadManager - //默认设置 Qiniu.Common.Config.PUT_THRESHOLD = 512*1024; - //可以适当修改,UploadManager会根据这个阈值自动选择是否使用分片(Resumable)上传 - UploadManager um = new UploadManager(); - um.uploadFile(localFile, saveKey, token, uploadOptions, uploadCompleted); - - // 方式2:使用FormManager - //FormUploader fm = new FormUploader(); - //fm.uploadFile(localFile, saveKey, token, uploadOptions, uploadCompleted); - - Console.ReadKey(); - } - - private static void OnUploadCompleted(string key, ResponseInfo respInfo, string respJson) - { - // respInfo.StatusCode - // respJson是返回的json消息,示例: { "key":"FILE","hash":"HASH","fsize":FILE_SIZE } - } - } -} ``` - -#####断点续上传 - -实际上也是分片上传,使用ResumeUploader,参考如下示例: - -```csharp -using System; -using Qiniu.Util; -using Qiniu.Storage; -using System.IO; - -namespace ConsoleDemo -{ - class ResumableUploadDemo - { - public static void Main(string[] args) - { - string AK = "ACCESS_KEY"; - string SK = "SECRET_KEY"; - string bucket = "TARGET_BUCKET"; - string saveKey = "SAVE_KEY"; - string localFile = "LOCAL_FILE"; - // 上传进度记录保存的目录 - string recordPath = "RECORD_PATH"; - // 上传进度保存为文件 - string recordFile = "RECORD_FILE"; - - // 设置上传时的分片大小(单位为字节,已默认设置为2MB,不得大于4MB,一般保留默认即可) - // Qiniu.Common.CHUNK_SIZE = N_CHUNK_SIZE; - - UploadOptions uploadOptions = new UploadOptions( - null, // ExtraParams - null, // MimeType - false, // CheckCrc32 - new UpProgressHandler(OnUploadProgressChanged), // 上传进度 - null // CancelSignal - ); - - UpCompletionHandler uploadCompleted = new UpCompletionHandler(OnUploadCompleted); // 上传完毕 - - // 上传时会将当前进度记录写到文件,下次可以“断点续传” - ResumeRecorder rr = new ResumeRecorder(recordPath); - // 开始上传 - ResumeUploader ru = new ResumeUploader( - rr, // 续传记录 - recordFile, // 续传记录文件 - localFile, // 待上传的本地文件 - saveKey, // 要保存的文件名 - token, // 上传凭证 - uploadOptions, // 上传选项(其中包含进度处理),可为null - uploadCompleted // 上传完毕事件处理 - ); - - ru.uploadFile(); - Console.ReadKey(); - } - - private static void OnUploadProgressChanged(string key, double percent) - { - // percent = [0(开始)~1.0(完成)] - } - - private static void OnUploadCompleted(string key, ResponseInfo respInfo, string respJson) - { - // respInfo.StatusCode - // respJson是返回的json消息,示例: { "key":"FILE","hash":"HASH","fsize":FILE_SIZE } - } - } -} +Install-Package Qiniu.Shared ``` -**说明** - -可以使用UploadManager配合一个阈值(Qiniu.Common.PUT_THRESHOLD)让程序(SDK)自动选择使用简单上传(传适合于小文件)或者分片上传(传适合于大文件或者需要断点续上传)。分片上传/断点续上传使用ResumbaleUploader。 +**3. 从源码编译** -使用此SDK上传文件需要注意: +当然,您也可以直接从源码编译 -*上传域名* - -请设置`UploadFromCDN`参数(true/false,默认为false即不使用CDN): - -```csharp -Qiniu.Common.Config.UploadFromCDN = false; +``` +git clone https://github.com/qiniu/csharp-sdk ``` -*关于UpCompletionHandler参数* - -1.上传方法(如uploadFile)中包含UploadOptions,UpCompletionHandler等参数,可以保持默认(设置null即可),也可以自行设置 - -2.UpCompletionHandler是**在上传完成后或者遇到错误(比如网络错误等)触发**,其中会包含一些返回信息,可以在此进行处理 +##如何编译 -*关于分片上传* +推荐使用VS2013及以上版,根据目标平台选择对应的解决方案文件并打开: -1.分片上传时,片大小(Qiniu.Common.CHUNK_SIZE)可以在上传之前预先设置 +| 目标 | 解决方案文件 | +|--------|--------| +| .NET Framework 2.0 | Qiniu.Net20.sln | +| .NET Framework 3.5 | Qiniu.Net35.sln | +| .NET Framework 4.0 | Qiniu.Net40.sln | +| .NET Framework 4.5 | Qiniu.Net45.sln | +| .NET Framework 4.6 | Qiniu.Net46.sln | +| .NET Core(netstandard1.6) | Qiniu.NetStandard16.sln | +| 以上全部 | Qiniu.ALL_VER.sln | -2.**CHUNK_SIZE不得大于4MB**,默认已设置为2MB(可自行设置为512KB,1MB等) +**注意** -3.如果分片(chunk)较小,上传一个chunk的耗时更短,但整个文件需要被切分成更多的chunk +如需编译`Qiniu.NetStandard16`或者`Qiniu.ALL_VER`(它包含前者),请先将`project.json`和`project.lock.json`拷贝至`Qiniu`文件夹下,或者拷贝`project.json`文件然后执行`dotnet restore`命令(推荐)。 -4.如果chunk设置得太大,上传单个chunk可能会出现连接超时的问题 +如需编译其他非NetCore版本,请删除`Qiniu`文件夹下的`project.json`和`project.lock.json`(如果有)。 -5.使用ResumbaleUploader时,**上传不同的文件,请务必使用不同的recordPath/recordFile**,因为断点记录和上传文件是对应的 +##API参考手册 -*关于上传重试* +* [对象存储API参考手册](http://developer.qiniu.com/article/index.html#kodo-api-handbook) -上传过程中遇到网络异常(如网络突然断开然后恢复),SDK会自动重试,最大重试次数默认5: +* [数据处理API参考手册](http://developer.qiniu.com/article/index.html#dora-api-handbook) -```csharp -Qiniu.Common.Config.RETRY_MAX = 5; -``` +* [融合CDN加速API参考手册](http://developer.qiniu.com/article/index.html#fusion-api-handbook) -可以设置是否重试等待(一次重试失败后是否等待一段时间后开始下一次重试,默认不开启) +##相关资源 -```csharp -Qiniu.Common.Config.RetryWaitForNext = true; -``` +如果您有任何关于我们文档或产品的建议和想法,欢迎到我们的技术论坛参与讨论。 -重试等待间隔(仅当开启重试等待才有效,默认1000ms) +* [技术论坛](http://segmentfault.com/qiniu) - 在这里您可以和其他开发者愉快的讨论如何更好的使用七牛云服务 -```csharp -Qiniu.Common.Config.RETRY_INTERVAL_MILISEC = 1000; -``` +* [提交工单](http://support.qiniu.com/hc/request/guest/) - 如果您的问题不适合在论坛讨论或得不到回答,您也可以提交一个工单,技术支持人员会尽快回复您 -####文件下载 +* [博客](http://blog.qiniu.com/) - 这里会持续发布市场活动和技术分享文章 -#####生成下载链接 +* [微博](http://weibo.com/qiniutek) -生成授权下载链接 `ACC_URL = RAW_URL+Expire+Token` +* [常见问题](http://developer.qiniu.com/article/faqs/) -比如原始链接 `RAW_URL = http://example.com/file/1.jpg` +##贡献代码 -加上过期时间戳(Expire)后 `http://example.com/file/1.jpg?e=1476783956` +1. Fork -然后Auth生成Token拼接上去 `http://example.com/file/1.jpg?e=1476783956&token=` +2. 创建您的特性分支 git checkout -b my-new-feature -**说明** +3. 提交您的改动 git commit -am 'Added some feature' -如果原始链接中已包含·?·字符(如`http://xxx/1.jpg?query_what`),后面就不应该再次出现该字符,因此时间戳后缀应该是类似`&e=1476783956`这样的形式,最后的链接可能会是这样子`http://xxx/1.jpg?query_what&e=1476783956&token=` +4. 将您的修改记录提交到远程 git 仓库 git push origin my-new-feature -示例代码 +5. 然后到 github 网站的该 git 远程仓库的 my-new-feature 分支下发起 Pull Request -```csharp -using Qiniu.Util; -// AK = "ACCESS_KEY" -// SK = "SECRET_KEY" -// 加上过期参数,使用 ?e= -// 如果rawUrl中已包含?,则改用&e= -// rawURL = "RAW_URL" + "?e=1482207600"; -Mac mac = new Mac(AK, SK); -string token = Auth.createDownloadToken(rawUrl, mac); -string signedURL = rawURL + "&token=" + token; -``` -####空间资源管理 +##许可证 -#####简单处理 +Copyright (c) 2017 [qiniu.com](www.qiniu.com) -支持stat、copy、move、delete,listFiles等,具体可参阅[examples/BucketFileManagemt.cs](https://github.com/qiniu/csharp-sdk/blob/master/examples/BucketFileManagement.cs)代码和BucketManager模块说明。 +基于 MIT 协议发布: -**说明** +www.opensource.org/licenses/MIT -在BucketManager类中提供了listFiles方法`listFiles(bucket, prefix, marker, limit, delimiter)`. +##附录 -该方法返回值中,有以下3个字段需要关注: +###速览.NET Core -| 字段 | 含义 | -|-----|-----| -| Marker | 请参阅下述的`marker`参数 | -| Items | 返回的结果,其中包括文件名、hash、大小等信息 | -| CommonPrefixes | 请参阅下述的`delimiter`和`prefix`参数 | +下面是一个入门向导,如果您对如何创建及使用.NET Core程序还不太熟悉,可以参考;如果您已经比较熟悉,可以直接略过(或者也可以帮助我们改进^_^)。 -函数参数说明如下: +开始之前,您需要准备`dotnet`工具,参见https://github.com/dotnet/cli/ -| 参数 | 含义 | -|--------|--------| -|bucket|目标空间名称| -|prefix|返回指定文件名前缀的文件列表(prefix可设为null)| -|marker|考虑到设置limit后返回的文件列表可能不全(需要重复执行listFiles操作) 执行listFiles操作时使用marker标记来追加新的结果。**特别注意**首次执行listFiles操作时marker为null| -|limit|每次返回结果所包含的文件总数限制(limit<=1000,*建议值100*)| -|delimiter|分隔符,比如-或者/等等,可以模拟作为目录结构(参考下述示例)。假设指定空间中有2个文件 fakepath/1.txt fakepath/2.txt 现设置delimiter=/ 得到结果items =[],commonPrefixes = [fakepath/] 调整prefix=fakepath/ delimiter=null 得到所需结果items=[1.txt,2.txt] 于是可以在本地先创建一个目录fakepath,然后在该目录下写入items中的文件| +以下步骤基本上都是在命令行终端下执行(如Windows的命令行控制台,Ubuntu/Mac的终端)。 +####1. 创建 -以下是一个简单的示例: +首先切换到您的项目工作目录,然后键入以下命令来创建一个新的项目: -```csharp -// AK = "ACCESS_KEY" -// SK = "SECRET_KEY" -Mac mac = new Mac(AK, SK); -BucketManager bm = new BucketManager(mac); +``` +dotnet new +dotnet restore +``` -string bucket = "BUCKET"; // 目标空间 -string marker = ""; // 首次请求时marker必须为空 -string prefix = null; // 按文件名前缀保留搜索结果 -string delimiter = null; // 目录分割字符(比如"/") -int limit = 100; // 最大值1000 +**注意** -// 返回结果存储在items中 -List items = new List(); +在执行`dotnet restore`之前,您可以在文本编辑器中打开并修改`project.json`文件(这个文件在执行`dotnet new`后就会自动生成)内容,下面是一个示例: -// 由于limit限制,可能需要执行多次操作 -// 返回值中Marker字段若非空,则表示文件数超过了limit -do +```json { - var result = bm.listFiles(bucket, prefix, marker, limit, delimiter); - marker = result.Marker; - if (result.Items != null) - { - items.AddRange(result.Items); - } -} while (!string.IsNullOrEmpty(marker)); - -// 在这里处理文件列表items + "version": "1.0.0-*", + "buildOptions": { + "emitEntryPoint": true + }, + + "dependencies": { + "Microsoft.NETCore.App": { + "version": "1.0.1" + }, + "Qiniu": "7.1.0.0", + "Newtonsoft.Json": "9.0.1" + }, + + "frameworks": { + "netcoreapp1.0": { + "imports": "dnxcore50" + } + }, + + "runtimes": { + "win7-x64": {}, + "win7-x86": {}, + "osx.10.10-x64": {}, + "osx.10.11-x64": {}, + "ubuntu.14.04-x64": {}, + "ubuntu.16.04-x64": {} + } +} ``` -完整示例及其它更多代码可以参考SDK的[examples目录](https://github.com/qiniu/csharp-sdk/tree/master/examples) - -#####批量处理 +创建好项目之后就可以编写您的csharp代码了。 -batch批处理: +#### 2. 发布 -/batch +根据您的目标平台(操作系统),选择其中一个来执行: -op=`OP1`&op=`OP2`... - -如下示例: - -```csharp -// AK = ACCESS_KEY -// SK = SECRET_KEY -Mac mac = new Mac(AK, SK); -// 批量操作类似于 -// op=&op=&op=... -string batchOps = "BATCH_OPS"; -BucketManager bm = new BucketManager(mac); -HttpResult result = bm.batch(batchOps); -// 或者 -//string[] batch_ops={"","","",...}; -//bm.batch(batch_ops); -//返回结果在这里result.Response +``` +dotnet publish -r win7-x64 +dotnet publish -r ubuntu.16.04-x64 +dotnet publish -r osx.10.11-x64 ``` -可参考[examples/BucketManagement.batch()](https://github.com/qiniu/csharp-sdk/blob/master/examples/BucketFileManagement.cs#L129) - -#####新特性:force参数 - -move/copy支持force参数,另请参阅[资源复制的force参数](http://developer.qiniu.com/code/v6/api/kodo-api/rs/copy.html) - -####持久化操作 - -如:`fops = vframe/jpg/offset/1/w/480/h/360/rotate/90` 表示视频截图。 - -####dfop数据处理 - -使用方法: - -`dfop(FOP,URL)` 或者`dfop(FOP,DATA)` - -FOP是fop操作字符串,例如"imageInfo",目前不支持saveas、avvod - -URL是资源链接,DATA是资源的字节数据,资源最大为20MB - -示例: - -```csharp -string AK = "AccessKey"; -string SK = "SecretKey"; -Mac mac = new Mac(AK,SK); -Dfop dx = new Dfop(mac); - -string fop = "imageInfo"; -string url = "http://www.hello.world.net/images/1.jpg"; -string file = "F:\\images\\1.jpg"; -byte[] data = File.ReadAllBytes(file); - -DfopResult result1 = dx.dfop(fops,url); -DfopResult result2 = dx.dfop(fops,data); - ``` - -####Fusion(融合CDN加速) - -此模块包括以下几个功能: - -* 缓存刷新 - -* 文件预取 - -* 流量带宽 - -* 日志查询 +发布之后,直接拷贝发布目录下的所有文件到目标计算机就可以直接使用。 -这些功能都包含在`FusionManager`里面,其初始化方式如下: +如果目标平台上已经安装了.NET Core运行时,那么您需要做的就是编译: -```csharp -string AK="ACCESS_KEY"; -string SK="SECRET_KEY"; -Mac mac = new Mac(AK,SK); -FusionManager fxm = new FusionManager(mac); ``` - -#####缓存刷新 - -```csharp -string[] urls = new string[] { "URL1", "URL2" }; -string[] dirs = new string[] { "DIR1", "DIR2" }; -RefreshRequest request = new RefreshRequest(); -request.AddUrls(urls); -request.AddDirs(dirs); -RefreshResult result = fxm.Refresh(request); -Console.WriteLine(result); +dotnet build ``` -另请参阅[缓存刷新-接口文档](http://developer.qiniu.com/article/fusion/api/refresh.html) +#### 3. 执行 -#####文件预取 +**如果您使用的是OSX 10.11(EI Capitan)**, 请先安装openssl: -```csharp -string[] urls = new string[] { "URL1", "URL2" }; -PrefetchRequest request = new PrefetchRequest(urls); -PrefetchResult result = fxm.Prefetch(request); -Console.WriteLine(result); ``` - -另请参阅[文件预取-接口文档](http://developer.qiniu.com/article/fusion/api/refresh.html) - -#####流量带宽 - -带宽查询 - -```csharp -BandwidthRequest request = new BandwidthRequest(); -request.StartDate = "START_DATE"; // "2016-09-01" -request.EndDate = "END_DATE"; // "2016-09-20" -request.Granularity = "GRANU"; // "day" -request.Domains = "DOMAIN1;DOMAIN2"; // domains -BandwidthResult result = fxm.Bandwidth(request); -Console.WriteLine(result); +brew update +brew install openssl +brew link --force openssl +ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/ +ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/ ``` -流量查询 +假设您编译好的程序(*built app*)是`Example.dll`,您可以键入以下命令来执行: -```csharp -FluxRequest request = new FluxRequest(); -request.StartDate = "START_DATE"; // "2016-09-01" -request.EndDate = "END_DATE"; // "2016-09-20" -request.Granularity = "GRANU"; // "day" -request.Domains = "DOMAIN1;DOMAIN2"; // domains -FluxResult result = fxm.Flux(request); -Console.WriteLine(result); ``` - -另请参阅[流量带宽-接口文档](http://developer.qiniu.com/article/fusion/api/traffic-bandwidth.html) - -#####日志查询 - -```csharp -LogListRequest request = new LogListRequest(); -request.Day = "DAY"; // "2016-09-01" -request.Domains = "DOMAIN1"; // domains -LogListResult result = fusionMgr.LogList(request); -Console.WriteLine(result); +dotnet Example.dll ``` -另请参阅[日志查询-接口文档](http://developer.qiniu.com/article/fusion/api/log.html) - -###SDK结构 - -#####总体框架 - -C# SDK的总体框架如下图 - -![SDK diagram](Docs/imgs/SDKdg.png) - -主要包含Auth、PutPolicy、Storage、Http、Processing等模块 - -######Auth - -![Auth](Docs/imgs/Auth.png) - -得到上传/管理/下载凭证。 - -另请参阅:[上传凭证](http://developer.qiniu.com/article/developer/security/upload-token.html) - -######PutPolicy - -![PutPolicy](Docs/imgs/PutPolicy.png) - -上传策略,主要是一些参数设置。 - -另请参阅:[上传策略](http://developer.qiniu.com/article/developer/security/put-policy.html) - -######HttpManager - -![HttpManager](Docs/imgs/HttpManager.png) - -HttpManager模块负责HTTP请求与响应。 - -######BucketManager - -![BucketManager](Docs/imgs/BucketManager.png) - -BucketManager模块支持对空间文件的各种操作,如stat,copy,move等,支持批量操作(batch)。 - -######UploadManager - -![UploadManager](Docs/imgs/UploadManager.png) - -上传管理器:可以通过该上传管理器自动判断上传的内容是采用表单上传还是分片上传。 - -* 对于二进制数据和文件流,目前仅支持表单上传 - -* 对于沙盒文件,目前支持以表单方式和分片方式上传 - -######FormUploader - -![FormUploader](Docs/imgs/FormUploader.png) - -以表单的方式上传文件/字节数据/数据流 - -######ResumeUploader - -![ResumeUploader](Docs/imgs/ResumeUploader.png) - -文件分片上传,支持文件/数据流 - -######Pfop - -![pfop](Docs/imgs/pfop.png) - -持久化,可以配合上传使用,比如上传complete事件触发数据处理。 - -###API参考手册 - -* [对象存储API参考手册](http://developer.qiniu.com/article/index.html#kodo-api-handbook) - -* [数据处理API参考手册](http://developer.qiniu.com/article/index.html#dora-api-handbook) - -###相关资源 - -如果您有任何关于我们文档或产品的建议和想法,欢迎到我们的技术论坛参与讨论。 - -* [技术论坛](http://segmentfault.com/qiniu) - 在这里您可以和其他开发者愉快的讨论如何更好的使用七牛云服务 - -* [提交工单](http://support.qiniu.com/hc/request/guest/) - 如果您的问题不适合在论坛讨论或得不到回答,您也可以提交一个工单,技术支持人员会尽快回复您 - -* [博客](http://blog.qiniu.com/) - 这里会持续发布市场活动和技术分享文章 - -* [微博](http://weibo.com/qiniutek) - -* [常见问题](http://developer.qiniu.com/article/faqs/) - -####贡献代码 - -1. Fork - -2. 创建您的特性分支 git checkout -b my-new-feature - -3. 提交您的改动 git commit -am 'Added some feature' - -4. 将您的修改记录提交到远程 git 仓库 git push origin my-new-feature - -5. 然后到 github 网站的该 git 远程仓库的 my-new-feature 分支下发起 Pull Request - - -###许可证 - -Copyright (c) 2016 [qiniu.com](www.qiniu.com/) - -基于 MIT 协议发布: - -www.opensource.org/licenses/MIT +当然,执行这个命令之前,`dotnet`工具是必须安装的。 +如果您发布到Windows并且生成了exe文件,直接双击就可以运行。 diff --git a/csharp-sdk.sln b/csharp-sdk.sln deleted file mode 100644 index d0708797..00000000 --- a/csharp-sdk.sln +++ /dev/null @@ -1,38 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.30723.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qiniu", "Qiniu\Qiniu.csproj", "{E5A764FD-FC95-4B51-BB10-9A807ED25652}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qiniu.Test", "Qiniu.Test\Qiniu.Test.csproj", "{353CEFE0-58AF-4049-998B-336CE1212F1E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|Mixed Platforms = Debug|Mixed Platforms - Release|Any CPU = Release|Any CPU - Release|Mixed Platforms = Release|Mixed Platforms - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E5A764FD-FC95-4B51-BB10-9A807ED25652}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E5A764FD-FC95-4B51-BB10-9A807ED25652}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E5A764FD-FC95-4B51-BB10-9A807ED25652}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {E5A764FD-FC95-4B51-BB10-9A807ED25652}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {E5A764FD-FC95-4B51-BB10-9A807ED25652}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E5A764FD-FC95-4B51-BB10-9A807ED25652}.Release|Any CPU.Build.0 = Release|Any CPU - {E5A764FD-FC95-4B51-BB10-9A807ED25652}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {E5A764FD-FC95-4B51-BB10-9A807ED25652}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {353CEFE0-58AF-4049-998B-336CE1212F1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {353CEFE0-58AF-4049-998B-336CE1212F1E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {353CEFE0-58AF-4049-998B-336CE1212F1E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {353CEFE0-58AF-4049-998B-336CE1212F1E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {353CEFE0-58AF-4049-998B-336CE1212F1E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {353CEFE0-58AF-4049-998B-336CE1212F1E}.Release|Any CPU.Build.0 = Release|Any CPU - {353CEFE0-58AF-4049-998B-336CE1212F1E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {353CEFE0-58AF-4049-998B-336CE1212F1E}.Release|Mixed Platforms.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/doc/README.html b/doc/README.html new file mode 100644 index 00000000..309d08b2 --- /dev/null +++ b/doc/README.html @@ -0,0 +1,221 @@ +Qiniu (Cloud) C# SDK
+ + + + + +

Qiniu (Cloud) C# SDK

+ +

关于

+ +

此 C# SDK 适用于.NET Framework 2.0+ 和 .NET Core,基于七牛云API参考手册构建。使用此 SDK 构建您的网络应用程序,能让您以非常便捷地方式将数据安全地存储到七牛云存储上。无论您的网络应用是一个网站程序,还是包括从云端(服务端程序)到终端(手持设备应用)的架构的服务或应用,通过七牛云存储及其 SDK,都能让您应用程序的终端用户高速上传和下载,同时也让您的服务端更加轻盈。

+ +

SDK文档

+ +

以下文档用于检索SDK接口、属性说明,它将有助于您理解SDK的结构。

+ + + +

以下文档/链接提供一些基本示例,参考这些示例可以帮助您更快熟悉如何使用这套SDK。

+ + + + + +

如何安装

+ +

当前最新版本及最新改动同步在master分支。

+ +

以下是安装SDK的几种不同的方式,您可以根据需要来选择。

+ +

1. 直接添加DLL引用

+ +

您可以在这里找到所有的Release,选择您需要的版本下载,解压后将*.dll文件添加至项目引用。需要注意的是,此SDK依赖Json.NET,可以添加对应版本Newtonsoft.Json.dll引用或者使用NuGet来安装它:

+ + + +
Install-Package Newtonsoft.Json
+ +

2. 包管理器(NuGet)安装

+ +

或者从NuGet来安装,以Visual Studio 2013/2015为例,打开NuGet程序包管理器搜索Qiniu.Shared或者在控制台中键入以下命令:

+ + + +
Install-Package Qiniu.Shared
+ +

3. 从源码编译

+ +

当然,您也可以直接从源码编译

+ + + +
git clone https://github.com/qiniu/csharp-sdk
+ + + +

如何编译

+ +

推荐使用VS2013及以上版,根据目标平台选择对应的解决方案文件并打开:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
目标解决方案文件
.NET Framework 2.0Qiniu.Net20.sln
.NET Framework 3.5Qiniu.Net35.sln
.NET Framework 4.0Qiniu.Net40.sln
.NET Framework 4.5Qiniu.Net45.sln
.NET Framework 4.6Qiniu.Net46.sln
.NET Core(netstandard1.6)Qiniu.NetStandard16.sln
以上全部Qiniu.ALL_VER.sln
+ + +

注意

+ +

如需编译Qiniu.NetStandard16或者Qiniu.ALL_VER(它包含前者),请先将project.jsonproject.lock.json拷贝至Qiniu文件夹下,或者拷贝project.json文件然后执行dotnet restore命令(推荐)。

+ +

如需编译其他非NetCore版本,请删除Qiniu文件夹下的project.jsonproject.lock.json(如果有)。

+ + + +

API参考手册

+ + + + + +

相关资源

+ +

如果您有任何关于我们文档或产品的建议和想法,欢迎到我们的技术论坛参与讨论。

+ +
  • 技术论坛 - 在这里您可以和其他开发者愉快的讨论如何更好的使用七牛云服务

  • +
  • 提交工单 - 如果您的问题不适合在论坛讨论或得不到回答,您也可以提交一个工单,技术支持人员会尽快回复您

  • +
  • 博客 - 这里会持续发布市场活动和技术分享文章

  • +
  • 微博

  • +
  • 常见问题

  • +
+ + + +

贡献代码

+ +
  1. Fork

  2. +
  3. 创建您的特性分支 git checkout -b my-new-feature

  4. +
  5. 提交您的改动 git commit -am ‘Added some feature’

  6. +
  7. 将您的修改记录提交到远程 git 仓库 git push origin my-new-feature

  8. +
  9. 然后到 github 网站的该 git 远程仓库的 my-new-feature 分支下发起 Pull Request

  10. +
+ + + +

许可证

+ +

Copyright (c) 2017 qiniu.com

+ +

基于 MIT 协议发布:

+ +

www.opensource.org/licenses/MIT

+ +

附录

+ + + +

速览.NET Core

+ +

下面是一个入门向导,如果您对如何创建及使用.NET Core程序还不太熟悉,可以参考;如果您已经比较熟悉,可以直接略过(或者也可以帮助我们改进^_^)。

+ +

开始之前,您需要准备dotnet工具,参见https://github.com/dotnet/cli/

+ +

以下步骤基本上都是在命令行终端下执行(如Windows的命令行控制台,Ubuntu/Mac的终端)。

+ + + +

1. 创建

+ +

首先切换到您的项目工作目录,然后键入以下命令来创建一个新的项目:

+ + + +
dotnet new
dotnet restore
+ +

注意

+ +

在执行dotnet restore之前,您可以在文本编辑器中打开并修改project.json文件(这个文件在执行dotnet new后就会自动生成)内容,下面是一个示例:

+ +
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
}
,

"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.1"
}
,
"Qiniu": "7.1.0.0",
"Newtonsoft.Json": "9.0.1"
}
,

"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}
,

"runtimes": {
"win7-x64": {},
"win7-x86": {},
"osx.10.10-x64": {},
"osx.10.11-x64": {},
"ubuntu.14.04-x64": {},
"ubuntu.16.04-x64": {}
}
}
+ +

创建好项目之后就可以编写您的csharp代码了。

+ + + +

2. 发布

+ +

根据您的目标平台(操作系统),选择其中一个来执行:

+ + + +
dotnet publish -r win7-x64
dotnet publish -r ubuntu.16.04-x64
dotnet publish -r osx.10.11-x64
+ +

发布之后,直接拷贝发布目录下的所有文件到目标计算机就可以直接使用。

+ +

如果目标平台上已经安装了.NET Core运行时,那么您需要做的就是编译:

+ + + +
dotnet build
+ + + +

3. 执行

+ +

如果您使用的是OSX 10.11(EI Capitan), 请先安装openssl:

+ + + +
brew update
brew install openssl
brew link --force openssl
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
+ +

假设您编译好的程序(built app)是Example.dll,您可以键入以下命令来执行:

+ + + +
dotnet Example.dll
+ +

当然,执行这个命令之前,dotnet工具是必须安装的。

+ +

如果您发布到Windows并且生成了exe文件,直接双击就可以运行。

\ No newline at end of file diff --git a/doc/README.pdf b/doc/README.pdf new file mode 100644 index 00000000..e2e0a0a4 Binary files /dev/null and b/doc/README.pdf differ diff --git a/examples/App.cs b/examples/App.cs deleted file mode 100644 index 0de6df14..00000000 --- a/examples/App.cs +++ /dev/null @@ -1,86 +0,0 @@ -namespace CSharpSDKExamples -{ - /// - /// 示例代码中的bucket,saveKey,localFile等请自行设置 - /// - class ConsoleDemo - { - static void Main(string[] args) - { - // 载入密钥设置(AK&SK) - //Settings.LoadFromFile("test.cfg"); - Settings.Load(); - - // 上传一个文件 - //SimpleUpload.uploadFile(); - - // 上传后触发fop(数据处理) - //UploadWithFop.uploadWithFop(); - - // 生成已授权的下载链接 - //SimpleDownload.downloadFile(); - - // 断点续上传 - //ResumableUpload.uploadBigFile(); - - // 空间文件stat - //BucketFileManagement.stat(); - - // 删除空间文件 - //BucketFileManagement.delete(); - - // 复制空间文件 - //BucketFileManagement.copy(); - - // 移动空间文件 - //BucketFileManagement.move(); - - // 修改空间文件的mimeType - //BucketFileManagement.chgm(); - - // 批量操作 - //BucketFileManagement.batch(); - - // 取回文件并保存到空间 - //BucketFileManagement.fetch(); - - // 镜像资源更新 - //BucketFileManagement.prefetch(); - - // 列举所有bucket - //BucketFileManagement.buckets(); - - // 获取指定bucket的域名 - //BucketFileManagement.domains(); - - // 获取空间文件列表 - // BucketFileManagement.listFiles(); - - // 文件处理+保存处理结果 - //PfopWithPipeline.pfopAndSave(); - - // 数据处理dfop:url - //DfopDemo.dfopUrl(); - - // 数据处理dfop:data - //DfopDemo.dfopData(); - - // 融合CDN 缓存刷新 - //FusionDemo.refresh(); - - // 融合CDN 文件预取 - //FusionDemo.prefetch(); - - // 融合CDN 带宽 - //FusionDemo.bandwidth(); - - // 融合CDN 流量 - //FusionDemo.flux(); - - // 融合CDN 日志查询 - //FusionDemo.loglist(); - - System.Console.ReadLine(); - } - } -} \ No newline at end of file diff --git a/examples/BucketFileManagement.cs b/examples/BucketFileManagement.cs deleted file mode 100644 index 3df2542b..00000000 --- a/examples/BucketFileManagement.cs +++ /dev/null @@ -1,243 +0,0 @@ -using Qiniu.Util; -using Qiniu.Storage; -using Qiniu.Storage.Model; -using Qiniu.Http; -using System.Collections.Generic; - -namespace CSharpSDKExamples -{ - /// - /// 空间及空间文件管理 - /// - public class BucketFileManagement - { - - /// - /// 空间文件的stat(获取文件基本信息)操作 - /// - public static void stat() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - - string bucket = "BUCKET"; - string key = "KEY"; - - BucketManager bm = new BucketManager(mac); - StatResult result = bm.stat(bucket, key); - } - - /// - /// 删除空间中指定文件 - /// - public static void delete() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - - string bucket = "BUCKET"; - string key = "KEY"; - - BucketManager bm = new BucketManager(mac); - HttpResult result = bm.delete(bucket, key); - } - - /// - /// 复制文件 - /// - public static void copy() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - - string srcBucket = "SRC_BUCKET"; - string srcKey = "SRC_KEY"; - string dstBucket = "SRC_BUCKET"; - string dstKey = "DST_BUCKET"; - - BucketManager bm = new BucketManager(mac); - HttpResult result = bm.copy(srcBucket, srcKey, dstBucket, dstKey); - - //支持force参数, bool force = true/false - //HttpResult result = bm.copy(srcBucket, srcKey, dstBucket, dstKey, force); - } - - /// - /// 移动文件 - /// - public static void move() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - - string srcBucket = "SRC_BUCKET"; - string srcKey = "SRC_KEY"; - string dstBucket = "SRC_BUCKET"; - string dstKey = "DST_BUCKET"; - - BucketManager bm = new BucketManager(mac); - HttpResult result = bm.move(srcBucket, srcKey, dstBucket, dstKey); - - //支持force参数, bool force = true/false - //HttpResult result = bm.move(srcBucket, srcKey, dstBucket, dstKey, force); - } - - /// - /// 修改文件的MIME_TYPE - /// - public static void chgm() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - - string bucket = "BUCKET"; - string key = "KEY"; - string mimeType = "MIME_TYPE"; - - BucketManager bm = new BucketManager(mac); - HttpResult result = bm.chgm(bucket, key, mimeType); - } - - /// - /// 拉取资源到空间 - /// - public static void fetch() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - - string bucket = "BUCKET"; - string saveKey = "SAVE_KEY"; - string remoteUrl = "REMOTE_URI"; - - BucketManager bm = new BucketManager(mac); - bm.fetch(remoteUrl, bucket, saveKey); - - } - - /// - /// 对于设置了镜像存储的空间,从镜像源站抓取指定名称的资源并存储到该空间中 - /// - public static void prefetch() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - - string bucket = "BUCKET"; - string key = "KEY"; - - BucketManager bm = new BucketManager(mac); - bm.prefetch(bucket, key); - } - - /// - /// 批量操作 - /// - public static void batch() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - - // 批量操作类似于 - // op=&op=&op=... - string batchOps = "BATCH_OPS"; - BucketManager bm = new BucketManager(mac); - HttpResult result = bm.batch(batchOps); - // 或者 - //string[] batch_ops={"","","",...}; - //bm.batch(batch_ops); - - System.Console.WriteLine(result.Response); - } - - /// - /// 列举所有的bucket - /// - public static void buckets() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - BucketManager bm = new BucketManager(mac); - BucketsResult result = bm.buckets(); - - foreach(string bucket in result.Buckets) - { - System.Console.WriteLine(bucket); - } - } - - /// - /// 获取指定bucket对应的域名(可能不止一个),类似于abcxx.bkt.clouddn.com这样 - /// - public static void domains() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - - string bucket = "BUCKET"; - - BucketManager bm = new BucketManager(mac); - DomainsResult result = bm.domains(bucket); - - foreach(string domain in result.Domains) - { - System.Console.WriteLine(domain); - } - } - - /// - /// 获取空间文件列表 - /// - /// BucketManager.listFiles(bucket, prefix, marker, limit, delimiter) - /// - /// bucket: 目标空间名称 - /// - /// prefix: 返回指定文件名前缀的文件列表(prefix可设为null) - /// - /// marker: 考虑到设置limit后返回的文件列表可能不全(需要重复执行listFiles操作) - /// 执行listFiles操作时使用marker标记来追加新的结果 - /// 特别注意首次执行listFiles操作时marker为null - /// - /// limit: 每次返回结果所包含的文件总数限制(limit<=1000,建议值100) - /// - /// delimiter: 分隔符,比如-或者/等等,可以模拟作为目录结构(参考下述示例) - /// 假设指定空间中有2个文件 fakepath/1.txt fakepath/2.txt - /// 现设置分隔符delimiter = / 得到返回结果items =[],commonPrefixes = [fakepath/] - /// 然后调整prefix = fakepath/ delimiter = null 得到所需结果items = [1.txt,2.txt] - /// 于是可以在本地先创建一个目录fakepath,然后在该目录下写入items中的文件 - /// - /// - public static void listFiles() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - - string bucket = "BUCKET"; - string marker = ""; // 首次请求时marker必须为空 - string prefix = null; // 按文件名前缀保留搜索结果 - string delimiter = null; // 目录分割字符(比如"/") - int limit = 100; // 最大值1000 - - BucketManager bm = new BucketManager(mac); - List items = new List(); - List commonPrefixes = new List(); - - do - { - ListFilesResult result = bm.listFiles(bucket, prefix, marker, limit, delimiter); - - marker = result.Marker; - - if (result.Items != null) - { - items.AddRange(result.Items); - } - - if (result.CommonPrefixes != null) - { - commonPrefixes.AddRange(result.CommonPrefixes); - } - - } while (!string.IsNullOrEmpty(marker)); - - foreach (string cp in commonPrefixes) - { - System.Console.WriteLine(cp); - } - - foreach(var item in items) - { - System.Console.WriteLine(item.Key); - } - } - } -} \ No newline at end of file diff --git a/examples/CodeMap.png b/examples/CodeMap.png deleted file mode 100644 index 2d5b0e94..00000000 Binary files a/examples/CodeMap.png and /dev/null differ diff --git a/examples/DfopDemo.cs b/examples/DfopDemo.cs deleted file mode 100644 index 132a7cf6..00000000 --- a/examples/DfopDemo.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using Qiniu.Util; -using Qiniu.Processing; - -namespace CSharpSDKExamples -{ - public class DfopDemo - { - /// - /// dfop形式1:URL - /// - public static void dfopUrl() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - Dfop dfx = new Dfop(mac); - - string fop = "FOP"; // E.G.: "imageInfo" - string url = "RES_URL"; - - var ret = dfx.dfop(fop, url); - - if (ret.ResponseInfo.StatusCode != 200) - { - Console.WriteLine(ret.ResponseInfo); - } - Console.WriteLine(ret.Response); - } - - /// - /// dfop形式2:Data - /// - public static void dfopData() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - Dfop dfx = new Dfop(mac); - - string fop = "FOP"; - byte[] data = System.IO.File.ReadAllBytes("LOCAL_FILE"); - - var ret = dfx.dfop(fop, data); - - if (ret.ResponseInfo.StatusCode != 200) - { - Console.WriteLine(ret.ResponseInfo); - } - Console.WriteLine(ret.Response); - } - } -} diff --git a/examples/FusionDemo.cs b/examples/FusionDemo.cs deleted file mode 100644 index 292fc75e..00000000 --- a/examples/FusionDemo.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using Qiniu.Util; -using Qiniu.Fusion; -using Qiniu.Fusion.Model; - -namespace CSharpSDKExamples -{ - /// - /// 融合CDN功能 - /// - public class FusionDemo - { - /// - /// 缓存刷新 - /// - public static void refresh() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - FusionManager fusionMgr = new FusionManager(mac); - - string[] urls = new string[] { "URL1", "URL2" }; - string[] dirs = new string[] { "DIR1", "DIR2" }; - RefreshRequest request = new RefreshRequest(); - request.AddUrls(urls); - request.AddDirs(dirs); - RefreshResult result = fusionMgr.Refresh(request); - Console.WriteLine(result); - } - - /// - /// 文件预取 - /// - public static void prefetch() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - FusionManager fusionMgr = new FusionManager(mac); - - string[] urls = new string[] { "URL1", "URL2" }; - PrefetchRequest request = new PrefetchRequest(urls); - PrefetchResult result = fusionMgr.Prefetch(request); - Console.WriteLine(result); - } - - /// - /// 带宽 - /// - public static void bandwidth() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - FusionManager fusionMgr = new FusionManager(mac); - - BandwidthRequest request = new BandwidthRequest(); - request.StartDate = "START_DATE"; // "2016-09-01" - request.EndDate = "END_DATE"; // "2016-09-20" - request.Granularity = "GRANU"; // "day" - request.Domains = "DOMAIN1;DOMAIN2"; // domains - BandwidthResult result = fusionMgr.Bandwidth(request); - Console.WriteLine(result); - } - - /// - /// 流量 - /// - public static void flux() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - FusionManager fusionMgr = new FusionManager(mac); - - FluxRequest request = new FluxRequest(); - request.StartDate = "START_DATE"; // "2016-09-01" - request.EndDate = "END_DATE"; // "2016-09-20" - request.Granularity = "GRANU"; // "day" - request.Domains = "DOMAIN1;DOMAIN2"; // domains - FluxResult result = fusionMgr.Flux(request); - Console.WriteLine(result); - } - - /// - /// 日志查询 - /// - public static void loglist() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - FusionManager fusionMgr = new FusionManager(mac); - - LogListRequest request = new LogListRequest(); - request.Day = "DAY"; // "2016-09-01" - request.Domains = "DOMAIN1"; // domains - LogListResult result = fusionMgr.LogList(request); - Console.WriteLine(result); - } - } -} diff --git a/examples/PfopWithPipeline.cs b/examples/PfopWithPipeline.cs deleted file mode 100644 index 87a2f423..00000000 --- a/examples/PfopWithPipeline.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Qiniu.Util; -using Qiniu.Http; -using Qiniu.Processing; - -namespace CSharpSDKExamples -{ - public class PfopWithPipeline - { - public static void pfopAndSave() - { - string bucket = "BUCKET"; - string key = "FILE"; - string pipeline = "MEDIAPROC_PIPELINE"; - string notifyUrl = "NOTIFY_URL"; - bool force = false; - - string saveAsUri = StringUtils.urlSafeBase64Encode(":"); - string fops = "" + "|saveas/" + saveAsUri; - - Mac mac = new Mac(Settings.AccessKey,Settings.SecretKey); - Pfop px = new Pfop(mac); - PfopResult result = px.pfop(bucket, key, fops, pipeline, notifyUrl, force); - - System.Console.WriteLine(result.Response); - - // ԺԸPersistentIdѯ/ - string persistentId = result.PersistentId; - Prefop pz = new Prefop(persistentId); - PrefopResult zr = pz.prefop(); - System.Console.WriteLine(zr.Response); - - } - } -} \ No newline at end of file diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index 6f33b403..00000000 --- a/examples/README.md +++ /dev/null @@ -1,3 +0,0 @@ -#examples - -![CodeMap](CodeMap.png) diff --git a/examples/ResumableUpload.cs b/examples/ResumableUpload.cs deleted file mode 100644 index 7f39b690..00000000 --- a/examples/ResumableUpload.cs +++ /dev/null @@ -1,63 +0,0 @@ -using Qiniu.Util; -using Qiniu.Storage; -using Qiniu.Storage.Persistent; -using Qiniu.Http; - -namespace CSharpSDKExamples -{ - public class ResumableUpload - { - public static void uploadBigFile() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - - string bucket = "BUCKET"; - string saveKey = "SAVE_KEY"; - string localFile = "LOCAL_FILE"; - string recordPath = "RECORD_PATH"; - string recordFile = "RECORD_FILE"; - - PutPolicy putPolicy = new PutPolicy(); - putPolicy.Scope = bucket; - putPolicy.SetExpires(3600); - putPolicy.DeleteAfterDays = 1; - - string token = Auth.createUploadToken(putPolicy, mac); - - ResumeRecorder rr = new ResumeRecorder(recordPath); - - UploadOptions uploadOptions = new UploadOptions( - null, // ExtraParams - null, // MimeType - false, // CheckCrc32 - new UpProgressHandler(OnUploadProgressChanged), // 上传进度 - null // CancelSignal - ); - - UpCompletionHandler uploadCompleted = new UpCompletionHandler(OnUploadCompleted); // 上传完毕 - - ResumeUploader ru = new ResumeUploader( - rr, // 续传记录 - recordFile, // 续传记录文件 - localFile, // 待上传的本地文件 - saveKey, // 要保存的文件名 - token, // 上传凭证 - uploadOptions, // 上传选项(其中包含进度处理),可为null - uploadCompleted // 上传完毕事件处理 - ); - - ru.uploadFile(); - } - - private static void OnUploadProgressChanged(string key,double percent) - { - // percent = [0(开始)~1.0(完成)] - } - - private static void OnUploadCompleted(string key,ResponseInfo respInfo,string respJson) - { - // respInfo.StatusCode - // respJson是返回的json消息,示例: { "key":"FILE","hash":"HASH","fsize":FILE_SIZE } - } - } -} \ No newline at end of file diff --git a/examples/Settings.cs b/examples/Settings.cs deleted file mode 100644 index 407d041a..00000000 --- a/examples/Settings.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace CSharpSDKExamples -{ - public class Settings - { - //see ak sk from https://portal.qiniu.com/user/key - public static string AccessKey; - public static string SecretKey; - private static bool loaded = false; - - public static void Load() - { - if (!loaded) - { - AccessKey = ""; - SecretKey = ""; - - loaded = true; - } - } - - /// - /// 仅在测试时使用,文本文件(cFile)中逐行存放:AK,SK - /// - /// - public static void LoadFromFile(string cFile) - { - if (!loaded) - { - using (System.IO.StreamReader sr = new System.IO.StreamReader(cFile)) - { - AccessKey = sr.ReadLine(); - SecretKey = sr.ReadLine(); - sr.Close(); - } - - loaded = true; - } - } - } -} diff --git a/examples/SimpleDownload.cs b/examples/SimpleDownload.cs deleted file mode 100644 index 9cc04b6f..00000000 --- a/examples/SimpleDownload.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Qiniu.Util; -using Qiniu.Storage; - -namespace CSharpSDKExamples -{ - public class SimpleDownload - { - public static void downloadFile() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - - // 加上过期参数,使用?e= - // 如果rawUrl中已包含?,则改用&e= - string rawUrl = "RAW_URL"; - string expireAt = "UNIX_TIMESTAMP"; - string mid = "?e="; - if(rawUrl.Contains("?")) - { - mid = "&e="; - } - string token = Auth.createDownloadToken(rawUrl + mid + expireAt, mac); - string accUrl = rawUrl + mid + expireAt + "&token=" + token; - // 接下来可以使用accUrl来下载文件 - - System.Console.WriteLine(accUrl); - } - } -} \ No newline at end of file diff --git a/examples/SimpleUpload.cs b/examples/SimpleUpload.cs deleted file mode 100644 index b6a7651e..00000000 --- a/examples/SimpleUpload.cs +++ /dev/null @@ -1,45 +0,0 @@ -using Qiniu.Util; -using Qiniu.Storage; -using Qiniu.Http; - -namespace CSharpSDKExamples -{ - public class SimpleUpload - { - public static void uploadFile() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - - string bucket = "BUCKET"; - string saveKey = "SAVE_KEY"; - string localFile = "LOCAL_FILE"; - - PutPolicy putPolicy = new PutPolicy(); - putPolicy.Scope = bucket; - putPolicy.SetExpires(3600); - putPolicy.DeleteAfterDays = 1; - string token = Auth.createUploadToken(putPolicy, mac); - - UploadOptions uploadOptions = null; - - // 上传完毕事件处理 - UpCompletionHandler uploadCompleted = new UpCompletionHandler(OnUploadCompleted); - - // 方式1:使用UploadManager - //默认设置 Qiniu.Common.Config.PUT_THRESHOLD = 512*1024; - //可以适当修改,UploadManager会根据这个阈值自动选择是否使用分片(Resumable)上传 - UploadManager um = new UploadManager(); - um.uploadFile(localFile, saveKey, token, uploadOptions, uploadCompleted); - - // 方式2:使用FormManager - //FormUploader fm = new FormUploader(); - //fm.uploadFile(localFile, saveKey, token, uploadOptions, uploadCompleted); - } - - private static void OnUploadCompleted(string key, ResponseInfo respInfo, string respJson) - { - // respInfo.StatusCode - // respJson是返回的json消息,示例: { "key":"FILE","hash":"HASH","fsize":FILE_SIZE } - } - } -} \ No newline at end of file diff --git a/examples/UploadWithFop.cs b/examples/UploadWithFop.cs deleted file mode 100644 index 97f5f248..00000000 --- a/examples/UploadWithFop.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Qiniu.Util; -using Qiniu.Storage; - -namespace CSharpSDKExamples -{ - public class UploadWithFop - { - public static void uploadWithFop() - { - Mac mac = new Mac(Settings.AccessKey, Settings.SecretKey); - - string bucket = "BUCKET"; - string saveKey = "SAVE_KEY"; - string localFile = "LOCAL_FILE"; - - // 如果想要将处理结果保存到SAVEAS_BUCKET空间下,文件名为SAVEAS_KEY - // 可以使用savas参数 |saveas/ - // encodedUri = StringUtils.urlSafeBase64Encode("SAVEAS_BUCKET" + ":" + "SAVEAS_KEY"); - string fops = "FOPS"; - - PutPolicy putPolicy = new PutPolicy(); - putPolicy.Scope = bucket; - putPolicy.PersistentOps = fops; - putPolicy.SetExpires(3600); - putPolicy.DeleteAfterDays = 1; - string token = Auth.createUploadToken(putPolicy, mac); - - FormUploader fm = new FormUploader(); - fm.uploadFile(localFile, saveKey, token, null, null); - } - } -} diff --git a/packages/Newtonsoft.Json.9.0.1/Newtonsoft.Json.9.0.1.nupkg b/packages/Newtonsoft.Json.9.0.1/Newtonsoft.Json.9.0.1.nupkg deleted file mode 100644 index 87abe13b..00000000 Binary files a/packages/Newtonsoft.Json.9.0.1/Newtonsoft.Json.9.0.1.nupkg and /dev/null differ diff --git a/packages/Newtonsoft.Json.9.0.1/lib/net20/Newtonsoft.Json.dll b/packages/Newtonsoft.Json.9.0.1/lib/net20/Newtonsoft.Json.dll deleted file mode 100644 index 2d82d012..00000000 Binary files a/packages/Newtonsoft.Json.9.0.1/lib/net20/Newtonsoft.Json.dll and /dev/null differ diff --git a/packages/Newtonsoft.Json.9.0.1/lib/net20/Newtonsoft.Json.xml b/packages/Newtonsoft.Json.9.0.1/lib/net20/Newtonsoft.Json.xml deleted file mode 100644 index 0429ef1b..00000000 --- a/packages/Newtonsoft.Json.9.0.1/lib/net20/Newtonsoft.Json.xml +++ /dev/null @@ -1,9793 +0,0 @@ - - - - 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 JSON data. - - - - - Gets or sets a value indicating whether binary data reading should 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 stream. - - - - Initializes a new instance of the class. - - The reader. - - - - Initializes a new instance of the class. - - The stream. - 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 reader. - 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 stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Changes the to Closed. - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating JSON 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 stream. - - - - Initializes a new instance of the class. - - The writer. - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Writes the end. - - The token. - - - - Writes out 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 stream and the underlying stream. - - - - - 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 single parameterized constructor, then 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. - - - - - Create 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 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. - - true if the written enum text will be camel case; otherwise, false. - - - - Gets or sets a value indicating whether integer values are allowed. - - true if integers are allowed; 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. - - - - 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 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 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 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 produces multiple root elements. - - The name of the deserialize root element. - - - - Gets or sets a flag 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 attibute 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. - - - - 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 attributeName 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. - - - - - 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 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 a 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. - - - - Instructs the to use the specified constructor when deserializing that object. - - - - - 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 a null reference (Nothing in Visual Basic) 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 to always serialize the member, and require the member has a value. - - - - - Specifies how JSON comments are handled when loading JSON. - - - - - Ignore comments. - - - - - Load comments as a with type . - - - - - Specifies how line information is handled when loading JSON. - - - - - Ignore line information. - - - - - Load line information. - - - - - Specifies the settings used when loading JSON. - - - - - Gets or sets how JSON comments are handled when loading JSON. - - The JSON comment handling. - - - - Gets or sets how JSON line info is handled when loading JSON. - - The JSON line info handling. - - - - Specifies the settings used when merging JSON. - - - - - Gets or sets the method used when merging JSON arrays. - - The method used when merging JSON arrays. - - - - Gets or sets how how null value properties are merged. - - How null value properties are merged. - - - - 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. - - - - - 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. - - - - Represents a collection of objects. - - The type of token - - - - Gets the with the specified key. - - - - - - 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. - - - - 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 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 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 . - - - - 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 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 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 an that can be used to add tokens to the . - - An that is ready to have content written to it. - - - - Replaces the children 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 iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets the 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 this object's properties. - - An of this object's properties. - - - - Gets a the specified name. - - The property name. - A with the specified name or null. - - - - Gets an of this object's property values. - - An 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 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 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. - - - - Removes the property with the specified name. - - Name of the property. - true if item was successfully removed; otherwise, false. - - - - Tries the get value. - - Name of the property. - The value. - true if a value was successfully retrieved; otherwise, false. - - - - Returns an enumerator that iterates 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 properties for this instance of a component. - - - A that represents the properties for this component instance. - - - - - Returns the properties for this instance of a component using the attribute array as a filter. - - An array of type that is used as a filter. - - A that represents the filtered properties for this component instance. - - - - - Returns a collection of custom attributes for this instance of a component. - - - An containing the attributes for this object. - - - - - Returns the class name of this instance of a component. - - - The class name of the object, or null if the class does not have a name. - - - - - Returns the name of this instance of a component. - - - The name of the object, or null if the object does not have a name. - - - - - Returns a type converter for this instance of a component. - - - A that is the converter for this object, or null if there is no for this object. - - - - - Returns the default event for this instance of a component. - - - An that represents the default event for this object, or null if this object does not have events. - - - - - Returns the default property for this instance of a component. - - - A that represents the default property for this object, or null if this object does not have properties. - - - - - Returns an editor of the specified type for this instance of a component. - - A that represents the editor for this object. - - An of the specified type that is the editor for this object, or null if the editor cannot be found. - - - - - Returns the events for this instance of a component using the specified attribute array as a filter. - - An array of type that is used as a filter. - - An that represents the filtered events for this component instance. - - - - - Returns the events for this instance of a component. - - - An that represents the events for this component instance. - - - - - Returns an object that contains the property described by the specified property descriptor. - - A that represents the property whose owner is to be found. - - An that represents the owner of the specified property. - - - - - 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 . - The is read-only. - - - - Removes the item at the specified index. - - The zero-based index of the item to remove. - - is not a valid index in the . - The is read-only. - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Adds an item to the . - - The object to add to the . - The is read-only. - - - - Removes all items from the . - - The is read-only. - - - - Determines whether the contains a specific value. - - The object to locate in the . - - true if is found in the ; otherwise, false. - - - - - Copies to. - - 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 . - - The is read-only. - - - - 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. - - - - Reads the next JSON token from the stream. - - - 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. - - - - - 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 writen. - - The token being writen. - - - - 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 streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - 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 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 out 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 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. - - - The indented JSON for this token. - - - - - Returns the JSON for this token using the given formatting and converters. - - Indicates how the output is formatted. - A collection of 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 . - - 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 . - - 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 . - - 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 . - - 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 . - - 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 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 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 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 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. - - - - Creates an for this token. - - An 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 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 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 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 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 . - - An positioned at the token to read into this . - - An 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. - - An 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 . - - 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. - - An 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 . - - An 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 JPath expression. Selects the token that matches the object path. - - - A that contains a JPath expression. - - A , or null. - - - - Selects a using a JPath expression. Selects the token that matches the object path. - - - A that contains a JPath 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 JPath expression. - - - A that contains a JPath expression. - - An that contains the selected elements. - - - - Selects a collection of elements using a JPath expression. - - - A that contains a JPath expression. - - A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. - An 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. - - - - 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 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 . - - - - 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 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 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. - - - The parameter is null. - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Returns a that represents this instance. - - - 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 the same type as this instance. - - - - - 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. - - - - - 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. - - - - - Resolves the specified property name. - - The property name to resolve. - The resolved property name. - - - - 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. - - - - 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 Info will exclude Verbose messages and include Info, - Warning and Error 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 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. - - - - 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 Info will exclude Verbose messages and include Info, - Warning and Error 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. - - - - 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. - - - - 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 Info will exclude Verbose messages and include Info, - Warning and Error 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 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 specfied. - The serialized property 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. - - - - 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. - - - - 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. - - - - - 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. - - - - - Used by to resolves 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 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. - - - - - Initializes a new instance of the class. - - - If set to true the will use a cached shared with other resolvers of the same type. - Sharing the cache will significantly improve performance with multiple resolver instances because expensive reflection will only - happen once. This setting can cause unexpected behavior if different instances of the resolver are suppose to produce different - results. When set to false it is highly recommended to reuse instances with the . - - - - - 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 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 serialization binder used when resolving and loading classes from type names. - - - - - 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. - - - - - 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. - - - - Used by to resolves a for a given . - - - - - - - - - Resolves the contract for a given type. - - The type to resolve a contract for. - The contract for a given type. - - - - 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. - - - - 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 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 method called immediately after deserialization of the object. - - The method called immediately after deserialization of the object. - - - - Gets or sets the method called during deserialization of the object. - - The method called during deserialization of the object. - - - - Gets or sets the method called after serialization of the object graph. - - The method called after serialization of the object graph. - - - - Gets or sets the method called before serialization of the object. - - The method called before serialization of the object. - - - - Gets or sets the method called when an error is thrown during the serialization of the object. - - The method 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 property name resolver. - - The property name resolver. - - - - 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 ISerializable object constructor. - - The ISerializable 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 . - - - - - 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 presidence 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 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 serialize. - - A predicate used to determine whether the property should be serialize. - - - - 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 the type name handling used when serializing the property's collection items. - - The collection's items type name handling. - - - - Gets or sets the 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 propertyName 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. - - - - 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 - - - - Gets the reference for the sepecified 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. - - - - Contract details for a used by the . - - - - - Gets or sets the object member serialization. - - The member object serialization. - - - - 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 the object's properties. - - The object's properties. - - - - Gets the constructor parameters required for any non-default constructor - - - - - Gets a collection of instances that define the parameters used with . - - - - - Gets or sets the override constructor used to create the object. - This is set when a constructor is marked up using the - JsonConstructor attribute. - - The override constructor. - - - - Gets or sets the parametrized constructor used to create the object. - - The parametrized constructor. - - - - 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. - - - - - 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. - - - - Lookup and create an instance of the JsonConverter type described by the argument. - - The JsonConverter type to create. - Optional arguments to pass to an initializing constructor of the JsonConverter. - If null, the default constructor is used. - - - - 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. - - - - - 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. - - - - 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. - - - - - 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 an that represents the total number - of elements in a sequence. - - - - - Returns an 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 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. - - - - - 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. - - - - - 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 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. - - - - - 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. - - - - - 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 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. - - - - - 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. - - - - - 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 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. - - - - - 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. - - - - - 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 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. - - - - - 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. - - - - - 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. - - - - - 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. - - - - - Gets a dictionary of the names and values of an Enum type. - - - - - - Gets a dictionary of the names and values of an Enum type. - - The enum type to get names and values for. - - - - - Builds a string. Unlike StringBuilder this class lets you reuse it's internal buffer. - - - - - 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 IList. - - The list to add to. - The collection of elements to add. - - - - 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 member is an indexed property. - - The member. - - true if the member is an indexed property; otherwise, false. - - - - - 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. - - - - - 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. - - - - - 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. - - - - - 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 ISerializable. - - - - - - - - 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. - - - - - 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 LineNumber and LinePosition can be provided; otherwise, false. - - - - - Gets the current line number. - - The current line number or 0 if no line information is available (for example, HasLineInfo returns false). - - - - Gets the current line position. - - The current line position or 0 if no line information is available (for example, HasLineInfo 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 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 ItemConverterType. - 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 NamingStrategyType. - 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. - - - - 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 is 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 sets members to their default value when deserializing. - - - - - 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 ConverterType. - 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. - - - - Instructs the how to serialize the object. - - - - - Gets or sets the member serialization. - - The member serialization. - - - - 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. - - - - Specifies the settings on a object. - - - - - Gets or sets how reference loops (e.g. a class referencing itself) is handled. - - 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. - - Missing member handling. - - - - Gets or sets how objects are created during deserialization. - - The object creation handling. - - - - Gets or sets how null values are handled during serialization and deserialization. - - Null value handling. - - - - Gets or sets how null default are handled during serialization and deserialization. - - 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 preserve references handling. - - - - Gets or sets how type name writing and reading is handled by the serializer. - - - 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 TypeNameHandling.None. - - The type name handling. - - - - Gets or sets how metadata properties are used during deserialization. - - The metadata properties handling. - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - - The type name assembly format. - - - - Gets or sets how constructors are used during deserialization. - - 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 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. - - - - Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - - - - - Indicates how JSON text output is formatted. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling during serialization and deserialization. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Get or set how special floating point numbers, e.g. , - and , - are written as JSON. - - - - - Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Get or set how strings are escaped when writing JSON text. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Gets a value indicating whether there will be a check for additional content after deserializing an object. - - - 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 validation. - - - JSON Schema validation has been moved to its own package. See http://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 Common Language Runtime (CLR) 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. - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a []. - - - A [] or a null reference if the next JSON token is null. - - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - 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 how object creation is handled by the . - - - - - Reuse existing objects, create new objects when needed. - - - - - Only reuse existing objects. - - - - - Always create new objects. - - - - - 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 TextReader containing the XML data to read. - - - - Gets or sets the reader's character buffer pool. - - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a []. - - A [] or a null reference 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 stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Changes the state to closed. - - - - - Gets a value indicating whether the class can return line information. - - - true if LineNumber and LinePosition can be provided; otherwise, false. - - - - - Gets the current line number. - - - The current line number or 0 if no line information is available (for example, HasLineInfo returns false). - - - - - Gets the current line position. - - - The current line position or 0 if no line information is available (for example, HasLineInfo returns false). - - - - - Instructs the to always serialize the member with the specified name. - - - - - Gets or sets the used when serializing the property's collection items. - - The collection's items . - - - - The parameter list to use when constructing the described by ItemConverterType. - 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 NamingStrategyType. - 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 the reference loop handling used when serializing the property's collection items. - - The collection's items reference loop handling. - - - - Gets or sets the 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. - - - - Instructs the not to serialize the public field or public read/write property value. - - - - - 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 IndentChars to write for each level in the hierarchy when is set to Formatting.Indented. - - - - - Gets or sets which character to use to quote attribute values. - - - - - Gets or sets which character to use for indenting when is set to Formatting.Indented. - - - - - Gets or sets a value indicating whether object names will be surrounded with quotes. - - - - - Creates an instance of the JsonWriter class using the specified . - - The TextWriter to write to. - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - 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 value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a [] value. - - The [] value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes out the given white space. - - The string of white space characters. - - - - The exception thrown when an error occurs while reading 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 a null reference (Nothing in Visual Basic) 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). - - - - 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 a null reference (Nothing in Visual Basic) 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). - - - - 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 the of the JSON produced by the JsonConverter. - - - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. - - - The of the JSON produced by the JsonConverter. - - - - 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. - - - - Represents a collection of . - - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. - - - - - Specifies the state of the reader. - - - - - The 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 Close method has been called. - - - - - Reader has just read a value. - - - - - Reader is at the start of a constructor. - - - - - Reader 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 underlying stream or - should be closed when the reader is closed. - - - true to close the underlying stream or when - the 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. - - - - - Get or set how time zones are handling when reading JSON. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Get or set 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 Common Language Runtime (CLR) 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 with the specified . - - - - - Reads the next JSON token from the stream. - - true if the next token was read successfully; false if there are no more tokens to read. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a []. - - A [] or a null reference 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 stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . 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 state based on current token type. - - - - - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - - - - Releases unmanaged and - optionally - managed resources - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Changes the to Closed. - - - - - Provides methods for converting between common language runtime 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 is 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 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 is formatted. - A collection 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 Auto to write out the type name if the type of the value does not match. - Specifing 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 is 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 is 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 Auto to write out the type name if the type of the value does not match. - Specifing 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 infered 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 infered 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 XML node to a JSON string. - - The node to serialize. - A JSON string of the XmlNode. - - - - Serializes the XML node to a JSON string using formatting. - - The node to serialize. - Indicates how the output is formatted. - A JSON string of the XmlNode. - - - - Serializes the XML node to a JSON string using formatting and omits the root object if is true. - - The node to serialize. - Indicates how the output is formatted. - Omits writing the root object. - A JSON string of the XmlNode. - - - - Deserializes the XmlNode from a JSON string. - - The JSON string. - The deserialized XmlNode - - - - Deserializes the XmlNode from a JSON string nested in a root elment specified by . - - The JSON string. - The name of the root element to append when deserializing. - The deserialized XmlNode - - - - Deserializes the XmlNode from a JSON string nested in a root elment specified by - and writes a .NET array attribute for collections. - - The JSON string. - The name of the root element to append when deserializing. - - A flag 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 XmlNode - - - - 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 a null reference (Nothing in Visual Basic) 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). - - - - 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 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. - - - 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 TypeNameHandling.None. - - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - - The type name assembly format. - - - - Gets or sets how object references are preserved by the serializer. - - - - - Get or set how reference loops (e.g. a class referencing itself) is handled. - - - - - Get or set how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. - - - - - Get or set how null values are handled during serialization and deserialization. - - - - - Get or set how null default are handled during serialization and deserialization. - - - - - Gets or sets how objects are created during deserialization. - - The object creation handling. - - - - Gets or sets how constructors are used during deserialization. - - The constructor handling. - - - - Gets or sets how metadata properties are used during deserialization. - - 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. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling during serialization and deserialization. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Get or set how special floating point numbers, e.g. , - and , - are written as JSON text. - - - - - Get or set how strings are escaped when writing JSON text. - - - - - Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - - - - - Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. - - - 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 reader values from. - The target object to populate values onto. - - - - Populates the JSON values onto the target object. - - The that contains the JSON structure to reader 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 - to a Stream using the specified . - - The used to write the JSON structure. - The to serialize. - - - - Serializes the specified and writes the JSON structure - to a Stream 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. - Specifing the type is optional. - - - - - Serializes the specified and writes the JSON structure - to a Stream 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. - Specifing the type is optional. - - - - - Serializes the specified and writes the JSON structure - to a Stream using the specified . - - The used to write the JSON structure. - The to serialize. - - - - - Contains the JSON schema extension methods. - - - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. - - - - - - - Determines whether the is valid. - - - JSON Schema validation has been moved to its own package. See http://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 http://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 http://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 http://www.newtonsoft.com/jsonschema for more details. - - - The source to test. - The schema to test with. - The validation event handler. - - - - - Returns detailed information about the schema exception. - - - JSON Schema validation has been moved to its own package. See http://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 a null reference (Nothing in Visual Basic) 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). - - - - - Resolves from an id. - - - JSON Schema validation has been moved to its own package. See http://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. - - - - - Specifies undefined schema Id handling options for the . - - - JSON Schema validation has been moved to its own package. See http://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 http://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 http://www.newtonsoft.com/jsonschema for more details. - - - - - - - An in-memory representation of a JSON Schema. - - - JSON Schema validation has been moved to its own package. See http://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 divisble by. - - A number that the value should be divisble 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 disallow 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 schema JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - Parses the specified json. - - The json. - The resolver. - A populated from the string that contains JSON. - - - - 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 . - - - - - - Generates a from a specified . - - - JSON Schema validation has been moved to its own package. See http://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. - - - - - The value types allowed by the . - - - JSON Schema validation has been moved to its own package. See http://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 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 reference loop handling options for the . - - - - - Throw a when a loop is encountered. - - - - - Ignore loop references and do not serialize. - - - - - Serialize loop references. - - - - - 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 TypeNameHandling.None. - - - - - 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. - - - - - Specifies the type of JSON token. - - - - - This is returned by the if a 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 writer that provides a fast, non-cached, forward-only way of generating JSON data. - - - - - Gets or sets a value indicating whether the underlying stream or - should be closed when the writer is closed. - - - true to close the underlying stream or when - the 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. - - - - - Indicates how JSON text output is formatted. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling when writing JSON text. - - - - - Get or set how strings are escaped when writing JSON text. - - - - - Get or set how special floating point numbers, e.g. , - and , - are written to JSON text. - - - - - Get or set how and values are formatting when writing JSON text. - - - - - Gets or sets the culture used when writing JSON. Defaults to . - - - - - Creates an instance of the JsonWriter class. - - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - 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 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 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 . - A null value can be passed to the method for token's 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 value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The 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 out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes out 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 JsonWriter, - - The JsonToken being written. - The value being written. - - - - 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 results in an being thrown. - - - - - The method has been called. - - - - - An object is being written. - - - - - A 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. - - - - diff --git a/packages/Newtonsoft.Json.9.0.1/lib/net35/Newtonsoft.Json.dll b/packages/Newtonsoft.Json.9.0.1/lib/net35/Newtonsoft.Json.dll deleted file mode 100644 index 1ed20a06..00000000 Binary files a/packages/Newtonsoft.Json.9.0.1/lib/net35/Newtonsoft.Json.dll and /dev/null differ diff --git a/packages/Newtonsoft.Json.9.0.1/lib/net35/Newtonsoft.Json.xml b/packages/Newtonsoft.Json.9.0.1/lib/net35/Newtonsoft.Json.xml deleted file mode 100644 index 7067e447..00000000 --- a/packages/Newtonsoft.Json.9.0.1/lib/net35/Newtonsoft.Json.xml +++ /dev/null @@ -1,8922 +0,0 @@ - - - - Newtonsoft.Json - - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. - - - - - Gets or sets a value indicating whether binary data reading should 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 stream. - - - - Initializes a new instance of the class. - - The reader. - - - - Initializes a new instance of the class. - - The stream. - 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 reader. - 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 stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Changes the to Closed. - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating JSON 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 stream. - - - - Initializes a new instance of the class. - - The writer. - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Writes the end. - - The token. - - - - Writes out 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 stream and the underlying stream. - - - - - 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. - - - - 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. - - - - 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. - - - - - 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. - - - - - Create 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 an Entity Framework EntityKey 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. - - - - - 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 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. - - true if the written enum text will be camel case; otherwise, false. - - - - Gets or sets a value indicating whether integer values are allowed. - - true if integers are allowed; 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. - - - - 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 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 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 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 produces multiple root elements. - - The name of the deserialize root element. - - - - Gets or sets a flag 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 attibute 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. - - - - 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 attributeName 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 constructors are used when initializing objects during deserialization by the . - - - - - First attempt to use the public default constructor, then fall back to single parameterized constructor, then the non-public default constructor. - - - - - Json.NET will use a non-public default constructor before falling back to a parameterized constructor. - - - - - 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. - - - - - 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 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 a 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. - - - - Instructs the to use the specified constructor when deserializing that object. - - - - - 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 a null reference (Nothing in Visual Basic) 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 to always serialize the member, and require the member has a value. - - - - - Specifies how JSON comments are handled when loading JSON. - - - - - Ignore comments. - - - - - Load comments as a with type . - - - - - Specifies how line information is handled when loading JSON. - - - - - Ignore line information. - - - - - Load line information. - - - - - 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. - - - - - Specifies the settings used when loading JSON. - - - - - Gets or sets how JSON comments are handled when loading JSON. - - The JSON comment handling. - - - - Gets or sets how JSON line info is handled when loading JSON. - - The JSON line info handling. - - - - Specifies the settings used when merging JSON. - - - - - Gets or sets the method used when merging JSON arrays. - - The method used when merging JSON arrays. - - - - Gets or sets how how null value properties are merged. - - How null value properties are merged. - - - - 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. - - - - - 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. - - - - Represents a collection of objects. - - The type of token - - - - Gets the with the specified key. - - - - - - 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. - - - - 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 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 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 . - - - - 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 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 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 an that can be used to add tokens to the . - - An that is ready to have content written to it. - - - - Replaces the children 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 iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets the 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 this object's properties. - - An of this object's properties. - - - - Gets a the specified name. - - The property name. - A with the specified name or null. - - - - Gets an of this object's property values. - - An 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 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 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. - - - - Removes the property with the specified name. - - Name of the property. - true if item was successfully removed; otherwise, false. - - - - Tries the get value. - - Name of the property. - The value. - true if a value was successfully retrieved; otherwise, false. - - - - Returns an enumerator that iterates 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 properties for this instance of a component. - - - A that represents the properties for this component instance. - - - - - Returns the properties for this instance of a component using the attribute array as a filter. - - An array of type that is used as a filter. - - A that represents the filtered properties for this component instance. - - - - - Returns a collection of custom attributes for this instance of a component. - - - An containing the attributes for this object. - - - - - Returns the class name of this instance of a component. - - - The class name of the object, or null if the class does not have a name. - - - - - Returns the name of this instance of a component. - - - The name of the object, or null if the object does not have a name. - - - - - Returns a type converter for this instance of a component. - - - A that is the converter for this object, or null if there is no for this object. - - - - - Returns the default event for this instance of a component. - - - An that represents the default event for this object, or null if this object does not have events. - - - - - Returns the default property for this instance of a component. - - - A that represents the default property for this object, or null if this object does not have properties. - - - - - Returns an editor of the specified type for this instance of a component. - - A that represents the editor for this object. - - An of the specified type that is the editor for this object, or null if the editor cannot be found. - - - - - Returns the events for this instance of a component using the specified attribute array as a filter. - - An array of type that is used as a filter. - - An that represents the filtered events for this component instance. - - - - - Returns the events for this instance of a component. - - - An that represents the events for this component instance. - - - - - Returns an object that contains the property described by the specified property descriptor. - - A that represents the property whose owner is to be found. - - An that represents the owner of the specified property. - - - - - 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 . - The is read-only. - - - - Removes the item at the specified index. - - The zero-based index of the item to remove. - - is not a valid index in the . - The is read-only. - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Adds an item to the . - - The object to add to the . - The is read-only. - - - - Removes all items from the . - - The is read-only. - - - - Determines whether the contains a specific value. - - The object to locate in the . - - true if is found in the ; otherwise, false. - - - - - Copies to. - - 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 . - - The is read-only. - - - - 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. - - - - Reads the next JSON token from the stream. - - - 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. - - - - - 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 writen. - - The token being writen. - - - - 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 streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - 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 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 out 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 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. - - - The indented JSON for this token. - - - - - Returns the JSON for this token using the given formatting and converters. - - Indicates how the output is formatted. - A collection of 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 . - - 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 . - - 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 . - - 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 . - - 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 . - - 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 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 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 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 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. - - - - Creates an for this token. - - An 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 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 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 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 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 . - - An positioned at the token to read into this . - - An 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. - - An 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 . - - 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. - - An 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 . - - An 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 JPath expression. Selects the token that matches the object path. - - - A that contains a JPath expression. - - A , or null. - - - - Selects a using a JPath expression. Selects the token that matches the object path. - - - A that contains a JPath 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 JPath expression. - - - A that contains a JPath expression. - - An that contains the selected elements. - - - - Selects a collection of elements using a JPath expression. - - - A that contains a JPath expression. - - A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. - An 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. - - - - 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 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 . - - - - 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 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 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. - - - The parameter is null. - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Returns a that represents this instance. - - - 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 the same type as this instance. - - - - - 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. - - - - - 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. - - - - - Resolves the specified property name. - - The property name to resolve. - The resolved property name. - - - - 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. - - - - 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 Info will exclude Verbose messages and include Info, - Warning and Error 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 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. - - - - 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 Info will exclude Verbose messages and include Info, - Warning and Error 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. - - - - 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. - - - - 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 Info will exclude Verbose messages and include Info, - Warning and Error 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 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 specfied. - The serialized property 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. - - - - 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. - - - - 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. - - - - - Resolves the specified property name. - - The property name to resolve. - The resolved property name. - - - - Contract details for a used by the . - - - - - Gets or sets the ISerializable object constructor. - - The ISerializable 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 . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - 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 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. - - - - Resolves member mappings for a type, camel casing property names. - - - - - Initializes a new instance of the class. - - - - - Used by to resolves 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 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. - - - - - Initializes a new instance of the class. - - - If set to true the will use a cached shared with other resolvers of the same type. - Sharing the cache will significantly improve performance with multiple resolver instances because expensive reflection will only - happen once. This setting can cause unexpected behavior if different instances of the resolver are suppose to produce different - results. When set to false it is highly recommended to reuse instances with the . - - - - - 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 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 serialization binder used when resolving and loading classes from type names. - - - - - 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. - - - - - 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. - - - - Used by to resolves a for a given . - - - - - - - - - Resolves the contract for a given type. - - The type to resolve a contract for. - The contract for a given type. - - - - 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. - - - - 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 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 method called immediately after deserialization of the object. - - The method called immediately after deserialization of the object. - - - - Gets or sets the method called during deserialization of the object. - - The method called during deserialization of the object. - - - - Gets or sets the method called after serialization of the object graph. - - The method called after serialization of the object graph. - - - - Gets or sets the method called before serialization of the object. - - The method called before serialization of the object. - - - - Gets or sets the method called when an error is thrown during the serialization of the object. - - The method 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 property name resolver. - - The property name resolver. - - - - 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. - - - - 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 presidence 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 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 serialize. - - A predicate used to determine whether the property should be serialize. - - - - 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 the type name handling used when serializing the property's collection items. - - The collection's items type name handling. - - - - Gets or sets the 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 propertyName 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. - - - - 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 - - - - Gets the reference for the sepecified 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. - - - - Contract details for a used by the . - - - - - Gets or sets the object member serialization. - - The member object serialization. - - - - 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 the object's properties. - - The object's properties. - - - - Gets the constructor parameters required for any non-default constructor - - - - - Gets a collection of instances that define the parameters used with . - - - - - Gets or sets the override constructor used to create the object. - This is set when a constructor is marked up using the - JsonConstructor attribute. - - The override constructor. - - - - Gets or sets the parametrized constructor used to create the object. - - The parametrized constructor. - - - - 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. - - - - - 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. - - - - Lookup and create an instance of the JsonConverter type described by the argument. - - The JsonConverter type to create. - Optional arguments to pass to an initializing constructor of the JsonConverter. - If null, the default constructor is used. - - - - 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. - - - - When applied to a method, specifies that the method is called when an error occurs serializing an object. - - - - - Represents a method that constructs an object. - - The object type to create. - - - - 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. - - - - - 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. - - - - - Gets a dictionary of the names and values of an Enum type. - - - - - - Gets a dictionary of the names and values of an Enum type. - - The enum type to get names and values for. - - - - - Builds a string. Unlike StringBuilder this class lets you reuse it's internal buffer. - - - - - 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 IList. - - The list to add to. - The collection of elements to add. - - - - 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 member is an indexed property. - - The member. - - true if the member is an indexed property; otherwise, false. - - - - - 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. - - - - - 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. - - - - - 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. - - - - - 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 ISerializable. - - - - - - - - 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. - - - - - 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 LineNumber and LinePosition can be provided; otherwise, false. - - - - - Gets the current line number. - - The current line number or 0 if no line information is available (for example, HasLineInfo returns false). - - - - Gets the current line position. - - The current line position or 0 if no line information is available (for example, HasLineInfo 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 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 ItemConverterType. - 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 NamingStrategyType. - 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. - - - - 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 is 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 sets members to their default value when deserializing. - - - - - 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 ConverterType. - 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. - - - - Instructs the how to serialize the object. - - - - - Gets or sets the member serialization. - - The member serialization. - - - - 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. - - - - Specifies the settings on a object. - - - - - Gets or sets how reference loops (e.g. a class referencing itself) is handled. - - 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. - - Missing member handling. - - - - Gets or sets how objects are created during deserialization. - - The object creation handling. - - - - Gets or sets how null values are handled during serialization and deserialization. - - Null value handling. - - - - Gets or sets how null default are handled during serialization and deserialization. - - 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 preserve references handling. - - - - Gets or sets how type name writing and reading is handled by the serializer. - - - 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 TypeNameHandling.None. - - The type name handling. - - - - Gets or sets how metadata properties are used during deserialization. - - The metadata properties handling. - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - - The type name assembly format. - - - - Gets or sets how constructors are used during deserialization. - - 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 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. - - - - Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - - - - - Indicates how JSON text output is formatted. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling during serialization and deserialization. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Get or set how special floating point numbers, e.g. , - and , - are written as JSON. - - - - - Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Get or set how strings are escaped when writing JSON text. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Gets a value indicating whether there will be a check for additional content after deserializing an object. - - - 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 validation. - - - JSON Schema validation has been moved to its own package. See http://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 Common Language Runtime (CLR) 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. - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a []. - - - A [] or a null reference if the next JSON token is null. - - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - 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 how object creation is handled by the . - - - - - Reuse existing objects, create new objects when needed. - - - - - Only reuse existing objects. - - - - - Always create new objects. - - - - - 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 TextReader containing the XML data to read. - - - - Gets or sets the reader's character buffer pool. - - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a []. - - A [] or a null reference 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 stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Changes the state to closed. - - - - - Gets a value indicating whether the class can return line information. - - - true if LineNumber and LinePosition can be provided; otherwise, false. - - - - - Gets the current line number. - - - The current line number or 0 if no line information is available (for example, HasLineInfo returns false). - - - - - Gets the current line position. - - - The current line position or 0 if no line information is available (for example, HasLineInfo returns false). - - - - - Instructs the to always serialize the member with the specified name. - - - - - Gets or sets the used when serializing the property's collection items. - - The collection's items . - - - - The parameter list to use when constructing the described by ItemConverterType. - 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 NamingStrategyType. - 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 the reference loop handling used when serializing the property's collection items. - - The collection's items reference loop handling. - - - - Gets or sets the 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. - - - - Instructs the not to serialize the public field or public read/write property value. - - - - - 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 IndentChars to write for each level in the hierarchy when is set to Formatting.Indented. - - - - - Gets or sets which character to use to quote attribute values. - - - - - Gets or sets which character to use for indenting when is set to Formatting.Indented. - - - - - Gets or sets a value indicating whether object names will be surrounded with quotes. - - - - - Creates an instance of the JsonWriter class using the specified . - - The TextWriter to write to. - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - 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 value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a [] value. - - The [] value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes out the given white space. - - The string of white space characters. - - - - The exception thrown when an error occurs while reading 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 a null reference (Nothing in Visual Basic) 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). - - - - 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 a null reference (Nothing in Visual Basic) 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). - - - - 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 the of the JSON produced by the JsonConverter. - - - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. - - - The of the JSON produced by the JsonConverter. - - - - 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. - - - - Represents a collection of . - - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. - - - - - Specifies the state of the reader. - - - - - The 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 Close method has been called. - - - - - Reader has just read a value. - - - - - Reader is at the start of a constructor. - - - - - Reader 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 underlying stream or - should be closed when the reader is closed. - - - true to close the underlying stream or when - the 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. - - - - - Get or set how time zones are handling when reading JSON. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Get or set 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 Common Language Runtime (CLR) 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 with the specified . - - - - - Reads the next JSON token from the stream. - - true if the next token was read successfully; false if there are no more tokens to read. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a []. - - A [] or a null reference 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 stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . 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 state based on current token type. - - - - - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - - - - Releases unmanaged and - optionally - managed resources - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Changes the to Closed. - - - - - Provides methods for converting between common language runtime 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 is 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 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 is formatted. - A collection 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 Auto to write out the type name if the type of the value does not match. - Specifing 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 is 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 is 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 Auto to write out the type name if the type of the value does not match. - Specifing 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 infered 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 infered 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 XML node to a JSON string. - - The node to serialize. - A JSON string of the XmlNode. - - - - Serializes the XML node to a JSON string using formatting. - - The node to serialize. - Indicates how the output is formatted. - A JSON string of the XmlNode. - - - - Serializes the XML node to a JSON string using formatting and omits the root object if is true. - - The node to serialize. - Indicates how the output is formatted. - Omits writing the root object. - A JSON string of the XmlNode. - - - - Deserializes the XmlNode from a JSON string. - - The JSON string. - The deserialized XmlNode - - - - Deserializes the XmlNode from a JSON string nested in a root elment specified by . - - The JSON string. - The name of the root element to append when deserializing. - The deserialized XmlNode - - - - Deserializes the XmlNode from a JSON string nested in a root elment specified by - and writes a .NET array attribute for collections. - - The JSON string. - The name of the root element to append when deserializing. - - A flag 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 XmlNode - - - - Serializes the to a JSON string. - - The node to convert to JSON. - A JSON string of the XNode. - - - - Serializes the to a JSON string using formatting. - - The node to convert to JSON. - Indicates how the output is formatted. - A JSON string of the XNode. - - - - Serializes the to a JSON string using formatting and omits the root object if is true. - - The node to serialize. - Indicates how the output is formatted. - Omits writing the root object. - A JSON string of the XNode. - - - - Deserializes the from a JSON string. - - The JSON string. - The deserialized XNode - - - - Deserializes the from a JSON string nested in a root elment specified by . - - The JSON string. - The name of the root element to append when deserializing. - The deserialized XNode - - - - Deserializes the from a JSON string nested in a root elment specified by - and writes a .NET array attribute for collections. - - The JSON string. - The name of the root element to append when deserializing. - - A flag 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 XNode - - - - 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 a null reference (Nothing in Visual Basic) 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). - - - - 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 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. - - - 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 TypeNameHandling.None. - - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - - The type name assembly format. - - - - Gets or sets how object references are preserved by the serializer. - - - - - Get or set how reference loops (e.g. a class referencing itself) is handled. - - - - - Get or set how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. - - - - - Get or set how null values are handled during serialization and deserialization. - - - - - Get or set how null default are handled during serialization and deserialization. - - - - - Gets or sets how objects are created during deserialization. - - The object creation handling. - - - - Gets or sets how constructors are used during deserialization. - - The constructor handling. - - - - Gets or sets how metadata properties are used during deserialization. - - 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. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling during serialization and deserialization. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Get or set how special floating point numbers, e.g. , - and , - are written as JSON text. - - - - - Get or set how strings are escaped when writing JSON text. - - - - - Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - - - - - Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. - - - 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 reader values from. - The target object to populate values onto. - - - - Populates the JSON values onto the target object. - - The that contains the JSON structure to reader 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 - to a Stream using the specified . - - The used to write the JSON structure. - The to serialize. - - - - Serializes the specified and writes the JSON structure - to a Stream 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. - Specifing the type is optional. - - - - - Serializes the specified and writes the JSON structure - to a Stream 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. - Specifing the type is optional. - - - - - Serializes the specified and writes the JSON structure - to a Stream using the specified . - - The used to write the JSON structure. - The to serialize. - - - - - Contains the JSON schema extension methods. - - - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. - - - - - - - Determines whether the is valid. - - - JSON Schema validation has been moved to its own package. See http://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 http://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 http://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 http://www.newtonsoft.com/jsonschema for more details. - - - The source to test. - The schema to test with. - The validation event handler. - - - - - Returns detailed information about the schema exception. - - - JSON Schema validation has been moved to its own package. See http://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 a null reference (Nothing in Visual Basic) 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). - - - - - Resolves from an id. - - - JSON Schema validation has been moved to its own package. See http://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. - - - - - Specifies undefined schema Id handling options for the . - - - JSON Schema validation has been moved to its own package. See http://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 http://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 http://www.newtonsoft.com/jsonschema for more details. - - - - - - - An in-memory representation of a JSON Schema. - - - JSON Schema validation has been moved to its own package. See http://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 divisble by. - - A number that the value should be divisble 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 disallow 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 schema JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - Parses the specified json. - - The json. - The resolver. - A populated from the string that contains JSON. - - - - 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 . - - - - - - Generates a from a specified . - - - JSON Schema validation has been moved to its own package. See http://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. - - - - - The value types allowed by the . - - - JSON Schema validation has been moved to its own package. See http://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 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 reference loop handling options for the . - - - - - Throw a when a loop is encountered. - - - - - Ignore loop references and do not serialize. - - - - - Serialize loop references. - - - - - 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 TypeNameHandling.None. - - - - - 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. - - - - - Specifies the type of JSON token. - - - - - This is returned by the if a 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 writer that provides a fast, non-cached, forward-only way of generating JSON data. - - - - - Gets or sets a value indicating whether the underlying stream or - should be closed when the writer is closed. - - - true to close the underlying stream or when - the 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. - - - - - Indicates how JSON text output is formatted. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling when writing JSON text. - - - - - Get or set how strings are escaped when writing JSON text. - - - - - Get or set how special floating point numbers, e.g. , - and , - are written to JSON text. - - - - - Get or set how and values are formatting when writing JSON text. - - - - - Gets or sets the culture used when writing JSON. Defaults to . - - - - - Creates an instance of the JsonWriter class. - - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - 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 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 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 . - A null value can be passed to the method for token's 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 value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The 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 out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes out 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 JsonWriter, - - The JsonToken being written. - The value being written. - - - - 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 results in an being thrown. - - - - - The method has been called. - - - - - An object is being written. - - - - - A array is being written. - - - - - A constructor is being written. - - - - - A property is being written. - - - - - A write method has not been called. - - - - diff --git a/packages/Newtonsoft.Json.9.0.1/lib/net40/Newtonsoft.Json.dll b/packages/Newtonsoft.Json.9.0.1/lib/net40/Newtonsoft.Json.dll deleted file mode 100644 index 20dae627..00000000 Binary files a/packages/Newtonsoft.Json.9.0.1/lib/net40/Newtonsoft.Json.dll and /dev/null differ diff --git a/packages/Newtonsoft.Json.9.0.1/lib/net40/Newtonsoft.Json.xml b/packages/Newtonsoft.Json.9.0.1/lib/net40/Newtonsoft.Json.xml deleted file mode 100644 index ce1bca85..00000000 --- a/packages/Newtonsoft.Json.9.0.1/lib/net40/Newtonsoft.Json.xml +++ /dev/null @@ -1,9229 +0,0 @@ - - - - Newtonsoft.Json - - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. - - - - - Gets or sets a value indicating whether binary data reading should 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 stream. - - - - Initializes a new instance of the class. - - The reader. - - - - Initializes a new instance of the class. - - The stream. - 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 reader. - 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 stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Changes the to Closed. - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating JSON 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 stream. - - - - Initializes a new instance of the class. - - The writer. - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Writes the end. - - The token. - - - - Writes out 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 stream and the underlying stream. - - - - - 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. - - - - 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. - - - - 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. - - - - - 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. - - - - - Create 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 Entity Framework EntityKey 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 ExpandoObject 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 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 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. - - true if the written enum text will be camel case; otherwise, false. - - - - Gets or sets a value indicating whether integer values are allowed. - - true if integers are allowed; 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. - - - - 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 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 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 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 produces multiple root elements. - - The name of the deserialize root element. - - - - Gets or sets a flag 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 attibute 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. - - - - 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 attributeName 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 constructors are used when initializing objects during deserialization by the . - - - - - First attempt to use the public default constructor, then fall back to single parameterized constructor, then the non-public default constructor. - - - - - Json.NET will use a non-public default constructor before falling back to a parameterized constructor. - - - - - 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 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 . - - - - - Provides an interface for using pooled arrays. - - The array type content. - - - - Rent a 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. - - - - 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 a null reference (Nothing in Visual Basic) 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). - - - - 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. - - - - - 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. - - - - - Instructs the to use the specified constructor when deserializing that object. - - - - - 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 to always serialize the member, and require the member has a value. - - - - - Specifies how JSON comments are handled when loading JSON. - - - - - Ignore comments. - - - - - Load comments as a with type . - - - - - Specifies how line information is handled when loading JSON. - - - - - Ignore line information. - - - - - Load line information. - - - - - Specifies the settings used when loading JSON. - - - - - Gets or sets how JSON comments are handled when loading JSON. - - The JSON comment handling. - - - - Gets or sets how JSON line info is handled when loading JSON. - - The JSON line info handling. - - - - Specifies the settings used when merging JSON. - - - - - Gets or sets the method used when merging JSON arrays. - - The method used when merging JSON arrays. - - - - Gets or sets how how null value properties are merged. - - How null value properties are merged. - - - - 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. - - - - - 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. - - - - 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 collection of objects. - - The type of token - - - - Gets the with the specified key. - - - - - - 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. - - - - 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 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 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 . - - - - 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 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 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 an that can be used to add tokens to the . - - An that is ready to have content written to it. - - - - Replaces the children 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 iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets the 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 this object's properties. - - An of this object's properties. - - - - Gets a the specified name. - - The property name. - A with the specified name or null. - - - - Gets an of this object's property values. - - An 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 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 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. - - - - Removes the property with the specified name. - - Name of the property. - true if item was successfully removed; otherwise, false. - - - - Tries the get value. - - Name of the property. - The value. - true if a value was successfully retrieved; otherwise, false. - - - - Returns an enumerator that iterates 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 properties for this instance of a component. - - - A that represents the properties for this component instance. - - - - - Returns the properties for this instance of a component using the attribute array as a filter. - - An array of type that is used as a filter. - - A that represents the filtered properties for this component instance. - - - - - Returns a collection of custom attributes for this instance of a component. - - - An containing the attributes for this object. - - - - - Returns the class name of this instance of a component. - - - The class name of the object, or null if the class does not have a name. - - - - - Returns the name of this instance of a component. - - - The name of the object, or null if the object does not have a name. - - - - - Returns a type converter for this instance of a component. - - - A that is the converter for this object, or null if there is no for this object. - - - - - Returns the default event for this instance of a component. - - - An that represents the default event for this object, or null if this object does not have events. - - - - - Returns the default property for this instance of a component. - - - A that represents the default property for this object, or null if this object does not have properties. - - - - - Returns an editor of the specified type for this instance of a component. - - A that represents the editor for this object. - - An of the specified type that is the editor for this object, or null if the editor cannot be found. - - - - - Returns the events for this instance of a component using the specified attribute array as a filter. - - An array of type that is used as a filter. - - An that represents the filtered events for this component instance. - - - - - Returns the events for this instance of a component. - - - An that represents the events for this component instance. - - - - - Returns an object that contains the property described by the specified property descriptor. - - A that represents the property whose owner is to be found. - - An that represents the owner of the specified 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 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 . - The is read-only. - - - - Removes the item at the specified index. - - The zero-based index of the item to remove. - - is not a valid index in the . - The is read-only. - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Adds an item to the . - - The object to add to the . - The is read-only. - - - - Removes all items from the . - - The is read-only. - - - - Determines whether the contains a specific value. - - The object to locate in the . - - true if is found in the ; otherwise, false. - - - - - Copies to. - - 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 . - - The is read-only. - - - - 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. - - - - Reads the next JSON token from the stream. - - - 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. - - - - - 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 writen. - - The token being writen. - - - - 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 streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - 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 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 out 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 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. - - - The indented JSON for this token. - - - - - Returns the JSON for this token using the given formatting and converters. - - Indicates how the output is formatted. - A collection of 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 . - - 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 . - - 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 . - - 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 . - - 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 . - - 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 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 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 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 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. - - - - Creates an for this token. - - An 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 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 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 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 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 . - - An positioned at the token to read into this . - - An 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. - - An 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 . - - 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. - - An 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 . - - An 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 JPath expression. Selects the token that matches the object path. - - - A that contains a JPath expression. - - A , or null. - - - - Selects a using a JPath expression. Selects the token that matches the object path. - - - A that contains a JPath 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 JPath expression. - - - A that contains a JPath expression. - - An that contains the selected elements. - - - - Selects a collection of elements using a JPath expression. - - - A that contains a JPath expression. - - A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. - An 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. - - - - 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 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 . - - - - 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 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 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. - - - The parameter is null. - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Returns a that represents this instance. - - - 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 the same type as this instance. - - - - - 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. - - - - - 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. - - - - - Resolves the specified property name. - - The property name to resolve. - The resolved property name. - - - - 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. - - - - 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 Info will exclude Verbose messages and include Info, - Warning and Error 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 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. - - - - 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 Info will exclude Verbose messages and include Info, - Warning and Error 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. - - - - 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. - - - - 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 Info will exclude Verbose messages and include Info, - Warning and Error 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 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 specfied. - The serialized property 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. - - - - 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. - - - - 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. - - - - - Resolves the specified property name. - - The property name to resolve. - The resolved property name. - - - - 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 ISerializable object constructor. - - The ISerializable 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 . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - 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 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. - - - - Resolves member mappings for a type, camel casing property names. - - - - - Initializes a new instance of the class. - - - - - Used by to resolves 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 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. - - - - - Initializes a new instance of the class. - - - If set to true the will use a cached shared with other resolvers of the same type. - Sharing the cache will significantly improve performance with multiple resolver instances because expensive reflection will only - happen once. This setting can cause unexpected behavior if different instances of the resolver are suppose to produce different - results. When set to false it is highly recommended to reuse instances with the . - - - - - 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 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 serialization binder used when resolving and loading classes from type names. - - - - - 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. - - - - Used by to resolves a for a given . - - - - - - - - - Resolves the contract for a given type. - - The type to resolve a contract for. - The contract for a given type. - - - - 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. - - - - 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 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 method called immediately after deserialization of the object. - - The method called immediately after deserialization of the object. - - - - Gets or sets the method called during deserialization of the object. - - The method called during deserialization of the object. - - - - Gets or sets the method called after serialization of the object graph. - - The method called after serialization of the object graph. - - - - Gets or sets the method called before serialization of the object. - - The method called before serialization of the object. - - - - Gets or sets the method called when an error is thrown during the serialization of the object. - - The method 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 property name resolver. - - The property name resolver. - - - - 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. - - - - 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 presidence 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 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 serialize. - - A predicate used to determine whether the property should be serialize. - - - - 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 the type name handling used when serializing the property's collection items. - - The collection's items type name handling. - - - - Gets or sets the 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 propertyName 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. - - - - 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 - - - - Gets the reference for the sepecified 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. - - - - Contract details for a used by the . - - - - - Gets or sets the object member serialization. - - The member object serialization. - - - - 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 the object's properties. - - The object's properties. - - - - Gets the constructor parameters required for any non-default constructor - - - - - Gets a collection of instances that define the parameters used with . - - - - - Gets or sets the override constructor used to create the object. - This is set when a constructor is marked up using the - JsonConstructor attribute. - - The override constructor. - - - - Gets or sets the parametrized constructor used to create the object. - - The parametrized constructor. - - - - 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. - - - - - 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. - - - - Lookup and create an instance of the JsonConverter type described by the argument. - - The JsonConverter type to create. - Optional arguments to pass to an initializing constructor of the JsonConverter. - If null, the default constructor is used. - - - - 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. - - - - When applied to a method, specifies that the method is called when an error occurs serializing an object. - - - - - Represents a method that constructs an object. - - The object type to create. - - - - 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. - - - - - 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 - - - - - 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. - - - - - Gets a dictionary of the names and values of an Enum type. - - - - - - Gets a dictionary of the names and values of an Enum type. - - The enum type to get names and values for. - - - - - Builds a string. Unlike StringBuilder this class lets you reuse it's internal buffer. - - - - - 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 IList. - - The list to add to. - The collection of elements to add. - - - - 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 member is an indexed property. - - The member. - - true if the member is an indexed property; otherwise, false. - - - - - 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. - - - - - 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. - - - - - 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. - - - - - 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 ISerializable. - - - - - - - - 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. - - - - - 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 LineNumber and LinePosition can be provided; otherwise, false. - - - - - Gets the current line number. - - The current line number or 0 if no line information is available (for example, HasLineInfo returns false). - - - - Gets the current line position. - - The current line position or 0 if no line information is available (for example, HasLineInfo 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 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 ItemConverterType. - 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 NamingStrategyType. - 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. - - - - 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 is 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 sets members to their default value when deserializing. - - - - - 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 ConverterType. - 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. - - - - Instructs the how to serialize the object. - - - - - Gets or sets the member serialization. - - The member serialization. - - - - 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. - - - - Specifies the settings on a object. - - - - - Gets or sets how reference loops (e.g. a class referencing itself) is handled. - - 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. - - Missing member handling. - - - - Gets or sets how objects are created during deserialization. - - The object creation handling. - - - - Gets or sets how null values are handled during serialization and deserialization. - - Null value handling. - - - - Gets or sets how null default are handled during serialization and deserialization. - - 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 preserve references handling. - - - - Gets or sets how type name writing and reading is handled by the serializer. - - - 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 TypeNameHandling.None. - - The type name handling. - - - - Gets or sets how metadata properties are used during deserialization. - - The metadata properties handling. - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - - The type name assembly format. - - - - Gets or sets how constructors are used during deserialization. - - 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 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. - - - - Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - - - - - Indicates how JSON text output is formatted. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling during serialization and deserialization. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Get or set how special floating point numbers, e.g. , - and , - are written as JSON. - - - - - Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Get or set how strings are escaped when writing JSON text. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Gets a value indicating whether there will be a check for additional content after deserializing an object. - - - 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 validation. - - - JSON Schema validation has been moved to its own package. See http://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 Common Language Runtime (CLR) 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. - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a []. - - - A [] or a null reference if the next JSON token is null. - - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - 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 how object creation is handled by the . - - - - - Reuse existing objects, create new objects when needed. - - - - - Only reuse existing objects. - - - - - Always create new objects. - - - - - 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 TextReader containing the XML data to read. - - - - Gets or sets the reader's character buffer pool. - - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a []. - - A [] or a null reference 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 stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Changes the state to closed. - - - - - Gets a value indicating whether the class can return line information. - - - true if LineNumber and LinePosition can be provided; otherwise, false. - - - - - Gets the current line number. - - - The current line number or 0 if no line information is available (for example, HasLineInfo returns false). - - - - - Gets the current line position. - - - The current line position or 0 if no line information is available (for example, HasLineInfo returns false). - - - - - Instructs the to always serialize the member with the specified name. - - - - - Gets or sets the used when serializing the property's collection items. - - The collection's items . - - - - The parameter list to use when constructing the described by ItemConverterType. - 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 NamingStrategyType. - 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 the reference loop handling used when serializing the property's collection items. - - The collection's items reference loop handling. - - - - Gets or sets the 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. - - - - Instructs the not to serialize the public field or public read/write property value. - - - - - 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 IndentChars to write for each level in the hierarchy when is set to Formatting.Indented. - - - - - Gets or sets which character to use to quote attribute values. - - - - - Gets or sets which character to use for indenting when is set to Formatting.Indented. - - - - - Gets or sets a value indicating whether object names will be surrounded with quotes. - - - - - Creates an instance of the JsonWriter class using the specified . - - The TextWriter to write to. - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - 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 value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a [] value. - - The [] value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes out the given white space. - - The string of white space characters. - - - - The exception thrown when an error occurs while reading 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 a null reference (Nothing in Visual Basic) 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). - - - - 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 a null reference (Nothing in Visual Basic) 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). - - - - 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 the of the JSON produced by the JsonConverter. - - - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. - - - The of the JSON produced by the JsonConverter. - - - - 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. - - - - Represents a collection of . - - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. - - - - - Specifies the state of the reader. - - - - - The 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 Close method has been called. - - - - - Reader has just read a value. - - - - - Reader is at the start of a constructor. - - - - - Reader 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 underlying stream or - should be closed when the reader is closed. - - - true to close the underlying stream or when - the 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. - - - - - Get or set how time zones are handling when reading JSON. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Get or set 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 Common Language Runtime (CLR) 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 with the specified . - - - - - Reads the next JSON token from the stream. - - true if the next token was read successfully; false if there are no more tokens to read. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a []. - - A [] or a null reference 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 stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . 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 state based on current token type. - - - - - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - - - - Releases unmanaged and - optionally - managed resources - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Changes the to Closed. - - - - - Provides methods for converting between common language runtime 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 is 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 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 is formatted. - A collection 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 Auto to write out the type name if the type of the value does not match. - Specifing 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 is 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 is 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 Auto to write out the type name if the type of the value does not match. - Specifing the type is optional. - - - A JSON string representation of the object. - - - - - Asynchronously serializes the specified object to a JSON string. - Serialization will happen on a new thread. - - The object to serialize. - - A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. - - - - - Asynchronously serializes the specified object to a JSON string using formatting. - Serialization will happen on a new thread. - - The object to serialize. - Indicates how the output is formatted. - - A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. - - - - - Asynchronously serializes the specified object to a JSON string using formatting and a collection of . - Serialization will happen on a new thread. - - The object to serialize. - Indicates how the output is formatted. - The used to serialize the object. - If this is null, default serialization settings will be used. - - A task that represents the asynchronous serialize operation. The value of the TResult parameter contains 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 infered 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 infered 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. - - - - Asynchronously deserializes the JSON to the specified .NET type. - Deserialization will happen on a new thread. - - The type of the object to deserialize to. - The JSON to deserialize. - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. - - - - - Asynchronously deserializes the JSON to the specified .NET type using . - Deserialization will happen on a new thread. - - The type of the object to deserialize to. - The JSON to deserialize. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. - - - - - Asynchronously deserializes the JSON to the specified .NET type. - Deserialization will happen on a new thread. - - The JSON to deserialize. - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. - - - - - Asynchronously deserializes the JSON to the specified .NET type using . - Deserialization will happen on a new thread. - - 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. - - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains 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. - - - - - Asynchronously 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. - - - A task that represents the asynchronous populate operation. - - - - - Serializes the XML node to a JSON string. - - The node to serialize. - A JSON string of the XmlNode. - - - - Serializes the XML node to a JSON string using formatting. - - The node to serialize. - Indicates how the output is formatted. - A JSON string of the XmlNode. - - - - Serializes the XML node to a JSON string using formatting and omits the root object if is true. - - The node to serialize. - Indicates how the output is formatted. - Omits writing the root object. - A JSON string of the XmlNode. - - - - Deserializes the XmlNode from a JSON string. - - The JSON string. - The deserialized XmlNode - - - - Deserializes the XmlNode from a JSON string nested in a root elment specified by . - - The JSON string. - The name of the root element to append when deserializing. - The deserialized XmlNode - - - - Deserializes the XmlNode from a JSON string nested in a root elment specified by - and writes a .NET array attribute for collections. - - The JSON string. - The name of the root element to append when deserializing. - - A flag 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 XmlNode - - - - Serializes the to a JSON string. - - The node to convert to JSON. - A JSON string of the XNode. - - - - Serializes the to a JSON string using formatting. - - The node to convert to JSON. - Indicates how the output is formatted. - A JSON string of the XNode. - - - - Serializes the to a JSON string using formatting and omits the root object if is true. - - The node to serialize. - Indicates how the output is formatted. - Omits writing the root object. - A JSON string of the XNode. - - - - Deserializes the from a JSON string. - - The JSON string. - The deserialized XNode - - - - Deserializes the from a JSON string nested in a root elment specified by . - - The JSON string. - The name of the root element to append when deserializing. - The deserialized XNode - - - - Deserializes the from a JSON string nested in a root elment specified by - and writes a .NET array attribute for collections. - - The JSON string. - The name of the root element to append when deserializing. - - A flag 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 XNode - - - - 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 a null reference (Nothing in Visual Basic) 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). - - - - 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 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. - - - 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 TypeNameHandling.None. - - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - - The type name assembly format. - - - - Gets or sets how object references are preserved by the serializer. - - - - - Get or set how reference loops (e.g. a class referencing itself) is handled. - - - - - Get or set how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. - - - - - Get or set how null values are handled during serialization and deserialization. - - - - - Get or set how null default are handled during serialization and deserialization. - - - - - Gets or sets how objects are created during deserialization. - - The object creation handling. - - - - Gets or sets how constructors are used during deserialization. - - The constructor handling. - - - - Gets or sets how metadata properties are used during deserialization. - - 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. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling during serialization and deserialization. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Get or set how special floating point numbers, e.g. , - and , - are written as JSON text. - - - - - Get or set how strings are escaped when writing JSON text. - - - - - Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - - - - - Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. - - - 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 reader values from. - The target object to populate values onto. - - - - Populates the JSON values onto the target object. - - The that contains the JSON structure to reader 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 - to a Stream using the specified . - - The used to write the JSON structure. - The to serialize. - - - - Serializes the specified and writes the JSON structure - to a Stream 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. - Specifing the type is optional. - - - - - Serializes the specified and writes the JSON structure - to a Stream 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. - Specifing the type is optional. - - - - - Serializes the specified and writes the JSON structure - to a Stream using the specified . - - The used to write the JSON structure. - The to serialize. - - - - - Contains the JSON schema extension methods. - - - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. - - - - - - - Determines whether the is valid. - - - JSON Schema validation has been moved to its own package. See http://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 http://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 http://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 http://www.newtonsoft.com/jsonschema for more details. - - - The source to test. - The schema to test with. - The validation event handler. - - - - - Returns detailed information about the schema exception. - - - JSON Schema validation has been moved to its own package. See http://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 a null reference (Nothing in Visual Basic) 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). - - - - - Resolves from an id. - - - JSON Schema validation has been moved to its own package. See http://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. - - - - - Specifies undefined schema Id handling options for the . - - - JSON Schema validation has been moved to its own package. See http://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 http://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 http://www.newtonsoft.com/jsonschema for more details. - - - - - - - An in-memory representation of a JSON Schema. - - - JSON Schema validation has been moved to its own package. See http://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 divisble by. - - A number that the value should be divisble 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 disallow 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 schema JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - Parses the specified json. - - The json. - The resolver. - A populated from the string that contains JSON. - - - - 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 . - - - - - - Generates a from a specified . - - - JSON Schema validation has been moved to its own package. See http://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. - - - - - The value types allowed by the . - - - JSON Schema validation has been moved to its own package. See http://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 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 reference loop handling options for the . - - - - - Throw a when a loop is encountered. - - - - - Ignore loop references and do not serialize. - - - - - Serialize loop references. - - - - - 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 TypeNameHandling.None. - - - - - 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. - - - - - Specifies the type of JSON token. - - - - - This is returned by the if a 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 writer that provides a fast, non-cached, forward-only way of generating JSON data. - - - - - Gets or sets a value indicating whether the underlying stream or - should be closed when the writer is closed. - - - true to close the underlying stream or when - the 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. - - - - - Indicates how JSON text output is formatted. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling when writing JSON text. - - - - - Get or set how strings are escaped when writing JSON text. - - - - - Get or set how special floating point numbers, e.g. , - and , - are written to JSON text. - - - - - Get or set how and values are formatting when writing JSON text. - - - - - Gets or sets the culture used when writing JSON. Defaults to . - - - - - Creates an instance of the JsonWriter class. - - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - 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 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 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 . - A null value can be passed to the method for token's 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 value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The 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 out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes out 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 JsonWriter, - - The JsonToken being written. - The value being written. - - - - 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 results in an being thrown. - - - - - The method has been called. - - - - - An object is being written. - - - - - A array is being written. - - - - - A constructor is being written. - - - - - A property is being written. - - - - - A write method has not been called. - - - - diff --git a/packages/Newtonsoft.Json.9.0.1/lib/net45/Newtonsoft.Json.dll b/packages/Newtonsoft.Json.9.0.1/lib/net45/Newtonsoft.Json.dll deleted file mode 100644 index be6558d2..00000000 Binary files a/packages/Newtonsoft.Json.9.0.1/lib/net45/Newtonsoft.Json.dll and /dev/null differ diff --git a/packages/Newtonsoft.Json.9.0.1/lib/net45/Newtonsoft.Json.xml b/packages/Newtonsoft.Json.9.0.1/lib/net45/Newtonsoft.Json.xml deleted file mode 100644 index c719433c..00000000 --- a/packages/Newtonsoft.Json.9.0.1/lib/net45/Newtonsoft.Json.xml +++ /dev/null @@ -1,9229 +0,0 @@ - - - - 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 JSON data. - - - - - Gets or sets a value indicating whether binary data reading should 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 stream. - - - - Initializes a new instance of the class. - - The reader. - - - - Initializes a new instance of the class. - - The stream. - 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 reader. - 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 stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Changes the to Closed. - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating JSON 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 stream. - - - - Initializes a new instance of the class. - - The writer. - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Writes the end. - - The token. - - - - Writes out 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 stream and the underlying stream. - - - - - 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 single parameterized constructor, then 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. - - - - - Create 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 EntityKey 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 ExpandoObject 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. - - true if the written enum text will be camel case; otherwise, false. - - - - Gets or sets a value indicating whether integer values are allowed. - - true if integers are allowed; 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. - - - - 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 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 produces multiple root elements. - - The name of the deserialize root element. - - - - Gets or sets a flag 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 attibute 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. - - - - 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 attributeName 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 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 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. - - - - - 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 is 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 sets 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 property. - - - - - 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 a 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 LineNumber and LinePosition can be provided; otherwise, false. - - - - - Gets the current line number. - - The current line number or 0 if no line information is available (for example, HasLineInfo returns false). - - - - Gets the current line position. - - The current line position or 0 if no line information is available (for example, HasLineInfo 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 ItemConverterType. - 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 NamingStrategyType. - 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 common language runtime 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 is 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 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 is formatted. - A collection 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 Auto to write out the type name if the type of the value does not match. - Specifing 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 is 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 is 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 Auto to write out the type name if the type of the value does not match. - Specifing the type is optional. - - - A JSON string representation of the object. - - - - - Asynchronously serializes the specified object to a JSON string. - Serialization will happen on a new thread. - - The object to serialize. - - A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. - - - - - Asynchronously serializes the specified object to a JSON string using formatting. - Serialization will happen on a new thread. - - The object to serialize. - Indicates how the output is formatted. - - A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. - - - - - Asynchronously serializes the specified object to a JSON string using formatting and a collection of . - Serialization will happen on a new thread. - - The object to serialize. - Indicates how the output is formatted. - The used to serialize the object. - If this is null, default serialization settings will be used. - - A task that represents the asynchronous serialize operation. The value of the TResult parameter contains 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 infered 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 infered 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. - - - - Asynchronously deserializes the JSON to the specified .NET type. - Deserialization will happen on a new thread. - - The type of the object to deserialize to. - The JSON to deserialize. - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. - - - - - Asynchronously deserializes the JSON to the specified .NET type using . - Deserialization will happen on a new thread. - - The type of the object to deserialize to. - The JSON to deserialize. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. - - - - - Asynchronously deserializes the JSON to the specified .NET type. - Deserialization will happen on a new thread. - - The JSON to deserialize. - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. - - - - - Asynchronously deserializes the JSON to the specified .NET type using . - Deserialization will happen on a new thread. - - 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. - - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains 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. - - - - - Asynchronously 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. - - - A task that represents the asynchronous populate operation. - - - - - Serializes the XML node to a JSON string. - - The node to serialize. - A JSON string of the XmlNode. - - - - Serializes the XML node to a JSON string using formatting. - - The node to serialize. - Indicates how the output is formatted. - A JSON string of the XmlNode. - - - - Serializes the XML node to a JSON string using formatting and omits the root object if is true. - - The node to serialize. - Indicates how the output is formatted. - Omits writing the root object. - A JSON string of the XmlNode. - - - - Deserializes the XmlNode from a JSON string. - - The JSON string. - The deserialized XmlNode - - - - Deserializes the XmlNode from a JSON string nested in a root elment specified by . - - The JSON string. - The name of the root element to append when deserializing. - The deserialized XmlNode - - - - Deserializes the XmlNode from a JSON string nested in a root elment specified by - and writes a .NET array attribute for collections. - - The JSON string. - The name of the root element to append when deserializing. - - A flag 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 XmlNode - - - - Serializes the to a JSON string. - - The node to convert to JSON. - A JSON string of the XNode. - - - - Serializes the to a JSON string using formatting. - - The node to convert to JSON. - Indicates how the output is formatted. - A JSON string of the XNode. - - - - Serializes the to a JSON string using formatting and omits the root object if is true. - - The node to serialize. - Indicates how the output is formatted. - Omits writing the root object. - A JSON string of the XNode. - - - - Deserializes the from a JSON string. - - The JSON string. - The deserialized XNode - - - - Deserializes the from a JSON string nested in a root elment specified by . - - The JSON string. - The name of the root element to append when deserializing. - The deserialized XNode - - - - Deserializes the from a JSON string nested in a root elment specified by - and writes a .NET array attribute for collections. - - The JSON string. - The name of the root element to append when deserializing. - - A flag 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 XNode - - - - 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 the of the JSON produced by the JsonConverter. - - - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. - - - The of the JSON produced by the JsonConverter. - - - - 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. - - - - 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 ConverterType. - 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 a null reference (Nothing in Visual Basic) 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. - - - - - Instructs the how to serialize the object. - - - - - Gets or sets the member serialization. - - The member serialization. - - - - 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 used when serializing the property's collection items. - - The collection's items . - - - - The parameter list to use when constructing the described by ItemConverterType. - 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 NamingStrategyType. - 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 the reference loop handling used when serializing the property's collection items. - - The collection's items reference loop handling. - - - - Gets or sets the 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. - - - - - The 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 Close method has been called. - - - - - Reader has just read a value. - - - - - Reader is at the start of a constructor. - - - - - Reader 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 underlying stream or - should be closed when the reader is closed. - - - true to close the underlying stream or when - the 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. - - - - - Get or set how time zones are handling when reading JSON. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Get or set 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 Common Language Runtime (CLR) 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 with the specified . - - - - - Reads the next JSON token from the stream. - - true if the next token was read successfully; false if there are no more tokens to read. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a []. - - A [] or a null reference 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 stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . 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 state based on current token type. - - - - - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - - - - Releases unmanaged and - optionally - managed resources - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Changes the to 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 a null reference (Nothing in Visual Basic) 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 always serialize the member, and require the member has a value. - - - - - 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 a null reference (Nothing in Visual Basic) 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). - - - - 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 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. - - - 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 TypeNameHandling.None. - - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - - The type name assembly format. - - - - Gets or sets how object references are preserved by the serializer. - - - - - Get or set how reference loops (e.g. a class referencing itself) is handled. - - - - - Get or set how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. - - - - - Get or set how null values are handled during serialization and deserialization. - - - - - Get or set how null default are handled during serialization and deserialization. - - - - - Gets or sets how objects are created during deserialization. - - The object creation handling. - - - - Gets or sets how constructors are used during deserialization. - - The constructor handling. - - - - Gets or sets how metadata properties are used during deserialization. - - 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. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling during serialization and deserialization. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Get or set how special floating point numbers, e.g. , - and , - are written as JSON text. - - - - - Get or set how strings are escaped when writing JSON text. - - - - - Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - - - - - Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. - - - 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 reader values from. - The target object to populate values onto. - - - - Populates the JSON values onto the target object. - - The that contains the JSON structure to reader 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 - to a Stream using the specified . - - The used to write the JSON structure. - The to serialize. - - - - Serializes the specified and writes the JSON structure - to a Stream 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. - Specifing the type is optional. - - - - - Serializes the specified and writes the JSON structure - to a Stream 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. - Specifing the type is optional. - - - - - Serializes the specified and writes the JSON structure - to a Stream 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) is handled. - - 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. - - Missing member handling. - - - - Gets or sets how objects are created during deserialization. - - The object creation handling. - - - - Gets or sets how null values are handled during serialization and deserialization. - - Null value handling. - - - - Gets or sets how null default are handled during serialization and deserialization. - - 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 preserve references handling. - - - - Gets or sets how type name writing and reading is handled by the serializer. - - - 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 TypeNameHandling.None. - - The type name handling. - - - - Gets or sets how metadata properties are used during deserialization. - - The metadata properties handling. - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - - The type name assembly format. - - - - Gets or sets how constructors are used during deserialization. - - 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 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. - - - - Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - - - - - Indicates how JSON text output is formatted. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling during serialization and deserialization. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Get or set how special floating point numbers, e.g. , - and , - are written as JSON. - - - - - Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Get or set how strings are escaped when writing JSON text. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Gets a value indicating whether there will be a check for additional content after deserializing an object. - - - 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 TextReader containing the XML data to read. - - - - Gets or sets the reader's character buffer pool. - - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a []. - - A [] or a null reference 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 stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Changes the state to closed. - - - - - Gets a value indicating whether the class can return line information. - - - true if LineNumber and LinePosition can be provided; otherwise, false. - - - - - Gets the current line number. - - - The current line number or 0 if no line information is available (for example, HasLineInfo returns false). - - - - - Gets the current line position. - - - The current line position or 0 if no line information is available (for example, HasLineInfo 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 IndentChars to write for each level in the hierarchy when is set to Formatting.Indented. - - - - - Gets or sets which character to use to quote attribute values. - - - - - Gets or sets which character to use for indenting when is set to Formatting.Indented. - - - - - Gets or sets a value indicating whether object names will be surrounded with quotes. - - - - - Creates an instance of the JsonWriter class using the specified . - - The TextWriter to write to. - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - 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 value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a [] value. - - The [] value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes out the given white space. - - The string of white space characters. - - - - Specifies the type of JSON token. - - - - - This is returned by the if a 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 http://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 Common Language Runtime (CLR) 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. - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a []. - - - A [] or a null reference if the next JSON token is null. - - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream. - - - 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 underlying stream or - should be closed when the writer is closed. - - - true to close the underlying stream or when - the 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. - - - - - Indicates how JSON text output is formatted. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling when writing JSON text. - - - - - Get or set how strings are escaped when writing JSON text. - - - - - Get or set how special floating point numbers, e.g. , - and , - are written to JSON text. - - - - - Get or set how and values are formatting when writing JSON text. - - - - - Gets or sets the culture used when writing JSON. Defaults to . - - - - - Creates an instance of the JsonWriter class. - - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - 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 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 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 . - A null value can be passed to the method for token's 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 value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The 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 out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes out 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 JsonWriter, - - The JsonToken being written. - The value being written. - - - - The exception thrown when an error occurs while reading 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 a null reference (Nothing in Visual Basic) 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). - - - - Specifies how JSON comments are handled when loading JSON. - - - - - Ignore comments. - - - - - Load comments as a with type . - - - - - Specifies how line information is handled when loading JSON. - - - - - Ignore line information. - - - - - Load line information. - - - - - 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 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 . - The is read-only. - - - - Removes the item at the specified index. - - The zero-based index of the item to remove. - - is not a valid index in the . - The is read-only. - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Adds an item to the . - - The object to add to the . - The is read-only. - - - - Removes all items from the . - - The is read-only. - - - - Determines whether the contains a specific value. - - The object to locate in the . - - true if is found in the ; otherwise, false. - - - - - Copies to. - - 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 . - - The is read-only. - - - - 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 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 . - - - - 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 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 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 an that can be used to add tokens to the . - - An that is ready to have content written to it. - - - - Replaces the children 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 iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets the 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 this object's properties. - - An of this object's properties. - - - - Gets a the specified name. - - The property name. - A with the specified name or null. - - - - Gets an of this object's property values. - - An 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 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 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. - - - - Removes the property with the specified name. - - Name of the property. - true if item was successfully removed; otherwise, false. - - - - Tries the get value. - - Name of the property. - The value. - true if a value was successfully retrieved; otherwise, false. - - - - Returns an enumerator that iterates 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 properties for this instance of a component. - - - A that represents the properties for this component instance. - - - - - Returns the properties for this instance of a component using the attribute array as a filter. - - An array of type that is used as a filter. - - A that represents the filtered properties for this component instance. - - - - - Returns a collection of custom attributes for this instance of a component. - - - An containing the attributes for this object. - - - - - Returns the class name of this instance of a component. - - - The class name of the object, or null if the class does not have a name. - - - - - Returns the name of this instance of a component. - - - The name of the object, or null if the object does not have a name. - - - - - Returns a type converter for this instance of a component. - - - A that is the converter for this object, or null if there is no for this object. - - - - - Returns the default event for this instance of a component. - - - An that represents the default event for this object, or null if this object does not have events. - - - - - Returns the default property for this instance of a component. - - - A that represents the default property for this object, or null if this object does not have properties. - - - - - Returns an editor of the specified type for this instance of a component. - - A that represents the editor for this object. - - An of the specified type that is the editor for this object, or null if the editor cannot be found. - - - - - Returns the events for this instance of a component using the specified attribute array as a filter. - - An array of type that is used as a filter. - - An that represents the filtered events for this component instance. - - - - - Returns the events for this instance of a component. - - - An that represents the events for this component instance. - - - - - Returns an object that contains the property described by the specified property descriptor. - - A that represents the property whose owner is to be found. - - An that represents the owner of the specified property. - - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Specifies the settings used when merging JSON. - - - - - Gets or sets the method used when merging JSON arrays. - - The method used when merging JSON arrays. - - - - Gets or sets how how null value properties are merged. - - How null value properties are merged. - - - - 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 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 . - - - - 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. - - - - 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. - - - The indented JSON for this token. - - - - - Returns the JSON for this token using the given formatting and converters. - - Indicates how the output is formatted. - A collection of 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 . - - 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 . - - 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 . - - 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 . - - 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 . - - 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 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 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 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 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. - - - - Creates an for this token. - - An 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 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 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 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 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 . - - An positioned at the token to read into this . - - An 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. - - An 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 . - - 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. - - An 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 . - - An 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 JPath expression. Selects the token that matches the object path. - - - A that contains a JPath expression. - - A , or null. - - - - Selects a using a JPath expression. Selects the token that matches the object path. - - - A that contains a JPath 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 JPath expression. - - - A that contains a JPath expression. - - An that contains the selected elements. - - - - Selects a collection of elements using a JPath expression. - - - A that contains a JPath expression. - - A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. - An 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. - - - - Reads the next JSON token from the stream. - - - 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 writen. - - The token being writen. - - - - 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 streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - 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 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 out 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 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. - - - The parameter is null. - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Returns a that represents this instance. - - - 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 the same type as this instance. - - - - - Specifies the settings used when loading JSON. - - - - - Gets or sets how JSON comments are handled when loading JSON. - - The JSON comment handling. - - - - Gets or sets how JSON line info is handled when loading JSON. - - The JSON line info handling. - - - - 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 ISerializable. - - - - - - - - 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 http://www.newtonsoft.com/jsonschema for more details. - - - - - - - Determines whether the is valid. - - - JSON Schema validation has been moved to its own package. See http://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 http://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 http://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 http://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 http://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 divisble by. - - A number that the value should be divisble 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 disallow 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 schema JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - Parses the specified json. - - The json. - The resolver. - A populated from the string that contains JSON. - - - - 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 http://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 a null reference (Nothing in Visual Basic) 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 http://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 http://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 http://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 http://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 http://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 http://www.newtonsoft.com/jsonschema for more details. - - - - - - 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. - - - - - Resolves the specified property name. - - The property name to resolve. - The resolved property name. - - - - 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. - - - - - 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. - - - - - Used by to resolves 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 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. - - - - - Initializes a new instance of the class. - - - If set to true the will use a cached shared with other resolvers of the same type. - Sharing the cache will significantly improve performance with multiple resolver instances because expensive reflection will only - happen once. This setting can cause unexpected behavior if different instances of the resolver are suppose to produce different - results. When set to false it is highly recommended to reuse instances with the . - - - - - 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 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. - - - - - 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 Info will exclude Verbose messages and include Info, - Warning and Error 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 resolves a for a given . - - - - - - - - - Resolves the contract for a given type. - - The type to resolve a contract for. - The contract for a given type. - - - - 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 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 specfied. - The serialized property 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. - - - - 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 - - - - Gets the reference for the sepecified 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. - - - - 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 Info will exclude Verbose messages and include Info, - Warning and Error 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 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 method called immediately after deserialization of the object. - - The method called immediately after deserialization of the object. - - - - Gets or sets the method called during deserialization of the object. - - The method called during deserialization of the object. - - - - Gets or sets the method called after serialization of the object graph. - - The method called after serialization of the object graph. - - - - Gets or sets the method called before serialization of the object. - - The method called before serialization of the object. - - - - Gets or sets the method called when an error is thrown during the serialization of the object. - - The method 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 property name resolver. - - The property name resolver. - - - - 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 ISerializable object constructor. - - The ISerializable 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 a value that indicates whether the object's properties are required. - - - A value indicating whether the object's properties are required. - - - - - Gets the object's properties. - - The object's properties. - - - - Gets the constructor parameters required for any non-default constructor - - - - - Gets a collection of instances that define the parameters used with . - - - - - Gets or sets the override constructor used to create the object. - This is set when a constructor is marked up using the - JsonConstructor attribute. - - The override constructor. - - - - Gets or sets the parametrized constructor used to create the object. - - The parametrized constructor. - - - - 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. - - - - - 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 presidence 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 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 serialize. - - A predicate used to determine whether the property should be serialize. - - - - 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 the type name handling used when serializing the property's collection items. - - The collection's items type name handling. - - - - Gets or sets the 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 propertyName 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 JsonConverter type described by the argument. - - The JsonConverter type to create. - Optional arguments to pass to an initializing constructor of the JsonConverter. - If null, the default constructor is used. - - - - 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 Info will exclude Verbose messages and include Info, - Warning and Error 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. - - - - - 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. - - - - 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 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 TypeNameHandling.None. - - - - - 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. - - - - - 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 IList. - - 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 - - - - - Gets a dictionary of the names and values of an Enum type. - - - - - - Gets a dictionary of the names and values of an Enum type. - - The enum type to get names and values for. - - - - - 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 member is an indexed property. - - The member. - - true if the member is an indexed property; otherwise, false. - - - - - 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 StringBuilder this class lets you reuse it's 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 results in an being thrown. - - - - - The method has been called. - - - - - An object is being written. - - - - - A array is being written. - - - - - A constructor is being written. - - - - - A property is being written. - - - - - A write method has not been called. - - - - diff --git a/packages/Newtonsoft.Json.9.0.1/tools/install.ps1 b/packages/Newtonsoft.Json.9.0.1/tools/install.ps1 deleted file mode 100644 index 0cebb5e8..00000000 --- a/packages/Newtonsoft.Json.9.0.1/tools/install.ps1 +++ /dev/null @@ -1,116 +0,0 @@ -param($installPath, $toolsPath, $package, $project) - -# open json.net splash page on package install -# don't open if json.net is installed as a dependency - -try -{ - $url = "http://www.newtonsoft.com/json/install?version=" + $package.Version - $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) - - if ($dte2.ActiveWindow.Caption -eq "Package Manager Console") - { - # user is installing from VS NuGet console - # get reference to the window, the console host and the input history - # show webpage if "install-package newtonsoft.json" was last input - - $consoleWindow = $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow]) - - $props = $consoleWindow.GetType().GetProperties([System.Reflection.BindingFlags]::Instance -bor ` - [System.Reflection.BindingFlags]::NonPublic) - - $prop = $props | ? { $_.Name -eq "ActiveHostInfo" } | select -first 1 - if ($prop -eq $null) { return } - - $hostInfo = $prop.GetValue($consoleWindow) - if ($hostInfo -eq $null) { return } - - $history = $hostInfo.WpfConsole.InputHistory.History - - $lastCommand = $history | select -last 1 - - if ($lastCommand) - { - $lastCommand = $lastCommand.Trim().ToLower() - if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("newtonsoft.json")) - { - $dte2.ItemOperations.Navigate($url) | Out-Null - } - } - } - else - { - # user is installing from VS NuGet dialog - # get reference to the window, then smart output console provider - # show webpage if messages in buffered console contains "installing...newtonsoft.json" in last operation - - $instanceField = [NuGet.Dialog.PackageManagerWindow].GetField("CurrentInstance", [System.Reflection.BindingFlags]::Static -bor ` - [System.Reflection.BindingFlags]::NonPublic) - - $consoleField = [NuGet.Dialog.PackageManagerWindow].GetField("_smartOutputConsoleProvider", [System.Reflection.BindingFlags]::Instance -bor ` - [System.Reflection.BindingFlags]::NonPublic) - - if ($instanceField -eq $null -or $consoleField -eq $null) { return } - - $instance = $instanceField.GetValue($null) - - if ($instance -eq $null) { return } - - $consoleProvider = $consoleField.GetValue($instance) - if ($consoleProvider -eq $null) { return } - - $console = $consoleProvider.CreateOutputConsole($false) - - $messagesField = $console.GetType().GetField("_messages", [System.Reflection.BindingFlags]::Instance -bor ` - [System.Reflection.BindingFlags]::NonPublic) - if ($messagesField -eq $null) { return } - - $messages = $messagesField.GetValue($console) - if ($messages -eq $null) { return } - - $operations = $messages -split "==============================" - - $lastOperation = $operations | select -last 1 - - if ($lastOperation) - { - $lastOperation = $lastOperation.ToLower() - - $lines = $lastOperation -split "`r`n" - - $installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json ") } | select -first 1 - - if ($installMatch) - { - $dte2.ItemOperations.Navigate($url) | Out-Null - } - } - } -} -catch -{ - try - { - $pmPane = $dte2.ToolWindows.OutputWindow.OutputWindowPanes.Item("Package Manager") - - $selection = $pmPane.TextDocument.Selection - $selection.StartOfDocument($false) - $selection.EndOfDocument($true) - - if ($selection.Text.StartsWith("Attempting to gather dependencies information for package 'Newtonsoft.Json." + $package.Version + "'")) - { - # don't show on upgrade - if (!$selection.Text.Contains("Removed package")) - { - $dte2.ItemOperations.Navigate($url) | Out-Null - } - } - } - catch - { - # stop potential errors from bubbling up - # worst case the splash page won't open - } -} - -# still yolo \ No newline at end of file diff --git a/packages/repositories.config b/packages/repositories.config deleted file mode 100644 index 503c929a..00000000 --- a/packages/repositories.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/packages/packages.config b/src/Packages.Net20.config similarity index 92% rename from packages/packages.config rename to src/Packages.Net20.config index 7c276ed8..5ac2d7a8 100644 --- a/packages/packages.config +++ b/src/Packages.Net20.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/src/Packages.Net35.config b/src/Packages.Net35.config new file mode 100644 index 00000000..ff91865d --- /dev/null +++ b/src/Packages.Net35.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/examples/packages.config b/src/Packages.Net40.config similarity index 100% rename from examples/packages.config rename to src/Packages.Net40.config diff --git a/src/Qiniu.ALL_VER.sln b/src/Qiniu.ALL_VER.sln new file mode 100644 index 00000000..ed7b08d6 --- /dev/null +++ b/src/Qiniu.ALL_VER.sln @@ -0,0 +1,52 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qiniu.Net20", "Qiniu\Qiniu.Net20.csproj", "{E5A764FD-FC95-4B51-BB10-9A807ED25652}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qiniu.Net35", "Qiniu\Qiniu.Net35.csproj", "{C1B1BFD5-3106-4052-8C51-75E548BE282D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qiniu.Net40", "Qiniu\Qiniu.Net40.csproj", "{2F5B0328-DE8B-4B53-A500-3077E340A51B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qiniu.Net45", "Qiniu\Qiniu.Net45.csproj", "{45A014F6-CCD4-42CE-819C-5F68EA92C8AE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qiniu.Net46", "Qiniu\Qiniu.Net46.csproj", "{FEB25665-1B1D-4646-A550-3994E7F8B073}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qiniu.NetStandard16", "Qiniu\Qiniu.NetStandard16.xproj", "{B5D63029-041A-4973-994C-6FB6BEF9951E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E5A764FD-FC95-4B51-BB10-9A807ED25652}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E5A764FD-FC95-4B51-BB10-9A807ED25652}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5A764FD-FC95-4B51-BB10-9A807ED25652}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E5A764FD-FC95-4B51-BB10-9A807ED25652}.Release|Any CPU.Build.0 = Release|Any CPU + {C1B1BFD5-3106-4052-8C51-75E548BE282D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1B1BFD5-3106-4052-8C51-75E548BE282D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1B1BFD5-3106-4052-8C51-75E548BE282D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1B1BFD5-3106-4052-8C51-75E548BE282D}.Release|Any CPU.Build.0 = Release|Any CPU + {2F5B0328-DE8B-4B53-A500-3077E340A51B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F5B0328-DE8B-4B53-A500-3077E340A51B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F5B0328-DE8B-4B53-A500-3077E340A51B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F5B0328-DE8B-4B53-A500-3077E340A51B}.Release|Any CPU.Build.0 = Release|Any CPU + {45A014F6-CCD4-42CE-819C-5F68EA92C8AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45A014F6-CCD4-42CE-819C-5F68EA92C8AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45A014F6-CCD4-42CE-819C-5F68EA92C8AE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45A014F6-CCD4-42CE-819C-5F68EA92C8AE}.Release|Any CPU.Build.0 = Release|Any CPU + {FEB25665-1B1D-4646-A550-3994E7F8B073}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FEB25665-1B1D-4646-A550-3994E7F8B073}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FEB25665-1B1D-4646-A550-3994E7F8B073}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FEB25665-1B1D-4646-A550-3994E7F8B073}.Release|Any CPU.Build.0 = Release|Any CPU + {B5D63029-041A-4973-994C-6FB6BEF9951E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B5D63029-041A-4973-994C-6FB6BEF9951E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B5D63029-041A-4973-994C-6FB6BEF9951E}.Release|Any CPU.ActiveCfg = Debug|Any CPU + {B5D63029-041A-4973-994C-6FB6BEF9951E}.Release|Any CPU.Build.0 = Debug|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/Qiniu.Net20.sln b/src/Qiniu.Net20.sln new file mode 100644 index 00000000..0bf1e085 --- /dev/null +++ b/src/Qiniu.Net20.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qiniu", "Qiniu\Qiniu.Net20.csproj", "{E5A764FD-FC95-4B51-BB10-9A807ED25652}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E5A764FD-FC95-4B51-BB10-9A807ED25652}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E5A764FD-FC95-4B51-BB10-9A807ED25652}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5A764FD-FC95-4B51-BB10-9A807ED25652}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E5A764FD-FC95-4B51-BB10-9A807ED25652}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/Qiniu.Net35.sln b/src/Qiniu.Net35.sln new file mode 100644 index 00000000..eba8b783 --- /dev/null +++ b/src/Qiniu.Net35.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qiniu.Net35", "Qiniu\Qiniu.Net35.csproj", "{C1B1BFD5-3106-4052-8C51-75E548BE282D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C1B1BFD5-3106-4052-8C51-75E548BE282D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1B1BFD5-3106-4052-8C51-75E548BE282D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1B1BFD5-3106-4052-8C51-75E548BE282D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1B1BFD5-3106-4052-8C51-75E548BE282D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/Qiniu.Net40.sln b/src/Qiniu.Net40.sln new file mode 100644 index 00000000..12fff3b8 --- /dev/null +++ b/src/Qiniu.Net40.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qiniu.Net40", "Qiniu\Qiniu.Net40.csproj", "{2F5B0328-DE8B-4B53-A500-3077E340A51B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2F5B0328-DE8B-4B53-A500-3077E340A51B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F5B0328-DE8B-4B53-A500-3077E340A51B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F5B0328-DE8B-4B53-A500-3077E340A51B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F5B0328-DE8B-4B53-A500-3077E340A51B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/Qiniu.Net45.sln b/src/Qiniu.Net45.sln new file mode 100644 index 00000000..e6608f3e --- /dev/null +++ b/src/Qiniu.Net45.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qiniu.Net45", "Qiniu\Qiniu.Net45.csproj", "{45A014F6-CCD4-42CE-819C-5F68EA92C8AE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {45A014F6-CCD4-42CE-819C-5F68EA92C8AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45A014F6-CCD4-42CE-819C-5F68EA92C8AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45A014F6-CCD4-42CE-819C-5F68EA92C8AE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45A014F6-CCD4-42CE-819C-5F68EA92C8AE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/Qiniu.Net46.sln b/src/Qiniu.Net46.sln new file mode 100644 index 00000000..58bb49a7 --- /dev/null +++ b/src/Qiniu.Net46.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qiniu.Net46", "Qiniu\Qiniu.Net46.csproj", "{FEB25665-1B1D-4646-A550-3994E7F8B073}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FEB25665-1B1D-4646-A550-3994E7F8B073}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FEB25665-1B1D-4646-A550-3994E7F8B073}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FEB25665-1B1D-4646-A550-3994E7F8B073}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FEB25665-1B1D-4646-A550-3994E7F8B073}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/Qiniu.NetStandard16.sln b/src/Qiniu.NetStandard16.sln new file mode 100644 index 00000000..979f8976 --- /dev/null +++ b/src/Qiniu.NetStandard16.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Qiniu", "Qiniu\Qiniu.NetStandard16.xproj", "{957CD434-8B12-46CE-980B-09CA26ED340D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {957CD434-8B12-46CE-980B-09CA26ED340D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {957CD434-8B12-46CE-980B-09CA26ED340D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {957CD434-8B12-46CE-980B-09CA26ED340D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {957CD434-8B12-46CE-980B-09CA26ED340D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/Qiniu.NetStandard16.sln.ReadMe.txt b/src/Qiniu.NetStandard16.sln.ReadMe.txt new file mode 100644 index 00000000..7cbc35f6 --- /dev/null +++ b/src/Qiniu.NetStandard16.sln.ReadMe.txt @@ -0,0 +1,3 @@ +Qiniu.NetStandard16Qiniu.ALL_VER(ǰ) +Ƚproject.jsonproject.lock.jsonQiniuļ +߿project.jsonļȻִdotnet restore \ No newline at end of file diff --git a/src/Qiniu/CDN/FusionManager.cs b/src/Qiniu/CDN/FusionManager.cs new file mode 100644 index 00000000..3e9249fa --- /dev/null +++ b/src/Qiniu/CDN/FusionManager.cs @@ -0,0 +1,397 @@ +using System; +using System.Text; +using Qiniu.Common; +using Qiniu.Util; +using Qiniu.Http; +using Qiniu.CDN.Model; + +namespace Qiniu.CDN +{ + /// + /// 融合CDN加速-功能模块: 缓存刷新、文件预取、流量/带宽查询、日志查询、时间戳防盗链 + /// 另请参阅 http://developer.qiniu.com/article/index.html#fusion-api-handbook + /// 关于时间戳防盗链可参阅 https://support.qiniu.com/question/195128 + /// + public class FusionManager + { + private Signature signature; + private HttpManager httpManager; + + /// + /// 初始化FusionManager + /// + /// 账户访问控制(密钥) + public FusionManager(Mac mac) + { + signature = new Signature(mac); + httpManager = new HttpManager(); + } + + /// + /// 生成管理凭证(请求主体为空,body=null) + /// + /// 功能入口URL + /// 生成的管理凭证 + public string createManageToken(string url) + { + return createManageToken(url, null); + } + + /// + /// 管理凭证(请求包含body内容) + /// + /// 功能入口URL + /// 请求的主体内容 + /// 生成的管理凭证 + public string createManageToken(string url, byte[] body) + { + return string.Format("QBox {0}", signature.signRequest(url, body)); + } + + private string refreshEntry() + { + return string.Format("{0}/v2/tune/refresh", Config.FUSION_API_HOST); + } + + private string prefetchEntry() + { + return string.Format("{0}/v2/tune/prefetch", Config.FUSION_API_HOST); + } + + private string bandwidthEntry() + { + return string.Format("{0}/v2/tune/bandwidth", Config.FUSION_API_HOST); + } + + private string fluxEntry() + { + return string.Format("{0}/v2/tune/flux", Config.FUSION_API_HOST); + } + + private string loglistEntry() + { + return string.Format("{0}/v2/tune/log/list", Config.FUSION_API_HOST); + } + + /// + /// 缓存刷新,是指删除客户资源在 CDN 节点的缓存,以便更新新的资源。 + /// 具体做法是客户提交资源 url 到 CDN,由 CDN 来操作刷新。 + /// 另请参阅 http://developer.qiniu.com/article/fusion/api/refresh.html + /// + /// “缓存刷新”请求,详情请参见该类型的说明 + /// 缓存刷新的结果 + public RefreshResult refresh(RefreshRequest request) + { + RefreshResult result = new RefreshResult(); + + try + { + string url = refreshEntry(); + string body = request.ToJsonStr(); + string token = createManageToken(url); + + HttpResult hr = httpManager.postJson(url, body, token); + result.shadow(hr); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Refresh] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 缓存刷新 + /// + /// 要刷新的URL列表 + /// 刷新的结果 + public RefreshResult refreshUrls(string[] urls) + { + RefreshRequest request = new RefreshRequest(urls, null); + return refresh(request); + } + + /// + /// 缓存刷新 + /// + /// 要刷新的URL目录列表 + /// + public RefreshResult refreshDirs(string[] dirs) + { + RefreshRequest request = new RefreshRequest(null,dirs); + return refresh(request); + } + + /// + /// 缓存刷新 + /// + /// 要刷新的URL列表 + /// 要刷新的URL目录列表 + /// 刷新的结果 + public RefreshResult refreshUrlsAndDirs(string[] urls,string[] dirs) + { + RefreshRequest request = new RefreshRequest(urls, dirs); + return refresh(request); + } + + /// + /// 文件预取,也可称为预加热或预缓存,是指客户新资源提前由 CDN 拉取到 CDN 缓存节点。 + /// 具体做法是客户提交资源 url 到 CDN,由 CDN 来操作预取。 + /// 另请参阅 http://developer.qiniu.com/article/fusion/api/prefetch.html + /// + /// “文件预取”请求,详情请参阅该类型的说明 + /// 文件预取操作的结果 + public PrefetchResult prefetch(PrefetchRequest request) + { + PrefetchResult result = new PrefetchResult(); + + try + { + string url = prefetchEntry(); + string body = request.ToJsonStr(); + string token = createManageToken(url); + + HttpResult hr = httpManager.postJson(url, body, token); + result.shadow(hr); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Prefetch] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 文件预取 + /// + /// 待预取的文件URL列表 + /// 文件预取结果 + public PrefetchResult prefetchUrls(string[] urls) + { + PrefetchRequest request = new PrefetchRequest(urls); + return prefetch(request); + } + + /// + /// 批量查询 cdn 带宽,另请参阅 + /// http://developer.qiniu.com/article/fusion/api/traffic-bandwidth.html#batch-bandwidth + /// + /// “带宽查询”请求,详情请参阅该类型的说明 + /// 带宽查询结果 + public BandwidthResult bandwidth(BandwidthRequest request) + { + BandwidthResult result = new BandwidthResult(); + + try + { + string url = bandwidthEntry(); + string body = request.ToJsonStr(); + string token = createManageToken(url); + + HttpResult hr = httpManager.postJson(url, body, token); + result.shadow(hr); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Bandwidth] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 批量查询 cdn 带宽 + /// + /// 域名列表 + /// 起始日期,如2017-01-01 + /// 结束日期,如2017-01-02 + /// 时间粒度,如day + /// 带宽数居 + public BandwidthResult getBandwidthData(string[] domains,string startDate,string endDate,string granularity) + { + BandwidthRequest request = new BandwidthRequest(startDate, endDate, granularity, StringHelper.join(domains, ";")); + return bandwidth(request); + } + + /// + /// 批量查询 cdn 流量,另请参阅 + /// http://developer.qiniu.com/article/fusion/api/traffic-bandwidth.html#batch-flux + /// + /// “流量查询”请求,详情请参阅该类型的说明 + /// 流量查询结果 + public FluxResult flux(FluxRequest request) + { + FluxResult result = new FluxResult(); + + try + { + string url = fluxEntry(); + string body = request.ToJsonStr(); + string token = createManageToken(url); + + HttpResult hr = httpManager.postJson(url, body, token); + result.shadow(hr); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Flux] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 批量查询 cdn 流量 + /// + /// 域名列表 + /// 起始日期,如2017-01-01 + /// 结束日期,如2017-01-02 + /// 时间粒度,如day + /// 流量数据 + public FluxResult getFluxData(string[] domains, string startDate, string endDate, string granularity) + { + FluxRequest request = new FluxRequest(startDate, endDate, granularity, StringHelper.join(domains, ";")); + return flux(request); + } + + /// + /// 日志下载(查询)接口可以查询域名日志列表,获取日志的下载外链,只提供 30 个自然日内的日志下载。 + /// 例如当前日期为 2016-08-31,则只提供 2016-08-01 ~ 2016-08-30 的日志。 + /// 另请参阅 http://developer.qiniu.com/article/fusion/api/log.html + /// + /// “日志查询”请求,详情请参阅该类型的说明 + /// 日志列表 + public LogListResult logList(LogListRequest request) + { + LogListResult result = new LogListResult(); + + try + { + string url = loglistEntry(); + string body = request.ToJsonStr(); + string token = createManageToken(url); + + HttpResult hr = httpManager.postJson(url, body, token); + result.shadow(hr); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[LogList] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 查询日志列表 + /// + /// 域名列表 + /// 指定日期,如2017-01-01 + /// 日志列表 + public LogListResult getLogList(string[] domains,string date) + { + LogListRequest request = new LogListRequest(date, StringHelper.join(domains, ";")); + return logList(request); + } + + /// + /// 时间戳防盗链 + /// 另请参阅https://support.qiniu.com/question/195128 + /// + /// “时间戳防盗链”请求,详情请参阅该类型的说明 + /// 已授权链接(包含过期时间戳) + public string hotLink(HotLinkRequest request) + { + string RAW = request.RawUrl; + + string key = request.Key; + string path = Uri.EscapeUriString(request.Path); + string file = request.File; + string ts = (int.Parse(request.Timestamp)).ToString("x"); + string SIGN = StringHelper.calcMD5(key + path + file + ts); + + return string.Format("{0}&sign={1}&t={2}", RAW, SIGN, ts); + } + + /// + /// 时间戳防盗链 + /// + /// 主机,如http://domain.com + /// 路径,如/dir1/dir2/ + /// 文件名,如1.jpg + /// 请求参数,如?v=1.1 + /// 后台提供的key + /// 链接有效时长 + /// 已授权链接(包含过期时间戳) + public string getAntileechUrl(string host, string path, string fileName, string query, string encryptKey, int expireInSeconds) + { + HotLinkRequest request = new HotLinkRequest(); + request.Host = host; + request.Path = path; + request.File = fileName; + request.Query = query; + request.Key = encryptKey; + request.SetLinkExpire(expireInSeconds); + + return hotLink(request); + } + + } +} diff --git a/src/Qiniu/CDN/Model/BandwidthInfo.cs b/src/Qiniu/CDN/Model/BandwidthInfo.cs new file mode 100644 index 00000000..cad9ec98 --- /dev/null +++ b/src/Qiniu/CDN/Model/BandwidthInfo.cs @@ -0,0 +1,77 @@ +using System.Collections.Generic; + +namespace Qiniu.CDN.Model +{ + /// + /// 带宽-消息内容结构 + /// 说明: + /// 1.返回的数据包含开始日期和结束日期 + /// 2.带宽的单位为 bps + /// 3.数据(data)只包含有流量的域名 + /// 以下是一个返回结果示例 + /// + /// 200 OK HTTP/1.1 + /// { + /// "code": 200, + /// "error": "", + /// "time": ["2016-07-01 00:00:00","2016-07-01 00:05:00", ...], + /// "data": { + /// "a.com": { + /// "china": [8888, 9999, 10000, ...], + /// "oversea": [3333, 4444, 5000, ...], + /// }, + /// "b.com": { + /// "china": [8888, 9999, 10000, ...], + /// "oversea": [3333, 4444, 5000, ...], + /// } + /// } + /// } + /// + /// 另请参阅 http://developer.qiniu.com/article/fusion/api/traffic-bandwidth.html#batch-bandwidth + /// + public class BandwidthInfo + { + /// + /// 代码 含义 说明 + /// 200 success 成功(OK) + /// 400032 invalid host 请求中存在无效的域名,请确保域名格式正确 + /// 400080 invalid start time 开始时间格式错误 + /// 400081 invalid end time 截止时间格式错误 + /// 400082 invalid time range 时间范围错误,请确保开始时间早于结束时间,且时间范围不超过 30 天 + /// 500000 internal error 服务端内部错误,请联系技术支持 + /// + public int Code { get; set; } + + /// + /// 错误消息(状态码非OK时) + /// + public string Error { get; set; } + + /// + /// 时间点列表 + /// + public List Time { get; set; } + + /// + /// 带宽数居(与时间点列表对应) + /// 数据内容请参见该类型说明 + /// + public Dictionary Data { get; set; } + } + + /// + /// 带宽-数据内容 + /// + public class BandWidthData + { + /// + /// 国内带宽数据 + /// + public List China { get; set; } + + /// + /// 海外带宽数据 + /// + public List Oversea { get; set; } + } +} diff --git a/Qiniu/Fusion/Model/BandwidthRequest.cs b/src/Qiniu/CDN/Model/BandwidthRequest.cs similarity index 52% rename from Qiniu/Fusion/Model/BandwidthRequest.cs rename to src/Qiniu/CDN/Model/BandwidthRequest.cs index 8a5102f0..38b28069 100644 --- a/Qiniu/Fusion/Model/BandwidthRequest.cs +++ b/src/Qiniu/CDN/Model/BandwidthRequest.cs @@ -1,17 +1,35 @@ using System.Text; -namespace Qiniu.Fusion.Model +namespace Qiniu.CDN.Model { + /// + /// 查询带宽-请求 + /// public class BandwidthRequest { + /// + /// 起始日期,例如2016-09-01 + /// public string StartDate { get; set; } + /// + /// 结束日期,例如2016-09-10 + /// public string EndDate { get; set; } + /// + /// 时间粒度(取值:5min / hour /day) + /// public string Granularity { get; set; } + /// + /// 域名列表,以西文半角分号分割 + /// public string Domains { get; set; } + /// + /// 初始化(所有成员为空,需要后续赋值) + /// public BandwidthRequest() { StartDate = ""; @@ -20,6 +38,13 @@ public BandwidthRequest() Domains = ""; } + /// + /// 初始化所有成员 + /// + /// 起始日期 + /// 结束日期 + /// 时间粒度 + /// 域名列表 public BandwidthRequest(string startDate,string endDate,string granularity,string domains) { StartDate = startDate; @@ -28,6 +53,10 @@ public BandwidthRequest(string startDate,string endDate,string granularity,strin Domains = domains; } + /// + /// 转换到JSON字符串 + /// + /// 请求内容的JSON字符串 public string ToJsonStr() { StringBuilder sb = new StringBuilder(); diff --git a/src/Qiniu/CDN/Model/BandwidthResult.cs b/src/Qiniu/CDN/Model/BandwidthResult.cs new file mode 100644 index 00000000..6abf8c83 --- /dev/null +++ b/src/Qiniu/CDN/Model/BandwidthResult.cs @@ -0,0 +1,98 @@ +using System.Text; +using Newtonsoft.Json; +using Qiniu.Http; + +namespace Qiniu.CDN.Model +{ + /// + /// 查询带宽-结果 + /// + public class BandwidthResult : HttpResult + { + /// + /// 获取带宽信息 + /// + public BandwidthInfo Result + { + get + { + BandwidthInfo info = null; + if ((Code == HttpHelper.STATUS_CODE_OK) && (!string.IsNullOrEmpty(Text))) + { + info = JsonConvert.DeserializeObject(Text); + } + return info; + } + } + + /// + /// 转换为易读字符串格式 + /// + /// 便于打印和阅读的字符串 + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + + sb.AppendFormat("code:{0}\n", Code); + + sb.AppendLine(); + + if (Result != null) + { + sb.AppendLine("result:"); + sb.AppendFormat("code:{0}\n", Result.Code); + if (!string.IsNullOrEmpty(Result.Error)) + { + sb.AppendFormat("error:{0}\n", Result.Error); + } + if (Result.Time != null) + { + sb.Append("time:"); + foreach (var t in Result.Time) + { + sb.Append(t + " "); + } + sb.AppendLine(); + } + + if (Result.Data != null && Result.Data.Count > 0) + { + sb.Append("bandwidth:"); + foreach (var kvp in Result.Data) + { + sb.AppendFormat("{0}:\nChina: {1}, Oversea={2}\n", kvp.Key, kvp.Value.China, kvp.Value.Oversea); + } + sb.AppendLine(); + } + } + else + { + if (!string.IsNullOrEmpty(Text)) + { + sb.AppendLine("text:"); + sb.AppendLine(Text); + } + } + sb.AppendLine(); + + sb.AppendFormat("ref-code:{0}\n", RefCode); + + if (!string.IsNullOrEmpty(RefText)) + { + sb.AppendLine("ref-text:"); + sb.AppendLine(RefText); + } + + if (RefInfo != null) + { + sb.AppendFormat("ref-info:\n"); + foreach (var d in RefInfo) + { + sb.AppendLine(string.Format("{0}:{1}", d.Key, d.Value)); + } + } + + return sb.ToString(); + } + } +} diff --git a/src/Qiniu/CDN/Model/FluxInfo.cs b/src/Qiniu/CDN/Model/FluxInfo.cs new file mode 100644 index 00000000..449e982f --- /dev/null +++ b/src/Qiniu/CDN/Model/FluxInfo.cs @@ -0,0 +1,77 @@ +using System.Collections.Generic; + +namespace Qiniu.CDN.Model +{ + /// + /// 流量-消息内容结构 + /// 说明: + /// 1.返回的数据包含开始日期和结束日期 + /// 2.带宽的单位为 byte + /// 3.数据(data)只包含有流量的域名 + /// + /// 以下是一个返回结果示例 + /// + /// { + /// "code": 200, + /// "error": "", + /// "time": ["2016-07-01 00:00:00","2016-07-01 00:05:00", ...], + /// "data": { + /// "a.com": { + /// "china": [8888, 9999, 10000, ...], + /// "oversea": [3333, 4444, 5000, ...], + /// }, + /// "b.com": { + /// "china": [8888, 9999, 10000, ...], + /// "oversea": [3333, 4444, 5000, ...], + /// } + /// } + /// } + /// + /// 另请参阅 http://developer.qiniu.com/article/fusion/api/traffic-bandwidth.html#batch-flux + /// + public class FluxInfo + { + /// + /// 代码 含义 说明 + /// 200 success 成功(OK) + /// 400032 invalid host 请求中存在无效的域名,请确保域名格式正确 + /// 400080 invalid start time 开始时间格式错误 + /// 400081 invalid end time 截止时间格式错误 + /// 400082 invalid time range 时间范围错误,请确保开始时间早于结束时间,且时间范围不超过 30 天 + /// 500000 internal error 服务端内部错误,请联系技术支持 + /// + public int Code { get; set; } + + /// + /// 错误消息(状态码非OK时) + /// + public string Error { get; set; } + + /// + /// 时间点列表 + /// + public List Time { get; set; } + + /// + /// 流量数居(与时间点列表对应) + /// + public Dictionary Data { get; set; } + + /// + /// 流量-数据内容 + /// + public class FluxData + { + /// + /// 国内流量数据 + /// + public List China { get; set; } + + /// + /// 海外流量数据 + /// + public List Oversea { get; set; } + } + + } +} diff --git a/Qiniu/Fusion/Model/FluxRequest.cs b/src/Qiniu/CDN/Model/FluxRequest.cs similarity index 52% rename from Qiniu/Fusion/Model/FluxRequest.cs rename to src/Qiniu/CDN/Model/FluxRequest.cs index 0a0dd8f9..2cc43053 100644 --- a/Qiniu/Fusion/Model/FluxRequest.cs +++ b/src/Qiniu/CDN/Model/FluxRequest.cs @@ -1,17 +1,35 @@ using System.Text; -namespace Qiniu.Fusion.Model +namespace Qiniu.CDN.Model { + /// + /// 查询流量-请求 + /// public class FluxRequest { + /// + /// 起始日期,例如2016-09-01 + /// public string StartDate { get; set; } + /// + /// 结束日期,例如2016-09-10 + /// public string EndDate { get; set; } + /// + /// 时间粒度((取值:5min / hour /day)) + /// public string Granularity { get; set; } + /// + /// 域名列表,以西文半角分号分割 + /// public string Domains { get; set; } + /// + /// 初始化(所有成员为空,需要后续赋值) + /// public FluxRequest() { StartDate = ""; @@ -20,6 +38,13 @@ public FluxRequest() Domains = ""; } + /// + /// 初始化所有成员 + /// + /// 起始日期 + /// 结束日期 + /// 时间粒度 + /// 域名列表 public FluxRequest(string startDate, string endDate, string granularity, string domains) { StartDate = startDate; @@ -28,6 +53,10 @@ public FluxRequest(string startDate, string endDate, string granularity, string Domains = domains; } + /// + /// 转换到JSON字符串 + /// + /// 请求内容的JSON字符串 public string ToJsonStr() { StringBuilder sb = new StringBuilder(); diff --git a/src/Qiniu/CDN/Model/FluxResult.cs b/src/Qiniu/CDN/Model/FluxResult.cs new file mode 100644 index 00000000..505b7809 --- /dev/null +++ b/src/Qiniu/CDN/Model/FluxResult.cs @@ -0,0 +1,97 @@ +using System.Text; +using Newtonsoft.Json; +using Qiniu.Http; + +namespace Qiniu.CDN.Model +{ + /// + /// 查询流量-结果 + /// + public class FluxResult : HttpResult + { + /// + /// 获取流量信息 + /// + public FluxInfo Result + { + get + { + FluxInfo info = null; + if ((Code == HttpHelper.STATUS_CODE_OK) && (!string.IsNullOrEmpty(Text))) + { + info = JsonConvert.DeserializeObject(Text); + } + return info; + } + } + + /// + /// 转换为易读字符串格式 + /// + /// 便于打印和阅读的字符串 + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + + sb.AppendFormat("code:{0}\n", Code); + sb.AppendLine(); + + if (Result != null) + { + sb.AppendLine("result:"); + sb.AppendFormat("code:{0}\n", Result.Code); + if (!string.IsNullOrEmpty(Result.Error)) + { + sb.AppendFormat("error:{0}\n", Result.Error); + } + if (Result.Time != null) + { + sb.Append("time:"); + foreach (var t in Result.Time) + { + sb.Append(t + " "); + } + sb.AppendLine(); + } + + if (Result.Data != null && Result.Data.Count > 0) + { + sb.Append("flux:"); + foreach (var kvp in Result.Data) + { + sb.AppendFormat("{0}:\nChina: {1}, Oversea={2}\n", kvp.Key, kvp.Value.China, kvp.Value.Oversea); + } + sb.AppendLine(); + } + } + else + { + if (!string.IsNullOrEmpty(Text)) + { + sb.AppendLine("text:"); + sb.AppendLine(Text); + } + } + sb.AppendLine(); + + sb.AppendFormat("ref-code:{0}\n", RefCode); + + if (!string.IsNullOrEmpty(RefText)) + { + sb.AppendLine("ref-text:"); + sb.AppendLine(RefText); + } + + if (RefInfo != null) + { + sb.AppendFormat("ref-info:\n"); + foreach (var d in RefInfo) + { + sb.AppendLine(string.Format("{0}:{1}", d.Key, d.Value)); + } + } + + return sb.ToString(); + } + } +} diff --git a/src/Qiniu/CDN/Model/HotLinkRequest.cs b/src/Qiniu/CDN/Model/HotLinkRequest.cs new file mode 100644 index 00000000..f7462d8e --- /dev/null +++ b/src/Qiniu/CDN/Model/HotLinkRequest.cs @@ -0,0 +1,110 @@ +using System; +using Qiniu.Http; + +namespace Qiniu.CDN.Model +{ + /// + /// 时间戳防盗链 - 请求 + /// + public class HotLinkRequest + { + /// + /// 原始链接,host+path+file+query + /// + public string RawUrl + { + get + { + return Host + Path + File + Query; + } + } + + /// + /// URL的Host部分,例如http://cxxx.dyyy.com + /// + public string Host { get; set; } + + /// + /// URL的目录部分,例如/DIR1/dir2/ + /// + public string Path { get; set; } + + /// + /// URL中的文件名,例如vodfile.mp4 + /// + public string File { get; set; } + + /// + /// URL中的参数部分,例如?v1.1 + /// + public string Query { get; set; } + + /// + /// QINIU提供的key + /// + public string Key { get; set; } + + /// + /// 链接失效时刻(时间戳) + /// + public string Timestamp { get; set; } + + /// + /// 初始化(全部为空,需要后续赋值) + /// + public HotLinkRequest() + { + Host = ""; + Path = ""; + File = ""; + Query = ""; + Key = ""; + Timestamp = ""; + } + + /// + /// 初始化,提供原始URL,key,有效时长expire(当前时刻起多少秒以后失效) + /// + /// 原始URL + /// QINIU提供的key + /// 有效时长(秒) + public HotLinkRequest(string url, string key, int expire) + { + string host, path, file, query; + UrlHelper.urlSplit(url, out host, out path, out file, out query); + + Host = host; + Path = path; + File = file; + Query = query; + Key = key; + + SetLinkExpire(expire); + } + + /// + /// 设置失效时间戳,当前时刻起多少秒以后失效 + /// + /// 单位:秒 + public void SetLinkExpire(int seconds) + { + DateTime dt0 = (new DateTime(1910, 1, 1)).ToLocalTime(); + DateTime dt1 = DateTime.Now.AddSeconds(seconds); + TimeSpan tsx = dt1.Subtract(dt0); + string sts = tsx.Ticks.ToString(); + Timestamp = sts.Substring(0, sts.Length - 7); + } + + /// + /// 设置失效时间戳 + /// + /// 失效时刻 + public void SetLinkExpire(DateTime stopAt) + { + DateTime dt0 = (new DateTime(1910, 1, 1)).ToLocalTime(); + TimeSpan tsx = stopAt.Subtract(dt0); + string sts = tsx.Ticks.ToString(); + Timestamp = sts.Substring(0, sts.Length - 7); + } + } +} diff --git a/src/Qiniu/CDN/Model/LogListInfo.cs b/src/Qiniu/CDN/Model/LogListInfo.cs new file mode 100644 index 00000000..b3d4f8b7 --- /dev/null +++ b/src/Qiniu/CDN/Model/LogListInfo.cs @@ -0,0 +1,80 @@ +using System.Collections.Generic; + +namespace Qiniu.CDN.Model +{ + /// + /// 日志-消息内容结构 + /// + /// 以下是一个返回结果示例 + /// + /// { + /// "data": { + /// "log-test1.SOME_TEST.com": [ + /// { + /// "name":"log-test1.SOME_TEST.com_2016-07-01-00_00.gz", + /// "size": 88490306, + /// "mtime": 1466274440, + /// "url": "http://FUSION_LOG_DOWNLOAD_URL1" + /// } + /// ], + /// "log-test2.SOME_TEST.com": [ + /// { + /// "name":"log-test2.SOME_TEST.com_2016-07-01-00_00.gz", + /// "size": 73280873, + /// "mtime": 1466273259, + /// "url": "http://FUSION_LOG_DOWNLOAD_URL2" + /// } + /// ] + /// } + /// } + /// + /// /// + public class LogListInfo + { + /// + /// 代码 含义 说明 + /// 200 success 成功(OK) + /// 400 invalid params 请求参数格式错误 + /// 401 bad token 认证授权失败(包括密钥信息不正确;数字签名错误;授权已超时) + /// 400032 invalid host 请求中存在无效的域名,请确保域名格式正确 + /// 500000 internal error 服务器内部错误 + /// + public int Code { get; set; } + + /// + /// 错误消息(状态码非OK时) + /// + public string Error { get; set; } + + /// + /// 日志信息(与域名列表对应) + /// + public Dictionary> Data { get; set; } + } + + /// + /// 日志信息内容 + /// + public class LogData + { + /// + /// 文件名 + /// + public string Name { get; set; } + + /// + /// 文件大小,单位为 Byte + /// + public long Size { get; set; } + + /// + /// 文件修改时间,Unix 时间戳 + /// + public long Mtime { get; set; } + + /// + /// 日志下载链接 + /// + public string Url { get; set; } + } +} diff --git a/Qiniu/Fusion/Model/LogListRequest.cs b/src/Qiniu/CDN/Model/LogListRequest.cs similarity index 50% rename from Qiniu/Fusion/Model/LogListRequest.cs rename to src/Qiniu/CDN/Model/LogListRequest.cs index 8bd76f90..07b545ba 100644 --- a/Qiniu/Fusion/Model/LogListRequest.cs +++ b/src/Qiniu/CDN/Model/LogListRequest.cs @@ -1,25 +1,46 @@ using System.Text; -namespace Qiniu.Fusion.Model +namespace Qiniu.CDN.Model { + /// + /// 查询日志-请求 + /// public class LogListRequest { + /// + /// 日期,例如 2016-09-01 + /// public string Day { get; set; } + /// + /// 域名列表,以西文半角分号分割 + /// public string Domains { get; set; } + /// + /// 初始化(所有成员为空,需要后续赋值) + /// public LogListRequest() { Day = ""; Domains = ""; } + /// + /// 初始化所有成员 + /// + /// 日期 + /// 域名列表 public LogListRequest(string day,string domains) { Day = day; Domains = domains; } + /// + /// 转换到JSON字符串 + /// + /// 请求内容的JSON字符串 public string ToJsonStr() { StringBuilder sb = new StringBuilder(); diff --git a/src/Qiniu/CDN/Model/LogListResult.cs b/src/Qiniu/CDN/Model/LogListResult.cs new file mode 100644 index 00000000..f29a399d --- /dev/null +++ b/src/Qiniu/CDN/Model/LogListResult.cs @@ -0,0 +1,102 @@ +using System.Text; +using Newtonsoft.Json; +using Qiniu.Http; + +namespace Qiniu.CDN.Model +{ + /// + /// 查询日志-结果 + /// + public class LogListResult : HttpResult + { + /// + /// 获取日志列表信息 + /// + public LogListInfo Result + { + get + { + LogListInfo info = null; + if ((Code == HttpHelper.STATUS_CODE_OK) && (!string.IsNullOrEmpty(Text))) + { + info = JsonConvert.DeserializeObject(Text); + } + return info; + } + } + + /// + /// 转换为易读字符串格式 + /// + /// 便于打印和阅读的字符串 + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + + sb.AppendFormat("code:{0}\n", Code); + sb.AppendLine(); + + if (Result != null) + { + sb.AppendLine("result:"); + sb.AppendFormat("code:{0}\n", Result.Code); + if (!string.IsNullOrEmpty(Result.Error)) + { + sb.AppendFormat("error:{0}\n", Result.Error); + } + if (Result.Data != null && Result.Data.Count > 0) + { + sb.AppendLine("log:"); + foreach (var key in Result.Data.Keys) + { + sb.AppendFormat("{0}:\n", key); + foreach (var d in Result.Data) + { + if (d.Value != null) + { + sb.AppendFormat("Domain:{0}\n", d.Key); + foreach (var s in d.Value) + { + if (s != null) + { + sb.AppendFormat("Name:{0}\nSize:{1}\nMtime:{2}\nUrl:{3}\n\n", s.Name, s.Size, s.Mtime, s.Url); + } + } + } + } + sb.AppendLine(); + } + } + } + else + { + if (!string.IsNullOrEmpty(Text)) + { + sb.AppendLine("text:"); + sb.AppendLine(Text); + } + } + sb.AppendLine(); + + sb.AppendFormat("ref-code:{0}\n", RefCode); + + if (!string.IsNullOrEmpty(RefText)) + { + sb.AppendLine("ref-text:"); + sb.AppendLine(RefText); + } + + if (RefInfo != null) + { + sb.AppendFormat("ref-info:\n"); + foreach (var d in RefInfo) + { + sb.AppendLine(string.Format("{0}:{1}", d.Key, d.Value)); + } + } + + return sb.ToString(); + } + } +} + diff --git a/src/Qiniu/CDN/Model/PrefetchInfo.cs b/src/Qiniu/CDN/Model/PrefetchInfo.cs new file mode 100644 index 00000000..df4eef93 --- /dev/null +++ b/src/Qiniu/CDN/Model/PrefetchInfo.cs @@ -0,0 +1,62 @@ +using System.Collections.Generic; + +namespace Qiniu.CDN.Model +{ + /// + /// 文件预取-消息内容结构 + /// + /// 在请求成功时 code 为 200,requestId、quotaDay、surplusDay 才会有有效值,否则为空。 + /// 在请求失败时 code 为非 200,error 中包含描述信息。 + /// + /// 以下是一个返回结果示例 + /// + /// { + /// "code":200, + /// "error":"success", + /// "requestId":"577471ace3ab3a030c058972", + /// "invalidUrls":null, + /// "quotaDay":100, + /// "surplusDay":99 + /// } + /// + /// + public class PrefetchInfo + { + /// + /// 代码 含义 说明 + /// /// 200 success 成功(OK) + /// 400031 invalid url 请求中存在无效的 url,请确保提交的 url 格式正确 + /// 400032 invalid host 请求中存在无效的域名,请确保域名格式正确 + /// 400033 prefetch url limit error 请求次数超出当日预取限额 + /// 400036 invalid request id 无效的请求 id + /// 400037 url has existed url 正在预取中 + /// 500000 internal error 服务端内部错误,请联系技术支持 + /// + public int Code { get; set; } + + /// + /// 错误消息(状态码非OK时) + /// + public string Error { get; set; } + + /// + /// 请求ID(可用于反馈排查) + /// + public string RequestId { get; set; } + + /// + /// 非法URL + /// + public List InvalidUrls { get; set; } + + /// + /// 当日限额 + /// + public int QuotaDay { get; set; } + + /// + /// 当日剩余额度 + /// + public int SurplusaDay { get; set; } + } +} diff --git a/src/Qiniu/CDN/Model/PrefetchRequest.cs b/src/Qiniu/CDN/Model/PrefetchRequest.cs new file mode 100644 index 00000000..3b9c0e03 --- /dev/null +++ b/src/Qiniu/CDN/Model/PrefetchRequest.cs @@ -0,0 +1,72 @@ +using System.Collections.Generic; +using System.Text; + +namespace Qiniu.CDN.Model +{ + /// + /// 文件预取-请求 + /// + public class PrefetchRequest + { + /// + /// 要预取的单个url列表,总数不超过100条 + /// 单个url,即一个具体的url,例如:http://bar.foo.com/test.zip + /// 注意: + /// 请输入资源 url 完整的绝对路径,由 http:// 或 https:// 开始 + /// 资源 url 不支持通配符,例如:不支持 http://www.test.com/abc/*.* + /// + public List Urls { get; set; } + + /// + /// 初始化(URL列表为空,需要后续赋值) + /// + public PrefetchRequest() + { + Urls = new List(); + } + + /// + /// 初始化(URL列表) + /// + /// URL列表 + public PrefetchRequest(IEnumerable urls) + { + Urls = new List(urls); + } + + /// + /// 添加要查询的URL + /// + /// URL列表 + public void AddUrls(IEnumerable urls) + { + Urls.AddRange(urls); + } + + /// + /// 转换到JSON字符串 + /// + /// 请求内容的JSON字符串 + public string ToJsonStr() + { + StringBuilder sb = new StringBuilder(); + sb.Append("{ "); + + sb.Append("\"urls\":["); + for (int i = 0; i < Urls.Count; ++i) + { + if (i < Urls.Count - 1) + { + sb.Append(string.Format("\"{0}\",", Urls[i])); + } + else + { + sb.Append(string.Format("\"{0}\"", Urls[i])); + } + } + sb.Append("] }"); + + return sb.ToString(); + } + } +} diff --git a/src/Qiniu/CDN/Model/PrefetchResult.cs b/src/Qiniu/CDN/Model/PrefetchResult.cs new file mode 100644 index 00000000..da7c288a --- /dev/null +++ b/src/Qiniu/CDN/Model/PrefetchResult.cs @@ -0,0 +1,94 @@ +using System.Text; +using Newtonsoft.Json; +using Qiniu.Http; + +namespace Qiniu.CDN.Model +{ + /// + /// 文件预取-结果 + /// + public class PrefetchResult : HttpResult + { + /// + /// 获取文件预取信息 + /// + public PrefetchInfo Result + { + get + { + PrefetchInfo info = null; + if ((Code == HttpHelper.STATUS_CODE_OK) && (!string.IsNullOrEmpty(Text))) + { + info = JsonConvert.DeserializeObject(Text); + } + return info; + } + } + + /// + /// 转换为易读字符串格式 + /// + /// 便于打印和阅读的字符串 + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + + sb.AppendFormat("code:{0}\n", Code); + sb.AppendLine(); + + if (Result != null) + { + sb.AppendLine("result:"); + sb.AppendFormat("code:{0}\n", Result.Code); + if (!string.IsNullOrEmpty(Result.Error)) + { + sb.AppendFormat("error:{0}\n", Result.Error); + } + if (!string.IsNullOrEmpty(Result.RequestId)) + { + sb.AppendFormat("requestId:{0}\n", Result.RequestId); + } + if (Result.InvalidUrls != null && Result.InvalidUrls.Count > 0) + { + sb.Append("invalidUrls:"); + foreach (var s in Result.InvalidUrls) + { + sb.Append(s + " "); + } + } + sb.AppendLine(); + sb.AppendFormat("quotaDay:{0}\n", Result.QuotaDay); + sb.AppendFormat("surplusaDay:{0}\n", Result.SurplusaDay); + } + else + { + if (!string.IsNullOrEmpty(Text)) + { + sb.AppendLine("text:"); + sb.AppendLine(Text); + } + } + sb.AppendLine(); + + sb.AppendFormat("ref-code:{0}\n", RefCode); + + if (!string.IsNullOrEmpty(RefText)) + { + sb.AppendLine("ref-text:"); + sb.AppendLine(RefText); + } + + if (RefInfo != null) + { + sb.AppendFormat("ref-info:\n"); + foreach (var d in RefInfo) + { + sb.AppendLine(string.Format("{0}:{1}", d.Key, d.Value)); + } + } + + return sb.ToString(); + } + } +} + diff --git a/src/Qiniu/CDN/Model/RefreshInfo.cs b/src/Qiniu/CDN/Model/RefreshInfo.cs new file mode 100644 index 00000000..e8676de9 --- /dev/null +++ b/src/Qiniu/CDN/Model/RefreshInfo.cs @@ -0,0 +1,80 @@ +using System.Collections.Generic; + +namespace Qiniu.CDN.Model +{ + /// + /// 缓存刷新-消息内容结构 + /// + /// 在请求成功时 code 为 200,requestId、urlQuotaDay、urlSurplusDay、dirQuotaDay、dirSurplusDay才会有有效值,否则为空。 + /// 在请求失败时 code 为非 200,error 中包含描述信息。 + /// + /// 以下是一个返回结果示例 + /// + /// { + /// "code":200, + /// "error":"success", + /// "requestId":"575d1930f9537d3f2600003d", + /// "invalidUrls":null, + /// "invalidDirs":null, + /// "urlQuotaDay":100, + /// "urlSurplusDay":99, + /// "dirQuotaDay":10, + /// "dirSurplusDay":10 + /// } + /// + /// + public class RefreshInfo + { + /// + /// 代码 含义 说明 + /// 200 success 成功(OK) + /// 400031 invalid url 请求中存在无效的 url,请确保 url 格式正确 + /// 400032 invalid host 请求中存在无效的域名,请确保域名格式正确 + /// 400034 refresh url limit error 请求次数超出当日刷新限额 + /// 400036 invalid request id 无效的请求 id + /// 400037 url has existed url 正在刷新中 + /// 500000 internal error 服务端内部错误,请联系技术支持 + /// + public int Code { get; set; } + + /// + /// 错误消息(状态码非OK时) + /// + public string Error { get; set; } + + /// + /// 请求ID(可用于反馈排查) + /// + public string RequestId { get; set; } + + /// + /// 非法URL + /// + public List InvalidUrls { get; set; } + + /// + /// 非法URL目录 + /// + public List InvalidDirs { get; set; } + + /// + /// 当日URL刷新限额 + /// + public int UrlQuotaDay { get; set; } + + /// + /// 当日剩余URL刷新额度 + /// + public int UrlSurplusaDay { get; set; } + + /// + /// 当日URL目录刷新限额 + /// + public int DirQuotaDay { get; set; } + + /// + /// 当日剩余URL目录刷新额度 + /// + public int DirSurplusaDay { get; set; } + } +} diff --git a/Qiniu/Fusion/Model/RefreshRequest.cs b/src/Qiniu/CDN/Model/RefreshRequest.cs similarity index 50% rename from Qiniu/Fusion/Model/RefreshRequest.cs rename to src/Qiniu/CDN/Model/RefreshRequest.cs index ff3d5abc..cf6c1414 100644 --- a/Qiniu/Fusion/Model/RefreshRequest.cs +++ b/src/Qiniu/CDN/Model/RefreshRequest.cs @@ -1,36 +1,73 @@ using System.Collections.Generic; using System.Text; -namespace Qiniu.Fusion.Model +namespace Qiniu.CDN.Model { + /// + /// 缓存刷新-请求 + /// public class RefreshRequest { + /// + /// 要预取的单个url列表,总数不超过100条 + /// 单个url,即一个具体的url,例如:http://bar.foo.com/test.zip + /// 注意: + /// 请输入资源 url 完整的绝对路径,由 http:// 或 https:// 开始 + /// 资源 url 不支持通配符,例如:不支持 http://www.test.com/abc/*.* + /// 带参数的 url 刷新,根据其域名缓存配置是否忽略参数缓存决定刷新结果。 + /// 如果配置了时间戳防盗链的资源 url 提交时刷新需要去掉 e 和 token 参数 + /// public List Urls { get; set; } + /// + /// 要刷新的目录url列表,总数不超过10条;目录dir,即表示一个目录级的url,需要以 / 结尾 + /// 例如:http://bar.foo.com/dir/, + /// 也支持在尾部使用通配符,例如:http://bar.foo.com/dir/* + /// public List Dirs { get; set; } + /// + /// 初始化(所有成员为空,需要后续赋值) + /// public RefreshRequest() { Urls = new List(); Dirs = new List(); } + /// + /// 初始化URL列表 + /// + /// URL列表 + /// URL目录列表 public RefreshRequest(IEnumerable urls,IEnumerable dirs) { Urls = new List(urls); Dirs = new List(dirs); } + /// + /// 添加URL列表 + /// + /// URL列表 public void AddUrls(IEnumerable urls) { Urls.AddRange(urls); } + /// + /// 添加URL目录列表 + /// + /// URL目录列表 public void AddDirs(IEnumerable dirs) { Dirs.AddRange(dirs); } + /// + /// 转换到JSON字符串 + /// + /// 请求内容的JSON字符串 public string ToJsonStr() { StringBuilder sb = new StringBuilder(); diff --git a/src/Qiniu/CDN/Model/RefreshResult.cs b/src/Qiniu/CDN/Model/RefreshResult.cs new file mode 100644 index 00000000..4243c9d8 --- /dev/null +++ b/src/Qiniu/CDN/Model/RefreshResult.cs @@ -0,0 +1,104 @@ +using System.Text; +using Newtonsoft.Json; +using Qiniu.Http; + +namespace Qiniu.CDN.Model +{ + /// + /// 缓存刷新-结果 + /// + public class RefreshResult : HttpResult + { + /// + /// 获取缓存刷新信息 + /// + public RefreshInfo Result + { + get + { + RefreshInfo info = null; + if ((Code == HttpHelper.STATUS_CODE_OK) && (!string.IsNullOrEmpty(Text))) + { + info = JsonConvert.DeserializeObject(Text); + } + return info; + } + } + + /// + /// 转换为易读字符串格式 + /// + /// 便于打印和阅读的字符串 + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + + sb.AppendFormat("code:{0}\n", Code); + sb.AppendLine(); + + if (Result != null) + { + sb.AppendLine("result:"); + sb.AppendFormat("code:{0}\n", Result.Code); + if (!string.IsNullOrEmpty(Result.Error)) + { + sb.AppendFormat("error:{0}\n", Result.Error); + } + if (!string.IsNullOrEmpty(Result.RequestId)) + { + sb.AppendFormat("requestId:{0}\n", Result.RequestId); + } + if (Result.InvalidDirs != null && Result.InvalidDirs.Count > 0) + { + sb.Append("invalidDirs:"); + foreach (var s in Result.InvalidDirs) + { + sb.Append(s + " "); + } + sb.AppendLine(); + } + if (Result.InvalidUrls != null && Result.InvalidUrls.Count > 0) + { + sb.Append("invalidUrls:"); + foreach (var s in Result.InvalidUrls) + { + sb.Append(s + " "); + } + sb.AppendLine(); + } + sb.AppendFormat("dirQuotaDay:{0}\n", Result.DirQuotaDay); + sb.AppendFormat("dirSurplusaDay:{0}\n", Result.DirSurplusaDay); + sb.AppendFormat("urlQuotaDay:{0}\n", Result.UrlQuotaDay); + sb.AppendFormat("urlSurplusaDay:{0}\n", Result.UrlSurplusaDay); + } + else + { + if (!string.IsNullOrEmpty(Text)) + { + sb.AppendLine("text:"); + sb.AppendLine(Text); + } + } + sb.AppendLine(); + + sb.AppendFormat("ref-code:{0}\n", RefCode); + + if (!string.IsNullOrEmpty(RefText)) + { + sb.AppendLine("ref-text:"); + sb.AppendLine(RefText); + } + + if (RefInfo != null) + { + sb.AppendFormat("ref-info:\n"); + foreach (var d in RefInfo) + { + sb.AppendLine(string.Format("{0}:{1}", d.Key, d.Value)); + } + } + + return sb.ToString(); + } + } +} \ No newline at end of file diff --git a/src/Qiniu/Common/Config.cs b/src/Qiniu/Common/Config.cs new file mode 100644 index 00000000..ff1bda87 --- /dev/null +++ b/src/Qiniu/Common/Config.cs @@ -0,0 +1,49 @@ +namespace Qiniu.Common +{ + /// + /// 配置信息,主要包括Zone配置(另请参阅Zone模块) + /// 目前已支持的机房包括: + /// 华东(CN_East), 华北(CN_North), 华南(CN_South), 北美(US_North) + /// 默认设置为华东机房(CN_East) + /// + public class Config + { + /// + /// 空间所在的区域(Zone) + /// + public static Zone ZONE = Zone.getZone(ZoneID.Default); + + /// + /// Fusion API Host + /// + public const string FUSION_API_HOST = "http://fusion.qiniuapi.com"; + + /// + /// DFOP API Host + /// + public const string DFOP_API_HOST = "http://api.qiniu.com"; + + /// + /// 根据Zone配置对应参数(RS_HOST,API_HOST等) + /// + /// ZoneID + /// 是否使用HTTPS + public static void setZone(ZoneID zoneId, bool useHTTPS) + { + ZONE = Zone.getZone(zoneId, useHTTPS); + } + + /// + /// 自动配置Zone + /// + /// AccessKey + /// 空间名称 + /// 是否使用HTTPS + public static void autoZone(string accessKey,string bucket, bool useHTTPS) + { + ZoneID id = ZoneHelper.queryZone(accessKey, bucket); + setZone(id, useHTTPS); + } + } + +} diff --git a/src/Qiniu/Common/Mac.cs b/src/Qiniu/Common/Mac.cs new file mode 100644 index 00000000..1ab198c9 --- /dev/null +++ b/src/Qiniu/Common/Mac.cs @@ -0,0 +1,29 @@ +namespace Qiniu.Common +{ + /// + /// 账户访问控制(密钥) + /// + public class Mac + { + /// + /// 密钥-AccessKey + /// + public string AccessKey { set; get; } + + /// + /// 密钥-SecretKey + /// + public string SecretKey { set; get; } + + /// + /// 初始化密钥AK/SK + /// + /// AccessKey + /// SecretKey + public Mac(string accessKey, string secretKey) + { + this.AccessKey = accessKey; + this.SecretKey = secretKey; + } + } +} \ No newline at end of file diff --git a/src/Qiniu/Common/QiniuCSharpSDK.cs b/src/Qiniu/Common/QiniuCSharpSDK.cs new file mode 100644 index 00000000..33ab60b5 --- /dev/null +++ b/src/Qiniu/Common/QiniuCSharpSDK.cs @@ -0,0 +1,20 @@ +/// +/// Qiniu (Cloud) C# SDK for .NET Framework 2.0+ and for .NET Core +/// +public class QiniuCSharpSDK +{ + /// + /// SDK名称 + /// + public const string ALIAS = "QiniuCSharpSDK"; + + /// + /// SDK版本号 + /// + public const string VERSION = "7.2.2.0"; + + /// + /// SDK模块 + /// + public static string[] MODULES = { "IO", "RS", "RSF", "CDN", "Util", "Common", "Http" }; +} diff --git a/src/Qiniu/Common/Signature.cs b/src/Qiniu/Common/Signature.cs new file mode 100644 index 00000000..c23e31cf --- /dev/null +++ b/src/Qiniu/Common/Signature.cs @@ -0,0 +1,123 @@ +using System; +using System.IO; +using System.Security.Cryptography; +using System.Text; +using Qiniu.Util; + +namespace Qiniu.Common +{ + /// + /// 签名/加密 + /// 特别注意,不同平台使用的Cryptography可能略有不同,使用中如有遇到问题,请反馈 + /// 提交您的issue到 https://github.com/qiniu/csharp-sdk + /// + public class Signature + { + private Mac mac; + + /// + /// 初始化 + /// + /// 账户访问控制(密钥) + public Signature(Mac mac) + { + this.mac = mac; + } + + private string encodedSign(byte[] data) + { + HMACSHA1 hmac = new HMACSHA1(Encoding.UTF8.GetBytes(mac.SecretKey)); + byte[] digest = hmac.ComputeHash(data); + return StringHelper.urlSafeBase64Encode(digest); + } + + private string encodedSign(string str) + { + byte[] data = Encoding.UTF8.GetBytes(str); + return encodedSign(data); + } + + /// + /// 签名-字节数据 + /// + /// 待签名的数据 + /// + public string sign(byte[] data) + { + return string.Format("{0}:{1}", mac.AccessKey,encodedSign(data)); + } + + /// + /// 签名-字符串数据 + /// + /// 待签名的数据 + /// + public string sign(string str) + { + byte[] data = Encoding.UTF8.GetBytes(str); + return sign(data); + } + + /// + /// 附带数据的签名 + /// + /// 待签名的数据 + /// + public string signWithData(byte[] data) + { + string sstr = StringHelper.urlSafeBase64Encode(data); + return string.Format("{0}:{1}:{2}", mac.AccessKey, encodedSign(sstr), sstr); + } + + /// + /// 附带数据的签名 + /// + /// 待签名的数据 + /// 签名结果 + public string signWithData(string str) + { + byte[] data = Encoding.UTF8.GetBytes(str); + return signWithData(data); + } + + /// + /// HTTP请求签名 + /// + /// 请求目标的URL + /// 请求的主体数据 + /// + public string signRequest(string url, byte[] body) + { + Uri u = new Uri(url); + using (HMACSHA1 hmac = new HMACSHA1(Encoding.UTF8.GetBytes(mac.SecretKey))) + { + string pathAndQuery = u.PathAndQuery; + byte[] pathAndQueryBytes = Encoding.UTF8.GetBytes(pathAndQuery); + using (MemoryStream buffer = new MemoryStream()) + { + buffer.Write(pathAndQueryBytes, 0, pathAndQueryBytes.Length); + buffer.WriteByte((byte)'\n'); + if (body != null && body.Length > 0) + { + buffer.Write(body, 0, body.Length); + } + byte[] digest = hmac.ComputeHash(buffer.ToArray()); + string digestBase64 = StringHelper.urlSafeBase64Encode(digest); + return string.Format("{0}:{1}", mac.AccessKey, digestBase64); + } + } + } + + /// + /// HTTP请求签名 + /// + /// 请求目标的URL + /// 请求的主体数据 + /// + public string signRequest(string url, string body) + { + byte[] data = Encoding.UTF8.GetBytes(body); + return signRequest(url, data); + } + } +} diff --git a/src/Qiniu/Common/Zone.cs b/src/Qiniu/Common/Zone.cs new file mode 100644 index 00000000..4b00c51b --- /dev/null +++ b/src/Qiniu/Common/Zone.cs @@ -0,0 +1,228 @@ +namespace Qiniu.Common +{ + /// 多机房-自定义区域编号 + /// 华东(CN_East) + /// 华北(CN_North) + /// 华南(CN_South) + /// 北美(US_North) + public enum ZoneID + { + /// + /// 华东 + /// + CN_East, + + /// + /// 华北 + /// + CN_North, + + /// + /// 华南 + /// + CN_South, + + /// + /// 北美 + /// + US_North, + + /// + /// 默认-华东 + /// + Default = CN_East + }; + + /// + /// 目前已支持的区域:华东/华北/华南/北美 + /// + public class Zone + { + /// + /// 资源管理 + /// + public string RsHost { set; get; } + + /// + /// 源列表 + /// + public string RsfHost { set; get; } + + /// + /// 数据处理 + /// + public string ApiHost { set; get; } + + /// + /// 镜像刷新、资源抓取 + /// + public string IovipHost { set; get; } + + /// + /// 资源上传 + /// + public string UpHost { set; get; } + + /// + /// CDN加速 + /// + public string UploadHost { set; get; } + + /// + /// 根据ZoneID取得对应Zone设置 + /// + /// 区域编号 + /// 是否使用HTTPS + /// + public static Zone getZone(ZoneID zoneId, bool useHTTPS = false) + { + switch (zoneId) + { + case ZoneID.CN_East: + return Zone.ZONE_CN_East(useHTTPS); + case ZoneID.CN_North: + return Zone.ZONE_CN_North(useHTTPS); + case ZoneID.CN_South: + return Zone.ZONE_CN_South(useHTTPS); + case ZoneID.US_North: + return Zone.ZONE_US_North(useHTTPS); + default: + return ZONE_CN_East(useHTTPS); + } + } + + /// + /// 华东 + /// xx-(NULL) + /// + /// 是否使用HTTPS + public static Zone ZONE_CN_East(bool useHTTPS) + { + if (useHTTPS) + { + return new Zone() + { + RsHost = "https://rs.qbox.me", + RsfHost = "https://rsf.qbox.me", + ApiHost = "https://api.qiniu.com", + IovipHost = "https://iovip.qbox.me", + UpHost = "https://up.qbox.me", + UploadHost = "https://upload.qbox.me" + }; + } + else + { + return new Zone() + { + RsHost = "http://rs.qbox.me", + RsfHost = "http://rsf.qbox.me", + ApiHost = "http://api.qiniu.com", + IovipHost = "http://iovip.qbox.me", + UpHost = "http://up.qiniu.com", + UploadHost = "http://upload.qiniu.com" + }; + } + } + + /// + /// 华北 + /// xx-z1 + /// + /// 是否使用HTTPS + public static Zone ZONE_CN_North(bool useHTTPS) + { + if (useHTTPS) + { + return new Zone() + { + RsHost = "https://rs-z1.qbox.me", + RsfHost = "https://rsf-z1.qbox.me", + ApiHost = "https://api-z1.qiniu.com", + IovipHost = "https://iovip-z1.qbox.me", + UpHost = "https://up-z1.qbox.me", + UploadHost = "https://upload-z1.qbox.me" + }; + } + else + { + return new Zone() + { + RsHost = "http://rs-z1.qbox.me", + RsfHost = "http://rsf-z1.qbox.me", + ApiHost = "http://api-z1.qiniu.com", + IovipHost = "http://iovip-z1.qbox.me", + UpHost = "http://up-z1.qiniu.com", + UploadHost = "http://upload-z1.qiniu.com" + }; + } + } + + /// + /// 华南 + /// xx-z2 + /// + /// 是否使用HTTPS + public static Zone ZONE_CN_South(bool useHTTPS) + { + if (useHTTPS) + { + return new Zone() + { + RsHost = "https://rs-z2.qbox.me", + RsfHost = "https://rsf-z2.qbox.me", + ApiHost = "https://api-z2.qiniu.com", + IovipHost = "https://iovip-z2.qbox.me", + UpHost = "https://up-z2.qbox.me", + UploadHost = "https://upload-z2.qbox.me" + }; + } + else + { + return new Zone() + { + RsHost = "http://rs-z2.qbox.me", + RsfHost = "http://rsf-z2.qbox.me", + ApiHost = "http://api-z2.qiniu.com", + IovipHost = "http://iovip-z2.qbox.me", + UpHost = "http://up-z2.qiniu.com", + UploadHost = "http://upload-z2.qiniu.com" + }; + } + } + + /// + /// 北美 + /// xx-na0 + /// + /// 是否使用HTTPS + /// + public static Zone ZONE_US_North(bool useHTTPS) + { + if (useHTTPS) + { + return new Zone() + { + RsHost = "https://rs-na0.qbox.me", + RsfHost = "https://rsf-na0.qbox.me", + ApiHost = "https://api-na0.qiniu.com", + IovipHost = "https://iovip-na0.qbox.me", + UpHost = "https://up-na0.qbox.me", + UploadHost = "https://upload-na0.qbox.me" + }; + } + else + { + return new Zone() + { + RsHost = "http://rs-na0.qbox.me", + RsfHost = "http://rsf-na0.qbox.me", + ApiHost = "http://api-na0.qiniu.com", + IovipHost = "http://iovip-na0.qbox.me", + UpHost = "http://up-na0.qiniu.com", + UploadHost = "http://upload-na0.qiniu.com" + }; + } + } + + } +} diff --git a/Qiniu/Common/ZoneHelper.cs b/src/Qiniu/Common/ZoneHelper.cs similarity index 57% rename from Qiniu/Common/ZoneHelper.cs rename to src/Qiniu/Common/ZoneHelper.cs index d31771f1..50563fb6 100644 --- a/Qiniu/Common/ZoneHelper.cs +++ b/src/Qiniu/Common/ZoneHelper.cs @@ -1,28 +1,21 @@ using System; +using System.Text; using System.Collections.Generic; -using System.Net; -using System.IO; +using Newtonsoft.Json; +using Qiniu.Http; namespace Qiniu.Common { - public class AutoZone + /// + /// Zone辅助类,查询及配置Zone + /// + public class ZoneHelper { /// - /// 从uc.qbox.me查询得到回复后,解析出upHost,然后根据upHost确定Zone + /// Zone + /// 不同区域upHost分别唯一,据此确定对应的Zone /// - /// AK - /// Bucket - public static ZoneID Query(string accessKey, string bucketName) - { - ZoneID zoneId = ZoneID.Default; - - // HTTP/GET https://uc.qbox.me/v1/query?ak=(AK)&bucket=(Bucket) - // 该请求的返回数据参见后面的 QueryResponse 结构 - // 根据response消息提取出upHost - string query = string.Format("https://uc.qbox.me/v1/query?ak={0}&bucket={1}", accessKey, bucketName); - - //不同区域upHost分别唯一,据此确定对应的Zone - Dictionary ZONE_DICT = new Dictionary() + private static Dictionary ZONE_DICT = new Dictionary() { {"http://up.qiniu.com", ZoneID.CN_East }, {"http://up-z1.qiniu.com", ZoneID.CN_North}, @@ -30,24 +23,48 @@ public static ZoneID Query(string accessKey, string bucketName) {"http://up-na0.qiniu.com", ZoneID.US_North} }; + /// + /// 从uc.qbox.me查询得到回复后,解析出upHost,然后根据upHost确定Zone + /// + /// AccessKek + /// 空间名称 + public static ZoneID queryZone(string accessKey, string bucket) + { + ZoneID zoneId = ZoneID.Default; + try { - HttpWebRequest wReq = WebRequest.Create(query) as HttpWebRequest; - wReq.Method = "GET"; - System.Net.HttpWebResponse wResp = wReq.GetResponse() as System.Net.HttpWebResponse; - using (StreamReader sr = new StreamReader(wResp.GetResponseStream())) + // HTTP/GET https://uc.qbox.me/v1/query?ak=(AK)&bucket=(Bucket) + // 该请求的返回数据参见后面的 QueryResponse 结构 + // 根据response消息提取出upHost + string queryUrl = string.Format("https://uc.qbox.me/v1/query?ak={0}&bucket={1}", accessKey, bucket); + + HttpManager httpManager = new Http.HttpManager(); + var hr = httpManager.get(queryUrl, null); + if (hr.Code == HttpHelper.STATUS_CODE_OK) { - string respData = sr.ReadToEnd(); - QueryResponse qr = Newtonsoft.Json.JsonConvert.DeserializeObject(respData); + QueryResponse qr = JsonConvert.DeserializeObject(hr.Text); string upHost = qr.HTTP.UP[0]; zoneId = ZONE_DICT[upHost]; } - wResp.Close(); - + else + { + throw new Exception(hr.RefText); + } } catch (Exception ex) { - throw new Exception("ConfigZone:" + ex.Message); + StringBuilder sb = new StringBuilder("[ConfigZone] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + throw new Exception(sb.ToString()); } return zoneId; @@ -102,4 +119,5 @@ private class HttpBulk #endregion UC_QUERY_RESPONSE } + } diff --git a/src/Qiniu/Http/HttpHelper.cs b/src/Qiniu/Http/HttpHelper.cs new file mode 100644 index 00000000..8e83632e --- /dev/null +++ b/src/Qiniu/Http/HttpHelper.cs @@ -0,0 +1,101 @@ +using System; +using Qiniu.Util; + +namespace Qiniu.Http +{ + /// + /// HTTP辅助工具:帮助生成UA,boundary等 + /// + public class HttpHelper + { + /// + /// 资源类型:普通文本 + /// + public static string CONTENT_TYPE_TEXT_PLAIN = "text/plain"; + + /// + /// 资源类型:JSON字符串 + /// + public static string CONTENT_TYPE_APP_JSON = "application/json"; + + /// + /// 资源类型:未知类型(数据流) + /// + public static string CONTENT_TYPE_APP_OCTET = "application/octet-stream"; + + /// + /// 资源类型:表单数据(键值对) + /// + public static string CONTENT_TYPE_WWW_FORM = "application/x-www-form-urlencoded"; + + /// + /// 资源类型:多分部数据 + /// + public static string CONTENT_TYPE_MULTIPART = "multipart/form-data"; + + /// + /// HTTP状态码200 (OK) + /// + public static int STATUS_CODE_OK = 200; + + /// + /// HTTP状态码298 (部分OK) + /// + public static int STATUS_CODE_PARTLY_OK = 298; + + /// + /// 自定义HTTP状态码 (默认值) + /// + public static int STATUS_CODE_UNDEF = -256; + + /// + /// 自定义HTTP状态码 (用户取消) + /// + public static int STATUS_CODE_USER_CANCELED = -255; + + /// + /// 自定义HTTP状态码 (用户暂停) + /// + public static int STATUS_CODE_USER_PAUSED = -254; + + /// + /// 自定义HTTP状态码 (用户继续) + /// + public static int STATUS_CODE_USER_RESUMED = -253; + + /// + /// 自定义HTTP状态码 (需要重试) + /// + public static int STATUS_CODE_NEED_RETRY= -252; + + /// + /// 自定义HTTP状态码 (异常或错误) + /// + public static int STATUS_CODE_EXCEPTION = -252; + + /// + /// 客户端标识 + /// + /// 客户端标识UA + public static string getUserAgent() + { +#if NetStandard + string sfx = Environment.MachineName; +#else + var osInfo = Environment.OSVersion; + string sfx = Environment.MachineName + "; " + osInfo.Platform + "; " + osInfo.Version; +#endif + return string.Format("{0}/{1} ({2})", QiniuCSharpSDK.ALIAS, QiniuCSharpSDK.VERSION, sfx); + } + + /// + /// 多部分表单数据(multi-part form-data)的分界(boundary)标识 + /// + /// 多部分表单数据的boundary + public static string createFormDataBoundary() + { + string now = DateTime.UtcNow.Ticks.ToString(); + return string.Format("-------{0}Boundary{1}", QiniuCSharpSDK.ALIAS, StringHelper.calcMD5(now)); + } + } +} diff --git a/src/Qiniu/Http/HttpManager.cs b/src/Qiniu/Http/HttpManager.cs new file mode 100644 index 00000000..eea89d3d --- /dev/null +++ b/src/Qiniu/Http/HttpManager.cs @@ -0,0 +1,1645 @@ +#if Net20 || Net30 || Net35 || Net40 + +using System; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Net; + +namespace Qiniu.Http +{ + /// + /// HttpManager for .NET 2.0/3.0/3.5/4.0 + /// + public class HttpManager + { + /// + /// HTTP-GET方法 + /// + /// 请求目标URL + /// 令牌(凭证) + /// 请求中携带的头部信息 + /// 是否以二进制模式读取响应内容 + /// 响应结果 + public HttpResult get(string url, string token, Dictionary header = null, bool binaryMode = false) + { + HttpResult result = new HttpResult(); + + HttpWebRequest wReq = null; + + try + { + wReq = WebRequest.Create(url) as HttpWebRequest; + wReq.Method = "GET"; + if (!string.IsNullOrEmpty(token)) + { + wReq.Headers.Add("Authorization", token); + } + wReq.UserAgent = HttpHelper.getUserAgent(); + + addHeaders(ref wReq, header); + + HttpWebResponse wResp = wReq.GetResponse() as HttpWebResponse; + + if (wResp != null) + { + result.Code = (int)wResp.StatusCode; + result.RefCode = (int)wResp.StatusCode; + + getHeaders(ref result, wResp); + + if (binaryMode) + { + int len = (int)wResp.ContentLength; + result.Data = new byte[len]; + int bytesLeft = len; + int bytesRead = 0; + + using (BinaryReader br = new BinaryReader(wResp.GetResponseStream())) + { + while (bytesLeft > 0) + { + bytesRead = br.Read(result.Data, len - bytesLeft, bytesLeft); + bytesLeft -= bytesRead; + } + } + } + else + { + using (StreamReader sr = new StreamReader(wResp.GetResponseStream())) + { + result.Text = sr.ReadToEnd(); + } + } + + wResp.Close(); + } + } + catch (WebException wex) + { + HttpWebResponse xResp = wex.Response as HttpWebResponse; + if (xResp != null) + { + result.Code = (int)xResp.StatusCode; + result.RefCode = (int)xResp.StatusCode; + + getHeaders(ref result, xResp); + + using (StreamReader sr = new StreamReader(xResp.GetResponseStream())) + { + result.Text = sr.ReadToEnd(); + } + + xResp.Close(); + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("Get Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + finally + { + if (wReq != null) + { + wReq.Abort(); + } + } + + return result; + } + + /// + /// HTTP-POST方法(不包含数据) + /// + /// 请求目标URL + /// 令牌(凭证) + /// 请求中携带的头部信息 + /// 是否以二进制模式读取响应内容 + /// 响应结果 + public HttpResult post(string url, string token, Dictionary header = null, bool binaryMode = false) + { + HttpResult result = new HttpResult(); + + HttpWebRequest wReq = null; + + try + { + wReq = WebRequest.Create(url) as HttpWebRequest; + wReq.Method = "POST"; + if (!string.IsNullOrEmpty(token)) + { + wReq.Headers.Add("Authorization", token); + } + wReq.UserAgent = HttpHelper.getUserAgent(); + + addHeaders(ref wReq, header); + + HttpWebResponse wResp = wReq.GetResponse() as HttpWebResponse; + + if (wResp != null) + { + result.Code = (int)wResp.StatusCode; + result.RefCode = (int)wResp.StatusCode; + + getHeaders(ref result, wResp); + + if (binaryMode) + { + int len = (int)wResp.ContentLength; + result.Data = new byte[len]; + int bytesLeft = len; + int bytesRead = 0; + + using (BinaryReader br = new BinaryReader(wResp.GetResponseStream())) + { + while (bytesLeft > 0) + { + bytesRead = br.Read(result.Data, len - bytesLeft, bytesLeft); + bytesLeft -= bytesRead; + } + } + } + else + { + using (StreamReader sr = new StreamReader(wResp.GetResponseStream())) + { + result.Text = sr.ReadToEnd(); + } + } + + wResp.Close(); + } + } + catch (WebException wex) + { + HttpWebResponse xResp = wex.Response as HttpWebResponse; + if (xResp != null) + { + result.Code = (int)xResp.StatusCode; + result.RefCode = (int)xResp.StatusCode; + + getHeaders(ref result, xResp); + + using (StreamReader sr = new StreamReader(xResp.GetResponseStream())) + { + result.Text = sr.ReadToEnd(); + } + + xResp.Close(); + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("Post Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + finally + { + if (wReq != null) + { + wReq.Abort(); + } + } + + return result; + } + + /// + /// HTTP-POST方法(包含二进制格式数据) + /// + /// 请求目标URL + /// 主体数据 + /// 令牌(凭证) + /// 请求中携带的头部信息 + /// 是否以二进制模式读取响应内容 + /// 响应结果 + public HttpResult postData(string url, byte[] data, string token, Dictionary header = null, bool binaryMode = false) + { + HttpResult result = new HttpResult(); + + HttpWebRequest wReq = null; + + try + { + wReq = WebRequest.Create(url) as HttpWebRequest; + wReq.Method = "POST"; + if (!string.IsNullOrEmpty(token)) + { + wReq.Headers.Add("Authorization", token); + } + wReq.ContentType = HttpHelper.CONTENT_TYPE_APP_OCTET; + wReq.UserAgent = HttpHelper.getUserAgent(); + + addHeaders(ref wReq, header); + + if (data != null) + { + wReq.AllowWriteStreamBuffering = true; + using (Stream sReq = wReq.GetRequestStream()) + { + sReq.Write(data, 0, data.Length); + sReq.Flush(); + } + } + + HttpWebResponse wResp = wReq.GetResponse() as HttpWebResponse; + + if (wResp != null) + { + result.Code = (int)wResp.StatusCode; + result.RefCode = (int)wResp.StatusCode; + + getHeaders(ref result, wResp); + + if (binaryMode) + { + int len = (int)wResp.ContentLength; + result.Data = new byte[len]; + int bytesLeft = len; + int bytesRead = 0; + + using (BinaryReader br = new BinaryReader(wResp.GetResponseStream())) + { + while (bytesLeft > 0) + { + bytesRead = br.Read(result.Data, len - bytesLeft, bytesLeft); + bytesLeft -= bytesRead; + } + } + } + else + { + using (StreamReader sr = new StreamReader(wResp.GetResponseStream())) + { + result.Text = sr.ReadToEnd(); + } + } + + wResp.Close(); + } + } + catch (WebException wex) + { + HttpWebResponse xResp = wex.Response as HttpWebResponse; + if (xResp != null) + { + result.Code = (int)xResp.StatusCode; + result.RefCode = (int)xResp.StatusCode; + + getHeaders(ref result, xResp); + + using (StreamReader sr = new StreamReader(xResp.GetResponseStream())) + { + result.Text = sr.ReadToEnd(); + } + + xResp.Close(); + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("Post-data Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + finally + { + if (wReq != null) + { + wReq.Abort(); + } + } + + return result; + } + + /// + /// HTTP-POST方法(包含JSON编码格式的数据) + /// + /// 请求目标URL + /// 主体数据 + /// 令牌(凭证) + /// 请求中携带的头部信息 + /// 是否以二进制模式读取响应内容 + /// 响应结果 + public HttpResult postJson(string url, string data, string token, Dictionary header = null, bool binaryMode = false) + { + HttpResult result = new HttpResult(); + + HttpWebRequest wReq = null; + + try + { + wReq = WebRequest.Create(url) as HttpWebRequest; + wReq.Method = "POST"; + if (!string.IsNullOrEmpty(token)) + { + wReq.Headers.Add("Authorization", token); + } + wReq.ContentType = HttpHelper.CONTENT_TYPE_APP_JSON; + wReq.UserAgent = HttpHelper.getUserAgent(); + + addHeaders(ref wReq, header); + + if (data != null) + { + wReq.AllowWriteStreamBuffering = true; + using (Stream sReq = wReq.GetRequestStream()) + { + sReq.Write(Encoding.UTF8.GetBytes(data), 0, data.Length); + sReq.Flush(); + } + } + + HttpWebResponse wResp = wReq.GetResponse() as HttpWebResponse; + + if (wResp != null) + { + result.Code = (int)wResp.StatusCode; + result.RefCode = (int)wResp.StatusCode; + + getHeaders(ref result, wResp); + + if (binaryMode) + { + int len = (int)wResp.ContentLength; + result.Data = new byte[len]; + int bytesLeft = len; + int bytesRead = 0; + + using (BinaryReader br = new BinaryReader(wResp.GetResponseStream())) + { + while (bytesLeft > 0) + { + bytesRead = br.Read(result.Data, len - bytesLeft, bytesLeft); + bytesLeft -= bytesRead; + } + } + } + else + { + using (StreamReader sr = new StreamReader(wResp.GetResponseStream())) + { + result.Text = sr.ReadToEnd(); + } + } + + wResp.Close(); + } + } + catch (WebException wex) + { + HttpWebResponse xResp = wex.Response as HttpWebResponse; + if (xResp != null) + { + result.Code = (int)xResp.StatusCode; + result.RefCode = (int)xResp.StatusCode; + + getHeaders(ref result, xResp); + + using (StreamReader sr = new StreamReader(xResp.GetResponseStream())) + { + result.Text = sr.ReadToEnd(); + } + + xResp.Close(); + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("Post-json Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + finally + { + if (wReq != null) + { + wReq.Abort(); + } + } + + return result; + } + + /// + /// HTTP-POST方法(包含表单数据) + /// + /// 请求目标URL + /// 键值对数据 + /// 令牌(凭证) + /// 请求中携带的头部信息 + /// 是否以二进制模式读取响应内容 + /// 响应结果 + public HttpResult postForm(string url, Dictionary kvData, string token, Dictionary header = null, bool binaryMode = false) + { + HttpResult result = new HttpResult(); + + HttpWebRequest wReq = null; + + try + { + wReq = WebRequest.Create(url) as HttpWebRequest; + wReq.Method = "POST"; + if (!string.IsNullOrEmpty(token)) + { + wReq.Headers.Add("Authorization", token); + } + wReq.ContentType = HttpHelper.CONTENT_TYPE_WWW_FORM; + wReq.UserAgent = HttpHelper.getUserAgent(); + + addHeaders(ref wReq, header); + + if (kvData != null) + { + StringBuilder sbb = new StringBuilder(); + foreach (var kv in kvData) + { + sbb.AppendFormat("{0}={1}&", Uri.EscapeDataString(kv.Key), Uri.EscapeDataString(kv.Value)); + } + + wReq.AllowWriteStreamBuffering = true; + using (Stream sReq = wReq.GetRequestStream()) + { + sReq.Write(Encoding.UTF8.GetBytes(sbb.ToString()), 0, sbb.Length - 1); + sReq.Flush(); + } + } + + HttpWebResponse wResp = wReq.GetResponse() as HttpWebResponse; + + if (wResp != null) + { + result.Code = (int)wResp.StatusCode; + result.RefCode = (int)wResp.StatusCode; + + getHeaders(ref result, wResp); + + if (binaryMode) + { + int len = (int)wResp.ContentLength; + result.Data = new byte[len]; + int bytesLeft = len; + int bytesRead = 0; + + using (BinaryReader br = new BinaryReader(wResp.GetResponseStream())) + { + while (bytesLeft > 0) + { + bytesRead = br.Read(result.Data, len - bytesLeft, bytesLeft); + bytesLeft -= bytesRead; + } + } + } + else + { + using (StreamReader sr = new StreamReader(wResp.GetResponseStream())) + { + result.Text = sr.ReadToEnd(); + } + } + + wResp.Close(); + } + } + catch (WebException wex) + { + HttpWebResponse xResp = wex.Response as HttpWebResponse; + if (xResp != null) + { + result.Code = (int)xResp.StatusCode; + result.RefCode = (int)xResp.StatusCode; + + getHeaders(ref result, xResp); + + using (StreamReader sr = new StreamReader(xResp.GetResponseStream())) + { + result.Text = sr.ReadToEnd(); + } + + xResp.Close(); + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("Post-form Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + finally + { + if (wReq != null) + { + wReq.Abort(); + } + } + + return result; + } + + /// + /// HTTP-POST方法(包含表单数据) + /// + /// 请求目标URL + /// 表单数据 + /// 令牌(凭证) + /// 请求中携带的头部信息 + /// 是否以二进制模式读取响应内容 + /// 响应结果 + public HttpResult postForm(string url, string data, string token, Dictionary header = null, bool binaryMode = false) + { + HttpResult result = new HttpResult(); + + HttpWebRequest wReq = null; + + try + { + wReq = WebRequest.Create(url) as HttpWebRequest; + wReq.Method = "POST"; + if (!string.IsNullOrEmpty(token)) + { + wReq.Headers.Add("Authorization", token); + } + wReq.ContentType = HttpHelper.CONTENT_TYPE_WWW_FORM; + wReq.UserAgent = HttpHelper.getUserAgent(); + + addHeaders(ref wReq, header); + + if (!string.IsNullOrEmpty(data)) + { + wReq.AllowWriteStreamBuffering = true; + using (Stream sReq = wReq.GetRequestStream()) + { + sReq.Write(Encoding.UTF8.GetBytes(data), 0, data.Length); + sReq.Flush(); + } + } + + HttpWebResponse wResp = wReq.GetResponse() as HttpWebResponse; + + if (wResp != null) + { + result.Code = (int)wResp.StatusCode; + result.RefCode = (int)wResp.StatusCode; + + getHeaders(ref result, wResp); + + if (binaryMode) + { + int len = (int)wResp.ContentLength; + result.Data = new byte[len]; + int bytesLeft = len; + int bytesRead = 0; + + using (BinaryReader br = new BinaryReader(wResp.GetResponseStream())) + { + while (bytesLeft > 0) + { + bytesRead = br.Read(result.Data, len - bytesLeft, bytesLeft); + bytesLeft -= bytesRead; + } + } + } + else + { + using (StreamReader sr = new StreamReader(wResp.GetResponseStream())) + { + result.Text = sr.ReadToEnd(); + } + } + + wResp.Close(); + } + } + catch (WebException wex) + { + HttpWebResponse xResp = wex.Response as HttpWebResponse; + if (xResp != null) + { + result.Code = (int)xResp.StatusCode; + result.RefCode = (int)xResp.StatusCode; + + getHeaders(ref result, xResp); + + using (StreamReader sr = new StreamReader(xResp.GetResponseStream())) + { + result.Text = sr.ReadToEnd(); + } + + xResp.Close(); + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("Post-form Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + finally + { + if (wReq != null) + { + wReq.Abort(); + } + } + + return result; + } + + /// + /// HTTP-POST方法(包含表单数据) + /// + /// 请求目标URL + /// 表单数据 + /// 令牌(凭证) + /// 请求中携带的头部信息 + /// 是否以二进制模式读取响应内容 + /// 响应结果 + public HttpResult postForm(string url, byte[] data, string token, Dictionary header = null, bool binaryMode = false) + { + HttpResult result = new HttpResult(); + + HttpWebRequest wReq = null; + + try + { + wReq = WebRequest.Create(url) as HttpWebRequest; + wReq.Method = "POST"; + if (!string.IsNullOrEmpty(token)) + { + wReq.Headers.Add("Authorization", token); + } + wReq.ContentType = HttpHelper.CONTENT_TYPE_WWW_FORM; + wReq.UserAgent = HttpHelper.getUserAgent(); + + addHeaders(ref wReq, header); + + if (data != null) + { + wReq.AllowWriteStreamBuffering = true; + using (Stream sReq = wReq.GetRequestStream()) + { + sReq.Write(data, 0, data.Length); + sReq.Flush(); + } + } + + HttpWebResponse wResp = wReq.GetResponse() as HttpWebResponse; + + if (wResp != null) + { + result.Code = (int)wResp.StatusCode; + result.RefCode = (int)wResp.StatusCode; + + getHeaders(ref result, wResp); + + if (binaryMode) + { + int len = (int)wResp.ContentLength; + result.Data = new byte[len]; + int bytesLeft = len; + int bytesRead = 0; + + using (BinaryReader br = new BinaryReader(wResp.GetResponseStream())) + { + while (bytesLeft > 0) + { + bytesRead = br.Read(result.Data, len - bytesLeft, bytesLeft); + bytesLeft -= bytesRead; + } + } + } + else + { + using (StreamReader sr = new StreamReader(wResp.GetResponseStream())) + { + result.Text = sr.ReadToEnd(); + } + } + + wResp.Close(); + } + } + catch (WebException wex) + { + HttpWebResponse xResp = wex.Response as HttpWebResponse; + if (xResp != null) + { + result.Code = (int)xResp.StatusCode; + result.RefCode = (int)xResp.StatusCode; + + getHeaders(ref result, xResp); + + using (StreamReader sr = new StreamReader(xResp.GetResponseStream())) + { + result.Text = sr.ReadToEnd(); + } + + xResp.Close(); + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("Post-form Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + finally + { + if (wReq != null) + { + wReq.Abort(); + } + } + + return result; + } + + /// + /// HTTP-POST方法(包含多分部数据,multipart/form-data) + /// + /// 请求目标URL + /// 主体数据 + /// 分界标志 + /// 令牌(凭证) + /// 请求中携带的头部信息 + /// 是否以二进制模式读取响应内容 + /// + public HttpResult postMultipart(string url, byte[] data, string boundary, string token, Dictionary header = null, bool binaryMode = false) + { + HttpResult result = new HttpResult(); + + HttpWebRequest wReq = null; + + try + { + wReq = WebRequest.Create(url) as HttpWebRequest; + wReq.Method = "POST"; + if (!string.IsNullOrEmpty(token)) + { + wReq.Headers.Add("Authorization", token); + } + wReq.ContentType = string.Format("{0}; boundary={1}", HttpHelper.CONTENT_TYPE_MULTIPART, boundary); + wReq.UserAgent = HttpHelper.getUserAgent(); + + addHeaders(ref wReq, header); + + wReq.AllowWriteStreamBuffering = true; + using (Stream sReq = wReq.GetRequestStream()) + { + sReq.Write(data, 0, data.Length); + sReq.Flush(); + } + + HttpWebResponse wResp = wReq.GetResponse() as HttpWebResponse; + + if (wResp != null) + { + result.Code = (int)wResp.StatusCode; + result.RefCode = (int)wResp.StatusCode; + + getHeaders(ref result, wResp); + + if (binaryMode) + { + int len = (int)wResp.ContentLength; + result.Data = new byte[len]; + int bytesLeft = len; + int bytesRead = 0; + + using (BinaryReader br = new BinaryReader(wResp.GetResponseStream())) + { + while (bytesLeft > 0) + { + bytesRead = br.Read(result.Data, len - bytesLeft, bytesLeft); + bytesLeft -= bytesRead; + } + } + } + else + { + using (StreamReader sr = new StreamReader(wResp.GetResponseStream())) + { + result.Text = sr.ReadToEnd(); + } + } + + wResp.Close(); + } + } + catch (WebException wex) + { + HttpWebResponse xResp = wex.Response as HttpWebResponse; + if (xResp != null) + { + result.Code = (int)xResp.StatusCode; + result.RefCode = (int)xResp.StatusCode; + + getHeaders(ref result, xResp); + + using (StreamReader sr = new StreamReader(xResp.GetResponseStream())) + { + result.Text = sr.ReadToEnd(); + } + + xResp.Close(); + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("Post-multipart Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + finally + { + if (wReq != null) + { + wReq.Abort(); + } + } + + return result; + } + + /// + /// 获取返回信息头 + /// + /// + /// + private void getHeaders(ref HttpResult hr, HttpWebResponse resp) + { + if (resp != null) + { + if (hr.RefInfo == null) + { + hr.RefInfo = new Dictionary(); + } + + hr.RefInfo.Add("ProtocolVersion", resp.ProtocolVersion.ToString()); + + if (!string.IsNullOrEmpty(resp.CharacterSet)) + { + hr.RefInfo.Add("Characterset", resp.CharacterSet); + } + + if (!string.IsNullOrEmpty(resp.ContentEncoding)) + { + hr.RefInfo.Add("ContentEncoding", resp.ContentEncoding); + } + + if (!string.IsNullOrEmpty(resp.ContentType)) + { + hr.RefInfo.Add("ContentType", resp.ContentType); + } + + hr.RefInfo.Add("ContentLength", resp.ContentLength.ToString()); + + var headers = resp.Headers; + if (headers != null && headers.Count > 0) + { + if (hr.RefInfo == null) + { + hr.RefInfo = new Dictionary(); + } + foreach (var key in headers.AllKeys) + { + hr.RefInfo.Add(key, headers[key]); + } + } + } + } + + /// + /// 添加附加头部 + /// + /// HTTP请求 + /// 请求的头部信息 + private void addHeaders(ref HttpWebRequest req, Dictionary header) + { + if (req != null && header != null) + { + foreach (var kvp in header) + { + if (!kvp.Key.Equals("Content-Type")) + { + req.Headers.Add(kvp.Key, kvp.Value); + } + } + } + } + + } +} + +#else + +using System; +using System.Collections.Generic; +using System.Text; +using System.Net.Http; +using System.Net.Http.Headers; + +namespace Qiniu.Http +{ + /// + /// HttpManager for .NET 4.5+ and for .NET Core + /// + public class HttpManager + { + private HttpClient client; + private string userAgent; + + /// + /// HTTP超时间隔默认值(单位:秒) + /// + public int TIMEOUT_DEF_SEC = 30; + + /// + /// HTTP超时间隔最大值(单位:秒) + /// + public int TIMEOUT_MAX_SEC = 60; + + /// + /// + /// + public HttpManager() + { + client = new HttpClient(); + userAgent = HttpHelper.getUserAgent(); + } + + /// + /// 清理 + /// + ~HttpManager() + { + client.Dispose(); + client = null; + } + + /// + /// 设置HTTP超时间隔 + /// + /// 超时间隔,单位为秒 + public void setTimeout(int seconds) + { + if (seconds >= 1 && seconds <= TIMEOUT_MAX_SEC) + { + TIMEOUT_DEF_SEC = seconds; + } + + client.Timeout = new TimeSpan(0, 0, TIMEOUT_DEF_SEC); + } + + /// + /// HTTP-GET方法 + /// + /// 请求目标URL + /// 令牌(凭证) + /// 请求中携带的头部信息 + /// 是否以二进制模式读取响应内容 + /// 响应结果 + public HttpResult get(string url, string token, Dictionary header = null, bool binaryMode = false) + { + HttpResult result = new HttpResult(); + + try + { + HttpRequestMessage req = new HttpRequestMessage(HttpMethod.Get, url); + req.Headers.Add("User-Agent", userAgent); + if (!string.IsNullOrEmpty(token)) + { + req.Headers.Add("Authorization", token); + } + + var msg = client.SendAsync(req).Result; + result.Code = (int)msg.StatusCode; + result.RefCode = (int)msg.StatusCode; + + getHeaders(ref result, msg); + + if (binaryMode) + { + result.Data = msg.Content.ReadAsByteArrayAsync().Result; + } + else + { + result.Text = msg.Content.ReadAsStringAsync().Result; + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("Get Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// HTTP-POST方法(不包含数据) + /// + /// 请求目标URL + /// 令牌(凭证) + /// 请求中携带的头部信息 + /// 是否以二进制模式读取响应内容 + /// 响应结果 + public HttpResult post(string url, string token, Dictionary header = null, bool binaryMode = false) + { + HttpResult result = new HttpResult(); + + try + { + HttpRequestMessage req = new HttpRequestMessage(HttpMethod.Post, url); + req.Headers.Add("User-Agent", userAgent); + if (!string.IsNullOrEmpty(token)) + { + req.Headers.Add("Authorization", token); + } + + addHeaders(ref req, header); + + var msg = client.SendAsync(req).Result; + result.Code = (int)msg.StatusCode; + result.RefCode = (int)msg.StatusCode; + + getHeaders(ref result, msg); + + if (binaryMode) + { + result.Data = msg.Content.ReadAsByteArrayAsync().Result; + } + else + { + result.Text = msg.Content.ReadAsStringAsync().Result; + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("Post Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// HTTP-POST方法(包含二进制格式数据) + /// + /// 请求目标URL + /// 主体数据 + /// 令牌(凭证) + /// 请求中携带的头部信息 + /// 是否以二进制模式读取响应内容 + /// 响应结果 + public HttpResult postData(string url, byte[] data, string token, Dictionary header = null, bool binaryMode = false) + { + HttpResult result = new HttpResult(); + + try + { + HttpRequestMessage req = new HttpRequestMessage(HttpMethod.Post, url); + req.Headers.Add("User-Agent", userAgent); + if (!string.IsNullOrEmpty(token)) + { + req.Headers.Add("Authorization", token); + } + + addHeaders(ref req, header); + + var content = new ByteArrayContent(data); + req.Content = content; + req.Content.Headers.ContentType = new MediaTypeHeaderValue(HttpHelper.CONTENT_TYPE_APP_OCTET); + + var msg = client.SendAsync(req).Result; + result.Code = (int)msg.StatusCode; + result.RefCode = (int)msg.StatusCode; + + getHeaders(ref result, msg); + + if (binaryMode) + { + result.Data = msg.Content.ReadAsByteArrayAsync().Result; + } + else + { + result.Text = msg.Content.ReadAsStringAsync().Result; + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("Post-data Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// HTTP-POST方法(包含JSON编码格式的数据) + /// + /// 请求目标URL + /// 主体数据 + /// 令牌(凭证) + /// 请求中携带的头部信息 + /// 是否以二进制模式读取响应内容 + /// 响应结果 + public HttpResult postJson(string url, string data, string token, Dictionary header = null, bool binaryMode = false) + { + HttpResult result = new HttpResult(); + + try + { + HttpRequestMessage req = new HttpRequestMessage(HttpMethod.Post, url); + req.Headers.Add("User-Agent", userAgent); + if (!string.IsNullOrEmpty(token)) + { + req.Headers.Add("Authorization", token); + } + + addHeaders(ref req, header); + + var content = new StringContent(data); + req.Content = content; + req.Content.Headers.ContentType = new MediaTypeHeaderValue(HttpHelper.CONTENT_TYPE_APP_JSON); + + var msg = client.SendAsync(req).Result; + result.Code = (int)msg.StatusCode; + result.RefCode = (int)msg.StatusCode; + + getHeaders(ref result, msg); + + if (binaryMode) + { + result.Data = msg.Content.ReadAsByteArrayAsync().Result; + } + else + { + result.Text = msg.Content.ReadAsStringAsync().Result; + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("Post-json Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// HTTP-POST方法(包含表单数据) + /// + /// 请求目标URL + /// 键值对数据 + /// 令牌(凭证) + /// 请求中携带的头部信息 + /// 是否以二进制模式读取响应内容 + /// 响应结果 + public HttpResult postForm(string url, Dictionary kvData, string token, Dictionary header = null, bool binaryMode = false) + { + HttpResult result = new HttpResult(); + + try + { + HttpRequestMessage req = new HttpRequestMessage(HttpMethod.Post, url); + req.Headers.Add("User-Agent", userAgent); + if (!string.IsNullOrEmpty(token)) + { + req.Headers.Add("Authorization", token); + } + + addHeaders(ref req, header); + + var content = new FormUrlEncodedContent(kvData); + req.Content = content; + req.Content.Headers.ContentType = new MediaTypeHeaderValue(HttpHelper.CONTENT_TYPE_WWW_FORM); + + var msg = client.SendAsync(req).Result; + result.Code = (int)msg.StatusCode; + result.RefCode = (int)msg.StatusCode; + + getHeaders(ref result, msg); + + if (binaryMode) + { + result.Data = msg.Content.ReadAsByteArrayAsync().Result; + } + else + { + result.Text = msg.Content.ReadAsStringAsync().Result; + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("Post-form Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// HTTP-POST方法(包含表单数据) + /// + /// 请求目标URL + /// 表单数据 + /// 令牌(凭证) + /// 请求中携带的头部信息 + /// 是否以二进制模式读取响应内容 + /// 响应结果 + public HttpResult postForm(string url, string data, string token, Dictionary header = null, bool binaryMode = false) + { + HttpResult result = new HttpResult(); + + try + { + HttpRequestMessage req = new HttpRequestMessage(HttpMethod.Post, url); + req.Headers.Add("User-Agent", userAgent); + if (!string.IsNullOrEmpty(token)) + { + req.Headers.Add("Authorization", token); + } + + addHeaders(ref req, header); + + var content = new StringContent(data); + req.Content = content; + req.Content.Headers.ContentType = new MediaTypeHeaderValue(HttpHelper.CONTENT_TYPE_WWW_FORM); + + var msg = client.SendAsync(req).Result; + result.Code = (int)msg.StatusCode; + result.RefCode = (int)msg.StatusCode; + + getHeaders(ref result, msg); + + if (binaryMode) + { + result.Data = msg.Content.ReadAsByteArrayAsync().Result; + } + else + { + result.Text = msg.Content.ReadAsStringAsync().Result; + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("Post-form Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// HTTP-POST方法(包含表单数据) + /// + /// 请求目标URL + /// 表单 + /// 令牌(凭证) + /// 请求中携带的头部信息 + /// 是否以二进制模式读取响应内容 + /// 响应结果 + public HttpResult postForm(string url, byte[] data, string token, Dictionary header = null, bool binaryMode = false) + { + HttpResult result = new HttpResult(); + + try + { + HttpRequestMessage req = new HttpRequestMessage(HttpMethod.Post, url); + req.Headers.Add("User-Agent", userAgent); + if (!string.IsNullOrEmpty(token)) + { + req.Headers.Add("Authorization", token); + } + + addHeaders(ref req, header); + + var content = new ByteArrayContent(data); + req.Content = content; + req.Content.Headers.ContentType = new MediaTypeHeaderValue(HttpHelper.CONTENT_TYPE_WWW_FORM); + + var msg = client.SendAsync(req).Result; + result.Code = (int)msg.StatusCode; + result.RefCode = (int)msg.StatusCode; + + getHeaders(ref result, msg); + + if (binaryMode) + { + result.Data = msg.Content.ReadAsByteArrayAsync().Result; + } + else + { + result.Text = msg.Content.ReadAsStringAsync().Result; + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("Post-form Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// HTTP-POST方法(包含多分部数据,multipart/form-data) + /// + /// 请求目标URL + /// 主体数据 + /// 分界标志 + /// 令牌(凭证) + /// 请求中携带的头部信息 + /// 是否以二进制模式读取响应内容 + /// + public HttpResult postMultipart(string url, byte[] data, string boundary, string token, Dictionary header = null, bool binaryMode = false) + { + HttpResult result = new HttpResult(); + + try + { + HttpRequestMessage req = new HttpRequestMessage(HttpMethod.Post, url); + + if (!string.IsNullOrEmpty(token)) + { + req.Headers.Add("Authorization", token); + } + req.Headers.Add("User-Agent", userAgent); + + addHeaders(ref req, header); + + var content = new ByteArrayContent(data); + req.Content = content; + string ct = string.Format("{0}; boundary={1}", HttpHelper.CONTENT_TYPE_MULTIPART, boundary); + req.Content.Headers.Add("Content-Type", ct); + + var msg = client.SendAsync(req).Result; + result.Code = (int)msg.StatusCode; + result.RefCode = (int)msg.StatusCode; + + getHeaders(ref result, msg); + + if (binaryMode) + { + result.Data = msg.Content.ReadAsByteArrayAsync().Result; + } + else + { + result.Text = msg.Content.ReadAsStringAsync().Result; + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("Post-multipart Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 获取返回信息头 + /// + /// + /// + private void getHeaders(ref HttpResult hr, HttpResponseMessage msg) + { + if (msg != null) + { + var ch = msg.Content.Headers; + if (ch != null) + { + if (hr.RefInfo == null) + { + hr.RefInfo = new Dictionary(); + } + + foreach (var d in ch) + { + string key = d.Key; + StringBuilder val = new StringBuilder(); + foreach (var v in d.Value) + { + if (!string.IsNullOrEmpty(v)) + { + val.AppendFormat("{0}; ", v); + } + } + string vs = val.ToString().TrimEnd(';', ' '); + if (!string.IsNullOrEmpty(vs)) + { + hr.RefInfo.Add(key, vs); + } + } + } + + var hh = msg.Headers; + if (hh != null) + { + if (hr.RefInfo == null) + { + hr.RefInfo = new Dictionary(); + } + + foreach (var d in hh) + { + string key = d.Key; + StringBuilder val = new StringBuilder(); + foreach (var v in d.Value) + { + if (!string.IsNullOrEmpty(v)) + { + val.AppendFormat("{0}; ", v); + } + } + string vs = val.ToString().TrimEnd(';', ' '); + if (!string.IsNullOrEmpty(vs)) + { + hr.RefInfo.Add(key, vs); + } + } + } + } + } + + /// + /// 添加附加头部 + /// + /// HTTP请求 + /// 请求的头部信息 + private void addHeaders(ref HttpRequestMessage req, Dictionary header) + { + if (req != null && header != null) + { + foreach (var kvp in header) + { + if (!kvp.Key.Equals("Content-Type")) + { + req.Headers.Add(kvp.Key, kvp.Value); + } + } + } + } + + + } +} + +#endif \ No newline at end of file diff --git a/src/Qiniu/Http/HttpResult.cs b/src/Qiniu/Http/HttpResult.cs new file mode 100644 index 00000000..ea34e275 --- /dev/null +++ b/src/Qiniu/Http/HttpResult.cs @@ -0,0 +1,122 @@ +using System.Collections.Generic; +using System.Text; + +namespace Qiniu.Http +{ + /// + /// (HTTP请求的)返回消息 + /// + public class HttpResult + { + /// + /// 状态码 (200表示OK) + /// + public int Code { get; set; } + + /// + /// 消息或错误,文本格式 + /// + public string Text { get; set; } + + /// + /// 消息或错误,二进制格式 + /// + public byte[] Data { get; set; } + + /// + /// 参考代码(用户自定义) + /// + public int RefCode { get; set; } + + /// + /// 附加信息(如Exception内容) + /// + public string RefText { get; set; } + + /// + /// 参考信息(从返回消息的头部获取) + /// + public Dictionary RefInfo { get; set; } + + /// + /// 初始化(所有成员默认值,需要后续赋值) + /// + public HttpResult() + { + Code = HttpHelper.STATUS_CODE_UNDEF; + Text = null; + Data = null; + + RefCode = HttpHelper.STATUS_CODE_UNDEF; + RefInfo = null; + } + + /// + /// 对象复制 + /// + /// + public void shadow(HttpResult hr) + { + this.Code = hr.Code; + this.Text = hr.Text; + this.Data = hr.Data; + this.RefCode = hr.RefCode; + this.RefText += hr.RefText; + this.RefInfo = hr.RefInfo; + } + + /// + /// 转换为易读字符串格式 + /// + /// 便于打印和阅读的字符串 + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + + sb.AppendFormat("code: {0}\n", Code); + + if (!string.IsNullOrEmpty(Text)) + { + sb.AppendLine("text:"); + sb.AppendLine(Text); + } + + sb.AppendLine(); + + if (Data != null) + { + sb.AppendLine("data:"); + if (Data.Length <= 4096) + { + sb.AppendLine(Encoding.UTF8.GetString(Data)); + } + else + { + int n = 1024; + sb.AppendLine(Encoding.UTF8.GetString(Data, 0, n)); + sb.AppendFormat("<--- TOO-LARGE-TO-DISPLAY --- REST {0} BYTES --->\n", Data.Length - n); + } + } + sb.AppendLine(); + + sb.AppendFormat("ref-code:{0}\n", RefCode); + + if(!string.IsNullOrEmpty(RefText)) + { + sb.AppendLine("ref-text:"); + sb.AppendLine(RefText); + } + + if (RefInfo != null) + { + sb.AppendFormat("ref-info:\n"); + foreach (var d in RefInfo) + { + sb.AppendLine(string.Format("{0}:{1}", d.Key, d.Value)); + } + } + + return sb.ToString(); + } + } +} diff --git a/src/Qiniu/Http/UrlHelper.cs b/src/Qiniu/Http/UrlHelper.cs new file mode 100644 index 00000000..90f2b957 --- /dev/null +++ b/src/Qiniu/Http/UrlHelper.cs @@ -0,0 +1,87 @@ +using System.Text.RegularExpressions; + +namespace Qiniu.Http +{ + /// + /// URL辅助工具(RegExp) + /// + public class UrlHelper + { + private static Regex regx = new Regex(@"(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?"); + + private static Regex regu = new Regex(@"(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,/~\+#]*)?"); + + private static Regex regd = new Regex(@"(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,/~\+#]*)?/"); + + /// + /// 是否合法URL + /// + /// 待判断的url + /// + public static bool isValidUrl(string _url) + { + return regx.IsMatch(_url); + } + + /// + /// 是否一般URL(不包含?等后缀参数) + /// + /// 待判断的url + /// + public static bool isNormalUrl(string _url) + { + return regu.IsMatch(_url); + } + + /// + /// 是否合法URL目录 + /// + /// 待判断的url目录 + /// + public static bool isValidDir(string _dir) + { + return regd.IsMatch(_dir); + } + + /// + /// 从原始URL转换为一般URL(根据需要截断) + /// + /// 待转换的url + /// + public static string getNormalUrl(string _url) + { + var m = regu.Match(_url); + return m.Value; + } + + /// + /// URL分析,拆分出Host,Path,File,Query各个部分 + /// + /// 原始URL + /// host部分 + /// path部分 + /// 文件名 + /// 参数 + public static void urlSplit(string url, out string host, out string path, out string file, out string query) + { + int start = 0; + + Regex regHost = new Regex(@"(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+"); + host = regHost.Match(url, start).Value; + start += host.Length; + + Regex regPath = new Regex(@"(/(\w|\-)*)+/"); + path = regPath.Match(url, start).Value; + if (string.IsNullOrEmpty(path)) + { + path = "/"; + } + start += path.Length; + + int index = url.IndexOf('?', start); + file = url.Substring(start, index - start); + + query = url.Substring(index); + } + } +} diff --git a/src/Qiniu/IO/DownloadManager.cs b/src/Qiniu/IO/DownloadManager.cs new file mode 100644 index 00000000..76ecc5e0 --- /dev/null +++ b/src/Qiniu/IO/DownloadManager.cs @@ -0,0 +1,160 @@ +using System; +using System.IO; +using System.Text; +using Qiniu.Common; +using Qiniu.Http; + +namespace Qiniu.IO +{ + /// + /// 空间文件下载,只提供简单下载逻辑 + /// 对于大文件下载、断点续下载等需求,可以根据实际情况自行实现 + /// + public class DownloadManager + { + private Signature signature; + private HttpManager httpManager; + + /// + /// 下载管理 + /// + /// 账户访问控制(密钥) + public DownloadManager(Mac mac) + { + signature = new Signature(mac); + httpManager = new HttpManager(); + } + + /// + /// 生成下载凭证 + /// + /// 资源URL + /// 下载凭证 + public string CreateDownloadToken(string url) + { + return signature.sign(url); + } + + /// + /// 生成授权的下载链接(访问私有空间中的文件时需要使用) + /// + /// 初始链接 + /// 下载有效时间(单位:秒) + /// 包含过期时间的已授权的下载链接 + public string CreateSignedUrl(string url, int expireInSeconds = 3600) + { + string deadline = Util.StringHelper.calcUnixTimestamp(expireInSeconds); + + StringBuilder sb = new StringBuilder(url); + if (url.Contains("?")) + { + sb.AppendFormat("&e={0}", deadline); + } + else + { + sb.AppendFormat("?e={0}", deadline); + } + string token = CreateDownloadToken(sb.ToString()); + sb.AppendFormat("&token={0}", token); + + return sb.ToString(); + } + + /// + /// 下载(私有文件,附带token授权的链接)文件到本地 + /// + /// (可访问的)链接 + /// (另存为)本地文件名 + /// 下载资源(私有文件)的结果 + public HttpResult DownloadPriv(string signedUrl,string saveasFile) + { + HttpResult result = new HttpResult(); + + try + { + result = httpManager.get(signedUrl, null, null, true); + if (result.Code == HttpHelper.STATUS_CODE_OK) + { + using (FileStream fs = File.Create(saveasFile, result.Data.Length)) + { + fs.Write(result.Data, 0, result.Data.Length); + fs.Flush(); + } + result.RefText += string.Format("[Download] Success: (Remote file) ==> \"{0}\" @{1}\n", + saveasFile, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + } + else + { + result.RefText += string.Format("[Download] Error: @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + } + } + catch(Exception ex) + { + StringBuilder sb = new StringBuilder("Download Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 下载文件(通用) + /// + /// 公开可访问的资源下载URL + /// (另存为)本地文件名 + /// 下载资源(公开文件)的结果 + public static HttpResult Download(string url,string saveasFile) + { + HttpResult result = new HttpResult(); + + try + { + HttpManager httpManager = new HttpManager(); + + result = httpManager.get(url, null, null, true); + if (result.Code == HttpHelper.STATUS_CODE_OK) + { + using (FileStream fs = File.Create(saveasFile, result.Data.Length)) + { + fs.Write(result.Data, 0, result.Data.Length); + fs.Flush(); + } + result.RefText += string.Format("[Download] Success: (Remote file) ==> \"{0}\" @{1}\n", + saveasFile, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + } + else + { + result.RefText += string.Format("[Download] Error: @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("Download Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + } +} diff --git a/src/Qiniu/IO/Model/ChunkUnit.cs b/src/Qiniu/IO/Model/ChunkUnit.cs new file mode 100644 index 00000000..150b6658 --- /dev/null +++ b/src/Qiniu/IO/Model/ChunkUnit.cs @@ -0,0 +1,102 @@ +namespace Qiniu.IO.Model +{ + /// + /// 分片大小 + /// + public enum ChunkUnit + { + /// + /// 128KB + /// + U128K = 1, + + /// + /// 256KB + /// + U256K = 2, + + /// + /// 512KB + /// + U512K = 4, + + /// + /// 1MB + /// + U1024K = 8, + + /// + /// 2MB + /// + U2048K = 16, + + /// + /// 4MB + /// + U4096K = 32 + }; + + /// + /// ChunkSize转换 + /// + public class RCU + { + private static int N = 128 * 1024; + + /// + /// 计算ChunkSize + /// + /// + /// + public static int getChunkSize(ChunkUnit cu) + { + int c = (int)cu; + return c * N; + } + + /// + /// 计算ChunkUnit + /// + /// + /// + public static ChunkUnit getChunkUnit(int chunkSize) + { + if (chunkSize < 128 * 1024 || chunkSize > 4 * 1024 * 1024) + { + return ChunkUnit.U2048K; + } + else + { + int u = chunkSize / N; + int cu; + + if (u == 1) + { + cu = 1; + } + else if (u < 4) + { + cu = 2; + } + else if (u < 8) + { + cu = 4; + } + else if (u < 16) + { + cu = 8; + } + else if (u < 32) + { + cu = 16; + } + else + { + cu = 32; + } + + return (ChunkUnit)cu; + } + } + } +} diff --git a/src/Qiniu/IO/Model/PutPolicy.cs b/src/Qiniu/IO/Model/PutPolicy.cs new file mode 100644 index 00000000..8285e65f --- /dev/null +++ b/src/Qiniu/IO/Model/PutPolicy.cs @@ -0,0 +1,147 @@ +using System; +using Newtonsoft.Json; +using Qiniu.Util; + +namespace Qiniu.IO.Model +{ + /// + /// 上传策略 + /// 另请参阅 http://developer.qiniu.com/article/developer/security/put-policy.html + /// + [JsonObject(MemberSerialization.OptIn)] + public class PutPolicy + { + /// + /// bucket或者bucket:key + /// + [JsonProperty("scope")] + public string Scope { set; get; } + + /// + /// 上传策略失效时刻 + /// + [JsonProperty("deadline")] + public int Deadline { set; get; } + + /// + /// "仅新增"模式 + /// + [JsonProperty("insertOnly")] + public int? InsertOnly { set; get; } + + /// + /// 保存文件的key + /// + [JsonProperty("saveKey")] + public string SaveKey { set; get; } + + /// + /// 终端用户 + /// + [JsonProperty("endUser")] + public string EndUser { set; get; } + + /// + /// 返回URL + /// + [JsonProperty("returnUrl")] + public string ReturnUrl { set; get; } + + /// + /// 返回内容 + /// + [JsonProperty("returnBody")] + public string ReturnBody { set; get; } + + /// + /// 回调URL + /// + [JsonProperty("callbackUrl")] + public string CallbackUrl { set; get; } + + /// + /// 回调内容 + /// + [JsonProperty("callbackBody")] + public string CallbackBody { set; get; } + + /// + /// 回调内容类型 + /// + [JsonProperty("callbackBodyType")] + public string CallbackBodyType { set; get; } + + /// + /// 回调host + /// + [JsonProperty("callbackHost")] + public string CallbackHost { set; get; } + + /// + /// 回调fetchkey + /// + [JsonProperty("callbackFetchKey")] + public int? CallbackFetchKey { set; get; } + + /// + /// 上传预转持久化 + /// + [JsonProperty("persistentOps")] + public string PersistentOps { set; get; } + + /// + /// 持久化结果通知 + /// + [JsonProperty("persistentNotifyUrl")] + public string PersistentNotifyUrl { set; get; } + + /// + /// 私有队列 + /// + [JsonProperty("persistentPipeline")] + public string PersistentPipeline { set; get; } + + /// + /// 上传文件大小限制 + /// + [JsonProperty("fsizeLimit")] + public int? FsizeLimit { set; get; } + + /// + /// 上传时是否自动检测MIME + /// + [JsonProperty("detectMime")] + public int? DetectMime { set; get; } + + /// + /// 上传文件MIME限制 + /// + [JsonProperty("mimeLimit")] + public string MimeLimit { set; get; } + + /// + /// 文件上传后多少天后自动删除 + /// + [JsonProperty("deleteAfterDays")] + public int? DeleteAfterDays { set; get; } + + /// + /// 设置上传凭证有效期 + /// + /// + public void setExpires(int expireInSeconds) + { + TimeSpan ts = DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1, 0, 0, 0)); + this.Deadline = (int)ts.TotalSeconds + expireInSeconds; + } + + /// + /// 转换到JSON字符串 + /// + /// JSON字符串 + public string ToJsonString() + { + return StringHelper.jsonEncode(this); + } + } +} diff --git a/src/Qiniu/IO/Model/ResumeContext.cs b/src/Qiniu/IO/Model/ResumeContext.cs new file mode 100644 index 00000000..45f1f443 --- /dev/null +++ b/src/Qiniu/IO/Model/ResumeContext.cs @@ -0,0 +1,47 @@ +using Newtonsoft.Json; + +namespace Qiniu.IO.Model +{ + /// + /// 分片上传的上下文信息 + /// + [JsonObject(MemberSerialization.OptIn)] + public class ResumeContext + { + /// + /// 上下文信息 + /// + [JsonProperty("ctx")] + public string Ctx { get; set; } + + /// + /// 校验和 + /// + [JsonProperty("checksum")] + public string Checksum { get; set; } + + /// + /// crc32校验值 + /// + [JsonProperty("crc32")] + public long Crc32 { get; set; } + + /// + /// 文件偏移位置 + /// + [JsonProperty("offset")] + public long Offset { get; set; } + + /// + /// 上传目的host + /// + [JsonProperty("host")] + public string Host { get; set; } + + /// + /// ctx失效时刻 + /// + [JsonProperty("expired_at")] + public long ExpiredAt { get; set; } + } +} diff --git a/src/Qiniu/IO/Model/ResumeHelper.cs b/src/Qiniu/IO/Model/ResumeHelper.cs new file mode 100644 index 00000000..4b24983a --- /dev/null +++ b/src/Qiniu/IO/Model/ResumeHelper.cs @@ -0,0 +1,60 @@ +using System; +using System.IO; +using Newtonsoft.Json; +using Qiniu.Util; + +namespace Qiniu.IO.Model +{ + /// + /// 断点续上传辅助函数Load/Save + /// + public class ResumeHelper + { + /// + /// 尝试从从文件载入断点信息 + /// + /// 断点记录文件 + /// 断点信息 + public static ResumeInfo Load(string recordFile) + { + ResumeInfo resumeInfo = null; + + try + { + using (FileStream fs = new FileStream(recordFile, FileMode.Open)) + { + using (StreamReader sr = new StreamReader(fs)) + { + string jsonStr = sr.ReadToEnd(); + resumeInfo = JsonConvert.DeserializeObject(jsonStr); + } + } + } + catch(Exception) + { + resumeInfo = null; + } + + return resumeInfo; + } + + /// + /// 保存断点信息到文件 + /// + /// 断点信息 + /// 断点记录文件 + public static void Save(ResumeInfo resumeInfo, string recordFile) + { + string jsonStr = string.Format("{{\"fileSize\":{0}, \"blockIndex\":{1}, \"blockCount\":{2}, \"contexts\":[{3}]}}", + resumeInfo.FileSize, resumeInfo.BlockIndex, resumeInfo.BlockCount, StringHelper.jsonJoin(resumeInfo.Contexts)); + + using (FileStream fs = new FileStream(recordFile, FileMode.Create)) + { + using (StreamWriter sw = new StreamWriter(fs)) + { + sw.Write(jsonStr); + } + } + } + } +} diff --git a/src/Qiniu/IO/Model/ResumeInfo.cs b/src/Qiniu/IO/Model/ResumeInfo.cs new file mode 100644 index 00000000..d40a1fd8 --- /dev/null +++ b/src/Qiniu/IO/Model/ResumeInfo.cs @@ -0,0 +1,28 @@ +namespace Qiniu.IO.Model +{ + /// + /// 断点续上传断点信息 + /// + public class ResumeInfo + { + /// + /// 文件大小 + /// + public long FileSize { get; set; } + + /// + /// 当前块编号 + /// + public int BlockIndex { get; set; } + + /// + /// 文件块总数 + /// + public int BlockCount { get; set; } + + /// + /// 上下文信息列表 + /// + public string[] Contexts { get; set; } + } +} diff --git a/src/Qiniu/IO/Model/UploadController.cs b/src/Qiniu/IO/Model/UploadController.cs new file mode 100644 index 00000000..f66c68f3 --- /dev/null +++ b/src/Qiniu/IO/Model/UploadController.cs @@ -0,0 +1,29 @@ +namespace Qiniu.IO.Model +{ + /// + /// 上传任务的状态 + /// + public enum UPTS + { + /// + /// 任务状态:激活 + /// + Activated, + + /// + /// 任务状态:暂停 + /// + Suspended, + + /// + /// 任务状态:退出 + /// + Aborted + }; + + /// + /// 上传任务的控制函数 + /// + /// + public delegate UPTS UploadController(); +} diff --git a/src/Qiniu/IO/Model/UploadProgressHandler.cs b/src/Qiniu/IO/Model/UploadProgressHandler.cs new file mode 100644 index 00000000..eaa5242d --- /dev/null +++ b/src/Qiniu/IO/Model/UploadProgressHandler.cs @@ -0,0 +1,9 @@ +namespace Qiniu.IO.Model +{ + /// + /// 分片上传进度处理 + /// + /// 已上传的字节数 + /// 文件总字节数 + public delegate void UploadProgressHandler(long uploadedBytes, long totalBytes); +} diff --git a/src/Qiniu/IO/ResumableUploader.cs b/src/Qiniu/IO/ResumableUploader.cs new file mode 100644 index 00000000..fe8a3749 --- /dev/null +++ b/src/Qiniu/IO/ResumableUploader.cs @@ -0,0 +1,1482 @@ +using System; +using System.IO; +using System.Text; +using System.Collections.Generic; +using System.Threading; +using Qiniu.Common; +using Qiniu.IO.Model; +using Qiniu.Util; +using Qiniu.Http; +using Newtonsoft.Json; + +namespace Qiniu.IO +{ + /// + /// 分片上传/断点续上传,适合于以下情形(2)(3) + /// + /// (1)网络较好并且待上传的文件体积较小时使用简单上传 + /// + /// (2)文件较大或者网络状况不理想时请使用分片上传 + /// + /// (3)文件较大上传需要花费较长时间,建议使用断点续上传 + /// + public class ResumableUploader + { + //分片上传切片大小(要求:一个块能够恰好被分割为若干片),可根据ChunkUnit设置 + private int CHUNK_SIZE; + + //分片上传块的大小,固定为4M,不可修改 + private const int BLOCK_SIZE = 4 * 1024 * 1024; + + + // 上传域名,默认Config.ZONE.upHost + private string uploadHost; + + // HTTP请求管理器(GET/POST) + private HttpManager httpManager; + + /// + /// 初始化 + /// + /// 是否从CDN上传 + /// 分片大小 + public ResumableUploader(bool uploadFromCDN = false, ChunkUnit chunkUnit = ChunkUnit.U2048K) + { + uploadHost = uploadFromCDN ? Config.ZONE.UploadHost : Config.ZONE.UpHost; + + httpManager = new HttpManager(); + + CHUNK_SIZE = RCU.getChunkSize(chunkUnit); + } + + /// + /// 分片上传/断点续上传 + /// 使用默认记录文件(recordFile)和默认进度处理(progressHandler) + /// + /// 本地待上传的文件名 + /// 要保存的文件名称 + /// 上传凭证 + /// 上传结果 + public HttpResult uploadFile(string localFile, string saveKey, string token) + { + string ruFile = "QiniuRU_" + StringHelper.calcMD5(localFile + saveKey); + string recordFile = Path.Combine(UserEnv.getHomeFolder(), ruFile); + UploadProgressHandler uppHandler = new UploadProgressHandler(defaultUploadProgressHandler); + return uploadFile(localFile, saveKey, token, recordFile, uppHandler); + } + + /// + /// 分片上传/断点续上传 + /// 使用默认进度处理(progressHandler) + /// + /// 本地待上传的文件名 + /// 要保存的文件名称 + /// 上传凭证 + /// 记录文件(记录断点信息) + /// 上传结果 + public HttpResult uploadFile(string localFile, string saveKey, string token, string recordFile) + { + UploadProgressHandler uppHandler = new UploadProgressHandler(defaultUploadProgressHandler); + return uploadFile(localFile, saveKey, token, recordFile, uppHandler); + } + + /// + /// 分片上传/断点续上传,带有自定义进度处理 + /// + /// 本地待上传的文件名 + /// 要保存的文件名称 + /// 上传凭证 + /// 记录文件(记录断点信息) + /// 上传进度处理 + /// 上传结果 + public HttpResult uploadFile(string localFile, string saveKey, string token, string recordFile, UploadProgressHandler uppHandler) + { + HttpResult result = new HttpResult(); + + FileStream fs = null; + + if(uppHandler==null) + { + uppHandler = defaultUploadProgressHandler; + } + + try + { + string s = null; + + fs = new FileStream(localFile, FileMode.Open); + + long fileSize = fs.Length; + long chunkSize = CHUNK_SIZE; + long blockSize = BLOCK_SIZE; + byte[] chunkBuffer = new byte[chunkSize]; + int blockCount = (int)((fileSize + blockSize - 1) / blockSize); + + ResumeInfo resumeInfo = ResumeHelper.Load(recordFile); + if (resumeInfo == null) + { + resumeInfo = new ResumeInfo() + { + FileSize = fileSize, + BlockIndex = 0, + BlockCount = blockCount, + Contexts = new string[blockCount] + }; + + ResumeHelper.Save(resumeInfo, recordFile); + } + + int index = resumeInfo.BlockIndex; + long offset = index * blockSize; + string context = null; + long leftBytes = fileSize - offset; + long blockLeft = 0; + long blockOffset = 0; + HttpResult hr = null; + ResumeContext rc = null; + + fs.Seek(offset, SeekOrigin.Begin); + + while (leftBytes > 0) + { + #region one_block + + #region mkblk + if (leftBytes < BLOCK_SIZE) + { + blockSize = leftBytes; + } + else + { + blockSize = BLOCK_SIZE; + } + if (leftBytes < CHUNK_SIZE) + { + chunkSize = leftBytes; + } + else + { + chunkSize = CHUNK_SIZE; + } + + fs.Read(chunkBuffer, 0, (int)chunkSize); + hr = mkblk(chunkBuffer, offset, blockSize, chunkSize, token); + if (hr.Code != HttpHelper.STATUS_CODE_OK) + { + result.shadow(hr); + s = string.Format("[ResumableUpload] Error: mkblk: offset={0}, blockSize={1}, chunkSize={2}, @{3}\n", + offset, blockSize, chunkSize, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + return result; + } + + rc = JsonConvert.DeserializeObject(hr.Text); + context = rc.Ctx; + offset += chunkSize; + leftBytes -= chunkSize; + #endregion mkblk + + uppHandler(offset, fileSize); + + if (leftBytes > 0) + { + blockLeft = blockSize - chunkSize; + blockOffset = chunkSize; + while (blockLeft > 0) + { + #region bput-loop + + if (blockLeft < CHUNK_SIZE) + { + chunkSize = blockLeft; + } + else + { + chunkSize = CHUNK_SIZE; + } + + fs.Read(chunkBuffer, 0, (int)chunkSize); + hr = bput(chunkBuffer, blockOffset, chunkSize, context, token); + if (hr.Code != HttpHelper.STATUS_CODE_OK) + { + result.shadow(hr); + s = string.Format("[ResumableUpload] Error: bput: offset={0}, blockOffset={1}, chunkSize={2}, @{3}\n", + offset, blockOffset, chunkSize, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + return result; + } + + rc = JsonConvert.DeserializeObject(hr.Text); + context = rc.Ctx; + + offset += chunkSize; + leftBytes -= chunkSize; + blockOffset += chunkSize; + blockLeft -= chunkSize; + #endregion bput-loop + + uppHandler(offset, fileSize); + } + } + + #endregion one_block + + resumeInfo.BlockIndex = index; + resumeInfo.Contexts[index] = context; + ResumeHelper.Save(resumeInfo, recordFile); + ++index; + } + + hr = mkfile(localFile, fileSize, saveKey, HttpHelper.CONTENT_TYPE_APP_OCTET, resumeInfo.Contexts, token); + if (hr.Code != HttpHelper.STATUS_CODE_OK) + { + result.shadow(hr); + s = string.Format("[ResumableUpload] Error: mkfile @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + return result; + } + + File.Delete(recordFile); + result.shadow(hr); + s = string.Format("[ResumableUpload] Uploaded: \"{0}\" ==> \"{1}\", @{2}\n", + localFile, saveKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[ResumableUpload] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + finally + { + if (fs != null) + { + fs.Dispose(); + } + } + + return result; + } + + /// + /// 分片上传/断点续上传,带有自定义进度处理、高级控制功能 + /// + /// 本地待上传的文件名 + /// 要保存的文件名称 + /// 上传凭证 + /// 记录文件(记录断点信息) + /// 上传进度处理 + /// 上传控制(暂停/继续/退出) + /// 上传结果 + public HttpResult uploadFile(string localFile, string saveKey, string token, string recordFile, UploadProgressHandler uppHandler, UploadController uploadController) + { + HttpResult result = new HttpResult(); + + FileStream fs = null; + + if (uppHandler == null) + { + uppHandler = new UploadProgressHandler(defaultUploadProgressHandler); + } + + try + { + string s = null; + + fs = new FileStream(localFile, FileMode.Open); + + long fileSize = fs.Length; + long chunkSize = CHUNK_SIZE; + long blockSize = BLOCK_SIZE; + byte[] chunkBuffer = new byte[chunkSize]; + int blockCount = (int)((fileSize + blockSize - 1) / blockSize); + + ResumeInfo resumeInfo = ResumeHelper.Load(recordFile); + if (resumeInfo == null) + { + resumeInfo = new ResumeInfo() + { + FileSize = fileSize, + BlockIndex = 0, + BlockCount = blockCount, + Contexts = new string[blockCount] + }; + + ResumeHelper.Save(resumeInfo, recordFile); + } + + int index = resumeInfo.BlockIndex; + long offset = index * blockSize; + string context = null; + long leftBytes = fileSize - offset; + long blockLeft = 0; + long blockOffset = 0; + HttpResult hr = null; + ResumeContext rc = null; + + fs.Seek(offset, SeekOrigin.Begin); + + var upts = UPTS.Activated; + bool bres = true; + var mres = new ManualResetEvent(true); + + while (leftBytes > 0) + { + // 每上传一个BLOCK之前,都要检查一下UPTS + upts = uploadController(); + + if (upts == UPTS.Aborted) + { + result.Code = HttpHelper.STATUS_CODE_USER_CANCELED; + result.RefCode = HttpHelper.STATUS_CODE_USER_CANCELED; + s = string.Format("[ResumableUpload] Info: upload task is aborted @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + Console.WriteLine(s); + return result; + } + else if (upts == UPTS.Suspended) + { + if (bres) + { + bres = false; + mres.Reset(); + + result.RefCode = HttpHelper.STATUS_CODE_USER_PAUSED; + s = string.Format("[ResumableUpload] Info: upload task is paused @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + Console.WriteLine(s); + } + mres.WaitOne(1000); + } + else + { + if (!bres) + { + bres = true; + mres.Set(); + + result.RefCode = HttpHelper.STATUS_CODE_USER_RESUMED; + s = string.Format("[ResumableUpload] Info: upload task is resumed @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + Console.WriteLine(s); + } + + #region one_block + + #region mkblk + if (leftBytes < BLOCK_SIZE) + { + blockSize = leftBytes; + } + else + { + blockSize = BLOCK_SIZE; + } + if (leftBytes < CHUNK_SIZE) + { + chunkSize = leftBytes; + } + else + { + chunkSize = CHUNK_SIZE; + } + + fs.Read(chunkBuffer, 0, (int)chunkSize); + hr = mkblk(chunkBuffer, offset, blockSize, chunkSize, token); + if (hr.Code != HttpHelper.STATUS_CODE_OK) + { + result.shadow(hr); + s = string.Format("[ResumableUpload] Error: mkblk: offset={0}, blockSize={1}, chunkSize={2}, @{3}\n", + offset, blockSize, chunkSize, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + return result; + } + + rc = JsonConvert.DeserializeObject(hr.Text); + context = rc.Ctx; + offset += chunkSize; + leftBytes -= chunkSize; + #endregion mkblk + + uppHandler(offset, fileSize); + + if (leftBytes > 0) + { + blockLeft = blockSize - chunkSize; + blockOffset = chunkSize; + while (blockLeft > 0) + { + #region bput-loop + + if (blockLeft < CHUNK_SIZE) + { + chunkSize = blockLeft; + } + else + { + chunkSize = CHUNK_SIZE; + } + + fs.Read(chunkBuffer, 0, (int)chunkSize); + hr = bput(chunkBuffer, blockOffset, chunkSize, context, token); + if (hr.Code != HttpHelper.STATUS_CODE_OK) + { + result.shadow(hr); + s = string.Format("[ResumableUpload] Error: bput: offset={0}, blockOffset={1}, chunkSize={2}, @{3}\n", + offset, blockOffset, chunkSize, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + return result; + } + + rc = JsonConvert.DeserializeObject(hr.Text); + context = rc.Ctx; + + offset += chunkSize; + leftBytes -= chunkSize; + blockOffset += chunkSize; + blockLeft -= chunkSize; + #endregion bput-loop + + uppHandler(offset, fileSize); + } + } + + #endregion one_block + + resumeInfo.BlockIndex = index; + resumeInfo.Contexts[index] = context; + ResumeHelper.Save(resumeInfo, recordFile); + ++index; + } + } + + hr = mkfile(localFile, fileSize, saveKey, HttpHelper.CONTENT_TYPE_APP_OCTET, resumeInfo.Contexts, token); + if (hr.Code != HttpHelper.STATUS_CODE_OK) + { + result.shadow(hr); + s = string.Format("[ResumableUpload] Error: mkfile @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + return result; + } + + File.Delete(recordFile); + result.shadow(hr); + s = string.Format("[ResumableUpload] Uploaded: \"{0}\" ==> \"{1}\", @{2}\n", + localFile, saveKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[ResumableUpload] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + finally + { + if (fs != null) + { + fs.Dispose(); + } + } + + return result; + } + + /// + /// 高级上传,分片上传/断点续上传,检查CRC32,支持重试 + /// 使用默认记录文件(recordFile)和默认进度处理(progressHandler) + /// + /// 本地待上传的文件名 + /// 要保存的文件名称 + /// 上传凭证 + /// 最大尝试次数 + /// 上传结果 + public HttpResult uploadFileAdvanced(string localFile, string saveKey, string token, int maxTry) + { + string ruFile = "QiniuRU_" + StringHelper.calcMD5(localFile + saveKey); + string recordFile = Path.Combine(UserEnv.getHomeFolder(), ruFile); + UploadProgressHandler uppHandler = new UploadProgressHandler(defaultUploadProgressHandler); + return uploadFileAdvanced(localFile, saveKey, token, recordFile, maxTry, uppHandler); + } + + /// + /// 高级上传,分片上传/断点续上传,检查CRC32,支持重试 + /// 使用默认进度处理(progressHandler) + /// + /// 本地待上传的文件名 + /// 要保存的文件名称 + /// 上传凭证 + /// 记录文件(记录断点信息) + /// 最大尝试次数 + /// 上传结果 + public HttpResult uploadFileAdvanced(string localFile, string saveKey, string token, string recordFile, int maxTry) + { + UploadProgressHandler uppHandler = new UploadProgressHandler(defaultUploadProgressHandler); + return uploadFileAdvanced(localFile, saveKey, token, recordFile, maxTry, uppHandler); + } + + /// + /// 高级上传,分片上传/断点续上传,检查CRC32,带有自定义进度处理,支持重试 + /// + /// 本地待上传的文件名 + /// 要保存的文件名称 + /// 上传凭证 + /// 记录文件(记录断点信息) + /// 最大尝试次数 + /// 上传进度处理 + /// 上传结果 + public HttpResult uploadFileAdvanced(string localFile, string saveKey, string token, string recordFile, int maxTry, UploadProgressHandler uppHandler) + { + HttpResult result = new HttpResult(); + + FileStream fs = null; + + int MAX_TRY = getMaxTry(maxTry); + + if (uppHandler == null) + { + uppHandler = defaultUploadProgressHandler; + } + + try + { + string s = null; + + fs = new FileStream(localFile, FileMode.Open); + + long fileSize = fs.Length; + long chunkSize = CHUNK_SIZE; + long blockSize = BLOCK_SIZE; + byte[] chunkBuffer = new byte[chunkSize]; + int blockCount = (int)((fileSize + blockSize - 1) / blockSize); + + ResumeInfo resumeInfo = ResumeHelper.Load(recordFile); + if (resumeInfo == null) + { + resumeInfo = new ResumeInfo() + { + FileSize = fileSize, + BlockIndex = 0, + BlockCount = blockCount, + Contexts = new string[blockCount] + }; + + ResumeHelper.Save(resumeInfo, recordFile); + } + + int index = resumeInfo.BlockIndex; + long offset = index * blockSize; + string context = null; + long leftBytes = fileSize - offset; + long blockLeft = 0; + long blockOffset = 0; + HttpResult hr = null; + ResumeContext rc = null; + + fs.Seek(offset, SeekOrigin.Begin); + + int iTry = 0; + + while (leftBytes > 0) + { + #region one_block + + #region mkblk + if (leftBytes < BLOCK_SIZE) + { + blockSize = leftBytes; + } + else + { + blockSize = BLOCK_SIZE; + } + if (leftBytes < CHUNK_SIZE) + { + chunkSize = leftBytes; + } + else + { + chunkSize = CHUNK_SIZE; + } + + fs.Read(chunkBuffer, 0, (int)chunkSize); + + iTry = 0; + while (++iTry <= MAX_TRY) + { + s = string.Format("[ResumableUpload] try mkblk#{0} @{1}\n", iTry, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + + hr = mkblkChecked(chunkBuffer, offset, blockSize, chunkSize, token); + + if (hr.Code == HttpHelper.STATUS_CODE_OK && hr.RefCode != HttpHelper.STATUS_CODE_NEED_RETRY) + { + break; + } + } + + if (hr.Code != HttpHelper.STATUS_CODE_OK || hr.RefCode == HttpHelper.STATUS_CODE_NEED_RETRY) + { + result.shadow(hr); + s = string.Format("[ResumableUpload] Error: mkblk: offset={0}, blockSize={1}, chunkSize={2}, @{3}\n", + offset, blockSize, chunkSize, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + return result; + } + + rc = JsonConvert.DeserializeObject(hr.Text); + context = rc.Ctx; + offset += chunkSize; + leftBytes -= chunkSize; + #endregion mkblk + + uppHandler(offset, fileSize); + + if (leftBytes > 0) + { + blockLeft = blockSize - chunkSize; + blockOffset = chunkSize; + while (blockLeft > 0) + { + #region bput-loop + + if (blockLeft < CHUNK_SIZE) + { + chunkSize = blockLeft; + } + else + { + chunkSize = CHUNK_SIZE; + } + + fs.Read(chunkBuffer, 0, (int)chunkSize); + + iTry = 0; + while (++iTry <= MAX_TRY) + { + s = string.Format("[ResumableUpload] try bput#{0} @{1}\n", iTry, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + + hr = bputChecked(chunkBuffer, blockOffset, chunkSize, context, token); + + if (hr.Code == HttpHelper.STATUS_CODE_OK && hr.RefCode != HttpHelper.STATUS_CODE_NEED_RETRY) + { + break; + } + } + if (hr.Code != HttpHelper.STATUS_CODE_OK || hr.RefCode == HttpHelper.STATUS_CODE_NEED_RETRY) + { + result.shadow(hr); + s = string.Format("[ResumableUpload] Error: bput: offset={0}, blockOffset={1}, chunkSize={2}, @{3}\n", + offset, blockOffset, chunkSize, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + return result; + } + + rc = JsonConvert.DeserializeObject(hr.Text); + context = rc.Ctx; + + offset += chunkSize; + leftBytes -= chunkSize; + blockOffset += chunkSize; + blockLeft -= chunkSize; + #endregion bput-loop + + uppHandler(offset, fileSize); + } + } + + #endregion one_block + + resumeInfo.BlockIndex = index; + resumeInfo.Contexts[index] = context; + ResumeHelper.Save(resumeInfo, recordFile); + ++index; + } + + hr = mkfile(localFile, fileSize, saveKey, HttpHelper.CONTENT_TYPE_APP_OCTET, resumeInfo.Contexts, token); + if (hr.Code != HttpHelper.STATUS_CODE_OK) + { + result.shadow(hr); + s = string.Format("[ResumableUpload] Error: mkfile @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + return result; + } + + File.Delete(recordFile); + result.shadow(hr); + s = string.Format("[ResumableUpload] Uploaded: \"{0}\" ==> \"{1}\", @{2}\n", + localFile, saveKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[ResumableUpload] Error: \n"); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + finally + { + if (fs != null) + { + fs.Dispose(); + } + } + + return result; + } + + /// + /// 高级上传,分片上传/断点续上传,检查CRC32,,带有自定义进度处理和上传控制,支持重试 + /// + /// 本地待上传的文件名 + /// 要保存的文件名称 + /// 上传凭证 + /// 记录文件(记录断点信息) + /// 最大尝试次数 + /// 上传进度处理 + /// 上传控制(暂停/继续/退出) + /// 上传结果 + public HttpResult uploadFileAdvanced(string localFile, string saveKey, string token, string recordFile, int maxTry, UploadProgressHandler uppHandler, UploadController uploadController) + { + HttpResult result = new HttpResult(); + + FileStream fs = null; + + int MAX_TRY = getMaxTry(maxTry); + + if (uppHandler == null) + { + uppHandler = defaultUploadProgressHandler; + } + + try + { + string s = null; + + fs = new FileStream(localFile, FileMode.Open); + + long fileSize = fs.Length; + long chunkSize = CHUNK_SIZE; + long blockSize = BLOCK_SIZE; + byte[] chunkBuffer = new byte[chunkSize]; + int blockCount = (int)((fileSize + blockSize - 1) / blockSize); + + ResumeInfo resumeInfo = ResumeHelper.Load(recordFile); + if (resumeInfo == null) + { + resumeInfo = new ResumeInfo() + { + FileSize = fileSize, + BlockIndex = 0, + BlockCount = blockCount, + Contexts = new string[blockCount] + }; + + ResumeHelper.Save(resumeInfo, recordFile); + } + + int index = resumeInfo.BlockIndex; + long offset = index * blockSize; + string context = null; + long leftBytes = fileSize - offset; + long blockLeft = 0; + long blockOffset = 0; + HttpResult hr = null; + ResumeContext rc = null; + + fs.Seek(offset, SeekOrigin.Begin); + + var upts = UPTS.Activated; + bool bres = true; + var mres = new ManualResetEvent(true); + int iTry = 0; + + while (leftBytes > 0) + { + // 每上传一个BLOCK之前,都要检查一下UPTS + upts = uploadController(); + + if (upts == UPTS.Aborted) + { + result.Code = HttpHelper.STATUS_CODE_USER_CANCELED; + result.RefCode = HttpHelper.STATUS_CODE_USER_CANCELED; + s = string.Format("[ResumableUpload] Info: upload task is aborted @{0}\n", + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + Console.WriteLine(s); + return result; + } + else if (upts == UPTS.Suspended) + { + if (bres) + { + bres = false; + mres.Reset(); + + result.RefCode = HttpHelper.STATUS_CODE_USER_PAUSED; + s = string.Format("[ResumableUpload] Info: upload task is paused @{0}\n", + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + Console.WriteLine(s); + } + mres.WaitOne(1000); + } + else + { + if (!bres) + { + bres = true; + mres.Set(); + + result.RefCode = HttpHelper.STATUS_CODE_USER_RESUMED; + s = string.Format("[ResumableUpload] Info: upload task is resumed @{0}\n", + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + Console.WriteLine(s); + } + + #region one_block + + #region mkblk + if (leftBytes < BLOCK_SIZE) + { + blockSize = leftBytes; + } + else + { + blockSize = BLOCK_SIZE; + } + if (leftBytes < CHUNK_SIZE) + { + chunkSize = leftBytes; + } + else + { + chunkSize = CHUNK_SIZE; + } + + fs.Read(chunkBuffer, 0, (int)chunkSize); + + iTry = 0; + while (++iTry <= MAX_TRY) + { + s = string.Format("[ResumableUpload] try mkblk#{0} @{1}\n", iTry, + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + + hr = mkblkChecked(chunkBuffer, offset, blockSize, chunkSize, token); + + if (hr.Code == HttpHelper.STATUS_CODE_OK && hr.RefCode != HttpHelper.STATUS_CODE_NEED_RETRY) + { + break; + } + } + if (hr.Code != HttpHelper.STATUS_CODE_OK || hr.RefCode == HttpHelper.STATUS_CODE_NEED_RETRY) + { + result.shadow(hr); + s = string.Format("[ResumableUpload] Error: mkblk: offset={0}, blockSize={1}, chunkSize={2}, @{3}\n", + offset, blockSize, chunkSize, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + return result; + } + + rc = JsonConvert.DeserializeObject(hr.Text); + context = rc.Ctx; + offset += chunkSize; + leftBytes -= chunkSize; + #endregion mkblk + + uppHandler(offset, fileSize); + + if (leftBytes > 0) + { + blockLeft = blockSize - chunkSize; + blockOffset = chunkSize; + while (blockLeft > 0) + { + #region bput-loop + + if (blockLeft < CHUNK_SIZE) + { + chunkSize = blockLeft; + } + else + { + chunkSize = CHUNK_SIZE; + } + + fs.Read(chunkBuffer, 0, (int)chunkSize); + + iTry = 0; + while (++iTry <= MAX_TRY) + { + s = string.Format("[ResumableUpload] try bput#{0} @{1}\n", iTry, + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + + hr = bputChecked(chunkBuffer, blockOffset, chunkSize, context, token); + + if (hr.Code == HttpHelper.STATUS_CODE_OK && hr.RefCode != HttpHelper.STATUS_CODE_NEED_RETRY) + { + break; + } + } + if (hr.Code != HttpHelper.STATUS_CODE_OK || hr.RefCode == HttpHelper.STATUS_CODE_NEED_RETRY) + { + result.shadow(hr); + s = string.Format("[ResumableUpload] Error: bput: offset={0}, blockOffset={1}, chunkSize={2}, @{3}\n", + offset, blockOffset, chunkSize, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + return result; + } + + rc = JsonConvert.DeserializeObject(hr.Text); + context = rc.Ctx; + + offset += chunkSize; + leftBytes -= chunkSize; + blockOffset += chunkSize; + blockLeft -= chunkSize; + #endregion bput-loop + + uppHandler(offset, fileSize); + } + } + + #endregion one_block + + resumeInfo.BlockIndex = index; + resumeInfo.Contexts[index] = context; + ResumeHelper.Save(resumeInfo, recordFile); + ++index; + } + } + + hr = mkfile(localFile, fileSize, saveKey, HttpHelper.CONTENT_TYPE_APP_OCTET, resumeInfo.Contexts, token); + if (hr.Code != HttpHelper.STATUS_CODE_OK) + { + result.shadow(hr); + s = string.Format("[ResumableUpload] Error: mkfile @{0}\n", + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + return result; + } + + File.Delete(recordFile); + result.shadow(hr); + s = string.Format("[ResumableUpload] Uploaded: \"{0}\" ==> \"{1}\", @{2}\n", + localFile, saveKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[ResumableUpload] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + finally + { + if (fs != null) + { + fs.Dispose(); + } + } + + return result; + } + + /// + /// 上传数据流-分片方式 + /// + /// 数据流,流长度必须可确定 + /// 要保存的key + /// 上传凭证 + /// 上传进度处理 + /// + public HttpResult uploadStream(Stream stream,string saveKey,string token,UploadProgressHandler uppHandler) + { + HttpResult result = new HttpResult(); + + if(uppHandler==null) + { + uppHandler = new UploadProgressHandler(defaultUploadProgressHandler); + } + + try + { + string s = null; + + long fileSize = stream.Length; + long chunkSize = CHUNK_SIZE; + long blockSize = BLOCK_SIZE; + byte[] chunkBuffer = new byte[chunkSize]; + int blockCount = (int)((fileSize + blockSize - 1) / blockSize); + + ResumeInfo resumeInfo = new ResumeInfo() + { + FileSize = fileSize, + BlockIndex = 0, + BlockCount = blockCount, + Contexts = new string[blockCount] + }; + + int index = 0; + long offset = 0; + string context = null; + long leftBytes = fileSize; + long blockLeft = 0; + long blockOffset = 0; + HttpResult hr = null; + ResumeContext rc = null; + + while (leftBytes > 0) + { + #region one_block + + #region mkblk + if (leftBytes < BLOCK_SIZE) + { + blockSize = leftBytes; + } + else + { + blockSize = BLOCK_SIZE; + } + if (leftBytes < CHUNK_SIZE) + { + chunkSize = leftBytes; + } + else + { + chunkSize = CHUNK_SIZE; + } + + stream.Read(chunkBuffer, 0, (int)chunkSize); + hr = mkblk(chunkBuffer, offset, blockSize, chunkSize, token); + if (hr.Code != HttpHelper.STATUS_CODE_OK) + { + result.shadow(hr); + s = string.Format("[ResumableUpload] Error: mkblk: offset={0}, blockSize={1}, chunkSize={2}, @{3}\n", + offset, blockSize, chunkSize, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + return result; + } + + rc = JsonConvert.DeserializeObject(hr.Text); + context = rc.Ctx; + offset += chunkSize; + leftBytes -= chunkSize; + #endregion mkblk + + uppHandler(offset, fileSize); + + if (leftBytes > 0) + { + blockLeft = blockSize - chunkSize; + blockOffset = chunkSize; + while (blockLeft > 0) + { + #region bput-loop + + if (blockLeft < CHUNK_SIZE) + { + chunkSize = blockLeft; + } + else + { + chunkSize = CHUNK_SIZE; + } + + stream.Read(chunkBuffer, 0, (int)chunkSize); + hr = bput(chunkBuffer, blockOffset, chunkSize, context, token); + if (hr.Code != HttpHelper.STATUS_CODE_OK) + { + result.shadow(hr); + s = string.Format("[ResumableUpload] Error: bput: offset={0}, blockOffset={1}, chunkSize={2}, @{3}\n", + offset, blockOffset, chunkSize, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + return result; + } + + rc = JsonConvert.DeserializeObject(hr.Text); + context = rc.Ctx; + + offset += chunkSize; + leftBytes -= chunkSize; + blockOffset += chunkSize; + blockLeft -= chunkSize; + #endregion bput-loop + + uppHandler(offset, fileSize); + } + } + + #endregion one_block + + resumeInfo.BlockIndex = index; + resumeInfo.Contexts[index] = context; + ++index; + } + + hr = mkfile("#DATA#", fileSize, saveKey, HttpHelper.CONTENT_TYPE_APP_OCTET, resumeInfo.Contexts, token); + if (hr.Code != HttpHelper.STATUS_CODE_OK) + { + result.shadow(hr); + s = string.Format("[ResumableUpload] Error: mkfile @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + return result; + } + + result.shadow(hr); + s = string.Format("[ResumableUpload] Uploaded: \"#DATA#\" ==> \"{0}\", @{1}\n", + saveKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + result.RefText += s; + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[ResumableUpload] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + //finally + //{ + // //stream + //} + + return result; + } + + /// + /// 上传数据 + /// + /// 待上传的数据 + /// 要保存的key + /// 上传凭证 + /// 上传进度处理 + /// + public HttpResult uploadData(byte[] data,string saveKey,string token,UploadProgressHandler uppHandler) + { + Stream stream = new MemoryStream(data); + return uploadStream(stream, saveKey, token, uppHandler); + } + + /// + /// 默认的进度处理函数 + /// + /// 已上传的字节数 + /// 文件总字节数 + public static void defaultUploadProgressHandler(long uploadedBytes, long totalBytes) + { + if (uploadedBytes < totalBytes) + { + Console.WriteLine("[ResumableUpload] Progress: {0,7:0.000}%", 100.0 * uploadedBytes / totalBytes); + } + else + { + Console.WriteLine("[ResumableUpload] Progress: finished\n"); + } + } + + /// + /// 默认的上传控制函数 + /// + /// 控制状态 + public static UPTS defaultUploadController() + { + return UPTS.Activated; + } + + /// + /// 创建文件 + /// + private HttpResult mkfile(string fileName, long size, string saveKey, string mimeType, string[] contexts, string token) + { + HttpResult result = new HttpResult(); + + try + { + string fnameStr = string.Format("/fname/{0}", StringHelper.urlSafeBase64Encode(fileName)); + string mimeTypeStr = string.Format("/mimeType/{0}", StringHelper.urlSafeBase64Encode(mimeType)); + string keyStr = string.Format("/key/{0}", StringHelper.urlSafeBase64Encode(saveKey)); + + string url = string.Format("{0}/mkfile/{1}{2}{3}{4}", uploadHost, size, mimeTypeStr, fnameStr, keyStr); + string body = StringHelper.join(contexts, ","); + string upToken = string.Format("UpToken {0}", token); + + result = httpManager.postForm(url, body, upToken); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("mkfile Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 创建块(携带首片数据) + /// + private HttpResult mkblk(byte[] chunkBuffer, long offset, long blockSize, long chunkSize, string token) + { + HttpResult result = new HttpResult(); + + try + { + string url = string.Format("{0}/mkblk/{1}", uploadHost, blockSize); + string upToken = string.Format("UpToken {0}", token); + byte[] data = (new MemoryStream(chunkBuffer, 0, (int)chunkSize)).ToArray(); + + result = httpManager.postData(url, data, upToken); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("mkblk Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 创建块(携带首片数据),同时检查CRC32 + /// + private HttpResult mkblkChecked(byte[] chunkBuffer, long offset, long blockSize, long chunkSize, string token) + { + HttpResult result = new HttpResult(); + + try + { + string url = string.Format("{0}/mkblk/{1}", uploadHost, blockSize); + string upToken = string.Format("UpToken {0}", token); + byte[] data = (new MemoryStream(chunkBuffer, 0, (int)chunkSize)).ToArray(); + + result = httpManager.postData(url, data, upToken); + + if (result.Code == HttpHelper.STATUS_CODE_OK) + { + var rd = JsonConvert.DeserializeObject>(result.Text); + if (rd.ContainsKey("crc32")) + { + uint crc_1 = Convert.ToUInt32(rd["crc32"]); + uint crc_2 = CRC32.checkSumSlice(chunkBuffer, 0, (int)chunkSize); + if (crc_1 != crc_2) + { + result.RefCode = HttpHelper.STATUS_CODE_NEED_RETRY; + result.RefText += string.Format(" CRC32: remote={0}, local={1}\n", crc_1, crc_2); + } + } + } + else + { + result.RefCode = HttpHelper.STATUS_CODE_NEED_RETRY; + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("mkblk Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 上传数据片 + /// + private HttpResult bput(byte[] chunkBuffer, long offset, long chunkSize, string context, string token) + { + HttpResult result = new HttpResult(); + + try + { + string url = string.Format("{0}/bput/{1}/{2}", uploadHost, context, offset); + string upToken = string.Format("UpToken {0}", token); + byte[] data = (new MemoryStream(chunkBuffer, 0, (int)chunkSize)).ToArray(); + + result = httpManager.postData(url, data, upToken); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("bput Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 上传数据片,同时检查CRC32 + /// + /// + /// + /// + /// + /// + /// + private HttpResult bputChecked(byte[] chunkBuffer, long offset, long chunkSize, string context, string token) + { + HttpResult result = new HttpResult(); + + try + { + string url = string.Format("{0}/bput/{1}/{2}", uploadHost, context, offset); + string upToken = string.Format("UpToken {0}", token); + byte[] data = (new MemoryStream(chunkBuffer, 0, (int)chunkSize)).ToArray(); + + result = httpManager.postData(url, data, upToken); + + if (result.Code == HttpHelper.STATUS_CODE_OK) + { + var rd = JsonConvert.DeserializeObject>(result.Text); + if (rd.ContainsKey("crc32")) + { + uint crc_1 = Convert.ToUInt32(rd["crc32"]); + uint crc_2 = CRC32.checkSumSlice(chunkBuffer, 0, (int)chunkSize); + if (crc_1 != crc_2) + { + result.RefCode = HttpHelper.STATUS_CODE_NEED_RETRY; + result.RefText += string.Format(" CRC32: remote={0}, local={1}\n", crc_1, crc_2); + } + } + } + else + { + result.RefCode = HttpHelper.STATUS_CODE_NEED_RETRY; + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("bput Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 设置最大尝试次数,取值范围1~20 + /// + /// 用户设置得最大尝试次数 + /// + private int getMaxTry(int maxTry) + { + int iMaxTry = 5; + int MIN = 1; + int MAX = 20; + + if (maxTry < MIN) + { + iMaxTry = MIN; + } + else if (maxTry > MAX) + { + iMaxTry = MAX; + } + else + { + iMaxTry = maxTry; + } + + return iMaxTry; + } + } +} diff --git a/src/Qiniu/IO/SimpleUploader.cs b/src/Qiniu/IO/SimpleUploader.cs new file mode 100644 index 00000000..2de651da --- /dev/null +++ b/src/Qiniu/IO/SimpleUploader.cs @@ -0,0 +1,186 @@ +using System; +using System.IO; +using System.Text; +using Qiniu.Common; +using Qiniu.Http; + +namespace Qiniu.IO +{ + /// + /// 简单上传,适合于以下情形(1) + /// + /// (1)网络较好并且待上传的文件体积较小时使用简单上传 + /// + /// (2)文件较大或者网络状况不理想时请使用分片上传 + /// + /// (3)文件较大上传需要花费较长时间,建议使用断点续上传 + /// + public class SimpleUploader + { + // 上传域名,默认Config.ZONE.upHost + private string uploadHost; + + private HttpManager httpManager; + + /// + /// 初始化 + /// + /// 是否从CDN上传 + public SimpleUploader(bool uploadFromCDN = false) + { + httpManager = new HttpManager(); + + uploadHost = uploadFromCDN ? Config.ZONE.UploadHost : Config.ZONE.UpHost; + } + + /// + /// 上传文件 + /// 需要提供正确的上传凭证(参阅[1],另关于上传策略请参阅[2]) + /// [1] http://developer.qiniu.com/article/developer/security/upload-token.html + /// [2] http://developer.qiniu.com/article/developer/security/put-policy.html + /// + /// 待上传的本地文件 + /// 要保存的目标文件名称 + /// 上传凭证 + /// 上传结果 + public HttpResult uploadFile(string localFile, string saveKey, string token) + { + HttpResult result = new HttpResult(); + + try + { + string boundary = HttpHelper.createFormDataBoundary(); + string sep = "--" + boundary; + StringBuilder sb = new StringBuilder(); + + sb.AppendLine(sep); + + sb.AppendLine("Content-Disposition: form-data; name=key\r\n"); + sb.AppendLine(saveKey); + sb.AppendLine(sep); + + sb.AppendLine("Content-Disposition: form-data; name=token\r\n"); + sb.AppendLine(token); + sb.AppendLine(sep); + + string filename = Path.GetFileName(localFile); + sb.AppendFormat("Content-Disposition: form-data; name=file; filename={0}\r\n\r\n", filename); + + byte[] partData1 = Encoding.UTF8.GetBytes(sb.ToString()); + byte[] partData2 = File.ReadAllBytes(localFile); + byte[] partData3 = Encoding.UTF8.GetBytes(string.Format("\r\n{0}--\r\n", sep)); + + MemoryStream ms = new MemoryStream(); + ms.Write(partData1, 0, partData1.Length); + ms.Write(partData2, 0, partData2.Length); + ms.Write(partData3, 0, partData3.Length); + + result = httpManager.postMultipart(uploadHost, ms.ToArray(), boundary, null); + result.RefText += string.Format("[SimpleUpload] Uploaded: \"{0}\" ==> \"{1}\", @{2}\n", + localFile, saveKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[SimpleUpload] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 上传数据流 + /// + /// 数据流,流长度必须可确定 + /// 要保存的key + /// 上传凭证 + /// + public HttpResult uploadStream(Stream stream,string saveKey,string token) + { + HttpResult result = new HttpResult(); + + try + { + string boundary = HttpHelper.createFormDataBoundary(); + string sep = "--" + boundary; + StringBuilder sb = new StringBuilder(); + + sb.AppendLine(sep); + + sb.AppendLine("Content-Disposition: form-data; name=key\r\n"); + sb.AppendLine(saveKey); + sb.AppendLine(sep); + + sb.AppendLine("Content-Disposition: form-data; name=token\r\n"); + sb.AppendLine(token); + sb.AppendLine(sep); + + string filename = Path.GetFileName(saveKey); + sb.AppendFormat("Content-Disposition: form-data; name=file; filename={0}\r\n\r\n", filename); + + byte[] partData1 = Encoding.UTF8.GetBytes(sb.ToString()); + byte[] partData2 = new byte[stream.Length]; + int offset = 0; + int bytesLeft = (int)(stream.Length); + int bytesRead = 0; + while(bytesLeft>0) + { + bytesRead = stream.Read(partData2, offset, bytesLeft); + offset += bytesRead; + bytesLeft -= bytesLeft; + } + byte[] partData3 = Encoding.UTF8.GetBytes(string.Format("\r\n{0}--\r\n", sep)); + + MemoryStream ms = new MemoryStream(); + ms.Write(partData1, 0, partData1.Length); + ms.Write(partData2, 0, partData2.Length); + ms.Write(partData3, 0, partData3.Length); + + result = httpManager.postMultipart(uploadHost, ms.ToArray(), boundary, null); + result.RefText += string.Format("[SimpleUpload] Uploaded: \"#DATA#\" ==> \"{0}\", @{1}\n", + saveKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[SimpleUpload] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 上传字节数据 + /// + /// 待上传的数据 + /// 要保存的key + /// 上传凭证 + /// + public HttpResult uploadData(byte[] data, string saveKey,string token) + { + Stream stream = new MemoryStream(data); + return uploadStream(stream, saveKey, token); + } + + } +} diff --git a/src/Qiniu/IO/UploadManager.cs b/src/Qiniu/IO/UploadManager.cs new file mode 100644 index 00000000..65382c6d --- /dev/null +++ b/src/Qiniu/IO/UploadManager.cs @@ -0,0 +1,139 @@ +using Qiniu.Common; +using Qiniu.IO.Model; +using System.IO; +using Qiniu.Http; + +namespace Qiniu.IO +{ + /// + /// 上传管理器,根据文件大小以及阈值设置自动选择合适的上传方式,支持以下(1)(2)(3) + /// + /// (1)网络较好并且待上传的文件体积较小时使用简单上传 + /// + /// (2)文件较大或者网络状况不理想时请使用分片上传 + /// + /// (3)文件较大上传需要花费较长时间,建议使用断点续上传 + /// + public class UploadManager + { + // 根据此阈值确定是否使用分片上传(默认值1MB) + private long PUT_THRESHOLD = 1048576; + + // 分片上传的ChunkSize(默认值2MB) + private ChunkUnit CHUNK_UNIT = ChunkUnit.U2048K; + + // 是否从CDN上传 + private bool UPLOAD_FROM_CDN = false; + + /// + /// 初始化 + /// + /// 根据文件大小选择简单上传或分片上传,阈值 + /// 是否从CDN上传 + public UploadManager(long putThreshold = 1048576, bool uploadFromCDN = false) + { + PUT_THRESHOLD = putThreshold; + UPLOAD_FROM_CDN = uploadFromCDN; + } + + /// + /// 设置分片上传的“片”大小(单位:字节) + /// + /// + public void setChunkUnit(ChunkUnit cu) + { + CHUNK_UNIT = cu; + } + + /// + /// 生成上传凭证 + /// 有关上传策略请参阅 http://developer.qiniu.com/article/developer/security/put-policy.html + /// 有关上传凭证请参阅 http://developer.qiniu.com/article/developer/security/upload-token.html + /// + /// 账户访问控制(密钥) + /// 上传策略 + /// + public static string createUploadToken(Mac mac,PutPolicy putPolicy) + { + Signature sx = new Signature(mac); + return sx.signWithData(putPolicy.ToJsonString()); + } + + /// + /// 上传文件 + /// + /// 本地待上传的文件名 + /// 要保存的文件名称 + /// 上传凭证 + /// 上传结果 + public HttpResult uploadFile(string localFile, string saveKey, string token) + { + HttpResult result = new HttpResult(); + + FileInfo fi = new FileInfo(localFile); + if (fi.Length > PUT_THRESHOLD) + { + ResumableUploader ru = new ResumableUploader(UPLOAD_FROM_CDN); + result = ru.uploadFile(localFile, saveKey, token); + } + else + { + SimpleUploader su = new SimpleUploader(UPLOAD_FROM_CDN); + result = su.uploadFile(localFile, saveKey, token); + } + + return result; + } + + /// + /// 上传数据流 + /// + /// 待上传的数据流 + /// 要保存的文件名称 + /// 上传凭证 + /// 上传结果 + public HttpResult uploadStream(Stream stream, string saveKey, string token) + { + HttpResult result = new HttpResult(); + + if (stream.Length > PUT_THRESHOLD) + { + ResumableUploader ru = new ResumableUploader(UPLOAD_FROM_CDN); + result = ru.uploadStream(stream, saveKey, token, null); + } + else + { + SimpleUploader su = new SimpleUploader(UPLOAD_FROM_CDN); + result = su.uploadStream(stream, saveKey, token); + } + + return result; + } + + /// + /// 上传数据 + /// + /// 待上传的数据 + /// 要保存的文件名称 + /// 上传凭证 + /// 上传结果 + public HttpResult uploadData(byte[] data, string saveKey, string token) + { + HttpResult result = new HttpResult(); + + if (data.Length > PUT_THRESHOLD) + { + ResumableUploader ru = new ResumableUploader(UPLOAD_FROM_CDN); + result = ru.uploadData(data, saveKey, token, null); + } + else + { + SimpleUploader su = new SimpleUploader(UPLOAD_FROM_CDN); + result = su.uploadData(data, saveKey, token); + } + + return result; + } + + } +} diff --git a/src/Qiniu/Properties/AssemblyInfo.cs b/src/Qiniu/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..6f23ffe2 --- /dev/null +++ b/src/Qiniu/Properties/AssemblyInfo.cs @@ -0,0 +1,68 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +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: AssemblyConfiguration("")] +[assembly: AssemblyCompany("QINIU")] + +#if Net20 + +[assembly: AssemblyProduct("Qiniu (Cloud) C# SDK v7.2.2.0 (.NET 2.0)")] +[assembly: AssemblyTitle("Qiniu (Cloud) C# SDK v7.2.2.0 (.NET 2.0)")] +[assembly: AssemblyDescription("Qiniu (Cloud) C# SDK v7.2.2.0 (.NET 2.0)")] + +#elif Net35 + +[assembly: AssemblyProduct("Qiniu (Cloud) C# SDK v7.2.2.0 (.NET 3.5)")] +[assembly: AssemblyTitle("Qiniu (Cloud) C# SDK v7.2.2.0 (.NET 3.5)")] +[assembly: AssemblyDescription("Qiniu (Cloud) C# SDK v7.2.2.0 (.NET 3.5)")] + +#elif Net40 + +[assembly: AssemblyProduct("Qiniu (Cloud) C# SDK v7.2.2.0 (.NET 4.0)")] +[assembly: AssemblyTitle("Qiniu (Cloud) C# SDK v7.2.2.0 (.NET 4.0)")] +[assembly: AssemblyDescription("Qiniu (Cloud) C# SDK v7.2.2.0 (.NET 4.0)")] + +#elif Net45 + +[assembly: AssemblyProduct("Qiniu (Cloud) C# SDK v7.2.2.0 (.NET 4.5)")] +[assembly: AssemblyTitle("Qiniu (Cloud) C# SDK v7.2.2.0 (.NET 4.5)")] +[assembly: AssemblyDescription("Qiniu (Cloud) C# SDK v7.2.2.0 (.NET 4.5)")] + +#elif Net46 + +[assembly: AssemblyProduct("Qiniu (Cloud) C# SDK v7.2.2.0 (.NET 4.6)")] +[assembly: AssemblyTitle("Qiniu (Cloud) C# SDK v7.2.2.0 (.NET 4.6)")] +[assembly: AssemblyDescription("Qiniu (Cloud) C# SDK v7.2.2.0 (.NET 4.6)")] + +#elif NetStandard16 + +[assembly: AssemblyProduct("Qiniu (Cloud) C# SDK v7.2.2.0 (.NETStandard 1.6.0)")] +[assembly: AssemblyTitle("Qiniu (Cloud) C# SDK v7.2.2.0 (.NETStandard 1.6.0)")] +[assembly: AssemblyDescription("Qiniu (Cloud) C# SDK v7.2.2.0 (.NETStandard 1.6.0)")] + +#else + +[assembly: AssemblyProduct("Qiniu (Cloud) C# SDK v7.2.2.0")] +[assembly: AssemblyTitle("Qiniu (Cloud) C# SDK v7.2.2.0")] +[assembly: AssemblyDescription("Qiniu (Cloud) C# SDK v7.2.2.0")] + +#endif + +[assembly: AssemblyTrademark("")] + +// 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("957cd434-8b12-46ce-980b-09ca26ed340d")] + +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyVersion("7.2.2.0")] +[assembly: AssemblyFileVersion("7.2.2.0")] + diff --git a/src/Qiniu/Qiniu.Net20.csproj b/src/Qiniu/Qiniu.Net20.csproj new file mode 100644 index 00000000..b57a3232 --- /dev/null +++ b/src/Qiniu/Qiniu.Net20.csproj @@ -0,0 +1,130 @@ + + + + + Release + AnyCPU + {E5A764FD-FC95-4B51-BB10-9A807ED25652} + Library + Properties + Qiniu + Qiniu + v2.0 + 512 + + + + true + full + false + ..\..\bin\net20\obj + ..\..\bin\net20\ + TRACE;DEBUG;Net20 + prompt + 4 + false + ..\..\bin\net20\Qiniu.xml + + + pdbonly + true + ..\..\bin\net20\obj + ..\..\bin\net20\ + TRACE;Net20 + prompt + 4 + false + ..\..\bin\net20\Qiniu.xml + + + true + + + + + + + + ..\packages\Newtonsoft.Json.9.0.1\lib\net20\Newtonsoft.Json.dll + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + del /q /s Qiniu.pdb +rd /q /s .\obj\ + + + + \ No newline at end of file diff --git a/src/Qiniu/Qiniu.Net35.csproj b/src/Qiniu/Qiniu.Net35.csproj new file mode 100644 index 00000000..b3dc817d --- /dev/null +++ b/src/Qiniu/Qiniu.Net35.csproj @@ -0,0 +1,135 @@ + + + + + Release + AnyCPU + {C1B1BFD5-3106-4052-8C51-75E548BE282D} + Library + Properties + Qiniu + Qiniu + v3.5 + 512 + + + + true + full + false + ..\..\bin\net35\obj + ..\..\bin\net35\ + DEBUG;TRACE;Net35 + prompt + 4 + false + ..\..\bin\net35\Qiniu.xml + + + pdbonly + true + ..\..\bin\net35\obj + ..\..\bin\net35\ + TRACE;Net35 + prompt + 4 + false + ..\..\bin\net35\Qiniu.xml + + + true + + + + + + + + ..\packages\Newtonsoft.Json.9.0.1\lib\net35\Newtonsoft.Json.dll + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + del /q /s Qiniu.pdb + rd /q /s .\obj\ + + + + \ No newline at end of file diff --git a/src/Qiniu/Qiniu.Net40.csproj b/src/Qiniu/Qiniu.Net40.csproj new file mode 100644 index 00000000..bdfa8748 --- /dev/null +++ b/src/Qiniu/Qiniu.Net40.csproj @@ -0,0 +1,139 @@ + + + + + Release + AnyCPU + {2F5B0328-DE8B-4B53-A500-3077E340A51B} + Library + Properties + Qiniu + Qiniu + v4.0 + 512 + + + + true + full + false + ..\..\bin\net40\obj + ..\..\bin\net40\ + DEBUG;TRACE;Net40 + prompt + 4 + false + ..\..\bin\net40\Qiniu.xml + + + pdbonly + true + ..\..\bin\net40\obj + ..\..\bin\net40\ + TRACE;Net40 + prompt + 4 + false + ..\..\bin\net40\Qiniu.xml + + + true + + + + + + + + ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + del /q /s Qiniu.pdb + rd /q /s .\obj\ + + + + \ No newline at end of file diff --git a/src/Qiniu/Qiniu.Net45.csproj b/src/Qiniu/Qiniu.Net45.csproj new file mode 100644 index 00000000..0446f34a --- /dev/null +++ b/src/Qiniu/Qiniu.Net45.csproj @@ -0,0 +1,135 @@ + + + + + Release + AnyCPU + {45A014F6-CCD4-42CE-819C-5F68EA92C8AE} + Library + Properties + Qiniu + Qiniu + v4.5 + 512 + + + + true + full + false + ..\..\bin\net45\obj + ..\..\bin\net45\ + DEBUG;TRACE;Net45 + prompt + 4 + false + ..\..\bin\net45\Qiniu.xml + + + pdbonly + true + ..\..\bin\net45\obj + ..\..\bin\net45\ + TRACE;Net45 + prompt + 4 + false + ..\..\bin\net45\Qiniu.xml + + + true + + + + + + + + ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + del /q /s Qiniu.pdb + rd /q /s .\obj\ + + + + \ No newline at end of file diff --git a/src/Qiniu/Qiniu.Net46.csproj b/src/Qiniu/Qiniu.Net46.csproj new file mode 100644 index 00000000..6eb3f1e5 --- /dev/null +++ b/src/Qiniu/Qiniu.Net46.csproj @@ -0,0 +1,135 @@ + + + + + Release + AnyCPU + {FEB25665-1B1D-4646-A550-3994E7F8B073} + Library + Properties + Qiniu + Qiniu + v4.6 + 512 + + + + true + full + false + ..\..\bin\net46\obj + ..\..\bin\net46\ + DEBUG;TRACE;Net46 + prompt + 4 + false + ..\..\bin\net46\Qiniu.xml + + + pdbonly + true + ..\..\bin\net46\obj + ..\..\bin\net46\ + TRACE;Net46 + prompt + 4 + false + ..\..\bin\net46\Qiniu.xml + + + true + + + + + + + + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + del /q /s Qiniu.pdb + rd /q /s .\obj\ + + + + \ No newline at end of file diff --git a/src/Qiniu/Qiniu.NetStandard16.xproj b/src/Qiniu/Qiniu.NetStandard16.xproj new file mode 100644 index 00000000..5cb22813 --- /dev/null +++ b/src/Qiniu/Qiniu.NetStandard16.xproj @@ -0,0 +1,84 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + 957cd434-8b12-46ce-980b-09ca26ed340d + Qiniu + ..\..\bin\netstandard16\obj + ..\..\bin\netstandard16 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2.0 + + if exist .\Qiniu\bin\Release\netstandard1.6\Qiniu.dll ( move .\Qiniu\bin\Release\netstandard1.6\Qiniu.dll .\ ) + if exist .\Qiniu\bin\Release\netstandard1.6\Qiniu.xml ( move .\Qiniu\bin\Release\netstandard1.6\Qiniu.xml .\ ) + if exist .\Qiniu\bin\Release\netstandard1.6\Qiniu.deps.json ( move .\Qiniu\bin\Release\netstandard1.6\Qiniu.deps.json .\ ) + if exist .\Qiniu\bin\Debug\netstandard1.6\Qiniu.dll ( move .\Qiniu\bin\Debug\netstandard1.6\Qiniu.dll .\ ) + if exist .\Qiniu\bin\Debug\netstandard1.6\Qiniu.xml ( move .\Qiniu\bin\Debug\netstandard1.6\Qiniu.xml .\ ) + if exist .\Qiniu\bin\Debug\netstandard1.6\Qiniu.deps.json ( move .\Qiniu\bin\Debug\netstandard1.6\Qiniu.deps.json .\ ) + rd /q /s .\Qiniu\ + rd /q /s .\obj\ + + + + \ No newline at end of file diff --git a/src/Qiniu/RS/BucketManager.cs b/src/Qiniu/RS/BucketManager.cs new file mode 100644 index 00000000..71afd7dd --- /dev/null +++ b/src/Qiniu/RS/BucketManager.cs @@ -0,0 +1,862 @@ +using System; +using System.Text; +using Qiniu.Common; +using Qiniu.Http; +using Qiniu.RS.Model; +using Qiniu.Util; + +namespace Qiniu.RS +{ + /// + /// 空间(资源)管理/操作 + /// + public class BucketManager + { + private Signature signature; + private HttpManager httpManager; + + /// + /// 初始化 + /// + /// 账户访问控制(密钥) + public BucketManager(Mac mac) + { + signature = new Signature(mac); + httpManager = new HttpManager(); + } + + /// + /// 生成管理凭证 + /// 有关管理凭证请参阅 + /// http://developer.qiniu.com/article/developer/security/access-token.html + /// + /// 请求的URL + /// 生成的管理凭证 + public string createManageToken(string url) + { + return createManageToken(url, null); + } + + /// + /// 生成管理凭证 + /// 有关管理凭证请参阅 + /// http://developer.qiniu.com/article/developer/security/access-token.html + /// + /// 请求的URL + /// 请求的主体内容 + /// 生成的管理凭证 + public string createManageToken(string url, byte[] body) + { + return string.Format("QBox {0}", signature.signRequest(url, body)); + } + + /// + /// 获取空间文件信息 + /// + /// 空间名称 + /// 文件key + /// 文件信息获取结果 + public StatResult stat(string bucket, string key) + { + StatResult result = new StatResult(); + + try + { + string statUrl = Config.ZONE.RsHost + statOp(bucket, key); + string token = createManageToken(statUrl); + + HttpResult hr = httpManager.get(statUrl, token); + result.shadow(hr); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Stat] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 获取空间(bucket)列表 + /// + /// 空间列表获取结果 + public BucketsResult buckets() + { + BucketsResult result = new BucketsResult(); + + try + { + string bucketsUrl = Config.ZONE.RsHost + "/buckets"; + string token = createManageToken(bucketsUrl); + + HttpResult hr = httpManager.get(bucketsUrl, token); + result.shadow(hr); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Buckets] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 查询指定bucket的信息 + /// + /// bucket名称 + /// + public BucketResult bucket(string bucketName) + { + BucketResult result = new BucketResult(); + + try + { + string bucketsUrl = Config.ZONE.RsHost + "/bucket/" + bucketName; + string token = createManageToken(bucketsUrl); + + HttpResult hr = httpManager.get(bucketsUrl, token); + result.shadow(hr); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Bucket] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 删除文件 + /// + /// 空间名称 + /// 文件key + /// 状态码为200时表示OK + public HttpResult delete(string bucket, string key) + { + HttpResult result = new HttpResult(); + + try + { + string deleteUrl = Config.ZONE.RsHost + deleteOp(bucket, key); + string token = createManageToken(deleteUrl); + + result = httpManager.post(deleteUrl, token); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Delete] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 复制文件 + /// + /// 源空间 + /// 源文件key + /// 目标空间 + /// 目标key + /// 状态码为200时表示OK + public HttpResult copy(string srcBucket, string srcKey, string dstBucket, string dstKey) + { + HttpResult result = new HttpResult(); + + try + { + string copyUrl = Config.ZONE.RsHost + copyOp(srcBucket, srcKey, dstBucket, dstKey); + string token = createManageToken(copyUrl); + + result = httpManager.post(copyUrl, token); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Copy] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 复制文件 (with 'force' param) + /// + /// 源空间 + /// 源文件key + /// 目标空间 + /// 目标key + /// force标志,true/false + /// 状态码为200时表示OK + public HttpResult copy(string srcBucket, string srcKey, string dstBucket, string dstKey, bool force) + { + HttpResult result = new HttpResult(); + + try + { + string copyUrl = Config.ZONE.RsHost + copyOp(srcBucket, srcKey, dstBucket, dstKey, force); + string token = createManageToken(copyUrl); + + result = httpManager.post(copyUrl, token); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Copy] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 移动文件 + /// + /// 源空间 + /// 源文件key + /// 目标空间 + /// 目标key + /// 状态码为200时表示OK + public HttpResult move(string srcBucket, string srcKey, string dstBucket, string dstKey) + { + HttpResult result = new HttpResult(); + + try + { + string moveUrl = Config.ZONE.RsHost + moveOp(srcBucket, srcKey, dstBucket, dstKey); + string token = createManageToken(moveUrl); + + result = httpManager.post(moveUrl, token); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Move] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 移动文件 (with 'force' param) + /// + /// 源空间 + /// 源文件key + /// 目标空间 + /// 目标key + /// force标志,true/false + /// 状态码为200时表示OK + public HttpResult move(string srcBucket, string srcKey, string dstBucket, string dstKey, bool force) + { + HttpResult result = new HttpResult(); + + try + { + string moveUrl = Config.ZONE.RsHost + moveOp(srcBucket, srcKey, dstBucket, dstKey, force); + string token = createManageToken(moveUrl); + + result = httpManager.post(moveUrl, token); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Move] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 修改文件名(key) + /// + /// 文件所在空间 + /// 旧的文件名 + /// 新的文件名 + /// 状态码为200时表示OK + public HttpResult rename(string bucket, string oldKey, string newKey) + { + return move(bucket, oldKey, bucket, newKey); + } + + /// + /// 修改文件MimeType + /// + /// 空间名称 + /// 文件key + /// 修改后的MIME Type + /// 状态码为200时表示OK + public HttpResult chgm(string bucket, string key, string mimeType) + { + HttpResult result = new HttpResult(); + + try + { + string chgmUrl = Config.ZONE.RsHost + chgmOp(bucket, key, mimeType); + string token = createManageToken(chgmUrl); + + result = httpManager.post(chgmUrl, token); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Chgm] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 批处理 + /// + /// 批量操作的操作字符串 + /// 状态码为200时表示OK + public BatchResult batch(string batchOps) + { + BatchResult result = new BatchResult(); + + try + { + string batchUrl = Config.ZONE.RsHost + "/batch"; + byte[] data = Encoding.UTF8.GetBytes(batchOps); + string token = createManageToken(batchUrl, data); + + HttpResult hr = httpManager.postForm(batchUrl, data, token); + result.shadow(hr); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Batch] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 批处理,字符串数组拼接后与另一形式等价 + /// + /// 批量操作的操作字符串数组 + /// 状态码为200时表示OK + public BatchResult batch(string[] ops) + { + StringBuilder opsb = new StringBuilder(); + opsb.AppendFormat("op={0}", ops[0]); + for (int i = 1; i < ops.Length; ++i) + { + opsb.AppendFormat("&op={0}", ops[i]); + } + + return batch(opsb.ToString()); + } + + /// + /// 批处理-stat + /// + /// 空间名称 + /// 文件key列表 + /// 结果列表 + public BatchResult batchStat(string bucket, string[] keys) + { + string[] ops = new string[keys.Length]; + for (int i = 0; i < keys.Length; ++i) + { + ops[i] = statOp(bucket, keys[i]); + } + + return batch(ops); + } + + /// + /// 批处理 - delete + /// + /// 空间名称 + /// 文件key列表 + /// 结果列表 + public BatchResult batchDelete(string bucket, string[] keys) + { + string[] ops = new string[keys.Length]; + for (int i = 0; i < keys.Length; ++i) + { + ops[i] = deleteOp(bucket, keys[i]); + } + + return batch(ops); + } + + /// + /// 抓取文件 + /// + /// 资源URL + /// 空间名称 + /// 文件key + /// 状态码为200时表示OK + public HttpResult fetch(string resUrl, string bucket, string key) + { + HttpResult result = new HttpResult(); + + try + { + string fetchUrl = Config.ZONE.IovipHost + fetchOp(resUrl, bucket, key); + string token = createManageToken(fetchUrl); + + result = httpManager.post(fetchUrl, token); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Fetch] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 更新文件,适用于"镜像源站"设置的空间 + /// + /// 空间名称 + /// 文件key + /// 状态码为200时表示OK + public HttpResult prefetch(string bucket, string key) + { + HttpResult result = new HttpResult(); + + try + { + string prefetchUrl = Config.ZONE.IovipHost + prefetchOp(bucket, key); + string token = createManageToken(prefetchUrl); + + result = httpManager.post(prefetchUrl, token); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Prefetch] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 获取空间的域名 + /// + /// 空间名称 + /// 空间对应的域名 + public DomainsResult domains(string bucket) + { + DomainsResult result = new DomainsResult(); + + try + { + string domainsUrl = Config.ZONE.ApiHost + "/v6/domain/list"; + string body = string.Format("tbl={0}", bucket); + byte[] data = Encoding.UTF8.GetBytes(body); + string token = createManageToken(domainsUrl, data); + + HttpResult hr = httpManager.postForm(domainsUrl, data, token); + result.shadow(hr); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Domains] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// + /// 获取空间文件列表 + /// listFiles(bucket, prefix, marker, limit, delimiter) + /// + /// bucket: 目标空间名称 + /// + /// prefix: 返回指定文件名前缀的文件列表(prefix可设为null) + /// + /// marker: 考虑到设置limit后返回的文件列表可能不全(需要重复执行listFiles操作) + /// 执行listFiles操作时使用marker标记来追加新的结果 + /// 特别注意首次执行listFiles操作时marker为null + /// + /// limit: 每次返回结果所包含的文件总数限制(limit最大值1000,建议值100) + /// + /// delimiter: 分隔符,比如-或者/等等,可以模拟作为目录结构(参考下述示例) + /// 假设指定空间中有2个文件 fakepath/1.txt fakepath/2.txt + /// 现设置分隔符delimiter = / 得到返回结果items =[],commonPrefixes = [fakepath/] + /// 然后调整prefix = fakepath/ delimiter = null 得到所需结果items = [1.txt,2.txt] + /// 于是可以在本地先创建一个目录fakepath,然后在该目录下写入items中的文件 + /// + /// + /// 空间名称 + /// 前缀 + /// 标记 + /// 数量限制 + /// 分隔符 + /// 文件列表获取结果 + public ListResult listFiles(string bucket, string prefix, string marker, int limit, string delimiter) + { + ListResult result = new ListResult(); + + try + { + StringBuilder sb = new StringBuilder("/list?bucket=" + bucket); + + if (!string.IsNullOrEmpty(marker)) + { + sb.Append("&marker=" + marker); + } + + if (!string.IsNullOrEmpty(prefix)) + { + sb.Append("&prefix=" + prefix); + } + + if (!string.IsNullOrEmpty(delimiter)) + { + sb.Append("&delimiter=" + delimiter); + } + + if (limit > 1000 || limit < 1) + { + sb.Append("&limit=1000"); + } + else + { + sb.Append("&limit=" + limit); + } + + string listUrl = Config.ZONE.RsfHost + sb.ToString(); + string token = createManageToken(listUrl); + + HttpResult hr = httpManager.post(listUrl, token); + result.shadow(hr); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[List-files] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 更新文件生命周期 + /// + /// 空间名称 + /// 文件key + /// 多少天后删除 + /// 状态码为200时表示OK + public HttpResult updateLifecycle(string bucket, string key, int deleteAfterDays) + { + HttpResult result = new HttpResult(); + + try + { + string updateUrl = Config.ZONE.RsHost + updateLifecycleOp(bucket, key, deleteAfterDays); + + string token = createManageToken(updateUrl); + + result = httpManager.post(updateUrl, token); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Update-lifecycle] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 生成stat操作字符串 + /// + /// 空间名称 + /// 文件key + /// stat操作字符串 + public string statOp(string bucket, string key) + { + return string.Format("/stat/{0}", StringHelper.encodedEntry(bucket, key)); + } + + /// + /// 生成delete操作字符串 + /// + /// 空间名称 + /// 文件key + /// delete操作字符串 + public string deleteOp(string bucket, string key) + { + return string.Format("/delete/{0}", StringHelper.encodedEntry(bucket, key)); + } + + /// + /// 生成copy操作字符串 + /// + /// 源空间 + /// 源文件key + /// 目标空间 + /// 目标文件key + /// copy操作字符串 + public string copyOp(string srcBucket, string srcKey, string dstBucket, string dstKey) + { + return string.Format("/copy/{0}/{1}", + StringHelper.encodedEntry(srcBucket, srcKey), + StringHelper.encodedEntry(dstBucket, dstKey)); + } + + /// + /// 生成copy(with 'force' param)操作字符串 + /// + /// 源空间 + /// 源文件key + /// 目标空间 + /// 目标文件key + /// force标志,true/false + /// copy操作字符串 + public string copyOp(string srcBucket, string srcKey, string dstBucket, string dstKey, bool force) + { + string fx = force ? "force/true" : "force/false"; + return string.Format("/copy/{0}/{1}/{2}", + StringHelper.encodedEntry(srcBucket, srcKey), + StringHelper.encodedEntry(dstBucket, dstKey), fx); + } + + /// + /// 生成move操作字符串 + /// + /// 源空间 + /// 源文件key + /// 目标空间 + /// 目标文件key + /// move操作字符串 + public string moveOp(string srcBucket, string srcKey, string dstBucket, string dstKey) + { + return string.Format("/move/{0}/{1}", + StringHelper.encodedEntry(srcBucket, srcKey), + StringHelper.encodedEntry(dstBucket, dstKey)); + } + + /// + /// 生成copy(with 'force' param)操作字符串 + /// + /// 源空间 + /// 源文件key + /// 目标空间 + /// 目标文件key + /// force标志,true/false + /// move操作字符串 + public string moveOp(string srcBucket, string srcKey, string dstBucket, string dstKey, bool force) + { + string fx = force ? "force/true" : "force/false"; + return string.Format("/move/{0}/{1}/{2}", + StringHelper.encodedEntry(srcBucket, srcKey), + StringHelper.encodedEntry(dstBucket, dstKey), fx); + } + + /// + /// 生成chgm操作字符串 + /// + /// 空间名称 + /// 文件key + /// 修改后MIME Type + /// chgm操作字符串 + public string chgmOp(string bucket, string key, string mimeType) + { + return string.Format("/chgm/{0}/mime/{1}", + StringHelper.encodedEntry(bucket, key), + StringHelper.urlSafeBase64Encode(mimeType)); + } + + /// + /// 生成fetch操作字符串 + /// + /// 资源URL + /// 空间名称 + /// 文件key + /// fetch操作字符串 + public string fetchOp(string url, string bucket, string key) + { + return string.Format("/fetch/{0}/to/{1}", + StringHelper.urlSafeBase64Encode(url), + StringHelper.encodedEntry(bucket, key)); + } + + /// + /// 生成prefetch操作字符串 + /// + /// 空间名称 + /// 文件key + /// prefetch操作字符串 + public string prefetchOp(string bucket, string key) + { + return string.Format("/prefetch/{0}", + StringHelper.encodedEntry(bucket, key)); + } + + /// + /// 生成updateLifecycle操作字符串 + /// + /// 空间名称 + /// 文件key + /// 多少天后删除(设为0表示取消) + /// updateLifecycle操作字符串 + public string updateLifecycleOp(string bucket,string key,int deleteAfterDays) + { + return string.Format("/deleteAfterDays/{0}/{1}", + StringHelper.encodedEntry(bucket, key), deleteAfterDays); + } + + } +} diff --git a/src/Qiniu/RS/Model/BatchInfo.cs b/src/Qiniu/RS/Model/BatchInfo.cs new file mode 100644 index 00000000..e8f71c1b --- /dev/null +++ b/src/Qiniu/RS/Model/BatchInfo.cs @@ -0,0 +1,18 @@ +namespace Qiniu.RS.Model +{ + /// + /// 批量处理返回的信息 + /// + public class BatchInfo + { + /// + /// 状态码 + /// + public int Code { get; set; } + + /// + /// 消息 + /// + public object Data { get; set; } + } +} diff --git a/src/Qiniu/RS/Model/BatchResult.cs b/src/Qiniu/RS/Model/BatchResult.cs new file mode 100644 index 00000000..ef37d5d1 --- /dev/null +++ b/src/Qiniu/RS/Model/BatchResult.cs @@ -0,0 +1,105 @@ +using System.Text; +using System.Collections.Generic; +using Newtonsoft.Json; +using Qiniu.Http; + +namespace Qiniu.RS.Model +{ + /// + /// 批量处理结果 + /// + public class BatchResult:HttpResult + { + /// + /// 错误消息 + /// + public string Error + { + get + { + string ex = null; + if (Code != HttpHelper.STATUS_CODE_OK && Code != HttpHelper.STATUS_CODE_PARTLY_OK) + { + var vt = JsonConvert.DeserializeObject>(Text); + if (vt.ContainsKey("error")) + { + ex = vt["error"]; + } + } + return ex; + } + } + + /// + /// 获取批量处理结果 + /// + public List Result + { + get + { + List info = null; + if ((Code == HttpHelper.STATUS_CODE_OK || Code == HttpHelper.STATUS_CODE_PARTLY_OK)&& + (!string.IsNullOrEmpty(Text))) + { + info = JsonConvert.DeserializeObject>(Text); + } + return info; + } + } + + /// + /// 转换为易读字符串格式 + /// + /// 便于打印和阅读的字符串> + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + + sb.AppendFormat("code: {0}\n", Code); + + if (Result!=null) + { + sb.AppendLine("result:"); + int i = 0, n = Result.Count; + foreach(var v in Result) + { + sb.AppendFormat("#{0}/{1}\n", ++i, n); + sb.AppendFormat("code: {0}\n", v.Code); + sb.AppendFormat("data:\n{0}\n\n", v.Data); + } + } + else + { + if (!string.IsNullOrEmpty(Error)) + { + sb.AppendFormat("Error: {0}\n", Error); + } + else if (!string.IsNullOrEmpty(Text)) + { + sb.AppendLine("text:"); + sb.AppendLine(Text); + } + } + sb.AppendLine(); + + sb.AppendFormat("ref-code: {0}\n", RefCode); + + if (!string.IsNullOrEmpty(RefText)) + { + sb.AppendLine("ref-text:"); + sb.AppendLine(RefText); + } + + if (RefInfo != null) + { + sb.AppendFormat("ref-info:\n"); + foreach (var d in RefInfo) + { + sb.AppendLine(string.Format("{0}: {1}", d.Key, d.Value)); + } + } + + return sb.ToString(); + } + } +} diff --git a/src/Qiniu/RS/Model/BucketInfo.cs b/src/Qiniu/RS/Model/BucketInfo.cs new file mode 100644 index 00000000..e5b5febc --- /dev/null +++ b/src/Qiniu/RS/Model/BucketInfo.cs @@ -0,0 +1,53 @@ +namespace Qiniu.RS.Model +{ + /// + /// bucket info + /// + public class BucketInfo + { + /// + /// bucket name + /// + public string tbl { get; set; } + + /// + /// itbl + /// + public long itbl { get; set; } + + /// + /// deprecated + /// + public string phy {get;set;} + + /// + /// id + /// + public long uid { get; set; } + + /// + /// zone + /// + public string zone { get; set; } + + /// + /// region + /// + public string region { get; set; } + + /// + /// isGlobal + /// + public bool global { get; set; } + + /// + /// isLineStorage + /// + public bool line { get; set; } + + /// + /// creationTime + /// + public long ctime { get; set; } + } +} diff --git a/src/Qiniu/RS/Model/BucketResult.cs b/src/Qiniu/RS/Model/BucketResult.cs new file mode 100644 index 00000000..bc27dc62 --- /dev/null +++ b/src/Qiniu/RS/Model/BucketResult.cs @@ -0,0 +1,79 @@ +using System.Text; +using Newtonsoft.Json; +using Qiniu.Http; + +namespace Qiniu.RS.Model +{ + /// + /// 获取bucket信息-结果 + /// + public class BucketResult : HttpResult + { + /// + /// bucket信息 + /// + public BucketInfo Result + { + get + { + BucketInfo info = null; + + if (Code == HttpHelper.STATUS_CODE_OK && !string.IsNullOrEmpty(Text)) + { + info = JsonConvert.DeserializeObject(Text); + } + + return info; + } + } + + /// + /// 转换为易读字符串格式 + /// + /// 便于打印和阅读的字符串 + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + + sb.AppendFormat("code: {0}\n", Code); + + if (Result != null) + { + sb.AppendLine("bucket-info:"); + sb.AppendFormat("tbl={0}\n", Result.tbl); + sb.AppendFormat("zone={0}\n", Result.zone); + sb.AppendFormat("region={0}\n", Result.region); + sb.AppendFormat("isGlobal={0}\n", Result.global); + sb.AppendFormat("isLine={0}\n", Result.line); + } + else + { + if (!string.IsNullOrEmpty(Text)) + { + sb.AppendLine("text:"); + sb.AppendLine(Text); + } + } + sb.AppendLine(); + + sb.AppendFormat("ref-code: {0}\n", RefCode); + + if (!string.IsNullOrEmpty(RefText)) + { + sb.AppendLine("ref-text:"); + sb.AppendLine(RefText); + } + + if (RefInfo != null) + { + sb.AppendFormat("ref-info:\n"); + foreach (var d in RefInfo) + { + sb.AppendLine(string.Format("{0}: {1}", d.Key, d.Value)); + } + } + + return sb.ToString(); + } + } +} diff --git a/src/Qiniu/RS/Model/BucketsResult.cs b/src/Qiniu/RS/Model/BucketsResult.cs new file mode 100644 index 00000000..c41dfabe --- /dev/null +++ b/src/Qiniu/RS/Model/BucketsResult.cs @@ -0,0 +1,77 @@ +using System.Text; +using System.Collections.Generic; +using Newtonsoft.Json; +using Qiniu.Http; + +namespace Qiniu.RS.Model +{ + /// + /// 获取空间列表-结果 + /// + public class BucketsResult:HttpResult + { + /// + /// 空间列表 + /// + public List Result + { + get + { + List buckets = null; + if ((Code == HttpHelper.STATUS_CODE_OK) && (!string.IsNullOrEmpty(Text))) + { + buckets = JsonConvert.DeserializeObject>(Text); + } + return buckets; + } + } + + /// + /// 转换为易读字符串格式 + /// + /// 便于打印和阅读的字符串 + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + + sb.AppendFormat("code: {0}\n", Code); + + if (Result != null) + { + sb.AppendLine("bucket(s):"); + foreach(var b in Result) + { + sb.AppendLine(b); + } + } + else + { + if (!string.IsNullOrEmpty(Text)) + { + sb.AppendLine("text:"); + sb.AppendLine(Text); + } + } + sb.AppendLine(); + + sb.AppendFormat("ref-code: {0}\n", RefCode); + + if (!string.IsNullOrEmpty(RefText)) + { + sb.AppendLine("ref-text:"); + sb.AppendLine(RefText); + } + + if (RefInfo != null) + { + sb.AppendFormat("ref-info:\n"); + foreach (var d in RefInfo) + { + sb.AppendLine(string.Format("{0}: {1}", d.Key, d.Value)); + } + } + + return sb.ToString(); + } + } +} diff --git a/src/Qiniu/RS/Model/DomainsResult.cs b/src/Qiniu/RS/Model/DomainsResult.cs new file mode 100644 index 00000000..df1a5c3b --- /dev/null +++ b/src/Qiniu/RS/Model/DomainsResult.cs @@ -0,0 +1,79 @@ +using System.Text; +using System.Collections.Generic; +using Newtonsoft.Json; +using Qiniu.Http; + +namespace Qiniu.RS.Model +{ + /// + /// 获取空间域名(domains操作)的返回消息 + /// + public class DomainsResult:HttpResult + { + /// + /// 域名(列表) + /// + public List Result + { + get + { + List domains = null; + if ((Code == HttpHelper.STATUS_CODE_OK) && (!string.IsNullOrEmpty(Text))) + { + domains = JsonConvert.DeserializeObject>(Text); + } + return domains; + } + } + + /// + /// 转换为易读字符串格式 + /// + /// 便于打印和阅读的字符串 + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + + sb.AppendFormat("code: {0}\n", Code); + + sb.AppendLine(); + + if (Result != null) + { + sb.AppendLine("domain(s):"); + foreach (var d in Result) + { + sb.AppendLine(d); + } + } + else + { + if (!string.IsNullOrEmpty(Text)) + { + sb.AppendLine("text:"); + sb.AppendLine(Text); + } + } + sb.AppendLine(); + + sb.AppendFormat("ref-code: {0}\n", RefCode); + + if (!string.IsNullOrEmpty(RefText)) + { + sb.AppendLine("ref-text:"); + sb.AppendLine(RefText); + } + + if (RefInfo != null) + { + sb.AppendFormat("ref-info:\n"); + foreach (var d in RefInfo) + { + sb.AppendLine(string.Format("{0}: {1}", d.Key, d.Value)); + } + } + + return sb.ToString(); + } + } +} diff --git a/src/Qiniu/RS/Model/FileDesc.cs b/src/Qiniu/RS/Model/FileDesc.cs new file mode 100644 index 00000000..3112c983 --- /dev/null +++ b/src/Qiniu/RS/Model/FileDesc.cs @@ -0,0 +1,34 @@ +namespace Qiniu.RS.Model +{ + /// + /// 文件描述(stat操作返回消息中包含的有效内容) + /// 与StatInfo一致 + /// + public class FileDesc + { + /// + /// 文件名 + /// + public string Key { get; set; } + + /// + /// 文件hash(ETAG) + /// + public string Hash { get; set; } + + /// + /// 文件大小(字节) + /// + public long Fsize { get; set; } + + /// + /// 文件MIME类型 + /// + public string MimeType { get; set; } + + /// + /// 上传时间 + /// + public long PutTime { get; set; } + } +} diff --git a/src/Qiniu/RS/Model/ListInfo.cs b/src/Qiniu/RS/Model/ListInfo.cs new file mode 100644 index 00000000..3b5bcbb7 --- /dev/null +++ b/src/Qiniu/RS/Model/ListInfo.cs @@ -0,0 +1,46 @@ +using System.Collections.Generic; + +namespace Qiniu.RS.Model +{ + /// + /// 获取空间文件(list操作) + /// + /// 返回JSON字符串 + /// + /// { + /// "marker":"MARKER", + /// "items": + /// [ + /// { + /// "key":"KEY", + /// "hash":"HASH", + /// "fsize":FSIZE, + /// "mimeType":"MIME_TYPE", + /// "putTime":PUT_TIME + /// }, + /// { + /// ... + /// } + /// ], + /// "CmmonPrefixes":"COMMON_PREFIXES" + /// } + /// + /// + public class ListInfo + { + /// + /// marker标记 + /// + public string Marker { get; set; } + + /// + /// 文件列表 + /// + public List Items { get; set; } + + /// + /// 公共前缀 + /// + public List CommonPrefixes { get; set; } + } +} diff --git a/src/Qiniu/RS/Model/ListResult.cs b/src/Qiniu/RS/Model/ListResult.cs new file mode 100644 index 00000000..13990281 --- /dev/null +++ b/src/Qiniu/RS/Model/ListResult.cs @@ -0,0 +1,96 @@ +using System.Text; +using Newtonsoft.Json; +using Qiniu.Http; + +namespace Qiniu.RS.Model +{ + /// + /// 获取空间文件列表(list操作)的返回消息 + /// + public class ListResult:HttpResult + { + /// + /// 文件列表信息 + /// + public ListInfo Result + { + get + { + ListInfo info = null; + if ((Code == HttpHelper.STATUS_CODE_OK) && (!string.IsNullOrEmpty(Text))) + { + info = JsonConvert.DeserializeObject(Text); + } + return info; + } + } + + /// + /// 转换为易读字符串格式 + /// + /// 便于打印和阅读的字符串> + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + + sb.AppendFormat("code: {0}\n", Code); + + if (Result != null) + { + if (Result.CommonPrefixes != null) + { + sb.Append("commonPrefixes:"); + foreach(var p in Result.CommonPrefixes) + { + sb.AppendFormat("{0} ", p); + } + sb.AppendLine(); + } + + if (!string.IsNullOrEmpty(Result.Marker)) + { + sb.AppendFormat("marker: {0}\n", Result.Marker); + } + + if (Result.Items != null) + { + sb.AppendLine("items:"); + int i = 0, n = Result.Items.Count; + foreach (var item in Result.Items) + { + sb.AppendFormat("#{0}/{1}:Key={2}, Size={3}, Type={4}, Hash={5}, Time={6}\n", + ++i, n, item.Key, item.Fsize, item.MimeType, item.Hash, item.PutTime); + } + } + } + else + { + if (!string.IsNullOrEmpty(Text)) + { + sb.AppendLine("text:"); + sb.AppendLine(Text); + } + } + sb.AppendLine(); + + sb.AppendFormat("ref-code: {0}\n", RefCode); + + if (!string.IsNullOrEmpty(RefText)) + { + sb.AppendLine("ref-text:"); + sb.AppendLine(RefText); + } + + if (RefInfo != null) + { + sb.AppendFormat("ref-info:\n"); + foreach (var d in RefInfo) + { + sb.AppendLine(string.Format("{0}: {1}", d.Key, d.Value)); + } + } + + return sb.ToString(); + } + } +} diff --git a/src/Qiniu/RS/Model/StatInfo.cs b/src/Qiniu/RS/Model/StatInfo.cs new file mode 100644 index 00000000..da057925 --- /dev/null +++ b/src/Qiniu/RS/Model/StatInfo.cs @@ -0,0 +1,35 @@ +using Newtonsoft.Json; + +namespace Qiniu.RS.Model +{ + /// + /// 获取空间文件信息(stat操作)的有效内容 + /// + [JsonObject(MemberSerialization.OptIn)] + public class StatInfo + { + /// + /// 文件大小(字节) + /// + [JsonProperty("fsize")] + public long Fsize { set; get; } + + /// + /// 文件hash(ETAG) + /// + [JsonProperty("hash")] + public string Hash { set; get; } + + /// + /// 文件MIME类型 + /// + [JsonProperty("mimeType")] + public string MimeType { set; get; } + + /// + /// 文件上传时间 + /// + [JsonProperty("putTime")] + public long PutTime { set; get; } + } +} diff --git a/src/Qiniu/RS/Model/StatResult.cs b/src/Qiniu/RS/Model/StatResult.cs new file mode 100644 index 00000000..e230d714 --- /dev/null +++ b/src/Qiniu/RS/Model/StatResult.cs @@ -0,0 +1,74 @@ +using System.Text; +using Newtonsoft.Json; +using Qiniu.Http; + +namespace Qiniu.RS.Model +{ + /// + /// 获取空间文件信息(stat操作)的返回消息 + /// + public class StatResult:HttpResult + { + /// + /// stat信息列表 + /// + public StatInfo Result + { + get + { + StatInfo info = null; + if ((Code == HttpHelper.STATUS_CODE_OK) && (!string.IsNullOrEmpty(Text))) + { + info = JsonConvert.DeserializeObject(Text); + } + return info; + } + } + + /// + /// 转换为易读字符串格式 + /// + /// 便于打印和阅读的字符串 + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + + sb.AppendFormat("code: {0}\n", Code); + + if (Result != null) + { + sb.AppendFormat("Size={0}, Type={1}, Hash={2}, Time={3}\n", + Result.Fsize, Result.MimeType, Result.Hash, Result.PutTime); + + } + else + { + if (!string.IsNullOrEmpty(Text)) + { + sb.AppendLine("text:"); + sb.AppendLine(Text); + } + } + sb.AppendLine(); + + sb.AppendFormat("ref-code: {0}\n", RefCode); + + if (!string.IsNullOrEmpty(RefText)) + { + sb.AppendLine("ref-text:"); + sb.AppendLine(RefText); + } + + if (RefInfo != null) + { + sb.AppendFormat("ref-info:\n"); + foreach (var d in RefInfo) + { + sb.AppendLine(string.Format("{0}: {1}", d.Key, d.Value)); + } + } + + return sb.ToString(); + } + } +} diff --git a/src/Qiniu/RSF/Model/PfopResult.cs b/src/Qiniu/RSF/Model/PfopResult.cs new file mode 100644 index 00000000..542c1133 --- /dev/null +++ b/src/Qiniu/RSF/Model/PfopResult.cs @@ -0,0 +1,78 @@ +using System.Text; +using System.Collections.Generic; +using Newtonsoft.Json; +using Qiniu.Http; + +namespace Qiniu.RSF.Model +{ + /// + /// 持久化 + /// + public class PfopResult : HttpResult + { + /// + /// 此ID可用于查询持久化进度 + /// + public string PersistentId + { + get + { + string pid = null; + + if ((Code == HttpHelper.STATUS_CODE_OK) && (!string.IsNullOrEmpty(Text))) + { + var vt = JsonConvert.DeserializeObject>(Text); + if (vt.ContainsKey("persistentId")) + { + pid = vt["persistentId"]; + } + } + return pid; + } + } + + /// + /// 转换为易读字符串格式 + /// + /// 便于打印和阅读的字符串 + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + + sb.AppendFormat("code: {0}\n", Code); + + if (!string.IsNullOrEmpty(PersistentId)) + { + sb.AppendFormat("PersistentId: {0}\n", PersistentId); + } + else + { + if (!string.IsNullOrEmpty(Text)) + { + sb.AppendLine("text:"); + sb.AppendLine(Text); + } + } + sb.AppendLine(); + + sb.AppendFormat("ref-code:{0}\n", RefCode); + + if (!string.IsNullOrEmpty(RefText)) + { + sb.AppendLine("ref-text:"); + sb.AppendLine(RefText); + } + + if (RefInfo != null) + { + sb.AppendFormat("ref-info:\n"); + foreach (var d in RefInfo) + { + sb.AppendLine(string.Format("{0}:{1}", d.Key, d.Value)); + } + } + + return sb.ToString(); + } + } +} diff --git a/src/Qiniu/RSF/OperationManager.cs b/src/Qiniu/RSF/OperationManager.cs new file mode 100644 index 00000000..84c3a1c1 --- /dev/null +++ b/src/Qiniu/RSF/OperationManager.cs @@ -0,0 +1,324 @@ +using System; +using System.IO; +using System.Text; +using Qiniu.Util; +using Qiniu.Common; +using Qiniu.Http; +using Qiniu.RSF.Model; + +namespace Qiniu.RSF +{ + /// + /// 数据处理 + /// + public class OperationManager + { + private Signature signature; + private HttpManager httpManager; + + /// + /// 初始化 + /// + /// 账户访问控制(密钥) + public OperationManager(Mac mac) + { + signature = new Signature(mac); + httpManager = new HttpManager(); + } + + /// + /// 生成管理凭证 + /// + /// 请求的URL + /// 请求的主体内容 + /// + public string createManageToken(string url, byte[] body) + { + return string.Format("QBox {0}", signature.signRequest(url, body)); + } + + /// + /// 数据处理 + /// + /// 空间 + /// 空间文件的key + /// 操作(命令参数) + /// 私有队列 + /// 通知url + /// forece参数 + /// pfop操作返回结果,正确返回结果包含persistentId + public PfopResult pfop(string bucket, string key, string fops, string pipeline, string notifyUrl, bool force) + { + PfopResult result = new PfopResult(); + + try + { + string pfopUrl = Config.ZONE.ApiHost + "/pfop/"; + + StringBuilder sb = new StringBuilder(); + sb.AppendFormat("bucket={0}&key={1}&fops={2}", bucket, key, StringHelper.urlEncode(fops)); + if (!string.IsNullOrEmpty(notifyUrl)) + { + sb.AppendFormat("¬ifyURL={0}", notifyUrl); + } + if (force) + { + sb.Append("&force=1"); + } + if (!string.IsNullOrEmpty(pipeline)) + { + sb.AppendFormat("&pipeline={0}", pipeline); + } + byte[] data = Encoding.UTF8.GetBytes(sb.ToString()); + string token = createManageToken(pfopUrl, data); + + HttpResult hr = httpManager.postForm(pfopUrl, data, token); + result.shadow(hr); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Pfop] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 数据处理,操作字符串拼接后与另一种形式等价 + /// + /// 空间 + /// 空间文件的key + /// 操作(命令参数)列表 + /// 私有队列 + /// 通知url + /// forece参数 + /// 操作返回结果,正确返回结果包含persistentId + public PfopResult pfop(string bucket, string key, string[] fops, string pipeline, string notifyUrl, bool force) + { + string ops = string.Join(";", fops); + return pfop(bucket, key, ops, pipeline, notifyUrl, force); + } + + /// + /// 查询pfop操作处理结果(或状态) + /// + /// 持久化ID + /// 操作结果 + public HttpResult prefop(string persistentId) + { + HttpResult result = new HttpResult(); + + try + { + string prefopUrl = string.Format("{0}/status/get/prefop?id={1}", Config.ZONE.ApiHost, persistentId); + + result = httpManager.get(prefopUrl, null); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Prefop] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 根据uri的类型(网络url或者本地文件路径)自动选择dfop_url或者dfop_data + /// + /// 文件处理命令 + /// 资源/文件URI + /// 操作结果/返回数据 + public HttpResult dfop(string fop, string uri) + { + if (UrlHelper.isValidUrl(uri)) + { + return dfopUrl(fop, uri); + } + else + { + return dfopData(fop, uri); + } + } + + /// + /// 文本处理 + /// + /// 文本处理命令 + /// 文本内容 + /// + public HttpResult dfopText(string fop, string text) + { + HttpResult result = new HttpResult(); + + try + { + string dfopUrl = string.Format("{0}/dfop?fop={1}", Config.DFOP_API_HOST, fop); + string token = createManageToken(dfopUrl, null); + string boundary = HttpHelper.createFormDataBoundary(); + string sep = "--" + boundary; + StringBuilder sb = new StringBuilder(); + sb.AppendLine(sep); + sb.AppendFormat("Content-Type: {0}\r\n", HttpHelper.CONTENT_TYPE_TEXT_PLAIN); + sb.AppendLine("Content-Disposition: form-data; name=data; filename=text\r\n"); + sb.AppendLine(text); + sb.AppendFormat("{0}--\r\n", sep); + byte[] data = Encoding.UTF8.GetBytes(sb.ToString()); + + result = httpManager.postMultipart(dfopUrl, data, boundary, token, null, true); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Dfop] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 文本处理 + /// + /// 文本处理命令 + /// 文本文件 + /// + public HttpResult dfopTextFile(string fop, string textFile) + { + HttpResult result = new HttpResult(); + + if (File.Exists(textFile)) + { + result = dfopText(fop, File.ReadAllText(textFile)); + } + else + { + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText = "[dfop error] File not found: " + textFile; + } + + return result; + } + + /// + /// 如果uri是网络url则使用此方法 + /// + /// 文件处理命令 + /// 资源URL + /// 处理结果 + public HttpResult dfopUrl(string fop, string url) + { + HttpResult result = new HttpResult(); + + try + { + string encodedUrl = StringHelper.urlEncode(url); + string dfopUrl = string.Format("{0}/dfop?fop={1}&url={2}", Config.DFOP_API_HOST, fop, encodedUrl); + string token = createManageToken(dfopUrl, null); + + result = httpManager.post(dfopUrl, token, null, true); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Dfop] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + /// + /// 如果uri是本地文件路径则使用此方法 + /// + /// 文件处理命令 + /// 文件名 + /// 处理结果 + public HttpResult dfopData(string fop, string localFile) + { + HttpResult result = new HttpResult(); + + try + { + string dfopUrl = string.Format("{0}/dfop?fop={1}", Config.DFOP_API_HOST, fop); + string key = Path.GetFileName(localFile); + byte[] data = File.ReadAllBytes(localFile); + string token = createManageToken(dfopUrl, null); + string boundary = HttpHelper.createFormDataBoundary(); + string sep = "--" + boundary; + + StringBuilder sb = new StringBuilder(); + sb.AppendLine(sep); + string filename = Path.GetFileName(localFile); + sb.AppendFormat("Content-Type: {0}\r\n", HttpHelper.CONTENT_TYPE_APP_OCTET); + sb.AppendFormat("Content-Disposition: form-data; name=\"data\"; filename={0}\r\n\r\n", filename); + byte[] partData1 = Encoding.UTF8.GetBytes(sb.ToString()); + byte[] partData2 = File.ReadAllBytes(localFile); + byte[] partData3 = Encoding.UTF8.GetBytes(string.Format("\r\n{0}--\r\n", sep)); + MemoryStream ms = new MemoryStream(); + ms.Write(partData1, 0, partData1.Length); + ms.Write(partData2, 0, partData2.Length); + ms.Write(partData3, 0, partData3.Length); + + result = httpManager.postMultipart(dfopUrl, ms.ToArray(), boundary, token, null, true); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder("[Dfop] Error: "); + Exception e = ex; + while (e != null) + { + sb.Append(e.Message + " "); + e = e.InnerException; + } + + sb.AppendFormat(" @{0}\n", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffff")); + + result.RefCode = HttpHelper.STATUS_CODE_EXCEPTION; + result.RefText += sb.ToString(); + } + + return result; + } + + } +} diff --git a/Qiniu/Util/CRC32.cs b/src/Qiniu/Util/CRC32.cs similarity index 53% rename from Qiniu/Util/CRC32.cs rename to src/Qiniu/Util/CRC32.cs index 6304bf01..25f4215b 100644 --- a/Qiniu/Util/CRC32.cs +++ b/src/Qiniu/Util/CRC32.cs @@ -8,27 +8,43 @@ namespace Qiniu.Util /// public class CRC32 { + /// + /// magic + /// public const UInt32 IEEE = 0xedb88320; private UInt32[] Table; private UInt32 Value; + /// + /// 初始化 + /// public CRC32() { Value = 0; - Table = MakeTable(IEEE); + Table = makeTable(IEEE); } - public void Write(byte[] p, int offset, int count) + /// + /// 写入 + /// + /// 字节数据 + /// 偏移位置 + /// 字节数 + public void write(byte[] p, int offset, int count) { - this.Value = Update(this.Value, this.Table, p, offset, count); + this.Value = update(this.Value, this.Table, p, offset, count); } - public UInt32 Sum32() + /// + /// 校验和 + /// + /// 校验和 + public uint sum() { return this.Value; } - private static UInt32[] MakeTable(UInt32 poly) + private static uint[] makeTable(UInt32 poly) { UInt32[] table = new UInt32[256]; for (int i = 0; i < 256; i++) @@ -46,7 +62,16 @@ private static UInt32[] MakeTable(UInt32 poly) return table; } - public static UInt32 Update(UInt32 crc, UInt32[] table, byte[] p, int offset, int count) + /// + /// 更新 + /// + /// crc32 + /// 表 + /// 字节数据 + /// 偏移位置 + /// 字节数 + /// + public static uint update(UInt32 crc, UInt32[] table, byte[] p, int offset, int count) { crc = ~crc; for (int i = 0; i < count; i++) @@ -60,20 +85,26 @@ public static UInt32 Update(UInt32 crc, UInt32[] table, byte[] p, int offset, in /// 计算字节数据的crc32值 /// /// 二进制数据 - /// 长度 /// crc32值 - public static UInt32 CheckSumBytes(byte[] data) + public static uint checkSumBytes(byte[] data) { CRC32 crc = new CRC32(); - crc.Write(data, 0, data.Length); - return crc.Sum32(); + crc.write(data, 0, data.Length); + return crc.sum(); } - public static UInt32 CheckSumSlice(byte[] data, int offset, int count) + /// + /// 检验 + /// + /// 字节数据 + /// 偏移位置 + /// 字节数 + /// + public static uint checkSumSlice(byte[] data, int offset, int count) { CRC32 crc = new CRC32(); - crc.Write(data, offset, count); - return crc.Sum32(); + crc.write(data, offset, count); + return crc.sum(); } /// @@ -81,7 +112,7 @@ public static UInt32 CheckSumSlice(byte[] data, int offset, int count) /// /// 沙盒文件全路径 /// crc32值 - public static UInt32 CheckSumFile(string filePath) + public static uint checkSumFile(string filePath) { CRC32 crc = new CRC32(); int bufferLen = 32 * 1024; @@ -93,10 +124,10 @@ public static UInt32 CheckSumFile(string filePath) int n = fs.Read(buffer, 0, bufferLen); if (n == 0) break; - crc.Write(buffer, 0, n); + crc.write(buffer, 0, n); } } - return crc.Sum32(); + return crc.sum(); } } } \ No newline at end of file diff --git a/Qiniu/Util/QETag.cs b/src/Qiniu/Util/QETag.cs similarity index 72% rename from Qiniu/Util/QETag.cs rename to src/Qiniu/Util/QETag.cs index 4ca6232d..4696ea00 100644 --- a/Qiniu/Util/QETag.cs +++ b/src/Qiniu/Util/QETag.cs @@ -3,13 +3,26 @@ namespace Qiniu.Util { + /// + /// QINIU ETAG(文件hash) + /// public class QETag { - private static int BLOCK_SIZE = 4 * 1024 * 1024; + // 块大小(固定为4MB) + private const int BLOCK_SIZE = 4 * 1024 * 1024; + + // 计算时以20B为单位 private static int BLOCK_SHA1_SIZE = 20; - public static string hash(string filePath) + + /// + /// 计算文件hash(ETAG) + /// + /// + /// 文件hash + public static string calcHash(string filePath) { string qetag = ""; + try { using (FileStream stream = new FileStream(filePath, FileMode.Open, FileAccess.Read)) @@ -23,7 +36,7 @@ public static string hash(string filePath) byte[] readBuffer = new byte[readByteCount]; Array.Copy(buffer, readBuffer, readByteCount); - byte[] sha1Buffer = StringUtils.sha1(readBuffer); + byte[] sha1Buffer = StringHelper.calcSHA1(readBuffer); finalBuffer[0] = 0x16; Array.Copy(sha1Buffer, 0, finalBuffer, 1, sha1Buffer.Length); @@ -39,17 +52,17 @@ public static string hash(string filePath) byte[] readBuffer = new byte[readByteCount]; Array.Copy(buffer, readBuffer, readByteCount); - byte[] sha1Buffer = StringUtils.sha1(readBuffer); + byte[] sha1Buffer = StringHelper.calcSHA1(readBuffer); Array.Copy(sha1Buffer, 0, sha1AllBuffer, i * BLOCK_SHA1_SIZE, sha1Buffer.Length); } - byte[] sha1AllBufferSha1 = StringUtils.sha1(sha1AllBuffer); + byte[] sha1AllBufferSha1 = StringHelper.calcSHA1(sha1AllBuffer); finalBuffer[0] = 0x96; Array.Copy(sha1AllBufferSha1, 0, finalBuffer, 1, sha1AllBufferSha1.Length); } - qetag = StringUtils.urlSafeBase64Encode(finalBuffer); + qetag = StringHelper.urlSafeBase64Encode(finalBuffer); } } catch (Exception) { } diff --git a/Qiniu/Util/StringUtils.cs b/src/Qiniu/Util/StringHelper.cs similarity index 53% rename from Qiniu/Util/StringUtils.cs rename to src/Qiniu/Util/StringHelper.cs index 4260f67e..d4c11e47 100644 --- a/Qiniu/Util/StringUtils.cs +++ b/src/Qiniu/Util/StringHelper.cs @@ -1,15 +1,17 @@ -using Newtonsoft.Json; -using System; +using System; using System.Collections.Generic; using System.Security.Cryptography; using System.Text; +using Newtonsoft.Json; namespace Qiniu.Util { /// /// 字符串处理工具 + /// 特别注意,不同平台使用的Cryptography可能略有不同,使用中如有遇到问题,请反馈 + /// 提交您的issue到 https://github.com/fengyhack/csharp-sdk-shared /// - public class StringUtils + public class StringHelper { /// /// 字符串连接 @@ -70,6 +72,11 @@ public static string urlSafeBase64Encode(string from) return urlSafeBase64Encode(Encoding.UTF8.GetBytes(from)); } + /// + /// URL安全的base64编码 + /// + /// + /// public static string urlSafeBase64Encode(byte[] from) { return Convert.ToBase64String(from).Replace('+', '-').Replace('/', '_'); @@ -85,6 +92,11 @@ public static byte[] urlsafeBase64Decode(string from) return Convert.FromBase64String(from.Replace('-', '+').Replace('_', '/')); } + /// + /// 转换到JSON字符串 + /// + /// 对象实例 + /// JSON编码字符串 public static string jsonEncode(object obj) { JsonSerializerSettings setting = new JsonSerializerSettings(); @@ -92,11 +104,23 @@ public static string jsonEncode(object obj) return JsonConvert.SerializeObject(obj, setting); } + /// + /// JSON解析 + /// + /// 类型 + /// JSON字符串 + /// JSON解码结果 public static T jsonDecode(string jsonData) { return JsonConvert.DeserializeObject(jsonData); } + /// + /// bucket:key 编码 + /// + /// 空间名称 + /// 文件key + /// 编码 public static string encodedEntry(string bucket, string key) { if (key == null) @@ -109,27 +133,39 @@ public static string encodedEntry(string bucket, string key) } } - public static byte[] sha1(byte[] data) + /// + /// 计算SHA1 + /// + /// 字节数据 + /// SHA1 + public static byte[] calcSHA1(byte[] data) { - SHA1 sha1 = new SHA1CryptoServiceProvider(); + SHA1 sha1 = SHA1.Create(); return sha1.ComputeHash(data); } - public static string urlencode(string from) + /// + /// URL编码 + /// + /// 源字符串 + /// URL编码字符串 + public static string urlEncode(string from) { return Uri.EscapeDataString(from); } - public static string urlValuesEncode(Dictionary urlValues) + /// + /// URL键值对编码 + /// + /// 键值对 + /// URL表单编码的键值对数据 + public static string urlValuesEncode(Dictionary values) { StringBuilder urlValuesBuilder = new StringBuilder(); - foreach (KeyValuePair kvp in urlValues) + foreach (KeyValuePair kvp in values) { - foreach (string urlVal in kvp.Value) - { - urlValuesBuilder.AppendFormat("{0}={1}&", Uri.EscapeDataString(kvp.Key), Uri.EscapeDataString(urlVal)); - } + urlValuesBuilder.AppendFormat("{0}={1}&", Uri.EscapeDataString(kvp.Key), Uri.EscapeDataString(kvp.Value)); } string encodedStr=urlValuesBuilder.ToString(); return encodedStr.Substring(0, encodedStr.Length - 1); @@ -138,11 +174,11 @@ public static string urlValuesEncode(Dictionary urlValues) /// /// md5 hash in hex string /// - /// str to hash - /// str hashed and format in hex string - public static string md5Hash(string str) + /// 待计算的字符串 + /// MD5结果 + public static string calcMD5(string str) { - MD5 md5 = new MD5CryptoServiceProvider(); + MD5 md5 = MD5.Create(); byte[] data = Encoding.UTF8.GetBytes(str); byte[] hashData = md5.ComputeHash(data); StringBuilder sb = new StringBuilder(hashData.Length * 2); @@ -152,5 +188,46 @@ public static string md5Hash(string str) } return sb.ToString(); } + + /// + /// 从UNIX时间戳转换为DateTime + /// + /// 时间戳字符串 + /// 日期 + public static DateTime fromUnixTimestamp(string timestamp) + { + DateTime dt0 = (new DateTime(1910, 1, 1)).ToLocalTime(); + long ticks = long.Parse(timestamp + "0000000"); + TimeSpan tsx = new TimeSpan(ticks); + return dt0.Add(tsx); + } + + /// + /// 指定时间点转换为UNIX时间戳 + /// + /// 绝对时间点 + /// 时间戳字符串 + public static string toUnixTimestamp(DateTime stopAt) + { + DateTime dt0 = (new DateTime(1910, 1, 1)).ToLocalTime(); + TimeSpan tsx = stopAt.Subtract(dt0); + string sts = tsx.Ticks.ToString(); + return sts.Substring(0, sts.Length - 7); + } + + /// + /// 从现在(调用此函数时刻)起若干秒以后那个时间点的时间戳 + /// + /// 从现在起多少秒以后 + /// 时间戳字符串 + public static string calcUnixTimestamp(long secondsAfterNow) + { + DateTime dt0 = (new DateTime(1910, 1, 1)).ToLocalTime(); + DateTime dt1 = DateTime.Now.AddSeconds(secondsAfterNow); + TimeSpan tsx = dt1.Subtract(dt0); + string sts = tsx.Ticks.ToString(); + return sts.Substring(0, sts.Length - 7); + } + } } \ No newline at end of file diff --git a/src/Qiniu/Util/UserEnv.cs b/src/Qiniu/Util/UserEnv.cs new file mode 100644 index 00000000..26ec0db3 --- /dev/null +++ b/src/Qiniu/Util/UserEnv.cs @@ -0,0 +1,34 @@ +using System; + +namespace Qiniu.Util +{ + /// + /// 环境变量-用户路径 + /// + public class UserEnv + { + /// + /// 获取home路径 + /// + /// HOME路径 + public static string getHomeFolder() + { + // Windows下Home目录 = %HOMEDRIVE% + %HOMEPATH% + string homeFolder = Environment.GetEnvironmentVariable("HOMEDRIVE") + Environment.GetEnvironmentVariable("HOMEPATH"); + + if(string.IsNullOrEmpty(homeFolder)) + { + // OSX/Ubuntu下Home目录 = $HOME + homeFolder= Environment.GetEnvironmentVariable("HOME"); + } + + if (string.IsNullOrEmpty(homeFolder)) + { + // 如果获取失败,就设置为./ + homeFolder = "./"; + } + + return homeFolder; + } + } +} diff --git a/src/project.json b/src/project.json new file mode 100644 index 00000000..ca774b95 --- /dev/null +++ b/src/project.json @@ -0,0 +1,18 @@ +{ + "title": "Qiniu (Cloud) C# SDK v7.2.2.0 (.NETStandard 1.6.0)", + "copyright": "Copyright © 2017", + "description": "Qiniu (Cloud) C# SDK v7.2.2.0 (.NETStandard 1.6.0)", + "version": "7.2.2-0", + "dependencies": { + "NETStandard.Library": "1.6.0" + }, + "frameworks": { + "netstandard1.6": { + "imports": "dnxcore50" + } + }, + "buildOptions": { + "xmlDoc": true, + "define": [ "NetStandard", "NetStandard16" ] + } +} \ No newline at end of file diff --git a/src/project.lock.json b/src/project.lock.json new file mode 100644 index 00000000..e4e7845f --- /dev/null +++ b/src/project.lock.json @@ -0,0 +1,4347 @@ +{ + "locked": false, + "version": 2, + "targets": { + ".NETStandard,Version=v1.6": { + "Microsoft.CSharp/4.0.1": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.Dynamic.Runtime": "4.0.11", + "System.Globalization": "4.0.11", + "System.Linq": "4.1.0", + "System.Linq.Expressions": "4.1.0", + "System.ObjectModel": "4.0.12", + "System.Reflection": "4.1.0", + "System.Reflection.Extensions": "4.0.1", + "System.Reflection.Primitives": "4.0.1", + "System.Reflection.TypeExtensions": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.InteropServices": "4.1.0", + "System.Threading": "4.0.11" + }, + "compile": { + "ref/netstandard1.0/Microsoft.CSharp.dll": {} + }, + "runtime": { + "lib/netstandard1.3/Microsoft.CSharp.dll": {} + } + }, + "Microsoft.NETCore.Platforms/1.0.1": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "Microsoft.NETCore.Targets/1.0.1": { + "type": "package", + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "Microsoft.Win32.Primitives/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/Microsoft.Win32.Primitives.dll": {} + } + }, + "NETStandard.Library/1.6.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.Win32.Primitives": "4.0.1", + "System.AppContext": "4.1.0", + "System.Collections": "4.0.11", + "System.Collections.Concurrent": "4.0.12", + "System.Console": "4.0.0", + "System.Diagnostics.Debug": "4.0.11", + "System.Diagnostics.Tools": "4.0.1", + "System.Diagnostics.Tracing": "4.1.0", + "System.Globalization": "4.0.11", + "System.Globalization.Calendars": "4.0.1", + "System.IO": "4.1.0", + "System.IO.Compression": "4.1.0", + "System.IO.Compression.ZipFile": "4.0.1", + "System.IO.FileSystem": "4.0.1", + "System.IO.FileSystem.Primitives": "4.0.1", + "System.Linq": "4.1.0", + "System.Linq.Expressions": "4.1.0", + "System.Net.Http": "4.1.0", + "System.Net.Primitives": "4.0.11", + "System.Net.Sockets": "4.1.0", + "System.ObjectModel": "4.0.12", + "System.Reflection": "4.1.0", + "System.Reflection.Extensions": "4.0.1", + "System.Reflection.Primitives": "4.0.1", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Runtime.InteropServices": "4.1.0", + "System.Runtime.InteropServices.RuntimeInformation": "4.0.0", + "System.Runtime.Numerics": "4.0.1", + "System.Security.Cryptography.Algorithms": "4.2.0", + "System.Security.Cryptography.Encoding": "4.0.0", + "System.Security.Cryptography.Primitives": "4.0.0", + "System.Security.Cryptography.X509Certificates": "4.1.0", + "System.Text.Encoding": "4.0.11", + "System.Text.Encoding.Extensions": "4.0.11", + "System.Text.RegularExpressions": "4.1.0", + "System.Threading": "4.0.11", + "System.Threading.Tasks": "4.0.11", + "System.Threading.Timer": "4.0.1", + "System.Xml.ReaderWriter": "4.0.11", + "System.Xml.XDocument": "4.0.11" + } + }, + "Newtonsoft.Json/9.0.1": { + "type": "package", + "dependencies": { + "Microsoft.CSharp": "4.0.1", + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.Dynamic.Runtime": "4.0.11", + "System.Globalization": "4.0.11", + "System.IO": "4.1.0", + "System.Linq": "4.1.0", + "System.Linq.Expressions": "4.1.0", + "System.ObjectModel": "4.0.12", + "System.Reflection": "4.1.0", + "System.Reflection.Extensions": "4.0.1", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.Serialization.Primitives": "4.1.1", + "System.Text.Encoding": "4.0.11", + "System.Text.Encoding.Extensions": "4.0.11", + "System.Text.RegularExpressions": "4.1.0", + "System.Threading": "4.0.11", + "System.Threading.Tasks": "4.0.11", + "System.Xml.ReaderWriter": "4.0.11", + "System.Xml.XDocument": "4.0.11" + }, + "compile": { + "lib/netstandard1.0/Newtonsoft.Json.dll": {} + }, + "runtime": { + "lib/netstandard1.0/Newtonsoft.Json.dll": {} + } + }, + "runtime.native.System/4.0.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1" + }, + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "runtime.native.System.IO.Compression/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1" + }, + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "runtime.native.System.Net.Http/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1" + }, + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "runtime.native.System.Security.Cryptography/4.0.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1" + }, + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + } + }, + "System.AppContext/4.1.0": { + "type": "package", + "dependencies": { + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.6/System.AppContext.dll": {} + }, + "runtime": { + "lib/netstandard1.6/System.AppContext.dll": {} + } + }, + "System.Buffers/4.0.0": { + "type": "package", + "dependencies": { + "System.Diagnostics.Debug": "4.0.11", + "System.Diagnostics.Tracing": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Threading": "4.0.11" + }, + "compile": { + "lib/netstandard1.1/_._": {} + }, + "runtime": { + "lib/netstandard1.1/System.Buffers.dll": {} + } + }, + "System.Collections/4.0.11": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.Collections.dll": {} + } + }, + "System.Collections.Concurrent/4.0.12": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.Diagnostics.Tracing": "4.1.0", + "System.Globalization": "4.0.11", + "System.Reflection": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Threading": "4.0.11", + "System.Threading.Tasks": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.Collections.Concurrent.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.Collections.Concurrent.dll": {} + } + }, + "System.Console/4.0.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.IO": "4.1.0", + "System.Runtime": "4.1.0", + "System.Text.Encoding": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.Console.dll": {} + } + }, + "System.Diagnostics.Debug/4.0.11": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.Diagnostics.Debug.dll": {} + } + }, + "System.Diagnostics.DiagnosticSource/4.0.0": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Diagnostics.Tracing": "4.1.0", + "System.Reflection": "4.1.0", + "System.Runtime": "4.1.0", + "System.Threading": "4.0.11" + }, + "compile": { + "lib/netstandard1.3/_._": {} + }, + "runtime": { + "lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll": {} + } + }, + "System.Diagnostics.Tools/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.0/System.Diagnostics.Tools.dll": {} + } + }, + "System.Diagnostics.Tracing/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.5/System.Diagnostics.Tracing.dll": {} + } + }, + "System.Dynamic.Runtime/4.0.11": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.Globalization": "4.0.11", + "System.Linq": "4.1.0", + "System.Linq.Expressions": "4.1.0", + "System.ObjectModel": "4.0.12", + "System.Reflection": "4.1.0", + "System.Reflection.Emit": "4.0.1", + "System.Reflection.Emit.ILGeneration": "4.0.1", + "System.Reflection.Primitives": "4.0.1", + "System.Reflection.TypeExtensions": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Threading": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.Dynamic.Runtime.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.Dynamic.Runtime.dll": {} + } + }, + "System.Globalization/4.0.11": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.Globalization.dll": {} + } + }, + "System.Globalization.Calendars/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Globalization": "4.0.11", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.Globalization.Calendars.dll": {} + } + }, + "System.Globalization.Extensions/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "System.Globalization": "4.0.11", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.InteropServices": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/_._": {} + }, + "runtimeTargets": { + "runtimes/unix/lib/netstandard1.3/System.Globalization.Extensions.dll": { + "assetType": "runtime", + "rid": "unix" + }, + "runtimes/win/lib/netstandard1.3/System.Globalization.Extensions.dll": { + "assetType": "runtime", + "rid": "win" + } + } + }, + "System.IO/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0", + "System.Text.Encoding": "4.0.11", + "System.Threading.Tasks": "4.0.11" + }, + "compile": { + "ref/netstandard1.5/System.IO.dll": {} + } + }, + "System.IO.Compression/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.IO": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Runtime.InteropServices": "4.1.0", + "System.Text.Encoding": "4.0.11", + "System.Threading": "4.0.11", + "System.Threading.Tasks": "4.0.11", + "runtime.native.System": "4.0.0", + "runtime.native.System.IO.Compression": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.IO.Compression.dll": {} + }, + "runtimeTargets": { + "runtimes/unix/lib/netstandard1.3/System.IO.Compression.dll": { + "assetType": "runtime", + "rid": "unix" + }, + "runtimes/win/lib/netstandard1.3/System.IO.Compression.dll": { + "assetType": "runtime", + "rid": "win" + } + } + }, + "System.IO.Compression.ZipFile/4.0.1": { + "type": "package", + "dependencies": { + "System.Buffers": "4.0.0", + "System.IO": "4.1.0", + "System.IO.Compression": "4.1.0", + "System.IO.FileSystem": "4.0.1", + "System.IO.FileSystem.Primitives": "4.0.1", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Text.Encoding": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.IO.Compression.ZipFile.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.IO.Compression.ZipFile.dll": {} + } + }, + "System.IO.FileSystem/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.IO": "4.1.0", + "System.IO.FileSystem.Primitives": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Text.Encoding": "4.0.11", + "System.Threading.Tasks": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.IO.FileSystem.dll": {} + } + }, + "System.IO.FileSystem.Primitives/4.0.1": { + "type": "package", + "dependencies": { + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.IO.FileSystem.Primitives.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.IO.FileSystem.Primitives.dll": {} + } + }, + "System.Linq/4.1.0": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0" + }, + "compile": { + "ref/netstandard1.6/System.Linq.dll": {} + }, + "runtime": { + "lib/netstandard1.6/System.Linq.dll": {} + } + }, + "System.Linq.Expressions/4.1.0": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.Globalization": "4.0.11", + "System.IO": "4.1.0", + "System.Linq": "4.1.0", + "System.ObjectModel": "4.0.12", + "System.Reflection": "4.1.0", + "System.Reflection.Emit": "4.0.1", + "System.Reflection.Emit.ILGeneration": "4.0.1", + "System.Reflection.Emit.Lightweight": "4.0.1", + "System.Reflection.Extensions": "4.0.1", + "System.Reflection.Primitives": "4.0.1", + "System.Reflection.TypeExtensions": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Threading": "4.0.11" + }, + "compile": { + "ref/netstandard1.6/System.Linq.Expressions.dll": {} + }, + "runtime": { + "lib/netstandard1.6/System.Linq.Expressions.dll": {} + } + }, + "System.Net.Http/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.Diagnostics.DiagnosticSource": "4.0.0", + "System.Diagnostics.Tracing": "4.1.0", + "System.Globalization": "4.0.11", + "System.Globalization.Extensions": "4.0.1", + "System.IO": "4.1.0", + "System.IO.FileSystem": "4.0.1", + "System.Net.Primitives": "4.0.11", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Runtime.InteropServices": "4.1.0", + "System.Security.Cryptography.Algorithms": "4.2.0", + "System.Security.Cryptography.Encoding": "4.0.0", + "System.Security.Cryptography.OpenSsl": "4.0.0", + "System.Security.Cryptography.Primitives": "4.0.0", + "System.Security.Cryptography.X509Certificates": "4.1.0", + "System.Text.Encoding": "4.0.11", + "System.Threading": "4.0.11", + "System.Threading.Tasks": "4.0.11", + "runtime.native.System": "4.0.0", + "runtime.native.System.Net.Http": "4.0.1", + "runtime.native.System.Security.Cryptography": "4.0.0" + }, + "compile": { + "ref/netstandard1.3/System.Net.Http.dll": {} + }, + "runtimeTargets": { + "runtimes/unix/lib/netstandard1.6/System.Net.Http.dll": { + "assetType": "runtime", + "rid": "unix" + }, + "runtimes/win/lib/netstandard1.3/System.Net.Http.dll": { + "assetType": "runtime", + "rid": "win" + } + } + }, + "System.Net.Primitives/4.0.11": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Handles": "4.0.1" + }, + "compile": { + "ref/netstandard1.3/System.Net.Primitives.dll": {} + } + }, + "System.Net.Sockets/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.IO": "4.1.0", + "System.Net.Primitives": "4.0.11", + "System.Runtime": "4.1.0", + "System.Threading.Tasks": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.Net.Sockets.dll": {} + } + }, + "System.ObjectModel/4.0.12": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Threading": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.ObjectModel.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.ObjectModel.dll": {} + } + }, + "System.Reflection/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.IO": "4.1.0", + "System.Reflection.Primitives": "4.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.5/System.Reflection.dll": {} + } + }, + "System.Reflection.Emit/4.0.1": { + "type": "package", + "dependencies": { + "System.IO": "4.1.0", + "System.Reflection": "4.1.0", + "System.Reflection.Emit.ILGeneration": "4.0.1", + "System.Reflection.Primitives": "4.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.1/_._": {} + }, + "runtime": { + "lib/netstandard1.3/System.Reflection.Emit.dll": {} + } + }, + "System.Reflection.Emit.ILGeneration/4.0.1": { + "type": "package", + "dependencies": { + "System.Reflection": "4.1.0", + "System.Reflection.Primitives": "4.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.3/System.Reflection.Emit.ILGeneration.dll": {} + } + }, + "System.Reflection.Emit.Lightweight/4.0.1": { + "type": "package", + "dependencies": { + "System.Reflection": "4.1.0", + "System.Reflection.Emit.ILGeneration": "4.0.1", + "System.Reflection.Primitives": "4.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.3/System.Reflection.Emit.Lightweight.dll": {} + } + }, + "System.Reflection.Extensions/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Reflection": "4.1.0", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.0/System.Reflection.Extensions.dll": {} + } + }, + "System.Reflection.Primitives/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.0/System.Reflection.Primitives.dll": {} + } + }, + "System.Reflection.TypeExtensions/4.1.0": { + "type": "package", + "dependencies": { + "System.Reflection": "4.1.0", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.5/_._": {} + }, + "runtime": { + "lib/netstandard1.5/System.Reflection.TypeExtensions.dll": {} + } + }, + "System.Resources.ResourceManager/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Globalization": "4.0.11", + "System.Reflection": "4.1.0", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.0/System.Resources.ResourceManager.dll": {} + } + }, + "System.Runtime/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1" + }, + "compile": { + "ref/netstandard1.5/System.Runtime.dll": {} + } + }, + "System.Runtime.Extensions/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.5/System.Runtime.Extensions.dll": {} + } + }, + "System.Runtime.Handles/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.Runtime.Handles.dll": {} + } + }, + "System.Runtime.InteropServices/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Reflection": "4.1.0", + "System.Reflection.Primitives": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Handles": "4.0.1" + }, + "compile": { + "ref/netstandard1.5/System.Runtime.InteropServices.dll": {} + } + }, + "System.Runtime.InteropServices.RuntimeInformation/4.0.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "System.Reflection": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.InteropServices": "4.1.0", + "System.Threading": "4.0.11", + "runtime.native.System": "4.0.0" + }, + "compile": { + "ref/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll": {} + }, + "runtimeTargets": { + "runtimes/unix/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll": { + "assetType": "runtime", + "rid": "unix" + }, + "runtimes/win/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll": { + "assetType": "runtime", + "rid": "win" + } + } + }, + "System.Runtime.Numerics/4.0.1": { + "type": "package", + "dependencies": { + "System.Globalization": "4.0.11", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0" + }, + "compile": { + "ref/netstandard1.1/System.Runtime.Numerics.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.Runtime.Numerics.dll": {} + } + }, + "System.Runtime.Serialization.Primitives/4.1.1": { + "type": "package", + "dependencies": { + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.Runtime.Serialization.Primitives.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.Runtime.Serialization.Primitives.dll": {} + } + }, + "System.Security.Cryptography.Algorithms/4.2.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "System.Collections": "4.0.11", + "System.IO": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Runtime.InteropServices": "4.1.0", + "System.Runtime.Numerics": "4.0.1", + "System.Security.Cryptography.Encoding": "4.0.0", + "System.Security.Cryptography.Primitives": "4.0.0", + "System.Text.Encoding": "4.0.11", + "runtime.native.System.Security.Cryptography": "4.0.0" + }, + "compile": { + "ref/netstandard1.6/System.Security.Cryptography.Algorithms.dll": {} + }, + "runtimeTargets": { + "runtimes/unix/lib/netstandard1.6/System.Security.Cryptography.Algorithms.dll": { + "assetType": "runtime", + "rid": "unix" + }, + "runtimes/win/lib/netstandard1.6/System.Security.Cryptography.Algorithms.dll": { + "assetType": "runtime", + "rid": "win" + } + } + }, + "System.Security.Cryptography.Cng/4.2.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "System.IO": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Runtime.InteropServices": "4.1.0", + "System.Security.Cryptography.Algorithms": "4.2.0", + "System.Security.Cryptography.Encoding": "4.0.0", + "System.Security.Cryptography.Primitives": "4.0.0", + "System.Text.Encoding": "4.0.11" + }, + "compile": { + "ref/netstandard1.6/_._": {} + }, + "runtimeTargets": { + "runtimes/unix/lib/netstandard1.6/System.Security.Cryptography.Cng.dll": { + "assetType": "runtime", + "rid": "unix" + }, + "runtimes/win/lib/netstandard1.6/System.Security.Cryptography.Cng.dll": { + "assetType": "runtime", + "rid": "win" + } + } + }, + "System.Security.Cryptography.Csp/4.0.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "System.IO": "4.1.0", + "System.Reflection": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Runtime.InteropServices": "4.1.0", + "System.Security.Cryptography.Algorithms": "4.2.0", + "System.Security.Cryptography.Encoding": "4.0.0", + "System.Security.Cryptography.Primitives": "4.0.0", + "System.Text.Encoding": "4.0.11", + "System.Threading": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/_._": {} + }, + "runtimeTargets": { + "runtimes/unix/lib/netstandard1.3/System.Security.Cryptography.Csp.dll": { + "assetType": "runtime", + "rid": "unix" + }, + "runtimes/win/lib/netstandard1.3/System.Security.Cryptography.Csp.dll": { + "assetType": "runtime", + "rid": "win" + } + } + }, + "System.Security.Cryptography.Encoding/4.0.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "System.Collections": "4.0.11", + "System.Collections.Concurrent": "4.0.12", + "System.Linq": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Runtime.InteropServices": "4.1.0", + "System.Security.Cryptography.Primitives": "4.0.0", + "System.Text.Encoding": "4.0.11", + "runtime.native.System.Security.Cryptography": "4.0.0" + }, + "compile": { + "ref/netstandard1.3/System.Security.Cryptography.Encoding.dll": {} + }, + "runtimeTargets": { + "runtimes/unix/lib/netstandard1.3/System.Security.Cryptography.Encoding.dll": { + "assetType": "runtime", + "rid": "unix" + }, + "runtimes/win/lib/netstandard1.3/System.Security.Cryptography.Encoding.dll": { + "assetType": "runtime", + "rid": "win" + } + } + }, + "System.Security.Cryptography.OpenSsl/4.0.0": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.IO": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Runtime.InteropServices": "4.1.0", + "System.Runtime.Numerics": "4.0.1", + "System.Security.Cryptography.Algorithms": "4.2.0", + "System.Security.Cryptography.Encoding": "4.0.0", + "System.Security.Cryptography.Primitives": "4.0.0", + "System.Text.Encoding": "4.0.11", + "runtime.native.System.Security.Cryptography": "4.0.0" + }, + "compile": { + "ref/netstandard1.6/_._": {} + }, + "runtime": { + "lib/netstandard1.6/System.Security.Cryptography.OpenSsl.dll": {} + }, + "runtimeTargets": { + "runtimes/unix/lib/netstandard1.6/System.Security.Cryptography.OpenSsl.dll": { + "assetType": "runtime", + "rid": "unix" + } + } + }, + "System.Security.Cryptography.Primitives/4.0.0": { + "type": "package", + "dependencies": { + "System.Diagnostics.Debug": "4.0.11", + "System.Globalization": "4.0.11", + "System.IO": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Threading": "4.0.11", + "System.Threading.Tasks": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.Security.Cryptography.Primitives.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.Security.Cryptography.Primitives.dll": {} + } + }, + "System.Security.Cryptography.X509Certificates/4.1.0": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.Globalization": "4.0.11", + "System.Globalization.Calendars": "4.0.1", + "System.IO": "4.1.0", + "System.IO.FileSystem": "4.0.1", + "System.IO.FileSystem.Primitives": "4.0.1", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.Handles": "4.0.1", + "System.Runtime.InteropServices": "4.1.0", + "System.Runtime.Numerics": "4.0.1", + "System.Security.Cryptography.Algorithms": "4.2.0", + "System.Security.Cryptography.Cng": "4.2.0", + "System.Security.Cryptography.Csp": "4.0.0", + "System.Security.Cryptography.Encoding": "4.0.0", + "System.Security.Cryptography.OpenSsl": "4.0.0", + "System.Security.Cryptography.Primitives": "4.0.0", + "System.Text.Encoding": "4.0.11", + "System.Threading": "4.0.11", + "runtime.native.System": "4.0.0", + "runtime.native.System.Net.Http": "4.0.1", + "runtime.native.System.Security.Cryptography": "4.0.0" + }, + "compile": { + "ref/netstandard1.4/System.Security.Cryptography.X509Certificates.dll": {} + }, + "runtimeTargets": { + "runtimes/unix/lib/netstandard1.6/System.Security.Cryptography.X509Certificates.dll": { + "assetType": "runtime", + "rid": "unix" + }, + "runtimes/win/lib/netstandard1.6/System.Security.Cryptography.X509Certificates.dll": { + "assetType": "runtime", + "rid": "win" + } + } + }, + "System.Text.Encoding/4.0.11": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.Text.Encoding.dll": {} + } + }, + "System.Text.Encoding.Extensions/4.0.11": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0", + "System.Text.Encoding": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.Text.Encoding.Extensions.dll": {} + } + }, + "System.Text.RegularExpressions/4.1.0": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Globalization": "4.0.11", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Threading": "4.0.11" + }, + "compile": { + "ref/netstandard1.6/System.Text.RegularExpressions.dll": {} + }, + "runtime": { + "lib/netstandard1.6/System.Text.RegularExpressions.dll": {} + } + }, + "System.Threading/4.0.11": { + "type": "package", + "dependencies": { + "System.Runtime": "4.1.0", + "System.Threading.Tasks": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.Threading.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.Threading.dll": {} + } + }, + "System.Threading.Tasks/4.0.11": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.3/System.Threading.Tasks.dll": {} + } + }, + "System.Threading.Tasks.Extensions/4.0.0": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Runtime": "4.1.0", + "System.Threading.Tasks": "4.0.11" + }, + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/System.Threading.Tasks.Extensions.dll": {} + } + }, + "System.Threading.Timer/4.0.1": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.0.1", + "Microsoft.NETCore.Targets": "1.0.1", + "System.Runtime": "4.1.0" + }, + "compile": { + "ref/netstandard1.2/System.Threading.Timer.dll": {} + } + }, + "System.Xml.ReaderWriter/4.0.11": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.Globalization": "4.0.11", + "System.IO": "4.1.0", + "System.IO.FileSystem": "4.0.1", + "System.IO.FileSystem.Primitives": "4.0.1", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.InteropServices": "4.1.0", + "System.Text.Encoding": "4.0.11", + "System.Text.Encoding.Extensions": "4.0.11", + "System.Text.RegularExpressions": "4.1.0", + "System.Threading.Tasks": "4.0.11", + "System.Threading.Tasks.Extensions": "4.0.0" + }, + "compile": { + "ref/netstandard1.3/System.Xml.ReaderWriter.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.Xml.ReaderWriter.dll": {} + } + }, + "System.Xml.XDocument/4.0.11": { + "type": "package", + "dependencies": { + "System.Collections": "4.0.11", + "System.Diagnostics.Debug": "4.0.11", + "System.Diagnostics.Tools": "4.0.1", + "System.Globalization": "4.0.11", + "System.IO": "4.1.0", + "System.Reflection": "4.1.0", + "System.Resources.ResourceManager": "4.0.1", + "System.Runtime": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Text.Encoding": "4.0.11", + "System.Threading": "4.0.11", + "System.Xml.ReaderWriter": "4.0.11" + }, + "compile": { + "ref/netstandard1.3/System.Xml.XDocument.dll": {} + }, + "runtime": { + "lib/netstandard1.3/System.Xml.XDocument.dll": {} + } + } + } + }, + "libraries": { + "Microsoft.CSharp/4.0.1": { + "sha512": "17h8b5mXa87XYKrrVqdgZ38JefSUqLChUQpXgSnpzsM0nDOhE40FTeNWOJ/YmySGV6tG6T8+hjz6vxbknHJr6A==", + "type": "package", + "path": "Microsoft.CSharp/4.0.1", + "files": [ + "Microsoft.CSharp.4.0.1.nupkg.sha512", + "Microsoft.CSharp.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/Microsoft.CSharp.dll", + "lib/netstandard1.3/Microsoft.CSharp.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/Microsoft.CSharp.dll", + "ref/netcore50/Microsoft.CSharp.xml", + "ref/netcore50/de/Microsoft.CSharp.xml", + "ref/netcore50/es/Microsoft.CSharp.xml", + "ref/netcore50/fr/Microsoft.CSharp.xml", + "ref/netcore50/it/Microsoft.CSharp.xml", + "ref/netcore50/ja/Microsoft.CSharp.xml", + "ref/netcore50/ko/Microsoft.CSharp.xml", + "ref/netcore50/ru/Microsoft.CSharp.xml", + "ref/netcore50/zh-hans/Microsoft.CSharp.xml", + "ref/netcore50/zh-hant/Microsoft.CSharp.xml", + "ref/netstandard1.0/Microsoft.CSharp.dll", + "ref/netstandard1.0/Microsoft.CSharp.xml", + "ref/netstandard1.0/de/Microsoft.CSharp.xml", + "ref/netstandard1.0/es/Microsoft.CSharp.xml", + "ref/netstandard1.0/fr/Microsoft.CSharp.xml", + "ref/netstandard1.0/it/Microsoft.CSharp.xml", + "ref/netstandard1.0/ja/Microsoft.CSharp.xml", + "ref/netstandard1.0/ko/Microsoft.CSharp.xml", + "ref/netstandard1.0/ru/Microsoft.CSharp.xml", + "ref/netstandard1.0/zh-hans/Microsoft.CSharp.xml", + "ref/netstandard1.0/zh-hant/Microsoft.CSharp.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "Microsoft.NETCore.Platforms/1.0.1": { + "sha512": "2G6OjjJzwBfNOO8myRV/nFrbTw5iA+DEm0N+qUqhrOmaVtn4pC77h38I1jsXGw5VH55+dPfQsqHD0We9sCl9FQ==", + "type": "package", + "path": "Microsoft.NETCore.Platforms/1.0.1", + "files": [ + "Microsoft.NETCore.Platforms.1.0.1.nupkg.sha512", + "Microsoft.NETCore.Platforms.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "runtime.json" + ] + }, + "Microsoft.NETCore.Targets/1.0.1": { + "sha512": "rkn+fKobF/cbWfnnfBOQHKVKIOpxMZBvlSHkqDWgBpwGDcLRduvs3D9OLGeV6GWGvVwNlVi2CBbTjuPmtHvyNw==", + "type": "package", + "path": "Microsoft.NETCore.Targets/1.0.1", + "files": [ + "Microsoft.NETCore.Targets.1.0.1.nupkg.sha512", + "Microsoft.NETCore.Targets.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "runtime.json" + ] + }, + "Microsoft.Win32.Primitives/4.0.1": { + "sha512": "fQnBHO9DgcmkC9dYSJoBqo6sH1VJwJprUHh8F3hbcRlxiQiBUuTntdk8tUwV490OqC2kQUrinGwZyQHTieuXRA==", + "type": "package", + "path": "Microsoft.Win32.Primitives/4.0.1", + "files": [ + "Microsoft.Win32.Primitives.4.0.1.nupkg.sha512", + "Microsoft.Win32.Primitives.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/Microsoft.Win32.Primitives.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/Microsoft.Win32.Primitives.dll", + "ref/netstandard1.3/Microsoft.Win32.Primitives.dll", + "ref/netstandard1.3/Microsoft.Win32.Primitives.xml", + "ref/netstandard1.3/de/Microsoft.Win32.Primitives.xml", + "ref/netstandard1.3/es/Microsoft.Win32.Primitives.xml", + "ref/netstandard1.3/fr/Microsoft.Win32.Primitives.xml", + "ref/netstandard1.3/it/Microsoft.Win32.Primitives.xml", + "ref/netstandard1.3/ja/Microsoft.Win32.Primitives.xml", + "ref/netstandard1.3/ko/Microsoft.Win32.Primitives.xml", + "ref/netstandard1.3/ru/Microsoft.Win32.Primitives.xml", + "ref/netstandard1.3/zh-hans/Microsoft.Win32.Primitives.xml", + "ref/netstandard1.3/zh-hant/Microsoft.Win32.Primitives.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "NETStandard.Library/1.6.0": { + "sha512": "ypsCvIdCZ4IoYASJHt6tF2fMo7N30NLgV1EbmC+snO490OMl9FvVxmumw14rhReWU3j3g7BYudG6YCrchwHJlA==", + "type": "package", + "path": "NETStandard.Library/1.6.0", + "files": [ + "NETStandard.Library.1.6.0.nupkg.sha512", + "NETStandard.Library.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt" + ] + }, + "Newtonsoft.Json/9.0.1": { + "sha512": "U82mHQSKaIk+lpSVCbWYKNavmNH1i5xrExDEquU1i6I5pV6UMOqRnJRSlKO3cMPfcpp0RgDY+8jUXHdQ4IfXvw==", + "type": "package", + "path": "Newtonsoft.Json/9.0.1", + "files": [ + "Newtonsoft.Json.9.0.1.nupkg.sha512", + "Newtonsoft.Json.nuspec", + "lib/net20/Newtonsoft.Json.dll", + "lib/net20/Newtonsoft.Json.xml", + "lib/net35/Newtonsoft.Json.dll", + "lib/net35/Newtonsoft.Json.xml", + "lib/net40/Newtonsoft.Json.dll", + "lib/net40/Newtonsoft.Json.xml", + "lib/net45/Newtonsoft.Json.dll", + "lib/net45/Newtonsoft.Json.xml", + "lib/netstandard1.0/Newtonsoft.Json.dll", + "lib/netstandard1.0/Newtonsoft.Json.xml", + "lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll", + "lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.xml", + "lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll", + "lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.xml", + "tools/install.ps1" + ] + }, + "runtime.native.System/4.0.0": { + "sha512": "QfS/nQI7k/BLgmLrw7qm7YBoULEvgWnPI+cYsbfCVFTW8Aj+i8JhccxcFMu1RWms0YZzF+UHguNBK4Qn89e2Sg==", + "type": "package", + "path": "runtime.native.System/4.0.0", + "files": [ + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "runtime.native.System.4.0.0.nupkg.sha512", + "runtime.native.System.nuspec" + ] + }, + "runtime.native.System.IO.Compression/4.1.0": { + "sha512": "Ob7nvnJBox1aaB222zSVZSkf4WrebPG4qFscfK7vmD7P7NxoSxACQLtO7ytWpqXDn2wcd/+45+EAZ7xjaPip8A==", + "type": "package", + "path": "runtime.native.System.IO.Compression/4.1.0", + "files": [ + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "runtime.native.System.IO.Compression.4.1.0.nupkg.sha512", + "runtime.native.System.IO.Compression.nuspec" + ] + }, + "runtime.native.System.Net.Http/4.0.1": { + "sha512": "Nh0UPZx2Vifh8r+J+H2jxifZUD3sBrmolgiFWJd2yiNrxO0xTa6bAw3YwRn1VOiSen/tUXMS31ttNItCZ6lKuA==", + "type": "package", + "path": "runtime.native.System.Net.Http/4.0.1", + "files": [ + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "runtime.native.System.Net.Http.4.0.1.nupkg.sha512", + "runtime.native.System.Net.Http.nuspec" + ] + }, + "runtime.native.System.Security.Cryptography/4.0.0": { + "sha512": "2CQK0jmO6Eu7ZeMgD+LOFbNJSXHFVQbCJJkEyEwowh1SCgYnrn9W9RykMfpeeVGw7h4IBvYikzpGUlmZTUafJw==", + "type": "package", + "path": "runtime.native.System.Security.Cryptography/4.0.0", + "files": [ + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/_._", + "runtime.native.System.Security.Cryptography.4.0.0.nupkg.sha512", + "runtime.native.System.Security.Cryptography.nuspec" + ] + }, + "System.AppContext/4.1.0": { + "sha512": "3QjO4jNV7PdKkmQAVp9atA+usVnKRwI3Kx1nMwJ93T0LcQfx7pKAYk0nKz5wn1oP5iqlhZuy6RXOFdhr7rDwow==", + "type": "package", + "path": "System.AppContext/4.1.0", + "files": [ + "System.AppContext.4.1.0.nupkg.sha512", + "System.AppContext.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.AppContext.dll", + "lib/net463/System.AppContext.dll", + "lib/netcore50/System.AppContext.dll", + "lib/netstandard1.6/System.AppContext.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.AppContext.dll", + "ref/net463/System.AppContext.dll", + "ref/netstandard/_._", + "ref/netstandard1.3/System.AppContext.dll", + "ref/netstandard1.3/System.AppContext.xml", + "ref/netstandard1.3/de/System.AppContext.xml", + "ref/netstandard1.3/es/System.AppContext.xml", + "ref/netstandard1.3/fr/System.AppContext.xml", + "ref/netstandard1.3/it/System.AppContext.xml", + "ref/netstandard1.3/ja/System.AppContext.xml", + "ref/netstandard1.3/ko/System.AppContext.xml", + "ref/netstandard1.3/ru/System.AppContext.xml", + "ref/netstandard1.3/zh-hans/System.AppContext.xml", + "ref/netstandard1.3/zh-hant/System.AppContext.xml", + "ref/netstandard1.6/System.AppContext.dll", + "ref/netstandard1.6/System.AppContext.xml", + "ref/netstandard1.6/de/System.AppContext.xml", + "ref/netstandard1.6/es/System.AppContext.xml", + "ref/netstandard1.6/fr/System.AppContext.xml", + "ref/netstandard1.6/it/System.AppContext.xml", + "ref/netstandard1.6/ja/System.AppContext.xml", + "ref/netstandard1.6/ko/System.AppContext.xml", + "ref/netstandard1.6/ru/System.AppContext.xml", + "ref/netstandard1.6/zh-hans/System.AppContext.xml", + "ref/netstandard1.6/zh-hant/System.AppContext.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/aot/lib/netcore50/System.AppContext.dll" + ] + }, + "System.Buffers/4.0.0": { + "sha512": "msXumHfjjURSkvxUjYuq4N2ghHoRi2VpXcKMA7gK6ujQfU3vGpl+B6ld0ATRg+FZFpRyA6PgEPA+VlIkTeNf2w==", + "type": "package", + "path": "System.Buffers/4.0.0", + "files": [ + "System.Buffers.4.0.0.nupkg.sha512", + "System.Buffers.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.1/.xml", + "lib/netstandard1.1/System.Buffers.dll" + ] + }, + "System.Collections/4.0.11": { + "sha512": "YUJGz6eFKqS0V//mLt25vFGrrCvOnsXjlvFQs+KimpwNxug9x0Pzy4PlFMU3Q2IzqAa9G2L4LsK3+9vCBK7oTg==", + "type": "package", + "path": "System.Collections/4.0.11", + "files": [ + "System.Collections.4.0.11.nupkg.sha512", + "System.Collections.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Collections.dll", + "ref/netcore50/System.Collections.xml", + "ref/netcore50/de/System.Collections.xml", + "ref/netcore50/es/System.Collections.xml", + "ref/netcore50/fr/System.Collections.xml", + "ref/netcore50/it/System.Collections.xml", + "ref/netcore50/ja/System.Collections.xml", + "ref/netcore50/ko/System.Collections.xml", + "ref/netcore50/ru/System.Collections.xml", + "ref/netcore50/zh-hans/System.Collections.xml", + "ref/netcore50/zh-hant/System.Collections.xml", + "ref/netstandard1.0/System.Collections.dll", + "ref/netstandard1.0/System.Collections.xml", + "ref/netstandard1.0/de/System.Collections.xml", + "ref/netstandard1.0/es/System.Collections.xml", + "ref/netstandard1.0/fr/System.Collections.xml", + "ref/netstandard1.0/it/System.Collections.xml", + "ref/netstandard1.0/ja/System.Collections.xml", + "ref/netstandard1.0/ko/System.Collections.xml", + "ref/netstandard1.0/ru/System.Collections.xml", + "ref/netstandard1.0/zh-hans/System.Collections.xml", + "ref/netstandard1.0/zh-hant/System.Collections.xml", + "ref/netstandard1.3/System.Collections.dll", + "ref/netstandard1.3/System.Collections.xml", + "ref/netstandard1.3/de/System.Collections.xml", + "ref/netstandard1.3/es/System.Collections.xml", + "ref/netstandard1.3/fr/System.Collections.xml", + "ref/netstandard1.3/it/System.Collections.xml", + "ref/netstandard1.3/ja/System.Collections.xml", + "ref/netstandard1.3/ko/System.Collections.xml", + "ref/netstandard1.3/ru/System.Collections.xml", + "ref/netstandard1.3/zh-hans/System.Collections.xml", + "ref/netstandard1.3/zh-hant/System.Collections.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Collections.Concurrent/4.0.12": { + "sha512": "2gBcbb3drMLgxlI0fBfxMA31ec6AEyYCHygGse4vxceJan8mRIWeKJ24BFzN7+bi/NFTgdIgufzb94LWO5EERQ==", + "type": "package", + "path": "System.Collections.Concurrent/4.0.12", + "files": [ + "System.Collections.Concurrent.4.0.12.nupkg.sha512", + "System.Collections.Concurrent.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/System.Collections.Concurrent.dll", + "lib/netstandard1.3/System.Collections.Concurrent.dll", + "lib/portable-net45+win8+wpa81/_._", + "lib/win8/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Collections.Concurrent.dll", + "ref/netcore50/System.Collections.Concurrent.xml", + "ref/netcore50/de/System.Collections.Concurrent.xml", + "ref/netcore50/es/System.Collections.Concurrent.xml", + "ref/netcore50/fr/System.Collections.Concurrent.xml", + "ref/netcore50/it/System.Collections.Concurrent.xml", + "ref/netcore50/ja/System.Collections.Concurrent.xml", + "ref/netcore50/ko/System.Collections.Concurrent.xml", + "ref/netcore50/ru/System.Collections.Concurrent.xml", + "ref/netcore50/zh-hans/System.Collections.Concurrent.xml", + "ref/netcore50/zh-hant/System.Collections.Concurrent.xml", + "ref/netstandard1.1/System.Collections.Concurrent.dll", + "ref/netstandard1.1/System.Collections.Concurrent.xml", + "ref/netstandard1.1/de/System.Collections.Concurrent.xml", + "ref/netstandard1.1/es/System.Collections.Concurrent.xml", + "ref/netstandard1.1/fr/System.Collections.Concurrent.xml", + "ref/netstandard1.1/it/System.Collections.Concurrent.xml", + "ref/netstandard1.1/ja/System.Collections.Concurrent.xml", + "ref/netstandard1.1/ko/System.Collections.Concurrent.xml", + "ref/netstandard1.1/ru/System.Collections.Concurrent.xml", + "ref/netstandard1.1/zh-hans/System.Collections.Concurrent.xml", + "ref/netstandard1.1/zh-hant/System.Collections.Concurrent.xml", + "ref/netstandard1.3/System.Collections.Concurrent.dll", + "ref/netstandard1.3/System.Collections.Concurrent.xml", + "ref/netstandard1.3/de/System.Collections.Concurrent.xml", + "ref/netstandard1.3/es/System.Collections.Concurrent.xml", + "ref/netstandard1.3/fr/System.Collections.Concurrent.xml", + "ref/netstandard1.3/it/System.Collections.Concurrent.xml", + "ref/netstandard1.3/ja/System.Collections.Concurrent.xml", + "ref/netstandard1.3/ko/System.Collections.Concurrent.xml", + "ref/netstandard1.3/ru/System.Collections.Concurrent.xml", + "ref/netstandard1.3/zh-hans/System.Collections.Concurrent.xml", + "ref/netstandard1.3/zh-hant/System.Collections.Concurrent.xml", + "ref/portable-net45+win8+wpa81/_._", + "ref/win8/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Console/4.0.0": { + "sha512": "qSKUSOIiYA/a0g5XXdxFcUFmv1hNICBD7QZ0QhGYVipPIhvpiydY8VZqr1thmCXvmn8aipMg64zuanB4eotK9A==", + "type": "package", + "path": "System.Console/4.0.0", + "files": [ + "System.Console.4.0.0.nupkg.sha512", + "System.Console.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Console.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Console.dll", + "ref/netstandard1.3/System.Console.dll", + "ref/netstandard1.3/System.Console.xml", + "ref/netstandard1.3/de/System.Console.xml", + "ref/netstandard1.3/es/System.Console.xml", + "ref/netstandard1.3/fr/System.Console.xml", + "ref/netstandard1.3/it/System.Console.xml", + "ref/netstandard1.3/ja/System.Console.xml", + "ref/netstandard1.3/ko/System.Console.xml", + "ref/netstandard1.3/ru/System.Console.xml", + "ref/netstandard1.3/zh-hans/System.Console.xml", + "ref/netstandard1.3/zh-hant/System.Console.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Diagnostics.Debug/4.0.11": { + "sha512": "w5U95fVKHY4G8ASs/K5iK3J5LY+/dLFd4vKejsnI/ZhBsWS9hQakfx3Zr7lRWKg4tAw9r4iktyvsTagWkqYCiw==", + "type": "package", + "path": "System.Diagnostics.Debug/4.0.11", + "files": [ + "System.Diagnostics.Debug.4.0.11.nupkg.sha512", + "System.Diagnostics.Debug.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Diagnostics.Debug.dll", + "ref/netcore50/System.Diagnostics.Debug.xml", + "ref/netcore50/de/System.Diagnostics.Debug.xml", + "ref/netcore50/es/System.Diagnostics.Debug.xml", + "ref/netcore50/fr/System.Diagnostics.Debug.xml", + "ref/netcore50/it/System.Diagnostics.Debug.xml", + "ref/netcore50/ja/System.Diagnostics.Debug.xml", + "ref/netcore50/ko/System.Diagnostics.Debug.xml", + "ref/netcore50/ru/System.Diagnostics.Debug.xml", + "ref/netcore50/zh-hans/System.Diagnostics.Debug.xml", + "ref/netcore50/zh-hant/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/System.Diagnostics.Debug.dll", + "ref/netstandard1.0/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/de/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/es/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/fr/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/it/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/ja/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/ko/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/ru/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/zh-hans/System.Diagnostics.Debug.xml", + "ref/netstandard1.0/zh-hant/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/System.Diagnostics.Debug.dll", + "ref/netstandard1.3/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/de/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/es/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/fr/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/it/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/ja/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/ko/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/ru/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/zh-hans/System.Diagnostics.Debug.xml", + "ref/netstandard1.3/zh-hant/System.Diagnostics.Debug.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Diagnostics.DiagnosticSource/4.0.0": { + "sha512": "YKglnq4BMTJxfcr6nuT08g+yJ0UxdePIHxosiLuljuHIUR6t4KhFsyaHOaOc1Ofqp0PUvJ0EmcgiEz6T7vEx3w==", + "type": "package", + "path": "System.Diagnostics.DiagnosticSource/4.0.0", + "files": [ + "System.Diagnostics.DiagnosticSource.4.0.0.nupkg.sha512", + "System.Diagnostics.DiagnosticSource.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/net46/System.Diagnostics.DiagnosticSource.dll", + "lib/net46/System.Diagnostics.DiagnosticSource.xml", + "lib/netstandard1.1/System.Diagnostics.DiagnosticSource.dll", + "lib/netstandard1.1/System.Diagnostics.DiagnosticSource.xml", + "lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll", + "lib/netstandard1.3/System.Diagnostics.DiagnosticSource.xml", + "lib/portable-net45+win8+wpa81/System.Diagnostics.DiagnosticSource.dll", + "lib/portable-net45+win8+wpa81/System.Diagnostics.DiagnosticSource.xml" + ] + }, + "System.Diagnostics.Tools/4.0.1": { + "sha512": "xBfJ8pnd4C17dWaC9FM6aShzbJcRNMChUMD42I6772KGGrqaFdumwhn9OdM68erj1ueNo3xdQ1EwiFjK5k8p0g==", + "type": "package", + "path": "System.Diagnostics.Tools/4.0.1", + "files": [ + "System.Diagnostics.Tools.4.0.1.nupkg.sha512", + "System.Diagnostics.Tools.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Diagnostics.Tools.dll", + "ref/netcore50/System.Diagnostics.Tools.xml", + "ref/netcore50/de/System.Diagnostics.Tools.xml", + "ref/netcore50/es/System.Diagnostics.Tools.xml", + "ref/netcore50/fr/System.Diagnostics.Tools.xml", + "ref/netcore50/it/System.Diagnostics.Tools.xml", + "ref/netcore50/ja/System.Diagnostics.Tools.xml", + "ref/netcore50/ko/System.Diagnostics.Tools.xml", + "ref/netcore50/ru/System.Diagnostics.Tools.xml", + "ref/netcore50/zh-hans/System.Diagnostics.Tools.xml", + "ref/netcore50/zh-hant/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/System.Diagnostics.Tools.dll", + "ref/netstandard1.0/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/de/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/es/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/fr/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/it/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/ja/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/ko/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/ru/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/zh-hans/System.Diagnostics.Tools.xml", + "ref/netstandard1.0/zh-hant/System.Diagnostics.Tools.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Diagnostics.Tracing/4.1.0": { + "sha512": "vDN1PoMZCkkdNjvZLql592oYJZgS7URcJzJ7bxeBgGtx5UtR5leNm49VmfHGqIffX4FKacHbI3H6UyNSHQknBg==", + "type": "package", + "path": "System.Diagnostics.Tracing/4.1.0", + "files": [ + "System.Diagnostics.Tracing.4.1.0.nupkg.sha512", + "System.Diagnostics.Tracing.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net462/System.Diagnostics.Tracing.dll", + "lib/portable-net45+win8+wpa81/_._", + "lib/win8/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net462/System.Diagnostics.Tracing.dll", + "ref/netcore50/System.Diagnostics.Tracing.dll", + "ref/netcore50/System.Diagnostics.Tracing.xml", + "ref/netcore50/de/System.Diagnostics.Tracing.xml", + "ref/netcore50/es/System.Diagnostics.Tracing.xml", + "ref/netcore50/fr/System.Diagnostics.Tracing.xml", + "ref/netcore50/it/System.Diagnostics.Tracing.xml", + "ref/netcore50/ja/System.Diagnostics.Tracing.xml", + "ref/netcore50/ko/System.Diagnostics.Tracing.xml", + "ref/netcore50/ru/System.Diagnostics.Tracing.xml", + "ref/netcore50/zh-hans/System.Diagnostics.Tracing.xml", + "ref/netcore50/zh-hant/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/System.Diagnostics.Tracing.dll", + "ref/netstandard1.1/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/de/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/es/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/fr/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/it/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/ja/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/ko/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/ru/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/zh-hans/System.Diagnostics.Tracing.xml", + "ref/netstandard1.1/zh-hant/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/System.Diagnostics.Tracing.dll", + "ref/netstandard1.2/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/de/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/es/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/fr/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/it/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/ja/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/ko/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/ru/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/zh-hans/System.Diagnostics.Tracing.xml", + "ref/netstandard1.2/zh-hant/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/System.Diagnostics.Tracing.dll", + "ref/netstandard1.3/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/de/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/es/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/fr/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/it/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/ja/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/ko/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/ru/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/zh-hans/System.Diagnostics.Tracing.xml", + "ref/netstandard1.3/zh-hant/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/System.Diagnostics.Tracing.dll", + "ref/netstandard1.5/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/de/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/es/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/fr/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/it/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/ja/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/ko/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/ru/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/zh-hans/System.Diagnostics.Tracing.xml", + "ref/netstandard1.5/zh-hant/System.Diagnostics.Tracing.xml", + "ref/portable-net45+win8+wpa81/_._", + "ref/win8/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Dynamic.Runtime/4.0.11": { + "sha512": "db34f6LHYM0U0JpE+sOmjar27BnqTVkbLJhgfwMpTdgTigG/Hna3m2MYVwnFzGGKnEJk2UXFuoVTr8WUbU91/A==", + "type": "package", + "path": "System.Dynamic.Runtime/4.0.11", + "files": [ + "System.Dynamic.Runtime.4.0.11.nupkg.sha512", + "System.Dynamic.Runtime.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/System.Dynamic.Runtime.dll", + "lib/netstandard1.3/System.Dynamic.Runtime.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Dynamic.Runtime.dll", + "ref/netcore50/System.Dynamic.Runtime.xml", + "ref/netcore50/de/System.Dynamic.Runtime.xml", + "ref/netcore50/es/System.Dynamic.Runtime.xml", + "ref/netcore50/fr/System.Dynamic.Runtime.xml", + "ref/netcore50/it/System.Dynamic.Runtime.xml", + "ref/netcore50/ja/System.Dynamic.Runtime.xml", + "ref/netcore50/ko/System.Dynamic.Runtime.xml", + "ref/netcore50/ru/System.Dynamic.Runtime.xml", + "ref/netcore50/zh-hans/System.Dynamic.Runtime.xml", + "ref/netcore50/zh-hant/System.Dynamic.Runtime.xml", + "ref/netstandard1.0/System.Dynamic.Runtime.dll", + "ref/netstandard1.0/System.Dynamic.Runtime.xml", + "ref/netstandard1.0/de/System.Dynamic.Runtime.xml", + "ref/netstandard1.0/es/System.Dynamic.Runtime.xml", + "ref/netstandard1.0/fr/System.Dynamic.Runtime.xml", + "ref/netstandard1.0/it/System.Dynamic.Runtime.xml", + "ref/netstandard1.0/ja/System.Dynamic.Runtime.xml", + "ref/netstandard1.0/ko/System.Dynamic.Runtime.xml", + "ref/netstandard1.0/ru/System.Dynamic.Runtime.xml", + "ref/netstandard1.0/zh-hans/System.Dynamic.Runtime.xml", + "ref/netstandard1.0/zh-hant/System.Dynamic.Runtime.xml", + "ref/netstandard1.3/System.Dynamic.Runtime.dll", + "ref/netstandard1.3/System.Dynamic.Runtime.xml", + "ref/netstandard1.3/de/System.Dynamic.Runtime.xml", + "ref/netstandard1.3/es/System.Dynamic.Runtime.xml", + "ref/netstandard1.3/fr/System.Dynamic.Runtime.xml", + "ref/netstandard1.3/it/System.Dynamic.Runtime.xml", + "ref/netstandard1.3/ja/System.Dynamic.Runtime.xml", + "ref/netstandard1.3/ko/System.Dynamic.Runtime.xml", + "ref/netstandard1.3/ru/System.Dynamic.Runtime.xml", + "ref/netstandard1.3/zh-hans/System.Dynamic.Runtime.xml", + "ref/netstandard1.3/zh-hant/System.Dynamic.Runtime.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/aot/lib/netcore50/System.Dynamic.Runtime.dll" + ] + }, + "System.Globalization/4.0.11": { + "sha512": "B95h0YLEL2oSnwF/XjqSWKnwKOy/01VWkNlsCeMTFJLLabflpGV26nK164eRs5GiaRSBGpOxQ3pKoSnnyZN5pg==", + "type": "package", + "path": "System.Globalization/4.0.11", + "files": [ + "System.Globalization.4.0.11.nupkg.sha512", + "System.Globalization.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Globalization.dll", + "ref/netcore50/System.Globalization.xml", + "ref/netcore50/de/System.Globalization.xml", + "ref/netcore50/es/System.Globalization.xml", + "ref/netcore50/fr/System.Globalization.xml", + "ref/netcore50/it/System.Globalization.xml", + "ref/netcore50/ja/System.Globalization.xml", + "ref/netcore50/ko/System.Globalization.xml", + "ref/netcore50/ru/System.Globalization.xml", + "ref/netcore50/zh-hans/System.Globalization.xml", + "ref/netcore50/zh-hant/System.Globalization.xml", + "ref/netstandard1.0/System.Globalization.dll", + "ref/netstandard1.0/System.Globalization.xml", + "ref/netstandard1.0/de/System.Globalization.xml", + "ref/netstandard1.0/es/System.Globalization.xml", + "ref/netstandard1.0/fr/System.Globalization.xml", + "ref/netstandard1.0/it/System.Globalization.xml", + "ref/netstandard1.0/ja/System.Globalization.xml", + "ref/netstandard1.0/ko/System.Globalization.xml", + "ref/netstandard1.0/ru/System.Globalization.xml", + "ref/netstandard1.0/zh-hans/System.Globalization.xml", + "ref/netstandard1.0/zh-hant/System.Globalization.xml", + "ref/netstandard1.3/System.Globalization.dll", + "ref/netstandard1.3/System.Globalization.xml", + "ref/netstandard1.3/de/System.Globalization.xml", + "ref/netstandard1.3/es/System.Globalization.xml", + "ref/netstandard1.3/fr/System.Globalization.xml", + "ref/netstandard1.3/it/System.Globalization.xml", + "ref/netstandard1.3/ja/System.Globalization.xml", + "ref/netstandard1.3/ko/System.Globalization.xml", + "ref/netstandard1.3/ru/System.Globalization.xml", + "ref/netstandard1.3/zh-hans/System.Globalization.xml", + "ref/netstandard1.3/zh-hant/System.Globalization.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Globalization.Calendars/4.0.1": { + "sha512": "L1c6IqeQ88vuzC1P81JeHmHA8mxq8a18NUBNXnIY/BVb+TCyAaGIFbhpZt60h9FJNmisymoQkHEFSE9Vslja1Q==", + "type": "package", + "path": "System.Globalization.Calendars/4.0.1", + "files": [ + "System.Globalization.Calendars.4.0.1.nupkg.sha512", + "System.Globalization.Calendars.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Globalization.Calendars.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Globalization.Calendars.dll", + "ref/netstandard1.3/System.Globalization.Calendars.dll", + "ref/netstandard1.3/System.Globalization.Calendars.xml", + "ref/netstandard1.3/de/System.Globalization.Calendars.xml", + "ref/netstandard1.3/es/System.Globalization.Calendars.xml", + "ref/netstandard1.3/fr/System.Globalization.Calendars.xml", + "ref/netstandard1.3/it/System.Globalization.Calendars.xml", + "ref/netstandard1.3/ja/System.Globalization.Calendars.xml", + "ref/netstandard1.3/ko/System.Globalization.Calendars.xml", + "ref/netstandard1.3/ru/System.Globalization.Calendars.xml", + "ref/netstandard1.3/zh-hans/System.Globalization.Calendars.xml", + "ref/netstandard1.3/zh-hant/System.Globalization.Calendars.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Globalization.Extensions/4.0.1": { + "sha512": "KKo23iKeOaIg61SSXwjANN7QYDr/3op3OWGGzDzz7mypx0Za0fZSeG0l6cco8Ntp8YMYkIQcAqlk8yhm5/Uhcg==", + "type": "package", + "path": "System.Globalization.Extensions/4.0.1", + "files": [ + "System.Globalization.Extensions.4.0.1.nupkg.sha512", + "System.Globalization.Extensions.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Globalization.Extensions.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Globalization.Extensions.dll", + "ref/netstandard1.3/System.Globalization.Extensions.dll", + "ref/netstandard1.3/System.Globalization.Extensions.xml", + "ref/netstandard1.3/de/System.Globalization.Extensions.xml", + "ref/netstandard1.3/es/System.Globalization.Extensions.xml", + "ref/netstandard1.3/fr/System.Globalization.Extensions.xml", + "ref/netstandard1.3/it/System.Globalization.Extensions.xml", + "ref/netstandard1.3/ja/System.Globalization.Extensions.xml", + "ref/netstandard1.3/ko/System.Globalization.Extensions.xml", + "ref/netstandard1.3/ru/System.Globalization.Extensions.xml", + "ref/netstandard1.3/zh-hans/System.Globalization.Extensions.xml", + "ref/netstandard1.3/zh-hant/System.Globalization.Extensions.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/unix/lib/netstandard1.3/System.Globalization.Extensions.dll", + "runtimes/win/lib/net46/System.Globalization.Extensions.dll", + "runtimes/win/lib/netstandard1.3/System.Globalization.Extensions.dll" + ] + }, + "System.IO/4.1.0": { + "sha512": "3KlTJceQc3gnGIaHZ7UBZO26SHL1SHE4ddrmiwumFnId+CEHP+O8r386tZKaE6zlk5/mF8vifMBzHj9SaXN+mQ==", + "type": "package", + "path": "System.IO/4.1.0", + "files": [ + "System.IO.4.1.0.nupkg.sha512", + "System.IO.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net462/System.IO.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net462/System.IO.dll", + "ref/netcore50/System.IO.dll", + "ref/netcore50/System.IO.xml", + "ref/netcore50/de/System.IO.xml", + "ref/netcore50/es/System.IO.xml", + "ref/netcore50/fr/System.IO.xml", + "ref/netcore50/it/System.IO.xml", + "ref/netcore50/ja/System.IO.xml", + "ref/netcore50/ko/System.IO.xml", + "ref/netcore50/ru/System.IO.xml", + "ref/netcore50/zh-hans/System.IO.xml", + "ref/netcore50/zh-hant/System.IO.xml", + "ref/netstandard1.0/System.IO.dll", + "ref/netstandard1.0/System.IO.xml", + "ref/netstandard1.0/de/System.IO.xml", + "ref/netstandard1.0/es/System.IO.xml", + "ref/netstandard1.0/fr/System.IO.xml", + "ref/netstandard1.0/it/System.IO.xml", + "ref/netstandard1.0/ja/System.IO.xml", + "ref/netstandard1.0/ko/System.IO.xml", + "ref/netstandard1.0/ru/System.IO.xml", + "ref/netstandard1.0/zh-hans/System.IO.xml", + "ref/netstandard1.0/zh-hant/System.IO.xml", + "ref/netstandard1.3/System.IO.dll", + "ref/netstandard1.3/System.IO.xml", + "ref/netstandard1.3/de/System.IO.xml", + "ref/netstandard1.3/es/System.IO.xml", + "ref/netstandard1.3/fr/System.IO.xml", + "ref/netstandard1.3/it/System.IO.xml", + "ref/netstandard1.3/ja/System.IO.xml", + "ref/netstandard1.3/ko/System.IO.xml", + "ref/netstandard1.3/ru/System.IO.xml", + "ref/netstandard1.3/zh-hans/System.IO.xml", + "ref/netstandard1.3/zh-hant/System.IO.xml", + "ref/netstandard1.5/System.IO.dll", + "ref/netstandard1.5/System.IO.xml", + "ref/netstandard1.5/de/System.IO.xml", + "ref/netstandard1.5/es/System.IO.xml", + "ref/netstandard1.5/fr/System.IO.xml", + "ref/netstandard1.5/it/System.IO.xml", + "ref/netstandard1.5/ja/System.IO.xml", + "ref/netstandard1.5/ko/System.IO.xml", + "ref/netstandard1.5/ru/System.IO.xml", + "ref/netstandard1.5/zh-hans/System.IO.xml", + "ref/netstandard1.5/zh-hant/System.IO.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.IO.Compression/4.1.0": { + "sha512": "TjnBS6eztThSzeSib+WyVbLzEdLKUcEHN69VtS3u8aAsSc18FU6xCZlNWWsEd8SKcXAE+y1sOu7VbU8sUeM0sg==", + "type": "package", + "path": "System.IO.Compression/4.1.0", + "files": [ + "System.IO.Compression.4.1.0.nupkg.sha512", + "System.IO.Compression.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net46/System.IO.Compression.dll", + "lib/portable-net45+win8+wpa81/_._", + "lib/win8/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net46/System.IO.Compression.dll", + "ref/netcore50/System.IO.Compression.dll", + "ref/netcore50/System.IO.Compression.xml", + "ref/netcore50/de/System.IO.Compression.xml", + "ref/netcore50/es/System.IO.Compression.xml", + "ref/netcore50/fr/System.IO.Compression.xml", + "ref/netcore50/it/System.IO.Compression.xml", + "ref/netcore50/ja/System.IO.Compression.xml", + "ref/netcore50/ko/System.IO.Compression.xml", + "ref/netcore50/ru/System.IO.Compression.xml", + "ref/netcore50/zh-hans/System.IO.Compression.xml", + "ref/netcore50/zh-hant/System.IO.Compression.xml", + "ref/netstandard1.1/System.IO.Compression.dll", + "ref/netstandard1.1/System.IO.Compression.xml", + "ref/netstandard1.1/de/System.IO.Compression.xml", + "ref/netstandard1.1/es/System.IO.Compression.xml", + "ref/netstandard1.1/fr/System.IO.Compression.xml", + "ref/netstandard1.1/it/System.IO.Compression.xml", + "ref/netstandard1.1/ja/System.IO.Compression.xml", + "ref/netstandard1.1/ko/System.IO.Compression.xml", + "ref/netstandard1.1/ru/System.IO.Compression.xml", + "ref/netstandard1.1/zh-hans/System.IO.Compression.xml", + "ref/netstandard1.1/zh-hant/System.IO.Compression.xml", + "ref/netstandard1.3/System.IO.Compression.dll", + "ref/netstandard1.3/System.IO.Compression.xml", + "ref/netstandard1.3/de/System.IO.Compression.xml", + "ref/netstandard1.3/es/System.IO.Compression.xml", + "ref/netstandard1.3/fr/System.IO.Compression.xml", + "ref/netstandard1.3/it/System.IO.Compression.xml", + "ref/netstandard1.3/ja/System.IO.Compression.xml", + "ref/netstandard1.3/ko/System.IO.Compression.xml", + "ref/netstandard1.3/ru/System.IO.Compression.xml", + "ref/netstandard1.3/zh-hans/System.IO.Compression.xml", + "ref/netstandard1.3/zh-hant/System.IO.Compression.xml", + "ref/portable-net45+win8+wpa81/_._", + "ref/win8/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/unix/lib/netstandard1.3/System.IO.Compression.dll", + "runtimes/win/lib/net46/System.IO.Compression.dll", + "runtimes/win/lib/netstandard1.3/System.IO.Compression.dll" + ] + }, + "System.IO.Compression.ZipFile/4.0.1": { + "sha512": "hBQYJzfTbQURF10nLhd+az2NHxsU6MU7AB8RUf4IolBP5lOAm4Luho851xl+CqslmhI5ZH/el8BlngEk4lBkaQ==", + "type": "package", + "path": "System.IO.Compression.ZipFile/4.0.1", + "files": [ + "System.IO.Compression.ZipFile.4.0.1.nupkg.sha512", + "System.IO.Compression.ZipFile.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.IO.Compression.ZipFile.dll", + "lib/netstandard1.3/System.IO.Compression.ZipFile.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.IO.Compression.ZipFile.dll", + "ref/netstandard1.3/System.IO.Compression.ZipFile.dll", + "ref/netstandard1.3/System.IO.Compression.ZipFile.xml", + "ref/netstandard1.3/de/System.IO.Compression.ZipFile.xml", + "ref/netstandard1.3/es/System.IO.Compression.ZipFile.xml", + "ref/netstandard1.3/fr/System.IO.Compression.ZipFile.xml", + "ref/netstandard1.3/it/System.IO.Compression.ZipFile.xml", + "ref/netstandard1.3/ja/System.IO.Compression.ZipFile.xml", + "ref/netstandard1.3/ko/System.IO.Compression.ZipFile.xml", + "ref/netstandard1.3/ru/System.IO.Compression.ZipFile.xml", + "ref/netstandard1.3/zh-hans/System.IO.Compression.ZipFile.xml", + "ref/netstandard1.3/zh-hant/System.IO.Compression.ZipFile.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.IO.FileSystem/4.0.1": { + "sha512": "IBErlVq5jOggAD69bg1t0pJcHaDbJbWNUZTPI96fkYWzwYbN6D9wRHMULLDd9dHsl7C2YsxXL31LMfPI1SWt8w==", + "type": "package", + "path": "System.IO.FileSystem/4.0.1", + "files": [ + "System.IO.FileSystem.4.0.1.nupkg.sha512", + "System.IO.FileSystem.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.IO.FileSystem.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.IO.FileSystem.dll", + "ref/netstandard1.3/System.IO.FileSystem.dll", + "ref/netstandard1.3/System.IO.FileSystem.xml", + "ref/netstandard1.3/de/System.IO.FileSystem.xml", + "ref/netstandard1.3/es/System.IO.FileSystem.xml", + "ref/netstandard1.3/fr/System.IO.FileSystem.xml", + "ref/netstandard1.3/it/System.IO.FileSystem.xml", + "ref/netstandard1.3/ja/System.IO.FileSystem.xml", + "ref/netstandard1.3/ko/System.IO.FileSystem.xml", + "ref/netstandard1.3/ru/System.IO.FileSystem.xml", + "ref/netstandard1.3/zh-hans/System.IO.FileSystem.xml", + "ref/netstandard1.3/zh-hant/System.IO.FileSystem.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.IO.FileSystem.Primitives/4.0.1": { + "sha512": "kWkKD203JJKxJeE74p8aF8y4Qc9r9WQx4C0cHzHPrY3fv/L/IhWnyCHaFJ3H1QPOH6A93whlQ2vG5nHlBDvzWQ==", + "type": "package", + "path": "System.IO.FileSystem.Primitives/4.0.1", + "files": [ + "System.IO.FileSystem.Primitives.4.0.1.nupkg.sha512", + "System.IO.FileSystem.Primitives.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.IO.FileSystem.Primitives.dll", + "lib/netstandard1.3/System.IO.FileSystem.Primitives.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.IO.FileSystem.Primitives.dll", + "ref/netstandard1.3/System.IO.FileSystem.Primitives.dll", + "ref/netstandard1.3/System.IO.FileSystem.Primitives.xml", + "ref/netstandard1.3/de/System.IO.FileSystem.Primitives.xml", + "ref/netstandard1.3/es/System.IO.FileSystem.Primitives.xml", + "ref/netstandard1.3/fr/System.IO.FileSystem.Primitives.xml", + "ref/netstandard1.3/it/System.IO.FileSystem.Primitives.xml", + "ref/netstandard1.3/ja/System.IO.FileSystem.Primitives.xml", + "ref/netstandard1.3/ko/System.IO.FileSystem.Primitives.xml", + "ref/netstandard1.3/ru/System.IO.FileSystem.Primitives.xml", + "ref/netstandard1.3/zh-hans/System.IO.FileSystem.Primitives.xml", + "ref/netstandard1.3/zh-hant/System.IO.FileSystem.Primitives.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Linq/4.1.0": { + "sha512": "bQ0iYFOQI0nuTnt+NQADns6ucV4DUvMdwN6CbkB1yj8i7arTGiTN5eok1kQwdnnNWSDZfIUySQY+J3d5KjWn0g==", + "type": "package", + "path": "System.Linq/4.1.0", + "files": [ + "System.Linq.4.1.0.nupkg.sha512", + "System.Linq.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net463/System.Linq.dll", + "lib/netcore50/System.Linq.dll", + "lib/netstandard1.6/System.Linq.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net463/System.Linq.dll", + "ref/netcore50/System.Linq.dll", + "ref/netcore50/System.Linq.xml", + "ref/netcore50/de/System.Linq.xml", + "ref/netcore50/es/System.Linq.xml", + "ref/netcore50/fr/System.Linq.xml", + "ref/netcore50/it/System.Linq.xml", + "ref/netcore50/ja/System.Linq.xml", + "ref/netcore50/ko/System.Linq.xml", + "ref/netcore50/ru/System.Linq.xml", + "ref/netcore50/zh-hans/System.Linq.xml", + "ref/netcore50/zh-hant/System.Linq.xml", + "ref/netstandard1.0/System.Linq.dll", + "ref/netstandard1.0/System.Linq.xml", + "ref/netstandard1.0/de/System.Linq.xml", + "ref/netstandard1.0/es/System.Linq.xml", + "ref/netstandard1.0/fr/System.Linq.xml", + "ref/netstandard1.0/it/System.Linq.xml", + "ref/netstandard1.0/ja/System.Linq.xml", + "ref/netstandard1.0/ko/System.Linq.xml", + "ref/netstandard1.0/ru/System.Linq.xml", + "ref/netstandard1.0/zh-hans/System.Linq.xml", + "ref/netstandard1.0/zh-hant/System.Linq.xml", + "ref/netstandard1.6/System.Linq.dll", + "ref/netstandard1.6/System.Linq.xml", + "ref/netstandard1.6/de/System.Linq.xml", + "ref/netstandard1.6/es/System.Linq.xml", + "ref/netstandard1.6/fr/System.Linq.xml", + "ref/netstandard1.6/it/System.Linq.xml", + "ref/netstandard1.6/ja/System.Linq.xml", + "ref/netstandard1.6/ko/System.Linq.xml", + "ref/netstandard1.6/ru/System.Linq.xml", + "ref/netstandard1.6/zh-hans/System.Linq.xml", + "ref/netstandard1.6/zh-hant/System.Linq.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Linq.Expressions/4.1.0": { + "sha512": "I+y02iqkgmCAyfbqOmSDOgqdZQ5tTj80Akm5BPSS8EeB0VGWdy6X1KCoYe8Pk6pwDoAKZUOdLVxnTJcExiv5zw==", + "type": "package", + "path": "System.Linq.Expressions/4.1.0", + "files": [ + "System.Linq.Expressions.4.1.0.nupkg.sha512", + "System.Linq.Expressions.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net463/System.Linq.Expressions.dll", + "lib/netcore50/System.Linq.Expressions.dll", + "lib/netstandard1.6/System.Linq.Expressions.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net463/System.Linq.Expressions.dll", + "ref/netcore50/System.Linq.Expressions.dll", + "ref/netcore50/System.Linq.Expressions.xml", + "ref/netcore50/de/System.Linq.Expressions.xml", + "ref/netcore50/es/System.Linq.Expressions.xml", + "ref/netcore50/fr/System.Linq.Expressions.xml", + "ref/netcore50/it/System.Linq.Expressions.xml", + "ref/netcore50/ja/System.Linq.Expressions.xml", + "ref/netcore50/ko/System.Linq.Expressions.xml", + "ref/netcore50/ru/System.Linq.Expressions.xml", + "ref/netcore50/zh-hans/System.Linq.Expressions.xml", + "ref/netcore50/zh-hant/System.Linq.Expressions.xml", + "ref/netstandard1.0/System.Linq.Expressions.dll", + "ref/netstandard1.0/System.Linq.Expressions.xml", + "ref/netstandard1.0/de/System.Linq.Expressions.xml", + "ref/netstandard1.0/es/System.Linq.Expressions.xml", + "ref/netstandard1.0/fr/System.Linq.Expressions.xml", + "ref/netstandard1.0/it/System.Linq.Expressions.xml", + "ref/netstandard1.0/ja/System.Linq.Expressions.xml", + "ref/netstandard1.0/ko/System.Linq.Expressions.xml", + "ref/netstandard1.0/ru/System.Linq.Expressions.xml", + "ref/netstandard1.0/zh-hans/System.Linq.Expressions.xml", + "ref/netstandard1.0/zh-hant/System.Linq.Expressions.xml", + "ref/netstandard1.3/System.Linq.Expressions.dll", + "ref/netstandard1.3/System.Linq.Expressions.xml", + "ref/netstandard1.3/de/System.Linq.Expressions.xml", + "ref/netstandard1.3/es/System.Linq.Expressions.xml", + "ref/netstandard1.3/fr/System.Linq.Expressions.xml", + "ref/netstandard1.3/it/System.Linq.Expressions.xml", + "ref/netstandard1.3/ja/System.Linq.Expressions.xml", + "ref/netstandard1.3/ko/System.Linq.Expressions.xml", + "ref/netstandard1.3/ru/System.Linq.Expressions.xml", + "ref/netstandard1.3/zh-hans/System.Linq.Expressions.xml", + "ref/netstandard1.3/zh-hant/System.Linq.Expressions.xml", + "ref/netstandard1.6/System.Linq.Expressions.dll", + "ref/netstandard1.6/System.Linq.Expressions.xml", + "ref/netstandard1.6/de/System.Linq.Expressions.xml", + "ref/netstandard1.6/es/System.Linq.Expressions.xml", + "ref/netstandard1.6/fr/System.Linq.Expressions.xml", + "ref/netstandard1.6/it/System.Linq.Expressions.xml", + "ref/netstandard1.6/ja/System.Linq.Expressions.xml", + "ref/netstandard1.6/ko/System.Linq.Expressions.xml", + "ref/netstandard1.6/ru/System.Linq.Expressions.xml", + "ref/netstandard1.6/zh-hans/System.Linq.Expressions.xml", + "ref/netstandard1.6/zh-hant/System.Linq.Expressions.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/aot/lib/netcore50/System.Linq.Expressions.dll" + ] + }, + "System.Net.Http/4.1.0": { + "sha512": "ULq9g3SOPVuupt+Y3U+A37coXzdNisB1neFCSKzBwo182u0RDddKJF8I5+HfyXqK6OhJPgeoAwWXrbiUXuRDsg==", + "type": "package", + "path": "System.Net.Http/4.1.0", + "files": [ + "System.Net.Http.4.1.0.nupkg.sha512", + "System.Net.Http.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/Xamarinmac20/_._", + "lib/monoandroid10/_._", + "lib/monotouch10/_._", + "lib/net45/_._", + "lib/net46/System.Net.Http.dll", + "lib/portable-net45+win8+wpa81/_._", + "lib/win8/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/Xamarinmac20/_._", + "ref/monoandroid10/_._", + "ref/monotouch10/_._", + "ref/net45/_._", + "ref/net46/System.Net.Http.dll", + "ref/net46/System.Net.Http.xml", + "ref/net46/de/System.Net.Http.xml", + "ref/net46/es/System.Net.Http.xml", + "ref/net46/fr/System.Net.Http.xml", + "ref/net46/it/System.Net.Http.xml", + "ref/net46/ja/System.Net.Http.xml", + "ref/net46/ko/System.Net.Http.xml", + "ref/net46/ru/System.Net.Http.xml", + "ref/net46/zh-hans/System.Net.Http.xml", + "ref/net46/zh-hant/System.Net.Http.xml", + "ref/netcore50/System.Net.Http.dll", + "ref/netcore50/System.Net.Http.xml", + "ref/netcore50/de/System.Net.Http.xml", + "ref/netcore50/es/System.Net.Http.xml", + "ref/netcore50/fr/System.Net.Http.xml", + "ref/netcore50/it/System.Net.Http.xml", + "ref/netcore50/ja/System.Net.Http.xml", + "ref/netcore50/ko/System.Net.Http.xml", + "ref/netcore50/ru/System.Net.Http.xml", + "ref/netcore50/zh-hans/System.Net.Http.xml", + "ref/netcore50/zh-hant/System.Net.Http.xml", + "ref/netstandard1.1/System.Net.Http.dll", + "ref/netstandard1.1/System.Net.Http.xml", + "ref/netstandard1.1/de/System.Net.Http.xml", + "ref/netstandard1.1/es/System.Net.Http.xml", + "ref/netstandard1.1/fr/System.Net.Http.xml", + "ref/netstandard1.1/it/System.Net.Http.xml", + "ref/netstandard1.1/ja/System.Net.Http.xml", + "ref/netstandard1.1/ko/System.Net.Http.xml", + "ref/netstandard1.1/ru/System.Net.Http.xml", + "ref/netstandard1.1/zh-hans/System.Net.Http.xml", + "ref/netstandard1.1/zh-hant/System.Net.Http.xml", + "ref/netstandard1.3/System.Net.Http.dll", + "ref/netstandard1.3/System.Net.Http.xml", + "ref/netstandard1.3/de/System.Net.Http.xml", + "ref/netstandard1.3/es/System.Net.Http.xml", + "ref/netstandard1.3/fr/System.Net.Http.xml", + "ref/netstandard1.3/it/System.Net.Http.xml", + "ref/netstandard1.3/ja/System.Net.Http.xml", + "ref/netstandard1.3/ko/System.Net.Http.xml", + "ref/netstandard1.3/ru/System.Net.Http.xml", + "ref/netstandard1.3/zh-hans/System.Net.Http.xml", + "ref/netstandard1.3/zh-hant/System.Net.Http.xml", + "ref/portable-net45+win8+wpa81/_._", + "ref/win8/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/unix/lib/netstandard1.6/System.Net.Http.dll", + "runtimes/win/lib/net46/System.Net.Http.dll", + "runtimes/win/lib/netcore50/System.Net.Http.dll", + "runtimes/win/lib/netstandard1.3/System.Net.Http.dll" + ] + }, + "System.Net.Primitives/4.0.11": { + "sha512": "hVvfl4405DRjA2408luZekbPhplJK03j2Y2lSfMlny7GHXlkByw1iLnc9mgKW0GdQn73vvMcWrWewAhylXA4Nw==", + "type": "package", + "path": "System.Net.Primitives/4.0.11", + "files": [ + "System.Net.Primitives.4.0.11.nupkg.sha512", + "System.Net.Primitives.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Net.Primitives.dll", + "ref/netcore50/System.Net.Primitives.xml", + "ref/netcore50/de/System.Net.Primitives.xml", + "ref/netcore50/es/System.Net.Primitives.xml", + "ref/netcore50/fr/System.Net.Primitives.xml", + "ref/netcore50/it/System.Net.Primitives.xml", + "ref/netcore50/ja/System.Net.Primitives.xml", + "ref/netcore50/ko/System.Net.Primitives.xml", + "ref/netcore50/ru/System.Net.Primitives.xml", + "ref/netcore50/zh-hans/System.Net.Primitives.xml", + "ref/netcore50/zh-hant/System.Net.Primitives.xml", + "ref/netstandard1.0/System.Net.Primitives.dll", + "ref/netstandard1.0/System.Net.Primitives.xml", + "ref/netstandard1.0/de/System.Net.Primitives.xml", + "ref/netstandard1.0/es/System.Net.Primitives.xml", + "ref/netstandard1.0/fr/System.Net.Primitives.xml", + "ref/netstandard1.0/it/System.Net.Primitives.xml", + "ref/netstandard1.0/ja/System.Net.Primitives.xml", + "ref/netstandard1.0/ko/System.Net.Primitives.xml", + "ref/netstandard1.0/ru/System.Net.Primitives.xml", + "ref/netstandard1.0/zh-hans/System.Net.Primitives.xml", + "ref/netstandard1.0/zh-hant/System.Net.Primitives.xml", + "ref/netstandard1.1/System.Net.Primitives.dll", + "ref/netstandard1.1/System.Net.Primitives.xml", + "ref/netstandard1.1/de/System.Net.Primitives.xml", + "ref/netstandard1.1/es/System.Net.Primitives.xml", + "ref/netstandard1.1/fr/System.Net.Primitives.xml", + "ref/netstandard1.1/it/System.Net.Primitives.xml", + "ref/netstandard1.1/ja/System.Net.Primitives.xml", + "ref/netstandard1.1/ko/System.Net.Primitives.xml", + "ref/netstandard1.1/ru/System.Net.Primitives.xml", + "ref/netstandard1.1/zh-hans/System.Net.Primitives.xml", + "ref/netstandard1.1/zh-hant/System.Net.Primitives.xml", + "ref/netstandard1.3/System.Net.Primitives.dll", + "ref/netstandard1.3/System.Net.Primitives.xml", + "ref/netstandard1.3/de/System.Net.Primitives.xml", + "ref/netstandard1.3/es/System.Net.Primitives.xml", + "ref/netstandard1.3/fr/System.Net.Primitives.xml", + "ref/netstandard1.3/it/System.Net.Primitives.xml", + "ref/netstandard1.3/ja/System.Net.Primitives.xml", + "ref/netstandard1.3/ko/System.Net.Primitives.xml", + "ref/netstandard1.3/ru/System.Net.Primitives.xml", + "ref/netstandard1.3/zh-hans/System.Net.Primitives.xml", + "ref/netstandard1.3/zh-hant/System.Net.Primitives.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Net.Sockets/4.1.0": { + "sha512": "xAz0N3dAV/aR/9g8r0Y5oEqU1JRsz29F5EGb/WVHmX3jVSLqi2/92M5hTad2aNWovruXrJpJtgZ9fccPMG9uSw==", + "type": "package", + "path": "System.Net.Sockets/4.1.0", + "files": [ + "System.Net.Sockets.4.1.0.nupkg.sha512", + "System.Net.Sockets.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Net.Sockets.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Net.Sockets.dll", + "ref/netstandard1.3/System.Net.Sockets.dll", + "ref/netstandard1.3/System.Net.Sockets.xml", + "ref/netstandard1.3/de/System.Net.Sockets.xml", + "ref/netstandard1.3/es/System.Net.Sockets.xml", + "ref/netstandard1.3/fr/System.Net.Sockets.xml", + "ref/netstandard1.3/it/System.Net.Sockets.xml", + "ref/netstandard1.3/ja/System.Net.Sockets.xml", + "ref/netstandard1.3/ko/System.Net.Sockets.xml", + "ref/netstandard1.3/ru/System.Net.Sockets.xml", + "ref/netstandard1.3/zh-hans/System.Net.Sockets.xml", + "ref/netstandard1.3/zh-hant/System.Net.Sockets.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.ObjectModel/4.0.12": { + "sha512": "tAgJM1xt3ytyMoW4qn4wIqgJYm7L7TShRZG4+Q4Qsi2PCcj96pXN7nRywS9KkB3p/xDUjc2HSwP9SROyPYDYKQ==", + "type": "package", + "path": "System.ObjectModel/4.0.12", + "files": [ + "System.ObjectModel.4.0.12.nupkg.sha512", + "System.ObjectModel.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/System.ObjectModel.dll", + "lib/netstandard1.3/System.ObjectModel.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.ObjectModel.dll", + "ref/netcore50/System.ObjectModel.xml", + "ref/netcore50/de/System.ObjectModel.xml", + "ref/netcore50/es/System.ObjectModel.xml", + "ref/netcore50/fr/System.ObjectModel.xml", + "ref/netcore50/it/System.ObjectModel.xml", + "ref/netcore50/ja/System.ObjectModel.xml", + "ref/netcore50/ko/System.ObjectModel.xml", + "ref/netcore50/ru/System.ObjectModel.xml", + "ref/netcore50/zh-hans/System.ObjectModel.xml", + "ref/netcore50/zh-hant/System.ObjectModel.xml", + "ref/netstandard1.0/System.ObjectModel.dll", + "ref/netstandard1.0/System.ObjectModel.xml", + "ref/netstandard1.0/de/System.ObjectModel.xml", + "ref/netstandard1.0/es/System.ObjectModel.xml", + "ref/netstandard1.0/fr/System.ObjectModel.xml", + "ref/netstandard1.0/it/System.ObjectModel.xml", + "ref/netstandard1.0/ja/System.ObjectModel.xml", + "ref/netstandard1.0/ko/System.ObjectModel.xml", + "ref/netstandard1.0/ru/System.ObjectModel.xml", + "ref/netstandard1.0/zh-hans/System.ObjectModel.xml", + "ref/netstandard1.0/zh-hant/System.ObjectModel.xml", + "ref/netstandard1.3/System.ObjectModel.dll", + "ref/netstandard1.3/System.ObjectModel.xml", + "ref/netstandard1.3/de/System.ObjectModel.xml", + "ref/netstandard1.3/es/System.ObjectModel.xml", + "ref/netstandard1.3/fr/System.ObjectModel.xml", + "ref/netstandard1.3/it/System.ObjectModel.xml", + "ref/netstandard1.3/ja/System.ObjectModel.xml", + "ref/netstandard1.3/ko/System.ObjectModel.xml", + "ref/netstandard1.3/ru/System.ObjectModel.xml", + "ref/netstandard1.3/zh-hans/System.ObjectModel.xml", + "ref/netstandard1.3/zh-hant/System.ObjectModel.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Reflection/4.1.0": { + "sha512": "JCKANJ0TI7kzoQzuwB/OoJANy1Lg338B6+JVacPl4TpUwi3cReg3nMLplMq2uqYfHFQpKIlHAUVAJlImZz/4ng==", + "type": "package", + "path": "System.Reflection/4.1.0", + "files": [ + "System.Reflection.4.1.0.nupkg.sha512", + "System.Reflection.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net462/System.Reflection.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net462/System.Reflection.dll", + "ref/netcore50/System.Reflection.dll", + "ref/netcore50/System.Reflection.xml", + "ref/netcore50/de/System.Reflection.xml", + "ref/netcore50/es/System.Reflection.xml", + "ref/netcore50/fr/System.Reflection.xml", + "ref/netcore50/it/System.Reflection.xml", + "ref/netcore50/ja/System.Reflection.xml", + "ref/netcore50/ko/System.Reflection.xml", + "ref/netcore50/ru/System.Reflection.xml", + "ref/netcore50/zh-hans/System.Reflection.xml", + "ref/netcore50/zh-hant/System.Reflection.xml", + "ref/netstandard1.0/System.Reflection.dll", + "ref/netstandard1.0/System.Reflection.xml", + "ref/netstandard1.0/de/System.Reflection.xml", + "ref/netstandard1.0/es/System.Reflection.xml", + "ref/netstandard1.0/fr/System.Reflection.xml", + "ref/netstandard1.0/it/System.Reflection.xml", + "ref/netstandard1.0/ja/System.Reflection.xml", + "ref/netstandard1.0/ko/System.Reflection.xml", + "ref/netstandard1.0/ru/System.Reflection.xml", + "ref/netstandard1.0/zh-hans/System.Reflection.xml", + "ref/netstandard1.0/zh-hant/System.Reflection.xml", + "ref/netstandard1.3/System.Reflection.dll", + "ref/netstandard1.3/System.Reflection.xml", + "ref/netstandard1.3/de/System.Reflection.xml", + "ref/netstandard1.3/es/System.Reflection.xml", + "ref/netstandard1.3/fr/System.Reflection.xml", + "ref/netstandard1.3/it/System.Reflection.xml", + "ref/netstandard1.3/ja/System.Reflection.xml", + "ref/netstandard1.3/ko/System.Reflection.xml", + "ref/netstandard1.3/ru/System.Reflection.xml", + "ref/netstandard1.3/zh-hans/System.Reflection.xml", + "ref/netstandard1.3/zh-hant/System.Reflection.xml", + "ref/netstandard1.5/System.Reflection.dll", + "ref/netstandard1.5/System.Reflection.xml", + "ref/netstandard1.5/de/System.Reflection.xml", + "ref/netstandard1.5/es/System.Reflection.xml", + "ref/netstandard1.5/fr/System.Reflection.xml", + "ref/netstandard1.5/it/System.Reflection.xml", + "ref/netstandard1.5/ja/System.Reflection.xml", + "ref/netstandard1.5/ko/System.Reflection.xml", + "ref/netstandard1.5/ru/System.Reflection.xml", + "ref/netstandard1.5/zh-hans/System.Reflection.xml", + "ref/netstandard1.5/zh-hant/System.Reflection.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Reflection.Emit/4.0.1": { + "sha512": "P2wqAj72fFjpP6wb9nSfDqNBMab+2ovzSDzUZK7MVIm54tBJEPr9jWfSjjoTpPwj1LeKcmX3vr0ttyjSSFM47g==", + "type": "package", + "path": "System.Reflection.Emit/4.0.1", + "files": [ + "System.Reflection.Emit.4.0.1.nupkg.sha512", + "System.Reflection.Emit.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/net45/_._", + "lib/netcore50/System.Reflection.Emit.dll", + "lib/netstandard1.3/System.Reflection.Emit.dll", + "lib/xamarinmac20/_._", + "ref/MonoAndroid10/_._", + "ref/net45/_._", + "ref/netstandard1.1/System.Reflection.Emit.dll", + "ref/netstandard1.1/System.Reflection.Emit.xml", + "ref/netstandard1.1/de/System.Reflection.Emit.xml", + "ref/netstandard1.1/es/System.Reflection.Emit.xml", + "ref/netstandard1.1/fr/System.Reflection.Emit.xml", + "ref/netstandard1.1/it/System.Reflection.Emit.xml", + "ref/netstandard1.1/ja/System.Reflection.Emit.xml", + "ref/netstandard1.1/ko/System.Reflection.Emit.xml", + "ref/netstandard1.1/ru/System.Reflection.Emit.xml", + "ref/netstandard1.1/zh-hans/System.Reflection.Emit.xml", + "ref/netstandard1.1/zh-hant/System.Reflection.Emit.xml", + "ref/xamarinmac20/_._" + ] + }, + "System.Reflection.Emit.ILGeneration/4.0.1": { + "sha512": "Ov6dU8Bu15Bc7zuqttgHF12J5lwSWyTf1S+FJouUXVMSqImLZzYaQ+vRr1rQ0OZ0HqsrwWl4dsKHELckQkVpgA==", + "type": "package", + "path": "System.Reflection.Emit.ILGeneration/4.0.1", + "files": [ + "System.Reflection.Emit.ILGeneration.4.0.1.nupkg.sha512", + "System.Reflection.Emit.ILGeneration.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/net45/_._", + "lib/netcore50/System.Reflection.Emit.ILGeneration.dll", + "lib/netstandard1.3/System.Reflection.Emit.ILGeneration.dll", + "lib/portable-net45+wp8/_._", + "lib/wp80/_._", + "ref/net45/_._", + "ref/netstandard1.0/System.Reflection.Emit.ILGeneration.dll", + "ref/netstandard1.0/System.Reflection.Emit.ILGeneration.xml", + "ref/netstandard1.0/de/System.Reflection.Emit.ILGeneration.xml", + "ref/netstandard1.0/es/System.Reflection.Emit.ILGeneration.xml", + "ref/netstandard1.0/fr/System.Reflection.Emit.ILGeneration.xml", + "ref/netstandard1.0/it/System.Reflection.Emit.ILGeneration.xml", + "ref/netstandard1.0/ja/System.Reflection.Emit.ILGeneration.xml", + "ref/netstandard1.0/ko/System.Reflection.Emit.ILGeneration.xml", + "ref/netstandard1.0/ru/System.Reflection.Emit.ILGeneration.xml", + "ref/netstandard1.0/zh-hans/System.Reflection.Emit.ILGeneration.xml", + "ref/netstandard1.0/zh-hant/System.Reflection.Emit.ILGeneration.xml", + "ref/portable-net45+wp8/_._", + "ref/wp80/_._", + "runtimes/aot/lib/netcore50/_._" + ] + }, + "System.Reflection.Emit.Lightweight/4.0.1": { + "sha512": "sSzHHXueZ5Uh0OLpUQprhr+ZYJrLPA2Cmr4gn0wj9+FftNKXx8RIMKvO9qnjk2ebPYUjZ+F2ulGdPOsvj+MEjA==", + "type": "package", + "path": "System.Reflection.Emit.Lightweight/4.0.1", + "files": [ + "System.Reflection.Emit.Lightweight.4.0.1.nupkg.sha512", + "System.Reflection.Emit.Lightweight.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/net45/_._", + "lib/netcore50/System.Reflection.Emit.Lightweight.dll", + "lib/netstandard1.3/System.Reflection.Emit.Lightweight.dll", + "lib/portable-net45+wp8/_._", + "lib/wp80/_._", + "ref/net45/_._", + "ref/netstandard1.0/System.Reflection.Emit.Lightweight.dll", + "ref/netstandard1.0/System.Reflection.Emit.Lightweight.xml", + "ref/netstandard1.0/de/System.Reflection.Emit.Lightweight.xml", + "ref/netstandard1.0/es/System.Reflection.Emit.Lightweight.xml", + "ref/netstandard1.0/fr/System.Reflection.Emit.Lightweight.xml", + "ref/netstandard1.0/it/System.Reflection.Emit.Lightweight.xml", + "ref/netstandard1.0/ja/System.Reflection.Emit.Lightweight.xml", + "ref/netstandard1.0/ko/System.Reflection.Emit.Lightweight.xml", + "ref/netstandard1.0/ru/System.Reflection.Emit.Lightweight.xml", + "ref/netstandard1.0/zh-hans/System.Reflection.Emit.Lightweight.xml", + "ref/netstandard1.0/zh-hant/System.Reflection.Emit.Lightweight.xml", + "ref/portable-net45+wp8/_._", + "ref/wp80/_._", + "runtimes/aot/lib/netcore50/_._" + ] + }, + "System.Reflection.Extensions/4.0.1": { + "sha512": "GYrtRsZcMuHF3sbmRHfMYpvxZoIN2bQGrYGerUiWLEkqdEUQZhH3TRSaC/oI4wO0II1RKBPlpIa1TOMxIcOOzQ==", + "type": "package", + "path": "System.Reflection.Extensions/4.0.1", + "files": [ + "System.Reflection.Extensions.4.0.1.nupkg.sha512", + "System.Reflection.Extensions.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Reflection.Extensions.dll", + "ref/netcore50/System.Reflection.Extensions.xml", + "ref/netcore50/de/System.Reflection.Extensions.xml", + "ref/netcore50/es/System.Reflection.Extensions.xml", + "ref/netcore50/fr/System.Reflection.Extensions.xml", + "ref/netcore50/it/System.Reflection.Extensions.xml", + "ref/netcore50/ja/System.Reflection.Extensions.xml", + "ref/netcore50/ko/System.Reflection.Extensions.xml", + "ref/netcore50/ru/System.Reflection.Extensions.xml", + "ref/netcore50/zh-hans/System.Reflection.Extensions.xml", + "ref/netcore50/zh-hant/System.Reflection.Extensions.xml", + "ref/netstandard1.0/System.Reflection.Extensions.dll", + "ref/netstandard1.0/System.Reflection.Extensions.xml", + "ref/netstandard1.0/de/System.Reflection.Extensions.xml", + "ref/netstandard1.0/es/System.Reflection.Extensions.xml", + "ref/netstandard1.0/fr/System.Reflection.Extensions.xml", + "ref/netstandard1.0/it/System.Reflection.Extensions.xml", + "ref/netstandard1.0/ja/System.Reflection.Extensions.xml", + "ref/netstandard1.0/ko/System.Reflection.Extensions.xml", + "ref/netstandard1.0/ru/System.Reflection.Extensions.xml", + "ref/netstandard1.0/zh-hans/System.Reflection.Extensions.xml", + "ref/netstandard1.0/zh-hant/System.Reflection.Extensions.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Reflection.Primitives/4.0.1": { + "sha512": "4inTox4wTBaDhB7V3mPvp9XlCbeGYWVEM9/fXALd52vNEAVisc1BoVWQPuUuD0Ga//dNbA/WeMy9u9mzLxGTHQ==", + "type": "package", + "path": "System.Reflection.Primitives/4.0.1", + "files": [ + "System.Reflection.Primitives.4.0.1.nupkg.sha512", + "System.Reflection.Primitives.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Reflection.Primitives.dll", + "ref/netcore50/System.Reflection.Primitives.xml", + "ref/netcore50/de/System.Reflection.Primitives.xml", + "ref/netcore50/es/System.Reflection.Primitives.xml", + "ref/netcore50/fr/System.Reflection.Primitives.xml", + "ref/netcore50/it/System.Reflection.Primitives.xml", + "ref/netcore50/ja/System.Reflection.Primitives.xml", + "ref/netcore50/ko/System.Reflection.Primitives.xml", + "ref/netcore50/ru/System.Reflection.Primitives.xml", + "ref/netcore50/zh-hans/System.Reflection.Primitives.xml", + "ref/netcore50/zh-hant/System.Reflection.Primitives.xml", + "ref/netstandard1.0/System.Reflection.Primitives.dll", + "ref/netstandard1.0/System.Reflection.Primitives.xml", + "ref/netstandard1.0/de/System.Reflection.Primitives.xml", + "ref/netstandard1.0/es/System.Reflection.Primitives.xml", + "ref/netstandard1.0/fr/System.Reflection.Primitives.xml", + "ref/netstandard1.0/it/System.Reflection.Primitives.xml", + "ref/netstandard1.0/ja/System.Reflection.Primitives.xml", + "ref/netstandard1.0/ko/System.Reflection.Primitives.xml", + "ref/netstandard1.0/ru/System.Reflection.Primitives.xml", + "ref/netstandard1.0/zh-hans/System.Reflection.Primitives.xml", + "ref/netstandard1.0/zh-hant/System.Reflection.Primitives.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Reflection.TypeExtensions/4.1.0": { + "sha512": "tsQ/ptQ3H5FYfON8lL4MxRk/8kFyE0A+tGPXmVP967cT/gzLHYxIejIYSxp4JmIeFHVP78g/F2FE1mUUTbDtrg==", + "type": "package", + "path": "System.Reflection.TypeExtensions/4.1.0", + "files": [ + "System.Reflection.TypeExtensions.4.1.0.nupkg.sha512", + "System.Reflection.TypeExtensions.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Reflection.TypeExtensions.dll", + "lib/net462/System.Reflection.TypeExtensions.dll", + "lib/netcore50/System.Reflection.TypeExtensions.dll", + "lib/netstandard1.5/System.Reflection.TypeExtensions.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Reflection.TypeExtensions.dll", + "ref/net462/System.Reflection.TypeExtensions.dll", + "ref/netstandard1.3/System.Reflection.TypeExtensions.dll", + "ref/netstandard1.3/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.3/de/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.3/es/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.3/fr/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.3/it/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.3/ja/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.3/ko/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.3/ru/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.3/zh-hans/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.3/zh-hant/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.5/System.Reflection.TypeExtensions.dll", + "ref/netstandard1.5/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.5/de/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.5/es/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.5/fr/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.5/it/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.5/ja/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.5/ko/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.5/ru/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.5/zh-hans/System.Reflection.TypeExtensions.xml", + "ref/netstandard1.5/zh-hant/System.Reflection.TypeExtensions.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/aot/lib/netcore50/System.Reflection.TypeExtensions.dll" + ] + }, + "System.Resources.ResourceManager/4.0.1": { + "sha512": "TxwVeUNoTgUOdQ09gfTjvW411MF+w9MBYL7AtNVc+HtBCFlutPLhUCdZjNkjbhj3bNQWMdHboF0KIWEOjJssbA==", + "type": "package", + "path": "System.Resources.ResourceManager/4.0.1", + "files": [ + "System.Resources.ResourceManager.4.0.1.nupkg.sha512", + "System.Resources.ResourceManager.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Resources.ResourceManager.dll", + "ref/netcore50/System.Resources.ResourceManager.xml", + "ref/netcore50/de/System.Resources.ResourceManager.xml", + "ref/netcore50/es/System.Resources.ResourceManager.xml", + "ref/netcore50/fr/System.Resources.ResourceManager.xml", + "ref/netcore50/it/System.Resources.ResourceManager.xml", + "ref/netcore50/ja/System.Resources.ResourceManager.xml", + "ref/netcore50/ko/System.Resources.ResourceManager.xml", + "ref/netcore50/ru/System.Resources.ResourceManager.xml", + "ref/netcore50/zh-hans/System.Resources.ResourceManager.xml", + "ref/netcore50/zh-hant/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/System.Resources.ResourceManager.dll", + "ref/netstandard1.0/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/de/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/es/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/fr/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/it/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/ja/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/ko/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/ru/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/zh-hans/System.Resources.ResourceManager.xml", + "ref/netstandard1.0/zh-hant/System.Resources.ResourceManager.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Runtime/4.1.0": { + "sha512": "v6c/4Yaa9uWsq+JMhnOFewrYkgdNHNG2eMKuNqRn8P733rNXeRCGvV5FkkjBXn2dbVkPXOsO0xjsEeM1q2zC0g==", + "type": "package", + "path": "System.Runtime/4.1.0", + "files": [ + "System.Runtime.4.1.0.nupkg.sha512", + "System.Runtime.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net462/System.Runtime.dll", + "lib/portable-net45+win8+wp80+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net462/System.Runtime.dll", + "ref/netcore50/System.Runtime.dll", + "ref/netcore50/System.Runtime.xml", + "ref/netcore50/de/System.Runtime.xml", + "ref/netcore50/es/System.Runtime.xml", + "ref/netcore50/fr/System.Runtime.xml", + "ref/netcore50/it/System.Runtime.xml", + "ref/netcore50/ja/System.Runtime.xml", + "ref/netcore50/ko/System.Runtime.xml", + "ref/netcore50/ru/System.Runtime.xml", + "ref/netcore50/zh-hans/System.Runtime.xml", + "ref/netcore50/zh-hant/System.Runtime.xml", + "ref/netstandard1.0/System.Runtime.dll", + "ref/netstandard1.0/System.Runtime.xml", + "ref/netstandard1.0/de/System.Runtime.xml", + "ref/netstandard1.0/es/System.Runtime.xml", + "ref/netstandard1.0/fr/System.Runtime.xml", + "ref/netstandard1.0/it/System.Runtime.xml", + "ref/netstandard1.0/ja/System.Runtime.xml", + "ref/netstandard1.0/ko/System.Runtime.xml", + "ref/netstandard1.0/ru/System.Runtime.xml", + "ref/netstandard1.0/zh-hans/System.Runtime.xml", + "ref/netstandard1.0/zh-hant/System.Runtime.xml", + "ref/netstandard1.2/System.Runtime.dll", + "ref/netstandard1.2/System.Runtime.xml", + "ref/netstandard1.2/de/System.Runtime.xml", + "ref/netstandard1.2/es/System.Runtime.xml", + "ref/netstandard1.2/fr/System.Runtime.xml", + "ref/netstandard1.2/it/System.Runtime.xml", + "ref/netstandard1.2/ja/System.Runtime.xml", + "ref/netstandard1.2/ko/System.Runtime.xml", + "ref/netstandard1.2/ru/System.Runtime.xml", + "ref/netstandard1.2/zh-hans/System.Runtime.xml", + "ref/netstandard1.2/zh-hant/System.Runtime.xml", + "ref/netstandard1.3/System.Runtime.dll", + "ref/netstandard1.3/System.Runtime.xml", + "ref/netstandard1.3/de/System.Runtime.xml", + "ref/netstandard1.3/es/System.Runtime.xml", + "ref/netstandard1.3/fr/System.Runtime.xml", + "ref/netstandard1.3/it/System.Runtime.xml", + "ref/netstandard1.3/ja/System.Runtime.xml", + "ref/netstandard1.3/ko/System.Runtime.xml", + "ref/netstandard1.3/ru/System.Runtime.xml", + "ref/netstandard1.3/zh-hans/System.Runtime.xml", + "ref/netstandard1.3/zh-hant/System.Runtime.xml", + "ref/netstandard1.5/System.Runtime.dll", + "ref/netstandard1.5/System.Runtime.xml", + "ref/netstandard1.5/de/System.Runtime.xml", + "ref/netstandard1.5/es/System.Runtime.xml", + "ref/netstandard1.5/fr/System.Runtime.xml", + "ref/netstandard1.5/it/System.Runtime.xml", + "ref/netstandard1.5/ja/System.Runtime.xml", + "ref/netstandard1.5/ko/System.Runtime.xml", + "ref/netstandard1.5/ru/System.Runtime.xml", + "ref/netstandard1.5/zh-hans/System.Runtime.xml", + "ref/netstandard1.5/zh-hant/System.Runtime.xml", + "ref/portable-net45+win8+wp80+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Runtime.Extensions/4.1.0": { + "sha512": "CUOHjTT/vgP0qGW22U4/hDlOqXmcPq5YicBaXdUR2UiUoLwBT+olO6we4DVbq57jeX5uXH2uerVZhf0qGj+sVQ==", + "type": "package", + "path": "System.Runtime.Extensions/4.1.0", + "files": [ + "System.Runtime.Extensions.4.1.0.nupkg.sha512", + "System.Runtime.Extensions.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net462/System.Runtime.Extensions.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net462/System.Runtime.Extensions.dll", + "ref/netcore50/System.Runtime.Extensions.dll", + "ref/netcore50/System.Runtime.Extensions.xml", + "ref/netcore50/de/System.Runtime.Extensions.xml", + "ref/netcore50/es/System.Runtime.Extensions.xml", + "ref/netcore50/fr/System.Runtime.Extensions.xml", + "ref/netcore50/it/System.Runtime.Extensions.xml", + "ref/netcore50/ja/System.Runtime.Extensions.xml", + "ref/netcore50/ko/System.Runtime.Extensions.xml", + "ref/netcore50/ru/System.Runtime.Extensions.xml", + "ref/netcore50/zh-hans/System.Runtime.Extensions.xml", + "ref/netcore50/zh-hant/System.Runtime.Extensions.xml", + "ref/netstandard1.0/System.Runtime.Extensions.dll", + "ref/netstandard1.0/System.Runtime.Extensions.xml", + "ref/netstandard1.0/de/System.Runtime.Extensions.xml", + "ref/netstandard1.0/es/System.Runtime.Extensions.xml", + "ref/netstandard1.0/fr/System.Runtime.Extensions.xml", + "ref/netstandard1.0/it/System.Runtime.Extensions.xml", + "ref/netstandard1.0/ja/System.Runtime.Extensions.xml", + "ref/netstandard1.0/ko/System.Runtime.Extensions.xml", + "ref/netstandard1.0/ru/System.Runtime.Extensions.xml", + "ref/netstandard1.0/zh-hans/System.Runtime.Extensions.xml", + "ref/netstandard1.0/zh-hant/System.Runtime.Extensions.xml", + "ref/netstandard1.3/System.Runtime.Extensions.dll", + "ref/netstandard1.3/System.Runtime.Extensions.xml", + "ref/netstandard1.3/de/System.Runtime.Extensions.xml", + "ref/netstandard1.3/es/System.Runtime.Extensions.xml", + "ref/netstandard1.3/fr/System.Runtime.Extensions.xml", + "ref/netstandard1.3/it/System.Runtime.Extensions.xml", + "ref/netstandard1.3/ja/System.Runtime.Extensions.xml", + "ref/netstandard1.3/ko/System.Runtime.Extensions.xml", + "ref/netstandard1.3/ru/System.Runtime.Extensions.xml", + "ref/netstandard1.3/zh-hans/System.Runtime.Extensions.xml", + "ref/netstandard1.3/zh-hant/System.Runtime.Extensions.xml", + "ref/netstandard1.5/System.Runtime.Extensions.dll", + "ref/netstandard1.5/System.Runtime.Extensions.xml", + "ref/netstandard1.5/de/System.Runtime.Extensions.xml", + "ref/netstandard1.5/es/System.Runtime.Extensions.xml", + "ref/netstandard1.5/fr/System.Runtime.Extensions.xml", + "ref/netstandard1.5/it/System.Runtime.Extensions.xml", + "ref/netstandard1.5/ja/System.Runtime.Extensions.xml", + "ref/netstandard1.5/ko/System.Runtime.Extensions.xml", + "ref/netstandard1.5/ru/System.Runtime.Extensions.xml", + "ref/netstandard1.5/zh-hans/System.Runtime.Extensions.xml", + "ref/netstandard1.5/zh-hant/System.Runtime.Extensions.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Runtime.Handles/4.0.1": { + "sha512": "nCJvEKguXEvk2ymk1gqj625vVnlK3/xdGzx0vOKicQkoquaTBJTP13AIYkocSUwHCLNBwUbXTqTWGDxBTWpt7g==", + "type": "package", + "path": "System.Runtime.Handles/4.0.1", + "files": [ + "System.Runtime.Handles.4.0.1.nupkg.sha512", + "System.Runtime.Handles.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/_._", + "ref/netstandard1.3/System.Runtime.Handles.dll", + "ref/netstandard1.3/System.Runtime.Handles.xml", + "ref/netstandard1.3/de/System.Runtime.Handles.xml", + "ref/netstandard1.3/es/System.Runtime.Handles.xml", + "ref/netstandard1.3/fr/System.Runtime.Handles.xml", + "ref/netstandard1.3/it/System.Runtime.Handles.xml", + "ref/netstandard1.3/ja/System.Runtime.Handles.xml", + "ref/netstandard1.3/ko/System.Runtime.Handles.xml", + "ref/netstandard1.3/ru/System.Runtime.Handles.xml", + "ref/netstandard1.3/zh-hans/System.Runtime.Handles.xml", + "ref/netstandard1.3/zh-hant/System.Runtime.Handles.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Runtime.InteropServices/4.1.0": { + "sha512": "16eu3kjHS633yYdkjwShDHZLRNMKVi/s0bY8ODiqJ2RfMhDMAwxZaUaWVnZ2P71kr/or+X9o/xFWtNqz8ivieQ==", + "type": "package", + "path": "System.Runtime.InteropServices/4.1.0", + "files": [ + "System.Runtime.InteropServices.4.1.0.nupkg.sha512", + "System.Runtime.InteropServices.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net462/System.Runtime.InteropServices.dll", + "lib/portable-net45+win8+wpa81/_._", + "lib/win8/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net462/System.Runtime.InteropServices.dll", + "ref/netcore50/System.Runtime.InteropServices.dll", + "ref/netcore50/System.Runtime.InteropServices.xml", + "ref/netcore50/de/System.Runtime.InteropServices.xml", + "ref/netcore50/es/System.Runtime.InteropServices.xml", + "ref/netcore50/fr/System.Runtime.InteropServices.xml", + "ref/netcore50/it/System.Runtime.InteropServices.xml", + "ref/netcore50/ja/System.Runtime.InteropServices.xml", + "ref/netcore50/ko/System.Runtime.InteropServices.xml", + "ref/netcore50/ru/System.Runtime.InteropServices.xml", + "ref/netcore50/zh-hans/System.Runtime.InteropServices.xml", + "ref/netcore50/zh-hant/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/System.Runtime.InteropServices.dll", + "ref/netstandard1.1/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/de/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/es/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/fr/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/it/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/ja/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/ko/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/ru/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/zh-hans/System.Runtime.InteropServices.xml", + "ref/netstandard1.1/zh-hant/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/System.Runtime.InteropServices.dll", + "ref/netstandard1.2/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/de/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/es/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/fr/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/it/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/ja/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/ko/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/ru/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/zh-hans/System.Runtime.InteropServices.xml", + "ref/netstandard1.2/zh-hant/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/System.Runtime.InteropServices.dll", + "ref/netstandard1.3/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/de/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/es/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/fr/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/it/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/ja/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/ko/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/ru/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/zh-hans/System.Runtime.InteropServices.xml", + "ref/netstandard1.3/zh-hant/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/System.Runtime.InteropServices.dll", + "ref/netstandard1.5/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/de/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/es/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/fr/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/it/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/ja/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/ko/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/ru/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/zh-hans/System.Runtime.InteropServices.xml", + "ref/netstandard1.5/zh-hant/System.Runtime.InteropServices.xml", + "ref/portable-net45+win8+wpa81/_._", + "ref/win8/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Runtime.InteropServices.RuntimeInformation/4.0.0": { + "sha512": "hWPhJxc453RCa8Z29O91EmfGeZIHX1ZH2A8L6lYQVSaKzku2DfArSfMEb1/MYYzPQRJZeu0c9dmYeJKxW5Fgng==", + "type": "package", + "path": "System.Runtime.InteropServices.RuntimeInformation/4.0.0", + "files": [ + "System.Runtime.InteropServices.RuntimeInformation.4.0.0.nupkg.sha512", + "System.Runtime.InteropServices.RuntimeInformation.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/System.Runtime.InteropServices.RuntimeInformation.dll", + "lib/win8/System.Runtime.InteropServices.RuntimeInformation.dll", + "lib/wpa81/System.Runtime.InteropServices.RuntimeInformation.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/aot/lib/netcore50/System.Runtime.InteropServices.RuntimeInformation.dll", + "runtimes/unix/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll", + "runtimes/win/lib/net45/System.Runtime.InteropServices.RuntimeInformation.dll", + "runtimes/win/lib/netcore50/System.Runtime.InteropServices.RuntimeInformation.dll", + "runtimes/win/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll" + ] + }, + "System.Runtime.Numerics/4.0.1": { + "sha512": "+XbKFuzdmLP3d1o9pdHu2nxjNr2OEPqGzKeegPLCUMM71a0t50A/rOcIRmGs9wR7a8KuHX6hYs/7/TymIGLNqg==", + "type": "package", + "path": "System.Runtime.Numerics/4.0.1", + "files": [ + "System.Runtime.Numerics.4.0.1.nupkg.sha512", + "System.Runtime.Numerics.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/System.Runtime.Numerics.dll", + "lib/netstandard1.3/System.Runtime.Numerics.dll", + "lib/portable-net45+win8+wpa81/_._", + "lib/win8/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Runtime.Numerics.dll", + "ref/netcore50/System.Runtime.Numerics.xml", + "ref/netcore50/de/System.Runtime.Numerics.xml", + "ref/netcore50/es/System.Runtime.Numerics.xml", + "ref/netcore50/fr/System.Runtime.Numerics.xml", + "ref/netcore50/it/System.Runtime.Numerics.xml", + "ref/netcore50/ja/System.Runtime.Numerics.xml", + "ref/netcore50/ko/System.Runtime.Numerics.xml", + "ref/netcore50/ru/System.Runtime.Numerics.xml", + "ref/netcore50/zh-hans/System.Runtime.Numerics.xml", + "ref/netcore50/zh-hant/System.Runtime.Numerics.xml", + "ref/netstandard1.1/System.Runtime.Numerics.dll", + "ref/netstandard1.1/System.Runtime.Numerics.xml", + "ref/netstandard1.1/de/System.Runtime.Numerics.xml", + "ref/netstandard1.1/es/System.Runtime.Numerics.xml", + "ref/netstandard1.1/fr/System.Runtime.Numerics.xml", + "ref/netstandard1.1/it/System.Runtime.Numerics.xml", + "ref/netstandard1.1/ja/System.Runtime.Numerics.xml", + "ref/netstandard1.1/ko/System.Runtime.Numerics.xml", + "ref/netstandard1.1/ru/System.Runtime.Numerics.xml", + "ref/netstandard1.1/zh-hans/System.Runtime.Numerics.xml", + "ref/netstandard1.1/zh-hant/System.Runtime.Numerics.xml", + "ref/portable-net45+win8+wpa81/_._", + "ref/win8/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Runtime.Serialization.Primitives/4.1.1": { + "sha512": "HZ6Du5QrTG8MNJbf4e4qMO3JRAkIboGT5Fk804uZtg3Gq516S7hAqTm2UZKUHa7/6HUGdVy3AqMQKbns06G/cg==", + "type": "package", + "path": "System.Runtime.Serialization.Primitives/4.1.1", + "files": [ + "System.Runtime.Serialization.Primitives.4.1.1.nupkg.sha512", + "System.Runtime.Serialization.Primitives.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net46/System.Runtime.Serialization.Primitives.dll", + "lib/netcore50/System.Runtime.Serialization.Primitives.dll", + "lib/netstandard1.3/System.Runtime.Serialization.Primitives.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net46/System.Runtime.Serialization.Primitives.dll", + "ref/netcore50/System.Runtime.Serialization.Primitives.dll", + "ref/netcore50/System.Runtime.Serialization.Primitives.xml", + "ref/netcore50/de/System.Runtime.Serialization.Primitives.xml", + "ref/netcore50/es/System.Runtime.Serialization.Primitives.xml", + "ref/netcore50/fr/System.Runtime.Serialization.Primitives.xml", + "ref/netcore50/it/System.Runtime.Serialization.Primitives.xml", + "ref/netcore50/ja/System.Runtime.Serialization.Primitives.xml", + "ref/netcore50/ko/System.Runtime.Serialization.Primitives.xml", + "ref/netcore50/ru/System.Runtime.Serialization.Primitives.xml", + "ref/netcore50/zh-hans/System.Runtime.Serialization.Primitives.xml", + "ref/netcore50/zh-hant/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.0/System.Runtime.Serialization.Primitives.dll", + "ref/netstandard1.0/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.0/de/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.0/es/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.0/fr/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.0/it/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.0/ja/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.0/ko/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.0/ru/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.0/zh-hans/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.0/zh-hant/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.3/System.Runtime.Serialization.Primitives.dll", + "ref/netstandard1.3/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.3/de/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.3/es/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.3/fr/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.3/it/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.3/ja/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.3/ko/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.3/ru/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.3/zh-hans/System.Runtime.Serialization.Primitives.xml", + "ref/netstandard1.3/zh-hant/System.Runtime.Serialization.Primitives.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/aot/lib/netcore50/System.Runtime.Serialization.Primitives.dll" + ] + }, + "System.Security.Cryptography.Algorithms/4.2.0": { + "sha512": "8JQFxbLVdrtIOKMDN38Fn0GWnqYZw/oMlwOUG/qz1jqChvyZlnUmu+0s7wLx7JYua/nAXoESpHA3iw11QFWhXg==", + "type": "package", + "path": "System.Security.Cryptography.Algorithms/4.2.0", + "files": [ + "System.Security.Cryptography.Algorithms.4.2.0.nupkg.sha512", + "System.Security.Cryptography.Algorithms.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Security.Cryptography.Algorithms.dll", + "lib/net461/System.Security.Cryptography.Algorithms.dll", + "lib/net463/System.Security.Cryptography.Algorithms.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Security.Cryptography.Algorithms.dll", + "ref/net461/System.Security.Cryptography.Algorithms.dll", + "ref/net463/System.Security.Cryptography.Algorithms.dll", + "ref/netstandard1.3/System.Security.Cryptography.Algorithms.dll", + "ref/netstandard1.4/System.Security.Cryptography.Algorithms.dll", + "ref/netstandard1.6/System.Security.Cryptography.Algorithms.dll", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/unix/lib/netstandard1.6/System.Security.Cryptography.Algorithms.dll", + "runtimes/win/lib/net46/System.Security.Cryptography.Algorithms.dll", + "runtimes/win/lib/net461/System.Security.Cryptography.Algorithms.dll", + "runtimes/win/lib/net463/System.Security.Cryptography.Algorithms.dll", + "runtimes/win/lib/netcore50/System.Security.Cryptography.Algorithms.dll", + "runtimes/win/lib/netstandard1.6/System.Security.Cryptography.Algorithms.dll" + ] + }, + "System.Security.Cryptography.Cng/4.2.0": { + "sha512": "cUJ2h+ZvONDe28Szw3st5dOHdjndhJzQ2WObDEXAWRPEQBtVItVoxbXM/OEsTthl3cNn2dk2k0I3y45igCQcLw==", + "type": "package", + "path": "System.Security.Cryptography.Cng/4.2.0", + "files": [ + "System.Security.Cryptography.Cng.4.2.0.nupkg.sha512", + "System.Security.Cryptography.Cng.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/net46/System.Security.Cryptography.Cng.dll", + "lib/net461/System.Security.Cryptography.Cng.dll", + "lib/net463/System.Security.Cryptography.Cng.dll", + "ref/net46/System.Security.Cryptography.Cng.dll", + "ref/net461/System.Security.Cryptography.Cng.dll", + "ref/net463/System.Security.Cryptography.Cng.dll", + "ref/netstandard1.3/System.Security.Cryptography.Cng.dll", + "ref/netstandard1.4/System.Security.Cryptography.Cng.dll", + "ref/netstandard1.6/System.Security.Cryptography.Cng.dll", + "runtimes/unix/lib/netstandard1.6/System.Security.Cryptography.Cng.dll", + "runtimes/win/lib/net46/System.Security.Cryptography.Cng.dll", + "runtimes/win/lib/net461/System.Security.Cryptography.Cng.dll", + "runtimes/win/lib/net463/System.Security.Cryptography.Cng.dll", + "runtimes/win/lib/netstandard1.4/System.Security.Cryptography.Cng.dll", + "runtimes/win/lib/netstandard1.6/System.Security.Cryptography.Cng.dll" + ] + }, + "System.Security.Cryptography.Csp/4.0.0": { + "sha512": "/i1Usuo4PgAqgbPNC0NjbO3jPW//BoBlTpcWFD1EHVbidH21y4c1ap5bbEMSGAXjAShhMH4abi/K8fILrnu4BQ==", + "type": "package", + "path": "System.Security.Cryptography.Csp/4.0.0", + "files": [ + "System.Security.Cryptography.Csp.4.0.0.nupkg.sha512", + "System.Security.Cryptography.Csp.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Security.Cryptography.Csp.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Security.Cryptography.Csp.dll", + "ref/netstandard1.3/System.Security.Cryptography.Csp.dll", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/unix/lib/netstandard1.3/System.Security.Cryptography.Csp.dll", + "runtimes/win/lib/net46/System.Security.Cryptography.Csp.dll", + "runtimes/win/lib/netcore50/_._", + "runtimes/win/lib/netstandard1.3/System.Security.Cryptography.Csp.dll" + ] + }, + "System.Security.Cryptography.Encoding/4.0.0": { + "sha512": "FbKgE5MbxSQMPcSVRgwM6bXN3GtyAh04NkV8E5zKCBE26X0vYW0UtTa2FIgkH33WVqBVxRgxljlVYumWtU+HcQ==", + "type": "package", + "path": "System.Security.Cryptography.Encoding/4.0.0", + "files": [ + "System.Security.Cryptography.Encoding.4.0.0.nupkg.sha512", + "System.Security.Cryptography.Encoding.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Security.Cryptography.Encoding.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Security.Cryptography.Encoding.dll", + "ref/netstandard1.3/System.Security.Cryptography.Encoding.dll", + "ref/netstandard1.3/System.Security.Cryptography.Encoding.xml", + "ref/netstandard1.3/de/System.Security.Cryptography.Encoding.xml", + "ref/netstandard1.3/es/System.Security.Cryptography.Encoding.xml", + "ref/netstandard1.3/fr/System.Security.Cryptography.Encoding.xml", + "ref/netstandard1.3/it/System.Security.Cryptography.Encoding.xml", + "ref/netstandard1.3/ja/System.Security.Cryptography.Encoding.xml", + "ref/netstandard1.3/ko/System.Security.Cryptography.Encoding.xml", + "ref/netstandard1.3/ru/System.Security.Cryptography.Encoding.xml", + "ref/netstandard1.3/zh-hans/System.Security.Cryptography.Encoding.xml", + "ref/netstandard1.3/zh-hant/System.Security.Cryptography.Encoding.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/unix/lib/netstandard1.3/System.Security.Cryptography.Encoding.dll", + "runtimes/win/lib/net46/System.Security.Cryptography.Encoding.dll", + "runtimes/win/lib/netstandard1.3/System.Security.Cryptography.Encoding.dll" + ] + }, + "System.Security.Cryptography.OpenSsl/4.0.0": { + "sha512": "HUG/zNUJwEiLkoURDixzkzZdB5yGA5pQhDP93ArOpDPQMteURIGERRNzzoJlmTreLBWr5lkFSjjMSk8ySEpQMw==", + "type": "package", + "path": "System.Security.Cryptography.OpenSsl/4.0.0", + "files": [ + "System.Security.Cryptography.OpenSsl.4.0.0.nupkg.sha512", + "System.Security.Cryptography.OpenSsl.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.6/System.Security.Cryptography.OpenSsl.dll", + "ref/netstandard1.6/System.Security.Cryptography.OpenSsl.dll", + "runtimes/unix/lib/netstandard1.6/System.Security.Cryptography.OpenSsl.dll" + ] + }, + "System.Security.Cryptography.Primitives/4.0.0": { + "sha512": "Wkd7QryWYjkQclX0bngpntW5HSlMzeJU24UaLJQ7YTfI8ydAVAaU2J+HXLLABOVJlKTVvAeL0Aj39VeTe7L+oA==", + "type": "package", + "path": "System.Security.Cryptography.Primitives/4.0.0", + "files": [ + "System.Security.Cryptography.Primitives.4.0.0.nupkg.sha512", + "System.Security.Cryptography.Primitives.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Security.Cryptography.Primitives.dll", + "lib/netstandard1.3/System.Security.Cryptography.Primitives.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Security.Cryptography.Primitives.dll", + "ref/netstandard1.3/System.Security.Cryptography.Primitives.dll", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Security.Cryptography.X509Certificates/4.1.0": { + "sha512": "4HEfsQIKAhA1+ApNn729Gi09zh+lYWwyIuViihoMDWp1vQnEkL2ct7mAbhBlLYm+x/L4Rr/pyGge1lIY635e0w==", + "type": "package", + "path": "System.Security.Cryptography.X509Certificates/4.1.0", + "files": [ + "System.Security.Cryptography.X509Certificates.4.1.0.nupkg.sha512", + "System.Security.Cryptography.X509Certificates.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net46/System.Security.Cryptography.X509Certificates.dll", + "lib/net461/System.Security.Cryptography.X509Certificates.dll", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net46/System.Security.Cryptography.X509Certificates.dll", + "ref/net461/System.Security.Cryptography.X509Certificates.dll", + "ref/netstandard1.3/System.Security.Cryptography.X509Certificates.dll", + "ref/netstandard1.3/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.3/de/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.3/es/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.3/fr/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.3/it/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.3/ja/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.3/ko/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.3/ru/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.3/zh-hans/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.3/zh-hant/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/System.Security.Cryptography.X509Certificates.dll", + "ref/netstandard1.4/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/de/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/es/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/fr/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/it/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/ja/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/ko/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/ru/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/zh-hans/System.Security.Cryptography.X509Certificates.xml", + "ref/netstandard1.4/zh-hant/System.Security.Cryptography.X509Certificates.xml", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/unix/lib/netstandard1.6/System.Security.Cryptography.X509Certificates.dll", + "runtimes/win/lib/net46/System.Security.Cryptography.X509Certificates.dll", + "runtimes/win/lib/net461/System.Security.Cryptography.X509Certificates.dll", + "runtimes/win/lib/netcore50/System.Security.Cryptography.X509Certificates.dll", + "runtimes/win/lib/netstandard1.6/System.Security.Cryptography.X509Certificates.dll" + ] + }, + "System.Text.Encoding/4.0.11": { + "sha512": "U3gGeMlDZXxCEiY4DwVLSacg+DFWCvoiX+JThA/rvw37Sqrku7sEFeVBBBMBnfB6FeZHsyDx85HlKL19x0HtZA==", + "type": "package", + "path": "System.Text.Encoding/4.0.11", + "files": [ + "System.Text.Encoding.4.0.11.nupkg.sha512", + "System.Text.Encoding.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Text.Encoding.dll", + "ref/netcore50/System.Text.Encoding.xml", + "ref/netcore50/de/System.Text.Encoding.xml", + "ref/netcore50/es/System.Text.Encoding.xml", + "ref/netcore50/fr/System.Text.Encoding.xml", + "ref/netcore50/it/System.Text.Encoding.xml", + "ref/netcore50/ja/System.Text.Encoding.xml", + "ref/netcore50/ko/System.Text.Encoding.xml", + "ref/netcore50/ru/System.Text.Encoding.xml", + "ref/netcore50/zh-hans/System.Text.Encoding.xml", + "ref/netcore50/zh-hant/System.Text.Encoding.xml", + "ref/netstandard1.0/System.Text.Encoding.dll", + "ref/netstandard1.0/System.Text.Encoding.xml", + "ref/netstandard1.0/de/System.Text.Encoding.xml", + "ref/netstandard1.0/es/System.Text.Encoding.xml", + "ref/netstandard1.0/fr/System.Text.Encoding.xml", + "ref/netstandard1.0/it/System.Text.Encoding.xml", + "ref/netstandard1.0/ja/System.Text.Encoding.xml", + "ref/netstandard1.0/ko/System.Text.Encoding.xml", + "ref/netstandard1.0/ru/System.Text.Encoding.xml", + "ref/netstandard1.0/zh-hans/System.Text.Encoding.xml", + "ref/netstandard1.0/zh-hant/System.Text.Encoding.xml", + "ref/netstandard1.3/System.Text.Encoding.dll", + "ref/netstandard1.3/System.Text.Encoding.xml", + "ref/netstandard1.3/de/System.Text.Encoding.xml", + "ref/netstandard1.3/es/System.Text.Encoding.xml", + "ref/netstandard1.3/fr/System.Text.Encoding.xml", + "ref/netstandard1.3/it/System.Text.Encoding.xml", + "ref/netstandard1.3/ja/System.Text.Encoding.xml", + "ref/netstandard1.3/ko/System.Text.Encoding.xml", + "ref/netstandard1.3/ru/System.Text.Encoding.xml", + "ref/netstandard1.3/zh-hans/System.Text.Encoding.xml", + "ref/netstandard1.3/zh-hant/System.Text.Encoding.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Text.Encoding.Extensions/4.0.11": { + "sha512": "jtbiTDtvfLYgXn8PTfWI+SiBs51rrmO4AAckx4KR6vFK9Wzf6tI8kcRdsYQNwriUeQ1+CtQbM1W4cMbLXnj/OQ==", + "type": "package", + "path": "System.Text.Encoding.Extensions/4.0.11", + "files": [ + "System.Text.Encoding.Extensions.4.0.11.nupkg.sha512", + "System.Text.Encoding.Extensions.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Text.Encoding.Extensions.dll", + "ref/netcore50/System.Text.Encoding.Extensions.xml", + "ref/netcore50/de/System.Text.Encoding.Extensions.xml", + "ref/netcore50/es/System.Text.Encoding.Extensions.xml", + "ref/netcore50/fr/System.Text.Encoding.Extensions.xml", + "ref/netcore50/it/System.Text.Encoding.Extensions.xml", + "ref/netcore50/ja/System.Text.Encoding.Extensions.xml", + "ref/netcore50/ko/System.Text.Encoding.Extensions.xml", + "ref/netcore50/ru/System.Text.Encoding.Extensions.xml", + "ref/netcore50/zh-hans/System.Text.Encoding.Extensions.xml", + "ref/netcore50/zh-hant/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/System.Text.Encoding.Extensions.dll", + "ref/netstandard1.0/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/de/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/es/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/fr/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/it/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/ja/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/ko/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/ru/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/zh-hans/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.0/zh-hant/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/System.Text.Encoding.Extensions.dll", + "ref/netstandard1.3/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/de/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/es/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/fr/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/it/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/ja/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/ko/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/ru/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/zh-hans/System.Text.Encoding.Extensions.xml", + "ref/netstandard1.3/zh-hant/System.Text.Encoding.Extensions.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Text.RegularExpressions/4.1.0": { + "sha512": "i88YCXpRTjCnoSQZtdlHkAOx4KNNik4hMy83n0+Ftlb7jvV6ZiZWMpnEZHhjBp6hQVh8gWd/iKNPzlPF7iyA2g==", + "type": "package", + "path": "System.Text.RegularExpressions/4.1.0", + "files": [ + "System.Text.RegularExpressions.4.1.0.nupkg.sha512", + "System.Text.RegularExpressions.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/net463/System.Text.RegularExpressions.dll", + "lib/netcore50/System.Text.RegularExpressions.dll", + "lib/netstandard1.6/System.Text.RegularExpressions.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/net463/System.Text.RegularExpressions.dll", + "ref/netcore50/System.Text.RegularExpressions.dll", + "ref/netcore50/System.Text.RegularExpressions.xml", + "ref/netcore50/de/System.Text.RegularExpressions.xml", + "ref/netcore50/es/System.Text.RegularExpressions.xml", + "ref/netcore50/fr/System.Text.RegularExpressions.xml", + "ref/netcore50/it/System.Text.RegularExpressions.xml", + "ref/netcore50/ja/System.Text.RegularExpressions.xml", + "ref/netcore50/ko/System.Text.RegularExpressions.xml", + "ref/netcore50/ru/System.Text.RegularExpressions.xml", + "ref/netcore50/zh-hans/System.Text.RegularExpressions.xml", + "ref/netcore50/zh-hant/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/System.Text.RegularExpressions.dll", + "ref/netstandard1.0/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/de/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/es/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/fr/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/it/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/ja/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/ko/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/ru/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/zh-hans/System.Text.RegularExpressions.xml", + "ref/netstandard1.0/zh-hant/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/System.Text.RegularExpressions.dll", + "ref/netstandard1.3/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/de/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/es/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/fr/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/it/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/ja/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/ko/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/ru/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/zh-hans/System.Text.RegularExpressions.xml", + "ref/netstandard1.3/zh-hant/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/System.Text.RegularExpressions.dll", + "ref/netstandard1.6/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/de/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/es/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/fr/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/it/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/ja/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/ko/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/ru/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/zh-hans/System.Text.RegularExpressions.xml", + "ref/netstandard1.6/zh-hant/System.Text.RegularExpressions.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Threading/4.0.11": { + "sha512": "N+3xqIcg3VDKyjwwCGaZ9HawG9aC6cSDI+s7ROma310GQo8vilFZa86hqKppwTHleR/G0sfOzhvgnUxWCR/DrQ==", + "type": "package", + "path": "System.Threading/4.0.11", + "files": [ + "System.Threading.4.0.11.nupkg.sha512", + "System.Threading.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/System.Threading.dll", + "lib/netstandard1.3/System.Threading.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Threading.dll", + "ref/netcore50/System.Threading.xml", + "ref/netcore50/de/System.Threading.xml", + "ref/netcore50/es/System.Threading.xml", + "ref/netcore50/fr/System.Threading.xml", + "ref/netcore50/it/System.Threading.xml", + "ref/netcore50/ja/System.Threading.xml", + "ref/netcore50/ko/System.Threading.xml", + "ref/netcore50/ru/System.Threading.xml", + "ref/netcore50/zh-hans/System.Threading.xml", + "ref/netcore50/zh-hant/System.Threading.xml", + "ref/netstandard1.0/System.Threading.dll", + "ref/netstandard1.0/System.Threading.xml", + "ref/netstandard1.0/de/System.Threading.xml", + "ref/netstandard1.0/es/System.Threading.xml", + "ref/netstandard1.0/fr/System.Threading.xml", + "ref/netstandard1.0/it/System.Threading.xml", + "ref/netstandard1.0/ja/System.Threading.xml", + "ref/netstandard1.0/ko/System.Threading.xml", + "ref/netstandard1.0/ru/System.Threading.xml", + "ref/netstandard1.0/zh-hans/System.Threading.xml", + "ref/netstandard1.0/zh-hant/System.Threading.xml", + "ref/netstandard1.3/System.Threading.dll", + "ref/netstandard1.3/System.Threading.xml", + "ref/netstandard1.3/de/System.Threading.xml", + "ref/netstandard1.3/es/System.Threading.xml", + "ref/netstandard1.3/fr/System.Threading.xml", + "ref/netstandard1.3/it/System.Threading.xml", + "ref/netstandard1.3/ja/System.Threading.xml", + "ref/netstandard1.3/ko/System.Threading.xml", + "ref/netstandard1.3/ru/System.Threading.xml", + "ref/netstandard1.3/zh-hans/System.Threading.xml", + "ref/netstandard1.3/zh-hant/System.Threading.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._", + "runtimes/aot/lib/netcore50/System.Threading.dll" + ] + }, + "System.Threading.Tasks/4.0.11": { + "sha512": "k1S4Gc6IGwtHGT8188RSeGaX86Qw/wnrgNLshJvsdNUOPP9etMmo8S07c+UlOAx4K/xLuN9ivA1bD0LVurtIxQ==", + "type": "package", + "path": "System.Threading.Tasks/4.0.11", + "files": [ + "System.Threading.Tasks.4.0.11.nupkg.sha512", + "System.Threading.Tasks.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Threading.Tasks.dll", + "ref/netcore50/System.Threading.Tasks.xml", + "ref/netcore50/de/System.Threading.Tasks.xml", + "ref/netcore50/es/System.Threading.Tasks.xml", + "ref/netcore50/fr/System.Threading.Tasks.xml", + "ref/netcore50/it/System.Threading.Tasks.xml", + "ref/netcore50/ja/System.Threading.Tasks.xml", + "ref/netcore50/ko/System.Threading.Tasks.xml", + "ref/netcore50/ru/System.Threading.Tasks.xml", + "ref/netcore50/zh-hans/System.Threading.Tasks.xml", + "ref/netcore50/zh-hant/System.Threading.Tasks.xml", + "ref/netstandard1.0/System.Threading.Tasks.dll", + "ref/netstandard1.0/System.Threading.Tasks.xml", + "ref/netstandard1.0/de/System.Threading.Tasks.xml", + "ref/netstandard1.0/es/System.Threading.Tasks.xml", + "ref/netstandard1.0/fr/System.Threading.Tasks.xml", + "ref/netstandard1.0/it/System.Threading.Tasks.xml", + "ref/netstandard1.0/ja/System.Threading.Tasks.xml", + "ref/netstandard1.0/ko/System.Threading.Tasks.xml", + "ref/netstandard1.0/ru/System.Threading.Tasks.xml", + "ref/netstandard1.0/zh-hans/System.Threading.Tasks.xml", + "ref/netstandard1.0/zh-hant/System.Threading.Tasks.xml", + "ref/netstandard1.3/System.Threading.Tasks.dll", + "ref/netstandard1.3/System.Threading.Tasks.xml", + "ref/netstandard1.3/de/System.Threading.Tasks.xml", + "ref/netstandard1.3/es/System.Threading.Tasks.xml", + "ref/netstandard1.3/fr/System.Threading.Tasks.xml", + "ref/netstandard1.3/it/System.Threading.Tasks.xml", + "ref/netstandard1.3/ja/System.Threading.Tasks.xml", + "ref/netstandard1.3/ko/System.Threading.Tasks.xml", + "ref/netstandard1.3/ru/System.Threading.Tasks.xml", + "ref/netstandard1.3/zh-hans/System.Threading.Tasks.xml", + "ref/netstandard1.3/zh-hant/System.Threading.Tasks.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Threading.Tasks.Extensions/4.0.0": { + "sha512": "pH4FZDsZQ/WmgJtN4LWYmRdJAEeVkyriSwrv2Teoe5FOU0Yxlb6II6GL8dBPOfRmutHGATduj3ooMt7dJ2+i+w==", + "type": "package", + "path": "System.Threading.Tasks.Extensions/4.0.0", + "files": [ + "System.Threading.Tasks.Extensions.4.0.0.nupkg.sha512", + "System.Threading.Tasks.Extensions.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/netstandard1.0/System.Threading.Tasks.Extensions.dll", + "lib/netstandard1.0/System.Threading.Tasks.Extensions.xml", + "lib/portable-net45+win8+wp8+wpa81/System.Threading.Tasks.Extensions.dll", + "lib/portable-net45+win8+wp8+wpa81/System.Threading.Tasks.Extensions.xml" + ] + }, + "System.Threading.Timer/4.0.1": { + "sha512": "saGfUV8uqVW6LeURiqxcGhZ24PzuRNaUBtbhVeuUAvky1naH395A/1nY0P2bWvrw/BreRtIB/EzTDkGBpqCwEw==", + "type": "package", + "path": "System.Threading.Timer/4.0.1", + "files": [ + "System.Threading.Timer.4.0.1.nupkg.sha512", + "System.Threading.Timer.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net451/_._", + "lib/portable-net451+win81+wpa81/_._", + "lib/win81/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net451/_._", + "ref/netcore50/System.Threading.Timer.dll", + "ref/netcore50/System.Threading.Timer.xml", + "ref/netcore50/de/System.Threading.Timer.xml", + "ref/netcore50/es/System.Threading.Timer.xml", + "ref/netcore50/fr/System.Threading.Timer.xml", + "ref/netcore50/it/System.Threading.Timer.xml", + "ref/netcore50/ja/System.Threading.Timer.xml", + "ref/netcore50/ko/System.Threading.Timer.xml", + "ref/netcore50/ru/System.Threading.Timer.xml", + "ref/netcore50/zh-hans/System.Threading.Timer.xml", + "ref/netcore50/zh-hant/System.Threading.Timer.xml", + "ref/netstandard1.2/System.Threading.Timer.dll", + "ref/netstandard1.2/System.Threading.Timer.xml", + "ref/netstandard1.2/de/System.Threading.Timer.xml", + "ref/netstandard1.2/es/System.Threading.Timer.xml", + "ref/netstandard1.2/fr/System.Threading.Timer.xml", + "ref/netstandard1.2/it/System.Threading.Timer.xml", + "ref/netstandard1.2/ja/System.Threading.Timer.xml", + "ref/netstandard1.2/ko/System.Threading.Timer.xml", + "ref/netstandard1.2/ru/System.Threading.Timer.xml", + "ref/netstandard1.2/zh-hans/System.Threading.Timer.xml", + "ref/netstandard1.2/zh-hant/System.Threading.Timer.xml", + "ref/portable-net451+win81+wpa81/_._", + "ref/win81/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Xml.ReaderWriter/4.0.11": { + "sha512": "ZIiLPsf67YZ9zgr31vzrFaYQqxRPX9cVHjtPSnmx4eN6lbS/yEyYNr2vs1doGDEscF0tjCZFsk9yUg1sC9e8tg==", + "type": "package", + "path": "System.Xml.ReaderWriter/4.0.11", + "files": [ + "System.Xml.ReaderWriter.4.0.11.nupkg.sha512", + "System.Xml.ReaderWriter.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/System.Xml.ReaderWriter.dll", + "lib/netstandard1.3/System.Xml.ReaderWriter.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Xml.ReaderWriter.dll", + "ref/netcore50/System.Xml.ReaderWriter.xml", + "ref/netcore50/de/System.Xml.ReaderWriter.xml", + "ref/netcore50/es/System.Xml.ReaderWriter.xml", + "ref/netcore50/fr/System.Xml.ReaderWriter.xml", + "ref/netcore50/it/System.Xml.ReaderWriter.xml", + "ref/netcore50/ja/System.Xml.ReaderWriter.xml", + "ref/netcore50/ko/System.Xml.ReaderWriter.xml", + "ref/netcore50/ru/System.Xml.ReaderWriter.xml", + "ref/netcore50/zh-hans/System.Xml.ReaderWriter.xml", + "ref/netcore50/zh-hant/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/System.Xml.ReaderWriter.dll", + "ref/netstandard1.0/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/de/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/es/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/fr/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/it/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/ja/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/ko/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/ru/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/zh-hans/System.Xml.ReaderWriter.xml", + "ref/netstandard1.0/zh-hant/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/System.Xml.ReaderWriter.dll", + "ref/netstandard1.3/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/de/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/es/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/fr/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/it/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/ja/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/ko/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/ru/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/zh-hans/System.Xml.ReaderWriter.xml", + "ref/netstandard1.3/zh-hant/System.Xml.ReaderWriter.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + }, + "System.Xml.XDocument/4.0.11": { + "sha512": "Mk2mKmPi0nWaoiYeotq1dgeNK1fqWh61+EK+w4Wu8SWuTYLzpUnschb59bJtGywaPq7SmTuPf44wrXRwbIrukg==", + "type": "package", + "path": "System.Xml.XDocument/4.0.11", + "files": [ + "System.Xml.XDocument.4.0.11.nupkg.sha512", + "System.Xml.XDocument.nuspec", + "ThirdPartyNotices.txt", + "dotnet_library_license.txt", + "lib/MonoAndroid10/_._", + "lib/MonoTouch10/_._", + "lib/net45/_._", + "lib/netcore50/System.Xml.XDocument.dll", + "lib/netstandard1.3/System.Xml.XDocument.dll", + "lib/portable-net45+win8+wp8+wpa81/_._", + "lib/win8/_._", + "lib/wp80/_._", + "lib/wpa81/_._", + "lib/xamarinios10/_._", + "lib/xamarinmac20/_._", + "lib/xamarintvos10/_._", + "lib/xamarinwatchos10/_._", + "ref/MonoAndroid10/_._", + "ref/MonoTouch10/_._", + "ref/net45/_._", + "ref/netcore50/System.Xml.XDocument.dll", + "ref/netcore50/System.Xml.XDocument.xml", + "ref/netcore50/de/System.Xml.XDocument.xml", + "ref/netcore50/es/System.Xml.XDocument.xml", + "ref/netcore50/fr/System.Xml.XDocument.xml", + "ref/netcore50/it/System.Xml.XDocument.xml", + "ref/netcore50/ja/System.Xml.XDocument.xml", + "ref/netcore50/ko/System.Xml.XDocument.xml", + "ref/netcore50/ru/System.Xml.XDocument.xml", + "ref/netcore50/zh-hans/System.Xml.XDocument.xml", + "ref/netcore50/zh-hant/System.Xml.XDocument.xml", + "ref/netstandard1.0/System.Xml.XDocument.dll", + "ref/netstandard1.0/System.Xml.XDocument.xml", + "ref/netstandard1.0/de/System.Xml.XDocument.xml", + "ref/netstandard1.0/es/System.Xml.XDocument.xml", + "ref/netstandard1.0/fr/System.Xml.XDocument.xml", + "ref/netstandard1.0/it/System.Xml.XDocument.xml", + "ref/netstandard1.0/ja/System.Xml.XDocument.xml", + "ref/netstandard1.0/ko/System.Xml.XDocument.xml", + "ref/netstandard1.0/ru/System.Xml.XDocument.xml", + "ref/netstandard1.0/zh-hans/System.Xml.XDocument.xml", + "ref/netstandard1.0/zh-hant/System.Xml.XDocument.xml", + "ref/netstandard1.3/System.Xml.XDocument.dll", + "ref/netstandard1.3/System.Xml.XDocument.xml", + "ref/netstandard1.3/de/System.Xml.XDocument.xml", + "ref/netstandard1.3/es/System.Xml.XDocument.xml", + "ref/netstandard1.3/fr/System.Xml.XDocument.xml", + "ref/netstandard1.3/it/System.Xml.XDocument.xml", + "ref/netstandard1.3/ja/System.Xml.XDocument.xml", + "ref/netstandard1.3/ko/System.Xml.XDocument.xml", + "ref/netstandard1.3/ru/System.Xml.XDocument.xml", + "ref/netstandard1.3/zh-hans/System.Xml.XDocument.xml", + "ref/netstandard1.3/zh-hant/System.Xml.XDocument.xml", + "ref/portable-net45+win8+wp8+wpa81/_._", + "ref/win8/_._", + "ref/wp80/_._", + "ref/wpa81/_._", + "ref/xamarinios10/_._", + "ref/xamarinmac20/_._", + "ref/xamarintvos10/_._", + "ref/xamarinwatchos10/_._" + ] + } + }, + "projectFileDependencyGroups": { + "": [ + "NETStandard.Library >= 1.6.0", + "Newtonsoft.Json >= 9.0.1" + ], + ".NETStandard,Version=v1.6": [] + }, + "tools": {}, + "projectFileToolGroups": {} +} \ No newline at end of file