Attribute to describe a task structure. Allows describing a task's structure with XML (see the example below) and/or specifying a Navigator type to be used by this task.

If you want to describe a task's structure with an XML string then the MVCConfiguration.TaskInfoProviderType property should point to TaskInfoByXmlAttributeProvider or DefaultTaskInfoProvider types.

Namespace:  MVCSharp.Core.Configuration.Tasks
Assembly:  MVCSharp (in MVCSharp.dll)
Version: 0.8.5217.34148

Syntax

C#
public class TaskAttribute : Attribute
Visual Basic (Declaration)
Public Class TaskAttribute _
	Inherits Attribute
Visual C++
public ref class TaskAttribute : public Attribute

Examples

This is how a task structure is described with XML string inside the [Task] attribute:
CopyC#
[Task(@"
    <interactionPoints>
        <interactionPoint view = ""View1"" controllerType = ""MyApp.MyController1"">
            <navTarget trigger = ""To View2"" view = ""View2""/>
            <navTarget view = ""View3""/>
        </interactionPoint>
        <iPoint view = ""View2"" controllerType = ""MyApp.MyController2"">
        </iPoint>
        <interactionPoint view = ""View3"" controllerType = ""MyApp.MyController3"">
            <navTarget trigger = ""To View2"" view = ""View2""/>
        </interactionPoint>
    </interactionPoints>
")]
class MyTask1 { }
Note that it is possible to use either interactionPoint tag or its short analog iPoint. Next example shows how to define adjacent interaction points with transitions possible between each two of them.
CopyC#
[Task(@"
    <interactionPoints>
        <interactionPoint view = ""View1"" controllerType = ""MyApp.MyController1"">
            <navTarget trigger = ""View2"" view = ""View3""/>
        </interactionPoint>
        <iPoint view = ""View2"" controllerType = ""MyApp.MyController2""/>
        <iPoint view = ""View3"" controllerType = ""MyApp.MyController3""/>
        <interactionPoint view = ""View4"" controllerType = ""MyApp.MyController3""/>
    </interactionPoints>
    <adjacentPoints>
        <iPointRef view = ""View1""/>
        <interactionPointRef view = ""View2""/>
        <iPointRef view = ""View3""/>
    </adjacentPoints>
    <adjacentPoints>
        <iPointRef view = ""View2""/>
        <interactionPointRef view = ""View3""/>
    </adjacentPoints>
    <adjacentPoints>
        <iPointRef view = ""View3""/>
        <iPointRef view = ""View4""/>
    </adjacentPoints>
")]
class MyTask2 { }

Inheritance Hierarchy

System..::.Object
  System..::.Attribute
    MVCSharp.Core.Configuration.Tasks..::.TaskAttribute

See Also