Skip to content

Commit 2211e5e

Browse files
committed
#283 Adding comments for the component builder distributed cache.
1 parent e78a315 commit 2211e5e

1 file changed

Lines changed: 39 additions & 2 deletions

File tree

src/MyTested.AspNetCore.Mvc.Caching/ComponentBuilderDistributedCacheWithoutExtensions.cs

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,68 @@
77
using MyTested.AspNetCore.Mvc.Builders.Contracts.Data;
88
using MyTested.AspNetCore.Mvc.Builders.Data.DistributedCache.WithoutDistributedCache;
99

10+
/// <summary>
11+
/// Contains <see cref="Microsoft.Extensions.Caching.Distributed.IDistributedCache"/> extension methods for <see cref="IBaseTestBuilderWithComponentBuilder{TBuilder}"/>.
12+
/// </summary>
1013
public static class ComponentBuilderDistributedCacheWithoutExtensions
1114
{
15+
/// <summary>
16+
/// Clear all entities from <see cref="Microsoft.Extensions.Caching.Distributed.IDistributedCache"/> service.
17+
/// </summary>
18+
/// <typeparam name="TBuilder">Class representing ASP.NET Core MVC test builder.</typeparam>
19+
/// <param name="builder">Instance of <see cref="IBaseTestBuilderWithComponentBuilder{TBuilder}"/> type.</param>
20+
/// <returns>The same component builder.</returns>
1221
public static TBuilder WithoutDistributedCache<TBuilder>(
1322
this IBaseTestBuilderWithComponentBuilder<TBuilder> builder)
1423
where TBuilder : IBaseTestBuilder
1524
=> builder.WithoutDistributedCache(cache => cache.WithoutAllEntries());
16-
25+
26+
/// <summary>
27+
/// Remove given entity with key from <see cref="Microsoft.Extensions.Caching.Distributed.IDistributedCache"/> service.
28+
/// </summary>
29+
/// <typeparam name="TBuilder">Class representing ASP.NET Core MVC test builder.</typeparam>
30+
/// <param name="builder">Instance of <see cref="IBaseTestBuilderWithComponentBuilder{TBuilder}"/> type.</param>
31+
/// <param name="key">Key of the entity that will be removed.</param>
32+
/// <returns>The same component builder.</returns>
1733
public static TBuilder WithoutDistributedCache<TBuilder>(
1834
this IBaseTestBuilderWithComponentBuilder<TBuilder> builder,
1935
string key)
2036
where TBuilder : IBaseTestBuilder
2137
=> builder.WithoutDistributedCache(cache => cache.WithoutEntry(key));
22-
38+
39+
/// <summary>
40+
/// Remove given entities from <see cref="Microsoft.Extensions.Caching.Distributed.IDistributedCache"/> service.
41+
/// </summary>
42+
/// <typeparam name="TBuilder">Class representing ASP.NET Core MVC test builder.</typeparam>
43+
/// <param name="builder">Instance of <see cref="IBaseTestBuilderWithComponentBuilder{TBuilder}"/> type.</param>
44+
/// <param name="keys">Keys of the entities that will be removed.</param>
45+
/// <returns>The same component builder.</returns>
2346
public static TBuilder WithoutDistributedCache<TBuilder>(
2447
this IBaseTestBuilderWithComponentBuilder<TBuilder> builder,
2548
IEnumerable<string> keys)
2649
where TBuilder : IBaseTestBuilder
2750
=> builder.WithoutDistributedCache(cache => cache.WithoutEntries(keys));
2851

52+
/// <summary>
53+
/// Remove given entities from <see cref="Microsoft.Extensions.Caching.Distributed.IDistributedCache"/> service.
54+
/// </summary>
55+
/// <typeparam name="TBuilder">Class representing ASP.NET Core MVC test builder.</typeparam>
56+
/// <param name="builder">Instance of <see cref="IBaseTestBuilderWithComponentBuilder{TBuilder}"/> type.</param>
57+
/// <param name="keys">Keys of the entities that will be removed.</param>
58+
/// <returns>The same component builder.</returns>
2959
public static TBuilder WithoutDistributedCache<TBuilder>(
3060
this IBaseTestBuilderWithComponentBuilder<TBuilder> builder,
3161
params string[] keys)
3262
where TBuilder : IBaseTestBuilder
3363
=> builder.WithoutDistributedCache(cache => cache.WithoutEntries(keys));
3464

65+
/// <summary>
66+
/// Remove entity or entities from <see cref="Microsoft.Extensions.Caching.Distributed.IDistributedCache"/> service.
67+
/// </summary>
68+
/// <typeparam name="TBuilder">Class representing ASP.NET Core MVC test builder.</typeparam>
69+
/// <param name="builder">Instance of <see cref="IBaseTestBuilderWithComponentBuilder{TBuilder}"/> type.</param>
70+
/// <param name="distributedCacheBuilder">Action setting the <see cref="Microsoft.Extensions.Caching.Distributed.IDistributedCache"/> values by using <see cref="IWithoutDistributedCacheBuilder"/>.</param>
71+
/// <returns>The same component builder.</returns>
3572
public static TBuilder WithoutDistributedCache<TBuilder>(
3673
this IBaseTestBuilderWithComponentBuilder<TBuilder> builder,
3774
Action<IWithoutDistributedCacheBuilder> distributedCacheBuilder)

0 commit comments

Comments
 (0)