コード例 #1
0
        public void TableCreation()
        {
            Energy.Base.Collection.Table <string, object> t = new Energy.Base.Collection.Table <string, object>();
            var r1 = t.New();

            r1["a"] = "b";
            r1[0]   = "x";
            r1["b"] = "c";
            r1.Append("", "X");
            r1.Append("", "Y");
            //r1.Add("x");
            //var v1 = r1.New();
            //v1 = "A";
            var v2 = r1[0];

            r1[0] = "B";
            var  v3  = r1[0];
            bool eq1 = //v1 == v2 &&
                       v2 == v3;

            Assert.IsTrue(eq1);
            var r2 = t.New();

            Assert.IsNotNull(t);
            Assert.IsNotNull(r1);
            Assert.IsNotNull(r2);
        }
コード例 #2
0
ファイル: Test.cs プロジェクト: zoltraks/energy-core-csharp
        public void SerializeCollectionTable()
        {
            DataTable dt = new DataTable();

            Energy.Base.Collection.Table <string, object> x = new Energy.Base.Collection.Table <string, object>();
            x.New().Set(0, 1).Set(1, 2);
            x.New().Set(0, 2).Set(1, 4);
            string xml;

            xml = Energy.Base.Xml.Serialize(x);
            Console.WriteLine(xml);
        }