Exemplo n.º 1
0
        public void ReadConfigFromFile()
        {
            EnsurePathAndFile();

            string json = File.ReadAllText(this.fullPath);

            this.productVolume = JsonConvert.DeserializeObject <ProductVolume>(json);
            if (this.productVolume == null)
            {
                this.productVolume = new ProductVolume();
                this.productVolume.GeoDisVolume       = 1;
                this.productVolume.TorrentVolume      = 1;
                this.productVolume.WaterloggingVolume = 1;
            }
        }
Exemplo n.º 2
0
 public ProductVolumeConfig()
 {
     this.fullPath      = Path.Combine(Directory.GetCurrentDirectory(), dir, pathConfigFileName);
     this.productVolume = new ProductVolume();
     ReadConfigFromFile();
 }