Show / Hide Table of Contents

    Class TaskCollection

    Collection that manages ITask objects. It supports reading and writing task configuration from and to configuration file; starting, stoping, and disposing all tasks at once.

    Inheritance
    Object
    Collection<ITask>
    TaskCollection
    Implements
    IList<ITask>
    ICollection<ITask>
    IList
    ICollection
    IReadOnlyList<ITask>
    IReadOnlyCollection<ITask>
    IEnumerable<ITask>
    IEnumerable
    IValidator
    IDisposable
    Inherited Members
    Collection<ITask>.Add(ITask)
    Collection<ITask>.Clear()
    Collection<ITask>.CopyTo(ITask[], Int32)
    Collection<ITask>.Contains(ITask)
    Collection<ITask>.GetEnumerator()
    Collection<ITask>.IndexOf(ITask)
    Collection<ITask>.Insert(Int32, ITask)
    Collection<ITask>.Remove(ITask)
    Collection<ITask>.RemoveAt(Int32)
    Collection<ITask>.ClearItems()
    Collection<ITask>.InsertItem(Int32, ITask)
    Collection<ITask>.RemoveItem(Int32)
    Collection<ITask>.SetItem(Int32, ITask)
    Collection<ITask>.IEnumerable.GetEnumerator()
    Collection<ITask>.ICollection.CopyTo(Array, Int32)
    System.Collections.ObjectModel.Collection<Nevatech.Vsb.Agent.ITask>.System.Collections.IList.get_Item(System.Int32)
    System.Collections.ObjectModel.Collection<Nevatech.Vsb.Agent.ITask>.System.Collections.IList.set_Item(System.Int32, System.Object)
    Collection<ITask>.IList.Add(Object)
    Collection<ITask>.IList.Contains(Object)
    Collection<ITask>.IList.IndexOf(Object)
    System.Collections.ObjectModel.Collection<Nevatech.Vsb.Agent.ITask>.System.Collections.IList.Insert(System.Int32, System.Object)
    Collection<ITask>.IList.Remove(Object)
    Collection<ITask>.Count
    Collection<ITask>.Items
    Collection<ITask>.Item[Int32]
    Collection<ITask>.ICollection<ITask>.IsReadOnly
    Collection<ITask>.ICollection.IsSynchronized
    Collection<ITask>.ICollection.SyncRoot
    Collection<ITask>.IList.Item[Int32]
    Collection<ITask>.IList.IsReadOnly
    Collection<ITask>.IList.IsFixedSize
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Nevatech.Vsb.Agent
    Assembly: Nevatech.Vsb.Agent.dll
    Syntax
    public sealed class TaskCollection : Collection<ITask>, IList<ITask>, ICollection<ITask>, IList, ICollection, IReadOnlyList<ITask>, IReadOnlyCollection<ITask>, IEnumerable<ITask>, IEnumerable, IValidator, IDisposable

    Constructors

    TaskCollection()

    Declaration
    public TaskCollection()

    Properties

    ErrorMessage

    Gets the message indicating the errors found during validation process.

    Declaration
    public string ErrorMessage { get; }
    Property Value
    Type Description
    String

    Methods

    Dispose()

    Disposes all service tasks in the collection.

    Declaration
    public void Dispose()

    Finalize()

    Calls Dispose.

    Declaration
    protected void Finalize()

    ReadConfiguration()

    Reads service tasks configuration from the current application configuration file.

    Declaration
    public void ReadConfiguration()

    ReadConfiguration(Configuration)

    Reads tasks configuration from provided configuration file.

    Declaration
    public void ReadConfiguration(Configuration configuration)
    Parameters
    Type Name Description
    Configuration configuration

    Configuration file to read tasks from.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown, if configuration parameter is a null reference.

    ObjectDisposedException

    Thrown, if this object has already been disposed.

    ConfigurationErrorsException

    Thrown, if service task can not be created.

    StartAll(HostType)

    Starts all tasks in the collection.

    Declaration
    public int StartAll(HostType hostType)
    Parameters
    Type Name Description
    HostType hostType

    The type of host process where task is running.

    Returns
    Type Description
    Int32

    The number of successfully started tasks.

    Exceptions
    Type Condition
    ObjectDisposedException

    Thrown, if this object has already been disposed.

    StopAll()

    Stops all tasks in the collection.

    Declaration
    public int StopAll()
    Returns
    Type Description
    Int32

    The number of successfully stopped tasks.

    Exceptions
    Type Condition
    ObjectDisposedException

    Thrown, if this object has already been disposed.

    Validate()

    Evaluates the state of all tasks in the collection.

    Declaration
    public bool Validate()
    Returns
    Type Description
    Boolean

    True if state of all tasks is valid or collection is empty; otherwise, false.

    WriteConfiguration()

    Writes service tasks configuration to the current application configuration file.

    Declaration
    public void WriteConfiguration()

    WriteConfiguration(Configuration)

    Writes configuration of all tasks in the collection to provided Configuration object.

    Declaration
    public void WriteConfiguration(Configuration configuration)
    Parameters
    Type Name Description
    Configuration configuration

    Configuration object to write into.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown, if configuration parameter is a null reference.

    ObjectDisposedException

    Thrown, if this object has already been disposed.

    ConfigurationErrorsException

    Thrown, if task can not be created.

    Implements

    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.Generic.IReadOnlyList<T>
    System.Collections.Generic.IReadOnlyCollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    IValidator
    System.IDisposable
    Back to top Nevatech Sentinet 6.5 Online Documentation