示例#1
0
        public SubscriptionService(INoorTrustDbContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context", "Argument cannot be null.");
            }

            _Context = context;
        }
示例#2
0
        public Logger(IHttpContextAccessor contextAccessor, INoorTrustDbContext databaseContext, IFeatureManager featureManager)
        {
            if (contextAccessor == null)
            {
                throw new ArgumentNullException(nameof(contextAccessor), $"{nameof(contextAccessor)} is null.");
            }
            if (featureManager == null)
            {
                throw new ArgumentNullException("featureManager", "featureManager is null.");
            }
            if (databaseContext == null)
            {
                throw new ArgumentNullException("databaseContext", "databaseContext is null.");
            }

            _DatabaseContext = databaseContext;
            _FeatureManager  = featureManager;
            _ContextAccessor = contextAccessor;
        }