Пример #1
0
 /// <inheritdoc/>
 public SynapseGrpcRuntimeApi(IMediator mediator, IMapper mapper, IWorkflowRuntimeProxyFactory runtimeProxyFactory, IWorkflowRuntimeProxyManager runtimeProxyManager)
 {
     Mediator            = mediator;
     Mapper              = mapper;
     RuntimeProxyFactory = runtimeProxyFactory;
     RuntimeProxyManager = runtimeProxyManager;
 }
 /// <summary>
 /// Attempts to get the <see cref="IWorkflowRuntimeProxy"/> for the specified <see cref="V1WorkflowInstance"/>
 /// </summary>
 /// <param name="proxyManager"></param>
 /// <param name="workflowInstanceId">The id of the <see cref="V1WorkflowInstance"/> to get the <see cref="IWorkflowRuntimeProxy"/> for</param>
 /// <param name="proxy">The <see cref="IWorkflowRuntimeProxy"/> for the specified <see cref="V1WorkflowInstance"/>, if any</param>
 /// <returns>A boolean indicating whether or not a proxy for the specified <see cref="V1WorkflowInstance"/> could be found</returns>
 public static bool TryGetProxy(this IWorkflowRuntimeProxyManager proxyManager, string workflowInstanceId, out IWorkflowRuntimeProxy proxy)
 {
     proxy = null !;
     try
     {
         proxy = proxyManager.GetProxy(workflowInstanceId);
         return(proxy != null);
     }
     catch
     {
         return(false);
     }
 }
 /// <summary>
 /// Initializes a new <see cref="V1CancelWorkflowInstanceCommandHandler"/>
 /// </summary>
 /// <param name="loggerFactory">The service used to create <see cref="ILogger"/>s</param>
 /// <param name="mediator">The service used to mediate calls</param>
 /// <param name="mapper">The service used to map objects</param>
 /// <param name="workflowInstances">The <see cref="IRepository"/> used to manage <see cref="V1WorkflowInstance"/>s</param>
 /// <param name="runtimeProxyManager">The service used to manage runtime proxies</param>
 public V1CancelWorkflowInstanceCommandHandler(ILoggerFactory loggerFactory, IMediator mediator, IMapper mapper,
                                               IRepository <V1WorkflowInstance> workflowInstances, IWorkflowRuntimeProxyManager runtimeProxyManager)
     : base(loggerFactory, mediator, mapper)
 {
     this.WorkflowInstances  = workflowInstances;
     this.RuntimeHostManager = runtimeProxyManager;
 }
Пример #4
0
 /// <summary>
 /// Initializes a new <see cref="SynapseIpcRuntimeApiClient"/>
 /// </summary>
 /// <param name="loggerFactory">The service used to create <see cref="ILogger"/>s</param>
 /// <param name="mediator">The service used to mediate calls</param>
 /// <param name="mapper">The service used to map objects</param>
 /// <param name="runtimeProxyFactory">The service used to create <see cref="IWorkflowRuntimeProxy"/> instances</param>
 /// <param name="runtimeProxyManager">The service used to manage <see cref="IWorkflowRuntimeProxy"/></param>
 protected SynapseIpcRuntimeApiClient(ILoggerFactory loggerFactory, IMediator mediator, IMapper mapper,
                                      IWorkflowRuntimeProxyFactory runtimeProxyFactory, IWorkflowRuntimeProxyManager runtimeProxyManager)
 {
     this.Logger              = loggerFactory.CreateLogger(this.GetType());
     this.Mediator            = mediator;
     this.Mapper              = mapper;
     this.RuntimeProxyFactory = runtimeProxyFactory;
     this.RuntimeProxyManager = runtimeProxyManager;
 }