/// <summary> /// Use this method to register a callback method that will be called when fully updated hooks are needed. /// </summary> /// <param name="id"> /// The id of the callback method. This ensures that only one callback is registered /// for each id. /// </param> /// <param name="dirtyHooksCallbackDelegate"></param> /// <exclude /> public static void RegisterDirtyCallback(string id, DirtyHooksCallbackDelegate dirtyHooksCallbackDelegate) { using (GlobalInitializerFacade.CoreIsInitializedScope) { _hookingFacade.RegisterDirtyCallback(id, dirtyHooksCallbackDelegate); } }
public void RegisterDirtyCallback(string id, DirtyHooksCallbackDelegate dirtyHooksCallbackDelegate) { Verify.ArgumentNotNull(dirtyHooksCallbackDelegate, "dirtyHooksCallbackDelegate"); lock (_lock) { if (!_dirtyHooksCallbackDelegates.ContainsKey(id)) { _dirtyHooksCallbackDelegates.Add(id, dirtyHooksCallbackDelegate); } } }