51 lines
2.0 KiB
Plaintext
51 lines
2.0 KiB
Plaintext
// ==++==
|
|
//
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
//
|
|
// ==--==
|
|
//------------------------------------------------------------------------------
|
|
//------------------------------------------------------------------------------
|
|
|
|
using System;
|
|
|
|
namespace System.Collections {
|
|
// Useful base class for typed read/write collections where items derive from object
|
|
public abstract class DictionaryBase : IDictionary {
|
|
Hashtable hashtable;
|
|
|
|
protected Hashtable InnerHashtable { get; }
|
|
protected IDictionary Dictionary { get; }
|
|
public int Count { get; }
|
|
bool IDictionary.IsReadOnly { get; }
|
|
bool IDictionary.IsFixedSize { get; }
|
|
bool ICollection.IsSynchronized { get; }
|
|
ICollection IDictionary.Keys { get; }
|
|
Object ICollection.SyncRoot { get; }
|
|
ICollection IDictionary.Values { get; }
|
|
|
|
public void CopyTo(Array array, int index);
|
|
|
|
object IDictionary.this[object key] { get; set; }
|
|
|
|
bool IDictionary.Contains(object key);
|
|
void IDictionary.Add(object key, object value);
|
|
void IDictionary.Remove(object key);
|
|
|
|
public void Clear();
|
|
|
|
public IDictionaryEnumerator GetEnumerator();
|
|
IEnumerator IEnumerable.GetEnumerator();
|
|
|
|
protected virtual object OnGet(object key, object currentValue);
|
|
protected virtual void OnSet(object key, object oldValue, object newValue);
|
|
protected virtual void OnInsert(object key, object value);
|
|
protected virtual void OnClear();
|
|
protected virtual void OnRemove(object key, object value);
|
|
protected virtual void OnValidate(object key, object value);
|
|
protected virtual void OnSetComplete(object key, object oldValue, object newValue);
|
|
protected virtual void OnInsertComplete(object key, object value);
|
|
protected virtual void OnClearComplete();
|
|
protected virtual void OnRemoveComplete(object key, object value);
|
|
}
|
|
}
|