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; }
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; }