コード例 #1
0
 public DeviceService(
     FSSecurityContext securityContext,
     ProjectService projectService,
     ReferenceProvider referenceService,
     FsUnitOfWork db,
     DeviceModelService deviceModelService,
     IEntityIdProvider <Device, Guid> idProvider)
     : base(securityContext, referenceService, db, idProvider, deviceModelService?.MessagePipe)
 {
     _sfDb = db; // null reference checked by base class
     _deviceModelService = deviceModelService;
     _projectService     = projectService;
 }
コード例 #2
0
        /// <summary>
        ///     Creates a new instance given a set of primitive services.
        /// </summary>
        public NetworkService(
            FSSecurityContext securityContext,
            ReferenceProvider referenceProvider,
            BusinessUnitProvider businessUnitProvider,
            StakeholderService stakeholdersService,
            ProtocolService protocolService,
            DeviceModelService deviceModelService,
            DeviceService deviceService,
            DeviceConnectionService deviceConnectionService,
            ApplicationAccessService appAccessService,
            ProjectService projectService,
            FsUnitOfWork db,
            IEntityIdProvider <Network, Guid> idProvider,
            IMessagePipe messagePipe = null,
            IProvideSpecifications <Network> specProvider = null,
            EntityHandler <Network, Guid> entityHandler   = null) : base(securityContext, referenceProvider, db, idProvider, messagePipe, specProvider, entityHandler)
        {
            Guard.ArgumentNotNull(stakeholdersService, nameof(stakeholdersService));
            Guard.ArgumentNotNull(protocolService, nameof(protocolService));
            Guard.ArgumentNotNull(deviceService, nameof(deviceService));
            Guard.ArgumentNotNull(deviceConnectionService, nameof(deviceConnectionService));
            Guard.ArgumentNotNull(deviceModelService, nameof(deviceModelService));
            Guard.ArgumentNotNull(projectService, nameof(projectService));
            Guard.ArgumentNotNull(businessUnitProvider, nameof(businessUnitProvider));
            Guard.ArgumentNotNull(appAccessService, nameof(appAccessService));

            // compose device service
            // todo: dependency inject

            //setup and configure service
            _deviceService           = deviceService;
            _appAccessService        = appAccessService;
            _businessUnitService     = businessUnitProvider;
            _projectService          = projectService;
            _deviceModelService      = deviceModelService;
            _protocolService         = protocolService;
            _deviceConnectionService = deviceConnectionService;
            _stakeholderService      = stakeholdersService;

            _db = db;
        }