Пример #1
0
 public UserController(ITenantService tenantService, ISessionDetails session, ISessionHelper sessionHelper, IHttpContextHelper httpContextHelper)
 {
     _session = session;
     _sessionHelper = sessionHelper;
     _httpContextHelper = httpContextHelper;
     _tenantService = tenantService;
 }
Пример #2
0
 public AdminController(ITenantService tenantService, IOrchardServices orchardServices, ShellSettings shellSettings) {
     _tenantService = tenantService;
     _thisShellSettings = shellSettings;
     
     Services = orchardServices;
     T = NullLocalizer.Instance;
 }
        public Task Invoke(HttpContext context, ITenantService service)
        {
            if (service.Tenant == null)
            {
                context.Response.StatusCode = 404;
                return CompletedTask;
            }

            return _next(context);
        }
Пример #4
0
 public HostedSolution(ConnectionStringSettings connectionString, string region)
 {
     tenantService = new DbTenantService(connectionString);
     userService = new DbUserService(connectionString);
     quotaService = new DbQuotaService(connectionString);
     tariffService = new TariffService(connectionString, quotaService, tenantService);
     clientTenantManager = new TenantManager(tenantService, quotaService, tariffService);
     Region = region ?? string.Empty;
     DbId = connectionString.Name;
 }
Пример #5
0
        public CachedTenantService(ITenantService service)
        {
            if (service == null) throw new ArgumentNullException("service");

            this.service = service;
            cache = AscCache.Default;

            CacheExpiration = TimeSpan.FromMinutes(2);
            SettingsExpiration = TimeSpan.FromMinutes(2);
        }
Пример #6
0
 public TariffService(ConnectionStringSettings connectionString, IQuotaService quotaService, ITenantService tenantService)
     : base(connectionString, "tenant")
 {
     this.quotaService = quotaService;
     this.tenantService = tenantService;
     this.config = new CoreConfiguration(tenantService);
     this.cache = AscCache.Default;
     this.CacheExpiration = DEFAULT_CACHE_EXPIRATION;
     this.test = ConfigurationManager.AppSettings["core.payment-test"] == "true";
 }
        public ClientTenantManager(ITenantService tenantService, IQuotaService quotaService, ITariffService tariffService)
        {
            this.tenantService = tenantService;
            this.quotaService = quotaService;
            this.tariffService = tariffService;

            thisCompAddresses.Add("localhost");
            thisCompAddresses.Add(Dns.GetHostName().ToLowerInvariant());
            thisCompAddresses.AddRange(Dns.GetHostAddresses("localhost").Select(a => a.ToString()));
            thisCompAddresses.AddRange(Dns.GetHostAddresses(Dns.GetHostName()).Select(a => a.ToString()));
        }
Пример #8
0
 public InstallController(IEventService eventService, IMenuService menuService, IPageService pageService, IPostService postService, ISettingService settingService, 
     IStateService stateService, ITenantService tenantService)
 {
     _eventService = eventService;
     _menuService = menuService;
     _pageService = pageService;
     _postService = postService;
     _settingService = settingService;
     _stateService = stateService;
     _tenantService = tenantService;
 }
 public MainBitTenantService(ITenantWorkContextAccessor twca,
     UrlHelper urlHelper,
     IContentManager contentManager,
     IWorkContextAccessor wca,
     ITenantService tenantService)
 {
     _twca = twca;
     _urlHelper = urlHelper;
     _contentManager = contentManager;
     _wca = wca;
     _tenantService = tenantService;
 }
 public TenantContentController(ITenantContentService tenantContentManager,
     IContentManager contentManager,
     UrlHelper urlHelper,
     IMainBitTenantService mainBitTenantService,
     ITenantService tenantService)
 {
     _tenantContentManager = tenantContentManager;
     _contentManager = contentManager;
     _urlHelper = urlHelper;
     _mainBitTenantService = mainBitTenantService;
     _tenantService = tenantService;
 }
Пример #11
0
        public AdminController(
            IOrchardServices services,
            Orchard.Recipes.Services.IRecipeManager recipeManager,
            ITenantService tenantService,
            ITenantWorkContextAccessor tenantWorkContextAccessor,
            MainBit.Recipes.Services.IRecipeManager mainBitRecipeManager,
            IRecipeEventHandler recipeEventHandler)
        {
            Services = services;
            _tenantService = tenantService;
            _tenantWorkContextAccessor = tenantWorkContextAccessor;
            _mainBitRecipeManager = mainBitRecipeManager;
            _recipeEventHandler = recipeEventHandler;

            T = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }
        public TenantContentService(ITenantWorkContextAccessor twca,
            IContentManager contentManager,
            ShellSettings shellSettings,
            UrlHelper urlHelper,
            IMainBitTenantService mainBitTenantService,
            ITenantService tenantService,
            IWorkContextAccessor wca)
        {
            _twca = twca;
            _contentManager = contentManager;
            _shellSettings = shellSettings;
            _urlHelper = urlHelper;
            _mainBitTenantService = mainBitTenantService;
            _tenantService = tenantService;
            _wca = wca;

            if (!string.IsNullOrEmpty(_shellSettings.RequestUrlPrefix))
                _urlPrefix = new UrlPrefix(_shellSettings.RequestUrlPrefix);
        }
Пример #13
0
 public AdminController(ITenantService tenantService, IFileService fileService)
 {
     _tenantService = tenantService;
     _fileService   = fileService;
 }
Пример #14
0
 public TopicService(ITopicRepository topicRepository, IPostRepository postRepository, ISettingsManager settingsManager, IModerationLogService moderationLogService, IForumService forumService, IEventPublisher eventPublisher, ISearchRepository searchRepository, IUserRepository userRepository, ISearchIndexQueueRepository searchIndexQueueRepository, ITenantService tenantService)
 {
     _topicRepository            = topicRepository;
     _postRepository             = postRepository;
     _settingsManager            = settingsManager;
     _moderationLogService       = moderationLogService;
     _forumService               = forumService;
     _eventPublisher             = eventPublisher;
     _searchRepository           = searchRepository;
     _userRepository             = userRepository;
     _searchIndexQueueRepository = searchIndexQueueRepository;
     _tenantService              = tenantService;
 }
Пример #15
0
 public TariffService(ConnectionStringSettings connectionString, IQuotaService quotaService, ITenantService tenantService)
     : base(connectionString, "tenant")
 {
     this.quotaService  = quotaService;
     this.tenantService = tenantService;
     config             = new CoreConfiguration(tenantService);
     CacheExpiration    = DEFAULT_CACHE_EXPIRATION;
     test = ConfigurationManager.AppSettings["core.payment-test"] == "true";
     int.TryParse(ConfigurationManager.AppSettings["core.payment-delay"], out paymentDelay);
 }
Пример #16
0
 public AuthController(ITenantService tenantService)
 {
     this._tenantService = tenantService;
 }
Пример #17
0
 public BillViewModel()
 {
     _billService   = Startup.AutofacContainer.Resolve <IBillService>();
     _tenantService = Startup.AutofacContainer.Resolve <ITenantService>();
 }
Пример #18
0
 public PageViewService(IMasterPageRepository masterPageRepository, IPageRepository pageRepository, ITenantService tenantService)
 {
     _masterPageRepository = masterPageRepository;
     _pageRepository       = pageRepository;
     _tenantService        = tenantService;
 }
Пример #19
0
 public HostedSolution(ConnectionStringSettings connectionString)
 {
     tenantService = new DbTenantService(connectionString);
     userService = new DbUserService(connectionString);
 }
Пример #20
0
 public CoreConfiguration(ITenantService service)
 {
     tenantService = service;
 }
Пример #21
0
 public TenantApiController(ITenantService tenantService)
     : base(tenantService)
 {
     _tenantService = tenantService;
 }
 public static ShellSettings GetTenant(this ITenantService tenantService, string tenantName)
 {
     return(tenantService.GetTenants().FirstOrDefault(t =>
                                                      string.Equals(t.Name, tenantName, StringComparison.InvariantCultureIgnoreCase)));
 }
Пример #23
0
 public TenantsController(IMapper mapper, ITenantService tenantService)
 {
     _mapper        = mapper;
     _tenantService = tenantService;
 }
Пример #24
0
 public BookController(IRepository repository, ITenantService tenantService)
 {
     _repository    = repository;
     _tenantService = tenantService;
 }
Пример #25
0
 public RetailerController(ITenantService tenantService) : base(tenantService)
 {
 }
 public ClientConfiguration(ITenantService service)
 {
     tenantService = service;
 }
Пример #27
0
 /// <summary>
 /// 注入参数及服务
 /// </summary>
 /// <param name="tenantService"></param>
 /// <param name="requestParameter"></param>
 public TenantController(ITenantService tenantService, RequestParameter requestParameter)
 {
     _tenantService = tenantService;
     _requestParameter = requestParameter;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TenantedGuidIdActiveRecordStateCoreODataControllerBase{TEntity,TDto}"/> class.
 /// </summary>
 /// <param name="diagnosticsTracingService">The diagnostics tracing service.</param>
 /// <param name="repositoryService">The repository service.</param>
 /// <param name="objectMappingService">The object mapping service.</param>
 /// <param name="secureApiMessageAttribute">The secure API message attribute.</param>
 /// <param name="principalService">The principal service.</param>
 /// <param name="tenantService">The tenant service.</param>
 protected TenantedGuidIdActiveRecordStateCoreODataControllerBase(IDiagnosticsTracingService diagnosticsTracingService, IRepositoryService repositoryService, IObjectMappingService objectMappingService, ISecureAPIMessageAttributeService secureApiMessageAttribute, IPrincipalService principalService, ITenantService tenantService) : base(diagnosticsTracingService, repositoryService, objectMappingService, secureApiMessageAttribute, principalService, tenantService)
 {
     // Base will invoke Initialize() to set base._dbContextIdentifier
 }
Пример #29
0
 public ReportController(ITenantService tenantService)
     : base(tenantService)
 {
 }
Пример #30
0
 public ReportController(ITenantService tenantService) : base(tenantService)
 {
 }
Пример #31
0
 public UsersController(ITenantService tenantService, IUserService userService) : base(tenantService, userService)
 {
 }
Пример #32
0
 public BaseController(ITenantService service)
 {
     _service = service;
 }
Пример #33
0
 public ClientConfiguration(ITenantService service)
 {
     this.tenantService      = service;
     this.configSmtpSettings = GetSmtpSettingsFromConfig();
 }
Пример #34
0
 public HomeController(ITenantService tenantService)
     : base(tenantService)
 {
 }
Пример #35
0
 public BillViewModel(IBillService billService, ITenantService tenantService)
 {
     _billService   = billService;
     _tenantService = tenantService;
 }
Пример #36
0
 public PostService(IPostRepository postRepository, IProfileRepository profileRepository, ISettingsManager settingsManager, ITopicService topicService, ITextParsingService textParsingService, IModerationLogService moderationLogService, IForumService forumService, IEventPublisher eventPublisher, IUserService userService, IFeedService feedService, ITopicRepository topicRepository, ISearchIndexQueueRepository searchIndexQueueRepository, ITenantService tenantService)
 {
     _postRepository             = postRepository;
     _profileRepository          = profileRepository;
     _settingsManager            = settingsManager;
     _topicService               = topicService;
     _textParsingService         = textParsingService;
     _moderationLogService       = moderationLogService;
     _forumService               = forumService;
     _eventPublisher             = eventPublisher;
     _userService                = userService;
     _feedService                = feedService;
     _topicRepository            = topicRepository;
     _searchIndexQueueRepository = searchIndexQueueRepository;
     _tenantService              = tenantService;
 }
Пример #37
0
 public PostMasterService(ITextParsingService textParsingService, ITopicRepository topicRepository, IPostRepository postRepository, IForumRepository forumRepository, IProfileRepository profileRepository, IEventPublisher eventPublisher, IBroker broker, ISearchIndexQueueRepository searchIndexQueueRepository, ITenantService tenantService, ISubscribedTopicsService subscribedTopicsService, IModerationLogService moderationLogService, IForumPermissionService forumPermissionService, ISettingsManager settingsManager, ITopicViewCountService topicViewCountService)
 {
     _textParsingService         = textParsingService;
     _topicRepository            = topicRepository;
     _postRepository             = postRepository;
     _forumRepository            = forumRepository;
     _profileRepository          = profileRepository;
     _eventPublisher             = eventPublisher;
     _broker                     = broker;
     _searchIndexQueueRepository = searchIndexQueueRepository;
     _tenantService              = tenantService;
     _subscribedTopicsService    = subscribedTopicsService;
     _moderationLogService       = moderationLogService;
     _forumPermissionService     = forumPermissionService;
     _settingsManager            = settingsManager;
     _topicViewCountService      = topicViewCountService;
 }
 /// <summary>
 /// Create an instance of this class.
 /// </summary>
 /// <param name="tenantResolver">Tenant resolver.</param>
 /// <param name="tenantService">Tenant service.</param>
 public TenantMiddleware(ITenantResolver <string> tenantResolver, ITenantService <string> tenantService)
 {
     _tenantResolver = tenantResolver;
     _tenantService  = tenantService;
 }
Пример #39
0
 public PlannerItemRepository(IPlannerContext context, ITenantService tenantService) : base(context, tenantService)
 {
 }
Пример #40
0
 public AccountController(ITenantService tenantService)
 {
     this.tenantService = tenantService;
 }
Пример #41
0
 public TenantsController(ITenantService tenantService, IPropertyService propertyService, IMapper mapper)
 {
     _tenantService   = tenantService;
     _propertyService = propertyService;
     _mapper          = mapper;
 }
Пример #42
0
 public RetailerApiController(IRetailerService retailerService, ITenantService tenantService)
     : base(tenantService)
 {
     _retailerService = retailerService;
 }
Пример #43
0
 public PropertyController(ITenantService tenantService, ISessionDetails sessionDetails)
 {
     _tenantService = tenantService;
     _sessionDetails = sessionDetails;
 }
Пример #44
0
 public DbContextTenantBase(DbContextOptions options, ITenantService tenantService)
     : base(options)
 {
     TenantService = tenantService;
 }
Пример #45
0
 public UserController(ITenantService tenantService)
     : base(tenantService)
 {
 }
Пример #46
0
 public DbContextTenantBase(ITenantService tenantService)
 {
     TenantService = tenantService;
 }
Пример #47
0
 public StoreController(ITenantService tenantService)
     : base(tenantService)
 {
 }
Пример #48
0
 public BaseController(ITenantService tenantService)
 {
     _tenantService = tenantService;
 }
Пример #49
0
 public SurveyApiController(ISurveyService surveyService, ITenantService tenantService)
     : base(tenantService)
 {
     _surveyService = surveyService;
 }
 private bool?_match;  // can cache because it should always be the first!
 public TenantRouteConstraint(ITenantService tenantService)
 {
     _tenantService = tenantService;
 }
Пример #51
0
 public RetailerController(ITenantService tenantService)
     : base(tenantService)
 {
 }
Пример #52
0
 public TenantController(ITenantService tenantService, ILogger <BaseController> logger) : base(logger)
 {
     TenantService = tenantService;
 }
Пример #53
0
 public ProgramApiController(IProgramService programService, ITenantService tenantService)
     : base(tenantService)
 {
     _programService = programService;
 }
Пример #54
0
 public TariffService(ConnectionStringSettings connectionString, IQuotaService quotaService, ITenantService tenantService)
     : base(connectionString, "tenant")
 {
     this.quotaService    = quotaService;
     this.tenantService   = tenantService;
     this.config          = new ClientConfiguration(tenantService);
     this.cache           = new AspCache();
     this.CacheExpiration = DEFAULT_CACHE_EXPIRATION;
     this.test            = ConfigurationManager.AppSettings["core.payment-test"] == "true";
 }
Пример #55
0
 public TenantRouteConstraint(int tenantId)
 {
     _tenantId = tenantId;
     _tenantService = DependencyResolver.Current.GetService(typeof(ITenantService)) as ITenantService;
 }
 public SystemHealthController(ITenantService tenantService, IUserService userService) : base(tenantService, userService)
 {
 }
Пример #57
0
 public AccessRouteConstraint(string accessType)
 {
     _accessService = DependencyResolver.Current.GetService(typeof(IAccessService)) as IAccessService;
     _accessType = accessType;
     _tenantService = DependencyResolver.Current.GetService(typeof(ITenantService)) as ITenantService;
 }
 public TenantRecordResolver(ITenantService tenantService)
 {
     this.tenantService = tenantService;
 }
Пример #59
0
 public TenantCommand(ITenantService tenantService) {
     _tenantService = tenantService;
 }
Пример #60
0
 public TenantController(ITenantService tenantService)
 {
     _tenantService = tenantService;
 }