Chat Support
Loupe - Log - Monitor - Resolve
Gibraltar.Agent.Configuration Namespace / AgentConfiguration Class
Members Example

In This Topic
    AgentConfiguration Class
    In This Topic
    The top level configuration class for all Agent configuration. Supplied during a Log.Initializing event.
    Object Model
    AgentConfiguration ClassAutoSendConsentConfiguration ClassEmailConfiguration ClassExportFileConfiguration ClassListenerConfiguration ClassNetworkViewerConfiguration ClassPackagerConfiguration ClassPublisherConfiguration ClassServerConfiguration ClassSessionFileConfiguration ClassViewerConfiguration Class
    Syntax
    'Declaration
     
    
    Public NotInheritable Class AgentConfiguration 
    public sealed class AgentConfiguration 
    Remarks
    This object is created by the agent and supplied to user code during the Log.Initializing event to allow for configuration to be determined in code at runtime. This configuration is applied over whatever has been configured in the application configuration file.
    Example
    You can supply some or all of your configuration information during the Log.Initializing event. In this example, the Loupe Server configuration is being done at runtime during this event.
    /// <summary>
    /// The primary program entry point.
    /// </summary>
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        public static void Main()
        {
            Log.Initializing += Log_Initializing;
     
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Thread.CurrentThread.Name = "User Interface Main";  //set the thread name before our first call that logs on this thread.
     
            Log.StartSession("Starting Gibraltar Analyst");
     
            //here you actual start up your application
     
            //and if we got to this point, we done good and can mark the session as being not crashed :)
            Log.EndSession("Exiting Gibraltar Analyst");
        }
     
        static void Log_Initializing(object sender, LogInitializingEventArgs e)
        {
            //and configure Loupe Server Connection
            ServerConfiguration server = e.Configuration.Server;
            server.UseGibraltarService = true;
            server.CustomerName = "Gibraltar Software";
            server.AutoSendSessions = true;
            server.SendAllApplications = true;
            server.PurgeSentSessions = true;
        }
    }
    Inheritance Hierarchy

    System.Object
       Gibraltar.Agent.Configuration.AgentConfiguration

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also