public IEnumerable <IMethod> GetConstructors(Predicate <IMethod> filter = null, GetMemberOptions options = GetMemberOptions.IgnoreInheritedMembers) { if (Kind == TypeKind.Void) { return(EmptyList <IMethod> .Instance); } if (ComHelper.IsComImport(this)) { IType coClass = ComHelper.GetCoClass(this); using (var busyLock = BusyManager.Enter(this)) { if (busyLock.Success) { return(coClass.GetConstructors(filter, options) .Select(m => new SpecializedMethod(m, m.Substitution) { DeclaringType = this })); } } return(EmptyList <IMethod> .Instance); } if ((options & GetMemberOptions.IgnoreInheritedMembers) == GetMemberOptions.IgnoreInheritedMembers) { return(GetFiltered(this.Methods, ExtensionMethods.And(m => m.IsConstructor && !m.IsStatic, filter))); } else { return(GetMembersHelper.GetConstructors(this, filter, options)); } }
public virtual IEnumerable <IMethod> GetMethods(Predicate <IUnresolvedMethod> filter = null, GetMemberOptions options = GetMemberOptions.None) { if ((options & GetMemberOptions.IgnoreInheritedMembers) == GetMemberOptions.IgnoreInheritedMembers) { return(GetFilteredMethods(ExtensionMethods.And(m => !m.IsConstructor, filter))); } else { return(GetMembersHelper.GetMethods(this, filter, options)); } }
public IEnumerable <IMethod> GetMethods(Predicate <IMethod> filter = null, GetMemberOptions options = GetMemberOptions.None) { if (Kind == TypeKind.Void) { return(EmptyList <IMethod> .Instance); } if ((options & GetMemberOptions.IgnoreInheritedMembers) == GetMemberOptions.IgnoreInheritedMembers) { return(GetFiltered(this.Methods, ExtensionMethods.And(m => !m.IsConstructor, filter))); } else { return(GetMembersHelper.GetMethods(this, filter, options)); } }