To get started with evaluation install the Xcst.Runtime NuGet package.


The evaluation API starts with the Xcst.XcstEvaluator class, which provides a fluent interface. See the following example and the comments for guidance:

// pass new instance of compiled package
XcstEvaluator.Using(new FooPackage())
   // optionally set a global parameter
   .WithParam("a", 5)
   // call initial template (or CallTemplate("bar"))
   // optionally set a template parameter
   .WithParam("b", 10)
   // specify the output destination (overloads available)
   // optionally override serialization parameters
   .WithParams(new OutputParameters { Indent = true }) 
   // execute

Evaluating from XCST

If you are evaluating from XCST, instead of using the API you can use the c:evaluate-package instruction.