Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Host and Workflow: Two Worlds to Communicate. Part V

, 4 Oct 2008
Part V: Intercommunications with a Workflow instance using Correlation parameter
host_wf_comm_P5_1.zip
P5ExampleWithoutCorrelation
CommunicationManager
bin
Properties
CorrelationDemo
bin
CorrelationDemoWF.csproj.user
Properties
Settings.settings
P5ExampleWithoutCorrelation.suo
SendAllEmail
bin
Properties
Settings.settings
host_wf_comm_P5_2.zip
P5ExampleWithCorrelation
CommunicationManager
bin
Properties
CorrelationDemo
bin
CorrelationDemoWF.csproj.user
Properties
Settings.settings
P5ExampleWithCorrelation.suo
SendAllEmail
bin
Properties
Settings.settings
//------------------------------------------------------------------------------
// <auto-generated>
//     Dieser Code wurde von einem Tool generiert.
//     Laufzeitversion:2.0.50727.1434
//
//     Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
//     der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------

namespace CommunicationManager {
    using System;
    using System.ComponentModel;
    using System.Workflow.Activities;
    using System.Workflow.ComponentModel;
    using System.Workflow.ComponentModel.Design;
    using System.Workflow.ComponentModel.Compiler;
    
    
    [ToolboxItemAttribute(typeof(ActivityToolboxItem))]
    public partial class SendEmailToWorkflow : HandleExternalEventActivity {
        
        public static DependencyProperty SenderProperty = DependencyProperty.Register("Sender", typeof(object), typeof(SendEmailToWorkflow));
        
        public static DependencyProperty TypoProperty = DependencyProperty.Register("Typo", typeof(string), typeof(SendEmailToWorkflow));
        
        public static DependencyProperty EmailProperty = DependencyProperty.Register("Email", typeof(string), typeof(SendEmailToWorkflow));
        
        public SendEmailToWorkflow() {
            base.InterfaceType = typeof(CommunicationManager.IMailCommunication);
            base.EventName = "SendEmailToWorkflow";
        }
        
        [BrowsableAttribute(false)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
        public override System.Type InterfaceType {
            get {
                return base.InterfaceType;
            }
            set {
                throw new InvalidOperationException("Cannot set InterfaceType on a derived HandleExternalEventActivity.");
            }
        }
        
        [BrowsableAttribute(false)]
        [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
        public override string EventName {
            get {
                return base.EventName;
            }
            set {
                throw new InvalidOperationException("Cannot set EventName on a derived HandleExternalEventActivity.");
            }
        }
        
        [ValidationOptionAttribute(ValidationOption.Required)]
        public object Sender {
            get {
                return ((object)(this.GetValue(SendEmailToWorkflow.SenderProperty)));
            }
            set {
                this.SetValue(SendEmailToWorkflow.SenderProperty, value);
            }
        }
        
        [ValidationOptionAttribute(ValidationOption.Required)]
        public string Typo {
            get {
                return ((string)(this.GetValue(SendEmailToWorkflow.TypoProperty)));
            }
            set {
                this.SetValue(SendEmailToWorkflow.TypoProperty, value);
            }
        }
        
        [ValidationOptionAttribute(ValidationOption.Required)]
        public string Email {
            get {
                return ((string)(this.GetValue(SendEmailToWorkflow.EmailProperty)));
            }
            set {
                this.SetValue(SendEmailToWorkflow.EmailProperty, value);
            }
        }
        
        protected override void OnInvoked(System.EventArgs e) {
            CommunicationManager.MailEventArgs castedE = ((CommunicationManager.MailEventArgs)(e));
            this.Sender = this.ParameterBindings["sender"].Value;
            this.Typo = ((string)(castedE.Typo));
            this.Email = ((string)(castedE.Email));
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

freedeveloper
Software Developer (Senior) G-SoftSolutions
United States United States
Jose A. Garcia Guirado, Electronic Engineer, graduated in Havana/Cuba 1982, MCTS, MCSD.NET, MCAD.NET, MCSE. Worked in the Institute for Cybernetics and Mathematics of Academy of Science of Cuba for 8 years; since 1995 working as free software architect, developer and advisor, first in Argentina and from 2003 to 2010, in Germany as External consultant in DWS Luxemburg, AIXTRON AG and Shell Deutschland GmbH and from 2010 to 2012 in in Mexico in Twenty Century Fox, and Mexico Stock Exchange (BMV). Actually as freelance in Florida, USA.
Follow on   Google+

| Advertise | Privacy | Mobile
Web02 | 2.8.140905.1 | Last Updated 4 Oct 2008
Article Copyright 2008 by freedeveloper
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid