public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CreateTagsResponse response = new CreateTagsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if (context.TestExpression("CreateTagsResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateTagsResponse response = new CreateTagsResponse(); return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CreateTagsResponse response = new CreateTagsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("CreateTagsResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateTagsResponse response = new CreateTagsResponse(); return response; }
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CreateTagsResponse response = new CreateTagsResponse(); while (context.Read()) { } return(response); }
private static void AddTag() { AmazonEC2Client client = new AmazonEC2Client(); CreateTagsRequest tagReq = new CreateTagsRequest(); tagReq.Resources = new System.Collections.Generic.List <string> { "instanceId" }; tagReq.Tags = new System.Collections.Generic.List <Tag> { new Tag() { Key = "tagKey", Value = "tagValue" } }; CreateTagsResponse tagResp = client.CreateTags(tagReq); Console.WriteLine("EC2 Tag created- {0}", tagResp.ResponseMetadata); }
private static void UnmarshallResult(XmlUnmarshallerContext context, CreateTagsResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return; }
private static void UnmarshallResult(XmlUnmarshallerContext context, CreateTagsResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return; }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CreateTagsResponse response = new CreateTagsResponse(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth = 2; } while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { } } return(response); }