Ejemplo n.º 1
0
        public void AddOverride(uint mid, uint omid)
        {
            if (!_factory.getExist(mid) || !_factory.getExist(omid))
            {
                throw new LimException("", "The end point of the override edge does not exist");
            }
            Nodes.Base.Base mnode = _factory.getRef(mid);
            Nodes.Base.Base onode = _factory.getRef(omid);

            if (Common.getIsMethod(mnode) && Common.getIsMethod(onode))
            {
                if (!_overrides.ContainsKey(mid))
                {
                    OverrideStruct oStruct = new OverrideStruct();
                    oStruct.Flag = FlagType.Single;
                    oStruct.Id   = omid;
                    _overrides.Add(mid, oStruct);
                }
                else
                {
                    if (_overrides[mid].Flag == FlagType.Single)
                    {
                        uint id = _overrides[mid].Id;
                        _overrides[mid].List.AddLast(id);
                        _overrides[mid].Flag = FlagType.Multi;
                    }
                }
            }
            else
            {
                throw new LimException("", "Invalid NodeKind (" + mnode.NodeKind + " " + onode.NodeKind + ")");
            }
        }
Ejemplo n.º 2
0
         public static string GetFullPath(Nodes.Physical.FSEntry node, char separator = '\\')
        {
            string str = node.Name;

            Nodes.Base.Base n = node.Factory.getRef(node.Parent);
            while (n != null)
            {
                if (!getIsFSEntry(n))
                {
                    break;
                }
                string name = (n as Nodes.Physical.FSEntry).Name;
                if (name == "/" || name == "\\")
                {
                    str = name + str;
                }
                else
                {
                    str = name + separator + str;
                }
                n = n.Factory.getRef(n.Parent);
            }

            return(str);
        }