本文整理汇总了C#中Amazon.Runtime.Internal.Transform.JsonUnmarshallerContext.Read方法的典型用法代码示例。如果您正苦于以下问题:C# JsonUnmarshallerContext.Read方法的具体用法?C# JsonUnmarshallerContext.Read怎么用?C# JsonUnmarshallerContext.Read使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Amazon.Runtime.Internal.Transform.JsonUnmarshallerContext
的用法示例。
在下文中一共展示了JsonUnmarshallerContext.Read方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UnmarshallResult
private static void UnmarshallResult(JsonUnmarshallerContext context,GetHostnameSuggestionResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
while (context.Read())
{
if (context.TestExpression("LayerId", targetDepth))
{
context.Read();
response.LayerId = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("Hostname", targetDepth))
{
context.Read();
response.Hostname = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.CurrentDepth <= originalDepth)
{
return;
}
}
return;
}
示例2: UnmarshallResult
private static void UnmarshallResult(JsonUnmarshallerContext context,UpdateChapCredentialsResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
while (context.Read())
{
if (context.TestExpression("TargetARN", targetDepth))
{
context.Read();
response.TargetARN = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("InitiatorName", targetDepth))
{
context.Read();
response.InitiatorName = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.CurrentDepth <= originalDepth)
{
return;
}
}
return;
}
示例3: UnmarshallResult
private static void UnmarshallResult(JsonUnmarshallerContext context,ResolveCaseResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
while (context.Read())
{
if (context.TestExpression("initialCaseStatus", targetDepth))
{
context.Read();
response.InitialCaseStatus = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("finalCaseStatus", targetDepth))
{
context.Read();
response.FinalCaseStatus = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.CurrentDepth <= originalDepth)
{
return;
}
}
return;
}
示例4: UnmarshallResult
private static void UnmarshallResult(JsonUnmarshallerContext context,CreateSnapshotResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
while (context.Read())
{
if (context.TestExpression("VolumeARN", targetDepth))
{
context.Read();
response.VolumeARN = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("SnapshotId", targetDepth))
{
context.Read();
response.SnapshotId = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.CurrentDepth <= originalDepth)
{
return;
}
}
return;
}
示例5: UnmarshallResult
private static void UnmarshallResult(JsonUnmarshallerContext context,PutRecordResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
while (context.Read())
{
if (context.TestExpression("ShardId", targetDepth))
{
context.Read();
response.ShardId = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("SequenceNumber", targetDepth))
{
context.Read();
response.SequenceNumber = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.CurrentDepth <= originalDepth)
{
return;
}
}
return;
}
示例6: UnmarshallResult
private static void UnmarshallResult(JsonUnmarshallerContext context, SimpleObjectInSDKWithoutSupportForNewSubObjectsProperty response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
while (context.Read())
{
if (context.TestExpression("Property1", targetDepth))
{
context.Read();
response.Property1 = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("Property2", targetDepth))
{
context.Read();
response.Property2 = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.CurrentDepth <= originalDepth)
{
return;
}
}
return;
}
示例7: UnmarshallResult
private static void UnmarshallResult(JsonUnmarshallerContext context,CreatePresetResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
while (context.Read())
{
if (context.TestExpression("Preset", targetDepth))
{
context.Read();
response.Preset = PresetUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("Warning", targetDepth))
{
context.Read();
response.Warning = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.CurrentDepth <= originalDepth)
{
return;
}
}
return;
}
示例8: UnmarshallResult
private static void UnmarshallResult(JsonUnmarshallerContext context,UpdateItemResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
while (context.Read())
{
if (context.TestExpression("Attributes", targetDepth))
{
context.Read();
response.Attributes = new Dictionary<String,AttributeValue>();
if (context.CurrentTokenType == JsonToken.Null)
{
continue;
}
KeyValueUnmarshaller<string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller> unmarshaller = new KeyValueUnmarshaller<string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller>(StringUnmarshaller.GetInstance(), AttributeValueUnmarshaller.GetInstance());
while (context.Read())
{
JsonToken token = context.CurrentTokenType;
if (token == JsonToken.ArrayStart || token == JsonToken.ObjectStart)
{
continue;
}
if (token == JsonToken.ArrayEnd || token == JsonToken.ObjectEnd)
{
break;
}
KeyValuePair<string, AttributeValue> kvp = unmarshaller.Unmarshall(context);
response.Attributes.Add(kvp.Key, kvp.Value);
}
continue;
}
if (context.TestExpression("ConsumedCapacity", targetDepth))
{
context.Read();
response.ConsumedCapacity = ConsumedCapacityUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("ItemCollectionMetrics", targetDepth))
{
context.Read();
response.ItemCollectionMetrics = ItemCollectionMetricsUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.CurrentDepth <= originalDepth)
{
return;
}
}
return;
}
示例9: UnmarshallResult
private static void UnmarshallResult(JsonUnmarshallerContext context,DescribeVTLDevicesResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
while (context.Read())
{
if (context.TestExpression("GatewayARN", targetDepth))
{
context.Read();
response.GatewayARN = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("VTLDevices", targetDepth))
{
context.Read();
response.VTLDevices = new List<VTLDevice>();
VTLDeviceUnmarshaller unmarshaller = VTLDeviceUnmarshaller.GetInstance();
while (context.Read())
{
JsonToken token = context.CurrentTokenType;
if (token == JsonToken.ArrayStart)
{
continue;
}
if (token == JsonToken.ArrayEnd)
{
break;
}
response.VTLDevices.Add(unmarshaller.Unmarshall(context));
}
continue;
}
if (context.TestExpression("Marker", targetDepth))
{
context.Read();
response.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.CurrentDepth <= originalDepth)
{
return;
}
}
return;
}
示例10: UnmarshallResult
private static void UnmarshallResult(JsonUnmarshallerContext context,DescribeObjectsResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
while (context.Read())
{
if (context.TestExpression("pipelineObjects", targetDepth))
{
context.Read();
response.PipelineObjects = new List<PipelineObject>();
PipelineObjectUnmarshaller unmarshaller = PipelineObjectUnmarshaller.GetInstance();
while (context.Read())
{
JsonToken token = context.CurrentTokenType;
if (token == JsonToken.ArrayStart)
{
continue;
}
if (token == JsonToken.ArrayEnd)
{
break;
}
response.PipelineObjects.Add(unmarshaller.Unmarshall(context));
}
continue;
}
if (context.TestExpression("marker", targetDepth))
{
context.Read();
response.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("hasMoreResults", targetDepth))
{
context.Read();
response.HasMoreResults = BoolUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.CurrentDepth <= originalDepth)
{
return;
}
}
return;
}
示例11: UnmarshallResult
private static void UnmarshallResult(JsonUnmarshallerContext context,ListClustersResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
while (context.Read())
{
if (context.TestExpression("Clusters", targetDepth))
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
{
response.Clusters = null;
continue;
}
response.Clusters = new List<ClusterSummary>();
ClusterSummaryUnmarshaller unmarshaller = ClusterSummaryUnmarshaller.GetInstance();
while (context.Read())
{
JsonToken token = context.CurrentTokenType;
if (token == JsonToken.ArrayStart)
{
continue;
}
if (token == JsonToken.ArrayEnd)
{
break;
}
response.Clusters.Add(unmarshaller.Unmarshall(context));
}
continue;
}
if (context.TestExpression("Marker", targetDepth))
{
context.Read();
response.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.CurrentDepth <= originalDepth)
{
return;
}
}
return;
}
示例12: UnmarshallResult
private static void UnmarshallResult(JsonUnmarshallerContext context,DescribeCasesResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
while (context.Read())
{
if (context.TestExpression("cases", targetDepth))
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
{
response.Cases = null;
continue;
}
response.Cases = new List<CaseDetails>();
CaseDetailsUnmarshaller unmarshaller = CaseDetailsUnmarshaller.GetInstance();
while (context.Read())
{
JsonToken token = context.CurrentTokenType;
if (token == JsonToken.ArrayStart)
{
continue;
}
if (token == JsonToken.ArrayEnd)
{
break;
}
response.Cases.Add(unmarshaller.Unmarshall(context));
}
continue;
}
if (context.TestExpression("nextToken", targetDepth))
{
context.Read();
response.NextToken = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.CurrentDepth <= originalDepth)
{
return;
}
}
return;
}
示例13: UnmarshallResult
private static void UnmarshallResult(JsonUnmarshallerContext context,AddInstanceGroupsResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
while (context.Read())
{
if (context.TestExpression("JobFlowId", targetDepth))
{
context.Read();
response.JobFlowId = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("InstanceGroupIds", targetDepth))
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
{
response.InstanceGroupIds = null;
continue;
}
response.InstanceGroupIds = new List<String>();
StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance();
while (context.Read())
{
JsonToken token = context.CurrentTokenType;
if (token == JsonToken.ArrayStart)
{
continue;
}
if (token == JsonToken.ArrayEnd)
{
break;
}
response.InstanceGroupIds.Add(unmarshaller.Unmarshall(context));
}
continue;
}
if (context.CurrentDepth <= originalDepth)
{
return;
}
}
return;
}
示例14: UnmarshallResult
private static void UnmarshallResult(JsonUnmarshallerContext context,ListPresetsResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
while (context.Read())
{
if (context.TestExpression("Presets", targetDepth))
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
{
response.Presets = null;
continue;
}
response.Presets = new List<Preset>();
PresetUnmarshaller unmarshaller = PresetUnmarshaller.GetInstance();
while (context.Read())
{
JsonToken token = context.CurrentTokenType;
if (token == JsonToken.ArrayStart)
{
continue;
}
if (token == JsonToken.ArrayEnd)
{
break;
}
response.Presets.Add(unmarshaller.Unmarshall(context));
}
continue;
}
if (context.TestExpression("NextPageToken", targetDepth))
{
context.Read();
response.NextPageToken = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.CurrentDepth <= originalDepth)
{
return;
}
}
return;
}
示例15: UnmarshallResult
private static void UnmarshallResult(JsonUnmarshallerContext context,ListVaultsResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
while (context.Read())
{
if (context.TestExpression("VaultList", targetDepth))
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
{
response.VaultList = null;
continue;
}
response.VaultList = new List<DescribeVaultOutput>();
DescribeVaultOutputUnmarshaller unmarshaller = DescribeVaultOutputUnmarshaller.GetInstance();
while (context.Read())
{
JsonToken token = context.CurrentTokenType;
if (token == JsonToken.ArrayStart)
{
continue;
}
if (token == JsonToken.ArrayEnd)
{
break;
}
response.VaultList.Add(unmarshaller.Unmarshall(context));
}
continue;
}
if (context.TestExpression("Marker", targetDepth))
{
context.Read();
response.Marker = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.CurrentDepth <= originalDepth)
{
return;
}
}
return;
}