[]
        
(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
DataSourceDictionary
Implements
Inherited Members

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

ICollection<string>

Values

public ICollection<object> Values { get; }

Property Value

ICollection<object>

Methods

Add(KeyValuePair<string, object>)

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

Parameters

item KeyValuePair<string, object>

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.

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 CultureInfo

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

Exceptions

ArgumentNullException

key is null.

ArgumentException

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

Clear()

public void Clear()

Contains(KeyValuePair<string, object>)

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

Parameters

item KeyValuePair<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 KeyValuePair<string, object>[]
arrayIndex int

GetEnumerator()

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

Returns

IEnumerator<KeyValuePair<string, object>>

Remove(KeyValuePair<string, object>)

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

Parameters

item KeyValuePair<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