示例#1
0
文件: ZAwsEc2.cs 项目: kueiwa/ZAws
 public void SetName(string p)
 {
     /*
      * Amazon.EC2.Model.DeleteTagsResponse response = myController.ec2.DeleteTags(new Amazon.EC2.Model.DeleteTagsRequest()
      *                                 .WithResourceId(this.InstanceId)
      *                                 .WithTag(new Amazon.EC2.Model.DeleteTags().WithKey("Name")));
      */
     Amazon.EC2.Model.CreateTagsResponse response2 = myController.ec2.CreateTags(new Amazon.EC2.Model.CreateTagsRequest()
                                                                                 .WithResourceId(this.InstanceId)
                                                                                 .WithTag(new Amazon.EC2.Model.Tag().WithKey("Name").WithValue(p)));
 }
        public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) 
        {
            CreateTagsResponse response = new CreateTagsResponse();
            
            while (context.Read())
            {
                
            }
                

            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();

            int originalDepth = context.CurrentDepth;
            int targetDepth = originalDepth + 1;
            if (context.IsStartOfDocument) 
               targetDepth = 2;

            while (context.ReadAtDepth(originalDepth))
            {
                if (context.IsStartElement || context.IsAttribute)
                {

                } 
            }

            return response;
        }