Example #1
0
        public static void Main()
        {
            string path = "../../../TestData/";
            Console.WriteLine("Start CStorage");
            DStorage storage = new DStorage();
            storage.Init(GetConfig(path));

            Console.WriteLine(storage.GetPhotoFileName("iiss://[email protected]/0001/0001/0002", "s"));
            DbAdapter adapter = new XmlDbAdapter(); //null;//new PBEAdapter();

            storage.InitAdapter(adapter);
            storage.LoadFromCassettesExpress();
            var qu = storage.SearchByName("Марчук");
            foreach (var rec in qu)
            {
                Console.WriteLine(rec.ToString());
            }
            // Марчук А.Г. id = w20070417_5_8436
            string id = "w20070417_5_8436";
            var xx = storage.GetItemByIdBasic(id, true);
            Console.WriteLine(xx.ToString());

            XElement format = new XElement("record",
                new XElement("field", new XAttribute("prop", "http://fogid.net/o/name")),
                new XElement("field", new XAttribute("prop", "http://fogid.net/o/from-date")),
                new XElement("inverse", new XAttribute("prop", "http://fogid.net/o/participant"),
                    new XElement("record",
                        new XElement("field", new XAttribute("prop", "http://fogid.net/o/role")),
                        new XElement("direct", new XAttribute("prop", "http://fogid.net/o/in-org"),
                            new XElement("record",
                                new XElement("field", new XAttribute("prop", "http://fogid.net/o/name")))))),
                null);
            var yy = storage.GetItemById(id, format);
            Console.WriteLine(yy.ToString());
        }
Example #2
0
 protected void Application_Start(object sender, EventArgs e)
 {
       RouteTable.Routes.MapMvcAttributeRoutes();
       //string path = "../../../TestData/";
     string path = @"C:\cassettes\";
       Storage = new DStorage();
       Storage.Init(GetConfig(path));
       DBAdapter adapter = new XmlDbAdapter(); //null;//new PBEAdapter();
       Storage.InitAdapter(adapter);
       Storage.LoadFromCassettesExpress();
 }
Example #3
0
        public static void Main()
        {
            string path = "../../../TestData/";

            Console.WriteLine("Start CStorage");
            DStorage storage = new DStorage();

            storage.Init(GetConfig(path));

            Console.WriteLine(storage.GetPhotoFileName("iiss://[email protected]/0001/0001/0002", "s"));
            DbAdapter adapter = new XmlDbAdapter(); //null;//new PBEAdapter();

            storage.InitAdapter(adapter);
            storage.LoadFromCassettesExpress();
            var qu = storage.SearchByName("Марчук");

            foreach (var rec in qu)
            {
                Console.WriteLine(rec.ToString());
            }
            // Марчук А.Г. id = w20070417_5_8436
            string id = "w20070417_5_8436";
            var    xx = storage.GetItemByIdBasic(id, true);

            Console.WriteLine(xx.ToString());

            XElement format = new XElement("record",
                                           new XElement("field", new XAttribute("prop", "http://fogid.net/o/name")),
                                           new XElement("field", new XAttribute("prop", "http://fogid.net/o/from-date")),
                                           new XElement("inverse", new XAttribute("prop", "http://fogid.net/o/participant"),
                                                        new XElement("record",
                                                                     new XElement("field", new XAttribute("prop", "http://fogid.net/o/role")),
                                                                     new XElement("direct", new XAttribute("prop", "http://fogid.net/o/in-org"),
                                                                                  new XElement("record",
                                                                                               new XElement("field", new XAttribute("prop", "http://fogid.net/o/name")))))),
                                           null);
            var yy = storage.GetItemById(id, format);

            Console.WriteLine(yy.ToString());
        }