using System;
using System.Linq;
using System.Activities;
using System.Activities.Statements;
using System.Collections.Generic;

namespace MyWorkflowApp
{

    class Program
    {
        static void Main(string[] args)
        {
            Dictionary<string, object> parameters = new Dictionary<string, object>();
            parameters.Add("Username", "John");
            WorkflowInvoker.Invoke(new Workflow1(), parameters);

            //WorkflowInvoker worker = new WorkflowInvoker(new Workflow1());
            //worker.InvokeAsync();
            //worker.InvokeCompleted += new EventHandler<InvokeCompletedEventArgs>(worker_InvokeCompleted);
            ////worker.InvokeCompleted += (sender, e) =>
            ////{
            ////    Console.WriteLine("Async work is completed");
            ////};

            Console.WriteLine("Main thread end.");

            Console.ReadLine();
        }

        static void worker_InvokeCompleted(object sender, InvokeCompletedEventArgs e)
        {
            
        }
    }
}
