Пример #1
0
 public TextQueryBuilder(string fieldName, object text)
 {
     _operator = Nest.Operator.or;
     _type = TextQueryType.BOOLEAN;
     _name = fieldName;
     _text = text;
 }
Пример #2
0
 public TextQueryBuilder(string fieldName, object text)
 {
     _operator = Nest.Operator.or;
     _type     = TextQueryType.BOOLEAN;
     _name     = fieldName;
     _text     = text;
 }
Пример #3
0
        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);
 }
Пример #5
0
 public TextQueryBuilder Type(TextQueryType type)
 {
     _type = type;
     return(this);
 }
Пример #6
0
 public MultiMatchQueryDescriptor <T> Type(TextQueryType type)
 {
     ((IMultiMatchQuery)this).Type = type;
     return(this);
 }
Пример #7
0
 public CommandUpdateEventArgs(AnkhCommand command, AnkhContext context, TextQueryType textQuery)
     : this(command, context)
 {
     _queryType = textQuery;
 }
Пример #8
0
 public CommandUpdateEventArgs(VisualGitCommand command, VisualGitContext context, TextQueryType textQuery)
     : this(command, context)
 {
     _queryType = textQuery;
 }
Пример #9
0
 public TextQueryBuilder Type(TextQueryType type)
 {
     _type = type;
     return this;
 }
Пример #10
0
        /// <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);
        }
Пример #11
0
 public CommandUpdateEventArgs(AnkhCommand command, AnkhContext context, TextQueryType textQuery)
     : this(command, context)
 {
     _queryType = textQuery;
 }