Example #1
0
        public LogService(IConfiguration configuration,
                          IRepository <User> userRepository,
                          IRepository <Logwork> logRepository,
                          ISystemConfigService configService)
        {
            _configuration  = configuration;
            _logRepository  = logRepository;
            _configService  = configService;
            _userRepository = userRepository;

            var logDB    = _configuration.GetConnectionString("LogConnection");
            var logTable = "TBL_LOG_WORK";
            var options  = new ColumnOptions();

            options.Store.Add(StandardColumn.LogEvent);
            options.Store.Remove(StandardColumn.MessageTemplate);
            options.Store.Remove(StandardColumn.Properties);
            options.LogEvent.DataLength         = 2048;
            options.PrimaryKey                  = options.TimeStamp;
            options.TimeStamp.NonClusteredIndex = true;
            Log.Logger = new LoggerConfiguration()
                         .MinimumLevel.Information()
                         //.WriteTo.RollingFile("Log-{Date}.txt", retainedFileCountLimit: 2)
                         .WriteTo.MSSqlServer(connectionString: logDB, tableName: logTable, columnOptions: options, restrictedToMinimumLevel: LogEventLevel.Information)
                         .CreateLogger();
        }
Example #2
0
 public AccountController(ApplicationUserManager userManager, ApplicationSignInManager signInManager, IUserService userService, IEmailService emailService, ISystemConfigService configService)
 {
     UserManager   = userManager;
     SignInManager = signInManager;
     UserManager.UserTokenProvider = new DataProtectorTokenProvider <AppUser>(provider.Create("EmailConfirmation"));
     _userService   = userService;
     _emailService  = emailService;
     _configService = configService;
 }
Example #3
0
 public HomeController(IProductCategoryService productCategoryService,
                       ICommonService commonService, IProductService productService,
                       IBrandService brandService, ISystemConfigService systemConfigService)
 {
     _productCategoryService = productCategoryService;
     _productService         = productService;
     _commonService          = commonService;
     _brandService           = brandService;
     _systemConfigService    = systemConfigService;
 }
Example #4
0
 public HomeController(IProductService productService, ISlideService slideService, IAdvertistmentService advertistmentService,
                       IBlogService blogService, IConfiguration config, ISubcribleService subcribleService, ISystemConfigService systemConfig)
 {
     _productService       = productService;
     _slideService         = slideService;
     _advertistmentService = advertistmentService;
     _blogService          = blogService;
     _config           = config;
     _subcribleService = subcribleService;
     _systemConfig     = systemConfig;
 }
Example #5
0
 public SessionService(
     IUnitOfWork unitOfWork,
     ILogService logService,
     IRepository <User> userRepository,
     ISystemConfigService configService)
 {
     _unitOfWork     = unitOfWork;
     _logService     = logService;
     _configService  = configService;
     _userRepository = userRepository;
 }
Example #6
0
        //  private readonly IStringLocalizer<HomeController> _localizer;

        public HomeController(IProductService productService,
                              IBlogService blogService, ICommonService commonService,
                              ISystemConfigService systemConfigService,
                              IProductCategoryService productCategoryService)
        {
            _blogService            = blogService;
            _commonService          = commonService;
            _productService         = productService;
            _systemConfigService    = systemConfigService;
            _productCategoryService = productCategoryService;
            //_localizer = localizer;
        }
Example #7
0
        private SystemContext()
        {
            _usedPathRoot  = new List <string>();
            _configService = IocManagerSingle.Instance.GetPart <ISystemConfigService>(CoreExportKeys.SysConfigHelper);
            _dbService     = IocManagerSingle.Instance.GetPart <IDatabaseContext>();

            //获取默认文件夹
            SaveDefaultFolderName = _configService.GetSysConfigValueByKey("SaveDefaultFolderName");
            if (string.IsNullOrWhiteSpace(SaveDefaultFolderName))
            {
                throw new NullReferenceException("存储默认文件夹名为NULL");
            }
        }
Example #8
0
 public UserService(ILogService logService,
                    IUnitOfWork unitOfWork,
                    IEmailService emailService,
                    IConfiguration configuration,
                    IRepository <User> userRepository,
                    ISystemConfigService configService)
 {
     _logService     = logService;
     _unitOfWork     = unitOfWork;
     _emailService   = emailService;
     _configuration  = configuration;
     _configService  = configService;
     _userRepository = userRepository;
 }
Example #9
0
 public HomeController(IProductCategoryService productCatgoryService, IPostCategoryService postCategoryService,
                       IProductService productService, IPostService postService, ISlideService slideService, ITagService tagService, ISupportOnlineService supportOnline,
                       IFooterService footerService, ISystemConfigService systemConfigService)
 {
     this._productCategoryService = productCatgoryService;
     this._postCategoryService    = postCategoryService;
     this._postService            = postService;
     this._productService         = productService;
     this._slideService           = slideService;
     this._tagService             = tagService;
     this._supportOnline          = supportOnline;
     this._footerService          = footerService;
     this._systemConfigService    = systemConfigService;
 }
Example #10
0
        private SystemContext()
        {
            _usedPathRoot  = new List <string>();
            _configService = IocManagerSingle.Instance.GetPart <ISystemConfigService>(CoreExportKeys.SysConfigHelper);
            _dbService     = IocManagerSingle.Instance.GetPart <ILogicalDataContext>();
            CurCacheViews  = new XLY.SF.Framework.Core.Base.MessageBase.Navigation.NavigationCacheManager <XLY.SF.Project.ViewDomain.Model.PresentationNavigationElement.PreCacheToken>();

            //获取默认文件夹
            if (String.IsNullOrWhiteSpace(SaveDefaultFolderName))
            {
                SaveDefaultFolderName = @"XLY\SpfData";
            }
            if (string.IsNullOrWhiteSpace(SaveDefaultFolderName))
            {
                throw new NullReferenceException("存储默认文件夹名为NULL");
            }
        }
Example #11
0
 public SystemConfigController(ISystemConfigService systemConfigService, IErrorService errorService) : base(errorService)
 {
     this._systemConfigService = systemConfigService;
 }
 public CustomConfigController(ISystemConfigService systemConfigService)
 {
     _systemConfigService = systemConfigService;
 }
Example #13
0
 public SystemConfigViewComponent(ISystemConfigService systemConfigService, IMemoryCache memoryCache)
 {
     _systemConfigService = systemConfigService;
     _memoryCache         = memoryCache;
 }
 public SystemConfigServiceTest()
 {
     _systemConfigService = base.target as ISystemConfigService;
 }
Example #15
0
 public UserService(IRepository <User> userRepo, ISystemConfigService sysConfig)
 {
     _userRepo  = userRepo;
     _sysConfig = sysConfig;
 }
Example #16
0
 public SystemConfigController(ISystemConfigService systemConfigService, ISessionService sessionService)
 {
     _systemConfigService = systemConfigService;
     _sessionService      = sessionService;
 }
Example #17
0
        public static decimal GetSysConfigNumber(this IHtmlHelper helper, string key)
        {
            ISystemConfigService systemConfigService = helper.ViewContext.HttpContext.RequestServices.GetRequiredService <ISystemConfigService>();

            return(systemConfigService.GetValueNumber(key));
        }
 public SettingController(ISystemConfigService systemConfigService)
 {
     this._systemConfigService = systemConfigService;
 }
Example #19
0
 public BaseService(IServiceProvider serviceProvider)
 {
     this.serviceProvider = serviceProvider;
     systemConfigService  = (ISystemConfigService)serviceProvider.GetService(typeof(ISystemConfigService));
 }
Example #20
0
 /// <summary>
 /// 初始化系统配置控制器
 /// </summary>
 /// <param name="categoryService">系统配置分类服务</param>
 /// <param name="configService">系统配置服务</param>
 public SystemConfigController(ISystemConfigCategoryService categoryService, ISystemConfigService configService)
     : base(configService)
 {
     CategoryService = categoryService;
     ConfigService   = configService;
 }
 public SessionProvider(IRepository <User> userRepo,
                        ISystemConfigService configService)
 {
     _userRepo      = userRepo;
     _configService = configService;
 }
Example #22
0
 public InstallController(ISystemConfigService systemConfigService, IAdminUserInfoService adminUserInfoService)
 {
     _adminUserInfoService = adminUserInfoService;
     _systemConfigService  = systemConfigService;
 }
Example #23
0
 public MessageService(IDbFactory dbFactory, IUnitOfWork unitOfWork, ISystemConfigService systemConfigService) : base(dbFactory)
 {
     _unitOfWork          = unitOfWork;
     _systemConfigService = systemConfigService;
     _mapper = AutoMapperConfig.Mapper;
 }
Example #24
0
 public SystemConfigController(ISystemConfigService systemConfigService, IAuthorizationService authorizationService)
 {
     _systemConfigService  = systemConfigService;
     _authorizationService = authorizationService;
 }
Example #25
0
 public AccountController(IUserService userService, IEmailService emailService, ISystemConfigService configService)
 {
     _userService   = userService;
     _emailService  = emailService;
     _configService = configService;
 }