System.Workflow.Activities ...


.NET Framework Class Library
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)
Syntax

Visual Basic (Declaration)
<AttributeUsageAttribute(AttributeTargets.Interface, AllowMultiple := False,  _
    Inherited := False)> _
Public NotInheritable Class ExternalDataExchangeAttribute _
    Inherits Attribute
Visual Basic (Usage)
Dim instance As ExternalDataExchangeAttribute
C#
[AttributeUsageAttribute(AttributeTargets.Interface, AllowMultiple = false, 
    Inherited = false)]
public sealed class ExternalDataExchangeAttribute : Attribute
Visual C++
[AttributeUsageAttribute(AttributeTargets::Interface, AllowMultiple = false, 
    Inherited = false)]
public ref class ExternalDataExchangeAttribute sealed : public Attribute
JScript
public final class ExternalDataExchangeAttribute extends Attribute
Remarks

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

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.

C#
[ExternalDataExchangeAttribute()]
public interface IStartPurchaseOrder
{
    event EventHandler<InitiatePOEventArgs> InitiatePurchaseOrder;
}
Inheritance Hierarchy

System..::.Object
  System..::.Attribute
    System.Workflow.Activities..::.ExternalDataExchangeAttribute
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

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.
Version Information

.NET Framework

Supported in: 3.5, 3.0
See Also

Reference

Tags :


Community Content

Martin1977
Exclude single methods possible?
Is it possible to exclude single methods although they are within the interface? Meant for using the interface for two purposes: First to implement a strategy, second to implement a Data Connector.
Tags :

Page view tracker