/// <summary>
 /// Gets recently deleted workspaces in a resource group, available for
 /// recovery.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IEnumerable <Workspace> > ListByResourceGroupAsync(this IDeletedWorkspacesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     DataExports           = new DataExportsOperations(this);
     DataSources           = new DataSourcesOperations(this);
     IntelligencePacks     = new IntelligencePacksOperations(this);
     LinkedServices        = new LinkedServicesOperations(this);
     LinkedStorageAccounts = new LinkedStorageAccountsOperations(this);
     ManagementGroups      = new ManagementGroupsOperations(this);
     OperationStatuses     = new OperationStatusesOperations(this);
     SharedKeys            = new SharedKeysOperations(this);
     Usages = new UsagesOperations(this);
     StorageInsightConfigs = new StorageInsightConfigsOperations(this);
     SavedSearches         = new SavedSearchesOperations(this);
     AvailableServiceTiers = new AvailableServiceTiersOperations(this);
     Gateways          = new GatewaysOperations(this);
     Schema            = new SchemaOperations(this);
     WorkspacePurge    = new WorkspacePurgeOperations(this);
     Tables            = new TablesOperations(this);
     Clusters          = new ClustersOperations(this);
     Operations        = new Operations(this);
     Workspaces        = new WorkspacesOperations(this);
     DeletedWorkspaces = new DeletedWorkspacesOperations(this);
     BaseUri           = new System.Uri("https://management.azure.com");
     AcceptLanguage    = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
 /// <summary>
 /// Gets recently deleted workspaces in a resource group, available for
 /// recovery.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 public static IEnumerable <Workspace> ListByResourceGroup(this IDeletedWorkspacesOperations operations, string resourceGroupName)
 {
     return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Gets recently deleted workspaces in a subscription, available for recovery.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IEnumerable <Workspace> List(this IDeletedWorkspacesOperations operations)
 {
     return(operations.ListAsync().GetAwaiter().GetResult());
 }