示例#1
0
 public Matcher(ICoapConfig config)
 {
     _deduplicator = DeduplicatorFactory.CreateDeduplicator(config);
     if (config.UseRandomIDStart)
     {
         _currentID = new Random().Next(1 << 16);
     }
 }
示例#2
0
 public PackPackageCommand(
     IAutomaticModulePackager automaticProjectPackager,
     IFileFilterParser fileFilterParser,
     IHostPlatformDetector hostPlatformDetector,
     IDeduplicator deduplicator)
 {
     this.m_AutomaticProjectPackager = automaticProjectPackager;
     this.m_HostPlatformDetector = hostPlatformDetector;
     this.m_FileFilterParser = fileFilterParser;
     this.m_Deduplicator = deduplicator;
 }
 public PackPackageCommand(
     IAutomaticModulePackager automaticProjectPackager,
     IFileFilterParser fileFilterParser,
     IHostPlatformDetector hostPlatformDetector,
     IDeduplicator deduplicator)
 {
     this.m_AutomaticProjectPackager = automaticProjectPackager;
     this.m_HostPlatformDetector     = hostPlatformDetector;
     this.m_FileFilterParser         = fileFilterParser;
     this.m_Deduplicator             = deduplicator;
 }
示例#4
0
 public OrderProcessor(
     IResponseMessageFactory responseMessageFactory,
     ILoggerService loggerService,
     IDeduplicator deduplicator,
     IOrderOperationFactory orderOperationFactory)
 {
     _responseMessageFactory = responseMessageFactory;
     _loggerService          = loggerService;
     _deduplicator           = deduplicator;
     _orderOperationFactory  = orderOperationFactory;
 }
示例#5
0
        public Matcher(ICoapConfig config)
        {
            _deduplicator = DeduplicatorFactory.CreateDeduplicator(config);
            if (config.UseRandomIDStart)
            {
                _currentID = new Random().Next(1 << 16);
            }
            _tokenLength = config.TokenLength;

            config.PropertyChanged += PropertyChanged;
        }
        private void ExtractMaps(IEndPoint endpoint)
        {
            IMatcher matcher = ExtractField <IMatcher>(endpoint, "_matcher");

            _exchangesByID    = ExtractField <IDictionary <Exchange.KeyID, Exchange> >(matcher, "_exchangesByID");
            _exchangesByToken = ExtractField <IDictionary <Exchange.KeyToken, Exchange> >(matcher, "_exchangesByToken");
            _ongoingExchanges = ExtractField <IDictionary <Exchange.KeyUri, Exchange> >(matcher, "_ongoingExchanges");

            IDeduplicator deduplicator = ExtractField <IDeduplicator>(matcher, "_deduplicator");

            _incommingMessages = ExtractField <IDictionary <Exchange.KeyID, Exchange> >(deduplicator, "_incommingMessages");
        }
 public MeRabbitSubscriber(
     [NotNull] ILogFactory logFactory,
     [NotNull] RabbitMqSettings rabbitMqSettings,
     [NotNull] IDeduplicator deduplicator,
     IHistoryRecordsRepository historyRecordsRepository)
 {
     _logFactory               = logFactory ?? throw new ArgumentNullException(nameof(logFactory));
     _log                      = _logFactory.CreateLog(this);
     _rabbitMqSettings         = rabbitMqSettings ?? throw new ArgumentNullException(nameof(rabbitMqSettings));
     _deduplicator             = deduplicator ?? throw new ArgumentNullException(nameof(deduplicator));
     _historyRecordsRepository = historyRecordsRepository;
 }
 public LykkeTradeSubscriber(
     SubscriberSettings settings,
     ISettingsService settingsService,
     IPositionService positionService,
     IDeduplicator deduplicator,
     ILogFactory logFactory)
 {
     _settings        = settings;
     _settingsService = settingsService;
     _positionService = positionService;
     _deduplicator    = deduplicator;
     _logFactory      = logFactory;
     _log             = logFactory.CreateLog(this);
 }
 public MeRabbitSubscriber(
     [NotNull] ILogFactory logFactory,
     [NotNull] RabbitMqSettings rabbitMqSettings,
     [NotNull] ICqrsEngine cqrsEngine,
     [NotNull] IDeduplicator deduplicator,
     IReadOnlyList <string> walletIds)
 {
     _logFactory       = logFactory ?? throw new ArgumentNullException(nameof(logFactory));
     _log              = _logFactory.CreateLog(this);
     _rabbitMqSettings = rabbitMqSettings ?? throw new ArgumentNullException(nameof(rabbitMqSettings));
     _cqrsEngine       = cqrsEngine ?? throw new ArgumentNullException(nameof(cqrsEngine));
     _deduplicator     = deduplicator ?? throw new ArgumentNullException(nameof(deduplicator));
     _walletIds        = walletIds;
 }
示例#10
0
        public LykkeTradeSubscriber(
            SubscriberSettings settings,
            ISettingsService settingsService,
            IInternalTradeHandler[] internalTradeHandlers,
            IDeduplicator deduplicator,
            ILogFactory logFactory)
        {
            _settings              = settings;
            _settingsService       = settingsService;
            _internalTradeHandlers = internalTradeHandlers;
            _deduplicator          = deduplicator;
            _logFactory            = logFactory;

            _log = logFactory.CreateLog(this);
        }
示例#11
0
 public PackPackageCommand(
     IAutomaticModulePackager automaticProjectPackager,
     IFileFilterParser fileFilterParser,
     IHostPlatformDetector hostPlatformDetector,
     IDeduplicator deduplicator,
     IPackageCreator packageCreator,
     IGetRecursiveUtilitiesInPath getRecursiveUtilitiesInPath)
 {
     this.m_AutomaticProjectPackager = automaticProjectPackager;
     this.m_HostPlatformDetector = hostPlatformDetector;
     this.m_FileFilterParser = fileFilterParser;
     this.m_Deduplicator = deduplicator;
     _packageCreator = packageCreator;
     _getRecursiveUtilitiesInPath = getRecursiveUtilitiesInPath;
 }
示例#12
0
        /// <summary>
        /// Inintialize new instance of <see cref="EmailMiner"/>
        /// </summary>
        /// <param name="userConnection">User connection for data operations (search contacts, accounts).</param>
        public EmailMiner(UserConnection userConnection)
        {
            _userConnection = userConnection;
            var userConnectionConstructorArgument = new ConstructorArgument("userConnection", userConnection);

            _emailMinerService = ClassFactory.Get <IEmailMiningServiceProxy>(userConnectionConstructorArgument);
            _contactSearcher   = ClassFactory.Get <IContactSearcher>(userConnectionConstructorArgument);
            _deduplicator      = ClassFactory.Get <IDeduplicator>(userConnectionConstructorArgument);
            int actualDaysPeriod = Core.Configuration.SysSettings.GetValue(userConnection,
                                                                           IdentificationActualPeriodSysSettingsName, 1);

            _actualMinDate            = _userConnection.CurrentUser.GetCurrentDateTime().AddDays(-actualDaysPeriod);
            _enrchTextEntitySchema    = _userConnection.EntitySchemaManager.GetInstanceByName("EnrchTextEntity");
            _enrichEntitySearchHelper = new EnrichEntitySearchHelper(_userConnection);
        }
 public LykkeTradeSubscriber(
     SubscriberSettings settings,
     ISettingsService settingsService,
     ITradeService tradeService,
     ISummaryReportService summaryReportService,
     IDeduplicator deduplicator,
     ILogFactory logFactory)
 {
     _settings             = settings;
     _settingsService      = settingsService;
     _tradeService         = tradeService;
     _summaryReportService = summaryReportService;
     _deduplicator         = deduplicator;
     _logFactory           = logFactory;
     _log = logFactory.CreateLog(this);
 }
 public PackPackageCommand(
     IAutomaticModulePackager automaticProjectPackager,
     IFileFilterParser fileFilterParser,
     IHostPlatformDetector hostPlatformDetector,
     IDeduplicator deduplicator,
     IPackageCreator packageCreator,
     IGetRecursiveUtilitiesInPath getRecursiveUtilitiesInPath,
     IFeatureManager featureManager)
 {
     this.m_AutomaticProjectPackager = automaticProjectPackager;
     this.m_HostPlatformDetector     = hostPlatformDetector;
     this.m_FileFilterParser         = fileFilterParser;
     this.m_Deduplicator             = deduplicator;
     _packageCreator = packageCreator;
     _getRecursiveUtilitiesInPath = getRecursiveUtilitiesInPath;
     _featureManager = featureManager;
 }
示例#15
0
        public RabbitMqSubscriber(
            [NotNull] ILogFactory logFactory,
            [NotNull] RabbitMqSubscriptionSettings settings,
            [NotNull] IErrorHandlingStrategy errorHandlingStrategy,
            bool submitTelemetry       = true,
            IDeduplicator deduplicator = null)
        {
            if (logFactory == null)
            {
                throw new ArgumentNullException(nameof(logFactory));
            }

            _log      = logFactory.CreateLog(this);
            _settings = settings ?? throw new ArgumentNullException(nameof(settings));
            _errorHandlingStrategy = errorHandlingStrategy ?? throw new ArgumentNullException(nameof(errorHandlingStrategy));
            _submitTelemetry       = submitTelemetry;
            _exchangeQueueName     = _settings.GetQueueOrExchangeName();
        }
 public MeRabbitSubscriber(
     [NotNull] ILogFactory logFactory,
     [NotNull] RabbitMqSettings rabbitMqSettings,
     [NotNull] ICqrsEngine cqrsEngine,
     [NotNull] IDeduplicator deduplicator,
     [NotNull] ILykkeMailerliteClient lykkeMailerliteClient,
     IReadOnlyList <string> walletIds,
     bool useDeadletterExchange)
 {
     _logFactory            = logFactory ?? throw new ArgumentNullException(nameof(logFactory));
     _log                   = _logFactory.CreateLog(this);
     _rabbitMqSettings      = rabbitMqSettings ?? throw new ArgumentNullException(nameof(rabbitMqSettings));
     _cqrsEngine            = cqrsEngine ?? throw new ArgumentNullException(nameof(cqrsEngine));
     _deduplicator          = deduplicator ?? throw new ArgumentNullException(nameof(deduplicator));
     _lykkeMailerliteClient = lykkeMailerliteClient ?? throw new ArgumentNullException(nameof(lykkeMailerliteClient));
     _walletIds             = walletIds;
     _useDeadletterExchange = useDeadletterExchange;
 }
示例#17
0
 public Processor(
     IContext context,
     IOperationExecutive operationExecutive,
     ISafeMetadataProvider <TEntity> safeMetadataProvider,
     IServiceProvider <TEntity> serviceProvider,
     IMappingRepository <TEntity> mappingRepository,
     IPreprocessor <TEntity> preprocessor,
     IDeduplicator <TEntity> deduplicator,
     IHashingSerializer <TEntity> hashingSerializer,
     IGateway <TEntity> gateway,
     IEventHub <TEntity> eventHub)
 {
     this.context              = context;
     this.operationExecutive   = operationExecutive;
     this.safeMetadataProvider = safeMetadataProvider;
     this.serviceProvider      = serviceProvider;
     this.mappingRepository    = mappingRepository;
     this.preprocessor         = preprocessor;
     this.deduplicator         = deduplicator;
     this.hashingSerializer    = hashingSerializer;
     this.gateway              = gateway;
     this.eventHub             = eventHub;
 }
示例#18
0
文件: Matcher.cs 项目: vjine/CoAP.NET
 public Matcher(ICoapConfig config)
 {
     _deduplicator = DeduplicatorFactory.CreateDeduplicator(config);
     if (config.UseRandomIDStart)
         _currentID = new Random().Next(1 << 16);
 }
示例#19
0
 public PackageCreator(IDeduplicator deduplicator)
 {
     _deduplicator = deduplicator;
 }
示例#20
0
 public RabbitMqSubscriber <TTopicModel> SetDeduplicator(IDeduplicator deduplicator)
 {
     _deduplicator = deduplicator;
     return(this);
 }
示例#21
0
 public PackageCreator(IDeduplicator deduplicator)
 {
     _deduplicator = deduplicator;
 }
示例#22
0
 protected GatewayExit(IDeduplicator deduplicator)
 {
     Log    = Context.GetLogger();
     Dedupe = deduplicator;
 }