예제 #1
0
 public void Start(string connectionString, string applicationName) {
     try {
         domain = AppDomain.CreateDomain("ServerDomain");
         starter = (WorkflowServerStarter)domain.CreateInstanceAndUnwrap(
             System.Reflection.Assembly.GetEntryAssembly().FullName, typeof(WorkflowServerStarter).FullName + "");
         starter.Start_(connectionString, applicationName);
         starter.OnCustomHandleException_ += starter_OnCustomHandleException_;
     } catch (Exception e) {
         Tracing.Tracer.LogError(e);
         if (OnCustomHandleException != null) {
             OnCustomHandleException(null, new ExceptionEventArgs("Exception occurs:\r\n\r\n" + e.Message));
         }
     }
 }
예제 #2
0
 public void Start<TModuleProvider>(string connectionString, string applicationName) where TModuleProvider:ModuleBase{
     try {
         _domain = AppDomain.CreateDomain("Server");
         _starter = (WorkflowServerStarter)_domain.CreateInstanceAndUnwrap(
             Assembly.GetEntryAssembly().FullName, GetType().FullName ?? throw new InvalidOperationException());
         _starter.OnServerDomainCustomHandleException += StarterOnOnServerDomainCustomHandleException;
         var workflowServerEventArgs = new WorkflowServerEventArgs();
         OnWorkflowServerRequested(workflowServerEventArgs);
         _starter.StartOnServerDomain<TModuleProvider>(connectionString, applicationName);
     }
     catch (Exception e) {
         Tracing.Tracer.LogError(e);
         OnCustomHandleException?.Invoke(null, new ExceptionEventArgs("Exception occurs:\r\n\r\n" + e.Message));
     }
 }
예제 #3
0
 public void Start(string connectionString, string applicationName)
 {
     try {
         domain  = AppDomain.CreateDomain("ServerDomain");
         starter = (WorkflowServerStarter)domain.CreateInstanceAndUnwrap(
             System.Reflection.Assembly.GetEntryAssembly().FullName, typeof(WorkflowServerStarter).FullName + "");
         starter.Start_(connectionString, applicationName);
         starter.OnCustomHandleException_ += starter_OnCustomHandleException_;
     } catch (Exception e) {
         Tracing.Tracer.LogError(e);
         if (OnCustomHandleException != null)
         {
             OnCustomHandleException(null, new ExceptionEventArgs("Exception occurs:\r\n\r\n" + e.Message));
         }
     }
 }