Interface IMemoryCacheBuilder
Used for building mocked Microsoft.Extensions.Caching.Memory.IMemoryCache.
Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.Data
Assembly:MyTested.AspNetCore.Mvc.Caching.dll
Syntax
public interface IMemoryCacheBuilder
Methods
| Improve this Doc View SourceWithEntries(IDictionary<Object, Object>)
Adds cache entries to the mocked Microsoft.Extensions.Caching.Memory.IMemoryCache.
Declaration
IAndMemoryCacheBuilder WithEntries(IDictionary<object, object> entries)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.Object, System.Object> | entries | Dictionary of cache entries. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheBuilder. |
WithEntry(Action<IMemoryCacheEntryKeyBuilder>)
Adds cache entry to the mocked Microsoft.Extensions.Caching.Memory.IMemoryCache.
Declaration
IAndMemoryCacheBuilder WithEntry(Action<IMemoryCacheEntryKeyBuilder> memoryCacheEntryBuilder)
Parameters
Type | Name | Description |
---|---|---|
System.Action<IMemoryCacheEntryKeyBuilder> | memoryCacheEntryBuilder | Builder for creating cache entry. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheBuilder. |
WithEntry(Object, Object)
Adds cache entry to the mocked Microsoft.Extensions.Caching.Memory.IMemoryCache.
Declaration
IAndMemoryCacheBuilder WithEntry(object key, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | key | Key of the cache entry. |
System.Object | value | Value of the cache entry. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheBuilder. |
WithEntry(Object, Object, MemoryCacheEntryOptions)
Adds cache entry to the mocked Microsoft.Extensions.Caching.Memory.IMemoryCache.
Declaration
IAndMemoryCacheBuilder WithEntry(object key, object value, MemoryCacheEntryOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.Object | key | Key of the cache entry. |
System.Object | value | Value of the cache entry. |
Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions | options | MemoryCacheEntryOptions of the cache entry. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.Data.IAndMemoryCacheBuilder. |