Ejemplo n.º 1
0
        public void CreateItem(string xtPath, string name)
        {
            RAIS rais = this.GetItemByXTPath(xtPath);

            if (rais != null)
            {
                rais.CreateItem(name);
            }
        }
Ejemplo n.º 2
0
        public void MoveBack(string xtPath)
        {
            RAIS rais = this.GetItemByXTPath(xtPath);

            if (rais != null)
            {
                rais.MoveBack();
            }
        }
Ejemplo n.º 3
0
        public void Assign(string xtPath, string propertyName, object value, object[] indexer)
        {
            RAIS rais = this.GetItemByXTPath(xtPath);

            if (rais != null)
            {
                rais.Assign(propertyName, value, indexer);
            }
        }
Ejemplo n.º 4
0
        public void RemoveItemByName(string xtPath, string name)
        {
            RAIS rais = this.GetItemByXTPath(xtPath);

            if (rais != null)
            {
                rais.RemoveItemByName(name);
            }
        }
Ejemplo n.º 5
0
        public void RemoveAll(string xtPath)
        {
            RAIS rais = this.GetItemByXTPath(xtPath);

            if (rais != null)
            {
                rais.RemoveAll();
            }
        }
Ejemplo n.º 6
0
        public void RemoveItem(string xtPath, object indexer)
        {
            RAIS rais = this.GetItemByXTPath(xtPath);

            if (rais != null)
            {
                rais.RemoveItem(indexer);
            }
        }
Ejemplo n.º 7
0
        public void SetCurrebtIndexer(string xtPath, object indexer)
        {
            RAIS rais = this.GetItemByXTPath(xtPath);

            if (rais != null)
            {
                rais.SetCurrebtIndexer(indexer);
            }
        }
Ejemplo n.º 8
0
        public void Invoke(string xtPath, string methodName, object[] ps)
        {
            RAIS rais = this.GetItemByXTPath(xtPath);

            if (rais != null)
            {
                rais.Invoke(methodName, ps);
            }
        }
Ejemplo n.º 9
0
        public virtual void RemoveEventHandler(string xtPath, string eventName, object methodOwner, string methodName)
        {
            RAIS rais = this.GetItemByXTPath(xtPath);

            if (rais != null)
            {
                rais.RemoveEventHandler(eventName, methodOwner, methodName);
            }
        }
Ejemplo n.º 10
0
        public object ItemByName(string xtPath, string name)
        {
            RAIS rais = this.GetItemByXTPath(xtPath);

            if (rais != null)
            {
                return(rais.Item(name));
            }
            return(null);
        }
Ejemplo n.º 11
0
        public object NewItem(string xtPath)
        {
            RAIS rais = this.GetItemByXTPath(xtPath);

            if (rais != null)
            {
                return(rais.NewItem());
            }
            return(null);
        }
Ejemplo n.º 12
0
        public object CurrentIndexer(string xtPath)
        {
            RAIS rais = this.GetItemByXTPath(xtPath);

            if (rais != null)
            {
                return(rais.CurrentIndexer());
            }
            return(null);
        }
Ejemplo n.º 13
0
        public object Item(string xtPath, object indexer)
        {
            RAIS rais = this.GetItemByXTPath(xtPath);

            if (rais != null)
            {
                return(rais.Item(indexer));
            }
            return(null);
        }
Ejemplo n.º 14
0
        public int ItemCount(string xtPath)
        {
            RAIS rais = this.GetItemByXTPath(xtPath);

            if (rais != null)
            {
                return(rais.itemCount);
            }
            return(0);
        }
Ejemplo n.º 15
0
        public virtual bool WorkOnAllInstances(string xtPath, delegateOnGetInstance handler, object data)
        {
            RAIS rais = this.GetItemByXTPath(xtPath);

            if (rais != null)
            {
                rais.WorkOnAllInstances(handler, data);
                return(true);
            }
            return(false);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// find the RAIS object by the specified path.
        /// </summary>
        /// <param name="xtPath">path format: ?name/?name/...
        /// ? is one of R, A, I, S
        /// </param>
        /// <returns></returns>
        public RAIS GetItemByXTPath(string xtPath)
        {
            RAIS   rais = this.Root;
            string s    = xtPath;

            while (!string.IsNullOrEmpty(s))
            {
                string name = VPLUtil.PopPath(ref s);
                //get one name in the format ?<name>
                rais = rais.GetSubClass(name);
            }
            return(rais);
        }
Ejemplo n.º 17
0
        protected virtual RAIS GetSubClass(string name)
        {
            RAIS   rais  = null;
            string sType = name.Substring(0, 1);
            string s     = name.Substring(1);

            if (sType == XML_A)
            {
                rais = AItem(s);
            }
            else if (sType == XML_R)
            {
                rais = RItem(s);
            }
            return(rais);
        }
Ejemplo n.º 18
0
        protected override RAIS GetSubClass(string name)
        {
            RAIS rais = base.GetSubClass(name);

            if (rais == null)
            {
                string sType = name.Substring(0, 1);
                string s     = name.Substring(1);
                if (sType == RAIS.XML_I)
                {
                    rais = IItem(s);
                }
                else if (sType == RAIS.XML_S)
                {
                    rais = SItem(s);
                }
            }
            return(rais);
        }
Ejemplo n.º 19
0
        public RAIS_R CreateI(string name)
        {
            object     instance = Activator.CreateInstance(this.Type);
            IComponent ic       = instance as IComponent;

            if (ic != null)
            {
                if (ic.Site == null)
                {
                    ic.Site = new XTypeSite(ic);
                }
                if (string.IsNullOrEmpty(name))
                {
                    int n = 2;
                    name = this.Type.Name + n.ToString();
                    RAIS container = this.ContainerType;
                    if (container != null)
                    {
                        name = container.CreateNewName(this.Type.Name);
                    }
                    else
                    {
                        name = this.CreateNewName(this.Type.Name);
                    }
                }
                ic.Site.Name = name;
            }
            RAIS_R r = new RAIS_R(name, instance, this);

            if (_i == null)
            {
                _i = new List <RAIS_R>();
            }
            _i.Add(r);
            return(r);
        }
Ejemplo n.º 20
0
 public RAIS_A(RAIS parentType)
     : base(parentType)
 {
 }
Ejemplo n.º 21
0
 public RAIS_A(string name, Type type, RAIS parentType)
     : base(name, type, parentType)
 {
 }
Ejemplo n.º 22
0
 /// <summary>
 /// to create a member of R/T
 /// </summary>
 /// <param name="name"></param>
 /// <param name="type"></param>
 /// <param name="parentType"></param>
 protected RAIS(string name, Type type, RAIS parentType)
 {
     _name       = name;
     _type       = type;
     _parentType = parentType;
 }
Ejemplo n.º 23
0
 /// <summary>
 /// create a member of R/A
 /// </summary>
 /// <param name="name"></param>
 /// <param name="type"></param>
 /// <param name="parentType"></param>
 public RAIS_R(string name, object instance, RAIS parentType)
     : base(name, instance.GetType(), parentType)
 {
     _object = instance;
 }
Ejemplo n.º 24
0
 /// <summary>
 /// for loading map. name and type will be read from XML
 /// </summary>
 /// <param name="parentType"></param>
 protected RAIS(RAIS parentType)
 {
     _name       = null;
     _type       = null;
     _parentType = parentType;
 }