Beispiel #1
0
        private static void Main(string[] args)
        {
            var subserviceList = CreateSubservices(1, 2);

            foreach (var subservice in subserviceList)
            {
                foreach (var version in subservice.SubserviceVersions)
                {
                    Console.WriteLine("Generate Tree");
                    using (var editor = new ParentChildApi())
                    {
                        var tree0 = editor.GenerateTteeVm(4, 5, version.Version);
                        editor.TreePrint(tree0);
                        editor.WriteTree(version.Id, tree0);
                    }
                    using (var operatr = new ParentChildApi())
                    {
                        Console.WriteLine();
                        Console.WriteLine("Read Tree");
                        var tree1 = operatr.ReadTree(version.Id);
                        operatr.TreePrint(tree1);
                    }
                }
            }
            Console.ReadKey();
            new ParentChildApi().DeleteData();


//            var versions = new Context().SubserviceVersions.Where(x => x.Version != null);
//
//            foreach (var version in versions)
//            {
//                Console.WriteLine("Generate Tree");
//                using (var editor = new ApiParentChild())
//                {
//                    var tree0 = editor.GenerateTteeVm(4, 5, version.Version);
//                    editor.TreePrint(tree0);
//                    editor.SaveTree(tree0, version.Id);
//                }
//                using (var operatr = new ApiParentChild())
//                {
//                    Console.WriteLine();
//                    Console.WriteLine("Read Tree");
//                    var tree1 = operatr.GetTreeVm(version.Id);
//                    operatr.TreePrint(tree1);
//                }
//                break;
//            }
//
//
//            Console.ReadKey();
//            new ApiParentChild().DeleteData();
        }
Beispiel #2
0
        private static void Main(string[] args)
        {
            var subserviceList = CreateSubservices(1, 2);
            foreach (var subservice in subserviceList)
            {
                foreach (var version in subservice.SubserviceVersions)
                {
                    Console.WriteLine("Generate Tree");
                    using (var editor = new ParentChildApi())
                    {
                        var tree0 = editor.GenerateTteeVm(4, 5, version.Version);
                        editor.TreePrint(tree0);
                        editor.WriteTree(version.Id, tree0);
                    }
                    using (var operatr = new ParentChildApi())
                    {
                        Console.WriteLine();
                        Console.WriteLine("Read Tree");
                        var tree1 = operatr.ReadTree(version.Id);
                        operatr.TreePrint(tree1);
                    }
                }
            }
            Console.ReadKey();
            new ParentChildApi().DeleteData();

            //            var versions = new Context().SubserviceVersions.Where(x => x.Version != null);
            //
            //            foreach (var version in versions)
            //            {
            //                Console.WriteLine("Generate Tree");
            //                using (var editor = new ApiParentChild())
            //                {
            //                    var tree0 = editor.GenerateTteeVm(4, 5, version.Version);
            //                    editor.TreePrint(tree0);
            //                    editor.SaveTree(tree0, version.Id);
            //                }
            //                using (var operatr = new ApiParentChild())
            //                {
            //                    Console.WriteLine();
            //                    Console.WriteLine("Read Tree");
            //                    var tree1 = operatr.GetTreeVm(version.Id);
            //                    operatr.TreePrint(tree1);
            //                }
            //                break;
            //            }
            //
            //
            //            Console.ReadKey();
            //            new ApiParentChild().DeleteData();
        }