Esempio n. 1
0
        public void GetHierarchyName()
        {
            var hierarchyRoot = new HierarchyRoot();
            var hierarchyName = "GetThisName";

            HierarchyManager.AddHierarchy(hierarchyName, hierarchyRoot);
            Assert.AreEqual(HierarchyManager.GetHierarchyName(hierarchyRoot), hierarchyName);
        }
Esempio n. 2
0
        public void Initialize()
        {
            var hierarchyRoot = new HierarchyRoot();
            var ho1           = new ScriptObject();
            var ho2           = new WorldObject();
            var ho33          = new UIObject();
            var ho3           = new UIObject();

            ho3.AddChild("ho3.3", ho33);
            hierarchyRoot.AddChild("ho1", ho1);
            hierarchyRoot.AddChild("ho2", ho2);
            hierarchyRoot.AddChild("ho3", ho3);
            HierarchyManager.AddHierarchy("test", hierarchyRoot);
        }
        public static void RunWithImaginaryHierarchyObject(Assembly[] userAssemblies,
                                                           ImaginaryHierarchyObject rootHierarchyObject, bool raiseStartEvent = true)
        {
            if (IsRunning)
            {
                throw new Exception("Already running!");
            }

            #region Creating

            HierarchyManager.AddHierarchy(rootHierarchyObject.Name, (HierarchyObject)rootHierarchyObject.CreateInstance());

            #endregion

            Run(userAssemblies, raiseStartEvent);
        }