Game Development Reference
In-Depth Information
For COM support, you will again notice the COM attributes set on the class. Also,
make sure that the project Configuration Properties has the Register for COM
Interop flag enabled.
This module fits into the “Specific Tool Logic” category in Figure 8.1.
Alert Object Console
We can begin discussing entry points now that the specific tool logic has been
developed. The first entry point covered will be the command line console, which
is widely used for automated build processes or batch processes. Some developers
also have a personal preference for using console applications over GUI applications.
This example is quite simple; it takes in a 1, 2, or 3 and spits out the formatted alert
message from the associated call to the tool logic.
Here is the code for the console entry point:
using AlertObjectTool;
[STAThread]
static void Main(string[] args)
{
// Very simple input parameter.
// Either 1, 2, or 3
// 1: GetFirstAlertObjectName()
// 2: GetSecondAlertObjectName()
// 3: GetThirdAlertObjectName()
if (args.Length >= 1)
{
AlertObjectToolLogic logic = new AlertObjectToolLogic();
switch (args[0].Trim())
{
case “1”:
{
Console.Write(logic.GetFirstAlertObjectName());
break;
}
Search Nedrilad ::




Custom Search