C# Класс Amazon.Runtime.Internal.Util.OptimisticLockedTextFile

Provides line-based read/write access to a file. The file can be read into memory, changed, then written back to disk. When the file is persisted back to disk, an optimistic concurrency check is performed to make sure the file hasn't changed since it was originally read. This class is not threadsafe.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
HasEnding bool
Read void
ReadLinesWithEndings List

Открытые методы

Метод Описание
OptimisticLockedTextFile ( string filePath ) : System

Construct a new OptimisticLockedTextFile.

Persist ( ) : void

Persist changes to disk after an optimistic concurrency check is completed.

ToString ( ) : string

Приватные методы

Метод Описание
HasEnding ( string line ) : bool
Read ( ) : void
ReadLinesWithEndings ( string str ) : List

Описание методов

OptimisticLockedTextFile() публичный метод

Construct a new OptimisticLockedTextFile.
public OptimisticLockedTextFile ( string filePath ) : System
filePath string path of the file
Результат System

Persist() публичный метод

Persist changes to disk after an optimistic concurrency check is completed.
public Persist ( ) : void
Результат void

ToString() публичный метод

public ToString ( ) : string
Результат string