protected override object process() { var project = new SingleContentProject(Text); if(ProjBxl.hasContent()) { project.ConfigureFromXml(MyBxl.Parse(ProjBxl)); } return new ThemaCompilerResultForQweb( LastContext = new ThemaCompiler().Compile( project)); }
public IEnumerable<XElement> Generate(XElement self, ThemaCompilerContext context) { if (null == self) { throw new ArgumentNullException("self"); } if (null != context) { return new[] {new XElement("ctg", new XAttribute("step", context.StepIndex))}; } throw new Exception("need context"); }
/// <summary> /// Internals the setup. /// </summary> /// <param name="context"> The context. </param> /// <remarks> /// </remarks> protected override void InternalSetup(ThemaCompilerContext context) { base.InternalSetup(context); if (!context.Project.UseEcoProcess) { return; } context.Pipeline.Add(new PrepareEcoProcessIndexesStep()); context.Pipeline.Add(new CheckEcoProcessIntegrity()); context.Pipeline.Add(new GenerateEcoProcessRoleMap()); context.Pipeline.Add(new GenerateEcoProcessThemaChanges()); }
public IEnumerable <XElement> Generate(XElement self, ThemaCompilerContext context) { if (null == self) { throw new ArgumentNullException("self"); } if (null != context) { return(new[] { new XElement("ctg", new XAttribute("step", context.StepIndex)) }); } throw new Exception("need context"); }
protected override object process() { var project = new SingleContentProject(Text); if (ProjBxl.hasContent()) { project.ConfigureFromXml(MyBxl.Parse(ProjBxl)); } return(new ThemaCompilerResultForQweb( LastContext = new ThemaCompiler().Compile( project))); }
public ThemaCompilerResultForQweb(ThemaCompilerContext context) { IsComplete = context.IsComplete; Errors = context.Errors.ToArray(); if (!IsComplete) return; var r = new XElement("result"); foreach (var t in context.Themas.Values.Where(t => null != t.Xml)) { r.Add(t.Xml); } if (null != context.ExtraData) { r.Add(context.ExtraData); } Result = new XmlToBxlConverter().Convert(r); Log = context.Project.GetLog(); }
public ThemaCompilerResultForQweb(ThemaCompilerContext context) { IsComplete = context.IsComplete; Errors = context.Errors.ToArray(); if (!IsComplete) { return; } var r = new XElement("result"); foreach (var t in context.Themas.Values.Where(t => null != t.Xml)) { r.Add(t.Xml); } if (null != context.ExtraData) { r.Add(context.ExtraData); } Result = Application.Current.Bxl.GetParser().Generate(r); Log = context.Project.GetLog(); }
/// <summary> /// </summary> /// <param name="ctx"> </param> public void Process(ThemaCompilerContext ctx) { //firstly - fill links from ptoject default set foreach (var type in ctx.Project.LinkTypes) { ctx.LinkTypes[type.Key] = type.Value; ctx.UserLog.Info("link type " + type.Key + " regestered from project"); } //secondary - oversee all files and get linktype elements foreach (var sf in ctx.SourceFileXml.Values) { foreach (var e in sf.Elements("linktype").ToArray()) { var ltype = e.Apply(new ThemaLinkType()); ctx.LinkTypes[ltype.Code] = ltype; ctx.UserLog.Info("link type " + ltype.Code + " extracted from " + e.Describe().ToWhereString()); e.Remove(); } } }
public ThemaCompilerResultForQweb(ThemaCompilerContext context) { IsComplete = context.IsComplete; Errors = context.Errors.ToArray(); if (!IsComplete) { return; } var r = new XElement("result"); foreach (var t in context.Themas.Values.Where(t => null != t.Xml)) { r.Add(t.Xml); } if (null != context.ExtraData) { r.Add(context.ExtraData); } Result = new XmlToBxlConverter().Convert(r); Log = context.Project.GetLog(); }
/// <summary> /// Processes the specified CTX. /// </summary> /// <param name="ctx"> The CTX. </param> /// <remarks> /// </remarks> public void Process(ThemaCompilerContext ctx) { foreach (var t in ctx.Themas.Values) { foreach (var e in t.Fullsource.Elements().ToArray()) { if (!ctx.LinkTypes.ContainsKey(e.Name.LocalName)) { continue; } var d = e.Describe(); t.SelfLinks.Add(new ThemaLink { Type = ctx.LinkTypes[e.Name.LocalName], Source = t, SourceCode = t.Code, TargetCode = e.Id(), Value = e.Attr("name"), Line = d.Line, File = d.File, Xml = e }); e.Remove(); } } }
/// <summary> /// </summary> protected override void InternalSetup(ThemaCompilerContext context) { base.InternalSetup(context); context.Pipeline.Add(new SaveXmlFilesStep {Cleanup = true}); context.Pipeline.Add(new SaveBxlFilesStep()); context.Pipeline.Add(new GenerateHtmlReportStep()); }
/// <summary> /// Internals the setup. /// </summary> /// <param name="context"> The context. </param> /// <remarks> /// </remarks> protected override void InternalSetup(ThemaCompilerContext context) { base.InternalSetup(context); context.Pipeline.Add(new ReIncludeGlobalsToGlobalsStep()); }
/// <summary> /// Internals the setup. /// </summary> /// <param name="context"> The context. </param> /// <remarks> /// </remarks> protected override void InternalSetup(ThemaCompilerContext context) { base.InternalSetup(context); context.Pipeline.Add(new CheckLibraryResolutionStep()); }
/// <summary> /// Internals the setup. /// </summary> /// <param name="context"> The context. </param> /// <remarks> /// </remarks> protected override void InternalSetup(ThemaCompilerContext context) { base.InternalSetup(context); context.Pipeline.Add(new RemoveUnUsedThemasStep()); }
/// <summary> /// Internals the setup. /// </summary> /// <param name="context"> The context. </param> /// <remarks> /// </remarks> protected virtual void InternalSetup(ThemaCompilerContext context) {}
protected override void InternalSetup(ThemaCompilerContext context) { base.InternalSetup(context); context.Pipeline.Add(this); }
public void Setup(ThemaCompilerContext context) { context.Pipeline.Add(this); }
/// <summary> /// Internals the setup. /// </summary> /// <param name="context"> The context. </param> /// <remarks> /// </remarks> protected override void InternalSetup(ThemaCompilerContext context) { base.InternalSetup(context); context.Pipeline.Add(new ResolveElementsStep()); }
/// <summary> /// Internals the setup. /// </summary> /// <param name="context"> The context. </param> /// <remarks> /// </remarks> protected override void InternalSetup(ThemaCompilerContext context) { base.InternalSetup(context); context.Pipeline.Add(new ExtractParametersStep()); }
public void Setup(ThemaCompilerContext context) { context.Pipeline.Add(this); }
/// <summary> /// Initializes a new instance of the <see cref="GenerateXmlStep" /> class. /// </summary> /// <param name="ctx"> The CTX. </param> /// <remarks> /// </remarks> public GenerateXmlStep(ThemaCompilerContext ctx) { Context = ctx; }
/// <summary> /// Internals the setup. /// </summary> /// <param name="context"> The context. </param> /// <remarks> /// </remarks> protected override void InternalSetup(ThemaCompilerContext context) { base.InternalSetup(context); context.Pipeline.Add(new ResolveConditionalCompilationStep()); }
/// <summary> /// Internals the setup. /// </summary> /// <param name="context"> The context. </param> /// <remarks> /// </remarks> protected override void InternalSetup(ThemaCompilerContext context) { base.InternalSetup(context); context.Pipeline.Add(new SetupSourceFilesInValidOrderStep()); }
public void Process(ThemaCompilerContext ctx) { throw new Exception("error"); }
/// <summary> /// Internals the setup. /// </summary> /// <param name="context"> The context. </param> /// <remarks> /// </remarks> protected override void InternalSetup(ThemaCompilerContext context) { base.InternalSetup(context); context.Pipeline.Add(new GenerateXmlStep()); }
/// <summary> /// Internals the setup. /// </summary> /// <param name="context"> The context. </param> /// <remarks> /// </remarks> protected override void InternalSetup(ThemaCompilerContext context) { base.InternalSetup(context); context.Pipeline.Add(new ReadSourceXmlContentsStep()); }
/// <summary> /// Setups the specified context. /// </summary> /// <param name="context"> The context. </param> /// <remarks> /// </remarks> public void Setup(ThemaCompilerContext context) { context.Pipeline.Clear(); InternalSetup(context); }
/// <summary> /// Internals the setup. /// </summary> /// <param name="context"> The context. </param> /// <remarks> /// </remarks> protected override void InternalSetup(ThemaCompilerContext context) { base.InternalSetup(context); context.Pipeline.Add(new EmbedSubsetsStep()); }
public void Process(ThemaCompilerContext ctx) { throw new Exception("error"); }
/// <summary> /// </summary> protected override void InternalSetup(ThemaCompilerContext context) { base.InternalSetup(context); if (context.Project.UseEcoOptimization) { context.Pipeline.Add(new EcoCleanupParametersStep()); } }
protected override void InternalSetup(ThemaCompilerContext context) { base.InternalSetup(context); context.Pipeline.Add(this); }