Beispiel #1
0
    public void GenerateStrongUrls(UrlStrongModel strongModel, TextWriter writer)
    {
      var engine = new SparkViewEngineFactory().CreateViewEngine();
      engine.LoadBatchCompilation(Assembly.Load("Machine.UrlStrong.Translation.Templates"));

      var descriptor = new SparkViewDescriptor().AddTemplate("master.spark");

      var template = (TemplateBase)engine.CreateInstance(descriptor);

      template.Model = strongModel;
      template.RenderView(writer);
    }
    public ParseResult GetResult()
    {
      var urlConfig = new UrlStrongModel(_urls, _namespaces, _namespace, _className);

      return new ParseResult(urlConfig, _errors);
    }
 public ParseResult(UrlStrongModel urlStrongModel, IEnumerable<ParseError> errors)
 {
   UrlStrongModel = urlStrongModel;
   Errors = errors;
 }