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); } }
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)); }
protected override bool EqualsInternal(ImportBase import) { MethodImport otherSameType = import as MethodImport; return((otherSameType != null) && _myMethod.MethodHandle.Equals(otherSameType._myMethod.MethodHandle)); }
protected override bool EqualsInternal(ImportBase import) { TypeImport otherSameType = import as TypeImport; return((otherSameType != null) && object.ReferenceEquals(_myType, otherSameType._myType)); }
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); }