internal FuzzyInt(StoragePremitive x, LinkedList <object> path) { Compound comp = (Compound)x; UpperBound = comp[16] is DsDouble ? (int)(comp[16] as DsDouble).Value : (int)(comp[16] as SignedInteger).Value; LowerBound = comp[17] is DsDouble ? (int)(comp[17] as DsDouble).Value : (int)(comp[17] as SignedInteger).Value; }
public MapLocInfo(StoragePremitive info, LinkedList <object> serializationPath) { var comp = (Compound)info; MapAreaId = (int)(SignedInteger)comp[16]; MapSectId = (int)(SignedInteger)comp[17]; MapLocId = (int)(SignedInteger)comp[18]; }
/*public Histogram(ILogbook log, IEnumerable<KeyValuePair<long, T>> data) * { * foreach(var ent in data) backend.Add(ent.Key, ent.Value); * }*/ public Histogram(StoragePremitive p, LinkedList <object> path) { path.AddFirst(this); foreach (var kv in ((Premitives.Dictionary <SignedInteger, StoragePremitive>)p).Convert((k, v) => new KeyValuePair <long, T>(k.Value, revConverter(v, path)))) { backend.Add(kv.Key, kv.Value); } path.RemoveFirst(); _holder = (ILogbook)path.First(x => x is ILogbook); }
public static void Serialize(this StoragePremitive p, DSWriter w) { if (p == null) { w.Write(EnumerablesEx.AsEnumerable(TypeIdentifier.Null)); } else { p.SerializeNonNull(w); } }
internal BattleProcess(StoragePremitive x, LinkedList <object> path) : base(x, path) { }
internal ShipHpStatus(StoragePremitive x, LinkedList <object> path) : base(x, path) { _parent = path.FirstOrDefault(p => p is BattleProcess) as BattleProcess; }
internal SupportInfo(StoragePremitive x, LinkedList <object> path) : base(x, path) { }
internal BombardInfo(StoragePremitive x, LinkedList <object> path) : base(x, path) { _parent = path.FirstOrDefault(p => p is IShipInfoHolder) as IShipInfoHolder; }
internal ParameterInfo(StoragePremitive x, LinkedList <object> path) : base(x, path) { }