public void Send <T>(ISendContext <T> context) where T : class { if (_disposed) { throw new ObjectDisposedException(_disposedMessage); } try { context.SetDestinationAddress(Address.Uri); context.SetBodyWriter(stream => _serializer.Serialize(stream, context)); _transport.Send(context); context.NotifySend(_address); if (SpecialLoggers.Messages.IsInfoEnabled) { SpecialLoggers.Messages.InfoFormat("SEND:{0}:{1}:{2}", Address, typeof(T).Name, context.MessageId); } } catch (Exception ex) { throw new SendException(typeof(T), _address.Uri, "An exception was thrown during Send", ex); } }
public void Send <T>(ISendContext <T> context) where T : class { if (_disposed) { throw new ObjectDisposedException(_disposedMessage); } try { context.SetDestinationAddress(Address.Uri); context.SetBodyWriter(stream => _serializer.Serialize(stream, context)); _transport.Send(context); context.NotifySend(_address); } catch (Exception ex) { throw new SendException(typeof(T), _address.Uri, "An exception was thrown during Send", ex); } }