Example #1
0
        public InternetOfThings(int commandTopics        = PARTITION_DEF_COMMAND_TOPICS,
                                int commandSubscriptions = PARTITION_DEF_COMMAND_SUBSCRIPTIONS)
        {
            if (commandTopics <= 0 || _commandTopics > PARTITION_MAX_COMMAND_TOPICS)
            {
                throw new ArgumentOutOfRangeException("commandTopics");
            }

            if (commandSubscriptions <= 0 || commandSubscriptions > PARTITION_MAX_COMMAND_SUBSCRIPTIONS)
            {
                throw new ArgumentOutOfRangeException("commandSubscriptions");
            }

            _commandTopics        = commandTopics;
            _commandSubscriptions = commandSubscriptions;

            _maxDeliveryCount   = PARTITION_DEF_MAX_DELIVERY_COUNT;
            _messageTtl         = TimeSpan.FromHours(PARTITION_DEF_MESSAGE_TTL);
            _duplicateDetection = TimeSpan.FromMinutes(PARTITION_DEF_DUPLICATE_DETECTION);
            _lockDuration       = TimeSpan.FromMinutes(PARTITION_DEF_LOCK_DURATION);
            _tokenLifeTime      = TimeSpan.FromMinutes(PARTITION_SECURITY_TOKEN_LIFETIME);

            _iotRepository       = InternetOfThingsRepositoryFactory.CreateInternetOfThingsRepository();
            _partitionRepository = _iotRepository as IPartitionRepository;
            _thingRepository     = _iotRepository as IThingRepository;
        }
Example #2
0
 public ThingBuilder(IGatewayRepository gatewayRepository, IThingRepository thingRepository,
                     IThingTemplateRepository thingTemplateRepository, IThingChannelBuilder thingChannelBuilder, IMessageHub messageHub)
 {
     _gatewayRepository       = gatewayRepository;
     _thingRepository         = thingRepository;
     _thingTemplateRepository = thingTemplateRepository;
     _thingChannelBuilder     = thingChannelBuilder;
     _messageHub = messageHub;
 }
Example #3
0
 public ThingQueryService(
     IThingRepository thingRepository,
     IThingMappingService thingMappingService,
     IHttpContextUserService httpContextUserService,
     ILogger <ThingQueryService> logger)
 {
     _thingRepository        = thingRepository;
     _thingMappingService    = thingMappingService;
     _httpContextUserService = httpContextUserService;
     _logger = logger;
 }
Example #4
0
 public ThingCreatedEventHandler(
     IThingRepository thingRepository,
     IThingMappingService thingMappingService,
     IUnitOfWork unitOfWork,
     ILogger <ThingCreatedEventHandler> logger)
 {
     _thingRepository     = thingRepository;
     _thingMappingService = thingMappingService;
     _unitOfWork          = unitOfWork;
     _logger = logger;
 }
Example #5
0
 public ThingDeletedEventHandler(
     IThingRepository thingRepository,
     IThingMappingService thingMappingService,
     IUnitOfWork unitOfWork,
     IServiceScopeFactory serviceScopeFactory,
     ILogger <ThingDeletedEventHandler> logger)
 {
     _thingRepository     = thingRepository;
     _thingMappingService = thingMappingService;
     _unitOfWork          = unitOfWork;
     _serviceScopeFactory = serviceScopeFactory;
     _logger = logger;
 }
Example #6
0
 public ThingCommandService(
     IThingRepository thingRepository,
     IThingMappingService thingMappingService,
     IUserRepository userRepository,
     IHttpContextUserService httpContextUserService,
     IEventBusPublisher eventBusPublisher,
     IUnitOfWork unitOfWork,
     ILogger <ThingQueryService> logger)
 {
     _thingRepository        = thingRepository;
     _thingMappingService    = thingMappingService;
     _userRepository         = userRepository;
     _httpContextUserService = httpContextUserService;
     _eventBusPublisher      = eventBusPublisher;
     _unitOfWork             = unitOfWork;
     _logger = logger;
 }
Example #7
0
 public CartController(IThingRepository repo, IOrderProcessor processor)
 {
     repository     = repo;
     orderProcessor = processor;
 }
Example #8
0
 public ThingCommandHandlers(IThingRepository thingRepository, ISecurityPoint securityPoint)
 {
     _thingRepository = thingRepository;
     _securityPoint   = securityPoint;
 }
Example #9
0
 public ThingController(IThingRepository repo)
 {
     repository = repo;
 }
Example #10
0
 public ThingController(IThingRepository thingRepository)
 {
     _thingRepository = thingRepository;
 }
 public ThingQueriesHandlers(IThingRepository thingRepository)
 {
     _thingRepository = thingRepository;
 }
Example #12
0
 public ThingController(IThingRepository repository)
 {
     _repository = repository;
 }
 public GetThingInfoCommand(IThingRepository thingRepository)
 {
     _thingRepository = thingRepository;
 }
 public ThingsHaltStep(IGatewayRepository gatewayRepository, IThingRepository thingRepository, IThingChannelRepository thingChannelRepository)
 {
     _gatewayRepository      = gatewayRepository;
     _thingRepository        = thingRepository;
     _thingChannelRepository = thingChannelRepository;
 }
Example #15
0
 public ThingRepositoryCache(IThingRepository realRepository,
                             MemoryCache cache)
 {
     this.realRepository = realRepository;
     this.cache          = cache;
 }
Example #16
0
 public AdminController(IThingRepository repo)
 {
     repository = repo;
 }
Example #17
0
 public ListThingsCommand(IThingRepository thingRepository)
 {
     _thingRepository = thingRepository;
 }