/// <summary>
 /// Check if a resource name is available.
 /// </summary>
 /// <remarks>
 /// Check if a resource name is available.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// Resource name to verify.
 /// </param>
 /// <param name='type'>
 /// Resource type used for verification. Possible values include: 'Site',
 /// 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites',
 /// 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments',
 /// 'Microsoft.Web/publishingUsers'
 /// </param>
 /// <param name='isFqdn'>
 /// Is fully qualified domain name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ResourceNameAvailabilityInner> CheckNameAvailabilityAsync(this IWebSiteManagementClient operations, string name, CheckNameResourceTypes type, bool?isFqdn = default(bool?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(name, type, isFqdn, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
예제 #2
0
 /// <summary>
 /// Converts the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> parameter using <see cref="formatProvider"
 /// /> and <see cref="ignoreCase" />
 /// </summary>
 /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param>
 /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param>
 /// <param name="formatProvider">not used by this TypeConverter.</param>
 /// <param name="ignoreCase">when set to <c>true</c>, will ignore the case when converting.</param>
 /// <returns>
 /// an instance of <see cref="CheckNameResourceTypes" />, or <c>null</c> if there is no suitable conversion.
 /// </returns>
 public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CheckNameResourceTypes.CreateFrom(sourceValue);