Class AttributeCollection
Represents an attribute collection.
Inheritance
System.Object
AttributeCollection
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public class AttributeCollection : IAttributeCollection, IReadonlyAttributeCollection, IEnumerable<Attribute>
Constructors
AttributeCollection()
Creates an attribute collection.
Declaration
public AttributeCollection()
AttributeCollection(IEnumerable<Attribute>)
Creates an attribute collection.
Declaration
public AttributeCollection(IEnumerable<Attribute> attributes)
Parameters
|
IEnumerable<Attribute>
attributes
|
AttributeCollection(Attribute[])
Creates an attribute collection.
Declaration
public AttributeCollection(params Attribute[] attributes)
Parameters
|
Attribute[]
attributes
|
Properties
Count
Gets the count.
Declaration
public int Count { get; }
Property Value
|
System.Int32
|
Implements
IsReadonly
Gets the readonly flag.
Declaration
public bool IsReadonly { get; }
Property Value
|
System.Boolean
|
Implements
Methods
AddOrReplace(String, String)
Adds or replaces an attribute.
Declaration
public void AddOrReplace(string key, string value)
Parameters
|
System.String
key
|
|
System.String
value
|
Implements
Clear()
ContainsKey(String)
Checks if a given key exists.
Declaration
public bool ContainsKey(string key)
Parameters
|
System.String
key
|
Returns
|
System.Boolean
|
GetEnumerator()
Gets the enumerator.
Declaration
public IEnumerator<Attribute> GetEnumerator()
Returns
|
IEnumerator<Attribute>
|
RemoveKey(String)
Removes the attribute with this key.
Declaration
public bool RemoveKey(string key)
Parameters
|
System.String
key
|
Returns
|
System.Boolean
|
Implements
ToString()
Gets a proper description of this attribute collection.
Declaration
public override string ToString()
Returns
|
System.String
|
Overrides
System.Object.ToString()
TryGetValue(String, out String)
Tries to get the value for the given key.
Declaration
public bool TryGetValue(string key, out string value)
Parameters
|
System.String
key
|
|
System.String
value
|
Returns
|
System.Boolean
|