internal void InvokeOnSerializing(object obj, StreamingContext context) => InvokeOnDelegate(obj, context, _onSerializingMethods);
public void RegisterObject(object obj) { SerializationEvents serializationEventsForType = SerializationEventsCache.GetSerializationEventsForType(obj.GetType()); if (serializationEventsForType.HasOnSerializingEvents && this.m_objectSeenTable[obj] == null) { this.m_objectSeenTable[obj] = true; serializationEventsForType.InvokeOnSerializing(obj, this.m_context); this.AddOnSerialized(obj); } }