/// <summary> /// Removes a OnPostSortDelegate /// See docs for AddOnPostSortDelegate() /// </summary> /// <param name="del">An OnPostSortDelegate</param> public void RemoveOnPostSortDelegate(OnPostSortDelegate del) { this.onPostSortDelegates -= del; }
/// <summary> /// Runs just before returning the targets list to allow for custom sorting. /// The delegate signature is: delegate(TargetList targets) /// See TargetTracker documentation for usage of the provided '...' /// This will only allow a delegate to be added once. /// **This will only allow a delegate to be added once.** /// </summary> /// <param name="del">An OnPostSortDelegate</param> public void AddOnPostSortDelegate(OnPostSortDelegate del) { this.onPostSortDelegates -= del; // Cheap way to ensure unique (add only once) this.onPostSortDelegates += del; }
/// <summary> /// This replaces all older delegates rather than adding a new one to the list. /// See docs for AddOnPostSortDelegate() /// </summary> /// <param name="del">An OnPostSortDelegate</param> public void SetOnPostSortDelegate(OnPostSortDelegate del) { this.onPostSortDelegates = del; }
/// <summary> /// Runs just before returning the targets list to allow for custom sorting. /// The delegate signature is: delegate(TargetList targets) /// See TargetTracker documentation for usage of the provided '...' /// </summary> /// <param name="del">An OnPostSortDelegate</param> public void AddOnPostSortDelegate(OnPostSortDelegate del) { this.onPostSortDelegates += del; }