Skip to content

Commit

Permalink
Renamed to CascadeRepos
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathas Costa committed Jul 3, 2023
1 parent b41faf4 commit c2dfe8b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cascade.sln → CascadeRepos.sln
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cascade", "src\Cascade\Cascade.csproj", "{4DA22FB0-83F9-4970-B92F-5892C5D57A86}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CascadeRepos", "src\CascadeRepos\CascadeRepos.csproj", "{4DA22FB0-83F9-4970-B92F-5892C5D57A86}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cascade.UnitTests", "tests\Cascade.UnitTests\Cascade.UnitTests.csproj", "{4C7D3132-B2F1-4525-A7FC-EFE0AB8DE406}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CascadeRepos.UnitTests", "tests\CascadeRepos.UnitTests\CascadeRepos.UnitTests.csproj", "{4C7D3132-B2F1-4525-A7FC-EFE0AB8DE406}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
1 change: 0 additions & 1 deletion src/CascadeRepos/CascadeRepos.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<PackageLicenseUrl>https://github.com/22cans/Cascade/blob/main/LICENSE</PackageLicenseUrl>
<RepositoryUrl>https://github.com/22cans/Cascade</RepositoryUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<RootNamespace>Cascade</RootNamespace>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
Expand Down
8 changes: 4 additions & 4 deletions src/CascadeRepos/CascadeRepositoryRegistrar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public static class CascadeRepositoryRegistrar
/// Example usage:
/// <code>
/// // To set up CascadeRepos
/// services.ConfigureCascade(configuration);
/// services.ConfigureCascadeRepos(configuration);
/// </code>
/// </remarks>
public static IServiceCollection ConfigureCascade(this IServiceCollection services, IConfiguration configuration)
public static IServiceCollection ConfigureCascadeRepos(this IServiceCollection services, IConfiguration configuration)
{
return services
.AddMemoryCacheRepository(configuration)
Expand Down Expand Up @@ -108,13 +108,13 @@ public static IServiceCollection ConfigureCustomType<T, C>(this IServiceCollecti
/// Example usage:
/// <code>
/// // To set up a custom cascade repository for Foo class with Bar as key type
/// services.AddCascade&lt;Foo, Bar&gt;(
/// services.AddCascadeRepos&lt;Foo, Bar&gt;(
/// typeof(MemoryCacheRepository&lt;,&gt;),
/// typeof(RedisRepository&lt;,&gt;),
/// typeof(DynamoDBRepository&lt;,&gt;));
/// </code>
/// </remarks>
public static IServiceCollection AddCascade<T, K>(this IServiceCollection services, params Type[] repoTypes)
public static IServiceCollection AddCascadeRepos<T, K>(this IServiceCollection services, params Type[] repoTypes)
{
return services
.AddTransient(serviceProvider =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void ConfigureCascade_Registers_Repositories()
var configuration = configurationBuilder.Build();

// Act
services.ConfigureCascade(configuration);
services.ConfigureCascadeRepos(configuration);

// Assert
var serviceProvider = services.BuildServiceProvider();
Expand Down Expand Up @@ -55,10 +55,10 @@ public void AddCascade_Registers_Repositories_In_Order()
};
var configurationBuilder = new ConfigurationBuilder().AddInMemoryCollection(configValues!);
var configuration = configurationBuilder.Build();
services.ConfigureCascade(configuration);
services.ConfigureCascadeRepos(configuration);

// Act
services.AddCascade<SomeObject, int>(
services.AddCascadeRepos<SomeObject, int>(
typeof(DynamoDbRepository<,>),
typeof(MemoryCacheRepository<,>),
typeof(RedisRepository<,>));
Expand Down

0 comments on commit c2dfe8b

Please sign in to comment.