public static CreateTaskmanager Bind(XmlDocument xmlDocument)
{
XmlNodeList xmlStepInfos = xmlDocument.GetElementsByTagName("stepInfo");
CreateTaskmanager tm = new CreateTaskmanager();
tm.StepInfos = new List<StepInfo>();
foreach (XmlNode xmlStepInfo in xmlStepInfos)
{
StepInfo si = new StepInfo(xmlStepInfo.Attributes.GetNamedItem("title").Value)
{
Id = tm.GenerateStepId(),
Parent = tm.Root,
IsInstanze = true,
HasContent = true,
GetActionInfo = new ActionInfo
{
ActionName = xmlStepInfo.Attributes.GetNamedItem("action").Value,
ControllerName = xmlStepInfo.Attributes.GetNamedItem("controller").Value,
AreaName = xmlStepInfo.Attributes.GetNamedItem("area").Value
},
PostActionInfo = new ActionInfo
{
ActionName = xmlStepInfo.Attributes.GetNamedItem("action").Value,
ControllerName = xmlStepInfo.Attributes.GetNamedItem("controller").Value,
AreaName = xmlStepInfo.Attributes.GetNamedItem("area").Value
}
};
tm.StepInfos.Add(si);
tm.Root.Children.Add(si);
}
tm.currentStepInfo = tm.Root.Children.First();
return tm;
}