Class XDataDictionary
Represents a dictionary of XData.
Inheritance
Implements
Inherited Members
Namespace: netDxf.Collections
Assembly: CADability.dll
Syntax
public sealed class XDataDictionary : IDictionary<string, XData>, ICollection<KeyValuePair<string, XData>>, IEnumerable<KeyValuePair<string, XData>>, IEnumerable
Constructors
| Improve this Doc View SourceXDataDictionary()
Initializes a new instance of XDataDictionary.
Declaration
public XDataDictionary()
XDataDictionary(IEnumerable<XData>)
Initializes a new instance of XDataDictionary and has the specified items.
Declaration
public XDataDictionary(IEnumerable<XData> items)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<XData> | items | The list of XData items initially stored. |
XDataDictionary(Int32)
Initializes a new instance of XDataDictionary and has the specified initial capacity.
Declaration
public XDataDictionary(int capacity)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | capacity | The number of items the collection can initially store. |
Properties
| Improve this Doc View SourceAppIds
Gets an ICollection containing the application registry names of the current dictionary.
Declaration
public ICollection<string> AppIds { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.ICollection<System.String> |
Count
Gets the number of XData contained in the current dictionary.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
IsReadOnly
Gets a value indicating whether the actual dictionary is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Item[String]
Gets or sets the XData with the specified application registry name.
Declaration
public XData this[string appId] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | appId | The application registry name to get or set. |
Property Value
| Type | Description |
|---|---|
| XData | The XData of the application registry. |
Values
Gets an ICollection containing the XData list of the current dictionary.
Declaration
public ICollection<XData> Values { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.ICollection<XData> |
Methods
| Improve this Doc View SourceAdd(XData)
Adds an XData to the current dictionary.
Declaration
public void Add(XData item)
Parameters
| Type | Name | Description |
|---|---|---|
| XData | item | The XData to add. |
Remarks
If the current dictionary already contains an appId equals to the extended data that is being added the XDataRecord will be added to the existing one.
AddRange(IEnumerable<XData>)
Adds a list of XData to the current dictionary.
Declaration
public void AddRange(IEnumerable<XData> items)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<XData> | items | The list of XData to add. |
Clear()
Removes all XData from the current dictionary.
Declaration
public void Clear()
ContainsAppId(String)
Determines whether current dictionary contains an XData with the specified application registry name.
Declaration
public bool ContainsAppId(string appId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | appId | The application registry name to locate in the current dictionary. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the current dictionary contains an XData with the application registry name; otherwise, false. |
ContainsValue(XData)
Determines whether current dictionary contains a specified XData.
Declaration
public bool ContainsValue(XData value)
Parameters
| Type | Name | Description |
|---|---|---|
| XData | value | The XData to locate in the current dictionary. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the current dictionary contains the XData; otherwise, false. |
GetEnumerator()
Returns an enumerator that iterates through the dictionary.
Declaration
public IEnumerator<KeyValuePair<string, XData>> GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String, XData>> | An enumerator that can be used to iterate through the dictionary. |
Remove(String)
Removes an XData with the specified application registry name from the current dictionary.
Declaration
public bool Remove(string appId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | appId | The application registry name of the XData to remove. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the XData is successfully removed; otherwise, false. |
TryGetValue(String, out XData)
Gets the XData associated with the specified application registry name.
Declaration
public bool TryGetValue(string appId, out XData value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | appId | The application registry name whose value to get. |
| XData | value | When this method returns, the XData associated with the specified application registry name, if the application registry name is found; otherwise, null. This parameter is passed uninitialized. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the current dictionary contains an XData with the specified application registry name; otherwise, false. |
Events
| Improve this Doc View SourceAddAppReg
Declaration
public event XDataDictionary.AddAppRegEventHandler AddAppReg
Event Type
| Type | Description |
|---|---|
| XDataDictionary.AddAppRegEventHandler |
RemoveAppReg
Declaration
public event XDataDictionary.RemoveAppRegEventHandler RemoveAppReg
Event Type
| Type | Description |
|---|---|
| XDataDictionary.RemoveAppRegEventHandler |
Explicit Interface Implementations
| Improve this Doc View SourceICollection<KeyValuePair<String, XData>>.Add(KeyValuePair<String, XData>)
Declaration
void ICollection<KeyValuePair<string, XData>>.Add(KeyValuePair<string, XData> item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.KeyValuePair<System.String, XData> | item |
ICollection<KeyValuePair<String, XData>>.Contains(KeyValuePair<String, XData>)
Declaration
bool ICollection<KeyValuePair<string, XData>>.Contains(KeyValuePair<string, XData> item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.KeyValuePair<System.String, XData> | item |
Returns
| Type | Description |
|---|---|
| System.Boolean |
ICollection<KeyValuePair<String, XData>>.CopyTo(KeyValuePair<String, XData>[], Int32)
Declaration
void ICollection<KeyValuePair<string, XData>>.CopyTo(KeyValuePair<string, XData>[] array, int arrayIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.KeyValuePair<System.String, XData>[] | array | |
| System.Int32 | arrayIndex |
ICollection<KeyValuePair<String, XData>>.Remove(KeyValuePair<String, XData>)
Declaration
bool ICollection<KeyValuePair<string, XData>>.Remove(KeyValuePair<string, XData> item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.KeyValuePair<System.String, XData> | item |
Returns
| Type | Description |
|---|---|
| System.Boolean |
IDictionary<String, XData>.Add(String, XData)
Declaration
void IDictionary<string, XData>.Add(string key, XData value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key | |
| XData | value |
IDictionary<String, XData>.ContainsKey(String)
Declaration
bool IDictionary<string, XData>.ContainsKey(string tag)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | tag |
Returns
| Type | Description |
|---|---|
| System.Boolean |
IDictionary<String, XData>.Keys
Declaration
ICollection<string> IDictionary<string, XData>.Keys { get; }
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.ICollection<System.String> |
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.IEnumerator |