コード例 #1
0
 /// <summary>
 /// Determines if a member is valid for this repository.
 /// </summary>
 /// <param name="memberInfo">The member to test.</param>
 /// <returns><c>true</c> if the member is valid.</returns>
 protected bool MemberFilter(MemberInfo memberInfo)
 {
     if (memberInfo == null)
         return false;
     if (memberInfo.GetExternalVisibility() == ExternalVisibilityKind.Hidden)
         return false;
     if (memberInfo is MethodBase)
         return MemberFilter((MethodBase)memberInfo);
     if (memberInfo is FieldInfo)
         return MemberFilter((FieldInfo)memberInfo);
     if (memberInfo is EventInfo)
         return MemberFilter((EventInfo)memberInfo);
     if (memberInfo is PropertyInfo)
         return MemberFilter((PropertyInfo)memberInfo);
     if (memberInfo is Type)
         return MemberFilter((Type)memberInfo);
     return memberInfo.GetExternalVisibility() != ExternalVisibilityKind.Hidden;
 }
コード例 #2
0
 private ExternalVisibilityKind GetVisibility(MemberInfo memberInfo) {
     return memberInfo.GetExternalVisibility();
 }