Пример #1
0
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2202:Do not dispose objects multiple times")] // this usage is perfectly correct
        public static ShipyardInfo FromFile(string filename = null)
        {
            ShipyardInfo info = new ShipyardInfo();

            string data = Files.FromSavedGames("Shipyard.json");

            if (data != null)
            {
                info = JsonConvert.DeserializeObject <ShipyardInfo>(data);
            }
            return(info);
        }
Пример #2
0
 public ShipyardInfo(ShipyardInfo ShipyardInfo)
 {
     this.id        = ShipyardInfo.id;
     this.shiptype  = ShipyardInfo.shiptype;
     this.shipprice = ShipyardInfo.shipprice;
 }