Class AtomicRead
Ensures that a read operation for a file does not conflict with an AtomicWrite for the same file.
[MustDisposeResource]
public sealed class AtomicRead
- Inheritance
-
objectAtomicRead
- Extension Methods
Examples
using (new AtomicRead(filePath))
return File.ReadAllBytes(filePath);
Constructors
AtomicRead(string)
Ensures that a read operation for a file does not conflict with an AtomicWrite for the same file.
public AtomicRead(string path)
Parameters
pathstringThe path of the file that will be read.
Examples
using (new AtomicRead(filePath))
return File.ReadAllBytes(filePath);
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()