예제 #1
0
        internal void AddDomain(byte[] id, string document, AppDomain app)
        {
            InitializeTable();

            IDKey k = new IDKey(id, document);

            _DomainsByID.Add(k, app);
        }
예제 #2
0
        internal AppDomain LocateDomain(byte[] id, string document)
        {
            InitializeTable();

            IDKey k = new IDKey(id, document);

            AppDomain result = (AppDomain)_DomainsByID[k];

            Log(this, result == null, "The domain does not exist.", "The domain does exist.");
            return(result);
        }
예제 #3
0
        public override bool Equals(object obj)
        {
            Manager.Log(this, true, "IDKEy::Equals", "");
            if (obj == this)
            {
                return(true);
            }
            IDKey other = (IDKey)obj;

            if (_Buffer == null)
            {
                if (other._Buffer != null)
                {
                    return(false);
                }
            }
            else
            {
                if (other._Buffer == null)
                {
                    return(false);
                }
            }

            Manager.Log(this, true, "Testing uniqueid", "");
            if (_Buffer != null)
            {
                if (other._Buffer.Length != _Buffer.Length)
                {
                    return(false);
                }
                for (int i = 0; i < _Buffer.Length; i++)
                {
                    if (other._Buffer[i] != _Buffer[i])
                    {
                        return(false);
                    }
                }
            }
            Manager.Log(this, true, "Uniqueid's are the same", "");

            if (_Url == null)
            {
                if (other._Url == null)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }

            if (other._Url == null)
            {
                return(false);
            }

            Manager.Log(this, true, "Others URL = " + other._Url, "");
            Manager.Log(this, true, "My URL = " + _Url, "");

            return(string.Compare(_Url, other._Url, true, CultureInfo.InvariantCulture) == 0);
        }