コード例 #1
0
 internal void InstallEventManifest()
 {
     try
     {
         if (ManageEventManifest.UpdateMessageDllPath(this.CrimsonEventManifestFile, this.CrimsonEventMsgDll, this.CrimsonEventProviderName))
         {
             ManageEventManifest.Install(this.CrimsonEventManifestFile);
         }
         else
         {
             base.WriteError(new InvalidOperationException(Strings.EventManifestNotUpdated(this.CrimsonEventManifestFile, this.CrimsonEventMsgDll, this.CrimsonEventProviderName)), ErrorCategory.InvalidOperation, null);
         }
         if (ManageEventManifest.UpdateMessageDllPath(this.DbFailureItemEventManifestFile, this.DbFailureItemEventMsgDll, this.DbFailureItemProviderName))
         {
             ManageEventManifest.Install(this.DbFailureItemEventManifestFile);
         }
         else
         {
             base.WriteError(new InvalidOperationException(Strings.EventManifestNotUpdated(this.DbFailureItemEventManifestFile, this.DbFailureItemEventMsgDll, this.DbFailureItemProviderName)), ErrorCategory.InvalidOperation, null);
         }
     }
     catch (InvalidOperationException exception)
     {
         base.WriteError(exception, ErrorCategory.InvalidOperation, null);
     }
 }
コード例 #2
0
 protected void UninstallEventManifest()
 {
     try
     {
         ManageEventManifest.Uninstall(this.DbFailureItemEventManifestFile);
         ManageEventManifest.Uninstall(this.CrimsonEventManifestFile);
     }
     catch (InvalidOperationException exception)
     {
         base.WriteError(exception, ErrorCategory.InvalidOperation, null);
     }
 }
コード例 #3
0
        protected override void InternalProcessRecord()
        {
            TaskLogger.LogEnter();
            string manifestName = Path.Combine(ConfigurationContext.Setup.InstallPath, this.DefinitionXml);

            try
            {
                ManageEventManifest.Uninstall(manifestName);
            }
            catch (InvalidOperationException exception)
            {
                base.WriteError(exception, ErrorCategory.InvalidOperation, null);
            }
            TaskLogger.LogExit();
        }
コード例 #4
0
        protected override void InternalProcessRecord()
        {
            TaskLogger.LogEnter();
            string text  = Path.Combine(ConfigurationContext.Setup.InstallPath, this.DefinitionXml);
            string text2 = Path.Combine(ConfigurationContext.Setup.InstallPath, this.MessageDll);

            try
            {
                if (ManageEventManifest.UpdateMessageDllPath(text, text2, this.ProviderName))
                {
                    ManageEventManifest.Install(text);
                }
                else
                {
                    base.WriteError(new InvalidOperationException(Strings.EventManifestNotUpdated(text, text2, this.ProviderName)), ErrorCategory.InvalidOperation, null);
                }
            }
            catch (InvalidOperationException exception)
            {
                base.WriteError(exception, ErrorCategory.InvalidOperation, null);
            }
            TaskLogger.LogExit();
        }
コード例 #5
0
 internal static void SetChannelAttribute(string verb, string channelName, string arguments)
 {
     ManageEventManifest.DoWevtutilAction(string.Format("{0} {1} {2}", verb, channelName, arguments));
 }
コード例 #6
0
 internal static void Uninstall(string manifestName)
 {
     ManageEventManifest.DoManifestAction(manifestName, "uninstall-manifest");
 }