Пример #1
0
 /// <summary>
 /// Cloning constructor. Defers the actual clone.
 /// </summary>
 private CopyOnWriteDictionary(CopyOnWriteDictionary <V> that)
 {
     _backing = that._backing;
 }
Пример #2
0
 /// <summary>
 /// Creates empty dictionary with specified initial capacity
 /// </summary>
 public CopyOnWritePropertyDictionary(int capacity)
 {
     // Tracing.Record("New COWD2");
     _properties = new CopyOnWriteDictionary <T>(capacity, MSBuildNameIgnoreCaseComparer.Default);
 }
Пример #3
0
 /// <summary>
 /// Cloning constructor, with deferred cloning semantics
 /// </summary>
 private CopyOnWritePropertyDictionary(CopyOnWritePropertyDictionary <T> that)
 {
     _properties = that._properties.Clone(); // copy on write!
 }
Пример #4
0
 /// <summary>
 /// Creates empty dictionary
 /// </summary>
 public CopyOnWritePropertyDictionary()
 {
     // Tracing.Record("New COWD1");
     _properties = new CopyOnWriteDictionary <string, T>(MSBuildNameIgnoreCaseComparer.Default);
 }
 /// <summary>
 /// Creates empty dictionary with specified initial capacity
 /// </summary>
 public CopyOnWritePropertyDictionary(int capacity)
 {
     // Tracing.Record("New COWD2");
     _properties = new CopyOnWriteDictionary <string, T>(capacity, _comparer);
 }
 /// <summary>
 /// Creates empty dictionary
 /// </summary>
 public CopyOnWritePropertyDictionary()
 {
     // Tracing.Record("New COWD1");
     _properties = new CopyOnWriteDictionary <string, T>(_comparer);
 }
 /// <summary>
 /// Returns true if these dictionaries have the same backing.
 /// </summary>
 internal bool HasSameBacking(CopyOnWriteDictionary <K, V> other)
 {
     return(Object.ReferenceEquals(other.backing, backing));
 }
Пример #8
0
 private CopyOnWriteBackingDictionary(CopyOnWriteDictionary <K, V> .CopyOnWriteBackingDictionary <K1, V1> that) : base(that, that.Comparer)
 {
     this.refCount = 1;
 }