internal UriTemplateParseException(string message, TemplateProcessor uriTemplateParser, Exception innerException = null) : base($"Malformed uri template '{uriTemplateParser.Template}' : {message} at position {uriTemplateParser.Position}.", innerException) { this.Template = uriTemplateParser.Template; this.Position = uriTemplateParser.Position; this.Parsed = this.Template.Substring(0, this.Position); this.NotParsed = this.Template.Substring(this.Position); }
/// <summary> /// Expands the variables and returns the resulting <see cref="string"/>. /// </summary> /// <returns></returns> public string ExpandToString() { TemplateProcessor templateProcessor = new TemplateProcessor(this.template, this.variables, this.isPartialExpand, this.valueFormatter); return(templateProcessor.Expand()); }