public static void AddPreLoadListener(this Configuration configuration, IPreLoadEventListener listener) { var newArray = new[] { listener }; if (configuration.EventListeners.PreLoadEventListeners == null) { configuration.EventListeners.PreLoadEventListeners = newArray; } else { configuration.EventListeners.PreLoadEventListeners = configuration.EventListeners.PreLoadEventListeners.Union(newArray).ToArray(); } }
public static void AddPreLoadListener(this Configuration configuration, IPreLoadEventListener listener) { var newArray = new[] { listener }; if (configuration.EventListeners.PreLoadEventListeners == null) { configuration.EventListeners.PreLoadEventListeners = newArray; } else { configuration.EventListeners.PreLoadEventListeners = configuration.EventListeners.PreLoadEventListeners.Union(newArray).ToArray(); } }
public void PreLoadEventListener(IPreLoadEventListener listener) { modifyConfiguration = c => c.AddPreLoadListener(listener); }