Tweaking notification messages

--HG--
branch : dev
This commit is contained in:
Renaud Paquay
2010-07-24 15:03:13 -07:00
parent 677cfd3c6f
commit 768037b659
5 changed files with 10 additions and 10 deletions

View File

@@ -42,9 +42,9 @@ namespace OrchardCLI {
}
private CommandHostContext CommandHostContext() {
_output.WriteLine("Initializing Orchard session... (This might take a few seconds)");
_output.WriteLine("Initializing Orchard session. (This might take a few seconds...)");
var result = _commandHostContextProvider.CreateContext();
if (result.StartSessionResult == 240/*special return code for "Retry"*/) {
if (result.StartSessionResult == result.RetryResult) {
result = _commandHostContextProvider.CreateContext();
}
return result;
@@ -55,7 +55,7 @@ namespace OrchardCLI {
return context;
int result = RunCommandInSession(context, command);
if (result == 240/*special return code for "Retry"*/) {
if (result == context.RetryResult) {
_commandHostContextProvider.Shutdown(context);
context = CommandHostContext();
result = RunCommandInSession(context, command);
@@ -71,8 +71,8 @@ namespace OrchardCLI {
return context.CommandHost.RunCommandInSession(_input, _output, context.Logger, args);
}
catch (AppDomainUnloadedException) {
_output.WriteLine("AppDomain of Orchard session has been unloaded. Retrying...");
return 240;/*special return code for "Retry"*/
_output.WriteLine("AppDomain of Orchard session has been unloaded. (Retrying...)");
return context.RetryResult;
}
}
}

View File

@@ -7,6 +7,7 @@ using Orchard.Host;
namespace OrchardCLI {
public class CommandHostContext {
public int StartSessionResult { get; set; }
public int RetryResult { get; set; }
public OrchardParameters Arguments { get; set; }
public DirectoryInfo OrchardDirectory { get; set; }
public ApplicationManager AppManager { get; set; }

View File

@@ -22,6 +22,7 @@ namespace OrchardCLI {
public CommandHostContext CreateContext() {
var context = new CommandHostContext();
context.RetryResult = 240;/*special return code for "Retry"*/
Initialize(context);
return context;
}