XRefresh.MatchReason.Set C# (CSharp) Method

Set() public method

public Set ( string text, Status status ) : void
text string
status Status
return void
        public void Set(string text, Status status)
        {
            if (this._status > status)
                throw new ModelException("Inconsistent match rules");
            if (this._status<status)
            {
                this._status = status;
                this._text = text;
            }
        }

Usage Example

示例#1
0
文件: Model.cs 项目: speecyy/xrefresh
 public bool PassesGlobalExcludes(string path, MatchReason reason)
 {
     // it must not match any global exclude
     foreach (GlobalExcludeFiltersRow row in GlobalExcludeFilters)
     {
         FileMask wildcard = new FileMask(row.Mask);
         if (wildcard.IsMatch(path))
         {
             reason.Set(row.Mask, MatchReason.Status.Excluded);
             return(false);
         }
     }
     return(true);
 }
All Usage Examples Of XRefresh.MatchReason::Set