This documentation is archived and is not being maintained.

ExternalDataExchangeAttribute Class

Marks an interface as a local service interface. This class cannot be inherited.

Namespace:  System.Workflow.Activities
Assembly:  System.Workflow.Activities (in System.Workflow.Activities.dll)

<AttributeUsageAttribute(AttributeTargets.Interface, AllowMultiple := False,  _
	Inherited := False)> _
Public NotInheritable Class ExternalDataExchangeAttribute _
	Inherits Attribute
Dim instance As ExternalDataExchangeAttribute

A class that implements a local service interface must be added to the ExternalDataExchangeService and can be used by CallExternalMethodActivity and HandleExternalEventActivity.

Events on interfaces that are attributed with ExternalDataExchangeAttribute should have event data that derive from ExternalDataEventArgs.

While generic types are supported for interface method and event declarations, generic types are not supported for the interface declaration itself. The following interface would not be valid for use as an ExternalDataExchange.

public interface IInterfaceName<TCommand>
    void MethodName(TCommand Request);

The following code example shows how to set the ExternalDataExchangeAttribute on an interface. This code example is part of the ActiveDirectoryRoles SDK sample from the IStartPurchaseOrder.cs file. For more information, see Using Active Directory Roles.

public interface IStartPurchaseOrder
    event EventHandler<InitiatePOEventArgs> InitiatePurchaseOrder;


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

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0