It depends on a few things.
If a delegate will be used as an event, it should always be called a subtype of EventHandler , for example:
public delegate void ValueExtractingEventHandler(object sender, ValueExtractingEventArgs e);
If this is not an event, then the MS coding guide (which I can never find the right copy on Google) explicitly recommend not to include words such as "delegate" or "handler" in the delegate name, except in the special case of EventHandler types.
Typically, delegates should be named after actions that will be similar to ValueExtracting (if delegation occurs before the value is retrieved) or ValueExtracted (after retrieval).
The delegate syntax Func<T1, T2, ..., TResult> also becoming more common, but if you do not have 4 or more parameters that you need, you do not need to declare your rights at all - just use the existing one:
object ExtractObject(object source, Func<object, object> extractor);
This syntax is best when a delegate is used as a closure. The delegate itself does not have a very interesting name, but the argument is a noun of the agent (extractor, supplier, evaluator, selector, etc.).
Most delegate applications fit into one of the above categories, so find out which one it uses to select accordingly.
Aaronaught Feb 27 2018-10-12T00: 00Z
source share