private static void InvokeOnDelegate(object obj, StreamingContext context, List<MethodInfo> methods) { Debug.Assert(obj != null, "object should have been initialized"); AddOnDelegate(obj, null, methods)?.Invoke(context); }