public sealed override DmdMethodInfo[] GetOtherMethods(DmdGetAccessorOptions options) { var f = ExtraFields; if (f.__otherMethods_DONT_USE == null) { InitializeEventMethods(); } var otherMethods = f.__otherMethods_DONT_USE; if (otherMethods.Count == 0) { return(Array.Empty <DmdMethodInfo>()); } if ((options & DmdGetAccessorOptions.All) != 0) { return(otherMethods.ToArray()); } var list = new List <DmdMethodInfo>(otherMethods.Count); foreach (var method in otherMethods) { var accessor = AccessorUtils.FilterAccessor(options, method); if ((object)accessor != null) { list.Add(accessor); } } return(list.Count == 0 ? Array.Empty <DmdMethodInfo>() : list.ToArray()); }
public sealed override DmdMethodInfo[] GetAccessors(DmdGetAccessorOptions options) { var f = ExtraFields; if (f.__otherMethods_DONT_USE == null) { InitializePropertyMethods(); } var list = new List <DmdMethodInfo>(); var accessor = AccessorUtils.FilterAccessor(options, f.__getMethod_DONT_USE); if ((object)accessor != null) { list.Add(accessor); } accessor = AccessorUtils.FilterAccessor(options, f.__setMethod_DONT_USE); if ((object)accessor != null) { list.Add(accessor); } foreach (var method in f.__otherMethods_DONT_USE) { accessor = AccessorUtils.FilterAccessor(options, method); if ((object)accessor != null) { list.Add(accessor); } } return(list.ToArray()); }
public sealed override DmdMethodInfo GetRemoveMethod(DmdGetAccessorOptions options) { var f = ExtraFields; if (f.__otherMethods_DONT_USE == null) { InitializeEventMethods(); } return(AccessorUtils.FilterAccessor(options, f.__removeMethod_DONT_USE)); }