public AccidentRecordService(IAccidentRecordRepository accidentRecordRepository,
                              IAccidentTypeRepository accidentTypeRepository,
                              ICauseOfAccidentRepository causeOfAccidentRepository,
                              IJurisdictionRepository jurisdictionRepository,
                              IUserForAuditingRepository userForAuditingRepository,
                              ICountriesRepository countriesRepository,
                              IEmployeeRepository employeeRepository,
                              ISiteRepository siteRepository,
                              IDocumentTypeRepository documentTypeRepository,
                              IInjuryRepository injuryRepository,
                              IBodyPartRepository bodyPartRepository,
                              IPeninsulaLog log,
                              IBus bus)
 {
     _accidentRecordRepository = accidentRecordRepository;
     _accidentTypeRepository = accidentTypeRepository;
     _causeOfAccidentRepository = causeOfAccidentRepository;
     _jurisdictionRepository = jurisdictionRepository;
     _userForAuditingRepository = userForAuditingRepository;
     _countriesRepository = countriesRepository;
     _employeeRepository = employeeRepository;
     _siteRepository = siteRepository;
     _documentTypeRepository = documentTypeRepository;
     _log = log;
     _injuryRepository = injuryRepository;
     _bodyPartRepository = bodyPartRepository;
     _bus = bus;
 }
Exemplo n.º 2
0
 protected override void OnStart(string[] args)
 {
     BusConfiguration busConfiguration = new BusConfiguration();
     busConfiguration.EndpointName("EndpointName");
     busConfiguration.EnableInstallers();
     bus = Bus.Create(busConfiguration).Start();
 }
Exemplo n.º 3
0
        protected override void OnStart(string[] args)
        {
            try
            {
                container = new Container(x => x.AddRegistry<DependencyRegistry>());
                var myDocumentStore = new DocumentStore { ConnectionStringName = "EpiFlowDB" };

                var busConfiguration = new BusConfiguration();
                busConfiguration.EndpointName("EpiFlow.Messages");
                busConfiguration.UseContainer<StructureMapBuilder>(c => c.ExistingContainer(container));
                busConfiguration.UseSerialization<JsonSerializer>();
                busConfiguration.UsePersistence<RavenDBPersistence>()
                    .UseDocumentStoreForSubscriptions(myDocumentStore)
                    .UseDocumentStoreForSagas(myDocumentStore)
                    .UseDocumentStoreForTimeouts(myDocumentStore);
                busConfiguration.UseTransport<RabbitMQTransport>();
                busConfiguration.DefineCriticalErrorAction(OnCriticalError);
                busConfiguration.Transactions().DisableDistributedTransactions();

                if (Environment.UserInteractive && Debugger.IsAttached)
                {
                    busConfiguration.EnableInstallers();
                }
                var startableBus = Bus.Create(busConfiguration);
                bus = startableBus.Start();
            }
            catch (Exception exception)
            {
                OnCriticalError("Failed to start the bus.", exception);
            }
        }
        public BreakpointsViewModel(IBus bus)
            : base(bus)
        {
            Contract.Requires<ArgumentNullException>(bus != null);

            this.Title = "Breakpoints";
        }
Exemplo n.º 5
0
    static void SendOrder(IBus bus)
    {

        Console.WriteLine("Press enter to send a message");
        Console.WriteLine("Press any key to exit");

        while (true)
        {
            ConsoleKeyInfo key = Console.ReadKey();
            Console.WriteLine();

            if (key.Key != ConsoleKey.Enter)
            {
                return;
            }
            Guid id = Guid.NewGuid();

            PlaceOrder placeOrder = new PlaceOrder
            {
                Product = "New shoes",
                Id = id
            };
            bus.Send("Samples.StepByStep.Server", placeOrder);

            Console.WriteLine("Sent a new PlaceOrder message with id: {0}", id.ToString("N"));

        }

    }
Exemplo n.º 6
0
        /// <summary>
        ///     Starts a <see cref="ServiceHost" /> for each found service. Defaults to <see cref="BasicHttpBinding" /> if
        ///     no user specified binding is found
        /// </summary>
        public void Startup(Unicast.UnicastBus bus)
        {
            Bus = bus;
            var conventions = bus.Builder.Build<Conventions>();
            var components = bus.Builder.Build<IConfigureComponents>();

            foreach (var serviceType in bus.Settings.GetAvailableTypes().Where(t => !t.IsAbstract && IsWcfService(t, conventions)))
            {
                var host = new WcfServiceHost(serviceType);

                Binding binding = new BasicHttpBinding();

                if (components.HasComponent<Binding>())
                {
                    binding = bus.Builder.Build<Binding>();
                }

                host.AddDefaultEndpoint(GetContractType(serviceType),
                    binding
                    , String.Empty);

                hosts.Add(host);

                logger.Debug("Going to host the WCF service: " + serviceType.AssemblyQualifiedName);
                host.Open();
            }
        }
Exemplo n.º 7
0
        public void SetUp()
        {
            testSender = MockRepository.GenerateStub<ISendMessages>();

            messagePersister = new InMemoryPersistence();

            httpChannel = new HttpChannel(messagePersister)
                              {
                                  ListenUrl = "http://localhost:8092/Gateway/",
                                  ReturnAddress = "Gateway.Tests.Input"
                              };

            httpChannel.MessageReceived += httpChannel_MessageReceived;

            httpChannel.Start();

            bus = Configure.With()
                .DefaultBuilder()
                .XmlSerializer()
                .FileShareDataBus("./databus")
                .InMemoryFaultManagement()
                .UnicastBus()
                .MsmqTransport()
                .CreateBus()
                .Start();
        }
Exemplo n.º 8
0
        public void SetUp()
        {
            testSender = MockRepository.GenerateStub<ISendMessages>();

            messagePersister = new InMemoryPersistence();
            dataBusForTheReceivingSide = new FileShareDataBus(DATABUS_DIRECTORY);

            HttpChannelReceiver = new HttpChannelReceiver(messagePersister)
                                      {
                                          ListenUrl = "http://localhost:8092/Gateway/",
                                          DataBus = dataBusForTheReceivingSide
                              };

            HttpChannelReceiver.MessageReceived += httpChannel_MessageReceived;

            HttpChannelReceiver.Start();

            bus = Configure.With()
                .DefaultBuilder()
                .XmlSerializer()
                .FileShareDataBus(DATABUS_DIRECTORY_FOR_THE_TEST_ENDPOINT)
                .InMemoryFaultManagement()
                .UnicastBus()
                .MsmqTransport()
                .CreateBus()
                .Start();
        }
Exemplo n.º 9
0
        protected override void SetUp()
        {
            var logger = new ListLoggerFactory(detailed: true);

            // start the external timeout manager
            Configure.With(Using(new BuiltinHandlerActivator()))
                .Logging(l => l.Use(logger))
                .Transport(t => t.UseMsmq(_queueNameTimeoutManager))
                .Start();

            _gotTheMessage = new ManualResetEvent(false);

            // start the client
            var client = Using(new BuiltinHandlerActivator());

            client.Handle<string>(async str => _gotTheMessage.Set());

            Configure.With(client)
                .Logging(l => l.Use(logger))
                .Transport(t => t.UseMsmq(_queueName))
                .Options(o => o.UseExternalTimeoutManager(_queueNameTimeoutManager))
                .Start();

            _bus = client.Bus;
        }
Exemplo n.º 10
0
        void InterfaceMessage(IBus bus)
        {
            #region InterfacePublish
            bus.Publish<IMyEvent>(m => { m.SomeProperty = "Hello world"; });
            #endregion

        }
        public void SetUp()
        {
            container = new Container();
            container.RegisterAsEasyNetQContainerFactory();

            bus = new MockBuilder().Bus;
        }
Exemplo n.º 12
0
 void Shutdown(IBus bus)
 {
     #region Hosting-Shutdown
     UnicastBus busImpl = (UnicastBus)bus;
     busImpl.Dispose();
     #endregion
 }
Exemplo n.º 13
0
		public DocumentSearchViewModel(IBus bus, IEventAggregator eventAggregator)
		{
			if (bus == null) throw new ArgumentNullException("bus");
			if (eventAggregator == null) throw new ArgumentNullException("eventAggregator");
			_Bus = bus;
			_EventAggregator = eventAggregator;
		}
Exemplo n.º 14
0
 protected override void Given()
 {
     sr = Substitute.For<SourceRepoDriver>();
     sr.GetLatestRevision().Returns(new RevisionInfo { Revision = "456" });
     bus = Substitute.For<IBus>();
     rc = new Domain.RevisionChecker(bus, url => sr);
 }
 public void SetupMessaging(IBus coreInputBus)
 {
     coreInputBus.Subscribe<ProjectionCoreServiceMessage.Start>(_projectionCoreService);
     coreInputBus.Subscribe<ProjectionCoreServiceMessage.Stop>(_projectionCoreService);
     coreInputBus.Subscribe<ProjectionCoreServiceMessage.Tick>(_projectionCoreService);
     coreInputBus.Subscribe<CoreProjectionManagementMessage.CreateAndPrepare>(_projectionCoreService);
     coreInputBus.Subscribe<CoreProjectionManagementMessage.CreatePrepared>(_projectionCoreService);
     coreInputBus.Subscribe<CoreProjectionManagementMessage.Dispose>(_projectionCoreService);
     coreInputBus.Subscribe<ProjectionSubscriptionManagement.Subscribe>(_projectionCoreService);
     coreInputBus.Subscribe<ProjectionSubscriptionManagement.Unsubscribe>(_projectionCoreService);
     coreInputBus.Subscribe<ProjectionSubscriptionManagement.Pause>(_projectionCoreService);
     coreInputBus.Subscribe<ProjectionSubscriptionManagement.Resume>(_projectionCoreService);
     coreInputBus.Subscribe<ProjectionCoreServiceMessage.CommittedEventDistributed>(_projectionCoreService);
     coreInputBus.Subscribe<ProjectionCoreServiceMessage.EventReaderIdle>(_projectionCoreService);
     coreInputBus.Subscribe<ProjectionCoreServiceMessage.EventReaderEof>(_projectionCoreService);
     coreInputBus.Subscribe<CoreProjectionManagementMessage.Start>(_projectionCoreService);
     coreInputBus.Subscribe<CoreProjectionManagementMessage.LoadStopped>(_projectionCoreService);
     coreInputBus.Subscribe<CoreProjectionManagementMessage.Stop>(_projectionCoreService);
     coreInputBus.Subscribe<CoreProjectionManagementMessage.Kill>(_projectionCoreService);
     coreInputBus.Subscribe<CoreProjectionManagementMessage.GetState>(_projectionCoreService);
     coreInputBus.Subscribe<CoreProjectionManagementMessage.GetDebugState>(_projectionCoreService);
     coreInputBus.Subscribe<CoreProjectionManagementMessage.UpdateStatistics>(_projectionCoreService);
     coreInputBus.Subscribe<ClientMessage.ReadStreamEventsBackwardCompleted>(_projectionCoreService);
     coreInputBus.Subscribe<ClientMessage.WriteEventsCompleted>(_projectionCoreService);
     //NOTE: message forwarding is set up outside (for Read/Write events)
 }
Exemplo n.º 16
0
        protected void Application_Start()
        {
            DocumentStore = new DocumentStore
            {
                DefaultDatabase = "Polyglot.UI.Orders",
                Url = "http://localhost:8080"
            };
            DocumentStore.Initialize();

            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            AuthConfig.RegisterAuth();

            Bus = Configure
                .With()
                .DefaultBuilder()
                .XmlSerializer()
                .MsmqTransport()
                .UnicastBus()
                .SendOnly();
        }
Exemplo n.º 17
0
 public static void InitializeWith(this IEnumerable<ISaga> sagas, IBus bus)
 {
     foreach (var saga in sagas)
     {
         saga.Initialize(bus);
     }
 }
        public void Setup()
        {
            _bus = MockRepository.GenerateStub<IBus>();
            _productRenamedEventHandler = new ProductRenamedEventHandler(_bus);

            _productId = Guid.NewGuid();
        }
Exemplo n.º 19
0
 public SchedulerService(IBus bus, IRawByteBus rawByteBus, ILog log, IScheduleRepository scheduleRepository)
 {
     this.bus = bus;
     this.scheduleRepository = scheduleRepository;
     this.rawByteBus = rawByteBus;
     this.log = log;
 }
Exemplo n.º 20
0
        protected override void SetUp()
        {
            using (var transport = new RabbitMqTransport(ConnectionString, _receiverQueueName, new NullLoggerFactory()))
            {
                transport.PurgeInputQueue();
            }

            _receiver = new BuiltinHandlerActivator();

            Using(_receiver);

            Configure.With(_receiver)
                .Logging(l => l.Console(LogLevel.Info))
                .Transport(t => t.UseRabbitMq(ConnectionString, _receiverQueueName).Prefetch(1))
                .Options(o =>
                {
                    o.SetNumberOfWorkers(1);
                    o.SetMaxParallelism(1);
                })
                .Start();

            _sender = Configure.With(new BuiltinHandlerActivator())
                .Logging(l => l.Console(LogLevel.Info))
                .Transport(t => t.UseRabbitMqAsOneWayClient(ConnectionString))
                .Routing(r => r.TypeBased().MapFallback(_receiverQueueName))
                .Start();

            Using(_sender);
        }
Exemplo n.º 21
0
        public NotificationService(IBus bus, ILogger logger, ILogEventBuilder eventBuilder)
        {
            _repository = new NotificationRepository();
            _notificationPlayerRepository = new NotificationPlayerRepository();
            _notificationRepository = new NotificationRepository();
            //_publisher = new RabbitMqPublisher()
            //{
            //    MessageLookups = new List<MessageConfig>()
            //    {
            //        new MessageConfig()
            //        {
            //            ExchangeName = "PB.Events",
            //            MessageType = typeof (NotificationCreated),
            //            RoutingKey = ""
            //        }
            //    }
            //};

            _bus = bus;
            _logger = logger;
            _eventBuilder = eventBuilder;

            _publisher = new RabbitMqPublisher(ConfigurationManager.AppSettings["Queue.Uri"])
            {
                MessageLookups = new List<MessageConfig>()
                {
                    new MessageConfig()
                    {
                        ExchangeName = "PB.Events",
                        MessageType = typeof (NotificationCreated),
                        RoutingKey = ""
                    }
                }
            };
        }
Exemplo n.º 22
0
    public static void Main()
    {
        BusG.Init ();
        Application.Init ();

        tv = new TextView ();
        ScrolledWindow sw = new ScrolledWindow ();
        sw.Add (tv);

        Button btn = new Button ("Click me");
        btn.Clicked += OnClick;

        Button btnq = new Button ("Click me (thread)");
        btnq.Clicked += OnClickQuit;

        VBox vb = new VBox (false, 2);
        vb.PackStart (sw, true, true, 0);
        vb.PackStart (btn, false, true, 0);
        vb.PackStart (btnq, false, true, 0);

        Window win = new Window ("D-Bus#");
        win.SetDefaultSize (640, 480);
        win.Add (vb);
        win.Destroyed += delegate {Application.Quit ();};
        win.ShowAll ();

        bus = Bus.Session.GetObject<IBus> ("org.freedesktop.DBus", new ObjectPath ("/org/freedesktop/DBus"));

        Application.Run ();
    }
 public AppointmentController(
     IBus bus,
     IAppointmentService appointmentService)
 {
     _bus = bus;
     _appointmentService = appointmentService;
 }
Exemplo n.º 24
0
 public SchedulerService(IBus bus, IEasyNetQLogger log, IScheduleRepository scheduleRepository, ISchedulerServiceConfiguration configuration)
 {
     this.bus = bus;
     this.log = log;
     this.scheduleRepository = scheduleRepository;
     this.configuration = configuration;
 }
Exemplo n.º 25
0
        public static void Init()
        {
            if (Bus != null)
            return;

              lock (SyncLock)
              {
            if (Bus != null)
              return;
            var cfg = new BusConfiguration();

            cfg.EndpointName(MethodBase.GetCurrentMethod().DeclaringType.Namespace);
            cfg.UseTransport<MsmqTransport>();
            cfg.UsePersistence<InMemoryPersistence>();
            cfg.EnableInstallers();
            cfg.UseSerialization<JsonSerializer>();

            cfg.Conventions()
               .DefiningMessagesAs(t => t.Namespace != null && t.Namespace.EndsWith(".Messages"))
               .DefiningCommandsAs(t => t.Namespace != null && t.Namespace.EndsWith(".Commands"))
               .DefiningEventsAs(t => t.Namespace != null && t.Namespace.EndsWith(".Events"));

            Bus = NServiceBus.Bus.Create(cfg).Start();
              }
        }
Exemplo n.º 26
0
 public MessageBusReplySessionChannel(
     BufferManager bufferManager, MessageEncoderFactory encoderFactory, ChannelManagerBase parent,
     EndpointAddress localAddress,
     IBus bus)
     : base(bufferManager, encoderFactory, parent, localAddress, bus)
 {
 }
        protected void SetupQuoteClient()
        {
            if (QuoteClientEnabled)
            {
                Bus = RabbitHutch.CreateBus(QuoteClientConnectionString);

                string instrumentSymbol = Instrument.Symbol.ToUpperInvariant();
                CurrentQuoteClientSubscription = string.Format(
                    "{0}.{1}.{2}",
                    EnvironmentManager.GetNormalizedMachineName(),
                    ProjectName,
                    instrumentSymbol)
                    .ToUpperInvariant()
                    .Replace("-", "")
                    .Replace("_", "");

                LoggingUtility.WriteInfoFormat(this, "ENABLING quote client with sub id: {0}",
                    CurrentQuoteClientSubscription);

                Bus.Subscribe<OnBarOpenMessage>(CurrentQuoteClientSubscription, HandleOnBarOpenFromBus,
                    x => x.WithTopic(instrumentSymbol));
                Bus.Subscribe<OnBarMessage>(CurrentQuoteClientSubscription, HandleOnBarFromBus,
                    x => x.WithTopic(instrumentSymbol));
                Bus.Subscribe<OnQuoteMessage>(CurrentQuoteClientSubscription, HandleOnQuoteFromBus,
                    x => x.WithTopic(instrumentSymbol));

                NumberOfQuotes = 0;

                QuoteClientStartAt = DateTime.Now;
            }
            else
            {
                LoggingUtility.WriteInfo(this, "Quote client is NOT ENABLED");
            }
        }
Exemplo n.º 28
0
        static void Main(string[] args)
        {
            var ip = Ask("Please enter server IP[:port]: ");
            var user = Ask("Please enter your nick name: ");

            using (_bus = RabbitHutch.CreateBus("host=" + ip, x => x.Register<IEasyNetQLogger>(_ => new EmptyLogger())))
            {
                SendJoinedMessage(user);
                Console.WriteLine("You will be joined to chat soon. If you will want to leave just enter message 'exit'");
                SubscribeToMessages(user);
                while (true)
                {
                    Console.Write("> ");
                    var msg = Console.ReadLine();

                    if (msg.Equals("exit", StringComparison.InvariantCultureIgnoreCase))
                    {
                        SendExitMessage(user);
                        break;
                    }

                    SendMessage(_bus, user, msg);
                }
            }
        }
Exemplo n.º 29
0
        public MessageBusInputChannel(
            BufferManager bufferManager, MessageEncoderFactory encoder, ChannelManagerBase parent,
            EndpointAddress localAddress,
            IBus bus)
            : base(bufferManager, encoder, parent)
        {
            _localAddress = localAddress;
            _bus = bus;
            _aLock = new object();

            _tryReceiveDelegate = (TimeSpan timeout, out Message message) =>
            {
                message = null;
                try
                {
                    var requestMessage = _bus.Receive(true, null);
                    if (requestMessage != null)
                    {
                        message = GetWcfMessageFromString(requestMessage.Content);
                        OnAfterTryReceive(requestMessage);
                    }
                }
                catch (Exception ex)
                {
                    throw new CommunicationException(ex.Message, ex);
                }
                return true;
            };

            _receiveDelegate = (TimeSpan timeout) =>
            {
                var requestMessage = _bus.Receive(false, ChannelID);
                return GetWcfMessageFromString(requestMessage.Content);
            };
        }
Exemplo n.º 30
0
 public MessageStuffer(Type messageType)
 {
     _messageType = messageType;
     AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(AssemblyResolve);
     _bus = CreateBus();
     AppDomain.CurrentDomain.AssemblyResolve -= new ResolveEventHandler(AssemblyResolve);
 }
 public VirtualMachineStateChangedEventHandler(IBus bus)
 {
     _bus = bus;
 }
Exemplo n.º 32
0
        public BusClientFactoryContext(IBus bus, RequestTimeout defaultTimeout = default)
        {
            _bus = bus;

            DefaultTimeout = defaultTimeout.HasValue ? defaultTimeout : RequestTimeout.Default;
        }
Exemplo n.º 33
0
 public LogicalInstruction(byte opCode, IExecutionUnit eu, IBus bus) : base(opCode, eu, bus)
 {
 }
Exemplo n.º 34
0
 public ListenerService(int listenerId)
 {
     this.listenerId = listenerId;
     bus             = Depot.Connect("localhost/workflow");
 }
 public TrainingSessionsService(ExercisesDbContext context, IBus publisher)
     : base(context)
 {
     this.context   = context;
     this.publisher = publisher;
 }
Exemplo n.º 36
0
 public ISubscriptionFailureStrategy BuildFaultStrategy(IBus bus)
 {
     return(failureStrategyBuilder(bus));
 }
Exemplo n.º 37
0
 void InterfaceMessage(IBus bus)
 {
     #region InterfacePublish
     bus.Publish <IMyEvent>(m => { m.SomeProperty = "Hello world"; });
     #endregion
 }
Exemplo n.º 38
0
 public MySaga(ManualResetEvent done, IBus bus)
 {
     _done = done;
     _bus  = bus;
 }
 public HomeController(IBus bus)
 {
     _bus = bus;
 }
Exemplo n.º 40
0
 public FuncionarioCommandHandler(IUnitOfWork uow, IBus bus, IDomainNotificationHandler <DomainNotification> notification, IFuncionarioRepository funcionarioRepository) : base(uow, bus, notification)
 {
     _bus = bus;
     _funcionarioRepository = funcionarioRepository;
 }
 protected CommandProcessor(IBus bus, IServiceScopeFactory serviceScopeFactory)
     : base(serviceScopeFactory)
 {
     this.bus = bus;
 }
Exemplo n.º 42
0
 public InstanceDisposer(IBus bus)
 {
     this.bus = bus;
 }
 public MessageSender(IBus bus, ILogger<MessageSender> logger)
 {
     _bus = bus;
     _logger = logger;
 }
 public PhotographerAppService(IMapper mapper, IBus bus, IPhotographerRepository repository) : base(mapper, bus)
 {
     _mapper     = mapper;
     _repository = repository;
 }
 protected override void ConnectObservers(IBus bus)
 {
     _activityMonitor = bus.CreateBusActivityMonitor(TimeSpan.FromMilliseconds(500));
 }
 public void SetUp()
 {
     bus = RabbitHutch.CreateBus("host=localhost");
 }
Exemplo n.º 47
0
 public RabbitMQEventBus(string host, string username, string password)
 {
     _bus = RabbitHutch.CreateBus($"host={host};username={username};password={password}");
 }
Exemplo n.º 48
0
 public DefaultScheduler(IBus bus, IScheduledTaskStorage scheduledTaskStorage)
 {
     this.bus = bus;
     this.scheduledTaskStorage = scheduledTaskStorage;
 }
Exemplo n.º 49
0
 public static void WithWrapping(Cpu cpu, IBus bus)
 {
     cpu.AddressLatchLow += cpu.CpuState.X;
 }
Exemplo n.º 50
0
 public CreateSmallThumbnail(IBus bus)
 {
     this.bus = bus;
 }
Exemplo n.º 51
0
 public void TestCleanup()
 {
     _messageRepository = null;
     _inMemomoryBus     = null;
 }
Exemplo n.º 52
0
 public static void WithWrapping(Cpu cpu, IBus bus)
 {
     cpu.EffectiveAddressLatchLow += cpu.CpuState.Y;
 }
Exemplo n.º 53
0
 public CommandHandler(IUnitOfWork uow, IBus bus, IDomainNotificationHandler <DomainNotification> notifications)
 {
     _uow           = uow;
     _bus           = bus;
     _notifications = notifications;
 }
Exemplo n.º 54
0
 public ScheduleMyTasks(IBus bus, Schedule schedule)
 {
     this.bus      = bus;
     this.schedule = schedule;
 }
 public async Task StopFaulted(IBus bus, Exception exception)
 {
     Console.WriteLine(string.Concat(_logger, ": Bus exception at shut-down: ", exception.Message
                                     , " for bus ", bus.Address));
     await Task.FromResult(0);
 }
Exemplo n.º 56
0
 public void TestInit()
 {
     _messageRepository = new MessageRepository();
     _inMemomoryBus     = new InMemoryBus();
 }
 public async Task PostStop(IBus bus)
 {
     Console.WriteLine(string.Concat(_logger, ": Bus has been stopped with address ", bus.Address));
     await Task.FromResult(0);
 }
 public SomeAwesomeViewModel(IBus bus)
 {
     this.bus = bus;
 }
 public async Task PostStart(IBus bus, Task busReady)
 {
     Console.WriteLine(string.Concat(_logger, ": Bus has been started with address ", bus.Address));
     await busReady;
 }
 public async Task PreStop(IBus bus)
 {
     Console.WriteLine(string.Concat(_logger, ": Bus is about to stop with address ", bus.Address));
     await Task.FromResult(0);
 }