Show / Hide Table of Contents

Class AttributeCollection

Represents a collection of Attribute.

Inheritance
System.Object
AttributeCollection
Implements
System.Collections.Generic.IReadOnlyList<Attribute>
System.Collections.Generic.IReadOnlyCollection<Attribute>
System.Collections.Generic.IEnumerable<Attribute>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: netDxf.Collections
Assembly: CADability.dll
Syntax
public sealed class AttributeCollection : IReadOnlyList<Attribute>, IReadOnlyCollection<Attribute>, IEnumerable<Attribute>, IEnumerable

Constructors

| Improve this Doc View Source

AttributeCollection()

Initializes a new instance of AttributeCollection with the specified collection of attributes.

Declaration
public AttributeCollection()
| Improve this Doc View Source

AttributeCollection(IEnumerable<Attribute>)

Initializes a new instance of AttributeCollection with the specified collection of attributes.

Declaration
public AttributeCollection(IEnumerable<Attribute> attributes)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Attribute> attributes

The collection of attributes from which build the dictionary.

Properties

| Improve this Doc View Source

Count

Gets the number of object contained in the collection.

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

IsReadOnly

Gets a value indicating whether the collection is read-only.

Declaration
public static bool IsReadOnly { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Item[Int32]

Gets the attribute at the specified index.

Declaration
public Attribute this[int index] { get; }
Parameters
Type Name Description
System.Int32 index

The zero-based index of the element to get or set.

Property Value
Type Description
Attribute

The object at the specified index.

Methods

| Improve this Doc View Source

AttributeWithTag(String)

Searches for the first occurrence attribute with the specified attribute definition tag within the entire collection

Declaration
public Attribute AttributeWithTag(string tag)
Parameters
Type Name Description
System.String tag
Returns
Type Description
Attribute

The first occurrence of the attribute with the specified attribute definition tag within the entire collection.

| Improve this Doc View Source

Contains(Attribute)

Determines whether an attribute is in the collection.

Declaration
public bool Contains(Attribute item)
Parameters
Type Name Description
Attribute item

The attribute to locate in the collection.

Returns
Type Description
System.Boolean

True if attribute is found in the collection; otherwise, false.

| Improve this Doc View Source

CopyTo(Attribute[], Int32)

Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array.

Declaration
public void CopyTo(Attribute[] array, int arrayIndex)
Parameters
Type Name Description
Attribute[] array

The one-dimensional System.Array that is the destination of the elements copied from the collection. The System.Array must have zero-based indexing.

System.Int32 arrayIndex

The zero-based index in array at which copying begins.

| Improve this Doc View Source

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<Attribute> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<Attribute>

An enumerator that can be used to iterate through the collection.

| Improve this Doc View Source

IndexOf(Attribute)

Searches for the specified attribute and returns the zero-based index of the first occurrence within the entire collection.

Declaration
public int IndexOf(Attribute item)
Parameters
Type Name Description
Attribute item

The attribute to locate in the collection.

Returns
Type Description
System.Int32

The zero-based index of the first occurrence of item within the entire collection, if found; otherwise, –1.

Explicit Interface Implementations

| Improve this Doc View Source

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

Implements

System.Collections.Generic.IReadOnlyList<T>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX