public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { AssociateAddressResponse response = new AssociateAddressResponse(); 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("associationId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AssociationId = unmarshaller.Unmarshall(context); continue; } } } return response; }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { AssociateAddressResponse response = new AssociateAddressResponse(); int targetDepth = 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("associationId", targetDepth)) { response.AssociationId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } } return response; }
internal void Associate(ZAwsEc2 ec2) { Amazon.EC2.Model.AssociateAddressResponse resp = myController.ec2.AssociateAddress(new AssociateAddressRequest() .WithPublicIp(this.Name) .WithInstanceId(ec2.InstanceId)); }