当前位置: 首页>>代码示例>>C#>>正文


C# Encoding.Deserialize方法代码示例

本文整理汇总了C#中Encoding.Deserialize方法的典型用法代码示例。如果您正苦于以下问题:C# Encoding.Deserialize方法的具体用法?C# Encoding.Deserialize怎么用?C# Encoding.Deserialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Encoding的用法示例。


在下文中一共展示了Encoding.Deserialize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FromTagged

        /// <summary>
        /// Deserialize a tagged stream
        /// </summary>
        /// <param name="JSONReader"></param>
        public static new Encoding  FromTagged (JSONReader JSONReader) {
			Encoding Out = null;

			JSONReader.StartObject ();
            if (JSONReader.EOR) {
                return null;
                }

			string token = JSONReader.ReadToken ();

			switch (token) {

				case "Encoding" : {
					var Result = new Encoding ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}

				default : {
					//Ignore the unknown data
                    //throw new Exception ("Not supported");
                    break;
					}
				}
			JSONReader.EndObject ();

			return Out;
			}
开发者ID:hallambaker,项目名称:Mathematical-Mesh,代码行数:33,代码来源:RecryptProtocol.cs

示例2: Deserialize

		/// <summary>
        /// Construct an instance from the specified tagged JSONReader stream.
        /// </summary>
        public static void Deserialize(JSONReader JSONReader, out JSONObject Out) {
	
			JSONReader.StartObject ();
            if (JSONReader.EOR) {
                Out = null;
                return;
                }

			string token = JSONReader.ReadToken ();
			Out = null;

			switch (token) {

				case "RecryptRequest" : {
					var Result = new RecryptRequest ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "RecryptResponse" : {
					var Result = new RecryptResponse ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "Version" : {
					var Result = new Version ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "Encoding" : {
					var Result = new Encoding ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "Resource" : {
					var Result = new Resource ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "Static" : {
					var Result = new Static ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "Dynamic" : {
					var Result = new Dynamic ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "ResourceSet" : {
					var Result = new ResourceSet ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "User" : {
					var Result = new User ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "Label" : {
					var Result = new Label ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "KeySet" : {
					var Result = new KeySet ();
					Result.Deserialize (JSONReader);
					Out = Result;
//.........这里部分代码省略.........
开发者ID:hallambaker,项目名称:Mathematical-Mesh,代码行数:101,代码来源:RecryptProtocol.cs

示例3: Deserialize

		/// <summary>
        /// Construct an instance from the specified tagged JSONReader stream.
        /// </summary>
        /// <param name="JSONReader">Input stream</param>
        /// <param name="Out">The created object</param>
        public static void Deserialize(JSONReader JSONReader, out JSONObject Out) {
	
			JSONReader.StartObject ();
            if (JSONReader.EOR) {
                Out = null;
                return;
                }

			string token = JSONReader.ReadToken ();
			Out = null;

			switch (token) {

				case "MeshRequest" : {
					var Result = new MeshRequest ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "MeshResponse" : {
					var Result = new MeshResponse ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "Version" : {
					var Result = new Version ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "Encoding" : {
					var Result = new Encoding ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "KeyValue" : {
					var Result = new KeyValue ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "SearchConstraints" : {
					var Result = new SearchConstraints ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "HelloRequest" : {
					var Result = new HelloRequest ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "HelloResponse" : {
					var Result = new HelloResponse ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "ValidateRequest" : {
					var Result = new ValidateRequest ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "ValidateResponse" : {
					var Result = new ValidateResponse ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


				case "CreateRequest" : {
					var Result = new CreateRequest ();
//.........这里部分代码省略.........
开发者ID:hallambaker,项目名称:Mathematical-Mesh,代码行数:101,代码来源:MeshProtocol.cs


注:本文中的Encoding.Deserialize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。