public XElement ToXml(IToXmlContext ctx) { return(new XElement("WorkflowCondition", new XAttribute("Guid", Guid), new XAttribute("Name", Name), new XAttribute("MainEntityType", ctx.TypeToName(MainEntityType)), new XElement("Eval", new XElement("Script", new XCData(Eval.Script))))); }
public XElement ToXml(IToXmlContext ctx) { return(new XElement("WorkflowScript", new XAttribute("Guid", Guid), new XAttribute("Name", Name), new XAttribute("MainEntityType", ctx.TypeToName(MainEntityType)), new XElement("Eval", new XElement("Script", new XCData(Eval.Script)), string.IsNullOrEmpty(Eval.CustomTypes) ? null ! : new XElement("CustomTypes", new XCData(Eval.Script))) )); }
public XElement ToXml(IToXmlContext ctx) { return(new XElement("Workflow", new XAttribute("Guid", workflow.Guid), new XAttribute("Name", workflow.Name), new XAttribute("MainEntityType", ctx.TypeToName(workflow.MainEntityType.ToLite())), new XAttribute("MainEntityStrategies", workflow.MainEntityStrategies.ToString(",")), workflow.ExpirationDate == null ? null : new XAttribute("ExpirationDate", workflow.ExpirationDate.Value.ToString("o", CultureInfo.InvariantCulture)), this.pools.Values.Select(p => new XElement("Pool", new XAttribute("BpmnElementId", p.BpmnElementId), new XAttribute("Name", p.Name), p.Xml.ToXCData())), this.lanes.Values.Select(la => new XElement("Lane", new XAttribute("BpmnElementId", la.BpmnElementId), new XAttribute("Name", la.Name), new XAttribute("Pool", la.Pool.BpmnElementId), la.Actors.IsEmpty() ? null : new XElement("Actors", la.Actors.Select(a => new XElement("Actor", a.KeyLong()))), la.ActorsEval == null ? null : new XElement("ActorsEval", new XCData(la.ActorsEval.Script)), la.Xml.ToXCData())), this.activities.Values.Select(a => new XElement("Activity", new XAttribute("BpmnElementId", a.BpmnElementId), new XAttribute("Lane", a.Lane.BpmnElementId), new XAttribute("Name", a.Name), a.Comments == null ? null : new XAttribute("Comments", a.Comments), a.RequiresOpen == false ? null : new XAttribute("RequiresOpen", a.RequiresOpen), a.EstimatedDuration == null ? null : new XAttribute("EstimatedDuration", a.EstimatedDuration), a.ViewName == null ? null : new XAttribute("ViewName", a.ViewName), !a.ViewNameProps.Any() ? null : new XElement("ViewNameProps", a.ViewNameProps .Select(vnp => new XElement("ViewNameProp", new XAttribute("Name", vnp.Name), new XCData(vnp.Expression)))), a.UserHelp == null ? null : new XElement("UserHelp", new XCData(a.UserHelp)), a.SubWorkflow == null ? null : new XElement("SubWorkflow", new XAttribute("Workflow", ctx.Include(a.SubWorkflow.Workflow)), new XAttribute("SubEntitiesEval", new XCData(a.SubWorkflow.SubEntitiesEval.Script)) ) )) //TODO: Complete code )); }
public XElement ToXml(IToXmlContext ctx) { return(new XElement("Dashboard", new XAttribute("Guid", Guid), new XAttribute("DisplayName", DisplayName), EntityType == null ? null : new XAttribute("EntityType", ctx.TypeToName(EntityType)), Owner == null ? null : new XAttribute("Owner", Owner.Key()), DashboardPriority == null ? null : new XAttribute("DashboardPriority", DashboardPriority.Value.ToString()), EmbeddedInEntity == null ? null : new XAttribute("EmbeddedInEntity", EmbeddedInEntity.Value.ToString()), new XElement("Parts", Parts.Select(p => p.ToXml(ctx))))); }
public XElement ToXml(IToXmlContext ctx) { return(new XElement("UserChart", new XAttribute("Guid", Guid), new XAttribute("DisplayName", DisplayName), new XAttribute("Query", Query.Key), EntityType == null ? null : new XAttribute("EntityType", ctx.TypeToName(EntityType)), new XAttribute("HideQuickLink", HideQuickLink), Owner == null ? null : new XAttribute("Owner", Owner.Key()), new XAttribute("ChartScript", this.ChartScript.Key), Filters.IsNullOrEmpty() ? null : new XElement("Filters", Filters.Select(f => f.ToXml(ctx)).ToList()), new XElement("Columns", Columns.Select(f => f.ToXml(ctx)).ToList()), Parameters.IsNullOrEmpty() ? null : new XElement("Parameters", Parameters.Select(f => f.ToXml(ctx)).ToList()))); }
public XElement ToXml(IToXmlContext ctx) { return new XElement("UserChart", new XAttribute("Guid", Guid), new XAttribute("DisplayName", DisplayName), new XAttribute("Query", Query.Key), EntityType == null ? null : new XAttribute("EntityType", ctx.TypeToName(EntityType)), Owner == null ? null : new XAttribute("Owner", Owner.Key()), new XAttribute("ChartScript", ChartScript.Name), new XAttribute("GroupResults", GroupResults), Filters.IsNullOrEmpty() ? null : new XElement("Filters", Filters.Select(f => f.ToXml(ctx)).ToList()), new XElement("Columns", Columns.Select(f => f.ToXml(ctx)).ToList()), Orders.IsNullOrEmpty() ? null : new XElement("Orders", Orders.Select(f => f.ToXml(ctx)).ToList()), Parameters.IsNullOrEmpty() ? null : new XElement("Parameters", Parameters.Select(f => f.ToXml(ctx)).ToList())); }
public XElement ToXml(IToXmlContext ctx) { return(new XElement("UserQuery", new XAttribute("Guid", Guid), new XAttribute("DisplayName", DisplayName), new XAttribute("Query", Query.Key), EntityType == null ? null ! : new XAttribute("EntityType", ctx.TypeToName(EntityType)), Owner == null ? null ! : new XAttribute("Owner", Owner.Key()), !HideQuickLink ? null ! : new XAttribute("HideQuickLink", HideQuickLink), IncludeDefaultFilters == null ? null ! : new XAttribute("IncludeDefaultFilters", IncludeDefaultFilters.Value), !AppendFilters ? null ! : new XAttribute("AppendFilters", AppendFilters), !GroupResults ? null ! : new XAttribute("GroupResults", GroupResults), ElementsPerPage == null ? null ! : new XAttribute("ElementsPerPage", ElementsPerPage), PaginationMode == null ? null ! : new XAttribute("PaginationMode", PaginationMode), new XAttribute("ColumnsMode", ColumnsMode), Filters.IsNullOrEmpty() ? null ! : new XElement("Filters", Filters.Select(f => f.ToXml(ctx)).ToList()), Columns.IsNullOrEmpty() ? null ! : new XElement("Columns", Columns.Select(c => c.ToXml(ctx)).ToList()), Orders.IsNullOrEmpty() ? null ! : new XElement("Orders", Orders.Select(o => o.ToXml(ctx)).ToList()))); }
public XElement ToXml(IToXmlContext ctx) { return(new XElement("Dashboard", new XAttribute("Guid", Guid), new XAttribute("DisplayName", DisplayName), EntityType == null ? null ! : new XAttribute("EntityType", ctx.TypeToName(EntityType)), Owner == null ? null ! : new XAttribute("Owner", Owner.Key()), HideDisplayName == false ? null ! : new XAttribute("HideDisplayName", HideDisplayName.ToString()), DashboardPriority == null ? null ! : new XAttribute("DashboardPriority", DashboardPriority.Value.ToString()), EmbeddedInEntity == null ? null ! : new XAttribute("EmbeddedInEntity", EmbeddedInEntity.Value.ToString()), new XAttribute("CombineSimilarRows", CombineSimilarRows), CacheQueryConfiguration?.ToXml(ctx), new XElement("Parts", Parts.Select(p => p.ToXml(ctx))), new XElement(nameof(TokenEquivalencesGroups), TokenEquivalencesGroups.Select(teg => teg.ToXml(ctx))) )); }
public XElement ToXml(IToXmlContext ctx) { return(new XElement("Workflow", new XAttribute("Guid", workflow.Guid), new XAttribute("Name", workflow.Name), new XAttribute("MainEntityType", ctx.TypeToName(workflow.MainEntityType.ToLite())), new XAttribute("MainEntityStrategies", workflow.MainEntityStrategies.ToString(",")), workflow.ExpirationDate == null ? null ! : new XAttribute("ExpirationDate", workflow.ExpirationDate.Value.ToString("o", CultureInfo.InvariantCulture)), this.pools.Values.Select(p => new XElement("Pool", new XAttribute("BpmnElementId", p.BpmnElementId), new XAttribute("Name", p.Name), p.Xml.ToXml())), this.lanes.Values.Select(la => new XElement("Lane", new XAttribute("BpmnElementId", la.BpmnElementId), new XAttribute("Name", la.Name), new XAttribute("Pool", la.Pool.BpmnElementId), la.Actors.IsEmpty() ? null ! : new XElement("Actors", la.Actors.Select(a => new XElement("Actor", a.KeyLong() !))), la.ActorsEval == null ? null ! : new XElement("ActorsEval", new XCData(la.ActorsEval.Script)), la.Xml.ToXml())), this.activities.Values.Select(a => new XElement("Activity", new XAttribute("BpmnElementId", a.BpmnElementId), new XAttribute("Lane", a.Lane.BpmnElementId), new XAttribute("Name", a.Name), new XAttribute("Type", a.Type.ToString()), a.RequiresOpen == false ? null ! : new XAttribute("RequiresOpen", a.RequiresOpen), a.EstimatedDuration == null ? null ! : new XAttribute("EstimatedDuration", a.EstimatedDuration), string.IsNullOrEmpty(a.ViewName) ? null ! : new XAttribute("ViewName", a.ViewName), string.IsNullOrEmpty(a.Comments) ? null ! : new XElement("Comments", a.Comments), !a.ViewNameProps.Any() ? null ! : new XElement("ViewNameProps", a.ViewNameProps.Select(vnp => new XElement("ViewNameProp", new XAttribute("Name", vnp.Name), new XCData(vnp.Expression !))) ), !a.DecisionOptions.Any() ? null ! : new XElement("DecisionOptions", a.DecisionOptions.Select(cdo => cdo.ToXml("DecisionOption"))), a.CustomNextButton?.ToXml("CustomNextButton") !, string.IsNullOrEmpty(a.UserHelp) ? null ! : new XElement("UserHelp", new XCData(a.UserHelp)), a.SubWorkflow == null ? null ! : new XElement("SubWorkflow", new XAttribute("Workflow", ctx.Include(a.SubWorkflow.Workflow)), new XElement("SubEntitiesEval", new XCData(a.SubWorkflow.SubEntitiesEval.Script)) ), a.Script == null ? null ! : new XElement("Script", new XAttribute("Script", ctx.Include(a.Script.Script)), a.Script.RetryStrategy == null ? null ! : new XAttribute("RetryStrategy", ctx.Include(a.Script.RetryStrategy)) ), a.Xml.ToXml() )), this.gateways.Values.Select(g => new XElement("Gateway", new XAttribute("BpmnElementId", g.BpmnElementId), g.Name.HasText() ? new XAttribute("Name", g.Name) : null !, new XAttribute("Lane", g.Lane.BpmnElementId), new XAttribute("Type", g.Type.ToString()), new XAttribute("Direction", g.Direction.ToString()), g.Xml.ToXml())), this.events.Values.Select(e => new XElement("Event", new XAttribute("BpmnElementId", e.BpmnElementId), e.Name.HasText() ? new XAttribute("Name", e.Name) : null !, new XAttribute("Lane", e.Lane.BpmnElementId), new XAttribute("Type", e.Type.ToString()), e.Timer == null ? null ! : new XElement("Timer", e.Timer.Duration?.ToXml("Duration") !, e.Timer.Condition == null ? null ! : new XAttribute("Condition", ctx.Include(e.Timer.Condition))), e.BoundaryOf == null ? null ! : new XAttribute("BoundaryOf", this.activities.Values.SingleEx(a => a.Is(e.BoundaryOf)).BpmnElementId), e.Xml.ToXml()) ), this.connections.Values.Select(c => new XElement("Connection", new XAttribute("BpmnElementId", c.BpmnElementId), c.Name.HasText() ? new XAttribute("Name", c.Name) : null !, new XAttribute("Type", c.Type.ToString()), new XAttribute("From", c.From.BpmnElementId), new XAttribute("To", c.To.BpmnElementId), c.DecisionOptionName == null ? null ! : new XAttribute("CustomDecisionName", c.DecisionOptionName !), c.Condition == null ? null ! : new XAttribute("Condition", ctx.Include(c.Condition)), c.Action == null ? null ! : new XAttribute("Action", ctx.Include(c.Action)), c.Order == null ? null ! : new XAttribute("Order", c.Order), c.Xml.ToXml())) )); }
public XElement ToXml(IToXmlContext ctx) { return new XElement("Dashboard", new XAttribute("Guid", Guid), new XAttribute("DisplayName", DisplayName), EntityType == null ? null : new XAttribute("EntityType", ctx.TypeToName(EntityType)), Owner == null ? null : new XAttribute("Owner", Owner.Key()), DashboardPriority == null ? null : new XAttribute("DashboardPriority", DashboardPriority.Value.ToString()), EmbeddedInEntity == null ? null : new XAttribute("EmbeddedInEntity", EmbeddedInEntity.Value.ToString()), new XElement("Parts", Parts.Select(p => p.ToXml(ctx)))); }
public XElement ToXml(IToXmlContext ctx) { return new XElement("UserQuery", new XAttribute("Guid", Guid), new XAttribute("DisplayName", DisplayName), new XAttribute("Query", Query.Key), EntityType == null ? null : new XAttribute("EntityType", ctx.TypeToName(EntityType)), Owner == null ? null : new XAttribute("Owner", Owner.Key()), WithoutFilters == true ? null : new XAttribute("WithoutFilters", true), ElementsPerPage == null ? null : new XAttribute("ElementsPerPage", ElementsPerPage), PaginationMode == null ? null : new XAttribute("PaginationMode", PaginationMode), new XAttribute("ColumnsMode", ColumnsMode), Filters.IsNullOrEmpty() ? null : new XElement("Filters", Filters.Select(f => f.ToXml(ctx)).ToList()), Columns.IsNullOrEmpty() ? null : new XElement("Columns", Columns.Select(c => c.ToXml(ctx)).ToList()), Orders.IsNullOrEmpty() ? null : new XElement("Orders", Orders.Select(o => o.ToXml(ctx)).ToList())); }
public XElement ToXml(IToXmlContext ctx) { return(new XElement("UserQuery", new XAttribute("Guid", Guid), new XAttribute("DisplayName", DisplayName), new XAttribute("Query", Query.Key), EntityType == null ? null : new XAttribute("EntityType", ctx.TypeToName(EntityType)), Owner == null ? null : new XAttribute("Owner", Owner.Key()), WithoutFilters == true ? null : new XAttribute("WithoutFilters", true), ElementsPerPage == null ? null : new XAttribute("ElementsPerPage", ElementsPerPage), PaginationMode == null ? null : new XAttribute("PaginationMode", PaginationMode), new XAttribute("ColumnsMode", ColumnsMode), Filters.IsNullOrEmpty() ? null : new XElement("Filters", Filters.Select(f => f.ToXml(ctx)).ToList()), Columns.IsNullOrEmpty() ? null : new XElement("Columns", Columns.Select(c => c.ToXml(ctx)).ToList()), Orders.IsNullOrEmpty() ? null : new XElement("Orders", Orders.Select(o => o.ToXml(ctx)).ToList()))); }