コード例 #1
0
 public BlockingTask UpdateProgress(string updateMessage)
 {
     try
     {
         BlockingTaskUpdateProgressParamsType progressParamsType = new BlockingTaskUpdateProgressParamsType();
         progressParamsType.Message = updateMessage;
         return(new BlockingTask(this.VcloudClient, SdkUtil.Post <BlockingTaskType>(this.VcloudClient, this.Reference.href + "/action/updateProgress", SerializationUtil.SerializeObject <BlockingTaskUpdateProgressParamsType>(progressParamsType, "com.vmware.vcloud.api.rest.schema"), "application/vnd.vmware.admin.blockingTaskUpdateProgressOperationParams+xml", 200)));
     }
     catch (Exception ex)
     {
         throw new VCloudException(ex.Message);
     }
 }
コード例 #2
0
 public static BlockingTask UpdateProgress(
     vCloudClient client,
     ReferenceType blockingTaskRef,
     string updateMessage)
 {
     try
     {
         BlockingTaskUpdateProgressParamsType progressParamsType = new BlockingTaskUpdateProgressParamsType();
         progressParamsType.Message = updateMessage;
         string requestString = SerializationUtil.SerializeObject <BlockingTaskOperationParamsType>((BlockingTaskOperationParamsType)progressParamsType, "com.vmware.vcloud.api.rest.schema");
         return(new BlockingTask(client, SdkUtil.Post <BlockingTaskType>(client, blockingTaskRef.href + "/action/updateProgress", requestString, "application/vnd.vmware.admin.blockingTaskUpdateProgressOperationParams+xml", 200)));
     }
     catch (Exception ex)
     {
         throw new VCloudException(ex.Message);
     }
 }