- AzureEnterpriseVariables_src.zip
- AzureEnterpriseVariables
- AzureEnterpriseVariables.sln
- AzureEnterpriseVariables.suo
- AzureEnterpriseVariables
- AzureEnterpriseVariables.ccproj
- AzureEnterpriseVariables.ccproj.user
- bin
- Debug
- ServiceConfiguration.cscfg
- ServiceDefinition.build.csdef
- ServiceDefinition.csdef
- license.rtf
- RouterServiceWebRole
- Test
- AzureStorageExplorer
- Dialogs
- Containers
- activities
- routing
- Editors
- Simulator
|
//*****************************************************************************
// Description.....Null Transport
//
// Author..........Roman Kiss, rkiss@pathcom.com
// Copyright © 2007 ATZ Consulting Inc. (see included license.rtf file)
//
// Date Created: 07/07/07
//
// Date Modified By Description
//-----------------------------------------------------------------------------
// 07/07/07 Roman Kiss Initial Revision
// 04/04/11 Roman Kiss Modify for workflow channel
// 07/07/11 Roman Kiss Modify for azure channel
//*****************************************************************************
//
#region Namespaces
using System;
using System.Activities;
using System.Diagnostics;
using System.ServiceModel;
using System.ServiceModel.Channels;
using RKiss.CustomChannels.Common;
#endregion
namespace RKiss.WorkflowChannel
{
internal class WorkflowOutputChannel : OutputChannelBase, IOutputChannel
{
string connectionString = null;
string trackingProfileName = null;
#region Constructors
internal WorkflowOutputChannel(ChannelManagerBase factory, EndpointAddress remoteAddress, Uri via)
: base(factory, remoteAddress, via)
{
Trace.TraceInformation("WorkflowOutputChannel, remoteAddress={0}", remoteAddress);
this.connectionString = (factory as WorkflowChannelFactory<IOutputChannel>).WorkflowTransportBindingElement.RepositorySettingName;
this.trackingProfileName = (factory as WorkflowChannelFactory<IOutputChannel>).WorkflowTransportBindingElement.TrackingProfileName;
}
#endregion
#region Send
public IAsyncResult BeginSend(Message message, TimeSpan timeout, AsyncCallback callback, object state)
{
// double check
base.ThrowIfDisposedOrNotOpen();
// add remote address to the message header
base.RemoteAddress.ApplyTo(message);
// load and create instance of workflow
WorkflowApplication wfa = WfHelper.CreateWorkflowApplication(message, this.connectionString, trackingProfileName);
return wfa.BeginRun(timeout, callback, state);
}
public IAsyncResult BeginSend(Message message, AsyncCallback callback, object state)
{
return BeginSend(message, base.DefaultSendTimeout, callback, state);
}
public void EndSend(IAsyncResult result)
{
WfHelper.EndRun(result);
}
public void Send(Message message)
{
Send(message, base.DefaultSendTimeout);
}
public void Send(Message message, TimeSpan timeout)
{
// double check
base.ThrowIfDisposedOrNotOpen();
// add remote address to the message header
base.RemoteAddress.ApplyTo(message);
// load and invoke a workflow activity in synch manner (the same thread!)
WfHelper.WorkflowInvoker(message, this.connectionString, timeout, trackingProfileName);
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.