示例#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;
        }
示例#2
0
 public ThingBuilder(IGatewayRepository gatewayRepository, IThingRepository thingRepository,
                     IThingTemplateRepository thingTemplateRepository, IThingChannelBuilder thingChannelBuilder, IMessageHub messageHub)
 {
     _gatewayRepository       = gatewayRepository;
     _thingRepository         = thingRepository;
     _thingTemplateRepository = thingTemplateRepository;
     _thingChannelBuilder     = thingChannelBuilder;
     _messageHub = messageHub;
 }
示例#3
0
 public ThingQueryService(
     IThingRepository thingRepository,
     IThingMappingService thingMappingService,
     IHttpContextUserService httpContextUserService,
     ILogger <ThingQueryService> logger)
 {
     _thingRepository        = thingRepository;
     _thingMappingService    = thingMappingService;
     _httpContextUserService = httpContextUserService;
     _logger = logger;
 }
示例#4
0
 public ThingCreatedEventHandler(
     IThingRepository thingRepository,
     IThingMappingService thingMappingService,
     IUnitOfWork unitOfWork,
     ILogger <ThingCreatedEventHandler> logger)
 {
     _thingRepository     = thingRepository;
     _thingMappingService = thingMappingService;
     _unitOfWork          = unitOfWork;
     _logger = logger;
 }
示例#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;
 }
示例#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;
 }
示例#7
0
 public CartController(IThingRepository repo, IOrderProcessor processor)
 {
     repository     = repo;
     orderProcessor = processor;
 }
示例#8
0
 public ThingCommandHandlers(IThingRepository thingRepository, ISecurityPoint securityPoint)
 {
     _thingRepository = thingRepository;
     _securityPoint   = securityPoint;
 }
示例#9
0
 public ThingController(IThingRepository repo)
 {
     repository = repo;
 }
示例#10
0
 public ThingController(IThingRepository thingRepository)
 {
     _thingRepository = thingRepository;
 }
 public ThingQueriesHandlers(IThingRepository thingRepository)
 {
     _thingRepository = thingRepository;
 }
示例#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;
 }
示例#15
0
 public ThingRepositoryCache(IThingRepository realRepository,
                             MemoryCache cache)
 {
     this.realRepository = realRepository;
     this.cache          = cache;
 }
示例#16
0
 public AdminController(IThingRepository repo)
 {
     repository = repo;
 }
示例#17
0
 public ListThingsCommand(IThingRepository thingRepository)
 {
     _thingRepository = thingRepository;
 }