Show / Hide Table of Contents

Class AtomicRead

Ensures that a read operation for a file does not conflict with an AtomicWrite for the same file.

Inheritance
Object
AtomicRead
Namespace: NanoByte.Common.Storage
Assembly: NanoByte.Common.dll
Syntax
public sealed class AtomicRead : Object
Examples
            using (new AtomicRead(filePath))
                return File.ReadAllBytes(filePath);

Constructors

AtomicRead(String)

Prepares an atomic read operation.

Declaration
public AtomicRead(string path)
Parameters
Type Name Description
String path

The path of the file that will be read.

Methods

Dispose()

Declaration
public void Dispose()

Extension Methods

UpdateUtils.To<TIn, TOut>(TIn, Func<TIn, TOut>)
JsonStorage.SaveJson<T>(T, Stream)
JsonStorage.SaveJson<T>(T, String)
JsonStorage.ToJsonString<T>(T)
JsonStorage.ReparseAsJson<T>(Object)
JsonStorage.ReparseAsJson<T>(Object, T)
XmlStorage.SaveXml(Object, Stream, String)
XmlStorage.SaveXml<T>(T, String, String)
XmlStorage.ToXmlString(Object, String)
ConversionUtils.ConvertToString<TType>(TType)
In This Article
Back to top Copyright Bastian Eicher