コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpWorkflowServiceTestHost"/> class.
 /// </summary>
 /// <param name="serviceHost">
 /// The service host.
 /// </param>
 protected HttpWorkflowServiceTestHost(
     HttpWorkflowServiceHost serviceHost)
 {
     this.ServiceHost = serviceHost;
     this.ServiceHost.InstanceStore   = new MemoryStore();
     this.ServiceHost.WorkflowTimeout = DefaultTimeout;
     this.ServiceHost.OnCreate        = this.OnCreateHandler;
     this.ServiceHost.OnUnload        = this.OnUnloadHandler;
 }
コード例 #2
0
        private static void Main(string[] args)
        {
            var service = CreateRequestReplyService();

            ActivityXamlServicesEx.WriteToFile(service, @"..\..\HttpService.xaml");

            // ActivityXamlServicesEx.WriteToFile(CreateIntResourceService(), @"..\..\TwoReceives.xaml");

            using (var host = new HttpWorkflowServiceHost(service, BaseAddress))
            {
                host.WorkflowExtensions.Add(new TraceTrackingParticipant());
                host.Open();
                Console.WriteLine("Host Listening at {0}- press any key to exit", BaseAddress);
                Console.ReadKey(true);
                host.Close();
            }
        }