|
using System;
using System.Collections;
using System.ComponentModel;
using System.Configuration.Install;
using System.Resources;
using System.Reflection;
namespace Microsoft.ApplicationBlocks.ExceptionManagement
{
/// <summary>
/// Installer class used to create two event sources for the
/// Exception Management Application Block to function correctly.
/// </summary>
[RunInstaller(true)]
public class ExceptionManagerInstaller : System.Configuration.Install.Installer
{
private System.Diagnostics.EventLogInstaller exceptionManagerEventLogInstaller;
private System.Diagnostics.EventLogInstaller exceptionManagementEventLogInstaller;
private static ResourceManager resourceManager = new ResourceManager(typeof(ExceptionManager).Namespace + ".ExceptionManagerText",Assembly.GetAssembly(typeof(ExceptionManager)));
/// <summary>
/// Constructor with no params.
/// </summary>
public ExceptionManagerInstaller()
{
// Initialize variables.
InitializeComponent();
}
/// <summary>
/// Initialization function to set internal variables.
/// </summary>
private void InitializeComponent()
{
this.exceptionManagerEventLogInstaller = new System.Diagnostics.EventLogInstaller();
this.exceptionManagementEventLogInstaller = new System.Diagnostics.EventLogInstaller();
//
// exceptionManagerEventLogInstaller
//
this.exceptionManagerEventLogInstaller.Log = "Application";
this.exceptionManagerEventLogInstaller.Source = resourceManager.GetString("RES_EXCEPTIONMANAGER_INTERNAL_EXCEPTIONS");
//
// exceptionManagementEventLogInstaller
//
this.exceptionManagementEventLogInstaller.Log = "Application";
this.exceptionManagementEventLogInstaller.Source = resourceManager.GetString("RES_EXCEPTIONMANAGER_PUBLISHED_EXCEPTIONS");
this.Installers.AddRange(new System.Configuration.Install.Installer[] {
this.exceptionManagerEventLogInstaller,
this.exceptionManagementEventLogInstaller});
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Had worked as analyst programmer for 4 years. Now helping in family business but still involved actively in .Net development whenever there is a free time.