Game Development Reference
In-Depth Information
[Guid(“6E789399-D074-407a-8715-6C72A3C70D7F”)]
[ClassInterface(ClassInterfaceType.None)]
[ProgId(“AlertObjectToolInterface.IgnoreMe”)]
public class AlertObjectToolBase : IAlertObjectToolLogic
{
public string GetFirstAlertObjectName()
{
return String.Empty;
}
public string GetSecondAlertObjectName()
{
return String.Empty;
}
public string GetThirdAlertObjectName()
{
return String.Empty;
}
}
This module fits into the “Specific Tool Logic” category in Figure 8.1.
Note
Any assemblies that expose components to COM must have Register for COM Interop enabled in
the project Configuration Properties.
Alert Object Tool
It is fairly obvious that an interface alone will not offer any useful functionality to
users, so the next step is to build the tool implementation. This module can be
considered the meat of the tool, because all logic specific to the tool in question
resides within this module. Just like the interface, this assembly can be registered
for COM Interop if desired.
This module references the entity definitions and processing assemblies, as well as
the interface definition it needs to implement. The example provided is very sim-
ple, with three methods that each returns a different formatted alert string. Each
method instantiates a SimpleObject entity definition with the name specified, and
then passes the entity off for processing, returning the alert string.
 
Search Nedrilad ::




Custom Search