Beispiel #1
0
 private Context(FileReader fileReader)
 {
     this.fileReader = fileReader;
     var content = fileReader.ReadFileToString();
     document = XDocument.Parse(content);
     lastSync = DateTime.UtcNow;
 }
Beispiel #2
0
 public static Context Get(FileReader fileReader)
 {
     if (instance == null)
     {
         lock (SyncRoot)
         {
             if (instance == null)
             {
                 instance = new Context(fileReader);
             }
         }
     }
     return instance;
 }