ActivityFilterAttribute Class

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

'Usage
Dim instance As ActivityFilterAttribute

Syntax

'Declaration
<AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple:=False, Inherited:=False)> _
Public NotInheritable Class ActivityFilterAttribute
    Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple=false, Inherited=false)] 
public sealed class ActivityFilterAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Property, AllowMultiple=false, Inherited=false)] 
public ref class ActivityFilterAttribute sealed : public 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

Example

[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);
        }
    }
}

Remarks

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.

Inheritance Hierarchy

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

Thread Safety

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

Platforms

Development Platforms

Windows Vista, Windows Server 2003, and

Target Platforms

Change History

See Also

Reference

ActivityFilterAttribute Members
Microsoft.SystemCenter.Orchestrator.Integration Namespace