System.Reflection.Associates.IncludeAccessor C# (CSharp) Method

IncludeAccessor() static private method

static private IncludeAccessor ( MethodInfo associate, bool nonPublic ) : bool
associate MethodInfo
nonPublic bool
return bool
        internal static bool IncludeAccessor(MethodInfo associate, bool nonPublic)
        {
            if (associate == null)
                return false;

            if (nonPublic)
                return true;

            if (associate.IsPublic)
                return true;

            return false;
        }

Usage Example

Esempio n. 1
0
        public override MethodInfo[] GetAccessors(bool nonPublic)
        {
            List <MethodInfo> accessorList = new List <MethodInfo>();

            if (Associates.IncludeAccessor(m_getterMethod, nonPublic))
            {
                accessorList.Add(m_getterMethod);
            }

            if (Associates.IncludeAccessor(m_setterMethod, nonPublic))
            {
                accessorList.Add(m_setterMethod);
            }

            if ((object)m_otherMethod != null)
            {
                for (int i = 0; i < m_otherMethod.Length; i++)
                {
                    if (Associates.IncludeAccessor(m_otherMethod[i] as MethodInfo, nonPublic))
                    {
                        accessorList.Add(m_otherMethod[i]);
                    }
                }
            }
            return(accessorList.ToArray());
        }
All Usage Examples Of System.Reflection.Associates::IncludeAccessor