|
7 | 7 | using MyTested.AspNetCore.Mvc.Builders.Contracts.Data; |
8 | 8 | using MyTested.AspNetCore.Mvc.Builders.Data.DistributedCache.WithoutDistributedCache; |
9 | 9 |
|
| 10 | + /// <summary> |
| 11 | + /// Contains <see cref="Microsoft.Extensions.Caching.Distributed.IDistributedCache"/> extension methods for <see cref="IBaseTestBuilderWithComponentBuilder{TBuilder}"/>. |
| 12 | + /// </summary> |
10 | 13 | public static class ComponentBuilderDistributedCacheWithoutExtensions |
11 | 14 | { |
| 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> |
12 | 21 | public static TBuilder WithoutDistributedCache<TBuilder>( |
13 | 22 | this IBaseTestBuilderWithComponentBuilder<TBuilder> builder) |
14 | 23 | where TBuilder : IBaseTestBuilder |
15 | 24 | => 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> |
17 | 33 | public static TBuilder WithoutDistributedCache<TBuilder>( |
18 | 34 | this IBaseTestBuilderWithComponentBuilder<TBuilder> builder, |
19 | 35 | string key) |
20 | 36 | where TBuilder : IBaseTestBuilder |
21 | 37 | => 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> |
23 | 46 | public static TBuilder WithoutDistributedCache<TBuilder>( |
24 | 47 | this IBaseTestBuilderWithComponentBuilder<TBuilder> builder, |
25 | 48 | IEnumerable<string> keys) |
26 | 49 | where TBuilder : IBaseTestBuilder |
27 | 50 | => builder.WithoutDistributedCache(cache => cache.WithoutEntries(keys)); |
28 | 51 |
|
| 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> |
29 | 59 | public static TBuilder WithoutDistributedCache<TBuilder>( |
30 | 60 | this IBaseTestBuilderWithComponentBuilder<TBuilder> builder, |
31 | 61 | params string[] keys) |
32 | 62 | where TBuilder : IBaseTestBuilder |
33 | 63 | => builder.WithoutDistributedCache(cache => cache.WithoutEntries(keys)); |
34 | 64 |
|
| 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> |
35 | 72 | public static TBuilder WithoutDistributedCache<TBuilder>( |
36 | 73 | this IBaseTestBuilderWithComponentBuilder<TBuilder> builder, |
37 | 74 | Action<IWithoutDistributedCacheBuilder> distributedCacheBuilder) |
|
0 commit comments