コード例 #1
0
 protected override void AddMembers(MemberTypes memberType, ICollection <MemberInfo> dest)
 {
     if (_myUseTypeNameAsNamespace == false)
     {
         var members = _myType.FindAllMembers(memberType, _myBindFlags, this.AlwaysMemberFilter, null);
         ImportBase.AddMemberRange(members, dest);
     }
 }
コード例 #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));
        }
コード例 #3
0
        protected override bool EqualsInternal(ImportBase import)
        {
            MethodImport otherSameType = import as MethodImport;

            return((otherSameType != null) && _myMethod.MethodHandle.Equals(otherSameType._myMethod.MethodHandle));
        }
コード例 #4
0
        protected override bool EqualsInternal(ImportBase import)
        {
            TypeImport otherSameType = import as TypeImport;

            return((otherSameType != null) && object.ReferenceEquals(_myType, otherSameType._myType));
        }
コード例 #5
0
        protected override void AddMembers(string memberName, MemberTypes memberType, ICollection <MemberInfo> dest)
        {
            var members = _myType.FindAllMembers(memberType, _myBindFlags, this.Context.Options.MemberFilter, memberName);

            ImportBase.AddMemberRange(members, dest);
        }