Exemple #1
0
            public void Dispose()
            {
                if( _flag != null )
                {
                    int count;

                    lock( _flag._lock )
                    {
                        --_flag._count;

                        count = _flag._count;
                    }

                    if( count == 0 && _flag.Reset != null )
                    {
                        _flag.Reset( _flag, EventArgs.Empty );
                    }

                    _flag = null;
                }
            }
Exemple #2
0
 internal Disposer( Flag flag )
 {
     _flag = flag;
 }