IActivity Interface

System Center
Use this interface to implement an Activity.

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

'Usage
Dim instance As IActivity

public interface IActivity
public interface IActivity
public interface IActivity

[Activity("File Length")]
public class FileLength : IActivity
{ 
    public void Design(IActivityDesigner designer)
    {
        designer.AddInput("File").WithFileBrowser();
        designer.AddOutput("Length").AsNumber().WithDescription("File length in bytes");
    }

    public void Execute(IActivityRequest request, IActivityResponse response)
    {
        FileInfo fileInfo = request.Inputs["File"].As<FileInfo>();
        response.Publish("Length", fileInfo.Length);
    }
}

Using the IActivity interface is an alternative or in conjunction with the declarative approach whith uses the ActivityInput, ActivityFilter and ActivityOutput attributes to design an Activity class.


Development Platforms

Windows Vista, Windows Server 2003, and

Target Platforms

 
Show: