/// <summary>
 /// Returns a new <see cref="ILocator"/> instance.
 /// </summary>
 /// <param name="locators">The <see cref="LocatorBaseCollection"/> instance.</param>
 /// <param name="locatorType">The <see cref="LocatorType"/>.</param>
 /// <param name="asset">The <see cref="IAsset"/> instance for the new <see cref="ILocator"/>.</param>
 /// <param name="permissions">The <see cref="AccessPermissions"/> of the <see cref="IAccessPolicy"/> associated with the new <see cref="ILocator"/>.</param>
 /// <param name="duration">The duration of the <see cref="IAccessPolicy"/> associated with the new <see cref="ILocator"/>.</param>
 /// <param name="startTime">The start time of the new <see cref="ILocator"/>.</param>
 /// <returns>A a new <see cref="ILocator"/> instance.</returns>
 public static ILocator Create(this LocatorBaseCollection locators, LocatorType locatorType, IAsset asset, AccessPermissions permissions, TimeSpan duration, DateTime? startTime)
 {
     using (Task<ILocator> task = locators.CreateAsync(locatorType, asset, permissions, duration, startTime))
     {
         return task.Result;
     }
 }
        public static async Task<ApplicationUser> CreateUserFromIdentityAsync(this ApplicationUserManager manager, ExternalLoginInfo externalLogin)
        {
            var user = new ApplicationUser
            {
                UserName = externalLogin.DefaultUserName,
                Email = externalLogin.Email
            };

            foreach(var claim in externalLogin.ExternalIdentity.Claims.Where(c=>c.Type.StartsWith("urn:github:")))
                user.Claims.Add(new IdentityUserClaim() {ClaimType = claim.Type, ClaimValue = claim.Value, UserId = user.Id});

            var result = await manager.CreateAsync(user);
            return result.Succeeded ? user : null;
        }
Example #3
0
        /// <summary>
        /// Create a fresh test app with the given name, delete the existing
        /// test app and reboot Splunk.
        /// </summary>
        /// <param name="name">The app name</param>
        public static async Task<Application> RecreateAsync(this ApplicationCollection applications, string name)
        {
            var app = await applications.GetOrNullAsync(name);

            if (app != null)
            {
                await app.RemoveAsync();
            }

            await applications.CreateAsync(name, "sample_app");
            app = await applications.GetOrNullAsync(name);
            Assert.NotNull(app);

            return app;
        }
        /// <summary>
        /// Creates a WebHook subscription for Trello to send WebHooks when changes happen to a given Trello <paramref name="modelId"/>.
        /// </summary>
        /// <param name="client">The <see cref="TrelloWebHookClient"/> implementation.</param>
        /// <param name="urlHelper">A <see cref="UrlHelper"/> used to compute the URI where WebHooks for the given <paramref name="modelId"/> will be received.</param>
        /// <param name="modelId">The ID of a model to watch. This can be the ID of a member, card, board, or anything that actions apply to. Any event involving this model will trigger the WebHook. An example model ID is <c>4d5ea62fd76aa1136000000c</c>.</param>
        /// <param name="description">A description of the WebHook, for example <c>My Trello WebHook!</c>.</param>
        public static Task<string> CreateAsync(this TrelloWebHookClient client, UrlHelper urlHelper, string modelId, string description)
        {
            if (client == null)
            {
                throw new ArgumentNullException("client");
            }
            if (urlHelper == null)
            {
                throw new ArgumentNullException("urlHelper");
            }

            Dictionary<string, object> parameters = new Dictionary<string, object> { { "webHookReceiver", TrelloWebHookReceiver.ReceiverName } };
            string receiver = urlHelper.Link(WebHookReceiverRouteNames.ReceiversAction, parameters);
            Uri receiverAddress = new Uri(receiver);
            return client.CreateAsync(receiverAddress, modelId, description);
        }
        /// <summary>
        /// Returns a <see cref="System.Threading.Tasks.Task&lt;IAsset&gt;"/> instance for a new empty <see cref="IAsset"/> asset within one selected storage account from <paramref name="storageAccountNames"/> based on the default <see cref="IAccountSelectionStrategy"/>.
        /// </summary>
        /// <param name="assets">The <see cref="AssetBaseCollection"/> instance.</param>
        /// <param name="assetName">The asset name.</param>
        /// <param name="strategy">The <see cref="IAccountSelectionStrategy"/> used to select a storage account for the new asset.</param>
        /// <param name="options">The <see cref="AssetCreationOptions"/>.</param>
        /// <param name="token">The <see cref="System.Threading.CancellationToken"/> instance used for cancellation.</param>
        /// <returns>A <see cref="System.Threading.Tasks.Task&lt;IAsset&gt;"/> instance for a new empty <see cref="IAsset"/> within one selected storage account from the given <see cref="IAccountSelectionStrategy"/>.</returns>
        public static Task<IAsset> CreateAsync(this AssetBaseCollection assets, string assetName, IAccountSelectionStrategy strategy, AssetCreationOptions options, CancellationToken token)
        {
            if (assets == null)
            {
                throw new ArgumentNullException("assets");
            }

            if (strategy == null)
            {
                throw new ArgumentNullException("strategy");
            }

            string storageAccountName = strategy.SelectAccountForAsset();

            return assets.CreateAsync(assetName, storageAccountName, options, token);
        }
 /// <summary>
 /// Creates a new queue. Once created, this queue’s resource manifest
 /// is immutable. This operation is idempotent. Repeating the create
 /// call, after a queue with same name has been created successfully,
 /// will result in a 409 Conflict error message.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj856295.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ServiceBus.IQueueOperations.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='queue'>
 /// The service bus queue.
 /// </param>
 /// <returns>
 /// A response to a request for a particular queue.
 /// </returns>
 public static ServiceBusQueueResponse Create(this IQueueOperations operations, string namespaceName, ServiceBusQueueCreateParameters queue)
 {
     try
     {
         return operations.CreateAsync(namespaceName, queue).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// The Create Database operation creates a database in a SQL Server
 /// database server.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Sql.IDatabaseOperations.
 /// </param>
 /// <param name='serverName'>
 /// The name of the SQL Server where the database will be created
 /// </param>
 /// <param name='parameters'>
 /// The parameters for the create database operation
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static DatabaseCreateResponse Create(this IDatabaseOperations operations, string serverName, DatabaseCreateParameters parameters)
 {
     try
     {
         return operations.CreateAsync(serverName, parameters).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// The Create Affinity Group operation creates a new affinity group
 /// for the specified subscription.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715317.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IAffinityGroupOperations.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Affinity Group operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse Create(this IAffinityGroupOperations operations, AffinityGroupCreateParameters parameters)
 {
     try
     {
         return operations.CreateAsync(parameters).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// The Add Management Certificate operation adds a certificate to the
 /// list of management certificates. Management certificates, which
 /// are also known as subscription certificates, authenticate clients
 /// attempting to connect to resources associated with your Windows
 /// Azure subscription.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154123.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.IManagementCertificateOperations.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Management Certificate operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse Create(this IManagementCertificateOperations operations, ManagementCertificateCreateParameters parameters)
 {
     try
     {
         return operations.CreateAsync(parameters).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// Creates a new topic. Once created, this topic resource manifest is
 /// immutable. This operation is not idempotent. Repeating the create
 /// call, after a topic with same name has been created successfully,
 /// will result in a 409 Conflict error message.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/hh780728.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ServiceBus.ITopicOperations.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='topic'>
 /// The Service Bus topic.
 /// </param>
 /// <returns>
 /// A response to a request for a particular topic.
 /// </returns>
 public static ServiceBusTopicResponse Create(this ITopicOperations operations, string namespaceName, ServiceBusTopic topic)
 {
     try
     {
         return operations.CreateAsync(namespaceName, topic).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// The Create Media Services Account operation creates a new media
 /// services account in Windows Azure.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn194267.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.MediaServices.IAccountOperations.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Media Services Account operation.
 /// </param>
 /// <returns>
 /// The Create Media Services Account operation response.
 /// </returns>
 public static MediaServicesAccountCreateResponse Create(this IAccountOperations operations, MediaServicesAccountCreateParameters parameters)
 {
     try
     {
         return operations.CreateAsync(parameters).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// The Add OS Image operation adds an operating system image that is
 /// stored in a storage account and is available from the image
 /// repository.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj157192.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineImageOperations.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Virtual Machine Image operation.
 /// </param>
 /// <returns>
 /// Parameters returned from the Create Virtual Machine Image operation.
 /// </returns>
 public static VirtualMachineImageCreateResponse Create(this IVirtualMachineImageOperations operations, VirtualMachineImageCreateParameters parameters)
 {
     try
     {
         return operations.CreateAsync(parameters).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// The Upload Client Root Certificate operation is used to upload a
 /// new client root certificate to Windows Azure.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn205129.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IClientRootCertificateOperations.
 /// </param>
 /// <param name='virtualNetworkName'>
 /// The name of the virtual network for this gateway.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Upload client certificate Virtual
 /// Network Gateway operation.
 /// </param>
 /// <returns>
 /// A standard storage response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static GatewayOperationResponse Create(this IClientRootCertificateOperations operations, string virtualNetworkName, ClientRootCertificateCreateParameters parameters)
 {
     try
     {
         return operations.CreateAsync(virtualNetworkName, parameters).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// You can create a server farm by issuing an HTTP POST request. Only
 /// one server farm per webspace is permitted. You can retrieve server
 /// farm details by using HTTP GET, change server farm properties by
 /// using HTTP PUT, and delete a server farm by using HTTP DELETE. A
 /// request body is required for server farm creation (HTTP POST) and
 /// server farm update (HTTP PUT).  Warning: Creating a server farm
 /// changes your webspace’s Compute Mode from Shared to Dedicated. You
 /// will be charged from the moment the server farm is created, even
 /// if all your sites are still running in Free mode.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn194277.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.WebSites.IServerFarmOperations.
 /// </param>
 /// <param name='webSpaceName'>
 /// The name of the web space.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Server Farm operation.
 /// </param>
 /// <returns>
 /// The Create Server Farm operation response.
 /// </returns>
 public static ServerFarmCreateResponse Create(this IServerFarmOperations operations, string webSpaceName, ServerFarmCreateParameters parameters)
 {
     try
     {
         return operations.CreateAsync(webSpaceName, parameters).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// The Create Storage Account operation creates a new storage account
 /// in Windows Azure.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/hh264518.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Storage.IStorageAccountOperations.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Storage Account operation.
 /// </param>
 /// <returns>
 /// The response body contains the status of the specified asynchronous
 /// operation, indicating whether it has succeeded, is inprogress, or
 /// has failed. Note that this status is distinct from the HTTP status
 /// code returned for the Get Operation Status operation itself.  If
 /// the asynchronous operation succeeded, the response body includes
 /// the HTTP status code for the successful request.  If the
 /// asynchronous operation failed, the response body includes the HTTP
 /// status code for the failed request, and also includes error
 /// information regarding the failure.
 /// </returns>
 public static StorageOperationStatusResponse Create(this IStorageAccountOperations operations, StorageAccountCreateParameters parameters)
 {
     try
     {
         return operations.CreateAsync(parameters).Result;
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// Create a new application.  (see
 /// http://msdn.microsoft.com/en-us/library/azure/hh974476.aspx for
 /// more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.Azure.Graph.RBAC.IApplicationOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters to create an application.
 /// </param>
 /// <returns>
 /// Server response for Get application information API call
 /// </returns>
 public static Task<ApplicationGetResult> CreateAsync(this IApplicationOperations operations, ApplicationCreateParameters parameters)
 {
     return operations.CreateAsync(parameters, CancellationToken.None);
 }
 /// <summary>
 /// Adds a new server-level Firewall Rule for an Azure SQL Database
 /// Server.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Sql.IFirewallRuleOperations.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Database Server to which this
 /// rule will be applied.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters for the Create Firewall Rule operation.
 /// </param>
 /// <returns>
 /// Contains the response to a Create Firewall Rule operation.
 /// </returns>
 public static Task<FirewallRuleCreateResponse> CreateAsync(this IFirewallRuleOperations operations, string serverName, FirewallRuleCreateParameters parameters)
 {
     return operations.CreateAsync(serverName, parameters, CancellationToken.None);
 }
 /// <summary>
 /// You can create a server farm by issuing an HTTP POST request. Only
 /// one server farm per webspace is permitted. You can retrieve server
 /// farm details by using HTTP GET, change server farm properties by
 /// using HTTP PUT, and delete a server farm by using HTTP DELETE. A
 /// request body is required for server farm creation (HTTP POST) and
 /// server farm update (HTTP PUT).  Warning: Creating a server farm
 /// changes your webspace’s Compute Mode from Shared to Dedicated. You
 /// will be charged from the moment the server farm is created, even
 /// if all your sites are still running in Free mode.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn194277.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.WebSites.IServerFarmOperations.
 /// </param>
 /// <param name='webSpaceName'>
 /// The name of the web space.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Create Server Farm operation.
 /// </param>
 /// <returns>
 /// The Create Server Farm operation response.
 /// </returns>
 public static Task<ServerFarmCreateResponse> CreateAsync(this IServerFarmOperations operations, string webSpaceName, ServerFarmCreateParameters parameters)
 {
     return operations.CreateAsync(webSpaceName, parameters, CancellationToken.None);
 }
 /// <summary>
 /// The Create Virtual Device
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.StorSimple.IVirtualDeviceOperations.
 /// </param>
 /// <param name='virtualDeviceProvisioningInfo'>
 /// Required. The Virtual device provisioning info.
 /// </param>
 /// <param name='customRequestHeaders'>
 /// Required. The Custom Request Headers which client must use.
 /// </param>
 /// <returns>
 /// This is the Job Response for all Device Job Related Calls
 /// </returns>
 public static Task<JobResponse> CreateAsync(this IVirtualDeviceOperations operations, VirtualDeviceProvisioningInfo virtualDeviceProvisioningInfo, CustomRequestHeaders customRequestHeaders)
 {
     return operations.CreateAsync(virtualDeviceProvisioningInfo, customRequestHeaders, CancellationToken.None);
 }
 /// <summary>
 /// Creates a database in an Azure SQL Database Server.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Sql.IDatabaseOperations.
 /// </param>
 /// <param name='serverName'>
 /// Required. The name of the Azure SQL Database Server where the
 /// database will be created.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters for the create database operation.
 /// </param>
 /// <returns>
 /// Represents the response to a create database request from the
 /// service.
 /// </returns>
 public static Task<DatabaseCreateResponse> CreateAsync(this IDatabaseOperations operations, string serverName, DatabaseCreateParameters parameters)
 {
     return operations.CreateAsync(serverName, parameters, CancellationToken.None);
 }
 /// <summary>
 /// You can create a web site by using a POST request that includes the
 /// name of the web site and other information in the request body.
 /// (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn166986.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.WebSites.IWebSiteOperations.
 /// </param>
 /// <param name='webSpaceName'>
 /// Required. The name of the web space.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Create Web Site operation.
 /// </param>
 /// <returns>
 /// The Create Web Site operation response.
 /// </returns>
 public static Task<WebSiteCreateResponse> CreateAsync(this IWebSiteOperations operations, string webSpaceName, WebSiteCreateParameters parameters)
 {
     return operations.CreateAsync(webSpaceName, parameters, CancellationToken.None);
 }
 /// <summary>
 /// Creates a new topic. Once created, this topic resource manifest is
 /// immutable. This operation is not idempotent. Repeating the create
 /// call, after a topic with same name has been created successfully,
 /// will result in a 409 Conflict error message.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/hh780728.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ServiceBus.ITopicOperations.
 /// </param>
 /// <param name='namespaceName'>
 /// Required. The namespace name.
 /// </param>
 /// <param name='topic'>
 /// Required. The Service Bus topic.
 /// </param>
 /// <returns>
 /// A response to a request for a particular topic.
 /// </returns>
 public static Task<ServiceBusTopicResponse> CreateAsync(this ITopicOperations operations, string namespaceName, ServiceBusTopic topic)
 {
     return operations.CreateAsync(namespaceName, topic, CancellationToken.None);
 }
 /// <summary>
 /// The Create Storage Account operation creates a new storage account
 /// in Azure.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/hh264518.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Storage.IStorageAccountOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Create Storage Account
 /// operation.
 /// </param>
 /// <returns>
 /// The response body contains the status of the specified asynchronous
 /// operation, indicating whether it has succeeded, is inprogress, or
 /// has failed. Note that this status is distinct from the HTTP status
 /// code returned for the Get Operation Status operation itself. If
 /// the asynchronous operation succeeded, the response body includes
 /// the HTTP status code for the successful request. If the
 /// asynchronous operation failed, the response body includes the HTTP
 /// status code for the failed request and error information regarding
 /// the failure.
 /// </returns>
 public static Task<OperationStatusResponse> CreateAsync(this IStorageAccountOperations operations, StorageAccountCreateParameters parameters)
 {
     return operations.CreateAsync(parameters, CancellationToken.None);
 }
 /// <summary>
 /// The Create Virtual network Gateway operation creates a new network
 /// gateway for the specified virtual network in Azure.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154119.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IGatewayOperations.
 /// </param>
 /// <param name='networkName'>
 /// Required. The name of the virtual network for this gateway.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Create Virtual Network Gateway
 /// operation.
 /// </param>
 /// <returns>
 /// The response body contains the status of the specified asynchronous
 /// operation, indicating whether it has succeeded, is in progress, or
 /// has failed. Note that this status is distinct from the HTTP status
 /// code returned for the Get Operation Status operation itself. If
 /// the asynchronous operation succeeded, the response body includes
 /// the HTTP status code for the successful request. If the
 /// asynchronous operation failed, the response body includes the HTTP
 /// status code for the failed request, and also includes error
 /// information regarding the failure.
 /// </returns>
 public static Task<GatewayGetOperationStatusResponse> CreateAsync(this IGatewayOperations operations, string networkName, GatewayCreateParameters parameters)
 {
     return operations.CreateAsync(networkName, parameters, CancellationToken.None);
 }
 /// <summary>
 /// The Create OS Image operation adds an operating system image that
 /// is stored in a storage account and is available from the image
 /// repository.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj157192.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineOSImageOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Create Virtual Machine Image
 /// operation.
 /// </param>
 /// <returns>
 /// Parameters returned from the Create Virtual Machine Image operation.
 /// </returns>
 public static Task<VirtualMachineOSImageCreateResponse> CreateAsync(this IVirtualMachineOSImageOperations operations, VirtualMachineOSImageCreateParameters parameters)
 {
     return operations.CreateAsync(parameters, CancellationToken.None);
 }
 /// <summary>
 /// Create the runbook identified by runbook name.  (see
 /// http://aka.ms/azureautomationsdk/runbookoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IRunbookOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The create parameters for runbook.
 /// </param>
 /// <returns>
 /// The response model for the runbook create response.
 /// </returns>
 public static Task<RunbookCreateResponse> CreateAsync(this IRunbookOperations operations, string automationAccount, RunbookCreateParameters parameters)
 {
     return operations.CreateAsync(automationAccount, parameters, CancellationToken.None);
 }
 /// <summary>
 /// The Upload Client Root Certificate operation is used to upload a
 /// new client root certificate to Windows Azure.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn205129.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Network.IClientRootCertificateOperations.
 /// </param>
 /// <param name='virtualNetworkName'>
 /// The name of the virtual network for this gateway.
 /// </param>
 /// <param name='parameters'>
 /// Parameters supplied to the Upload client certificate Virtual
 /// Network Gateway operation.
 /// </param>
 /// <returns>
 /// A standard storage response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task<GatewayOperationResponse> CreateAsync(this IClientRootCertificateOperations operations, string virtualNetworkName, ClientRootCertificateCreateParameters parameters)
 {
     return operations.CreateAsync(virtualNetworkName, parameters, CancellationToken.None);
 }
 /// <summary>
 /// Creates a new queue. Once created, this queue's resource manifest
 /// is immutable. This operation is idempotent. Repeating the create
 /// call, after a queue with same name has been created successfully,
 /// will result in a 409 Conflict error message.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj856295.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.ServiceBus.IQueueOperations.
 /// </param>
 /// <param name='namespaceName'>
 /// Required. The namespace name.
 /// </param>
 /// <param name='queue'>
 /// Required. The service bus queue.
 /// </param>
 /// <returns>
 /// A response to a request for a particular queue.
 /// </returns>
 public static Task<ServiceBusQueueResponse> CreateAsync(this IQueueOperations operations, string namespaceName, ServiceBusQueueCreateParameters queue)
 {
     return operations.CreateAsync(namespaceName, queue, CancellationToken.None);
 }
 /// <summary>
 /// Creates a new Job, allowing the service to generate a job id. Use
 /// CreateOrUpdate if a user-chosen job id is required.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the Microsoft.WindowsAzure.Scheduler.IJobOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters specifying the job definition for a Create Job
 /// operation.
 /// </param>
 /// <returns>
 /// The Create Job operation response.
 /// </returns>
 public static Task<JobCreateResponse> CreateAsync(this IJobOperations operations, JobCreateParameters parameters)
 {
     return operations.CreateAsync(parameters, CancellationToken.None);
 }
 /// <summary>
 /// The Create Hosted Service operation creates a new cloud service in
 /// Azure.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/gg441304.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IHostedServiceOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the Create Hosted Service
 /// operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task<AzureOperationResponse> CreateAsync(this IHostedServiceOperations operations, HostedServiceCreateParameters parameters)
 {
     return operations.CreateAsync(parameters, CancellationToken.None);
 }