[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.Templates.DataSourceDictionary

Class DataSourceDictionary

Namespace
GrapeCity.Documents.Word.Templates
Assembly
GcDocs.Word.dll

Represents a dictionary of data sources.

public class DataSourceDictionary : IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable
Inheritance
object
DataSourceDictionary
Implements
System.Collections.Generic.IDictionary<TKey, TValue><string, object>
System.Collections.Generic.ICollection<T><System.Collections.Generic.KeyValuePair<TKey, TValue><string, object>>
System.Collections.Generic.IEnumerable<T><System.Collections.Generic.KeyValuePair<TKey, TValue><string, object>>
System.Collections.IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

DataSourceDictionary(bool)

Initializes a new instance of the DataSourceDictionary class.

public DataSourceDictionary(bool onlyOneDataSourceAllowed)

Parameters

onlyOneDataSourceAllowed bool

If true, only one data source is allowed.

Properties

Count

public int Count { get; }

Property Value

int

IsReadOnly

public bool IsReadOnly { get; }

Property Value

bool

this[string]

public object this[string key] { get; set; }

Parameters

key string

Property Value

object

Keys

public ICollection<string> Keys { get; }

Property Value

System.Collections.Generic.ICollection<T><string>

Values

public ICollection<object> Values { get; }

Property Value

System.Collections.Generic.ICollection<T><object>

Methods

Add(KeyValuePair<string, object>)

public void Add(KeyValuePair<string, object> item)

Parameters

item System.Collections.Generic.KeyValuePair<TKey, TValue><string, object>

Add(string, object, CultureInfo)

Adds a data source to this DataSourceDictionary.

public void Add(string key, object value, CultureInfo culture)

Parameters

key string

The key (name) of the data source to add.

value object

The data source to add.

culture System.Globalization.CultureInfo

The culture to use when parsing or formatting data from the added data source.

Exceptions

System.ArgumentNullException

key is null.

System.ArgumentException

An element with the same key already exists in the DataSourceDictionary.

Add(string, object)

Adds a data source to this DataSourceDictionary.

public void Add(string key, object value)

Parameters

key string

The key (name) of the data source to add.

value object

The data source to add.

Clear()

public void Clear()

Contains(KeyValuePair<string, object>)

public bool Contains(KeyValuePair<string, object> item)

Parameters

item System.Collections.Generic.KeyValuePair<TKey, TValue><string, object>

Returns

bool

ContainsKey(string)

public bool ContainsKey(string key)

Parameters

key string

Returns

bool

CopyTo(KeyValuePair<string, object>[], int)

public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)

Parameters

array System.Collections.Generic.KeyValuePair<TKey, TValue><string, object>[]
arrayIndex int

GetEnumerator()

public IEnumerator<KeyValuePair<string, object>> GetEnumerator()

Returns

System.Collections.Generic.IEnumerator<T><System.Collections.Generic.KeyValuePair<TKey, TValue><string, object>>

Remove(KeyValuePair<string, object>)

public bool Remove(KeyValuePair<string, object> item)

Parameters

item System.Collections.Generic.KeyValuePair<TKey, TValue><string, object>

Returns

bool

Remove(string)

public bool Remove(string key)

Parameters

key string

Returns

bool

TryGetValue(string, out object)

public bool TryGetValue(string key, out object value)

Parameters

key string
value object

Returns

bool