private static StageElement WriteSelectorView(SelectorView sv) { var sve = new StageElement( ElementName.SelectorView, SerializationMaster.Stage(ElementName.ViewArea, sv.viewArea)); sve.AddTextValue(ElementName.Name, sv.name); sve.AddTextValue(ElementName.Description, sv.description); var qualifierViews = sv.qualifierViews; int qvCount = qualifierViews.Count; for (int i = 0; i < qvCount; i++) { var qv = WriteQualifierView(qualifierViews[i]); sve.Add(qv); } var defQv = WriteQualifierView(sv.defaultQualifierView); sve.Add(defQv); return(sve); }
private static StageElement WriteAILinkView(AILinkView lv) { var lve = new StageElement( ElementName.AILinkView, SerializationMaster.Stage(ElementName.ViewArea, lv.viewArea), SerializationMaster.ToStageAttribute(AttributeName.Id, lv.aiId)); lve.AddTextValue(ElementName.Name, lv.name); lve.AddTextValue(ElementName.Description, lv.description); return(lve); }
private static StageElement WriteQualifierView(QualifierView qv) { var name = qv.isDefault ? ElementName.DefaultQualifier : ElementName.QualifierView; var qve = new StageElement(name); qve.AddTextValue(ElementName.Name, qv.name); qve.AddTextValue(ElementName.Description, qv.description); var av = qv.actionView; if (av != null) { var ae = WriteActionView(av); qve.Add(ae); } return(qve); }
private static StageElement WriteActionView(ActionView av) { var ae = new StageElement(ElementName.ActionView); ae.AddTextValue(ElementName.Name, av.name); ae.AddTextValue(ElementName.Description, av.description); if (av is SelectorActionView) { ae.AddAttribute(AttributeName.ConnectorType, ConnectorType.Selector); } else if (av is AILinkActionView) { ae.AddAttribute(AttributeName.ConnectorType, ConnectorType.AILink); } else if (av is CompositeActionView) { ae.AddAttribute(AttributeName.ConnectorType, ConnectorType.Composite); } return(ae); }