Ejemplo n.º 1
0
 private static CustomXsltContext CreateCustomXsltContext(VersionComponent? ignoredVersionComponent)
 {
     CustomXsltContext xpathContext = new CustomXsltContext();
     xpathContext.RegisterFunction(string.Empty, "get-id", new XsltContextAssetIdGetter());
     xpathContext.RegisterFunction(string.Empty, "get-version", new XsltContextAssetVersionGetter());
     xpathContext.RegisterFunction(string.Empty, "substring-before-last", new XsltContextSubstringBeforeLastFunction());
     xpathContext.RegisterFunction(string.Empty, "substring-after-last", new XsltContextSubstringAfterLastFunction());
     xpathContext.RegisterFunction(string.Empty, "iif", new XsltContextTernaryOperator());
     xpathContext.RegisterFunction(string.Empty, "get-significant-version", new XsltContextAssetVersionGetter(ignoredVersionComponent));
     xpathContext.RegisterFunction(string.Empty, "coalesce", new XsltContextCoalesceFunction());
     xpathContext.RegisterFunction(string.Empty, "join", new XsltContextJoinFunction());
     return xpathContext;
 }
Ejemplo n.º 2
0
 private static CustomXsltContext CreateCustomXsltContext(VersionComponent? ignoredVersionComponent)
 {
     CustomXsltContext xpathContext = new CustomXsltContext();
     xpathContext.RegisterFunction(string.Empty, "get-id", new XsltContextAssetIdGetter());
     xpathContext.RegisterFunction(string.Empty, "get-version", new XsltContextAssetVersionGetter());
     xpathContext.RegisterFunction(string.Empty, "get-significant-version", new XsltContextAssetVersionGetter(ignoredVersionComponent));
     xpathContext.RegisterFunction(string.Empty, "coalesce", new XsltContextCoalesceFunction());
     xpathContext.RegisterFunction(string.Empty, "join", new XsltContextJoinFunction());
     return xpathContext;
 }