internal static void DetachListener(ActivityListener listener) { s_allListeners.Remove(listener); s_activeSources.EnumWithAction((source, obj) => source._listeners?.Remove((ActivityListener)obj), listener); }