本文整理汇总了C#中Amazon.Runtime.Internal.Transform.XmlUnmarshallerContext类的典型用法代码示例。如果您正苦于以下问题:C# XmlUnmarshallerContext类的具体用法?C# XmlUnmarshallerContext怎么用?C# XmlUnmarshallerContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XmlUnmarshallerContext类属于Amazon.Runtime.Internal.Transform命名空间,在下文中一共展示了XmlUnmarshallerContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UnmarshallException
public override AmazonServiceException UnmarshallException(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
if (errorResponse.Code != null && errorResponse.Code.Equals("ListenerNotFound"))
{
return new ListenerNotFoundException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("CertificateNotFound"))
{
return new CertificateNotFoundException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("LoadBalancerNotFound"))
{
return new LoadBalancerNotFoundException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidConfigurationRequest"))
{
return new InvalidConfigurationRequestException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
return new AmazonElasticLoadBalancingException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
开发者ID:nburn42,项目名称:aws-sdk-for-net,代码行数:26,代码来源:SetLoadBalancerListenerSSLCertificateResponseUnmarshaller.cs
示例2: UnmarshallException
public override AmazonServiceException UnmarshallException(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterValue"))
{
return new InvalidParameterValueException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterCombination"))
{
return new InvalidParameterCombinationException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidCacheParameterGroupState"))
{
return new InvalidCacheParameterGroupStateException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("CacheParameterGroupNotFound"))
{
return new CacheParameterGroupNotFoundException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
return new AmazonElastiCacheException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
开发者ID:pbutlerm,项目名称:dataservices-sdk-dotnet,代码行数:26,代码来源:DeleteCacheParameterGroupResponseUnmarshaller.cs
示例3: Unmarshall
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
GetIdentityMailFromDomainAttributesResponse response = new GetIdentityMailFromDomainAttributesResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("GetIdentityMailFromDomainAttributesResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
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(XmlUnmarshallerContext context)
{
DetachLoadBalancerFromSubnetsResponse response = new DetachLoadBalancerFromSubnetsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DetachLoadBalancerFromSubnetsResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
示例5: UnmarshallResult
private static void UnmarshallResult(XmlUnmarshallerContext context,GetAccountSummaryResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("SummaryMap/entry", targetDepth))
{
KeyValueUnmarshaller<string, int, StringUnmarshaller, IntUnmarshaller> unmarshaller = new KeyValueUnmarshaller<string, int, StringUnmarshaller, IntUnmarshaller>(StringUnmarshaller.GetInstance(), IntUnmarshaller.GetInstance());
KeyValuePair<string, int> kvp = unmarshaller.Unmarshall(context);
response.SummaryMap.Add(kvp.Key, kvp.Value);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return;
}
}
return;
}
示例6: UnmarshallResult
private static void UnmarshallResult(XmlUnmarshallerContext context,GetBucketRequestPaymentResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Payer", targetDepth))
{
response.Payer = StringUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return;
}
}
return;
}
示例7: UnmarshallResult
private static void UnmarshallResult(XmlUnmarshallerContext context,DescribeApplicationsResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Applications/member", targetDepth))
{
response.Applications.Add(ApplicationDescriptionUnmarshaller.GetInstance().Unmarshall(context));
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return;
}
}
return;
}
示例8: UnmarshallResult
private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeDBSecurityGroupsResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("DBSecurityGroups/DBSecurityGroup", targetDepth))
{
var unmarshaller = DBSecurityGroupUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
response.DBSecurityGroups.Add(item);
continue;
}
if (context.TestExpression("Marker", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Marker = unmarshaller.Unmarshall(context);
continue;
}
}
}
return;
}
示例9: UnmarshallResult
private static void UnmarshallResult(XmlUnmarshallerContext context, ModifyDBParameterGroupResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("DBParameterGroupName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.DBParameterGroupName = unmarshaller.Unmarshall(context);
continue;
}
}
}
return;
}
示例10: Unmarshall
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
ModifyDBParameterGroupResponse response = new ModifyDBParameterGroupResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("ModifyDBParameterGroupResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
示例11: UnmarshallResult
private static void UnmarshallResult(XmlUnmarshallerContext context,AttachLoadBalancerToSubnetsResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Subnets/member", targetDepth))
{
response.Subnets.Add(StringUnmarshaller.GetInstance().Unmarshall(context));
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return;
}
}
return;
}
示例12: UnmarshallResult
private static void UnmarshallResult(XmlUnmarshallerContext context, AssociateVPCWithHostedZoneResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 1;
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("ChangeInfo", targetDepth))
{
var unmarshaller = ChangeInfoUnmarshaller.Instance;
response.ChangeInfo = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return;
}
}
return;
}
示例13: Unmarshall
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
AssociateVPCWithHostedZoneResponse response = new AssociateVPCWithHostedZoneResponse();
UnmarshallResult(context,response);
return response;
}
示例14: Unmarshall
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DescribeKeyPairsResponse response = new DescribeKeyPairsResponse();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth = 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("keySet/item", targetDepth))
{
var unmarshaller = KeyPairInfoUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
response.KeyPairs.Add(item);
continue;
}
}
}
return response;
}
示例15: UnmarshallResult
private static void UnmarshallResult(XmlUnmarshallerContext context, GetIdentityMailFromDomainAttributesResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("MailFromDomainAttributes/entry", targetDepth))
{
var unmarshaller = new KeyValueUnmarshaller<string, IdentityMailFromDomainAttributes, StringUnmarshaller, IdentityMailFromDomainAttributesUnmarshaller>(StringUnmarshaller.Instance, IdentityMailFromDomainAttributesUnmarshaller.Instance);
var item = unmarshaller.Unmarshall(context);
response.MailFromDomainAttributes.Add(item);
continue;
}
}
}
return;
}