Exemplo n.º 1
0
 /// <summary>
 /// Edits a tenant.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='tenantDto'>
 /// The entity to put
 /// </param>
 public static TenantDto PutById(this ITenants operations, int id, TenantDto tenantDto)
 {
     return(operations.PutByIdAsync(id, tenantDto).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Partially updates a tenant
 /// </summary>
 /// <remarks>
 /// Host only. Requires authentication.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='tenantDto'>
 /// The entity to patch
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task PatchByIdAsync(this ITenants operations, int id, TenantDto tenantDto, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     (await operations.PatchByIdWithHttpMessagesAsync(id, tenantDto, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemplo n.º 3
0
 /// <summary>
 /// Gets a single tenant based on its id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='expand'>
 /// Expands related entities inline.
 /// </param>
 /// <param name='select'>
 /// Selects which properties to include in the response.
 /// </param>
 public static TenantDto GetById(this ITenants operations, int id, string expand = default(string), string select = default(string))
 {
     return(operations.GetByIdAsync(id, expand, select).GetAwaiter().GetResult());
 }
Exemplo n.º 4
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='tenantName'>
 /// </param>
 /// <param name='appVersion'>
 /// </param>
 public static string CreateTenant(this ITenants operations, string tenantName, string appVersion)
 {
     return(operations.CreateTenantAsync(tenantName, appVersion).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Partially updates a tenant
 /// </summary>
 /// <remarks>
 /// Host only. Requires authentication.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='tenantDto'>
 /// The entity to patch
 /// </param>
 public static void PatchById(this ITenants operations, int id, TenantDto tenantDto)
 {
     operations.PatchByIdAsync(id, tenantDto).GetAwaiter().GetResult();
 }
Exemplo n.º 6
0
 /// <summary>
 /// Toggles the active status of tenants
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='setActiveParameters'>
 /// </param>
 public static void SetActive(this ITenants operations, SetActiveParameters setActiveParameters)
 {
     operations.SetActiveAsync(setActiveParameters).GetAwaiter().GetResult();
 }
Exemplo n.º 7
0
 /// <summary>
 /// Gets tenants.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='expand'>
 /// Expands related entities inline.
 /// </param>
 /// <param name='filter'>
 /// Filters the results, based on a Boolean condition.
 /// </param>
 /// <param name='select'>
 /// Selects which properties to include in the response.
 /// </param>
 /// <param name='orderby'>
 /// Sorts the results.
 /// </param>
 /// <param name='top'>
 /// Returns only the first n results.
 /// </param>
 /// <param name='skip'>
 /// Skips the first n results.
 /// </param>
 /// <param name='count'>
 /// Includes a count of the matching results in the response.
 /// </param>
 public static ODataResponseListTenantDto GetTenants(this ITenants operations, string expand = default(string), string filter = default(string), string select = default(string), string orderby = default(string), int?top = default(int?), int?skip = default(int?), bool?count = default(bool?))
 {
     return(operations.GetTenantsAsync(expand, filter, select, orderby, top, skip, count).GetAwaiter().GetResult());
 }
Exemplo n.º 8
0
 /// <summary>
 /// Toggles the active status of tenants
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Administration or
 /// Administration.Write.
 ///
 /// Host only. Requires authentication.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 public static void SetActive(this ITenants operations, TenantSetActiveRequest body = default(TenantSetActiveRequest))
 {
     operations.SetActiveAsync(body).GetAwaiter().GetResult();
 }
Exemplo n.º 9
0
 /// <summary>
 /// Toggles the active status of tenants
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Administration or
 /// Administration.Write.
 ///
 /// Host only. Requires authentication.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task SetActiveAsync(this ITenants operations, TenantSetActiveRequest body = default(TenantSetActiveRequest), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.SetActiveWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemplo n.º 10
0
 /// <summary>
 /// Deletes a tenant based on its id.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Administration or
 /// Administration.Write.
 ///
 /// Host only. Requires authentication.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 public static void DeleteById(this ITenants operations, int key)
 {
     operations.DeleteByIdAsync(key).GetAwaiter().GetResult();
 }
Exemplo n.º 11
0
 /// <summary>
 /// Deletes a tenant based on its id.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Administration or
 /// Administration.Write.
 ///
 /// Host only. Requires authentication.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteByIdAsync(this ITenants operations, int key, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteByIdWithHttpMessagesAsync(key, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemplo n.º 12
0
 /// <summary>
 /// Partially updates a tenant
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Administration or
 /// Administration.Write.
 ///
 /// Host only. Requires authentication.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task PatchByIdAsync(this ITenants operations, int key, TenantDto body = default(TenantDto), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.PatchByIdWithHttpMessagesAsync(key, body, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemplo n.º 13
0
 /// <summary>
 /// Partially updates a tenant
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Administration or
 /// Administration.Write.
 ///
 /// Host only. Requires authentication.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='key'>
 /// </param>
 /// <param name='body'>
 /// </param>
 public static void PatchById(this ITenants operations, int key, TenantDto body = default(TenantDto))
 {
     operations.PatchByIdAsync(key, body).GetAwaiter().GetResult();
 }
Exemplo n.º 14
0
 /// <summary>
 /// Creates a tenant.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Administration or
 /// Administration.Write.
 ///
 /// Host only. Requires authentication.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// </param>
 public static TenantDto Post(this ITenants operations, TenantDto body = default(TenantDto))
 {
     return(operations.PostAsync(body).GetAwaiter().GetResult());
 }
Exemplo n.º 15
0
 /// <summary>
 /// Deletes a tenant based on its id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='ifMatch'>
 /// If-Match header
 /// </param>
 public static void DeleteById(this ITenants operations, int id, string ifMatch = default(string))
 {
     operations.DeleteByIdAsync(id, ifMatch).GetAwaiter().GetResult();
 }
Exemplo n.º 16
0
 public BoostrapProcedures(IEnumerable <ICanPerformBoostrapProcedure> procedures, ITenants tenants)
 {
     _procedures = procedures;
     _tenants    = tenants.All.ToArray();
 }
Exemplo n.º 17
0
 /// <summary>
 /// Deletes a tenant based on its id.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// key: Id
 /// </param>
 /// <param name='ifMatch'>
 /// If-Match header
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteByIdAsync(this ITenants operations, int id, string ifMatch = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     (await operations.DeleteByIdWithHttpMessagesAsync(id, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemplo n.º 18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TenantActionPerformer"/> class.
 /// </summary>
 /// <param name="tenants">The <see cref="ITenants"/> to use to get all configured tenants.</param>
 /// <param name="serviceProviders">The <see cref="ITenantServiceProviders"/> to use to get the <see cref="IServiceProvider"/> for each tenant.</param>
 public TenantActionPerformer(ITenants tenants, ITenantServiceProviders serviceProviders)
 {
     _allTenants       = tenants;
     _serviceProviders = serviceProviders;
 }
Exemplo n.º 19
0
 /// <summary>
 /// Toggles the active status of tenants
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='setActiveParameters'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task SetActiveAsync(this ITenants operations, SetActiveParameters setActiveParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     (await operations.SetActiveWithHttpMessagesAsync(setActiveParameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemplo n.º 20
0
 public TenantsService(ITenants tenants, ILogger logger)
 {
     _tenants = tenants;
     _logger  = logger;
 }
Exemplo n.º 21
0
 /// <summary>
 /// Creates a tenant.
 /// </summary>
 /// <remarks>
 /// Client Credentials Flow required permissions: Administration or
 /// Administration.Write.
 ///
 /// Host only. Requires authentication.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='tenantDto'>
 /// The entity to post
 /// </param>
 public static TenantDto Post(this ITenants operations, TenantDto tenantDto)
 {
     return(operations.PostAsync(tenantDto).GetAwaiter().GetResult());
 }
Exemplo n.º 22
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='tenantId'>
 /// </param>
 public static string ResetKeys(this ITenants operations, string tenantId)
 {
     return(operations.ResetKeysAsync(tenantId).GetAwaiter().GetResult());
 }