Rediger

Del via


ReceiveActivity.SetWorkflowServiceAttributes(Object, Object) Method

Definition

Sets the attributes for the service implemented by the ReceiveActivity activity. These attributes include items like the AddressFilterMode, the ConfigurationName, and whether to include exception details in any faults that are returned from the ReceiveActivity activity.

public:
 static void SetWorkflowServiceAttributes(System::Object ^ dependencyObject, System::Object ^ value);
public static void SetWorkflowServiceAttributes (object dependencyObject, object value);
static member SetWorkflowServiceAttributes : obj * obj -> unit
Public Shared Sub SetWorkflowServiceAttributes (dependencyObject As Object, value As Object)

Parameters

dependencyObject
Object

The object to apply the service attributes to.

value
Object

The WorkflowServiceAttributes object that contains the service attribute data to apply.

Examples

The following example shows how to use the SetWorkflowServiceAttributes method.

WorkflowServiceAttributes attributes = new WorkflowServiceAttributes();
attributes.ConfigurationName = "ServiceConfig";
attributes.IncludeExceptionDetailInFaults = true;
attributes.AddressFilterMode = AddressFilterMode.Exact;

ReceiveActivity.SetWorkflowServiceAttributes(receiveActivity1, attributes);

Remarks

The WorkflowServiceAttributesProperty property is an attached dependency property defined by the ReceiveActivity activity. This dependency property is attached to the root workflow that contains the ReceiveActivity activity using the SetWorkflowServiceAttributes method call at design time.

The WorkflowServiceAttributesProperty property is used for defining service-level behavior attributes that are applied to the workflow service when it starts. These cannot be modified at runtime.

Note

If the current workflow starts another workflow using a InvokeWorkflowActivity activity, the invoked workflow does not inherit the invoking workflow's service attributes.

Note

If service attributes are set for a custom activity and that activity is included in a workflow, those service attributes is not used. Service attributes are only used in custom activities if the custom activity itself is run as a workflow.

Applies to