public void FromXml(XElement element, IFromXmlContext ctx) { Token = new QueryTokenEntity(element.Attribute("Token").Value); Operation = element.Attribute("Operation").Value.ToEnum<FilterOperation>(); ValueString = element.Attribute("Value").Value; }
internal void FromXml(XElement element, IFromXmlContext ctx) { Token = new QueryTokenEntity(element.Attribute("Token").Value); OrderType = element.Attribute("OrderType").Value.ToEnum<OrderType>(); }
internal void FromXml(XElement element, IFromXmlContext ctx) { Token = new QueryTokenEntity(element.Attribute("Token").Value); DisplayName = element.Attribute("DisplayName")?.Value; }
public static FixTokenResult FixToken(Replacements replacements, ref QueryTokenEntity token, QueryDescription qd, SubTokensOptions options, string remainingText, bool allowRemoveToken, bool allowReCreate) { SafeConsole.WriteColor(token.ParseException == null ? ConsoleColor.Gray : ConsoleColor.Red, " " + token.TokenString); Console.WriteLine(" " + remainingText); if (token.ParseException == null) return FixTokenResult.Nothing; QueryToken resultToken; FixTokenResult result = FixToken(replacements, token.TokenString, out resultToken, qd, options, remainingText, allowRemoveToken, allowReCreate); if (result == FixTokenResult.Fix) token = new QueryTokenEntity(resultToken); return result; }