public void EmPropertyCollectionList_WithMultiEntries_FromString_GetExpected() { const string testValue = "NestedComplexList:" + "(" + "Nstring:Val1;" + "Nint:2;" + ")," + "(" + "Nstring:Val3;," + "Nint:4;" + ");"; var compList = new EmPropertyCollectionList <TestSimpleCollection>("NestedComplexList"); compList.FromString(testValue); Assert.AreEqual(2, compList.Count); Assert.AreEqual("Val1", ((EmProperty <string>)compList[0]["Nstring"]).Value); Assert.AreEqual(2, ((EmProperty <int>)compList[0]["Nint"]).Value); Assert.AreEqual("Val3", ((EmProperty <string>)compList[1]["Nstring"]).Value); Assert.AreEqual(4, ((EmProperty <int>)compList[1]["Nint"]).Value); }
public CyBioReactorSaveData(ICollection <EmProperty> definitions) : base(MainKey, definitions) { _materials = (EmPropertyCollectionList <EmModuleSaveData>)Properties[MaterialsKey]; }
public CyBioReactorSaveData(ICollection <EmProperty> definitions) : base("CyBioReactor", definitions) { _batteryCharge = (EmProperty <float>)Properties[ReactorBatterChargeKey]; _boosterCount = (EmProperty <int>)Properties[BoostCountKey]; _materials = (EmPropertyCollectionList <EmModuleSaveData>)Properties[MaterialsKey]; }