public BListExplicitIndexXmlSerializer(BListExplicitIndexXmlParams <T> @params, Collections.BListExplicitIndex <T> list) : base(@params) { Contract.Requires <ArgumentNullException>(@params != null); Contract.Requires <ArgumentNullException>(list != null); mList = list; }
public static Collections.BListExplicitIndex <BTriggerParam> BuildDefinition( BTriggerSystem root, Collections.BListExplicitIndex <BTriggerArg> args) { var p = new Collections.BListExplicitIndex <BTriggerParam>(kBListExplicitIndexParams); p.ResizeCount(args.Count); foreach (var arg in args) { if (arg.IsInvalid) { continue; } var param = new BTriggerParam(); param.mType = arg.Type; param.mName = arg.Name; param.mSigID = arg.SigID; param.mOptional = arg.Optional; param.mVarType = arg.GetVarType(root); p[param.mSigID - 1] = param; } p.OptimizeStorage(); return(p); }
protected TriggerSystemProtoObject(BTriggerSystem root, TriggerScriptObjectWithArgs instance) { Name = instance.Name; mDbId = instance.DbId; mVersion = instance.Version; Params = BTriggerParam.BuildDefinition(root, instance.Args); }
public BListExplicitIndexXmlSerializer <T> Reset(BListExplicitIndexXmlParams <T> @params, Collections.BListExplicitIndex <T> list) { Contract.Requires <ArgumentNullException>(@params != null); Contract.Requires <ArgumentNullException>(list != null); base.Reset(@params); mList = list; return(this); }
public BProtoObject() : base(BResource.kBListTypeValuesParams, BResource.kBListTypeValuesXmlParams_Cost) { Veterancy = new Collections.BListExplicitIndex <BProtoObjectVeterancy>(BProtoObjectVeterancy.kBListExplicitIndexParams); Populations = new Collections.BTypeValuesSingle(BPopulation.kBListParamsSingle); PopulationsCapAddition = new Collections.BTypeValuesSingle(BPopulation.kBListParamsSingle); Rates = new Collections.BTypeValuesSingle(BGameData.kRatesBListTypeValuesParams); AddResource = new Collections.BTypeValuesSingle(BResource.kBListTypeValuesParams); Flags = new Collections.BBitSet(kFlagsParams); ObjectTypes = new Collections.BBitSet(kObjectTypesParams); }
public static void Serialize <T, TDoc, TCursor>(IO.TagElementStream <TDoc, TCursor, string> s, Collections.BListExplicitIndex <T> list, BListExplicitIndexXmlParams <T> @params) where T : IO.ITagElementStringNameStreamable, new() where TDoc : class where TCursor : class { Contract.Requires(s != null); Contract.Requires(list != null); Contract.Requires(@params != null); using (var xs = new BListExplicitIndexXmlSerializer <T>(@params, list)) { xs.Serialize(s); } }
public static void Serialize <T>(KSoft.IO.XmlElementStream s, FA mode, BXmlSerializerInterface xsi, Collections.BListExplicitIndex <T> list, BListExplicitIndexXmlParams <T> @params) where T : IEqualityComparer <T>, IO.IPhxXmlStreamable, new() { Contract.Requires(s != null); Contract.Requires(xsi != null); Contract.Requires(list != null); Contract.Requires(@params != null); using (var xs = #if NO_TLS_STREAMING new BListExplicitIndexXmlSerializer <T>(@params, list) #else BDatabaseXmlSerializerBase._BListExplicitIndex <T> .sXmlSerializer.Value.Reset(@params, list) #endif ) { xs.StreamXml(s, mode, xsi); } }
public BProtoPower() { var textData = base.CreateDatabaseObjectUserInterfaceTextData(); textData.HasDisplayNameID = true; textData.HasRolloverTextID = true; textData.HasPrereqTextID = true; textData.HasChooseTextID = true; Cost = new Collections.BTypeValuesSingle(BResource.kBListTypeValuesParams); DynamicCosts = new Collections.BListArray <BPowerDynamicCost>(); TargetEffectiveness = new Collections.BListArray <BPowerTargetEffectiveness>(); Populations = new Collections.BTypeValuesSingle(BPopulation.kBListParamsSingle); Flags = new Collections.BBitSet(kFlagsParams); Flags2 = new Collections.BBitSet(kFlags2Params); IconLocations = new List <int>(); TechPrereqs = new List <int>(); ChildObjectIDs = new List <int>(); LevelData = new Collections.BListExplicitIndex <BProtoPowerDataLevel>(BProtoPowerDataLevel.kBListExplicitIndexParams); }
protected TriggerSystemProtoObject() { Params = new Collections.BListExplicitIndex <BTriggerParam>(BTriggerParam.kBListExplicitIndexParams); }
protected override void FinishTlsStreaming() { base.FinishTlsStreaming(); mList = null; }
protected TriggerScriptObjectWithArgs() { Args = new Collections.BListExplicitIndex <BTriggerArg>(BTriggerArg.kBListExplicitIndexParams); }