public void SerializeCalcChainDocumentTest() { var calcChain = new CT_CalcChain(); { var cell1 = new CT_CalcCell(); cell1.r = "E1"; cell1.i = 1; calcChain.AddC(cell1); } { var cell1 = new CT_CalcCell(); cell1.r = "D1"; calcChain.AddC(cell1); } { var cell1 = new CT_CalcCell(); cell1.r = "C1"; calcChain.AddC(cell1); } using (StringWriter stream = new StringWriter()) { CT_CalcChain_Accessor.serializer.Serialize(stream, calcChain, CT_CalcChain_Accessor.namespaces); string expected = @"<?xml version=""1.0"" encoding=""utf-16""?> <calcChain xmlns=""http://schemas.openxmlformats.org/spreadsheetml/2006/main""> <c r=""E1"" i=""1"" /> <c r=""D1"" /> <c r=""C1"" /> </calcChain>"; Assert.AreEqual(expected, stream.ToString()); } }
public void SetCalcChain(CT_CalcChain calcchain) { this.calcChain = calcchain; }
internal CalcChainDocument(CT_CalcChain calcChain) { this.calcChain = calcChain; }
public CalcChainDocument() { this.calcChain = new CT_CalcChain(); }
public void ReadFrom(XmlDocument xml) { CalcChainDocument doc = CalcChainDocument.Parse(xml, NamespaceManager); chain = doc.GetCalcChain(); }
public CalculationChain() : base() { chain = new CT_CalcChain(); }
public void ReadFrom(Stream is1) { CalcChainDocument doc = CalcChainDocument.Parse(is1); chain = doc.GetCalcChain(); }
public static CalcChainDocument Parse(Stream stream) { CT_CalcChain obj = (CT_CalcChain)serializerObj.Deserialize(stream); return(new CalcChainDocument(obj)); }