/// <summary>
 /// Register a new extension. An extension is identified by the
 /// combination of its ProviderNamespace and Type (case-sensitive
 /// string). It is not allowed to register an extension with the same
 /// identity (i.e. combination of ProviderNamespace and Type) of an
 /// already-registered extension. To register new version of an
 /// existing extension, the Update Extension API should be used.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IExtensionImageOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Register Virtual Machine
 /// Extension Image operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse BeginRegistering(this IExtensionImageOperations operations, ExtensionImageRegisterParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IExtensionImageOperations)s).BeginRegisteringAsync(parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
        protected PSArgument[] CreateExtensionImageRegisterParameters()
        {
            ExtensionImageRegisterParameters parameters = new ExtensionImageRegisterParameters();

            return ConvertFromObjectsToArguments(new string[] { "Parameters" }, new object[] { parameters });
        }
 /// <summary>
 /// Register a new extension. An extension is identified by the
 /// combination of its ProviderNamespace and Type (case-sensitive
 /// string). It is not allowed to register an extension with the same
 /// identity (i.e. combination of ProviderNamespace and Type) of an
 /// already-registered extension. To register new version of an
 /// existing extension, the Update Extension API should be used.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IExtensionImageOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Register Virtual Machine
 /// Extension Image operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task<OperationResponse> BeginRegisteringAsync(this IExtensionImageOperations operations, ExtensionImageRegisterParameters parameters)
 {
     return operations.BeginRegisteringAsync(parameters, CancellationToken.None);
 }