Export (0) Print
Expand All

ActivityFilterAttribute Class

System Center
Marks a property in an Activity class as one that supports filtering.

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

'Usage
Dim instance As ActivityFilterAttribute

[AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple=false, Inherited=false)] 
public sealed class ActivityFilterAttribute : Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple=false, Inherited=false) */ 
public final class ActivityFilterAttribute extends Attribute
AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple=false, Inherited=false) 
public final class ActivityFilterAttribute extends Attribute

[ActivityData]
public class FileInfoAdapter
{
    private 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]
    IEnumerable Files
    {
        foreach(FileInfo info in path.GetFiles("*.*"))
        {
            yield return new FileInfoAdapter(info);
        }
    }
}

A class may have as many properties marked with ActivityInput attributes as are required.

Properties marked with the ActivityFilter attribute must have a public get method.

If you do not specify any value for the Relationsproperty, the Orchestrator framework will automatically assign a set of relations that is applicable to the type of the property marked with the ActivityFilter attribute.


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

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