C# Class 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.
Afficher le fichier Open project: aws/aws-sdk-net Class Usage Examples

Private Properties

Свойство Type Description
HasEnding bool
Read void
ReadLinesWithEndings List

Méthodes publiques

Méthode Description
OptimisticLockedTextFile ( string filePath ) : System

Construct a new OptimisticLockedTextFile.

Persist ( ) : void

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

ToString ( ) : string

Private Methods

Méthode Description
HasEnding ( string line ) : bool
Read ( ) : void
ReadLinesWithEndings ( string str ) : List

Method Details

OptimisticLockedTextFile() public méthode

Construct a new OptimisticLockedTextFile.
public OptimisticLockedTextFile ( string filePath ) : System
filePath string path of the file
Résultat System

Persist() public méthode

Persist changes to disk after an optimistic concurrency check is completed.
public Persist ( ) : void
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string