refactor(ModifyDocStatusCommandBase): add EnvelopeId and ReceiverId properties
This commit is contained in:
@@ -3,10 +3,22 @@ using Microsoft.Extensions.Caching.Memory;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Extensions;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class MemoryCacheExtensions
|
||||
{
|
||||
private static readonly Guid BaseId = Guid.NewGuid();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <typeparam name="TEnum"></typeparam>
|
||||
/// <param name="memoryCache"></param>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="ignores"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="InvalidOperationException"></exception>
|
||||
public static IDictionary<string, int> GetEnumAsDictionary<TEnum>(this IMemoryCache memoryCache, string key = "", params object[] ignores)
|
||||
where TEnum : Enum
|
||||
=> memoryCache.GetOrCreate(BaseId + typeof(TEnum).FullName + key, _ =>
|
||||
|
||||
Reference in New Issue
Block a user