Class AttributeCollection
Represents serializable by demand collection of associated System.String keys and System.Object values that can be accessed either with the key or with the index.
Inheritance
Namespace: Mediachase.BusinessFoundation.Data.Meta.Management
Assembly: Mediachase.BusinessFoundation.Data.dll
Version: 13.30.0Syntax
public sealed class AttributeCollection : NameObjectCollectionBase, IXmlSerializable, IChangeTracking
Constructors
AttributeCollection()
Initializes a new instance of the AttributeCollection class.
Declaration
public AttributeCollection()
AttributeCollection(Int32)
Initializes a new instance of the AttributeCollection class.
Declaration
public AttributeCollection(int capacity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | capacity | The capacity. |
AttributeCollection(Int32, AttributeCollection)
Initializes a new instance of the AttributeCollection class.
Declaration
public AttributeCollection(int capacity, AttributeCollection collection)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | capacity | The capacity. |
AttributeCollection | collection | The collection. |
Properties
Item[Int32]
Gets the System.Object at the specified index.
Declaration
public object this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type | Description |
---|---|
System.Object |
Item[String]
Gets or sets the System.Object with the specified name.
Declaration
public object this[string name] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Property Value
Type | Description |
---|---|
System.Object |
Methods
Add(String, Object)
Adds the specified name.
Declaration
public void Add(string name, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.Object | value | The value. |
AddRange(AttributeCollection)
Adds the range.
Declaration
public void AddRange(AttributeCollection collection)
Parameters
Type | Name | Description |
---|---|---|
AttributeCollection | collection | The collection. |
Clear()
Clears this instance.
Declaration
public void Clear()
ContainsKey(String)
Determines whether the specified name contains key.
Declaration
public bool ContainsKey(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CopyTo(Array, Int32)
Copies the entire AttributeCollection to a compatible one-dimensional Array, starting at the specified index of the target array.
Declaration
public void CopyTo(Array dest, int index)
Parameters
Type | Name | Description |
---|---|---|
System.Array | dest | The dest. |
System.Int32 | index | The index. |
GetAllKeys()
Gets all keys.
Declaration
public string[] GetAllKeys()
Returns
Type | Description |
---|---|
System.String[] |
GetKey(Int32)
Gets the key.
Declaration
public string GetKey(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
Returns
Type | Description |
---|---|
System.String |
GetValue(Int32)
Gets the value.
Declaration
public object GetValue(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
Returns
Type | Description |
---|---|
System.Object |
GetValue(String)
Gets the value.
Declaration
public object GetValue(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
Returns
Type | Description |
---|---|
System.Object |
GetValue<T>(Int32)
Gets the string value.
Declaration
public T GetValue<T>(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
GetValue<T>(String)
Gets the string value.
Declaration
public T GetValue<T>(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
GetValue<T>(String, T)
Gets the value.
Declaration
public T GetValue<T>(string name, T defaultValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
T | defaultValue | The default value. |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
Remove(String)
Removes the specified name.
Declaration
public void Remove(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
SetValue(String, Object)
Sets the value.
Declaration
public void SetValue(string name, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
System.Object | value | The value. |
Explicit Interface Implementations
IChangeTracking.AcceptChanges()
Accepts the changes.
Declaration
void IChangeTracking.AcceptChanges()
IChangeTracking.IsChanged
Gets a value indicating whether this instance is changed.
Declaration
bool IChangeTracking.IsChanged { get; }
Returns
Type | Description |
---|---|
System.Boolean |
|