Пример #1
0
        public ValueTask <FileStream> OpenWrite()
        {
            var path = _path;

            return(CircuitBreaker.WithAutoRetryAsync <FileStream, IOException>(async() => File.OpenWrite(path)));
        }
Пример #2
0
        public ValueTask <FileStream> Create()
        {
            var path = _path;

            return(CircuitBreaker.WithAutoRetryAsync <FileStream, IOException>(async() => File.Open(path, FileMode.Create, FileAccess.ReadWrite)));
        }