Export (0) Print
Expand All

WorkflowServiceHost.AddServiceEndpoint Method (ServiceEndpoint)

.NET Framework 4.6 and 4.5

Adds a service endpoint to the workflow service host.

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

abstract AddServiceEndpoint : 
        endpoint:ServiceEndpoint -> unit  
override AddServiceEndpoint : 
        endpoint:ServiceEndpoint -> unit


Type: System.ServiceModel.Description.ServiceEndpoint

The service endpoint to add.

The following example shows how to use the AddServiceEndpoint method.

protected override Guid OnGetInstanceId(object[] inputs, OperationContext operationContext)
    //Create was called by client 
    if (operationContext.IncomingMessageHeaders.Action.EndsWith("Create"))
        return Guid.Empty;
    //CreateWithInstanceId was called by client 
    else if (operationContext.IncomingMessageHeaders.Action.EndsWith("CreateWithInstanceId"))
        return (Guid)inputs[1];
        throw new InvalidOperationException("Invalid Action: " + operationContext.IncomingMessageHeaders.Action);

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4
© 2015 Microsoft