/// <inheritdoc /> public async Task <Possible <string, Failure> > CloseAsync(Guid activityId) { if (IsClosed) { return(CacheSessionId); } IsClosed = true; var shutdownResult = await ReadOnlyCacheSession.ShutdownAsync(new Context(Logger)).ConfigureAwait(false); ReadOnlyCacheSession.Dispose(); if (!shutdownResult.Succeeded) { return(new CacheFailure(shutdownResult.ErrorMessage)); } return(CacheSessionId); }
/// <inheritdoc /> protected override void DisposeCore() { base.DisposeCore(); _innerCacheSession?.Dispose(); }