예제 #1
0
        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());
            }
        }
예제 #2
0
 public void SetCalcChain(CT_CalcChain calcchain)
 {
     this.calcChain = calcchain;
 }
예제 #3
0
 internal CalcChainDocument(CT_CalcChain calcChain)
 {
     this.calcChain = calcChain;
 }
예제 #4
0
 public CalcChainDocument()
 {
     this.calcChain = new CT_CalcChain();
 }
예제 #5
0
        public void ReadFrom(XmlDocument xml)
        {
            CalcChainDocument doc = CalcChainDocument.Parse(xml, NamespaceManager);
            chain = doc.GetCalcChain();

        }
예제 #6
0
        public CalculationChain()
            : base()
        {

            chain = new CT_CalcChain();
        }
예제 #7
0
        public void ReadFrom(Stream is1)
        {
            CalcChainDocument doc = CalcChainDocument.Parse(is1);
            chain = doc.GetCalcChain();

        }
예제 #8
0
 public void SetCalcChain(CT_CalcChain calcchain)
 {
     this.calcChain = calcchain;
 }
예제 #9
0
 internal CalcChainDocument(CT_CalcChain calcChain)
 {
     this.calcChain = calcChain;
 }
예제 #10
0
 public CalcChainDocument()
 {
     this.calcChain = new CT_CalcChain();
 }
예제 #11
0
        public static CalcChainDocument Parse(Stream stream)
        {
            CT_CalcChain obj = (CT_CalcChain)serializerObj.Deserialize(stream);

            return(new CalcChainDocument(obj));
        }