
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Using Multiple Entry Points to Version an Application
|
159
if (notificationObj != null)
{
notificationObj.FinishedProcessingGroup( );
}
Interface callbacks cannot always be used in place of delegates. The following list
indicates where to use each type of callback:
• Use a delegate if you require ease of coding over performance.
• Use the interface callback mechanism if you need potentially complex callbacks.
An example of this could be adding an interface with a single callback method
that will be used to call back into an overloaded method. The number and types
of parameters determine the method chosen.
• You need to perform a number of operations, not just a single operation (e.g., call-
ing
method1 to do some work, then calling method2 to do some more work, etc.).
See Also
See the “Interface Keyword,” “Base Class Usage Guidelines,” and “When to Use
Interfaces” topics in the MSDN documentation.
3.19 Using Multiple Entry Points to Version
an Application
Problem
Some companies reuse the same duplicated, but slightly modified, application, with
each version built especially for a particular client or group of clients. Bug fixes as
well as testing, adding, and modifying code in each of these code bases can get very
confusing as the number of duplicated applications grows. You need a way of