Ejemplo n.º 1
0
        public void AddCustomPrebuiltApplication()
        {
            UseClientFor(async client =>
            {
                var domain = new PrebuiltDomainCreateObject
                {
                    Culture    = "en-US",
                    DomainName = "Calendar"
                };

                var result = await client.Apps.AddCustomPrebuiltDomainAsync(domain);

                // Cleanup
                await client.Apps.DeleteAsync(result);

                // Assert
                Assert.True(result != Guid.Empty);
            });
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds a prebuilt domain along with its models as a new application.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='prebuiltDomainCreateObject'>
 /// A prebuilt domain create object containing the name and culture of the
 /// domain.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <System.Guid> AddCustomPrebuiltDomainAsync(this IApps operations, PrebuiltDomainCreateObject prebuiltDomainCreateObject, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.AddCustomPrebuiltDomainWithHttpMessagesAsync(prebuiltDomainCreateObject, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Adds a prebuilt domain along with its models as a new application.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='azureRegion'>
 /// Supported Azure regions for Cognitive Services endpoints. Possible values
 /// include: 'westus', 'westeurope'
 /// </param>
 /// <param name='prebuiltDomainCreateObject'>
 /// A prebuilt domain create object containing the name and culture of the
 /// domain
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <string> AddCustomPrebuiltApplicationAsync(this IApps operations, AzureRegions azureRegion, PrebuiltDomainCreateObject prebuiltDomainCreateObject = default(PrebuiltDomainCreateObject), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.AddCustomPrebuiltApplicationWithHttpMessagesAsync(azureRegion, prebuiltDomainCreateObject, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }