SiteMapDictionary
Definition
Constructors
public SiteMapDictionary()
Properties
Gets the number of elements contained in the ICollection<T>.
public int Count { get; }
Implements:
Gets or sets the default site map.
public SiteMapBase DefaultSiteMap { get; set; }
The default site map.
Gets or sets the default site map factory.
public static Func<SiteMapBase> DefaultSiteMapFactory { get; set; }
The default site map factory.
Gets a value indicating whether the ICollection<T> is read-only.
public bool IsReadOnly { get; }
Implements:
Gets an ICollection<T> containing the keys of the IDictionary<TKey, TValue>.
public ICollection<string> Keys { get; }
Implements:
Gets or sets the SiteMapBase with the specified key.
Gets an ICollection<T> containing the values in the IDictionary<TKey, TValue>.
public ICollection<SiteMapBase> Values { get; }
Implements:
Methods
Adds an item to the ICollection<T>.
public void Add(KeyValuePair<string, SiteMapBase> item)
The object to add to the ICollection<T>.
Exceptions: NotSupportedExceptionThe ICollection<T> is read-only.
Implements:
Adds an element with the provided key and value to the IDictionary<TKey, TValue>.
public void Add(string key, SiteMapBase value)
The object to use as the key of the element to add.
valueSiteMapBaseThe object to use as the value of the element to add.
Exceptions: ArgumentNullExceptionkey is null.
An element with the same key already exists in the IDictionary<TKey, TValue>.
NotSupportedExceptionThe IDictionary<TKey, TValue> is read-only.
Implements:
Removes all items from the ICollection<T>.
Determines whether the ICollection<T> contains a specific value.
public bool Contains(KeyValuePair<string, SiteMapBase> item)
The object to locate in the ICollection<T>.
Returns:true if item is found in the ICollection<T>; otherwise, false.
Implements:
Determines whether the IDictionary<TKey, TValue> contains an element with the specified key.
public bool ContainsKey(string key)
The key to locate in the IDictionary<TKey, TValue>.
Returns:true if the IDictionary<TKey, TValue> contains an element with the key; otherwise, false.
Exceptions: ArgumentNullExceptionkey is null.
Implements:
Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.
public void CopyTo(KeyValuePair<string, SiteMapBase>[] array, int arrayIndex)
The one-dimensional Array that is the destination of the elements copied from ICollection<T>. The Array must have zero-based indexing.
arrayIndexintThe zero-based index in array at which copying begins.
array is null.
arrayIndex is less than 0.
array is multidimensional.
-or-
arrayIndex is equal to or greater than the length of array.
-or-
The number of elements in the source ICollection<T> is greater than the available space from arrayIndex to the end of the destination array.
-or-
Type cannot be cast automatically to the type of the destination array
Implements:
Returns an enumerator that iterates through the collection.
public IEnumerator<KeyValuePair<string, SiteMapBase>> GetEnumerator()
IEnumerator<KeyValuePair<string, SiteMapBase>>
A IEnumerator<T> that can be used to iterate through the collection.
Implements:
Removes the first occurrence of a specific object from the ICollection<T>.
public bool Remove(KeyValuePair<string, SiteMapBase> item)
The object to remove from the ICollection<T>.
Returns:true if item was successfully removed from the ICollection<T>; otherwise, false. This method also returns false if item is not found in the original ICollection<T>.
The ICollection<T> is read-only.
Implements:
Removes the element with the specified key from the IDictionary<TKey, TValue>.
public bool Remove(string key)
The key of the element to remove.
Returns:true if the element is successfully removed; otherwise, false. This method also returns false if key was not found in the original IDictionary<TKey, TValue>.
key is null.
The IDictionary<TKey, TValue> is read-only.
Implements:
Gets the value associated with the specified key.
public bool TryGetValue(string key, out SiteMapBase value)
The key whose value to get.
valueSiteMapBaseWhen this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.
true if the object that implements IDictionary<TKey, TValue> contains an element with the specified key; otherwise, false.
Exceptions: ArgumentNullExceptionkey is null.
Implements: