Exemplo n.º 1
0
        private Dictionary <string, int> CreateSourceStructure2(Folder srcParent)
        {
            var ids = new Dictionary <string, int>();
            var f1  = new Folder(srcParent)
            {
                Name = "F1", Description = "SystemFlagTest"
            }; f1.Save(); ids.Add(f1.Name, f1.Id);

            {
                var f2 = new Folder(f1)
                {
                    Name = "F2", Description = "SystemFlagTest"
                }; f2.Save(); ids.Add(f2.Name, f2.Id);
                {
                    f2.AllowChildType(nameof(TestSystemFolder), true, save: true);
                    var s5 = new TestSystemFolder(f2)
                    {
                        Name = "S5", Description = "SystemFlagTest"
                    }; s5.Save(); ids.Add(s5.Name, s5.Id);
                    {
                        var f11 = new Folder(s5)
                        {
                            Name = "F11", Description = "SystemFlagTest"
                        }; f11.Save(); ids.Add(f11.Name, f11.Id);
                        var f12 = new Folder(s5)
                        {
                            Name = "F12", Description = "SystemFlagTest"
                        }; f12.Save(); ids.Add(f12.Name, f12.Id);
                    }
                    var f6 = new Folder(f2)
                    {
                        Name = "F6", Description = "SystemFlagTest"
                    }; f6.Save(); ids.Add(f6.Name, f6.Id);
                }
                var s3 = new TestSystemFolder(f1)
                {
                    Name = "S3", Description = "SystemFlagTest"
                }; s3.Save(); ids.Add(s3.Name, s3.Id);
                {
                    var f7 = new Folder(s3)
                    {
                        Name = "F7", Description = "SystemFlagTest"
                    }; f7.Save(); ids.Add(f7.Name, f7.Id);
                    var f8 = new Folder(s3)
                    {
                        Name = "F8", Description = "SystemFlagTest"
                    }; f8.Save(); ids.Add(f8.Name, f8.Id);
                }
                var f4 = new Folder(f1)
                {
                    Name = "F4", Description = "SystemFlagTest"
                }; f4.Save(); ids.Add(f4.Name, f4.Id);
                {
                    var f9 = new Folder(f4)
                    {
                        Name = "F9", Description = "SystemFlagTest"
                    }; f9.Save(); ids.Add(f9.Name, f9.Id);
                    var f10 = new Folder(f4)
                    {
                        Name = "F10", Description = "SystemFlagTest"
                    }; f10.Save(); ids.Add(f10.Name, f10.Id);
                }
            }

            return(ids);
        }