예제 #1
0
        public static IDisposable SetFlag(this object source, string name)
        {
            CheckArgs(source, name);
            FlagCount flagCount = _flags.GetOrAdd(name, n => new FlagCount(n));

            return(new Flag(flagCount, source));
        }
예제 #2
0
파일: Flag.cs 프로젝트: FleurLotus/MPSD
 internal Flag(FlagCount flagCount, object source)
 {
     _flagCount = flagCount;
     _source    = source;
     _flagCount.Increment(_source);
 }