Exemplo n.º 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));
        }
Exemplo n.º 2
0
 internal Flag(FlagCount flagCount, object source)
 {
     _flagCount = flagCount;
     _source    = source;
     _flagCount.Increment(_source);
 }