public QpidResourceHolder(IClientFactory connectionFactory, IClient connection, IClientSession channel) { this.clientFactory = connectionFactory; AddConnection(connection); AddChannel(channel); this.frozen = true; }
public void Init() { fixture = new Fixture(); credentials = fixture.Create<ClientCredentials>(); serverUri = fixture.Create<Uri>().ToString(); classUnderTests = fixture.Create<ClientFactory>(); }
/// <summary> /// Instantiate a PushBotsClient /// </summary> /// <param name="appId">Your App's Application ID</param> /// <param name="secret">Your App's Secret Key</param> public PushBotsClient(string appId, string secret) { AppId = appId; Secret = secret; _clientFactory = new ClientFactory(); }
public ConfigureController(IApplicationServices applicationServices, IClientFactory<IConfigurationClient> configurationService) : base(applicationServices) { Guard.IsNotNull(configurationService, "configurationService"); this.configurationService = configurationService; }
public void SetUp() { clientFactory = MockRepository.GenerateStub<IClientFactory>(); clientFactory.Stub(x => x.MakeNewClient(Arg<int>.Is.Anything)).Return(new Client(null) { ID = 100 }); stubSnapCounter = MockRepository.GenerateStub<ISnapCounter>(); stubNetworkSession = MockRepository.GenerateStub<INetworkSession>(); clientStateTracker = new ClientStateTracker(stubSnapCounter, stubNetworkSession, clientFactory); }
public ServiceBackedConfigurationProvider(IClientFactory<IConfigurationClient> configurationService, IMapper mapper) { Guard.IsNotNull(configurationService, "configurationService"); Guard.IsNotNull(mapper, "mapper"); this.configurationService = configurationService; this.mapper = mapper; }
public ServiceBus(IClientFactory clientFactory) { _subscribers = new List<ISubscriber>(); _senders = new SenderCache(); _clientFactory = clientFactory; _validator = clientFactory.GetValidator(); }
public void SetupContext() { _clientFactory = MockRepository.GenerateStrictMock<IClientFactory>(); _client = MockRepository.GenerateStrictMock<IObjectContainer>(); _clientFactory.Expect(x => x.OpenClient()).Return(_client); _clientFactory.Expect(x => x.Bind(_client)); _mod = new Db4oMessageModule(_clientFactory); }
public MessageHandlerFactory(IClientRepository clientRepository, IClientIDGenerator clientIDGenerator, IClientFactory clientFactory, IClientWorkflowManager clientWorkflowManager) { this.metaConnectHandler = new MetaConnectHandler(clientRepository); this.metaDisconnectHandler = new MetaDisconnectHandler(clientRepository); this.metaHandshakeHandler = new MetaHandshakeHandler(clientIDGenerator, clientFactory, clientWorkflowManager); this.metaSubscribeHandler = new MetaSubscribeHandler(clientRepository); this.metaUnsubscribeHandler = new MetaUnsubscribeHandler(clientRepository); this.swallowHandler = new SwallowHandler(); this.forwardingHandler = new ForwardingHandler(clientRepository); }
public ClientStateTracker(ISnapCounter snapCounter, INetworkSession networkSession, IClientFactory clientFactory) { _snapCounter = snapCounter; _networkSession = networkSession; _clientFactory = clientFactory; networkSession.ClientJoined += HandleNewClientJoined; networkSession.ClientDisconnected += HandleClientDisconnect; NetworkClients = new List<Client>(); }
public static void ReleaseConnection(IClient client, IClientFactory clientFactory) { if (client == null) { return; } try { client.Close(); } catch (Exception ex) { logger.Debug("Could not close QPID Client", ex); } }
public OptionsWindow() { InitializeComponent(); PictureBoxProgress.Image = InternalResources.Image_Load_16x16; PictureBoxProgress.Visible = false; WindowsFormHost.Visibility = Visibility.Hidden; _clientFactory = new ClientFactory(); _backgroundWorker = new BackgroundWorker(); _backgroundWorker.WorkerSupportsCancellation = true; _backgroundWorker.DoWork += WorkerFetching; _backgroundWorker.RunWorkerCompleted += WorkerCompleted; }
public DefaultApplicationServices(IUserProvider userProvider, IHttpContextProvider httpContextProvider, IConfigurationProvider configurationProvider, IClientFactory<IEntryClient> entryService, IMapper mapper) { Guard.IsNotNull(userProvider, "userProvider"); Guard.IsNotNull(httpContextProvider, "httpContextProvider"); Guard.IsNotNull(configurationProvider, "configurationProvider"); Guard.IsNotNull(entryService, "entryService"); Guard.IsNotNull(mapper, "mapper"); this.userProvider = userProvider; this.httpContextProvider = httpContextProvider; this.configurationProvider = configurationProvider; this.entryService = entryService; this.mapper = mapper; }
public ClientController(IClientFactory <TClient> clientFactory) { _clientFactory = clientFactory; }
private PSAzureSubscriptionExtended ConstructPsAzureSubscriptionExtended(AzureSubscription subscription, IClientFactory clientFactory) { using (var client = clientFactory.CreateClient<ManagementClient>(Profile, subscription, AzureEnvironment.Endpoint.ServiceManagement)) { var response = client.Subscriptions.Get(); var environment = ProfileClient.GetEnvironmentOrDefault(subscription.Environment); var account = ProfileClient.Profile.Accounts[subscription.Account]; bool isCert = account.Type == AzureAccount.AccountType.Certificate; var psAzureSubscription = new PSAzureSubscription(subscription, ProfileClient.Profile); PSAzureSubscriptionExtended result = new PSAzureSubscriptionExtended(psAzureSubscription) { AccountAdminLiveEmailId = response.AccountAdminLiveEmailId, ActiveDirectoryUserId = subscription.Account, CurrentCoreCount = response.CurrentCoreCount, CurrentHostedServices = response.CurrentHostedServices, CurrentDnsServers = response.CurrentDnsServers, CurrentLocalNetworkSites = response.CurrentLocalNetworkSites, CurrentStorageAccounts = response.CurrentStorageAccounts, CurrentVirtualNetworkSites = response.CurrentVirtualNetworkSites, MaxCoreCount = response.MaximumCoreCount, MaxDnsServers = response.MaximumDnsServers, MaxHostedServices = response.MaximumHostedServices, MaxLocalNetworkSites = response.MaximumLocalNetworkSites, MaxStorageAccounts = response.MaximumStorageAccounts, MaxVirtualNetworkSites = response.MaximumVirtualNetworkSites, ServiceAdminLiveEmailId = response.ServiceAdminLiveEmailId, SubscriptionRealName = response.SubscriptionName, SubscriptionStatus = response.SubscriptionStatus.ToString(), ServiceEndpoint = environment.GetEndpoint(AzureEnvironment.Endpoint.ServiceManagement), ResourceManagerEndpoint = environment.GetEndpoint(AzureEnvironment.Endpoint.ResourceManager), IsDefault = subscription.GetProperty(AzureSubscription.Property.Default) != null, Account = account, Certificate = isCert ? AzureSession.DataStore.GetCertificate(subscription.Account) : null, CurrentStorageAccountName = subscription.GetProperty(AzureSubscription.Property.StorageAccount) }; return result; } }
public void SetupContext() { _clientFactory = MockRepository.GenerateStrictMock<IClientFactory>(); _client = MockRepository.GenerateStrictMock<IObjectContainer>(); _clientFactory.Expect(x => x.Unbind()).Return(_client); _client.Expect(x => x.Close()).Return(true); _client.Expect(x => x.Dispose()); _mod = new Db4oMessageModule(_clientFactory); }
protected Thread workerThread; // the background thread for running queries #endregion Fields #region Constructors /// <summary> Creates a new database client object </summary> /// <param name="clientFactory">A provider-specific ClientFactory class</param> /// <param name="connectString">The connection string</param> /// <param name="connectDescription">Human-readable connection description</param> public DbClient(IClientFactory clientFactory, string connectString, string connectDescription) { this.clientFactory = clientFactory; this.connectString = connectString; this.connectDescription = connectDescription; // Given that the OleDb classes appear to be apartment threaded, we can't just spawn // worker threads to execute background queries as required, since the connection will // have been created on a different thread. The easiest way around this is to start a worker // thread now, keeping it alive for the duration of the DbClient object, and have that // thread process all database commands - connections, disconnections, queries, etc. this.workerThread = new Thread (new ThreadStart (StartWorker)); workerThread.Name = "DbClient Worker Thread"; workerThread.Start(); }
public ArtifactDownloader(IClientFactory clientFactory) { this.clientFactory = clientFactory; }
public void Init() { _factory = MockRepository.GenerateMock<IClientFactory>(); _clientDictionary = new ClientDictionary(_factory); }
public static bool IsChannelTransactional(IClientSession session, IClientFactory clientFactory ) { //TODO implement return false; }
public QpidResourceHolder(IClientFactory connectionFactory) { this.clientFactory = connectionFactory; }
public static IClientSession GetTransactionalSession( IClientFactory cf, IClient existingCon, bool synchedLocalTransactionAllowed) { //TODO implement return null; }
public void SetUp() { log = MockRepository.GenerateMock<ILog>(); clientFactory = new ClientFactory(log); }
public static IClientSession DoGetTransactionalSession(IClientFactory clientFactory, IResourceFactory resourceFactory) { //TODO implement return null; }
public MetaHandshakeHandler(IClientIDGenerator clientIDGenerator, IClientFactory clientFactory, IClientWorkflowManager clientWorkflowManager) { this.clientIDGenerator = clientIDGenerator; this.clientFactory = clientFactory; this.clientWorkflowManager = clientWorkflowManager; }
private Server(string name, IClientFactory clientFactory, IPEndPoint localEndPoint) { this.name = name; this.localEndPoint = localEndPoint; this.clientFactory = clientFactory; }
public static Server Create(string name, IPEndPoint localEndPoint, IClientFactory clientFactory) { return new Server(name, clientFactory, localEndPoint); }
public TestFuzzyNames(IClientFactory factory) { this.factory = factory; }