Beispiel #1
0
        public void RegisterMessageSource(string address)
        {
            var messageSource = new TestMessageSource();

            containerHost.RegisterMessageSource(address, messageSource);
            messageSources.Add(address, messageSource);
        }
Beispiel #2
0
 public void SendMessage(string address, string payload)
 {
     if (messageSources.TryGetValue(address, out var messageSource))
     {
         messageSource.SendMessage(payload);
     }
     else
     {
         messageSource = new TestMessageSource();
         messageSource.SendMessage(payload);
         containerHost.RegisterMessageSource(address, messageSource);
         messageSources.Add(address, messageSource);
     }
 }