Updates to include returning the next step in sequence

This commit is contained in:
Shannon
2014-03-05 10:32:59 +11:00
parent 0d93db5f1f
commit 24ceb5ce2d
5 changed files with 166 additions and 30 deletions

View File

@@ -0,0 +1,42 @@
using System.Runtime.Serialization;
namespace Umbraco.Web.Install.Models
{
/// <summary>
/// Returned to the UI for each installation step that is completed
/// </summary>
[DataContract(Name = "result", Namespace = "")]
public class InstallProgressResultModel
{
public InstallProgressResultModel(bool processComplete, string stepCompleted, string nextStep, string view = null, object viewModel = null)
{
ProcessComplete = processComplete;
StepCompleted = stepCompleted;
NextStep = nextStep;
ViewModel = viewModel;
View = view;
}
/// <summary>
/// The UI view to show when this step executes, by default no views are shown for the completion of a step unless explicitly specified.
/// </summary>
[DataMember(Name = "view")]
public string View { get; private set; }
[DataMember(Name = "complete")]
public bool ProcessComplete { get; set; }
[DataMember(Name = "stepCompleted")]
public string StepCompleted { get; set; }
[DataMember(Name = "nextStep")]
public string NextStep { get; set; }
/// <summary>
/// The view model to return to the UI if this step is returning a view (optional)
/// </summary>
[DataMember(Name = "model")]
public object ViewModel { get; private set; }
}
}

View File

@@ -2,11 +2,13 @@ using System.Collections.Generic;
namespace Umbraco.Web.Install.Models
{
/// <summary>
/// The object returned from each installation step
/// </summary>
public class InstallSetupResult
{
public InstallSetupResult()
{
{
}
public InstallSetupResult(IDictionary<string, object> savedStepData, string view, object viewModel = null)