Example #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);
     }
 }
Example #2
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();
        }