Click to Rate and Give Feedback
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
ExternalDataExchangeAttribute Class

Updated: November 2007

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)

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
J#
/** @attribute AttributeUsageAttribute(AttributeTargets.Interface, AllowMultiple = false, Inherited = false) */
public final class ExternalDataExchangeAttribute extends Attribute
JScript
public final class ExternalDataExchangeAttribute extends Attribute

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.

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

System..::.Object
  System..::.Attribute
    System.Workflow.Activities..::.ExternalDataExchangeAttribute
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 Vista, Windows XP SP2, 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
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker