Exemplo n.º 1
0
 protected override void AddMembers(MemberTypes memberType, ICollection <MemberInfo> dest)
 {
     if (_myUseTypeNameAsNamespace == false)
     {
         MemberInfo[] members = _myType.FindMembers(memberType, _myBindFlags, this.AlwaysMemberFilter, null);
         ImportBase.AddMemberRange(members, dest);
     }
 }
Exemplo n.º 2
0
        internal Type FindType(string[] typeNameParts)
        {
            string[] namespaces = new string[typeNameParts.Length - 1];
            string   typeName   = typeNameParts[typeNameParts.Length - 1];

            System.Array.Copy(typeNameParts, namespaces, namespaces.Length);
            ImportBase currentImport = MyRootImport;

            foreach (string ns in namespaces)
            {
                currentImport = currentImport.FindImport(ns);
                if (currentImport == null)
                {
                    break; // TODO: might not be correct. Was : Exit For
                }
            }

            return(currentImport?.FindType(typeName));
        }
Exemplo n.º 3
0
        protected override bool EqualsInternal(ImportBase import)
        {
            MethodImport otherSameType = import as MethodImport;

            return((otherSameType != null) && _myMethod.MethodHandle.Equals(otherSameType._myMethod.MethodHandle));
        }
Exemplo n.º 4
0
        protected override bool EqualsInternal(ImportBase import)
        {
            TypeImport otherSameType = import as TypeImport;

            return((otherSameType != null) && object.ReferenceEquals(_myType, otherSameType._myType));
        }
Exemplo n.º 5
0
 protected override void AddMembers(string memberName, MemberTypes memberType, ICollection <MemberInfo> dest)
 {
     MemberInfo[] members = _myType.FindMembers(memberType, _myBindFlags, this.Context.Options.MemberFilter, memberName);
     ImportBase.AddMemberRange(members, dest);
 }