コード例 #1
0
ファイル: TypeMatch.cs プロジェクト: modulexcite/pash-1
        internal bool PerfectMatch(TypeMatchItem item)
        {
            int num = this.ComputeBestMatch(item.AppliesTo, item.CurrentObject);

            if (num == -1)
            {
                return(false);
            }
            if ((this._bestMatchIndex == -1) || (num < this._bestMatchIndex))
            {
                this._bestMatchIndex = num;
                this._bestMatchItem  = item;
            }
            return(this._bestMatchIndex == 0);
        }
コード例 #2
0
        internal bool PerfectMatch(TypeMatchItem item)
        {
            int bestMatch = this.ComputeBestMatch(item.AppliesTo, item.CurrentObject);

            if (bestMatch == -1)
            {
                return(false);
            }
            if (this._bestMatchIndex == -1 || bestMatch < this._bestMatchIndex)
            {
                this._bestMatchIndex = bestMatch;
                this._bestMatchItem  = item;
            }
            return(this._bestMatchIndex == 0);
        }
コード例 #3
0
        internal bool PerfectMatch(TypeMatchItem item)
        {
            int match = ComputeBestMatch(item.AppliesTo, item.CurrentObject);

            if (match == BestMatchIndexUndefined)
            {
                return(false);
            }

            if (_bestMatchIndex == BestMatchIndexUndefined ||
                match < _bestMatchIndex)
            {
                _bestMatchIndex = match;
                _bestMatchItem  = item;
            }
            return(_bestMatchIndex == BestMatchIndexPerfect);
        }
コード例 #4
0
ファイル: typeDataQuery.cs プロジェクト: dfinke/powershell
        internal bool PerfectMatch(TypeMatchItem item)
        {
            int match = ComputeBestMatch(item.AppliesTo, item.CurrentObject);
            if (match == BestMatchIndexUndefined)
                return false;

            if (_bestMatchIndex == BestMatchIndexUndefined ||
                match < _bestMatchIndex)
            {
                _bestMatchIndex = match;
                _bestMatchItem = item;
            }
            return _bestMatchIndex == BestMatchIndexPerfect;
        }
コード例 #5
0
ファイル: TypeMatch.cs プロジェクト: nickchal/pash
 internal bool PerfectMatch(TypeMatchItem item)
 {
     int num = this.ComputeBestMatch(item.AppliesTo, item.CurrentObject);
     if (num == -1)
     {
         return false;
     }
     if ((this._bestMatchIndex == -1) || (num < this._bestMatchIndex))
     {
         this._bestMatchIndex = num;
         this._bestMatchItem = item;
     }
     return (this._bestMatchIndex == 0);
 }