Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ FilterApplyBase()

static bool System.RuntimeType.FilterApplyBase ( MemberInfo memberInfo,
BindingFlags bindingFlags,
bool isPublic,
bool isNonProtectedInternal,
bool isStatic,
string name,
bool prefixLookup )
inlinestaticprivate

Definition at line 1930 of file RuntimeType.cs.

1931 {
1932 if (isPublic)
1933 {
1934 if ((bindingFlags & BindingFlags.Public) == 0)
1935 {
1936 return false;
1937 }
1938 }
1939 else if ((bindingFlags & BindingFlags.NonPublic) == 0)
1940 {
1941 return false;
1942 }
1943 bool flag = (object)memberInfo.DeclaringType != memberInfo.ReflectedType;
1944 if ((bindingFlags & BindingFlags.DeclaredOnly) != 0 && flag)
1945 {
1946 return false;
1947 }
1948 if (memberInfo.MemberType != MemberTypes.TypeInfo && memberInfo.MemberType != MemberTypes.NestedType)
1949 {
1950 if (isStatic)
1951 {
1952 if ((bindingFlags & BindingFlags.FlattenHierarchy) == 0 && flag)
1953 {
1954 return false;
1955 }
1956 if ((bindingFlags & BindingFlags.Static) == 0)
1957 {
1958 return false;
1959 }
1960 }
1961 else if ((bindingFlags & BindingFlags.Instance) == 0)
1962 {
1963 return false;
1964 }
1965 }
1966 if (prefixLookup && !FilterApplyPrefixLookup(memberInfo, name, (bindingFlags & BindingFlags.IgnoreCase) != 0))
1967 {
1968 return false;
1969 }
1970 if ((bindingFlags & BindingFlags.DeclaredOnly) == 0 && flag && isNonProtectedInternal && (bindingFlags & BindingFlags.NonPublic) != 0 && !isStatic && (bindingFlags & BindingFlags.Instance) != 0)
1971 {
1973 if (methodInfo == null)
1974 {
1975 return false;
1976 }
1977 if (!methodInfo.IsVirtual && !methodInfo.IsAbstract)
1978 {
1979 return false;
1980 }
1981 }
1982 return true;
1983 }
static bool FilterApplyPrefixLookup(MemberInfo memberInfo, string name, bool ignoreCase)

References System.RuntimeType.FilterApplyPrefixLookup().

Referenced by System.RuntimeType.FilterApplyType().