Skip to content

Commit

Permalink
Removing tests from Examples solution.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmwebb-lv committed Nov 8, 2024
1 parent c157ce1 commit 1685b0d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<ItemGroup>
<ProjectReference Include="..\..\..\Src\RCommon.ApplicationServices\RCommon.ApplicationServices.csproj" />
<ProjectReference Include="..\..\..\Src\RCommon.FluentValidation\RCommon.FluentValidation.csproj" />
<ProjectReference Include="..\..\..\Src\RCommon.MemoryCache\RCommon.MemoryCache.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using RCommon.ApplicationServices;
using RCommon.Caching;
using RCommon.FluentValidation;
using RCommon.MemoryCache;
using System.Diagnostics;
using System.Reflection;

Expand All @@ -32,7 +33,7 @@
// Or this way which uses a little magic but is simple
cqrs.AddCommandHandlers((typeof(Program).GetTypeInfo().Assembly));
cqrs.AddQueryHandlers((typeof(Program).GetTypeInfo().Assembly));
cqrs.AddMemoryCachingForHandlers<IMemoryCachingBuilder>();
//cqrs.AddMemoryCachingForHandlers<InMemoryCachingBuilder>();
})
.WithValidation<FluentValidationBuilder>(validation =>
{
Expand All @@ -43,8 +44,17 @@
options.ValidateCommands = true;
options.ValidateQueries = true;
});
})
.WithMemoryCaching<InMemoryCachingBuilder>(cache =>
{
cache.Configure(x =>
{
x.ExpirationScanFrequency = TimeSpan.FromMinutes(1);
});
cache.CacheDynamicallyCompiledExpressions();
});



services.AddTransient<ITestApplicationService, TestApplicationService>();

}).Build();
Expand Down

0 comments on commit 1685b0d

Please sign in to comment.