/// <summary>
 /// Get the vault extended info.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.SiteRecovery.IVaultExtendedInfoOperations.
 /// </param>
 /// <param name='extendedInfoArgs'>
 /// Required. Create resource exnteded info input parameters.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse CreateExtendedInfo(this IVaultExtendedInfoOperations operations, ResourceExtendedInformationArgs extendedInfoArgs, CustomRequestHeaders customRequestHeaders)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IVaultExtendedInfoOperations)s).CreateExtendedInfoAsync(extendedInfoArgs, customRequestHeaders);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
예제 #2
0
        /// <summary>
        /// Returns the Xml representation of this object.
        /// </summary>
        /// <returns>the xml as string</returns>
        public ResourceExtendedInformationArgs Translate()
        {
            if (string.IsNullOrEmpty(this.Etag))
            {
                this.Etag = Guid.NewGuid().ToString();
            }

            string serializedInfo = Utilities.Serialize<ResourceExtendedInfo>(this);
            ResourceExtendedInformationArgs extendedInfoArgs = new ResourceExtendedInformationArgs(
                Constants.VaultExtendedInfoContractVersion,
                serializedInfo,
                this.Etag);

            return extendedInfoArgs;
        }
 /// <summary>
 /// Creates the extended information for the vault
 /// </summary>
 /// <param name="extendedInfoArgs">extended info to be created</param>
 /// <returns>Vault Extended Information</returns>
 public AzureOperationResponse CreateExtendedInfo(ResourceExtendedInformationArgs extendedInfoArgs)
 {
     return this.GetSiteRecoveryClient().VaultExtendedInfo.CreateExtendedInfo(extendedInfoArgs, this.GetRequestHeaders(false));
 }
 /// <summary>
 /// Get the vault extended info.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.SiteRecovery.IVaultExtendedInfoOperations.
 /// </param>
 /// <param name='extendedInfoArgs'>
 /// Required. Create resource exnteded info input parameters.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Optional. Request header parameters.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task<AzureOperationResponse> CreateExtendedInfoAsync(this IVaultExtendedInfoOperations operations, ResourceExtendedInformationArgs extendedInfoArgs, CustomRequestHeaders customRequestHeaders)
 {
     return operations.CreateExtendedInfoAsync(extendedInfoArgs, customRequestHeaders, CancellationToken.None);
 }