[]
Represents a dictionary of data sources.
public class DataSourceDictionary : IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable
Initializes a new instance of the DataSourceDictionary class.
public DataSourceDictionary(bool onlyOneDataSourceAllowed)
onlyOneDataSourceAllowed
boolIf true, only one data source is allowed.
public int Count { get; }
public bool IsReadOnly { get; }
public object this[string key] { get; set; }
key
stringpublic ICollection<string> Keys { get; }
public ICollection<object> Values { get; }
public void Add(KeyValuePair<string, object> item)
item
System.Collections.Generic.KeyValuePair<TKey, TValue><string, object>Adds a data source to this DataSourceDictionary.
public void Add(string key, object value, CultureInfo culture)
key
stringThe key (name) of the data source to add.
value
objectThe data source to add.
culture
System.Globalization.CultureInfoThe culture to use when parsing or formatting data from the added data source.
key
is null.
An element with the same key already exists in the DataSourceDictionary.
Adds a data source to this DataSourceDictionary.
public void Add(string key, object value)
key
stringThe key (name) of the data source to add.
value
objectThe data source to add.
public void Clear()
public bool Contains(KeyValuePair<string, object> item)
item
System.Collections.Generic.KeyValuePair<TKey, TValue><string, object>public bool ContainsKey(string key)
key
stringpublic void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
array
System.Collections.Generic.KeyValuePair<TKey, TValue><string, object>[]arrayIndex
intpublic IEnumerator<KeyValuePair<string, object>> GetEnumerator()
public bool Remove(KeyValuePair<string, object> item)
item
System.Collections.Generic.KeyValuePair<TKey, TValue><string, object>public bool Remove(string key)
key
stringpublic bool TryGetValue(string key, out object value)
key
stringvalue
object