TagDirectiveCollection Class

Collection of TagDirective.

public class TagDirectiveCollection : KeyedCollection<string, TagDirective>
Inheritance
KeyedCollection<string, TagDirective> TagDirectiveCollection

Constructors

NameDescription
TagDirectiveCollection()Initializes a new instance of the TagDirectiveCollection class.
TagDirectiveCollection(IEnumerable<TagDirective>)Initializes a new instance of the TagDirectiveCollection class.

TagDirectiveCollection overloads

TagDirectiveCollection()

TagDirectiveCollection.cs

Initializes a new instance of the TagDirectiveCollection class.

public TagDirectiveCollection()

TagDirectiveCollection(IEnumerable<TagDirective>)

TagDirectiveCollection.cs

Initializes a new instance of the TagDirectiveCollection class.

public TagDirectiveCollection(IEnumerable<TagDirective> tagDirectives)
Parameters
tagDirectives IEnumerable<TagDirective>
Initial content of the collection.

Methods

NameDescription
Contains(TagDirective)Gets a value indicating whether the collection contains a directive with the same handle
GetKeyForItem(TagDirective)When implemented in a derived class, extracts the key from the specified element.

Contains(TagDirective)

TagDirectiveCollection.cs

Gets a value indicating whether the collection contains a directive with the same handle

public new bool Contains(TagDirective directive)

Parameters

directive TagDirective

Returns

bool

GetKeyForItem(TagDirective)

TagDirectiveCollection.cs

When implemented in a derived class, extracts the key from the specified element.

protected override string GetKeyForItem(TagDirective item)

Parameters

item TagDirective
The element from which to extract the key.

Returns

string The key for the specified element.