Ejemplo n.º 1
0
        private void PreProcessUIGroup(UIGroup content, Dictionary <string, string> shared)
        {
            var sharedNode = content.SharedProperties;

            if (sharedNode != null)
            {
                foreach (var att in sharedNode.Attributes)
                {
                    shared.Add(att.Key, att.Value);
                }
            }

            var type    = typeof(UIScript);
            var funcSig = new Type[] { typeof(UINode) };

            foreach (var child in content.Children)
            {
                child.AddAtts(shared);
                if (child is UIGroup)
                {
                    PreProcessUIGroup((UIGroup)child, CollectionUtils.Clone(shared));
                }

                if (child.ID != null && child.Name != "SetControlProperties")
                {
                    NodesByID[child.ID] = child;
                }
            }
        }
Ejemplo n.º 2
0
        public object Clone()
        {
            Handbook handbook = (Handbook)this.MemberwiseClone();

            handbook.items = CollectionUtils.Clone(items);
            return(handbook);
        }
        public object Clone()
        {
            HandbookGroup handbookGroup = (HandbookGroup)this.MemberwiseClone();

            handbookGroup.handbooks    = CollectionUtils.Clone(handbooks);
            handbookGroup.handbookRefs = CollectionUtils.Clone(handbookRefs);
            return(handbookGroup);
        }
        public void TestCloneSuccess()
        {
            var studentList = CollectionsMockBuilder.GetValidStudentsList();
            var actual      = CollectionUtils.Clone(studentList);
            var newStudent  = new Student("newName", 1, "10th");

            actual.Add(newStudent);
            Assert.IsTrue(!studentList.Contains(newStudent));
            Assert.IsTrue(actual.Contains(newStudent));
        }
Ejemplo n.º 5
0
        public override object Clone()
        {
            Config config = (Config)this.MemberwiseClone();

            config.guiConfig        = (GuiConfig)guiConfig.Clone();
            config.departmentConfig = (DepartmentConfig)departmentConfig.Clone();
            config.handbookGroups   = CollectionUtils.Clone(handbookGroups);
            config.reportBuilders   = CollectionUtils.Clone(reportBuilders);
            config.reports          = CollectionUtils.Clone(reports);
            config.exportTables     = CollectionUtils.Clone(exportTables);
            config.permissions      = CollectionUtils.Clone(permissions);
            config.taskTypes        = CollectionUtils.Clone(taskTypes);
            return(config);
        }