示例#1
0
        internal RemoteTypeBrowserInfo(NetTypeBrowserInfo wrapped, RemoteNamespaceBrowserInfo ns, string name)
        {
            Debug.Assert(wrapped != null && ns != null && name != null,
                         "wrapped != null && ns != null && name != null");

            m_wrapped   = wrapped;
            m_namespace = ns;
            m_name      = name;
        }
示例#2
0
        public override int CompareTo(object obj)
        {
            if (!(obj is RemoteNamespaceBrowserInfo))
            {
                throw new ArgumentException("Object must be of type '" + GetType().FullName + "'.", "obj");
            }

            RemoteNamespaceBrowserInfo other = (RemoteNamespaceBrowserInfo)obj;

            return(Wrapped.CompareTo(other.Wrapped));
        }
示例#3
0
        internal RemoteTypeBrowserInfo GetRemoteType(NetTypeBrowserInfo realType)
        {
            if (realType == null)
            {
                return(null);
            }

            NetNamespaceBrowserInfo realNs = realType.NamespaceInternal;

            RemoteAssemblyBrowserInfo  assembly = new RemoteAssemblyBrowserInfo(((NetAssemblyBrowserInfo)realNs.Repository).FilePath, this);
            RemoteNamespaceBrowserInfo ns       = new RemoteNamespaceBrowserInfo(realNs, assembly, realNs.DisplayName);

            return(new RemoteTypeBrowserInfo(realType, ns, realType.FullName));
        }
示例#4
0
        public override bool Equals(object obj)
        {
            NetNamespaceBrowserInfo other = obj as NetNamespaceBrowserInfo;

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

            // The other object may be a RemoteNamespaceBrowserInfo or just a NetNamespaceBrowserInfo.

            RemoteNamespaceBrowserInfo otherRemote = other as RemoteNamespaceBrowserInfo;

            if (otherRemote == null)
            {
                return(object.Equals(Wrapped, other));
            }
            else
            {
                return(object.Equals(Wrapped, otherRemote.Wrapped));
            }
        }