public TextQueryBuilder(string fieldName, object text) { _operator = Nest.Operator.or; _type = TextQueryType.BOOLEAN; _name = fieldName; _text = text; }
public int QueryStatus(AnkhContext context, uint cCmds, OLECMD[] prgCmds, IntPtr pCmdText) { if (context == null) { throw new ArgumentNullException("context"); } else if (cCmds != 1 || prgCmds == null) { return(-1); } TextQueryType textQuery = TextQueryType.None; if (pCmdText != IntPtr.Zero) { // VS Want's some text from us for either the statusbar or the command text OLECMDTEXTF textType = GetFlags(pCmdText); switch (textType) { case OLECMDTEXTF.OLECMDTEXTF_NAME: textQuery = TextQueryType.Name; break; case OLECMDTEXTF.OLECMDTEXTF_STATUS: textQuery = TextQueryType.Status; break; } } CommandUpdateEventArgs updateArgs = new CommandUpdateEventArgs((AnkhCommand)prgCmds[0].cmdID, context, textQuery); OLECMDF cmdf = OLECMDF.OLECMDF_SUPPORTED; if (PerformUpdate(updateArgs.Command, updateArgs)) { updateArgs.UpdateFlags(ref cmdf); } if (updateArgs.DynamicMenuEnd) { return(VSErr.OLECMDERR_E_NOTSUPPORTED); } if (textQuery != TextQueryType.None && !string.IsNullOrEmpty(updateArgs.Text)) { SetText(pCmdText, updateArgs.Text); } if (_customizeMode && updateArgs.Command != AnkhCommand.ForceUIShow) { prgCmds[0].cmdf = (uint)(cmdf & ~OLECMDF.OLECMDF_INVISIBLE); } else { prgCmds[0].cmdf = (uint)cmdf; } return(0); // S_OK }
public MultiMatchQueryDescriptor <T> Type(TextQueryType type) { this._Type = type.ToString().ToLowerInvariant(); return(this); }
public TextQueryBuilder Type(TextQueryType type) { _type = type; return(this); }
public MultiMatchQueryDescriptor <T> Type(TextQueryType type) { ((IMultiMatchQuery)this).Type = type; return(this); }
public CommandUpdateEventArgs(AnkhCommand command, AnkhContext context, TextQueryType textQuery) : this(command, context) { _queryType = textQuery; }
public CommandUpdateEventArgs(VisualGitCommand command, VisualGitContext context, TextQueryType textQuery) : this(command, context) { _queryType = textQuery; }
public TextQueryBuilder Type(TextQueryType type) { _type = type; return this; }
/// <summary> /// Sets the text query type. Defaults to "boolean". /// </summary> public TQuery Type(TextQueryType type = TextQueryType.boolean) { RegisterJsonPart("'type': {0}", type.AsString().Quotate()); return((TQuery)this); }