コード例 #1
0
        /// <summary>
        /// Initializes a new <see cref="SynchronizedKeyedCollection{TKey,TValue}"/> and specifies an existing lock
        /// and the default equality comparer.
        /// </summary>
        /// <param name="lock">An existing lock.</param>
        protected SynchronizedKeyedCollection(ReaderWriterLockWrapper @lock)
        {
            if (@lock == null)
            {
                throw new ArgumentNullException("lock");
            }

            this.dictionary = new SynchronizedDictionary(this, @lock);
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new <see cref="ObservableSynchronizedDictionary{TKey,TValue}"/> with a new lock, but specifies
 /// the equality comparer.
 /// </summary>
 /// <param name="comparer">An equality comparer.</param>
 public ObservableSynchronizedDictionary(IEqualityComparer <TKey> comparer)
 {
     if (comparer == null)
     {
         throw new ArgumentNullException("comparer");
     }
     this.dictionary = new Dictionary <TKey, Slot>(comparer);
     this.slotToKey  = new Dictionary <int, TKey>();
     this.@lock      = new ReaderWriterLockWrapper(this);
 }
コード例 #3
0
        /// <summary>
        /// Initializes a new <see cref="ObservableSynchronizedDictionary{TKey,TValue}"/> and specifies an existing lock
        /// and the default equality comparer.
        /// </summary>
        /// <param name="lock">An existing lock.</param>
        public ObservableSynchronizedDictionary(ReaderWriterLockWrapper @lock)
        {
            if (@lock == null)
            {
                throw new ArgumentNullException("lock");
            }

            this.@lock      = @lock;
            this.dictionary = new Dictionary <TKey, Slot>();
            this.slotToKey  = new Dictionary <int, TKey>();
        }
コード例 #4
0
        /// <summary>
        /// Initializes a new <see cref="SynchronizedKeyedCollection{TKey,TValue}"/> and specifies an existing
        /// lock and a comparer.
        /// </summary>
        /// <param name="comparer">The comparer.</param>
        /// <param name="lock">An existing lock.</param>
        protected SynchronizedKeyedCollection(IEqualityComparer <TKey> comparer, ReaderWriterLockWrapper @lock)
        {
            if (comparer == null)
            {
                throw new ArgumentNullException("comparer");
            }
            if (@lock == null)
            {
                throw new ArgumentNullException("lock");
            }

            this.dictionary = new SynchronizedDictionary(this, comparer, @lock);
        }
コード例 #5
0
 /// <summary>
 /// Initializes a new <see cref="ObservableSynchronizedDictionary{TKey,TValue}"/> with a new lock and
 /// the default equality comparer.
 /// </summary>
 public ObservableSynchronizedDictionary()
 {
     this.@lock = new ReaderWriterLockWrapper(this);
 }
コード例 #6
0
 public SynchronizedDictionary(SynchronizedKeyedCollection <TKey, TValue> parent,
                               IEqualityComparer <TKey> comparer, ReaderWriterLockWrapper @lock)
     : base(comparer, @lock)
 {
     this.parent = parent;
 }
コード例 #7
0
 public SynchronizedDictionary(SynchronizedKeyedCollection <TKey, TValue> parent, ReaderWriterLockWrapper @lock)
     : base(@lock)
 {
     this.parent = parent;
 }
コード例 #8
0
 internal Cookie( CookieAction action, ReaderWriterLockWrapper parent, StackTrace stackTrace )
 {
     this.action = action;
     this.parent = parent;
     this.stackTrace = stackTrace;
 }
コード例 #9
0
 internal Cookie(CookieAction action, ReaderWriterLockWrapper parent, StackTrace stackTrace)
 {
     this.action     = action;
     this.parent     = parent;
     this.stackTrace = stackTrace;
 }