Inheritance: IDictionary, ICollection, IEnumerable, ICloneable
示例#1
0
        /// <summary>
        /// Clones this instance.
        /// </summary>
        /// <returns>The created clone.</returns>
        public DataTypeBaseDictionary Clone()
        {
            DataTypeBaseDictionary clone = new DataTypeBaseDictionary();

            clone.InnerHash = (Hashtable)_innerHash.Clone();
            return(clone);
        }
示例#2
0
        /// <summary>
        /// Returns a synchronized (thread-safe) wrapper for the hash table.
        /// </summary>
        /// <param name="nonSync">The Hash table to synchronize.</param>
        /// <returns>A synchronized (thread-safe) wrapper for the hash table.</returns>
        public static DataTypeBaseDictionary Synchronized(DataTypeBaseDictionary nonSync)
        {
            DataTypeBaseDictionary sync = new DataTypeBaseDictionary();

            sync.InnerHash = Hashtable.Synchronized(nonSync.InnerHash);
            return(sync);
        }
示例#3
0
 /// <summary>
 /// Inherits Properties from an existing property
 /// dictionary Instance
 /// </summary>
 /// <param name="source">DataType list to inherit</param>
 public virtual void Inherit(DataTypeBaseDictionary source)
 {
     foreach (string key in source.Keys)
     {
         Add(key, source[key]);
         //this[key] = entry.Value;
     }
 }
示例#4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DataTypeBaseDictionary"/> class.
 /// </summary>
 /// <param name="original">The original dictionary which well be copied.</param>
 public DataTypeBaseDictionary(DataTypeBaseDictionary original)
 {
     _innerHash = new Hashtable(original.InnerHash);
 }
示例#5
0
 internal DataTypeBaseDictionaryEnumerator(DataTypeBaseDictionary enumerable)
 {
     _innerEnumerator = enumerable.InnerHash.GetEnumerator();
 }
示例#6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DataTypeBaseDictionary"/> class.
 /// </summary>
 /// <param name="original">The original dictionary which well be copied.</param>
 public DataTypeBaseDictionary(DataTypeBaseDictionary original)
 {
     _innerHash = new Hashtable(original.InnerHash);
 }
示例#7
0
 internal DataTypeBaseDictionaryEnumerator(DataTypeBaseDictionary enumerable)
 {
     _innerEnumerator = enumerable.InnerHash.GetEnumerator();
 }
示例#8
0
 /// <summary>
 /// Inherits Properties from an existing property
 /// dictionary Instance
 /// </summary>
 /// <param name="source">DataType list to inherit</param>       
 public virtual void Inherit(DataTypeBaseDictionary source)
 {
     foreach ( string key in source.Keys ){
         Add( key, source[key] );
         //this[key] = entry.Value;
     }
 }
示例#9
0
 /// <summary>
 /// Clones this instance.
 /// </summary>
 /// <returns>The created clone.</returns>
 public DataTypeBaseDictionary Clone()
 {
     DataTypeBaseDictionary clone = new DataTypeBaseDictionary();
     clone.InnerHash = (Hashtable) _innerHash.Clone();
     return clone;
 }
示例#10
0
 /// <summary>
 /// Returns a synchronized (thread-safe) wrapper for the Hashtable.
 /// </summary>
 /// <param name="nonSync">The Hashtable to synchronize.</param>
 /// <returns>A synchronized (thread-safe) wrapper for the Hashtable.</returns>
 public static DataTypeBaseDictionary Synchronized(DataTypeBaseDictionary nonSync)
 {
     DataTypeBaseDictionary sync = new DataTypeBaseDictionary();
     sync.InnerHash = Hashtable.Synchronized(nonSync.InnerHash);
     return sync;
 }