public Memory(IAddressBus addressBus, IDataBus dataBus) { _addressBus = addressBus; _dataBus = dataBus; _memoryArea = new byte[0xFFFF + 1]; }
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(); }
public InputUserScreen(IPresenter presenter, Func <IMainScreen> mainScreen, UserFacade userFacade, IDataBus dataBus) { this.presenter = presenter; this.mainScreen = new Lazy <IMainScreen>(mainScreen); this.userFacade = userFacade; this.dataBus = dataBus; }
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(); }
public SelectUserScreen(IPresenter presenter, Func <IMainScreen> mainScreen, IDataBus dataBus, IUsersRepository usersRepository) { this.presenter = presenter; this.mainScreen = new Lazy <IMainScreen>(mainScreen); this.dataBus = dataBus; this.usersRepository = usersRepository; }
static async Task <DataBusAttachment> CreateAttachment(IDataBus dataBus, string text, Dictionary <string, string> optionalMetadata = null) { using (var source = new MemoryStream(Encoding.UTF8.GetBytes(text))) { return(await dataBus.CreateAttachment(source, optionalMetadata)); } }
/// <summary> /// Creates the fake advanced API, using the given implementation(s). All arguments are optional /// </summary> public FakeAdvancedApi(IWorkersApi workers = null, ITopicsApi topics = null, IRoutingApi routing = null, ITransportMessageApi transportMessage = null, IDataBus dataBus = null) { _workers = workers; _topics = topics; _routing = routing; _transportMessage = transportMessage; _dataBus = dataBus; }
/// <summary> /// Creates the fake advanced API, using the given implementation(s). All arguments are optional /// </summary> public FakeAdvancedApi(IWorkersApi workers = null, ITopicsApi topics = null, IRoutingApi routing = null, ITransportMessageApi transportMessage = null, IDataBus dataBus = null) { _workers = workers; _topics = topics; _routing = routing; _transportMessage = transportMessage; _dataBus = dataBus; }
public MainScreen(Func <ISelectUserScreen> selectUserScreen, Func <IInputUserScreen> inputUserScreen, Func <IProductsListScreen> productsScreen, IPresenter presenter, IDataBus dataBus) { this.selectUserScreen = new Lazy <ISelectUserScreen>(selectUserScreen); this.inputUserScreen = new Lazy <IInputUserScreen>(inputUserScreen); this.productsScreen = new Lazy <IProductsListScreen>(productsScreen); this.presenter = presenter; this.dataBus = dataBus; }
public ProductScreen(IProductsRepository productsRepository, TransactionsFacade transactionsFacade, Func <IMainScreen> mainScreen, IDataBus dataBus, IPresenter presenter, IUsersRepository usersRepository) { this.productsRepository = productsRepository; this.transactionsFacade = transactionsFacade; this.mainScreen = new Lazy <IMainScreen>(mainScreen); this.dataBus = dataBus; this.presenter = presenter; this.usersRepository = usersRepository; }
public void SetUp() { dataBus = new InMemoryDataBus(); messageMutator = new DataBusMessageMutator(dataBus, new DefaultDatabusSerializer()); testMessage = new TestMessage { Blob = new DataBusProperty<byte[]>(testBlob), LargeString = new DataBusProperty<string>(testString), DataBusPropertyWithNullPayload = new DataBusProperty<string>(null) }; }
public void SetUp() { dataBus = new InMemoryDataBus(); messageMutator = new DataBusMessageMutator(dataBus, new DefaultDatabusSerializer()); testMessage = new TestMessage { Blob = new DataBusProperty <byte[]>(testBlob), LargeString = new DataBusProperty <string>(testString), DataBusPropertyWithNullPayload = new DataBusProperty <string>(null) }; }
static async Task <string> LoadAttachment(IDataBus dataBus, string id) { using (var destination = new MemoryStream()) { using (var source = await dataBus.OpenRead(id)) { await source.CopyToAsync(destination); } return(Encoding.UTF8.GetString(destination.ToArray())); } }
public void SetUp() { ExtensionMethods.SetHeaderAction = headerManager.SetHeader; ExtensionMethods.GetHeaderAction = headerManager.GetHeader; dataBus = MockRepository.GenerateMock <IDataBus>(); var databusMutator = new DataBusMessageMutator(dataBus, new DefaultDataBusSerializer()); incomingMutator = databusMutator; outgoingMutator = databusMutator; }
public void SetUp() { ExtensionMethods.SetHeaderAction = headerManager.SetHeader; ExtensionMethods.GetHeaderAction = headerManager.GetHeader; dataBus = MockRepository.GenerateMock<IDataBus>(); var databusMutator = new DataBusMessageMutator(dataBus, new DefaultDataBusSerializer()); incomingMutator = databusMutator; outgoingMutator = databusMutator; }
/// <summary> /// Constructs the bus. /// </summary> public RebusBus(IWorkerFactory workerFactory, IRouter router, ITransport transport, IPipelineInvoker pipelineInvoker, ISubscriptionStorage subscriptionStorage, Options options, IRebusLoggerFactory rebusLoggerFactory, BusLifetimeEvents busLifetimeEvents, IDataBus dataBus) { _workerFactory = workerFactory; _router = router; _transport = transport; _pipelineInvoker = pipelineInvoker; _subscriptionStorage = subscriptionStorage; _options = options; _busLifetimeEvents = busLifetimeEvents; _dataBus = dataBus; _log = rebusLoggerFactory.GetLogger <RebusBus>(); }
public StoringDataConsumer(IDataBus dataBus, IDataStorage dataStorage) { if (dataBus == null) { throw new ArgumentNullException("dataBus"); } if (dataStorage == null) { throw new ArgumentNullException("dataStorage"); } m_DataBus = dataBus; m_DataStorage = dataStorage; }
public DataTicker(IDataStorage dataStorage, IDataBus dataBus) { if (dataStorage == null) { throw new ArgumentNullException("dataStorage"); } if (dataBus == null) { throw new ArgumentNullException("dataBus"); } m_DataStorage = dataStorage; m_Subscription = dataBus.Subscribe <TimedData>(notifyClients); m_HubContext = GlobalHost.ConnectionManager.GetHubContext <DataTickerHub>(); }
public ProductsListScreen(IProductsRepository productsRepository, IPresenter presenter, Func <IMainScreen> mainScreen, IDataBus dataBus, Func <IProductScreen> productScreen) { this.productsRepository = productsRepository; this.presenter = presenter; this.mainScreen = new Lazy <IMainScreen>(mainScreen); this.dataBus = dataBus; this.productScreen = new Lazy <IProductScreen>(productScreen); dataBus.Remove(Constants.DataKeys.SelectedProduct); }
public Cpu6502(IAddressBus addressBus, IDataBus dataBus) { _addressBus = addressBus; _dataBus = dataBus; _instructionSet = new InstructionSet(); // Set a temp init state for CPU to start executing. PC = 0x0500; IR = 0x00; LoadAddress(PC); RW = true; // Read TState = EnumTstate.T1; }
public void SetUp() { dataBus = MockRepository.GenerateMock <IDataBus>(); receiveBehavior = new DataBusReceiveBehavior { DataBus = dataBus, DataBusSerializer = new DefaultDataBusSerializer() }; sendBehavior = new DataBusSendBehavior { DataBus = dataBus, DataBusSerializer = new DefaultDataBusSerializer() }; }
public void SetUp() { dataBus = MockRepository.GenerateMock<IDataBus>(); receiveBehavior = new DataBusReceiveBehavior { DataBus = dataBus, DataBusSerializer = new DefaultDataBusSerializer() }; sendBehavior = new DataBusSendBehavior { DataBus = dataBus, DataBusSerializer = new DefaultDataBusSerializer() }; }
/// <summary> /// Constructs the bus. /// </summary> public RebusBus(IWorkerFactory workerFactory, IRouter router, ITransport transport, IPipelineInvoker pipelineInvoker, ISubscriptionStorage subscriptionStorage, Options options, IRebusLoggerFactory rebusLoggerFactory, BusLifetimeEvents busLifetimeEvents, IDataBus dataBus) { _workerFactory = workerFactory; _router = router; _transport = transport; _pipelineInvoker = pipelineInvoker; _subscriptionStorage = subscriptionStorage; _options = options; _busLifetimeEvents = busLifetimeEvents; _dataBus = dataBus; _log = rebusLoggerFactory.GetLogger <RebusBus>(); var defaultBusName = $"Rebus {Interlocked.Increment(ref _busIdCounter)}"; _busName = options.OptionalBusName ?? defaultBusName; }
public DataProducer(IDataBus dataBus, IDataGenerator dataGenerator, int period = 3) { if (dataBus == null) { throw new ArgumentNullException("dataBus"); } if (dataGenerator == null) { throw new ArgumentNullException("dataGenerator"); } if (period <= 0) { throw new ArgumentException("period must be a positive value in seconds", "period"); } m_DataBus = dataBus; m_DataGenerator = dataGenerator; m_Period = period; }
public DataBusPropertyOffloader( IDataBus dataBus, IDataBusSerializer dataBusSerializer, IDataBusSettings dataBusSettings) { if (dataBus == null) { throw new ArgumentNullException("dataBus"); } if (dataBusSerializer == null) { throw new ArgumentNullException("dataBusSerializer"); } if (dataBusSettings == null) { throw new ArgumentNullException("dataBusSettings"); } _dataBus = dataBus; _dataBusSerializer = dataBusSerializer; _dataBusSettings = dataBusSettings; }
public DataBusMessageMutator(IDataBus dataBus, IDataBusSerializer serializer) { this.dataBus = dataBus; this.serializer = serializer; }
public SingleCallChannelForwarder(Func <string, IChannelSender> senderFactory, IDataBus databus) { this.senderFactory = senderFactory; this.databus = databus; }
/// <summary> /// Creates the step /// </summary> public DehydrateOutgoingMessageStep(IDataBus dataBus, int messageSizeLimitBytes) { _dataBus = dataBus; _messageSizeLimitBytes = messageSizeLimitBytes; }
public void SetUp() { dataBus = MockRepository.GenerateMock <IDataBus>(); mutator = new DataBusMessageMutator(dataBus, new DefaultDatabusSerializer()); }
public SingleCallChannelReceiver(Func <string, IChannelReceiver> channelFactory, IDeduplicateMessages deduplicator, IDataBus databus) { this.channelFactory = channelFactory; this.deduplicator = deduplicator; this.databus = databus; headerManager = new DataBusHeaderManager(); }
public IDataBusInitializer(IDataBus dataBus) { this.dataBus = dataBus; }
public Application(IMainScreen startScreen, IPresenter presenter, IDataBus dataBus) { this.presenter = presenter; this.currentScreen = startScreen; this.dataBus = dataBus; }
/// <summary> /// Creates the step /// </summary> public HydrateIncomingMessageStep(IDataBus dataBus) { _dataBus = dataBus ?? throw new ArgumentNullException(nameof(dataBus)); }
public DataBusMessageMutator(IDataBus dataBus, IDataBusSerializer serializer) { this.dataBus = dataBus; this.serializer = serializer; }
/// <summary> /// Creates the step /// </summary> public HydrateIncomingMessageStep(IDataBus dataBus) { _dataBus = dataBus; }
public DataBusSendBehavior(IDataBus databus, IDataBusSerializer serializer, Conventions conventions) { this.conventions = conventions; dataBusSerializer = serializer; dataBus = databus; }
public void SetUp() { dataBus = MockRepository.GenerateMock<IDataBus>(); mutator = new DataBusMessageMutator(dataBus, new DefaultDatabusSerializer()); }