public SampleManager(ISampleRepo sampleRepo, ISampleMediaRepo sampleMediaRepo, ISampleLabelRepo sampleLabelRepo, ILabelSampleRepo labelSampleRepo, ILabelRepo repo, ILogger logger, IAppConfig appConfig, IDependencyManager dependencyManager, ISecurity security) : base(logger, appConfig, dependencyManager, security) { this._sampleMediaRepo = sampleMediaRepo ?? throw new NullReferenceException(nameof(sampleMediaRepo)); this._sampleRepo = sampleRepo ?? throw new NullReferenceException(nameof(sampleRepo)); this._labelRepo = repo ?? throw new NullReferenceException(nameof(repo)); this._sampleLabelRepo = sampleLabelRepo ?? throw new NullReferenceException(nameof(sampleLabelRepo)); this._labelSampleRepo = labelSampleRepo ?? throw new NullReferenceException(nameof(labelSampleRepo)); }
/// <summary> /// Initializes a new instance of the <see cref="Query"/> class. /// </summary> /// <param name="labelRepo">The label repo.</param> /// <param name="toDoItemRepo">To do item repo.</param> /// <param name="toDoListRepo">To do list repo.</param> /// <param name="userRepo">The user repo.</param> /// <param name="httpContextAccessor">The HTTP context accessor.</param> public Query([Service] ILabelRepo labelRepo, [Service] IToDoItemRepo toDoItemRepo, [Service] IToDoListRepo toDoListRepo, [Service] IUserRepo userRepo, IHttpContextAccessor httpContextAccessor) { _labelRepo = labelRepo; _toDoItemRepo = toDoItemRepo; _toDoListRepo = toDoListRepo; _userRepo = userRepo; if (httpContextAccessor.HttpContext.Items["UserId"] != null) { _userId = int.Parse(httpContextAccessor.HttpContext.Items["UserId"].ToString()); } }
/// <summary> /// Initializes a new instance of the <see cref="Mutation"/> class. /// </summary> /// <param name="labelRepo">The label repo.</param> /// <param name="toDoItemRepo">To do item repo.</param> /// <param name="toDoListRepo">To do list repo.</param> /// <param name="userRepo">The user repo.</param> /// <param name="httpContextAccessor">The HTTP context accessor.</param> /// <param name="tokenConfig">The token configuration.</param> public Mutation([Service] ILabelRepo labelRepo, [Service] IToDoItemRepo toDoItemRepo, [Service] IToDoListRepo toDoListRepo, [Service] IUserRepo userRepo, IHttpContextAccessor httpContextAccessor, IOptions <JwtTokenConfig> tokenConfig) { _labelRepo = labelRepo; _toDoItemRepo = toDoItemRepo; _toDoListRepo = toDoListRepo; _userRepo = userRepo; _tokenConfig = tokenConfig.Value; if (httpContextAccessor.HttpContext.Items["UserId"] != null) { _userId = int.Parse(httpContextAccessor.HttpContext.Items["UserId"].ToString()); } }
public LabelManager(ILabelRepo labelRepo, IAdminLogger logger, IAppConfig appConfig, IDependencyManager dependencyManager, ISecurity security) : base(logger, appConfig, dependencyManager, security) { _repo = labelRepo ?? throw new NullReferenceException(nameof(labelRepo)); }
public LabelManager(ILabelRepo labelRepo, ILabeledEntityRepo labeledEntityRepo, ILogger logger, IAppConfig appConfig, IDependencyManager dependencyManager, ISecurity security) : base(logger, appConfig, dependencyManager, security) { _labelRepo = labelRepo ?? throw new ArgumentNullException(nameof(labelRepo)); _labeledEntityRepo = labeledEntityRepo ?? throw new ArgumentNullException(nameof(labeledEntityRepo)); }
/// <summary> /// Initializes a new instance of the <see cref="LabelService"/> class. /// </summary> /// <param name="labelRepository">The label repository.</param> /// <param name="mapper">The mapper.</param> public LabelService(ILabelRepo labelRepository, IMapper mapper) { this._labelRepository = labelRepository; this._mapper = mapper; }
public LabelManager(ILabelRepo labelRepo) { this.labelRepo = labelRepo; }