Class ListeningHostRepository
Represents an fluent repository of ListeningHost that can add, modify, or remove listening hosts while an HttpServer is running.
public sealed class ListeningHostRepository : IList<ListeningHost>, ICollection<ListeningHost>, IEnumerable<ListeningHost>, IEnumerable
- Inheritance
-
ListeningHostRepository
- Implements
- Inherited Members
Constructors
- ListeningHostRepository()
Creates a new instance of an empty ListeningHostRepository.
- ListeningHostRepository(IEnumerable<ListeningHost>)
Creates a new instance of an ListeningHostRepository copying the items from another collection of ListeningHost.
Properties
- Count
Gets the number of elements contained in this ListeningHostRepository.
- IsReadOnly
Gets an boolean indicating if this ListeningHostRepository is read only. This property always returns
true
.
Methods
- Add(ListeningHost)
Adds a listeninghost to this repository. If this listeninghost already exists in this class, an exception will be thrown.
- Clear()
Removes all listeninghosts from this repository.
- Contains(ListeningHost)
Determines if an ListeningHost is present in this repository.
- CopyTo(ListeningHost[], int)
Copies all elements from this repository to another compatible repository.
- GetEnumerator()
Returns an enumerator that iterates through this ListeningHostRepository.
- Remove(ListeningHost)
Try to remove a ListeningHost from this repository. If the item is removed, this methods returns
true
.