Ejemplo n.º 1
0
        public override void Execute()
        {
            try
            {
#if DEBUG
                System.Diagnostics.Debugger.Launch();
#endif
                this.Validate();

                string app             = base.Args["Application"];
                string formattedString = CommandResources.GetFormattedString(CommandResources.ResourceID.DeployApp, new object[] { string.IsNullOrEmpty(app) ? "Adapter" : "Application", string.IsNullOrEmpty(app) ? base.Args["Adapter"] : base.Args["Application"], base.Args["Action"] });
                base.WriteLogEntry(LogEntryType.Information, formattedString);

                // Deploy the BizTalk application
                GUIBTSDeployPSHost.Run(base.Args);

                formattedString = CommandResources.GetFormattedString(CommandResources.ResourceID.DeployAppSuccess, new object[] { string.IsNullOrEmpty(app) ? "Adapter" : "Application", string.IsNullOrEmpty(app) ? base.Args["Adapter"] : base.Args["Application"], base.Args["Action"] });
                base.WriteLogEntry(LogEntryType.Information, formattedString);

                base.commandResult = new CommandResult();
            }
            catch (Exception exception2)
            {
                base.ShowError(exception2);
                base.commandResult = new CommandResult(exception2);
                if (((exception2 is OutOfMemoryException) || (exception2 is StackOverflowException)))
                {
                    throw;
                }
            }
        }
Ejemplo n.º 2
0
 public override void Execute()
 {
     try
     {
         string[] values = base.Args.GetValues((string)null);
         if ((values != null) && (values.Length > 0))
         {
             string str = values[0];
             throw new CommandLineArgumentException(CommandResources.GetFormattedString(CommandResources.ResourceID.UnknownCommand, new object[] { str }), null, TraceLevel.Error);
         }
         this.WriteUsage();
         base.commandResult = new CommandResult();
     }
     catch (Exception exception)
     {
         Trace.WriteLine(exception.ToString());
         base.WriteLogEntry(LogEntryType.Error, exception.Message);
         base.commandResult = new CommandResult(exception);
         if ((exception is OutOfMemoryException) || (exception is StackOverflowException))
         {
             throw;
         }
     }
 }
Ejemplo n.º 3
0
 public override void WriteUsageHint()
 {
     System.Console.WriteLine(CommandResources.GetFormattedString(CommandResources.ResourceID.ProgramUsageHint, new object[] { this.Name }));
 }