、Iはスパーク源自体に単純なものを発見しました。 Xparkプロジェクトは、Sparkを使用してXMLを変換するためのコマンドラインアプリケーションです。 Louis DeJardin、Sparkの作成者、彼のブログにhow Xpark worksと記載されています。
関連するコードスニペットは、次のとおりです。
// Create an engine using the templates path as the root location
// as well as the shared location
var engine = new SparkViewEngine
{
DefaultPageBaseType = typeof(SparkView).FullName,
ViewFolder = viewFolder.Append(new SubViewFolder(viewFolder, "Shared"))
};
SparkView view;
// compile and instantiate the template
view = (SparkView)engine.CreateInstance(
new SparkViewDescriptor()
.AddTemplate(templateName));
// render the view to stdout
using (var writer = new StreamWriter(Console.OpenStandardOutput(), Encoding.UTF8))
{
view.RenderView(writer);
}
これは私が正しい方向に指摘取得するのに十分でした。しかし、私は間違いなく他の例にも飛び込んできます。