Exemplo n.º 1
0
 private void Initialize()
 {
     if (_writer == null)
     {
         _writer = _boundary.Writer();
     }
 }
Exemplo n.º 2
0
        public static ReadableBoundary Write <T>(this ITransportBoundary boundary, T request, bool autoClose = true, int timeout = 500)
            where T : WriteRequest
        {
            var writer   = boundary.Writer();
            var response = writer.Write(request, timeout);

            if (autoClose)
            {
                response.Dispose();
            }
            return(response);
        }
Exemplo n.º 3
0
 private WriteResponse Write(string request, int timeout, int repeatCount, int repeatTimeout)
 {
     using (var writer = _boundary.Writer())
     {
         var response = writer.Write(request, timeout, repeatCount, repeatTimeout);
         var l        = _logger.Debug();
         if (response.Error != null)
         {
             l = _logger.Error();
         }
         l.Log("request: '{0}', response '{1}'", request, response.Response);
         if (!response.Response.Equals(ResponseOk))
         {
             response.AddError(new LambdaFailureException(Resources.DoesNotContainStandartAnswer));
         }
         return(response);
     }
 }