public virtual IEnumerable <IMethod> GetAccessors(Predicate <IUnresolvedMethod> filter = null, GetMemberOptions options = GetMemberOptions.None)
 {
     if ((options & GetMemberOptions.IgnoreInheritedMembers) == GetMemberOptions.IgnoreInheritedMembers)
     {
         return(GetFilteredAccessors(filter));
     }
     else
     {
         return(GetMembersHelper.GetAccessors(this, filter, options));
     }
 }
 public virtual IEnumerable <IEvent> GetEvents(Predicate <IUnresolvedEvent> filter = null, GetMemberOptions options = GetMemberOptions.None)
 {
     if ((options & GetMemberOptions.IgnoreInheritedMembers) == GetMemberOptions.IgnoreInheritedMembers)
     {
         return(GetFilteredNonMethods <IUnresolvedEvent, IEvent>(filter));
     }
     else
     {
         return(GetMembersHelper.GetEvents(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));
     }
 }
Beispiel #4
0
 public IEnumerable <IMethod> GetAccessors(Predicate <IMethod> filter = null, GetMemberOptions options = GetMemberOptions.None)
 {
     if ((options & GetMemberOptions.IgnoreInheritedMembers) == GetMemberOptions.IgnoreInheritedMembers)
     {
         return(EmptyList <IMethod> .Instance);
     }
     else
     {
         return(GetMembersHelper.GetAccessors(this, FilterNonStatic(filter), options));
     }
 }
        public IEnumerable <IType> GetNestedTypes(Predicate <ITypeDefinition> filter = null, GetMemberOptions options = GetMemberOptions.None)
        {
            const GetMemberOptions opt = GetMemberOptions.IgnoreInheritedMembers | GetMemberOptions.ReturnMemberDefinitions;

            if ((options & opt) == opt)
            {
                return(GetFiltered(this.NestedTypes, filter));
            }
            else
            {
                return(GetMembersHelper.GetNestedTypes(this, filter, options));
            }
        }
 public IEnumerable <IMethod> GetAccessors(Predicate <IMethod> filter = null, GetMemberOptions options = GetMemberOptions.None)
 {
     if (Kind == TypeKind.Void)
     {
         return(EmptyList <IMethod> .Instance);
     }
     if ((options & GetMemberOptions.IgnoreInheritedMembers) == GetMemberOptions.IgnoreInheritedMembers)
     {
         return(GetFilteredAccessors(filter));
     }
     else
     {
         return(GetMembersHelper.GetAccessors(this, filter, options));
     }
 }
 public IEnumerable <IProperty> GetProperties(Predicate <IProperty> filter = null, GetMemberOptions options = GetMemberOptions.None)
 {
     if (Kind == TypeKind.Void)
     {
         return(EmptyList <IProperty> .Instance);
     }
     if ((options & GetMemberOptions.IgnoreInheritedMembers) == GetMemberOptions.IgnoreInheritedMembers)
     {
         return(GetFiltered(this.Properties, filter));
     }
     else
     {
         return(GetMembersHelper.GetProperties(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));
     }
 }
Beispiel #9
0
 public IEnumerable <IMethod> GetConstructors(Predicate <IUnresolvedMethod> filter = null, GetMemberOptions options = GetMemberOptions.IgnoreInheritedMembers)
 {
     if ((options & GetMemberOptions.IgnoreInheritedMembers) == GetMemberOptions.IgnoreInheritedMembers)
     {
         if (this.HasDefaultConstructorConstraint || this.HasValueTypeConstraint)
         {
             if (filter == null || filter(DefaultUnresolvedMethod.DummyConstructor))
             {
                 return(new [] { DefaultResolvedMethod.GetDummyConstructor(compilation, this) });
             }
         }
         return(EmptyList <IMethod> .Instance);
     }
     else
     {
         return(GetMembersHelper.GetConstructors(this, filter, options));
     }
 }
 public IEnumerable <IType> GetNestedTypes(IReadOnlyList <IType> typeArguments, Predicate <ITypeDefinition> filter = null, GetMemberOptions options = GetMemberOptions.None)
 {
     return(GetMembersHelper.GetNestedTypes(this, typeArguments, filter, options));
 }
Beispiel #11
0
 public virtual IEnumerable <IMethod> GetMethods(IList <IType> typeArguments, Predicate <IUnresolvedMethod> filter = null, GetMemberOptions options = GetMemberOptions.None)
 {
     return(GetMembersHelper.GetMethods(this, typeArguments, filter, options));
 }