-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add multi-tenancy builder (#135)
Co-authored-by: Raphael Strotz <Xzelsius@users.noreply.github.com>
- Loading branch information
Showing
8 changed files
with
121 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/Ayaka.MultiTenancy.Abstractions/DependencyInjection/IMultiTenancyBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright (c) Raphael Strotz. All rights reserved. | ||
|
||
namespace Ayaka.MultiTenancy.DependencyInjection; | ||
|
||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
/// <summary> | ||
/// Provides functionality to configure multi-tenancy services. | ||
/// </summary> | ||
public interface IMultiTenancyBuilder | ||
{ | ||
/// <summary> | ||
/// Gets the <see cref="IServiceCollection"/> where multi-tenancy services are configured. | ||
/// </summary> | ||
IServiceCollection Services { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/Ayaka.MultiTenancy/DependencyInjection/MultiTenancyBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) Raphael Strotz. All rights reserved. | ||
|
||
namespace Ayaka.MultiTenancy.DependencyInjection; | ||
|
||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
/// <summary> | ||
/// Allows configuration of multi-tenancy services. | ||
/// </summary> | ||
internal sealed class MultiTenancyBuilder : IMultiTenancyBuilder | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="MultiTenancyBuilder"/> class. | ||
/// </summary> | ||
/// <param name="services">The <see cref="IServiceCollection" /> to add services to.</param> | ||
public MultiTenancyBuilder(IServiceCollection services) | ||
{ | ||
Services = services; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public IServiceCollection Services { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters