本文整理汇总了C#中Amazon.Runtime.Internal.Transform.XmlUnmarshallerContext类的典型用法代码示例。如果您正苦于以下问题:C# XmlUnmarshallerContext类的具体用法?C# XmlUnmarshallerContext怎么用?C# XmlUnmarshallerContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XmlUnmarshallerContext类属于Amazon.Runtime.Internal.Transform命名空间,在下文中一共展示了XmlUnmarshallerContext类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:aws,项目名称:aws-sdk-net,代码行数:30,代码来源:GetIdentityMailFromDomainAttributesResponseUnmarshaller.cs
示例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;
}
开发者ID:rajdotnet,项目名称:aws-sdk-net,代码行数:30,代码来源:DetachLoadBalancerFromSubnetsResponseUnmarshaller.cs
示例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;
}
开发者ID:scopely,项目名称:aws-sdk-net,代码行数:31,代码来源:GetAccountSummaryResponseUnmarshaller.cs
示例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;
}
开发者ID:rajdotnet,项目名称:aws-sdk-net,代码行数:30,代码来源:GetBucketRequestPaymentResponseUnmarshaller.cs
示例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;
}
开发者ID:scopely,项目名称:aws-sdk-net,代码行数:30,代码来源:DescribeApplicationsResponseUnmarshaller.cs
示例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;
}
开发者ID:rajdotnet,项目名称:aws-sdk-net,代码行数:32,代码来源:DescribeDBSecurityGroupsResponseUnmarshaller.cs
示例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;
}
开发者ID:wmatveyenko,项目名称:aws-sdk-net,代码行数:25,代码来源:ModifyDBParameterGroupResponseUnmarshaller.cs
示例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;
}
开发者ID:wmatveyenko,项目名称:aws-sdk-net,代码行数:25,代码来源:ModifyDBParameterGroupResponseUnmarshaller.cs
示例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;
}
开发者ID:scopely,项目名称:aws-sdk-net,代码行数:30,代码来源:AttachLoadBalancerToSubnetsResponseUnmarshaller.cs
示例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;
}
开发者ID:aws,项目名称:aws-sdk-net,代码行数:26,代码来源:AssociateVPCWithHostedZoneResponseUnmarshaller.cs
示例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;
}
开发者ID:aws,项目名称:aws-sdk-net,代码行数:12,代码来源:AssociateVPCWithHostedZoneResponseUnmarshaller.cs
示例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;
}
开发者ID:sadiqj,项目名称:aws-sdk-xamarin,代码行数:26,代码来源:DescribeKeyPairsResponseUnmarshaller.cs
示例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;
}
开发者ID:aws,项目名称:aws-sdk-net,代码行数:26,代码来源:GetIdentityMailFromDomainAttributesResponseUnmarshaller.cs
示例16: Unmarshall
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
AuthorizeCacheSecurityGroupIngressResponse response = new AuthorizeCacheSecurityGroupIngressResponse();
while (context.Read())
{
if (context.IsStartElement)
{
if(context.TestExpression("AuthorizeCacheSecurityGroupIngressResult", 2))
{
UnmarshallResult(context,response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.GetInstance().Unmarshall(context);
}
}
}
return response;
}
开发者ID:scopely,项目名称:aws-sdk-net,代码行数:27,代码来源:AuthorizeCacheSecurityGroupIngressResponseUnmarshaller.cs
示例17: 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)
{
AttachVpnGatewayResponse response = new AttachVpnGatewayResponse();
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("attachment", targetDepth))
{
var unmarshaller = VpcAttachmentUnmarshaller.Instance;
response.VpcAttachment = unmarshaller.Unmarshall(context);
continue;
}
}
}
return response;
}
开发者ID:JonathanHenson,项目名称:aws-sdk-net,代码行数:30,代码来源:AttachVpnGatewayResponseUnmarshaller.cs
示例18: UnmarshallException
public override AmazonServiceException UnmarshallException(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
if (errorResponse.Code != null && errorResponse.Code.Equals("CacheSecurityGroupAlreadyExists"))
{
return new CacheSecurityGroupAlreadyExistsException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
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("QuotaExceeded.CacheSecurityGroup"))
{
return new CacheSecurityGroupQuotaExceededException(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);
}
return new AmazonElastiCacheException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
开发者ID:scopely,项目名称:aws-sdk-net,代码行数:26,代码来源:CreateCacheSecurityGroupResponseUnmarshaller.cs
示例19: Unmarshall
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
CreateSpotDatafeedSubscriptionResponse response = new CreateSpotDatafeedSubscriptionResponse();
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("spotDatafeedSubscription", targetDepth))
{
var unmarshaller = SpotDatafeedSubscriptionUnmarshaller.Instance;
response.SpotDatafeedSubscription = unmarshaller.Unmarshall(context);
continue;
}
}
}
return response;
}
开发者ID:wmatveyenko,项目名称:aws-sdk-net,代码行数:25,代码来源:CreateSpotDatafeedSubscriptionResponseUnmarshaller.cs
示例20: 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)
{
CreateConfigurationSetEventDestinationResponse response = new CreateConfigurationSetEventDestinationResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("CreateConfigurationSetEventDestinationResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
开发者ID:aws,项目名称:aws-sdk-net,代码行数:30,代码来源:CreateConfigurationSetEventDestinationResponseUnmarshaller.cs
注:本文中的Amazon.Runtime.Internal.Transform.XmlUnmarshallerContext类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论