public void ShouldInitalizeManagerRequestManager() { using (SmartClientDatabase database = GetDatabase()) { RequestManager requestManager = DatabaseRequestManagerIntializer.Initialize("TestConnectionString"); Assert.IsNotNull(requestManager); Assert.IsNotNull(requestManager.RequestQueue); Assert.IsNotNull(requestManager.DeadLetterQueue); Assert.IsNotNull(requestManager.EndpointCatalog); } }
public FormControlPanel() { InitializeComponent(); tagComboBox.SelectedIndex = 0; manager = DatabaseRequestManagerIntializer.Initialize("QueueDatabase"); manager.RequestQueue.RequestEnqueued += new EventHandler <RequestEnqueuedEventArgs>(OnRequestEnqueued); manager.RequestDispatched += new EventHandler <RequestDispatchedEventArgs>(OnRequestDispatched); IntegerCalculatorServiceDisconnectedAgentCallback.AddReturn += new EventHandler <AddReturnEventArgs>(OnAddReturn); UpdateRequestQueue(); UpdateFailedQueue(); }
private void AddServices() { // Set up request manager RequestManager requestManager = DatabaseRequestManagerIntializer.Initialize(); requestManager.StartAutomaticDispatch(); // Monitor network status changes _connectionMonitor = requestManager.ConnectionMonitor; _connectionMonitor.ConnectionStatusChanged += new EventHandler(connectionMonitor_ConnectionStatusChanged); // Show current connectivity state UpdateConnectivityStatusLabel(_connectionMonitor.IsConnected); // Add the request queue to the Root WorkItem. This queue will be used // by service agents to enqueue requests. WorkItem.RootWorkItem.Services.Add(requestManager.RequestQueue); // Add the connection monitor to the Root WorkItem. It will be used // to determine connectivity status and provide feedback to the user // accordingly. WorkItem.RootWorkItem.Services.Add(_connectionMonitor); }