Exemplo n.º 1
0
    /// <summary>
    /// Public method called on one more many threads to send a request with a timeout
    /// </summary>
    public IResponse SendRequest(IRequest request, int timeout)
    {
        var dispatcher = new DispatchMessageWithTimeoutDelegate(SendRequestWithTimeout);

        return(DomainInvoker.ExecuteInNewDomain <Response>(dispatcher, request, timeout));
    }
Exemplo n.º 2
0
    static void SendRequest(IRequest request, int timeout = MessageDispatcher.DefaultTimeoutMs)
    {
        var dispatcher = new DispatchMessageWithTimeoutDelegate(SendRequestWithTimeout);

        dispatcher.BeginInvoke(request, timeout, SendMessageCallback, request);
    }