Namespace: Microsoft.ResourceManagement.Workflow.Activities
Assembly: Microsoft.ResourceManagement (in microsoft.resourcemanagement.dll)
Usage
Visual Basic |
---|
Dim instance As EnumerateResourcesActivity |
Syntax
Visual Basic |
---|
Public NotInheritable Class EnumerateResourcesActivity Inherits CompositeActivity |
C# |
---|
public sealed class EnumerateResourcesActivity : CompositeActivity |
C++ |
---|
public ref class EnumerateResourcesActivity sealed : public CompositeActivity |
J# |
---|
public final class EnumerateResourcesActivity extends CompositeActivity |
JScript |
---|
public final class EnumerateResourcesActivity extends CompositeActivity |
Remarks
Sample usage:
-
Set the ActorId property of the activity.
-
Set the XPathFilter property to specify the FIM XPath query to use in the enumeration. For more information, see XPath Filter Language.
-
Set the PageSize property.
-
Set the Selection property to specify which attributes to retrieve for the results. The attributes that are common to all resources (those that are attributes of the base Resource object type in the FIM schema) are always returned.
-
[Optional] Set the SortingAttributes property to specify the sorting order of the results.
-
Bind a child activity to the EnumerateResourcesActivity activity to access the resources that the enumeration returns.
The activity
evaluatedQueryResult
is bound to a declared instance of the EnumerateResourcesActivity, as a child activity, in the following example. The following example assumes a code activityevaluateQueryResult
was previously declared.C# Copy Code this.evaluateQueryResult = new System.Workflow.Activities.CodeActivity(); this.enumerateResourcesActivity1.Activities.Add(this.evaluateQueryResult);
-
Access the results from within the code activity that is bound to the EnumerateResourcesActivity.
The following example returns the current item from the query results.
C# Copy Code ResourceType result = EnumerateResourcesActivity.GetCurrentIterationItem((CodeActivity)sender) as ResourceType;
Inheritance Hierarchy
System.Workflow.ComponentModel.DependencyObject
System.Workflow.ComponentModel.Activity
System.Workflow.ComponentModel.CompositeActivity
Microsoft.ResourceManagement.Workflow.Activities.EnumerateResourcesActivity