本文整理汇总了C#中DictionaryUnmarshaller类的典型用法代码示例。如果您正苦于以下问题:C# DictionaryUnmarshaller类的具体用法?C# DictionaryUnmarshaller怎么用?C# DictionaryUnmarshaller使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DictionaryUnmarshaller类属于命名空间,在下文中一共展示了DictionaryUnmarshaller类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Unmarshall
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetOfferingStatusResponse response = new GetOfferingStatusResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("current", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, OfferingStatus, StringUnmarshaller, OfferingStatusUnmarshaller>(StringUnmarshaller.Instance, OfferingStatusUnmarshaller.Instance);
response.Current = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("nextPeriod", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, OfferingStatus, StringUnmarshaller, OfferingStatusUnmarshaller>(StringUnmarshaller.Instance, OfferingStatusUnmarshaller.Instance);
response.NextPeriod = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("nextToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NextToken = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
示例2: Unmarshall
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
UpdateMethodResponseResponse response = new UpdateMethodResponseResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("responseModels", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
response.ResponseModels = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("responseParameters", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, bool, StringUnmarshaller, BoolUnmarshaller>(StringUnmarshaller.Instance, BoolUnmarshaller.Instance);
response.ResponseParameters = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("statusCode", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.StatusCode = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
示例3: Unmarshall
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
BatchWriteItemResponse response = new BatchWriteItemResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ConsumedCapacity", targetDepth))
{
var unmarshaller = new ListUnmarshaller<ConsumedCapacity, ConsumedCapacityUnmarshaller>(ConsumedCapacityUnmarshaller.Instance);
response.ConsumedCapacity = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ItemCollectionMetrics", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, List<ItemCollectionMetrics>, StringUnmarshaller, ListUnmarshaller<ItemCollectionMetrics, ItemCollectionMetricsUnmarshaller>>(StringUnmarshaller.Instance, new ListUnmarshaller<ItemCollectionMetrics, ItemCollectionMetricsUnmarshaller>(ItemCollectionMetricsUnmarshaller.Instance));
response.ItemCollectionMetrics = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UnprocessedItems", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, List<WriteRequest>, StringUnmarshaller, ListUnmarshaller<WriteRequest, WriteRequestUnmarshaller>>(StringUnmarshaller.Instance, new ListUnmarshaller<WriteRequest, WriteRequestUnmarshaller>(WriteRequestUnmarshaller.Instance));
response.UnprocessedItems = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
示例4: Unmarshall
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
BatchGetItemResponse response = new BatchGetItemResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ConsumedCapacity", targetDepth))
{
var unmarshaller = new ListUnmarshaller<ConsumedCapacity, ConsumedCapacityUnmarshaller>(ConsumedCapacityUnmarshaller.Instance);
response.ConsumedCapacity = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Responses", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, List<Dictionary<string, AttributeValue>>, StringUnmarshaller, ListUnmarshaller<Dictionary<string, AttributeValue>, DictionaryUnmarshaller<string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller>>>(StringUnmarshaller.Instance, new ListUnmarshaller<Dictionary<string, AttributeValue>, DictionaryUnmarshaller<string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller>>(new DictionaryUnmarshaller<string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller>(StringUnmarshaller.Instance, AttributeValueUnmarshaller.Instance)));
response.Responses = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("UnprocessedKeys", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, KeysAndAttributes, StringUnmarshaller, KeysAndAttributesUnmarshaller>(StringUnmarshaller.Instance, KeysAndAttributesUnmarshaller.Instance);
response.UnprocessedKeys = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
示例5: Unmarshall
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
DescribeThingResponse response = new DescribeThingResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("attributes", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
response.Attributes = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("defaultClientId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.DefaultClientId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("thingName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ThingName = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
示例6: Unmarshall
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
UpdateItemResponse response = new UpdateItemResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Attributes", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller>(StringUnmarshaller.Instance, AttributeValueUnmarshaller.Instance);
response.Attributes = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ConsumedCapacity", targetDepth))
{
var unmarshaller = ConsumedCapacityUnmarshaller.Instance;
response.ConsumedCapacity = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ItemCollectionMetrics", targetDepth))
{
var unmarshaller = ItemCollectionMetricsUnmarshaller.Instance;
response.ItemCollectionMetrics = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
示例7: Unmarshall
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
CreateProvisioningArtifactResponse response = new CreateProvisioningArtifactResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Info", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
response.Info = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ProvisioningArtifactDetail", targetDepth))
{
var unmarshaller = ProvisioningArtifactDetailUnmarshaller.Instance;
response.ProvisioningArtifactDetail = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
示例8: Unmarshall
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
UpdateMethodResponse response = new UpdateMethodResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("apiKeyRequired", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
response.ApiKeyRequired = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("authorizationType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AuthorizationType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("authorizerId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AuthorizerId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("httpMethod", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.HttpMethod = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("methodIntegration", targetDepth))
{
var unmarshaller = IntegrationUnmarshaller.Instance;
response.MethodIntegration = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("methodResponses", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, MethodResponse, StringUnmarshaller, MethodResponseUnmarshaller>(StringUnmarshaller.Instance, MethodResponseUnmarshaller.Instance);
response.MethodResponses = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("requestModels", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
response.RequestModels = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("requestParameters", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, bool, StringUnmarshaller, BoolUnmarshaller>(StringUnmarshaller.Instance, BoolUnmarshaller.Instance);
response.RequestParameters = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
示例9: Unmarshall
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
SearchResponse response = new SearchResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("facets", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, BucketInfo, StringUnmarshaller, BucketInfoUnmarshaller>(StringUnmarshaller.Instance, BucketInfoUnmarshaller.Instance);
response.Facets = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("hits", targetDepth))
{
var unmarshaller = HitsUnmarshaller.Instance;
response.Hits = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = SearchStatusUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
示例10: Unmarshall
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
SearchProductsResponse response = new SearchProductsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("NextPageToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NextPageToken = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ProductViewAggregations", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, List<ProductViewAggregationValue>, StringUnmarshaller, ListUnmarshaller<ProductViewAggregationValue, ProductViewAggregationValueUnmarshaller>>(StringUnmarshaller.Instance, new ListUnmarshaller<ProductViewAggregationValue, ProductViewAggregationValueUnmarshaller>(ProductViewAggregationValueUnmarshaller.Instance));
response.ProductViewAggregations = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ProductViewSummaries", targetDepth))
{
var unmarshaller = new ListUnmarshaller<ProductViewSummary, ProductViewSummaryUnmarshaller>(ProductViewSummaryUnmarshaller.Instance);
response.ProductViewSummaries = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
示例11: Unmarshall
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetIdentityPoolRolesResponse response = new GetIdentityPoolRolesResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("IdentityPoolId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.IdentityPoolId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("RoleMappings", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, RoleMapping, StringUnmarshaller, RoleMappingUnmarshaller>(StringUnmarshaller.Instance, RoleMappingUnmarshaller.Instance);
response.RoleMappings = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Roles", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
response.Roles = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
示例12: Unmarshall
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetItemResponse response = new GetItemResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Item", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<String,AttributeValue,StringUnmarshaller,AttributeValueUnmarshaller>(
StringUnmarshaller.GetInstance(),AttributeValueUnmarshaller.GetInstance());
response.Item = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ConsumedCapacity", targetDepth))
{
response.ConsumedCapacity = ConsumedCapacityUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
}
return response;
}
示例13: Unmarshall
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
TestInvokeAuthorizerResponse response = new TestInvokeAuthorizerResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("authorization", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, List<string>, StringUnmarshaller, ListUnmarshaller<string, StringUnmarshaller>>(StringUnmarshaller.Instance, new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance));
response.Authorization = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("claims", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
response.Claims = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("clientStatus", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
response.ClientStatus = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("latency", targetDepth))
{
var unmarshaller = LongUnmarshaller.Instance;
response.Latency = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("log", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Log = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("policy", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Policy = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("principalId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.PrincipalId = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
示例14: Unmarshall
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
QueryResponse response = new QueryResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("Items", targetDepth))
{
var unmarshaller = new ListUnmarshaller<Dictionary<string,AttributeValue>,DictionaryUnmarshaller<string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller>>(
new DictionaryUnmarshaller<string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller>(StringUnmarshaller.GetInstance(),AttributeValueUnmarshaller.GetInstance()));
response.Items = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Count", targetDepth))
{
response.Count = IntUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("ScannedCount", targetDepth))
{
response.ScannedCount = IntUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("LastEvaluatedKey", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<String,AttributeValue,StringUnmarshaller,AttributeValueUnmarshaller>(
StringUnmarshaller.GetInstance(),AttributeValueUnmarshaller.GetInstance());
response.LastEvaluatedKey = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ConsumedCapacity", targetDepth))
{
response.ConsumedCapacity = ConsumedCapacityUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
}
return response;
}
示例15: Unmarshall
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
CreateIdentityPoolResponse response = new CreateIdentityPoolResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("AllowUnauthenticatedIdentities", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
response.AllowUnauthenticatedIdentities = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("DeveloperProviderName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.DeveloperProviderName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("IdentityPoolId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.IdentityPoolId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("IdentityPoolName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.IdentityPoolName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("OpenIdConnectProviderARNs", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
response.OpenIdConnectProviderARNs = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SupportedLoginProviders", targetDepth))
{
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
response.SupportedLoginProviders = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}