public ParseResult(ParseInput input, ParseRange range, FacetMoniker facetMoniker, double relevance, bool isSuggestion = false) { if (input == null) { throw new ArgumentNullException("input"); } if (range == null) { throw new ArgumentNullException("range"); } if (facetMoniker == null) { throw new ArgumentNullException("facetMoniker"); } if (relevance < 0 || relevance > 1) { throw new ArgumentOutOfRangeException("relevance", "must be between 0 and 1, inclusive"); } Input = input; Range = range; CompressedRange = input.ToCompressed(Range); FacetMoniker = facetMoniker; Relevance = relevance; IsSuggestion = isSuggestion; }
internal ParseInputTerm(ParseInput input, int ordinal, string text, int startIndex, TermParseMode mode) { Input = input; Ordinal = ordinal; Text = text; TextLower = Text.ToLower(); Mode = mode; _range = new ParseRange(startIndex, text.Length); }
internal ParseInputTerm(ParseInput input, int ordinal, int startIndex, ParseInputTerm copyFrom) : this(input, ordinal, copyFrom.Text, startIndex, copyFrom.Mode) { FactoryAlias = copyFrom.FactoryAlias; }
internal ParseInputTerm(ParseInput input, int ordinal, string text, int startIndex, string factoryAlias) : this(input, ordinal, text, startIndex, TermParseMode.SpecificFactory) { FactoryAlias = factoryAlias; }