static private GetEventInfo ( System.Reflection.MonoEvent ev ) : |
||
ev | System.Reflection.MonoEvent | |
리턴 |
public override MethodInfo[] GetOtherMethods(bool nonPublic) { MonoEventInfo info = MonoEventInfo.GetEventInfo(this); if (nonPublic) { return(info.other_methods); } int num_public = 0; foreach (MethodInfo m in info.other_methods) { if (m.IsPublic) { num_public++; } } if (num_public == info.other_methods.Length) { return(info.other_methods); } MethodInfo[] res = new MethodInfo [num_public]; num_public = 0; foreach (MethodInfo m in info.other_methods) { if (m.IsPublic) { res [num_public++] = m; } } return(res); }
public override MethodInfo[] GetOtherMethods(bool nonPublic) { MonoEventInfo eventInfo = MonoEventInfo.GetEventInfo(this); if (nonPublic) { return(eventInfo.other_methods); } int num = 0; foreach (MethodInfo methodInfo in eventInfo.other_methods) { if (methodInfo.IsPublic) { num++; } } if (num == eventInfo.other_methods.Length) { return(eventInfo.other_methods); } MethodInfo[] array = new MethodInfo[num]; num = 0; foreach (MethodInfo methodInfo2 in eventInfo.other_methods) { if (methodInfo2.IsPublic) { array[num++] = methodInfo2; } } return(array); }
public override MethodInfo GetRaiseMethod(bool nonPublic) { MonoEventInfo info = MonoEventInfo.GetEventInfo(this); if (nonPublic || (info.raise_method != null && info.raise_method.IsPublic)) { return(info.raise_method); } return(null); }
public override MethodInfo GetRemoveMethod(bool nonPublic) { MonoEventInfo eventInfo = MonoEventInfo.GetEventInfo(this); if (nonPublic || (eventInfo.remove_method != null && eventInfo.remove_method.IsPublic)) { return(eventInfo.remove_method); } return(null); }
#pragma warning restore 169 internal override BindingFlags GetBindingFlags() { MonoEventInfo info = MonoEventInfo.GetEventInfo(this); MethodInfo method = info.add_method; if (method == null) { method = info.remove_method; } if (method == null) { method = info.raise_method; } return(RuntimeType.FilterPreCalculate(method != null && method.IsPublic, GetDeclaringTypeInternal() != ReflectedType, method != null && method.IsStatic)); }