Show / Hide Table of Contents

    Class TaskElement

    Represents configuration of a task.

    Inheritance
    Object
    TaskElement
    Namespace: Nevatech.Vsb.Agent.Configuration
    Assembly: Nevatech.Vsb.Agent.dll
    Syntax
    public sealed class TaskElement : ConfigurationElement

    Constructors

    TaskElement()

    Declaration
    public TaskElement()

    Properties

    Name

    Gets or sets the element's name. The name must be unique within configuration element collection.

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

    Properties

    Gets collection of configuration element properties.

    Declaration
    protected override ConfigurationPropertyCollection Properties { get; }
    Property Value
    Type Description
    ConfigurationPropertyCollection

    TypeName

    Gets or sets fully qualified task type name.

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

    Methods

    CreateTask()

    Creates and configures the task.

    Declaration
    public ITask CreateTask()
    Returns
    Type Description
    ITask

    An instance that implements ITask.

    InitializeFrom(ITask)

    Initializes this configuration element from the specified ITask.

    Declaration
    public void InitializeFrom(ITask task)
    Parameters
    Type Name Description
    ITask task

    The ITask to initialize from.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if the specified service task is a null reference.

    OnDeserializeUnrecognizedElement(String, XmlReader)

    Called when an unknown element is encountered while deserializing the ConfigurationElement object.

    Declaration
    protected override bool OnDeserializeUnrecognizedElement(string elementName, XmlReader reader)
    Parameters
    Type Name Description
    String elementName

    The name of the unknown subelement.

    XmlReader reader

    The XmlReader being used for deserialization.

    Returns
    Type Description
    Boolean

    True when an unknown element is encountered while deserializing; otherwise, false. This method always returns true.

    Remarks

    See OnDeserializeUnrecognizedElement(String, XmlReader) method for more information.

    SerializeElement(XmlWriter, Boolean)

    Writes the contents of this configuration element to the configuration file. See SerializeElement(XmlWriter, Boolean) method for more information.

    Declaration
    protected override bool SerializeElement(XmlWriter writer, bool serializeCollectionKey)
    Parameters
    Type Name Description
    XmlWriter writer

    The XmlWriter that writes to the configuration file.

    Boolean serializeCollectionKey

    true to serialize only the collection key properties; otherwise, false.

    Returns
    Type Description
    Boolean

    True if any data was actually serialized; otherwise, false.

    Back to top Nevatech Sentinet 6.5 Online Documentation