Notification Services—Creating a Generator

Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio


Jump to: navigation, search
CSharp-Online.NET:Articles
Database Articles

Notification Services

© 2006 O'Reilly Media, Inc.

Creating a Generator

A generator named StockWatchGenerator is created in the CreateGenerator( ) method of Example 18-1. The code follows:

private static void CreateGenerator( )
{
  // create a new generator for the application
  Generator g = new Generator
    (a, "StockWatchGenerator");
  g.SystemName = nsServer;
  a.Generator = g;
  Console.WriteLine
    ("Created generator: " + g.Name);
}

The Generator object represents the generator for a Notification Services application. The Generator property of the Application class returns the generator for the application. You have to specify the Generator property of the Application object before adding the application to the Notification Services instance. An application has only one generator, which handles rule processing for the application.

The SystemName property of the Generator class must be specified, and cannot be any of the following: localhost, ., an IP address, or any string containing a backslash (\).


Previous_Page_.gif Next_Page_.gif


Personal tools