本文整理汇总了C#中IMessageSender类的典型用法代码示例。如果您正苦于以下问题:C# IMessageSender类的具体用法?C# IMessageSender怎么用?C# IMessageSender使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IMessageSender类属于命名空间,在下文中一共展示了IMessageSender类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Program
public Program(IMessageSender sender, IStoreEvents store, NuclearStorage storage)
{
this.sender = new SenderDecorator(sender);
this.store = store;
this.storage = storage;
reader = new ConsoleReader();
}
示例2: InteractionProcessor
public InteractionProcessor(IMessageSender sender, LifelineViewport viewport, NuclearStorage storage)
{
_sender = sender;
_viewport = viewport;
_storage = storage;
CurrentStoryId = new StoryId(Guid.Empty);
}
示例3: EventStoreBusPublisher
public EventStoreBusPublisher(IMessageSender sender, IPendingEventsQueue queue)
{
this.sender = sender;
this.queue = queue;
this.enqueuedKeys = new BlockingCollection<string>();
}
示例4: Invoke
public void Invoke(IMessageSender sender, Message message)
{
foreach(var listener in Listeners)
{
listener.Value.Invoke(listener.Key, sender, message);
}
}
示例5: CreateBus
public void CreateBus()
{
m_Sender = Substitute.For<IMessageSender>();
m_Receiver = Substitute.For<IMessageReceiver>();
m_Bus = new MessageBus(m_Sender,
m_Receiver);
}
示例6: MessageService
static MessageService()
{
if (!MessagingEnabled) return;
var unitySection = ConfigurationManager.GetSection("unity");
if (unitySection == null)
{
log.Error("Required unity configuration for Message Sender");
return;
}
try
{
var unity = new UnityContainer().LoadConfiguration(unityContainerName);
if (unity.IsRegistered<IMessageSender>())
{
sender = unity.Resolve<IMessageSender>();
}
else
{
log.Error("Required unity configuration for Message Sender");
}
}
catch(Exception ex)
{
log.Error("Error while resolving Message Sender: " + ex);
}
}
示例7: ProtocolChoicePromptHandler
public ProtocolChoicePromptHandler(
IMessageSender messageSender,
ConsoleService consoleService)
{
this.messageSender = messageSender;
this.consoleService = consoleService;
}
示例8: TransportClient
public TransportClient(IMessageSender messageSender, IMessageListener messageListener, ILogger logger, ISerializer<byte[]> serializer)
{
_messageSender = messageSender;
_messageListener = messageListener;
_logger = logger;
_serializer = serializer;
messageListener.Received += MessageListener_Received;
}
示例9: HttpMessageWriter
public HttpMessageWriter(IMessageSender messageSender, string baseUrl, OutputPort light, Watchdog[] resetWatchdogsOnSend)
{
_messageSender = messageSender;
_baseUrl = baseUrl;
_light = light;
_resetWatchdogsOnSend = resetWatchdogsOnSend ?? new Watchdog[] {};
StartThread();
}
示例10: TransportClient
public TransportClient(IMessageSender messageSender, IMessageListener messageListener, ILogger logger, IServiceExecutor serviceExecutor)
{
_messageSender = messageSender;
_messageListener = messageListener;
_logger = logger;
_serviceExecutor = serviceExecutor;
messageListener.Received += MessageListener_Received;
}
示例11: IncomingMessageProcessor
public IncomingMessageProcessor(IRepository repository, IMessageSender messageSender,
ICaseRepository caseRepository, IEmailSender emailSender)
{
_repository = repository;
_messageSender = messageSender;
_caseRepository = caseRepository;
_emailSender = emailSender;
}
示例12: GetSender
public IMessageSender GetSender(IMessageSender[] senders)
{
lock (_sendersLock)
{
_currentSender = ++_currentSender % senders.Length;
return senders[_currentSender];
}
}
示例13: SendAll
private void SendAll(IEnumerable messages, IMessageSender sender)
{
IEnumerator iterator = messages.GetEnumerator();
while (iterator.MoveNext())
{
sender.Send(iterator.Current);
}
}
示例14: EventBus
public EventBus(IMessageSender messageSender,
IRoutingKeyProvider routingKeyProvider,
IMetadataProvider metadataProvider)
{
this.messageSender = messageSender;
this.routingKeyProvider = routingKeyProvider;
this.metadataProvider = metadataProvider;
this.logger = LogManager.GetLogger("ThinkNet");
}
示例15: Given
public override void Given()
{
messageSender = Moq.Mock<IMessageSender>();
var messageMap = Moq.Mock<IMessageMap_v2>();
messageMap.SetupGet(x => x.MessageType).Returns(typeof(ChangeOrderAttributes));
viewModel = new MessageMapViewModel(messageSender, messageMap);
}