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


C# JSONReader.StartObject方法代码示例

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


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

示例1: Deserialize

        public static void Deserialize(string _Input, out AdvertiseRequest Out)
        {
            StringReader _Reader = new StringReader (_Input);
            JSONReader JSONReader = new JSONReader (_Reader);

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

            switch (token) {

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

                default : {
                    throw new Exception ("Not supported");
                    }
                }
            JSONReader.EndObject ();

            // should we check for EOF here?
        }
开发者ID:hallambaker,项目名称:Omnibroker,代码行数:26,代码来源:Query.cs

示例2: 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 "MailProfile" : {
					var Result = new MailProfile ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


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

				default : {
					throw new Exception ("Not supported");
					}
				}	
			JSONReader.EndObject ();
            }
开发者ID:hallambaker,项目名称:Mathematical-Mesh,代码行数:39,代码来源:SchemaMail.cs

示例3: Deserialize

        public static void Deserialize(string _Input, out BindRequest Out)
        {
            StringReader _Reader = new StringReader (_Input);
            JSONReader JSONReader = new JSONReader (_Reader);

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

            switch (token) {

                case "BindRequest" : {
                    Out = null;
                    throw new Exception ("Can't create abstract type");
                    }

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

                default : {
                    throw new Exception ("Not supported");
                    }
                }
            JSONReader.EndObject ();

            // should we check for EOF here?
        }
开发者ID:hallambaker,项目名称:Omnibroker,代码行数:31,代码来源:Connection.cs

示例4: 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 "PortalEntry" : {
					Out = null;
					throw new Exception ("Can't create abstract type");
					}


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


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


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

				default : {
					throw new Exception ("Not supported");
					}
				}	
			JSONReader.EndObject ();
            }
开发者ID:hallambaker,项目名称:Mathematical-Mesh,代码行数:51,代码来源:PortalProtocol.cs

示例5: 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 "DataItem" : {
					var Result = new DataItem ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


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


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


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


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


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


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


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


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

				default : {
					throw new Exception ("Not supported");
					}
				}	
			JSONReader.EndObject ();
            }
开发者ID:hallambaker,项目名称:Mathematical-Mesh,代码行数:95,代码来源:Schema.cs

示例6: FromTagged

        /// <summary>
        /// Deserialize a tagged stream
        /// </summary>
        /// <param name="JSONReader">The input stream</param>
        /// <returns>The created object.</returns>		
        public static new MeshRequest  FromTagged (JSONReader JSONReader) {
			MeshRequest Out = null;

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

			string token = JSONReader.ReadToken ();

			switch (token) {

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

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

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

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

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

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

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

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

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

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

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

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

示例7: 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

示例8: FromTagged

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

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

			string token = JSONReader.ReadToken ();

			switch (token) {

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

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

				case "ConnectionsPending" : {
					var Result = new ConnectionsPending ();
					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,代码行数:47,代码来源:PortalProtocol.cs

示例9: FromTagged

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

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

			string token = JSONReader.ReadToken ();

			switch (token) {

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

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

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

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

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

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

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

				case "LeaveResponse" : {
					var Result = new LeaveResponse ();
					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,代码行数:82,代码来源:RecryptProtocol.cs

示例10: FromTagged

        /// <summary>
        /// Deserialize a tagged stream
        /// </summary>
        /// <param name="JSONReader">The input stream</param>
        /// <returns>The created object.</returns>		
        public static new SignedProfile  FromTagged (JSONReader JSONReader) {
			SignedProfile Out = null;

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

			string token = JSONReader.ReadToken ();

			switch (token) {

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

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

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

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

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

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

				case "SignedConnectionResult" : {
					var Result = new SignedConnectionResult ();
					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,代码行数:76,代码来源:SchemaMesh.cs

示例11: 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 "JoseWebSignature" : {
					var Result = new JoseWebSignature ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


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


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


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


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


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


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


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


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


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

				default : {
					throw new Exception ("Not supported");
					}
				}	
			JSONReader.EndObject ();
//.........这里部分代码省略.........
开发者ID:hallambaker,项目名称:Mathematical-Mesh,代码行数:101,代码来源:JoseSchema.cs

示例12: FromTagged

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

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

			string token = JSONReader.ReadToken ();

			switch (token) {

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

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

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

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

				case "PrivateKeyRSA" : {
					var Result = new PrivateKeyRSA ();
					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,代码行数:61,代码来源:JoseSchema.cs

示例13: 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 "PublicKey" : {
					var Result = new PublicKey ();
					Result.Deserialize (JSONReader);
					Out = Result;
					break;
					}


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


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


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


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


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


				case "Profile" : {
					Out = null;
					throw new Exception ("Can't create abstract type");
					}


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


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


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


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

示例14: 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

示例15: FromTagged

        /// <summary>
        /// Deserialize a tagged stream
        /// </summary>
        /// <param name="JSONReader">The input stream</param>
        /// <returns>The created object.</returns>		
        public static new HostEntry  FromTagged (JSONReader JSONReader) {
			HostEntry Out = null;

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

			string token = JSONReader.ReadToken ();

			switch (token) {

				case "HostEntry" : {
					var Result = new HostEntry ();
					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,代码行数:34,代码来源:SchemaSSH.cs


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