Export (0) Print
Expand All

ActivityDataAttribute Class

System Center
Marks a class that can be used to encapsulate filter, input and output properties for an Activity class.

Namespace: Microsoft.SystemCenter.Orchestrator.Integration
Assembly: Microsoft.SystemCenter.Orchestrator.Integration (in Microsoft.SystemCenter.Orchestrator.Integration.dll)

'Usage
Dim instance As ActivityDataAttribute

[AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, AllowMultiple=false, Inherited=false)] 
public sealed class ActivityDataAttribute : Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, AllowMultiple=false, Inherited=false) */ 
public final class ActivityDataAttribute extends Attribute
AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, AllowMultiple=false, Inherited=false) 
public final class ActivityDataAttribute extends Attribute

[ActivityData]
public class FileInfoAdapter
{
    private readonly FileInfo fileInfo;

    public FileInfoAdapter(FileInfo fileInfo)
    {
        this.fileInfo = fileInfo;
    }

    [ActivityOutput, ActivityFilter]
    public string Name
    {
        get { return fileInfo.Name; }
    }

    [ActivityOutput, ActivityFilter]  
    public int Length
    {
        get { return fileInfo.Length; }
    }

    [ActivityOutput, ActivityFilter]
    public DateTime CreationTime
    {
        get { return fileInfo.CreationTime; }
    }


    [ActivityOutput, ActivityFilter]
    public DateTime LastWriteTime
    {
        get { return fileInfo.LastWriteTime; }
    }

    [ActivityOutput, ActivityFilter]
    public bool ReadOnly
    {
        get { return (fileInfo.Attributes & FileAttributes.ReadOnly) != 0; }
    }
}

[Activity]
public class GetDirectory 
{
    public DirectoryInfo path;

    [ActivityInput]
    public DirectoryInfo Path
    {
        set{ path = value; }
    }

    [ActivityOutput]
    public IEnumerable<FileInfoWrapper> Files
    {
        foreach(FileInfo info in path.GetFiles("*.*"))
        {
            yield return new FileInfoAdapter(info);
        }
    }
}

There are two common uses of the ActivityData attribute:


System.Object
   System.Attribute
    Microsoft.SystemCenter.Orchestrator.Integration.ActivityDataAttribute

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows Vista, Windows Server 2003, and

Target Platforms

 
Show:
© 2014 Microsoft