Home
Manage Your Code
Snippet: Creating an exposed event for a workflow activity (C#)
Title: Creating an exposed event for a workflow activity Language: C#
Description: This example is to create an exposed event occurs when a custom activity is completed, and the argument data will be passed back to the host workflow. Views: 171
Author: Kevin Wang Date Added: 11/1/2007
Copy Code  
1        // Exposed event occurs when this activity is completed
2        public delegate void CallCompletedEventHandler(object sender, SearchAddressEventArgs e);
3        private event CallCompletedEventHandler callCompletedEvent;
4        public event CallCompletedEventHandler CallCompleted
5        {
6            add
7            {
8                callCompletedEvent += value;
9            }
10            remove
11            {
12                callCompletedEvent -= value;
13            }
14        }
15
16 public class SearchAddressEventArgs
17    {
18        private OrderedDictionary addressMatches;
19
20        public SearchAddressEventArgs(OrderedDictionary addressMatches)
21        {
22            this.addressMatches = addressMatches;
23        }
24
25        public OrderedDictionary AddressMatchesDataTable
26        {
27            get { return this.addressMatches; }
28        }
29    }