Example #1
0
        public static IEnumerable <T> GetAllValues <T>([NotNull] this ICacheSection <T> cacheSection)
        {
            cacheSection.AssertArgumentNotNull(nameof(cacheSection));

            var values = cacheSection
                         .Keys
                         .Select(key => cacheSection.Get(key))
                         .Where(option => option.IsSome)
                         .Select(option => option.GetValueOrDefault());

            return(values);
        }
 /// <inheritdoc />
 public IOperationManager <TSessionState, TOperationState>?Get(string sessionId)
 {
     return(_sessionsCache
            .Get(sessionId)
            .GetValueOrDefault(defaultValue: null));
 }