Ejemplo n.º 1
0
        public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
        {
            object convertedValue = null;
            string endpointName   = value as String;

            if (!String.IsNullOrEmpty(endpointName))
            {
                foreach (object obj in GetStandardValues(context))
                {
                    ChannelToken endpoint = obj as ChannelToken;
                    if (endpoint != null && endpoint.Name == endpointName)
                    {
                        convertedValue = endpoint;
                        break;
                    }
                }

                if (convertedValue == null)
                {
                    convertedValue = new ChannelToken(endpointName);
                }
            }

            return(convertedValue);
        }
Ejemplo n.º 2
0
        public static void SetContext(Activity activity,
                                      string endpointName,
                                      string ownerActivityName,
                                      Type contractType,
                                      IDictionary <string, string> context)
        {
            if (activity == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("activity");
            }
            if (string.IsNullOrEmpty(endpointName))
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgument("endpointName",
                                                                             SR2.GetString(SR2.Error_ArgumentValueNullOrEmptyString));
            }
            if (contractType == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("contractType");
            }

            LogicalChannel logicalChannel = ChannelToken.GetLogicalChannel(activity, endpointName, ownerActivityName, contractType);

            if (logicalChannel != null)
            {
                if (context != null)
                {
                    logicalChannel.Context = context;
                }
                else
                {
                    logicalChannel.Context = ContextMessageProperty.Empty.Context;
                }
            }
        }
        internal static LogicalChannel Register(Activity activity,
                                                ChannelToken endpoint,
                                                Type contractType)
        {
            if (activity == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("activity");
            }
            if (endpoint == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("endpoint");
            }
            if (contractType == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("contractType");
            }

            LogicalChannel logicalChannel = GetLogicalChannel(activity, endpoint, contractType);

            if (logicalChannel == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(
                          new InvalidOperationException(SR2.GetString(SR2.Error_FailedToRegisterChannel, endpoint.Name)));
            }

            return(logicalChannel);
        }
Ejemplo n.º 4
0
        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
        {
            object       convertedValue = null;
            ChannelToken endpoint       = value as ChannelToken;

            if (destinationType == typeof(string) && endpoint != null)
            {
                convertedValue = endpoint.Name;
            }
            return(convertedValue);
        }
Ejemplo n.º 5
0
        public static IDictionary <string, string> GetContext(Activity activity,
                                                              ChannelToken endpoint,
                                                              Type contractType)
        {
            if (activity == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("activity");
            }
            if (endpoint == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("endpoint");
            }
            if (contractType == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("contractType");
            }

            return(GetContext(activity, endpoint.Name, endpoint.OwnerActivityName, contractType));
        }
        internal static LogicalChannel GetLogicalChannel(Activity activity,
                                                         ChannelToken endpoint,
                                                         Type contractType)
        {
            if (activity == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("activity");
            }
            if (endpoint == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("endpoint");
            }
            if (contractType == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("contractType");
            }

            return(GetLogicalChannel(activity, endpoint.Name, endpoint.OwnerActivityName, contractType));
        }
Ejemplo n.º 7
0
        public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
        {
            ArrayList values   = new ArrayList();
            Activity  activity = context.Instance as Activity;

            if (activity != null)
            {
                foreach (Activity preceedingActivity in GetPreceedingActivities(activity))
                {
                    PropertyDescriptor endpointProperty = TypeDescriptor.GetProperties(preceedingActivity)["ChannelToken"] as PropertyDescriptor;
                    if (endpointProperty != null)
                    {
                        ChannelToken endpoint = endpointProperty.GetValue(preceedingActivity) as ChannelToken;
                        if (endpoint != null && !values.Contains(endpoint))
                        {
                            values.Add(endpoint);
                        }
                    }
                }
            }
            return(new StandardValuesCollection(values));
        }
        public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
        {
            object convertedValue = null;
            string endpointName = value as String;
            if (!String.IsNullOrEmpty(endpointName))
            {
                foreach (object obj in GetStandardValues(context))
                {
                    ChannelToken endpoint = obj as ChannelToken;
                    if (endpoint != null && endpoint.Name == endpointName)
                    {
                        convertedValue = endpoint;
                        break;
                    }
                }

                if (convertedValue == null)
                {
                    convertedValue = new ChannelToken(endpointName);
                }
            }

            return convertedValue;
        }
 private void InitializeComponent()
 {
     this.CanModifyActivities = true;
     System.Workflow.ComponentModel.ActivityBind             activitybind1             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding1 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind2             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding2 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind3             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding3 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.TypedOperationInfo           typedoperationinfo1       = new System.Workflow.Activities.TypedOperationInfo();
     System.Workflow.Activities.ChannelToken                 endpoint1                  = new System.Workflow.Activities.ChannelToken();
     System.Workflow.ComponentModel.ActivityBind             activitybind4              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding4  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind5              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding5  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind6              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding6  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.TypedOperationInfo           typedoperationinfo2        = new System.Workflow.Activities.TypedOperationInfo();
     System.Workflow.Activities.WorkflowServiceAttributes    workflowserviceattributes1 = new System.Workflow.Activities.WorkflowServiceAttributes();
     this.DoReviewOrder       = new System.Workflow.Activities.CodeActivity();
     this.ReceiveOrderDetails = new System.Workflow.Activities.ReceiveActivity();
     this.DoDisplayStatus     = new System.Workflow.Activities.CodeActivity();
     this.SendSubmitOrder     = new System.Workflow.Activities.SendActivity();
     //
     // DoReviewOrder
     //
     this.DoReviewOrder.Name         = "DoReviewOrder";
     this.DoReviewOrder.ExecuteCode += new System.EventHandler(this.ReviewOrder);
     //
     // ReceiveOrderDetails
     //
     this.ReceiveOrderDetails.Activities.Add(this.DoReviewOrder);
     this.ReceiveOrderDetails.Name           = "ReceiveOrderDetails";
     activitybind1.Name                      = "CustomerWorkflow";
     activitybind1.Path                      = "orderDetails";
     workflowparameterbinding1.ParameterName = "po";
     workflowparameterbinding1.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
     activitybind2.Name = "CustomerWorkflow";
     activitybind2.Path = "shippingQuote";
     workflowparameterbinding2.ParameterName = "quote";
     workflowparameterbinding2.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
     activitybind3.Name = "CustomerWorkflow";
     activitybind3.Path = "customerAck";
     workflowparameterbinding3.ParameterName = "(ReturnValue)";
     workflowparameterbinding3.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
     this.ReceiveOrderDetails.ParameterBindings.Add(workflowparameterbinding1);
     this.ReceiveOrderDetails.ParameterBindings.Add(workflowparameterbinding2);
     this.ReceiveOrderDetails.ParameterBindings.Add(workflowparameterbinding3);
     typedoperationinfo1.ContractType = typeof(Microsoft.WorkflowServices.Samples.IOrderDetails);
     typedoperationinfo1.Name         = "OrderDetails";
     this.ReceiveOrderDetails.ServiceOperationInfo = typedoperationinfo1;
     //
     // DoDisplayStatus
     //
     this.DoDisplayStatus.Name         = "DoDisplayStatus";
     this.DoDisplayStatus.ExecuteCode += new System.EventHandler(this.DisplayStatus);
     //
     // SendSubmitOrder
     //
     endpoint1.EndpointName                  = "SupplierEndPoint";
     endpoint1.Name                          = "SupplierEndPoint";
     endpoint1.OwnerActivityName             = "CustomerWorkflow";
     this.SendSubmitOrder.ChannelToken       = endpoint1;
     this.SendSubmitOrder.Name               = "SendSubmitOrder";
     activitybind4.Name                      = "CustomerWorkflow";
     activitybind4.Path                      = "order";
     workflowparameterbinding4.ParameterName = "po";
     workflowparameterbinding4.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
     activitybind5.Name = "CustomerWorkflow";
     activitybind5.Path = "contextToSend";
     workflowparameterbinding5.ParameterName = "context";
     workflowparameterbinding5.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5)));
     activitybind6.Name = "CustomerWorkflow";
     activitybind6.Path = "supplierAck";
     workflowparameterbinding6.ParameterName = "(ReturnValue)";
     workflowparameterbinding6.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6)));
     this.SendSubmitOrder.ParameterBindings.Add(workflowparameterbinding4);
     this.SendSubmitOrder.ParameterBindings.Add(workflowparameterbinding5);
     this.SendSubmitOrder.ParameterBindings.Add(workflowparameterbinding6);
     typedoperationinfo2.ContractType          = typeof(Microsoft.WorkflowServices.Samples.IOrder);
     typedoperationinfo2.Name                  = "SubmitOrder";
     this.SendSubmitOrder.ServiceOperationInfo = typedoperationinfo2;
     this.SendSubmitOrder.BeforeSend          += new System.EventHandler <System.Workflow.Activities.SendActivityEventArgs>(this.PrepareOrder);
     //
     // CustomerWorkflow
     //
     this.Activities.Add(this.SendSubmitOrder);
     this.Activities.Add(this.DoDisplayStatus);
     this.Activities.Add(this.ReceiveOrderDetails);
     this.Name = "CustomerWorkflow";
     this.SetValue(System.Workflow.Activities.ReceiveActivity.WorkflowServiceAttributesProperty, workflowserviceattributes1);
     this.CanModifyActivities = false;
 }
Ejemplo n.º 10
0
        protected internal override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
        {
            TypedOperationInfo serviceOperationInfo = this.ServiceOperationInfo;

            if (serviceOperationInfo == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(
                          new InvalidOperationException(SR2.GetString(SR2.Error_ServiceOperationInfoNotSpecified, this.Name)));
            }

            MethodInfo methodInfo = serviceOperationInfo.GetMethodInfo(executionContext);

            if (methodInfo == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(
                          new InvalidOperationException(SR2.GetString(SR2.Error_MethodInfoNotAvailable, this.Name)));
            }

            ChannelToken channelToken = this.ChannelToken;

            LogicalChannel logicalChannel = ChannelToken.Register(this, channelToken, serviceOperationInfo.ContractType);

            if (!logicalChannel.Initialized)
            {
                logicalChannel.Initialize(channelToken.EndpointName, this.CustomAddress);
            }

            using (ChannelManagerService.ChannelTicket leasedChannel = ChannelManagerService.Take(executionContext, this.WorkflowInstanceId, logicalChannel))
            {
                using (OperationContextScope scope = new OperationContextScope((IContextChannel)leasedChannel.Channel))
                {
                    EventHandler <SendActivityEventArgs>[] invocationList = this.GetInvocationList <EventHandler <SendActivityEventArgs> >(SendActivity.BeforeSendEvent);
                    if (invocationList != null && invocationList.Length > 0)
                    {
                        base.RaiseGenericEvent(SendActivity.BeforeSendEvent, this, new SendActivityEventArgs(this));
                    }

                    SendOperationInfoHelper            helper   = this.OperationHelper;
                    WorkflowParameterBindingCollection bindings = this.ParameterBindings;

                    object[] parameters  = helper.GetInputs(this, bindings);
                    object   returnValue = null;

                    bool isSessionless  = ChannelManagerHelpers.IsSessionlessContract(logicalChannel.ContractType);
                    bool hasContext     = (logicalChannel.Context != null && logicalChannel.Context.Count > 0);
                    bool fatalException = false;

                    if (!isSessionless && hasContext)
                    {
                        ChannelManagerService.ApplyLogicalChannelContext(logicalChannel);
                    }

                    try
                    {
                        returnValue = this.InvokeOperation(methodInfo, leasedChannel.Channel, parameters);
                    }
                    catch (Exception exception)
                    {
                        if (Fx.IsFatal(exception))
                        {
                            fatalException = true;
                        }
                        throw;
                    }
                    finally
                    {
                        if (!fatalException &&
                            !hasContext && !isSessionless && !helper.IsOneWay)
                        {
                            ChannelManagerService.UpdateLogicalChannelContext(logicalChannel);
                        }
                    }

                    helper.PopulateOutputs(this, bindings, parameters, returnValue);

                    invocationList = this.GetInvocationList <EventHandler <SendActivityEventArgs> >(SendActivity.AfterResponseEvent);
                    if (invocationList != null && invocationList.Length > 0)
                    {
                        base.RaiseGenericEvent(SendActivity.AfterResponseEvent, this, new SendActivityEventArgs(this));
                    }
                }
            }

            return(ActivityExecutionStatus.Closed);
        }
 private void InitializeComponent()
 {
     this.CanModifyActivities = true;
     System.Workflow.Activities.ContextToken                 contexttoken1              = new System.Workflow.Activities.ContextToken();
     System.Workflow.ComponentModel.ActivityBind             activitybind1              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding1  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.TypedOperationInfo           typedoperationinfo1        = new System.Workflow.Activities.TypedOperationInfo();
     System.Workflow.Activities.ChannelToken                 channeltoken1              = new System.Workflow.Activities.ChannelToken();
     System.Workflow.ComponentModel.ActivityBind             activitybind2              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding2  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind3              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding3  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind4              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding4  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.TypedOperationInfo           typedoperationinfo2        = new System.Workflow.Activities.TypedOperationInfo();
     System.Workflow.Activities.ContextToken                 contexttoken2              = new System.Workflow.Activities.ContextToken();
     System.Workflow.ComponentModel.ActivityBind             activitybind5              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding5  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.TypedOperationInfo           typedoperationinfo3        = new System.Workflow.Activities.TypedOperationInfo();
     System.Workflow.Activities.ChannelToken                 channeltoken2              = new System.Workflow.Activities.ChannelToken();
     System.Workflow.ComponentModel.ActivityBind             activitybind6              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding6  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind7              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding7  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind8              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding8  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.TypedOperationInfo           typedoperationinfo4        = new System.Workflow.Activities.TypedOperationInfo();
     System.Workflow.Activities.ContextToken                 contexttoken3              = new System.Workflow.Activities.ContextToken();
     System.Workflow.ComponentModel.ActivityBind             activitybind9              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding9  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.TypedOperationInfo           typedoperationinfo5        = new System.Workflow.Activities.TypedOperationInfo();
     System.Workflow.Activities.ChannelToken                 channeltoken3              = new System.Workflow.Activities.ChannelToken();
     System.Workflow.ComponentModel.ActivityBind             activitybind10             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding10 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind11             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding11 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind12             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding12 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.TypedOperationInfo           typedoperationinfo6        = new System.Workflow.Activities.TypedOperationInfo();
     System.Workflow.Activities.ChannelToken                 channeltoken4              = new System.Workflow.Activities.ChannelToken();
     System.Workflow.ComponentModel.ActivityBind             activitybind13             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding13 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind14             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding14 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.TypedOperationInfo           typedoperationinfo7        = new System.Workflow.Activities.TypedOperationInfo();
     System.Workflow.ComponentModel.ActivityBind             activitybind15             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding15 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind16             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding16 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind17             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding17 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.TypedOperationInfo           typedoperationinfo8        = new System.Workflow.Activities.TypedOperationInfo();
     System.Workflow.Activities.WorkflowServiceAttributes    workflowserviceattributes1 = new System.Workflow.Activities.WorkflowServiceAttributes();
     this.Shipper3ShippingQuote    = new System.Workflow.Activities.CodeActivity();
     this.Shipper2ShippingQuote    = new System.Workflow.Activities.CodeActivity();
     this.Shipper1ShippingQuote    = new System.Workflow.Activities.CodeActivity();
     this.ReceiveQuoteFromShipper3 = new System.Workflow.Activities.ReceiveActivity();
     this.RequestQuoteFromShipper3 = new System.Workflow.Activities.SendActivity();
     this.ReceiveQuoteFromShipper2 = new System.Workflow.Activities.ReceiveActivity();
     this.RequestQuoteFromShipper2 = new System.Workflow.Activities.SendActivity();
     this.ReceiveQuoteFromShipper1 = new System.Workflow.Activities.ReceiveActivity();
     this.RequestQuoteFromShipper1 = new System.Workflow.Activities.SendActivity();
     this.Shipper3Quote            = new System.Workflow.Activities.SequenceActivity();
     this.Shipper2Quote            = new System.Workflow.Activities.SequenceActivity();
     this.Shipper1Quote            = new System.Workflow.Activities.SequenceActivity();
     this.DoAcceptOrder            = new System.Workflow.Activities.CodeActivity();
     this.SendOrderDetails         = new System.Workflow.Activities.SendActivity();
     this.GetShippingQuotes        = new System.Workflow.Activities.ParallelActivity();
     this.ReceiveSubmitOrder       = new System.Workflow.Activities.ReceiveActivity();
     //
     // Shipper3ShippingQuote
     //
     this.Shipper3ShippingQuote.Name         = "Shipper3ShippingQuote";
     this.Shipper3ShippingQuote.ExecuteCode += new System.EventHandler(this.ReceiveShipper3ShippingQuote);
     //
     // Shipper2ShippingQuote
     //
     this.Shipper2ShippingQuote.Name         = "Shipper2ShippingQuote";
     this.Shipper2ShippingQuote.ExecuteCode += new System.EventHandler(this.ReceiveShipper2ShippingQuote);
     //
     // Shipper1ShippingQuote
     //
     this.Shipper1ShippingQuote.Name         = "Shipper1ShippingQuote";
     this.Shipper1ShippingQuote.ExecuteCode += new System.EventHandler(this.ReceiveShipper1ShippingQuote);
     //
     // ReceiveQuoteFromShipper3
     //
     this.ReceiveQuoteFromShipper3.Activities.Add(this.Shipper3ShippingQuote);
     contexttoken1.Name = "Shipper3Context";
     this.ReceiveQuoteFromShipper3.ContextToken = contexttoken1;
     this.ReceiveQuoteFromShipper3.Name         = "ReceiveQuoteFromShipper3";
     activitybind1.Name = "SupplierWorkflow";
     activitybind1.Path = "quoteShipper3";
     workflowparameterbinding1.ParameterName = "quote";
     workflowparameterbinding1.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
     this.ReceiveQuoteFromShipper3.ParameterBindings.Add(workflowparameterbinding1);
     typedoperationinfo1.ContractType = typeof(Microsoft.WorkflowServices.Samples.IShippingQuote);
     typedoperationinfo1.Name         = "ShippingQuote";
     this.ReceiveQuoteFromShipper3.ServiceOperationInfo = typedoperationinfo1;
     //
     // RequestQuoteFromShipper3
     //
     channeltoken1.EndpointName                 = "Shipper3Endpoint";
     channeltoken1.Name                         = "Shipper3Endpoint";
     channeltoken1.OwnerActivityName            = "GetShippingQuotes";
     this.RequestQuoteFromShipper3.ChannelToken = channeltoken1;
     this.RequestQuoteFromShipper3.Name         = "RequestQuoteFromShipper3";
     activitybind2.Name                         = "SupplierWorkflow";
     activitybind2.Path                         = "order";
     workflowparameterbinding2.ParameterName    = "po";
     workflowparameterbinding2.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
     activitybind3.Name = "SupplierWorkflow";
     activitybind3.Path = "contextShipper3";
     workflowparameterbinding3.ParameterName = "context";
     workflowparameterbinding3.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
     activitybind4.Name = "SupplierWorkflow";
     activitybind4.Path = "ackShipper3";
     workflowparameterbinding4.ParameterName = "(ReturnValue)";
     workflowparameterbinding4.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
     this.RequestQuoteFromShipper3.ParameterBindings.Add(workflowparameterbinding2);
     this.RequestQuoteFromShipper3.ParameterBindings.Add(workflowparameterbinding3);
     this.RequestQuoteFromShipper3.ParameterBindings.Add(workflowparameterbinding4);
     typedoperationinfo2.ContractType = typeof(Microsoft.WorkflowServices.Samples.IShippingRequest);
     typedoperationinfo2.Name         = "RequestShippingQuote";
     this.RequestQuoteFromShipper3.ServiceOperationInfo = typedoperationinfo2;
     this.RequestQuoteFromShipper3.BeforeSend          += new System.EventHandler <System.Workflow.Activities.SendActivityEventArgs>(this.PrepareShipper3Request);
     //
     // ReceiveQuoteFromShipper2
     //
     this.ReceiveQuoteFromShipper2.Activities.Add(this.Shipper2ShippingQuote);
     contexttoken2.Name = "Shipper2Context";
     contexttoken2.OwnerActivityName            = "GetShippingQuotes";
     this.ReceiveQuoteFromShipper2.ContextToken = contexttoken2;
     this.ReceiveQuoteFromShipper2.Name         = "ReceiveQuoteFromShipper2";
     activitybind5.Name = "SupplierWorkflow";
     activitybind5.Path = "quoteShipper2";
     workflowparameterbinding5.ParameterName = "quote";
     workflowparameterbinding5.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5)));
     this.ReceiveQuoteFromShipper2.ParameterBindings.Add(workflowparameterbinding5);
     typedoperationinfo3.ContractType = typeof(Microsoft.WorkflowServices.Samples.IShippingQuote);
     typedoperationinfo3.Name         = "ShippingQuote";
     this.ReceiveQuoteFromShipper2.ServiceOperationInfo = typedoperationinfo3;
     //
     // RequestQuoteFromShipper2
     //
     channeltoken2.EndpointName                 = "Shipper2Endpoint";
     channeltoken2.Name                         = "Shipper2Endpoint";
     channeltoken2.OwnerActivityName            = "GetShippingQuotes";
     this.RequestQuoteFromShipper2.ChannelToken = channeltoken2;
     this.RequestQuoteFromShipper2.Name         = "RequestQuoteFromShipper2";
     activitybind6.Name                         = "SupplierWorkflow";
     activitybind6.Path                         = "ackShipper2";
     workflowparameterbinding6.ParameterName    = "(ReturnValue)";
     workflowparameterbinding6.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6)));
     activitybind7.Name = "SupplierWorkflow";
     activitybind7.Path = "order";
     workflowparameterbinding7.ParameterName = "po";
     workflowparameterbinding7.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind7)));
     activitybind8.Name = "SupplierWorkflow";
     activitybind8.Path = "contextShipper2";
     workflowparameterbinding8.ParameterName = "context";
     workflowparameterbinding8.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind8)));
     this.RequestQuoteFromShipper2.ParameterBindings.Add(workflowparameterbinding6);
     this.RequestQuoteFromShipper2.ParameterBindings.Add(workflowparameterbinding7);
     this.RequestQuoteFromShipper2.ParameterBindings.Add(workflowparameterbinding8);
     typedoperationinfo4.ContractType = typeof(Microsoft.WorkflowServices.Samples.IShippingRequest);
     typedoperationinfo4.Name         = "RequestShippingQuote";
     this.RequestQuoteFromShipper2.ServiceOperationInfo = typedoperationinfo4;
     this.RequestQuoteFromShipper2.BeforeSend          += new System.EventHandler <System.Workflow.Activities.SendActivityEventArgs>(this.PrepareShipper2Request);
     //
     // ReceiveQuoteFromShipper1
     //
     this.ReceiveQuoteFromShipper1.Activities.Add(this.Shipper1ShippingQuote);
     contexttoken3.Name = "Shipper1Context";
     contexttoken3.OwnerActivityName            = "GetShippingQuotes";
     this.ReceiveQuoteFromShipper1.ContextToken = contexttoken3;
     this.ReceiveQuoteFromShipper1.Name         = "ReceiveQuoteFromShipper1";
     activitybind9.Name = "SupplierWorkflow";
     activitybind9.Path = "quoteShipper1";
     workflowparameterbinding9.ParameterName = "quote";
     workflowparameterbinding9.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind9)));
     this.ReceiveQuoteFromShipper1.ParameterBindings.Add(workflowparameterbinding9);
     typedoperationinfo5.ContractType = typeof(Microsoft.WorkflowServices.Samples.IShippingQuote);
     typedoperationinfo5.Name         = "ShippingQuote";
     this.ReceiveQuoteFromShipper1.ServiceOperationInfo = typedoperationinfo5;
     //
     // RequestQuoteFromShipper1
     //
     channeltoken3.EndpointName                 = "Shipper1Endpoint";
     channeltoken3.Name                         = "Shipper1Endpoint";
     channeltoken3.OwnerActivityName            = "GetShippingQuotes";
     this.RequestQuoteFromShipper1.ChannelToken = channeltoken3;
     this.RequestQuoteFromShipper1.Name         = "RequestQuoteFromShipper1";
     activitybind10.Name                        = "SupplierWorkflow";
     activitybind10.Path                        = "order";
     workflowparameterbinding10.ParameterName   = "po";
     workflowparameterbinding10.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind10)));
     activitybind11.Name = "SupplierWorkflow";
     activitybind11.Path = "contextShipper1";
     workflowparameterbinding11.ParameterName = "context";
     workflowparameterbinding11.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind11)));
     activitybind12.Name = "SupplierWorkflow";
     activitybind12.Path = "ackShipper1";
     workflowparameterbinding12.ParameterName = "(ReturnValue)";
     workflowparameterbinding12.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind12)));
     this.RequestQuoteFromShipper1.ParameterBindings.Add(workflowparameterbinding10);
     this.RequestQuoteFromShipper1.ParameterBindings.Add(workflowparameterbinding11);
     this.RequestQuoteFromShipper1.ParameterBindings.Add(workflowparameterbinding12);
     typedoperationinfo6.ContractType = typeof(Microsoft.WorkflowServices.Samples.IShippingRequest);
     typedoperationinfo6.Name         = "RequestShippingQuote";
     this.RequestQuoteFromShipper1.ServiceOperationInfo = typedoperationinfo6;
     this.RequestQuoteFromShipper1.BeforeSend          += new System.EventHandler <System.Workflow.Activities.SendActivityEventArgs>(this.PrepareShipper1Request);
     //
     // Shipper3Quote
     //
     this.Shipper3Quote.Activities.Add(this.RequestQuoteFromShipper3);
     this.Shipper3Quote.Activities.Add(this.ReceiveQuoteFromShipper3);
     this.Shipper3Quote.Name = "Shipper3Quote";
     //
     // Shipper2Quote
     //
     this.Shipper2Quote.Activities.Add(this.RequestQuoteFromShipper2);
     this.Shipper2Quote.Activities.Add(this.ReceiveQuoteFromShipper2);
     this.Shipper2Quote.Name = "Shipper2Quote";
     //
     // Shipper1Quote
     //
     this.Shipper1Quote.Activities.Add(this.RequestQuoteFromShipper1);
     this.Shipper1Quote.Activities.Add(this.ReceiveQuoteFromShipper1);
     this.Shipper1Quote.Name = "Shipper1Quote";
     //
     // DoAcceptOrder
     //
     this.DoAcceptOrder.Name         = "DoAcceptOrder";
     this.DoAcceptOrder.ExecuteCode += new System.EventHandler(this.AcceptOrder);
     //
     // SendOrderDetails
     //
     channeltoken4.EndpointName               = "CustomerEndpoint";
     channeltoken4.Name                       = "CustomerEndpoint";
     channeltoken4.OwnerActivityName          = "SupplierWorkflow";
     this.SendOrderDetails.ChannelToken       = channeltoken4;
     this.SendOrderDetails.Name               = "SendOrderDetails";
     activitybind13.Name                      = "SupplierWorkflow";
     activitybind13.Path                      = "confirmedQuote";
     workflowparameterbinding13.ParameterName = "quote";
     workflowparameterbinding13.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind13)));
     activitybind14.Name = "SupplierWorkflow";
     activitybind14.Path = "confirmedOrder";
     workflowparameterbinding14.ParameterName = "po";
     workflowparameterbinding14.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind14)));
     this.SendOrderDetails.ParameterBindings.Add(workflowparameterbinding13);
     this.SendOrderDetails.ParameterBindings.Add(workflowparameterbinding14);
     typedoperationinfo7.ContractType           = typeof(Microsoft.WorkflowServices.Samples.IOrderDetails);
     typedoperationinfo7.Name                   = "OrderDetails";
     this.SendOrderDetails.ServiceOperationInfo = typedoperationinfo7;
     this.SendOrderDetails.BeforeSend          += new System.EventHandler <System.Workflow.Activities.SendActivityEventArgs>(this.PrepareOrderConfirmation);
     //
     // GetShippingQuotes
     //
     this.GetShippingQuotes.Activities.Add(this.Shipper1Quote);
     this.GetShippingQuotes.Activities.Add(this.Shipper2Quote);
     this.GetShippingQuotes.Activities.Add(this.Shipper3Quote);
     this.GetShippingQuotes.Name = "GetShippingQuotes";
     //
     // ReceiveSubmitOrder
     //
     this.ReceiveSubmitOrder.Activities.Add(this.DoAcceptOrder);
     this.ReceiveSubmitOrder.CanCreateInstance = true;
     this.ReceiveSubmitOrder.Name             = "ReceiveSubmitOrder";
     activitybind15.Name                      = "SupplierWorkflow";
     activitybind15.Path                      = "order";
     workflowparameterbinding15.ParameterName = "po";
     workflowparameterbinding15.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind15)));
     activitybind16.Name = "SupplierWorkflow";
     activitybind16.Path = "customerContext";
     workflowparameterbinding16.ParameterName = "context";
     workflowparameterbinding16.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind16)));
     activitybind17.Name = "SupplierWorkflow";
     activitybind17.Path = "supplierAck";
     workflowparameterbinding17.ParameterName = "(ReturnValue)";
     workflowparameterbinding17.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind17)));
     this.ReceiveSubmitOrder.ParameterBindings.Add(workflowparameterbinding15);
     this.ReceiveSubmitOrder.ParameterBindings.Add(workflowparameterbinding16);
     this.ReceiveSubmitOrder.ParameterBindings.Add(workflowparameterbinding17);
     typedoperationinfo8.ContractType             = typeof(Microsoft.WorkflowServices.Samples.IOrder);
     typedoperationinfo8.Name                     = "SubmitOrder";
     this.ReceiveSubmitOrder.ServiceOperationInfo = typedoperationinfo8;
     //
     // SupplierWorkflow
     //
     this.Activities.Add(this.ReceiveSubmitOrder);
     this.Activities.Add(this.GetShippingQuotes);
     this.Activities.Add(this.SendOrderDetails);
     this.Name = "SupplierWorkflow";
     this.SetValue(System.Workflow.Activities.ReceiveActivity.WorkflowServiceAttributesProperty, workflowserviceattributes1);
     this.CanModifyActivities = false;
 }
 private void InitializeComponent()
 {
     this.CanModifyActivities = true;
     System.Workflow.ComponentModel.ActivityBind             activitybind1              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding1  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind2              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding2  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind3              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding3  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind4              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding4  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind5              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding5  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind6              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding6  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind7              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding7  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind8              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding8  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind9              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding9  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind10             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding10 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind11             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding11 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind12             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding12 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference1    = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference2    = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference3    = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference4    = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.ChannelToken                 channeltoken1              = new System.Workflow.Activities.ChannelToken();
     System.Workflow.ComponentModel.ActivityBind             activitybind13             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding13 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind14             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding14 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind15             = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding15 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.TypedOperationInfo           typedoperationinfo1        = new System.Workflow.Activities.TypedOperationInfo();
     this.invokeWebServiceActivity4 = new System.Workflow.Activities.InvokeWebServiceActivity();
     this.invokeWebServiceActivity3 = new System.Workflow.Activities.InvokeWebServiceActivity();
     this.invokeWebServiceActivity2 = new System.Workflow.Activities.InvokeWebServiceActivity();
     this.invokeWebServiceActivity1 = new System.Workflow.Activities.InvokeWebServiceActivity();
     this.DivideBranch         = new System.Workflow.Activities.IfElseBranchActivity();
     this.MultiplyBranch       = new System.Workflow.Activities.IfElseBranchActivity();
     this.SubtractBranch       = new System.Workflow.Activities.IfElseBranchActivity();
     this.AddBranch            = new System.Workflow.Activities.IfElseBranchActivity();
     this.DisplayWCFResult     = new System.Workflow.Activities.CodeActivity();
     this.WCFSendAddActivity   = new System.Workflow.Activities.SendActivity();
     this.DisplayResult        = new System.Workflow.Activities.CodeActivity();
     this.ifElseMathOpActivity = new System.Workflow.Activities.IfElseActivity();
     this.GetMathOpInput       = new System.Workflow.Activities.CodeActivity();
     this.GetNumericalInput    = new System.Workflow.Activities.CodeActivity();
     //
     // invokeWebServiceActivity4
     //
     this.invokeWebServiceActivity4.MethodName = "Divide";
     this.invokeWebServiceActivity4.Name       = "invokeWebServiceActivity4";
     activitybind1.Name = "MathWF";
     activitybind1.Path = "FirstNumber";
     workflowparameterbinding1.ParameterName = "x";
     workflowparameterbinding1.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
     activitybind2.Name = "MathWF";
     activitybind2.Path = "SecondNumber";
     workflowparameterbinding2.ParameterName = "y";
     workflowparameterbinding2.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
     activitybind3.Name = "MathWF";
     activitybind3.Path = "Result";
     workflowparameterbinding3.ParameterName = "(ReturnValue)";
     workflowparameterbinding3.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
     this.invokeWebServiceActivity4.ParameterBindings.Add(workflowparameterbinding1);
     this.invokeWebServiceActivity4.ParameterBindings.Add(workflowparameterbinding2);
     this.invokeWebServiceActivity4.ParameterBindings.Add(workflowparameterbinding3);
     this.invokeWebServiceActivity4.ProxyClass = typeof(WFMathClient.localhost.MathService);
     //
     // invokeWebServiceActivity3
     //
     this.invokeWebServiceActivity3.MethodName = "Multiply";
     this.invokeWebServiceActivity3.Name       = "invokeWebServiceActivity3";
     activitybind4.Name = "MathWF";
     activitybind4.Path = "FirstNumber";
     workflowparameterbinding4.ParameterName = "x";
     workflowparameterbinding4.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
     activitybind5.Name = "MathWF";
     activitybind5.Path = "SecondNumber";
     workflowparameterbinding5.ParameterName = "y";
     workflowparameterbinding5.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5)));
     activitybind6.Name = "MathWF";
     activitybind6.Path = "Result";
     workflowparameterbinding6.ParameterName = "(ReturnValue)";
     workflowparameterbinding6.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6)));
     this.invokeWebServiceActivity3.ParameterBindings.Add(workflowparameterbinding4);
     this.invokeWebServiceActivity3.ParameterBindings.Add(workflowparameterbinding5);
     this.invokeWebServiceActivity3.ParameterBindings.Add(workflowparameterbinding6);
     this.invokeWebServiceActivity3.ProxyClass = typeof(WFMathClient.localhost.MathService);
     //
     // invokeWebServiceActivity2
     //
     this.invokeWebServiceActivity2.MethodName = "Subtract";
     this.invokeWebServiceActivity2.Name       = "invokeWebServiceActivity2";
     activitybind7.Name = "MathWF";
     activitybind7.Path = "FirstNumber";
     workflowparameterbinding7.ParameterName = "x";
     workflowparameterbinding7.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind7)));
     activitybind8.Name = "MathWF";
     activitybind8.Path = "SecondNumber";
     workflowparameterbinding8.ParameterName = "y";
     workflowparameterbinding8.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind8)));
     activitybind9.Name = "MathWF";
     activitybind9.Path = "Result";
     workflowparameterbinding9.ParameterName = "(ReturnValue)";
     workflowparameterbinding9.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind9)));
     this.invokeWebServiceActivity2.ParameterBindings.Add(workflowparameterbinding7);
     this.invokeWebServiceActivity2.ParameterBindings.Add(workflowparameterbinding8);
     this.invokeWebServiceActivity2.ParameterBindings.Add(workflowparameterbinding9);
     this.invokeWebServiceActivity2.ProxyClass = typeof(WFMathClient.localhost.MathService);
     //
     // invokeWebServiceActivity1
     //
     this.invokeWebServiceActivity1.MethodName = "Add";
     this.invokeWebServiceActivity1.Name       = "invokeWebServiceActivity1";
     activitybind10.Name = "MathWF";
     activitybind10.Path = "FirstNumber";
     workflowparameterbinding10.ParameterName = "x";
     workflowparameterbinding10.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind10)));
     activitybind11.Name = "MathWF";
     activitybind11.Path = "SecondNumber";
     workflowparameterbinding11.ParameterName = "y";
     workflowparameterbinding11.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind11)));
     activitybind12.Name = "MathWF";
     activitybind12.Path = "Result";
     workflowparameterbinding12.ParameterName = "(ReturnValue)";
     workflowparameterbinding12.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind12)));
     this.invokeWebServiceActivity1.ParameterBindings.Add(workflowparameterbinding10);
     this.invokeWebServiceActivity1.ParameterBindings.Add(workflowparameterbinding11);
     this.invokeWebServiceActivity1.ParameterBindings.Add(workflowparameterbinding12);
     this.invokeWebServiceActivity1.ProxyClass = typeof(WFMathClient.localhost.MathService);
     //
     // DivideBranch
     //
     this.DivideBranch.Activities.Add(this.invokeWebServiceActivity4);
     ruleconditionreference1.ConditionName = "Condition3";
     this.DivideBranch.Condition           = ruleconditionreference1;
     this.DivideBranch.Name = "DivideBranch";
     //
     // MultiplyBranch
     //
     this.MultiplyBranch.Activities.Add(this.invokeWebServiceActivity3);
     ruleconditionreference2.ConditionName = "Condition3";
     this.MultiplyBranch.Condition         = ruleconditionreference2;
     this.MultiplyBranch.Name = "MultiplyBranch";
     //
     // SubtractBranch
     //
     this.SubtractBranch.Activities.Add(this.invokeWebServiceActivity2);
     ruleconditionreference3.ConditionName = "Condition2";
     this.SubtractBranch.Condition         = ruleconditionreference3;
     this.SubtractBranch.Name = "SubtractBranch";
     //
     // AddBranch
     //
     this.AddBranch.Activities.Add(this.invokeWebServiceActivity1);
     ruleconditionreference4.ConditionName = "Condition1";
     this.AddBranch.Condition = ruleconditionreference4;
     this.AddBranch.Name      = "AddBranch";
     //
     // DisplayWCFResult
     //
     this.DisplayWCFResult.Name         = "DisplayWCFResult";
     this.DisplayWCFResult.ExecuteCode += new System.EventHandler(this.WCFResult);
     //
     // WCFSendAddActivity
     //
     channeltoken1.EndpointName               = "WSHttpBinding_IBasicMath";
     channeltoken1.Name                       = "WSHttpBinding_IBasicMath";
     channeltoken1.OwnerActivityName          = "WCFSendAddActivity";
     this.WCFSendAddActivity.ChannelToken     = channeltoken1;
     this.WCFSendAddActivity.Name             = "WCFSendAddActivity";
     activitybind13.Name                      = "MathWF";
     activitybind13.Path                      = "FirstNumber";
     workflowparameterbinding13.ParameterName = "x";
     workflowparameterbinding13.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind13)));
     activitybind14.Name = "MathWF";
     activitybind14.Path = "SecondNumber";
     workflowparameterbinding14.ParameterName = "y";
     workflowparameterbinding14.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind14)));
     activitybind15.Name = "MathWF";
     activitybind15.Path = "Result";
     workflowparameterbinding15.ParameterName = "(ReturnValue)";
     workflowparameterbinding15.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind15)));
     this.WCFSendAddActivity.ParameterBindings.Add(workflowparameterbinding13);
     this.WCFSendAddActivity.ParameterBindings.Add(workflowparameterbinding14);
     this.WCFSendAddActivity.ParameterBindings.Add(workflowparameterbinding15);
     typedoperationinfo1.ContractType             = typeof(WFMathClient.ServiceReference.IBasicMath);
     typedoperationinfo1.Name                     = "Add";
     this.WCFSendAddActivity.ServiceOperationInfo = typedoperationinfo1;
     //
     // DisplayResult
     //
     this.DisplayResult.Name         = "DisplayResult";
     this.DisplayResult.ExecuteCode += new System.EventHandler(this.ShowResult);
     //
     // ifElseMathOpActivity
     //
     this.ifElseMathOpActivity.Activities.Add(this.AddBranch);
     this.ifElseMathOpActivity.Activities.Add(this.SubtractBranch);
     this.ifElseMathOpActivity.Activities.Add(this.MultiplyBranch);
     this.ifElseMathOpActivity.Activities.Add(this.DivideBranch);
     this.ifElseMathOpActivity.Name = "ifElseMathOpActivity";
     //
     // GetMathOpInput
     //
     this.GetMathOpInput.Name         = "GetMathOpInput";
     this.GetMathOpInput.ExecuteCode += new System.EventHandler(this.GetOpInput);
     //
     // GetNumericalInput
     //
     this.GetNumericalInput.Name         = "GetNumericalInput";
     this.GetNumericalInput.ExecuteCode += new System.EventHandler(this.GetNumbInput);
     //
     // MathWF
     //
     this.Activities.Add(this.GetNumericalInput);
     this.Activities.Add(this.GetMathOpInput);
     this.Activities.Add(this.ifElseMathOpActivity);
     this.Activities.Add(this.DisplayResult);
     this.Activities.Add(this.WCFSendAddActivity);
     this.Activities.Add(this.DisplayWCFResult);
     this.Name = "MathWF";
     this.CanModifyActivities = false;
 }
		private void InitializeComponent()
		{
            this.CanModifyActivities = true;
            System.Workflow.Activities.ContextToken contexttoken1 = new System.Workflow.Activities.ContextToken();
            System.Workflow.ComponentModel.ActivityBind activitybind1 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding1 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.Activities.TypedOperationInfo typedoperationinfo1 = new System.Workflow.Activities.TypedOperationInfo();
            System.Workflow.Activities.ChannelToken channeltoken1 = new System.Workflow.Activities.ChannelToken();
            System.Workflow.ComponentModel.ActivityBind activitybind2 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding2 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind3 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding3 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind4 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding4 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.Activities.TypedOperationInfo typedoperationinfo2 = new System.Workflow.Activities.TypedOperationInfo();
            System.Workflow.Activities.ContextToken contexttoken2 = new System.Workflow.Activities.ContextToken();
            System.Workflow.ComponentModel.ActivityBind activitybind5 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding5 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.Activities.TypedOperationInfo typedoperationinfo3 = new System.Workflow.Activities.TypedOperationInfo();
            System.Workflow.Activities.ChannelToken channeltoken2 = new System.Workflow.Activities.ChannelToken();
            System.Workflow.ComponentModel.ActivityBind activitybind6 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding6 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind7 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding7 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind8 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding8 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.Activities.TypedOperationInfo typedoperationinfo4 = new System.Workflow.Activities.TypedOperationInfo();
            System.Workflow.Activities.ContextToken contexttoken3 = new System.Workflow.Activities.ContextToken();
            System.Workflow.ComponentModel.ActivityBind activitybind9 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding9 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.Activities.TypedOperationInfo typedoperationinfo5 = new System.Workflow.Activities.TypedOperationInfo();
            System.Workflow.Activities.ChannelToken channeltoken3 = new System.Workflow.Activities.ChannelToken();
            System.Workflow.ComponentModel.ActivityBind activitybind10 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding10 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind11 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding11 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind12 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding12 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.Activities.TypedOperationInfo typedoperationinfo6 = new System.Workflow.Activities.TypedOperationInfo();
            System.Workflow.Activities.ChannelToken channeltoken4 = new System.Workflow.Activities.ChannelToken();
            System.Workflow.ComponentModel.ActivityBind activitybind13 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding13 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind14 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding14 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.Activities.TypedOperationInfo typedoperationinfo7 = new System.Workflow.Activities.TypedOperationInfo();
            System.Workflow.ComponentModel.ActivityBind activitybind15 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding15 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind16 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding16 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind17 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding17 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.Activities.TypedOperationInfo typedoperationinfo8 = new System.Workflow.Activities.TypedOperationInfo();
            System.Workflow.Activities.WorkflowServiceAttributes workflowserviceattributes1 = new System.Workflow.Activities.WorkflowServiceAttributes();
            this.Shipper3ShippingQuote = new System.Workflow.Activities.CodeActivity();
            this.Shipper2ShippingQuote = new System.Workflow.Activities.CodeActivity();
            this.Shipper1ShippingQuote = new System.Workflow.Activities.CodeActivity();
            this.ReceiveQuoteFromShipper3 = new System.Workflow.Activities.ReceiveActivity();
            this.RequestQuoteFromShipper3 = new System.Workflow.Activities.SendActivity();
            this.ReceiveQuoteFromShipper2 = new System.Workflow.Activities.ReceiveActivity();
            this.RequestQuoteFromShipper2 = new System.Workflow.Activities.SendActivity();
            this.ReceiveQuoteFromShipper1 = new System.Workflow.Activities.ReceiveActivity();
            this.RequestQuoteFromShipper1 = new System.Workflow.Activities.SendActivity();
            this.Shipper3Quote = new System.Workflow.Activities.SequenceActivity();
            this.Shipper2Quote = new System.Workflow.Activities.SequenceActivity();
            this.Shipper1Quote = new System.Workflow.Activities.SequenceActivity();
            this.DoAcceptOrder = new System.Workflow.Activities.CodeActivity();
            this.SendOrderDetails = new System.Workflow.Activities.SendActivity();
            this.GetShippingQuotes = new System.Workflow.Activities.ParallelActivity();
            this.ReceiveSubmitOrder = new System.Workflow.Activities.ReceiveActivity();
            // 
            // Shipper3ShippingQuote
            // 
            this.Shipper3ShippingQuote.Name = "Shipper3ShippingQuote";
            this.Shipper3ShippingQuote.ExecuteCode += new System.EventHandler(this.ReceiveShipper3ShippingQuote);
            // 
            // Shipper2ShippingQuote
            // 
            this.Shipper2ShippingQuote.Name = "Shipper2ShippingQuote";
            this.Shipper2ShippingQuote.ExecuteCode += new System.EventHandler(this.ReceiveShipper2ShippingQuote);
            // 
            // Shipper1ShippingQuote
            // 
            this.Shipper1ShippingQuote.Name = "Shipper1ShippingQuote";
            this.Shipper1ShippingQuote.ExecuteCode += new System.EventHandler(this.ReceiveShipper1ShippingQuote);
            // 
            // ReceiveQuoteFromShipper3
            // 
            this.ReceiveQuoteFromShipper3.Activities.Add(this.Shipper3ShippingQuote);
            contexttoken1.Name = "Shipper3Context";
            this.ReceiveQuoteFromShipper3.ContextToken = contexttoken1;
            this.ReceiveQuoteFromShipper3.Name = "ReceiveQuoteFromShipper3";
            activitybind1.Name = "SupplierWorkflow";
            activitybind1.Path = "quoteShipper3";
            workflowparameterbinding1.ParameterName = "quote";
            workflowparameterbinding1.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
            this.ReceiveQuoteFromShipper3.ParameterBindings.Add(workflowparameterbinding1);
            typedoperationinfo1.ContractType = typeof(Microsoft.WorkflowServices.Samples.IShippingQuote);
            typedoperationinfo1.Name = "ShippingQuote";
            this.ReceiveQuoteFromShipper3.ServiceOperationInfo = typedoperationinfo1;
            // 
            // RequestQuoteFromShipper3
            // 
            channeltoken1.EndpointName = "Shipper3Endpoint";
            channeltoken1.Name = "Shipper3Endpoint";
            channeltoken1.OwnerActivityName = "GetShippingQuotes";
            this.RequestQuoteFromShipper3.ChannelToken = channeltoken1;
            this.RequestQuoteFromShipper3.Name = "RequestQuoteFromShipper3";
            activitybind2.Name = "SupplierWorkflow";
            activitybind2.Path = "order";
            workflowparameterbinding2.ParameterName = "po";
            workflowparameterbinding2.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
            activitybind3.Name = "SupplierWorkflow";
            activitybind3.Path = "contextShipper3";
            workflowparameterbinding3.ParameterName = "context";
            workflowparameterbinding3.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
            activitybind4.Name = "SupplierWorkflow";
            activitybind4.Path = "ackShipper3";
            workflowparameterbinding4.ParameterName = "(ReturnValue)";
            workflowparameterbinding4.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
            this.RequestQuoteFromShipper3.ParameterBindings.Add(workflowparameterbinding2);
            this.RequestQuoteFromShipper3.ParameterBindings.Add(workflowparameterbinding3);
            this.RequestQuoteFromShipper3.ParameterBindings.Add(workflowparameterbinding4);
            typedoperationinfo2.ContractType = typeof(Microsoft.WorkflowServices.Samples.IShippingRequest);
            typedoperationinfo2.Name = "RequestShippingQuote";
            this.RequestQuoteFromShipper3.ServiceOperationInfo = typedoperationinfo2;
            this.RequestQuoteFromShipper3.BeforeSend += new System.EventHandler<System.Workflow.Activities.SendActivityEventArgs>(this.PrepareShipper3Request);
            // 
            // ReceiveQuoteFromShipper2
            // 
            this.ReceiveQuoteFromShipper2.Activities.Add(this.Shipper2ShippingQuote);
            contexttoken2.Name = "Shipper2Context";
            contexttoken2.OwnerActivityName = "GetShippingQuotes";
            this.ReceiveQuoteFromShipper2.ContextToken = contexttoken2;
            this.ReceiveQuoteFromShipper2.Name = "ReceiveQuoteFromShipper2";
            activitybind5.Name = "SupplierWorkflow";
            activitybind5.Path = "quoteShipper2";
            workflowparameterbinding5.ParameterName = "quote";
            workflowparameterbinding5.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5)));
            this.ReceiveQuoteFromShipper2.ParameterBindings.Add(workflowparameterbinding5);
            typedoperationinfo3.ContractType = typeof(Microsoft.WorkflowServices.Samples.IShippingQuote);
            typedoperationinfo3.Name = "ShippingQuote";
            this.ReceiveQuoteFromShipper2.ServiceOperationInfo = typedoperationinfo3;
            // 
            // RequestQuoteFromShipper2
            // 
            channeltoken2.EndpointName = "Shipper2Endpoint";
            channeltoken2.Name = "Shipper2Endpoint";
            channeltoken2.OwnerActivityName = "GetShippingQuotes";
            this.RequestQuoteFromShipper2.ChannelToken = channeltoken2;
            this.RequestQuoteFromShipper2.Name = "RequestQuoteFromShipper2";
            activitybind6.Name = "SupplierWorkflow";
            activitybind6.Path = "ackShipper2";
            workflowparameterbinding6.ParameterName = "(ReturnValue)";
            workflowparameterbinding6.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6)));
            activitybind7.Name = "SupplierWorkflow";
            activitybind7.Path = "order";
            workflowparameterbinding7.ParameterName = "po";
            workflowparameterbinding7.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind7)));
            activitybind8.Name = "SupplierWorkflow";
            activitybind8.Path = "contextShipper2";
            workflowparameterbinding8.ParameterName = "context";
            workflowparameterbinding8.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind8)));
            this.RequestQuoteFromShipper2.ParameterBindings.Add(workflowparameterbinding6);
            this.RequestQuoteFromShipper2.ParameterBindings.Add(workflowparameterbinding7);
            this.RequestQuoteFromShipper2.ParameterBindings.Add(workflowparameterbinding8);
            typedoperationinfo4.ContractType = typeof(Microsoft.WorkflowServices.Samples.IShippingRequest);
            typedoperationinfo4.Name = "RequestShippingQuote";
            this.RequestQuoteFromShipper2.ServiceOperationInfo = typedoperationinfo4;
            this.RequestQuoteFromShipper2.BeforeSend += new System.EventHandler<System.Workflow.Activities.SendActivityEventArgs>(this.PrepareShipper2Request);
            // 
            // ReceiveQuoteFromShipper1
            // 
            this.ReceiveQuoteFromShipper1.Activities.Add(this.Shipper1ShippingQuote);
            contexttoken3.Name = "Shipper1Context";
            contexttoken3.OwnerActivityName = "GetShippingQuotes";
            this.ReceiveQuoteFromShipper1.ContextToken = contexttoken3;
            this.ReceiveQuoteFromShipper1.Name = "ReceiveQuoteFromShipper1";
            activitybind9.Name = "SupplierWorkflow";
            activitybind9.Path = "quoteShipper1";
            workflowparameterbinding9.ParameterName = "quote";
            workflowparameterbinding9.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind9)));
            this.ReceiveQuoteFromShipper1.ParameterBindings.Add(workflowparameterbinding9);
            typedoperationinfo5.ContractType = typeof(Microsoft.WorkflowServices.Samples.IShippingQuote);
            typedoperationinfo5.Name = "ShippingQuote";
            this.ReceiveQuoteFromShipper1.ServiceOperationInfo = typedoperationinfo5;
            // 
            // RequestQuoteFromShipper1
            // 
            channeltoken3.EndpointName = "Shipper1Endpoint";
            channeltoken3.Name = "Shipper1Endpoint";
            channeltoken3.OwnerActivityName = "GetShippingQuotes";
            this.RequestQuoteFromShipper1.ChannelToken = channeltoken3;
            this.RequestQuoteFromShipper1.Name = "RequestQuoteFromShipper1";
            activitybind10.Name = "SupplierWorkflow";
            activitybind10.Path = "order";
            workflowparameterbinding10.ParameterName = "po";
            workflowparameterbinding10.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind10)));
            activitybind11.Name = "SupplierWorkflow";
            activitybind11.Path = "contextShipper1";
            workflowparameterbinding11.ParameterName = "context";
            workflowparameterbinding11.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind11)));
            activitybind12.Name = "SupplierWorkflow";
            activitybind12.Path = "ackShipper1";
            workflowparameterbinding12.ParameterName = "(ReturnValue)";
            workflowparameterbinding12.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind12)));
            this.RequestQuoteFromShipper1.ParameterBindings.Add(workflowparameterbinding10);
            this.RequestQuoteFromShipper1.ParameterBindings.Add(workflowparameterbinding11);
            this.RequestQuoteFromShipper1.ParameterBindings.Add(workflowparameterbinding12);
            typedoperationinfo6.ContractType = typeof(Microsoft.WorkflowServices.Samples.IShippingRequest);
            typedoperationinfo6.Name = "RequestShippingQuote";
            this.RequestQuoteFromShipper1.ServiceOperationInfo = typedoperationinfo6;
            this.RequestQuoteFromShipper1.BeforeSend += new System.EventHandler<System.Workflow.Activities.SendActivityEventArgs>(this.PrepareShipper1Request);
            // 
            // Shipper3Quote
            // 
            this.Shipper3Quote.Activities.Add(this.RequestQuoteFromShipper3);
            this.Shipper3Quote.Activities.Add(this.ReceiveQuoteFromShipper3);
            this.Shipper3Quote.Name = "Shipper3Quote";
            // 
            // Shipper2Quote
            // 
            this.Shipper2Quote.Activities.Add(this.RequestQuoteFromShipper2);
            this.Shipper2Quote.Activities.Add(this.ReceiveQuoteFromShipper2);
            this.Shipper2Quote.Name = "Shipper2Quote";
            // 
            // Shipper1Quote
            // 
            this.Shipper1Quote.Activities.Add(this.RequestQuoteFromShipper1);
            this.Shipper1Quote.Activities.Add(this.ReceiveQuoteFromShipper1);
            this.Shipper1Quote.Name = "Shipper1Quote";
            // 
            // DoAcceptOrder
            // 
            this.DoAcceptOrder.Name = "DoAcceptOrder";
            this.DoAcceptOrder.ExecuteCode += new System.EventHandler(this.AcceptOrder);
            // 
            // SendOrderDetails
            // 
            channeltoken4.EndpointName = "CustomerEndpoint";
            channeltoken4.Name = "CustomerEndpoint";
            channeltoken4.OwnerActivityName = "SupplierWorkflow";
            this.SendOrderDetails.ChannelToken = channeltoken4;
            this.SendOrderDetails.Name = "SendOrderDetails";
            activitybind13.Name = "SupplierWorkflow";
            activitybind13.Path = "confirmedQuote";
            workflowparameterbinding13.ParameterName = "quote";
            workflowparameterbinding13.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind13)));
            activitybind14.Name = "SupplierWorkflow";
            activitybind14.Path = "confirmedOrder";
            workflowparameterbinding14.ParameterName = "po";
            workflowparameterbinding14.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind14)));
            this.SendOrderDetails.ParameterBindings.Add(workflowparameterbinding13);
            this.SendOrderDetails.ParameterBindings.Add(workflowparameterbinding14);
            typedoperationinfo7.ContractType = typeof(Microsoft.WorkflowServices.Samples.IOrderDetails);
            typedoperationinfo7.Name = "OrderDetails";
            this.SendOrderDetails.ServiceOperationInfo = typedoperationinfo7;
            this.SendOrderDetails.BeforeSend += new System.EventHandler<System.Workflow.Activities.SendActivityEventArgs>(this.PrepareOrderConfirmation);
            // 
            // GetShippingQuotes
            // 
            this.GetShippingQuotes.Activities.Add(this.Shipper1Quote);
            this.GetShippingQuotes.Activities.Add(this.Shipper2Quote);
            this.GetShippingQuotes.Activities.Add(this.Shipper3Quote);
            this.GetShippingQuotes.Name = "GetShippingQuotes";
            // 
            // ReceiveSubmitOrder
            // 
            this.ReceiveSubmitOrder.Activities.Add(this.DoAcceptOrder);
            this.ReceiveSubmitOrder.CanCreateInstance = true;
            this.ReceiveSubmitOrder.Name = "ReceiveSubmitOrder";
            activitybind15.Name = "SupplierWorkflow";
            activitybind15.Path = "order";
            workflowparameterbinding15.ParameterName = "po";
            workflowparameterbinding15.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind15)));
            activitybind16.Name = "SupplierWorkflow";
            activitybind16.Path = "customerContext";
            workflowparameterbinding16.ParameterName = "context";
            workflowparameterbinding16.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind16)));
            activitybind17.Name = "SupplierWorkflow";
            activitybind17.Path = "supplierAck";
            workflowparameterbinding17.ParameterName = "(ReturnValue)";
            workflowparameterbinding17.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind17)));
            this.ReceiveSubmitOrder.ParameterBindings.Add(workflowparameterbinding15);
            this.ReceiveSubmitOrder.ParameterBindings.Add(workflowparameterbinding16);
            this.ReceiveSubmitOrder.ParameterBindings.Add(workflowparameterbinding17);
            typedoperationinfo8.ContractType = typeof(Microsoft.WorkflowServices.Samples.IOrder);
            typedoperationinfo8.Name = "SubmitOrder";
            this.ReceiveSubmitOrder.ServiceOperationInfo = typedoperationinfo8;
            // 
            // SupplierWorkflow
            // 
            this.Activities.Add(this.ReceiveSubmitOrder);
            this.Activities.Add(this.GetShippingQuotes);
            this.Activities.Add(this.SendOrderDetails);
            this.Name = "SupplierWorkflow";
            this.SetValue(System.Workflow.Activities.ReceiveActivity.WorkflowServiceAttributesProperty, workflowserviceattributes1);
            this.CanModifyActivities = false;

		}
Ejemplo n.º 14
0
		private void InitializeComponent()
		{
            this.CanModifyActivities = true;
            System.Workflow.ComponentModel.ActivityBind activitybind1 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding1 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind2 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding2 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind3 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding3 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.Activities.TypedOperationInfo typedoperationinfo1 = new System.Workflow.Activities.TypedOperationInfo();
            System.Workflow.Activities.ChannelToken endpoint1 = new System.Workflow.Activities.ChannelToken();
            System.Workflow.ComponentModel.ActivityBind activitybind4 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding4 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind5 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding5 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind6 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding6 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.Activities.TypedOperationInfo typedoperationinfo2 = new System.Workflow.Activities.TypedOperationInfo();
            System.Workflow.Activities.WorkflowServiceAttributes workflowserviceattributes1 = new System.Workflow.Activities.WorkflowServiceAttributes();
            this.DoReviewOrder = new System.Workflow.Activities.CodeActivity();
            this.ReceiveOrderDetails = new System.Workflow.Activities.ReceiveActivity();
            this.DoDisplayStatus = new System.Workflow.Activities.CodeActivity();
            this.SendSubmitOrder = new System.Workflow.Activities.SendActivity();
            // 
            // DoReviewOrder
            // 
            this.DoReviewOrder.Name = "DoReviewOrder";
            this.DoReviewOrder.ExecuteCode += new System.EventHandler(this.ReviewOrder);
            // 
            // ReceiveOrderDetails
            // 
            this.ReceiveOrderDetails.Activities.Add(this.DoReviewOrder);
            this.ReceiveOrderDetails.Name = "ReceiveOrderDetails";
            activitybind1.Name = "CustomerWorkflow";
            activitybind1.Path = "orderDetails";
            workflowparameterbinding1.ParameterName = "po";
            workflowparameterbinding1.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
            activitybind2.Name = "CustomerWorkflow";
            activitybind2.Path = "shippingQuote";
            workflowparameterbinding2.ParameterName = "quote";
            workflowparameterbinding2.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
            activitybind3.Name = "CustomerWorkflow";
            activitybind3.Path = "customerAck";
            workflowparameterbinding3.ParameterName = "(ReturnValue)";
            workflowparameterbinding3.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
            this.ReceiveOrderDetails.ParameterBindings.Add(workflowparameterbinding1);
            this.ReceiveOrderDetails.ParameterBindings.Add(workflowparameterbinding2);
            this.ReceiveOrderDetails.ParameterBindings.Add(workflowparameterbinding3);
            typedoperationinfo1.ContractType = typeof(Microsoft.WorkflowServices.Samples.IOrderDetails);
            typedoperationinfo1.Name = "OrderDetails";
            this.ReceiveOrderDetails.ServiceOperationInfo = typedoperationinfo1;
            // 
            // DoDisplayStatus
            // 
            this.DoDisplayStatus.Name = "DoDisplayStatus";
            this.DoDisplayStatus.ExecuteCode += new System.EventHandler(this.DisplayStatus);
            // 
            // SendSubmitOrder
            // 
            endpoint1.EndpointName = "SupplierEndPoint";
            endpoint1.Name = "SupplierEndPoint";
            endpoint1.OwnerActivityName = "CustomerWorkflow";
            this.SendSubmitOrder.ChannelToken = endpoint1;
            this.SendSubmitOrder.Name = "SendSubmitOrder";
            activitybind4.Name = "CustomerWorkflow";
            activitybind4.Path = "order";
            workflowparameterbinding4.ParameterName = "po";
            workflowparameterbinding4.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
            activitybind5.Name = "CustomerWorkflow";
            activitybind5.Path = "contextToSend";
            workflowparameterbinding5.ParameterName = "context";
            workflowparameterbinding5.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5)));
            activitybind6.Name = "CustomerWorkflow";
            activitybind6.Path = "supplierAck";
            workflowparameterbinding6.ParameterName = "(ReturnValue)";
            workflowparameterbinding6.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6)));
            this.SendSubmitOrder.ParameterBindings.Add(workflowparameterbinding4);
            this.SendSubmitOrder.ParameterBindings.Add(workflowparameterbinding5);
            this.SendSubmitOrder.ParameterBindings.Add(workflowparameterbinding6);
            typedoperationinfo2.ContractType = typeof(Microsoft.WorkflowServices.Samples.IOrder);
            typedoperationinfo2.Name = "SubmitOrder";
            this.SendSubmitOrder.ServiceOperationInfo = typedoperationinfo2;
            this.SendSubmitOrder.BeforeSend += new System.EventHandler<System.Workflow.Activities.SendActivityEventArgs>(this.PrepareOrder);
            // 
            // CustomerWorkflow
            // 
            this.Activities.Add(this.SendSubmitOrder);
            this.Activities.Add(this.DoDisplayStatus);
            this.Activities.Add(this.ReceiveOrderDetails);
            this.Name = "CustomerWorkflow";
            this.SetValue(System.Workflow.Activities.ReceiveActivity.WorkflowServiceAttributesProperty, workflowserviceattributes1);
            this.CanModifyActivities = false;

		}
Ejemplo n.º 15
0
 private void InitializeComponent()
 {
     this.CanModifyActivities = true;
     System.Workflow.Activities.ChannelToken                 endpoint1                  = new System.Workflow.Activities.ChannelToken();
     System.Workflow.ComponentModel.ActivityBind             activitybind1              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding1  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.TypedOperationInfo           typedoperationinfo1        = new System.Workflow.Activities.TypedOperationInfo();
     System.Workflow.ComponentModel.ActivityBind             activitybind2              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding2  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind3              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding3  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind             activitybind4              = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding4  = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.TypedOperationInfo           typedoperationinfo2        = new System.Workflow.Activities.TypedOperationInfo();
     System.Workflow.Activities.WorkflowServiceAttributes    workflowserviceattributes1 = new System.Workflow.Activities.WorkflowServiceAttributes();
     this.DoAcceptQuoteRequest = new System.Workflow.Activities.CodeActivity();
     this.SendShippingQuote    = new System.Workflow.Activities.SendActivity();
     this.Delay = new System.Workflow.Activities.DelayActivity();
     this.ReceiveRequestShippingQuote = new System.Workflow.Activities.ReceiveActivity();
     //
     // DoAcceptQuoteRequest
     //
     this.DoAcceptQuoteRequest.Name         = "DoAcceptQuoteRequest";
     this.DoAcceptQuoteRequest.ExecuteCode += new System.EventHandler(this.AcceptQuoteRequest);
     //
     // SendShippingQuote
     //
     endpoint1.EndpointName = "SupplierEndpoint";
     endpoint1.Name         = "SupplierEndpoint";
     this.SendShippingQuote.ChannelToken = endpoint1;
     this.SendShippingQuote.Name         = "SendShippingQuote";
     activitybind1.Name = "ShipperWorkflow";
     activitybind1.Path = "quote";
     workflowparameterbinding1.ParameterName = "quote";
     workflowparameterbinding1.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
     this.SendShippingQuote.ParameterBindings.Add(workflowparameterbinding1);
     typedoperationinfo1.ContractType            = typeof(Microsoft.WorkflowServices.Samples.IShippingQuote);
     typedoperationinfo1.Name                    = "ShippingQuote";
     this.SendShippingQuote.ServiceOperationInfo = typedoperationinfo1;
     this.SendShippingQuote.BeforeSend          += new System.EventHandler <System.Workflow.Activities.SendActivityEventArgs>(this.PrepareQuote);
     //
     // Delay
     //
     this.Delay.Name            = "Delay";
     this.Delay.TimeoutDuration = System.TimeSpan.Parse("00:00:04");
     //
     // ReceiveRequestShippingQuote
     //
     this.ReceiveRequestShippingQuote.Activities.Add(this.DoAcceptQuoteRequest);
     this.ReceiveRequestShippingQuote.CanCreateInstance = true;
     this.ReceiveRequestShippingQuote.Name = "ReceiveRequestShippingQuote";
     activitybind2.Name = "ShipperWorkflow";
     activitybind2.Path = "supplierAck";
     workflowparameterbinding2.ParameterName = "(ReturnValue)";
     workflowparameterbinding2.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
     activitybind3.Name = "ShipperWorkflow";
     activitybind3.Path = "order";
     workflowparameterbinding3.ParameterName = "po";
     workflowparameterbinding3.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
     activitybind4.Name = "ShipperWorkflow";
     activitybind4.Path = "supplierContext";
     workflowparameterbinding4.ParameterName = "context";
     workflowparameterbinding4.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
     this.ReceiveRequestShippingQuote.ParameterBindings.Add(workflowparameterbinding2);
     this.ReceiveRequestShippingQuote.ParameterBindings.Add(workflowparameterbinding3);
     this.ReceiveRequestShippingQuote.ParameterBindings.Add(workflowparameterbinding4);
     typedoperationinfo2.ContractType = typeof(Microsoft.WorkflowServices.Samples.IShippingRequest);
     typedoperationinfo2.Name         = "RequestShippingQuote";
     this.ReceiveRequestShippingQuote.ServiceOperationInfo = typedoperationinfo2;
     //
     // ShipperWorkflow
     //
     this.Activities.Add(this.ReceiveRequestShippingQuote);
     this.Activities.Add(this.Delay);
     this.Activities.Add(this.SendShippingQuote);
     this.Name = "ShipperWorkflow";
     this.SetValue(System.Workflow.Activities.ReceiveActivity.WorkflowServiceAttributesProperty, workflowserviceattributes1);
     this.CanModifyActivities = false;
 }
Ejemplo n.º 16
0
		private void InitializeComponent()
		{
            this.CanModifyActivities = true;
            System.Workflow.Activities.ChannelToken endpoint1 = new System.Workflow.Activities.ChannelToken();
            System.Workflow.ComponentModel.ActivityBind activitybind1 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding1 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.Activities.TypedOperationInfo typedoperationinfo1 = new System.Workflow.Activities.TypedOperationInfo();
            System.Workflow.ComponentModel.ActivityBind activitybind2 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding2 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind3 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding3 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.ComponentModel.ActivityBind activitybind4 = new System.Workflow.ComponentModel.ActivityBind();
            System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding4 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
            System.Workflow.Activities.TypedOperationInfo typedoperationinfo2 = new System.Workflow.Activities.TypedOperationInfo();
            System.Workflow.Activities.WorkflowServiceAttributes workflowserviceattributes1 = new System.Workflow.Activities.WorkflowServiceAttributes();
            this.DoAcceptQuoteRequest = new System.Workflow.Activities.CodeActivity();
            this.SendShippingQuote = new System.Workflow.Activities.SendActivity();
            this.Delay = new System.Workflow.Activities.DelayActivity();
            this.ReceiveRequestShippingQuote = new System.Workflow.Activities.ReceiveActivity();
            // 
            // DoAcceptQuoteRequest
            // 
            this.DoAcceptQuoteRequest.Name = "DoAcceptQuoteRequest";
            this.DoAcceptQuoteRequest.ExecuteCode += new System.EventHandler(this.AcceptQuoteRequest);
            // 
            // SendShippingQuote
            // 
            endpoint1.EndpointName = "SupplierEndpoint";
            endpoint1.Name = "SupplierEndpoint";
            this.SendShippingQuote.ChannelToken = endpoint1;
            this.SendShippingQuote.Name = "SendShippingQuote";
            activitybind1.Name = "ShipperWorkflow";
            activitybind1.Path = "quote";
            workflowparameterbinding1.ParameterName = "quote";
            workflowparameterbinding1.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
            this.SendShippingQuote.ParameterBindings.Add(workflowparameterbinding1);
            typedoperationinfo1.ContractType = typeof(Microsoft.WorkflowServices.Samples.IShippingQuote);
            typedoperationinfo1.Name = "ShippingQuote";
            this.SendShippingQuote.ServiceOperationInfo = typedoperationinfo1;
            this.SendShippingQuote.BeforeSend += new System.EventHandler<System.Workflow.Activities.SendActivityEventArgs>(this.PrepareQuote);
            // 
            // Delay
            // 
            this.Delay.Name = "Delay";
            this.Delay.TimeoutDuration = System.TimeSpan.Parse("00:00:04");
            // 
            // ReceiveRequestShippingQuote
            // 
            this.ReceiveRequestShippingQuote.Activities.Add(this.DoAcceptQuoteRequest);
            this.ReceiveRequestShippingQuote.CanCreateInstance = true;
            this.ReceiveRequestShippingQuote.Name = "ReceiveRequestShippingQuote";
            activitybind2.Name = "ShipperWorkflow";
            activitybind2.Path = "supplierAck";
            workflowparameterbinding2.ParameterName = "(ReturnValue)";
            workflowparameterbinding2.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
            activitybind3.Name = "ShipperWorkflow";
            activitybind3.Path = "order";
            workflowparameterbinding3.ParameterName = "po";
            workflowparameterbinding3.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
            activitybind4.Name = "ShipperWorkflow";
            activitybind4.Path = "supplierContext";
            workflowparameterbinding4.ParameterName = "context";
            workflowparameterbinding4.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
            this.ReceiveRequestShippingQuote.ParameterBindings.Add(workflowparameterbinding2);
            this.ReceiveRequestShippingQuote.ParameterBindings.Add(workflowparameterbinding3);
            this.ReceiveRequestShippingQuote.ParameterBindings.Add(workflowparameterbinding4);
            typedoperationinfo2.ContractType = typeof(Microsoft.WorkflowServices.Samples.IShippingRequest);
            typedoperationinfo2.Name = "RequestShippingQuote";
            this.ReceiveRequestShippingQuote.ServiceOperationInfo = typedoperationinfo2;
            // 
            // ShipperWorkflow
            // 
            this.Activities.Add(this.ReceiveRequestShippingQuote);
            this.Activities.Add(this.Delay);
            this.Activities.Add(this.SendShippingQuote);
            this.Name = "ShipperWorkflow";
            this.SetValue(System.Workflow.Activities.ReceiveActivity.WorkflowServiceAttributesProperty, workflowserviceattributes1);
            this.CanModifyActivities = false;

		}
Ejemplo n.º 17
0
        public static void SetContext(Activity activity,
            ChannelToken endpoint,
            Type contractType,
            IDictionary<string, string> context)
        {
            if (activity == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("activity");
            }
            if (endpoint == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("endpoint");
            }
            if (contractType == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("contractType");
            }

            SetContext(activity, endpoint.Name, endpoint.OwnerActivityName, contractType, context);
        }
Ejemplo n.º 18
0
        internal static LogicalChannel GetLogicalChannel(Activity activity,
            ChannelToken endpoint,
            Type contractType)
        {
            if (activity == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("activity");
            }
            if (endpoint == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("endpoint");
            }
            if (contractType == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("contractType");
            }

            return GetLogicalChannel(activity, endpoint.Name, endpoint.OwnerActivityName, contractType);
        }
Ejemplo n.º 19
0
        internal static LogicalChannel Register(Activity activity,
            ChannelToken endpoint,
            Type contractType)
        {
            if (activity == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("activity");
            }
            if (endpoint == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("endpoint");
            }
            if (contractType == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("contractType");
            }

            LogicalChannel logicalChannel = GetLogicalChannel(activity, endpoint, contractType);
            if (logicalChannel == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(
                    new InvalidOperationException(SR2.GetString(SR2.Error_FailedToRegisterChannel, endpoint.Name)));
            }

            return logicalChannel;
        }