public DomainContoller(IDomainDao domainDao, IUserDao userDao, IGroupDao groupDao, IGroupDomainDao groupDomainDao, IValidator <GetEntitiesByRelatedIdRequest> idSearchablePagedRequestValidator, IValidator <ChangeMembershipRequest> idEntityIdsRequestValidator, IValidator <DomainForCreation> domainForCreationValidator, IValidator <EntitySearchRequest> searchLimitExcludedIdsRequestValidator, IValidator <PublicDomainForCreation> publicDomainForCreationValidator, ILogger <DomainContoller> log, IPublisher publisher, IPublisherConfig config) { _domainDao = domainDao; _userDao = userDao; _groupDao = groupDao; _groupDomainDao = groupDomainDao; _idSearchablePagedRequestValidator = idSearchablePagedRequestValidator; _idEntityIdsRequestValidator = idEntityIdsRequestValidator; _domainForCreationValidator = domainForCreationValidator; _searchLimitExcludedIdsRequestValidator = searchLimitExcludedIdsRequestValidator; _publicDomainForCreationValidator = publicDomainForCreationValidator; _log = log; _publisher = publisher; _config = config; }
public void SetUp() { _domainDao = A.Fake <IDomainDao>(); _userDao = A.Fake <IUserDao>(); _groupDao = A.Fake <IGroupDao>(); _groupDomainDao = A.Fake <IGroupDomainDao>(); _idSearchablePagedRequestValidator = A.Fake <IValidator <GetEntitiesByRelatedIdRequest> >(); _idEntityIdsRequestValidator = A.Fake <IValidator <ChangeMembershipRequest> >(); _domainForCreationValidator = A.Fake <IValidator <DomainForCreation> >(); _searchLimitExcludedIdsRequestValidator = A.Fake <IValidator <EntitySearchRequest> >(); _publicDomainForCreationValidator = A.Fake <IValidator <PublicDomainForCreation> >(); _log = A.Fake <ILogger <DomainContoller> >(); _organisationalDomainProvider = A.Fake <IOrganisationalDomainProvider>(); _publisher = A.Fake <IPublisher>(); _publisherConfig = A.Fake <IPublisherConfig>(); _domainContoller = new DomainContoller(_domainDao, _userDao, _groupDao, _groupDomainDao, _idSearchablePagedRequestValidator, _idEntityIdsRequestValidator, _domainForCreationValidator, _searchLimitExcludedIdsRequestValidator, _publicDomainForCreationValidator, _log, _organisationalDomainProvider, _publisher, _publisherConfig) { ControllerContext = new ControllerContext { HttpContext = new DefaultHttpContext { User = new ClaimsPrincipal(new ClaimsIdentity()) } } }; }
public void TestInitialize() { fakeDisplay = A.Fake <IDisplay>(); fakeConfig = A.Fake <IPublisherConfig>(); A.CallTo(() => fakeConfig.FormattedMessageToSend).Returns(TestFormattedMessage); A.CallTo(() => fakeConfig.PromptMessage).Returns(TestPromptMessage); A.CallTo(() => fakeDisplay.PromptMessage(TestPromptMessage)).Returns(TestMessage); }
public PublishingTlsSecurityProfileUpdater(IPersistentTlsSecurityProfileUpdater tlsSecurityProfileUpdater, IPublisher publisher, IPublisherConfig config, ILogger log) { _tlsSecurityProfileUpdater = tlsSecurityProfileUpdater; _publisher = publisher; _config = config; _log = log; }
public PublishingDnsRecordUpdater(IDnsRecordUpdater dnsRecordUpdater, IMapper <List <RecordEntity>, DnsRecordMessage> mapper, IPublisher publisher, IPublisherConfig config) { _dnsRecordUpdater = dnsRecordUpdater; _mapper = mapper; _publisher = publisher; _config = config; }
public T Invoke(IPublisherConfig config, IDisplay display) { return(Execute(() => { var message = new IQBAssessmentMessage(); message.InputMessage = display.PromptMessage(config.PromptMessage); message.MessageToSend = string.Format(config.FormattedMessageToSend, message.InputMessage); return OnComplete(message); })); }
public bool PublishMessage <IModel>(IPublisherConfig rabbitMQPublisherConfig, IModel channel, string message) { try { var body = Encoding.Default.GetBytes(message); (channel as RabbitMQ.Client.IModel) .BasicPublish(exchange: rabbitMQPublisherConfig.ExchangeName, routingKey: rabbitMQPublisherConfig.RoutingKey, basicProperties: (rabbitMQPublisherConfig as IRabbitMQPublisherConfig).BasicProperties, body: body); return(true); } catch (Exception) { } return(false); }
public AggregateReportIpAddressesMessagePublisher(IPublisher publisher, ILogger log, IPublisherConfig config) : base(publisher, log, config.PublisherConnectionString) { }
private static void Init(IQueueConfig queueConfig, IPublisherConfig publisherConfig, IMessageChannel messageChannel) { messageChannel.Init(ConfigurationManager.AppSettings.Get("HostName"), queueConfig); }
/// <summary> /// Create service client /// </summary> /// <param name="httpClient"></param> /// <param name="config"></param> public PublisherServiceClient(IHttpClient httpClient, IPublisherConfig config) : this(httpClient, config.OpcUaPublisherServiceUrl, config.OpcUaPublisherServiceResourceId) { }
/// <summary> /// Create service client /// </summary> /// <param name="httpClient"></param> /// <param name="config"></param> /// <param name="serializer"></param> public PublisherJobServiceClient(IHttpClient httpClient, IPublisherConfig config, ISerializer serializer) : this(httpClient, config?.OpcUaPublisherServiceUrl, serializer) { }