Example #1
0
        public static MinerConfig GetInstance()
        {
            if (instance == null)
            {
                instance = ReadFromFile();
            }

            return(instance);
        }
Example #2
0
 public static MinerConfig ReadFromFile(string fileFullName)
 {
     using (StreamReader sr = new StreamReader(fileFullName))
     {
         string      jsonString = sr.ReadToEnd();
         MinerConfig config     = JsonConvert.DeserializeObject <MinerConfig>(jsonString);
         return(config);
     }
 }