Amazon.Runtime.Internal.Util.OptimisticLockedTextFile.Read C# (CSharp) Метод

Read() приватный Метод

private Read ( ) : void
Результат void
        private void Read()
        {
            // Store a copy of the file for checking concurrency
            OriginalContents = "";
            try
            {
                OriginalContents = File.ReadAllText(FilePath);
            }
            catch (FileNotFoundException)
            {
                // This is OK.  The Persist() method will create it if necessary.
            }

            // Parse the lines ourselves since we need to preserve the line endings.
            // Parsing ourselves also avoids a race condition:
            // Doing ReadAllText then ReadAllLines would leave a small gap in time where the file could be changed.
            Lines = ReadLinesWithEndings(OriginalContents);
        }