Beispiel #1
0
        ///////////////////////////////////////////////////////////////////////

        public int Enter(
            bool all
            )
        {
            CheckDisposed();

            int count = 0;

            if (all)
            {
                INamespace @namespace = parent;

                while (@namespace != null)
                {
                    count     += @namespace.Enter(false);
                    @namespace = @namespace.Parent;
                }
            }

            count += Interlocked.Increment(ref referenceCount);
            return(count);
        }