Пример #1
0
 public void Save(Version fv, WsgFileStream fs)
 {
     try
     {
         if (fv.Major > 0)
         {
             fs.WriteString(Id);
             fs.WriteString(Name);
             fs.WriteInt(StockIndexes.Count);
             if (StockIndexes.Count > 0)
             {
                 foreach (StockIndex stockindex in StockIndexes.Values)
                     fs.WriteString(stockindex.Id);
             }
             PriceHistory.Save(fv, fs);
             if (fv.Major > 0 && fv.Minor >= 1)
             {
                 fs.WriteDouble(MinPrice);
                 fs.WriteDouble(MaxPrice);
             }
             fs.WriteDouble(Price);
             fs.WriteInt(Available);
             fs.WriteInt(OwnedByPlayers);
         }
     }
     catch (System.Exception ex)
     {
         throw ex;
     }
 }