Class ComponentFactoryCollection
- Namespace
- Bunit
- Assembly
- Bunit.Core.dll
Represents a collection of IComponentFactory.
public sealed class ComponentFactoryCollection : IList<IComponentFactory>, ICollection<IComponentFactory>, IEnumerable<IComponentFactory>, IEnumerable
- Inheritance
-
ComponentFactoryCollection
- Implements
- Inherited Members
- Extension Methods
Constructors
ComponentFactoryCollection()
public ComponentFactoryCollection()
Properties
Count
Gets the number of IComponentFactory contained in the ComponentFactoryCollection.
public int Count { get; }
Property Value
IsReadOnly
Gets a value indicating whether the ComponentFactoryCollection is read-only.
public bool IsReadOnly { get; }
Property Value
this[int]
Gets or sets a IComponentFactory at the specified index.
public IComponentFactory this[int index] { get; set; }
Parameters
index
intThe zero-based index of the element to get or set.
Property Value
- IComponentFactory
The IComponentFactory at the specified index.
Methods
Add(IComponentFactory)
Adds an IComponentFactory to the ComponentFactoryCollection.
public void Add(IComponentFactory item)
Parameters
item
IComponentFactoryThe IComponentFactory to add to the collection.
Clear()
Removes all IComponentFactorys from the ComponentFactoryCollection.
public void Clear()
Contains(IComponentFactory)
Determines whether the ComponentFactoryCollection contains a specific IComponentFactory.
public bool Contains(IComponentFactory item)
Parameters
item
IComponentFactoryThe object to locate in the ComponentFactoryCollection..
Returns
- bool
true if item is found in the ComponentFactoryCollection; otherwise, false.
CopyTo(IComponentFactory[], int)
Copies the IComponentFactorys of the ComponentFactoryCollection to an Array, starting at a particular Array index.
public void CopyTo(IComponentFactory[] array, int arrayIndex)
Parameters
array
IComponentFactory[]The one-dimensional Array that is the destination of the elements copied from ComponentFactoryCollection. The Array must have zero-based indexing.
arrayIndex
intThe zero-based index in array at which copying begins.
GetEnumerator()
Returns an enumerator that iterates through the collection of IComponentFactory.
public IEnumerator<IComponentFactory> GetEnumerator()
Returns
- IEnumerator<IComponentFactory>
An enumerator that can be used to iterate through the collection of IComponentFactory.
IndexOf(IComponentFactory)
Determines the index of a specific IComponentFactory in the ComponentFactoryCollection.
public int IndexOf(IComponentFactory item)
Parameters
item
IComponentFactoryThe IComponentFactory to locate in the ComponentFactoryCollection..
Returns
- int
The index of IComponentFactory if found in the list; otherwise, -1.
Insert(int, IComponentFactory)
Inserts an IComponentFactory to the ComponentFactoryCollection at the specified index.
public void Insert(int index, IComponentFactory item)
Parameters
index
intThe zero-based index at which IComponentFactory should be inserted.
item
IComponentFactoryThe IComponentFactory to insert into the ComponentFactoryCollection.
Remove(IComponentFactory)
Removes the first occurrence of a specific IComponentFactory from the ComponentFactoryCollection.
public bool Remove(IComponentFactory item)
Parameters
item
IComponentFactoryThe IComponentFactory to remove from the ComponentFactoryCollection.
Returns
- bool
true if IComponentFactory was successfully removed from the ComponentFactoryCollection; otherwise, false. This method also returns false if IComponentFactory is not found in the original ComponentFactoryCollection.
RemoveAt(int)
Removes the ComponentFactoryCollection IComponentFactory at the specified index.
public void RemoveAt(int index)
Parameters
index
intThe zero-based index of the IComponentFactory to remove.