Example #1
0
 public ProvidersController(IProviderService providerService, INotificationService notificationService, ITemplateService templateService, ISysConfig config)
 {
     this._providerService = providerService;
     _notificationService = notificationService;
     _templateService = templateService;
     _config = config;
 }
Example #2
0
 public HomeController(IProductService productService, ITemplateService templateService, INotificationService notificationService, ISysConfig config, IProviderService providerService)
 {
     _productService = productService;
     _templateService = templateService;
     _notificationService = notificationService;
     _config = config;
     _providerService = providerService;
 }
Example #3
0
 public AccountController(ITemplateService templateService, INotificationService notificationService, ISysConfig config, ICartContext cartContext, IProfileService profileService, IOrderService orderService)
 {
     _templateService = templateService;
     _notificationService = notificationService;
     _config = config;
     _cartContext = cartContext;
     _profileService = profileService;
     _orderService = orderService;
 }
        private static int GetEntryPriority(ISysConfig entry)
        {
            if (entry.UserId != null)
            {
                return(3);
            }

            if (entry.ProjectId != null)
            {
                return(2);
            }

            return(1);
        }
Example #5
0
 public EmailServices(IConfiguration configuration,
                      ISysConfig sysConfig,
                      IConvocacaoService convocacaoService,
                      IProcessoService processoService,
                      IPasswordGenerator passwordGenerator,
                      IConvocadoService convocadoService
                      )
 {
     _configuration     = configuration;
     _sysConfig         = sysConfig;
     _convocacaoService = convocacaoService;
     _processoService   = processoService;
     _passwordGenerator = passwordGenerator;
     _convocadoService  = convocadoService;
 }
Example #6
0
 public CartController(ICartContext cartContext,
     IProductService productService,
     IShippingCalculatorService shippingService,
     IProfileService profileService,
     IPaymentService paymentService,
     ISysConfig config,
     IOrderService orderService, ITemplateService templateService, INotificationService notificationService)
 {
     _cartContext = cartContext;
     _productService = productService;
     _shippingService = shippingService;
     _profileService = profileService;
     _paymentService = paymentService;
     _config = config;
     _orderService = orderService;
     _templateService = templateService;
     _notificationService = notificationService;
 }
 public AccountController(
     ApplicationUserManager userManager,
     ApplicationSignInManager signInManager,
     IPrimeiroAcessoAppService primeiroAcessoAppService,
     IAdminAppService adminAppService,
     IConvocadoAppService convocadoAppService,
     IPasswordGenerator passwordGenerator,
     ISysConfig sysConfig
     )
 {
     _userManager              = userManager;
     _signInManager            = signInManager;
     _primeiroAcessoAppService = primeiroAcessoAppService;
     _adminAppService          = adminAppService;
     _convocadoAppService      = convocadoAppService;
     _passwordGenerator        = passwordGenerator;
     _sysConfig = sysConfig;
 }
Example #8
0
 public ConvocacaoController(IConvocacaoAppService convocacaoAppService,
                             IConvocadoAppService convocadoAppService,
                             ApplicationUserManager userManager,
                             IDocumentacaoAppService documentacaoAppService,
                             IProcessoAppService processoAppService,
                             IEnumDescription enumDescription,
                             ISysConfig sysConfig,
                             IConvocacaoService convocacaoService,
                             IPasswordGenerator passwordGenerator
                             )
 {
     _convocacaoAppService   = convocacaoAppService;
     _convocadoAppService    = convocadoAppService;
     _userManager            = userManager;
     _documentacaoAppService = documentacaoAppService;
     _processoAppService     = processoAppService;
     _enumDescription        = enumDescription;
     _sysConfig         = sysConfig;
     _convocacaoService = convocacaoService;
     _passwordGenerator = passwordGenerator;
 }
        private ISysConfig GetEntry(int?projectId, int?userId, IConfigEntryDefinition definition)
        {
            var allEntries = GetConfiguration().Where(i => i.Key == definition.Key).ToList();

            ISysConfig entry = null;

            foreach (var scope in definition.Scope)
            {
                switch (scope)
                {
                case ConfigEntryScope.User:
                    entry = allEntries.FirstOrDefault(i => (i.ProjectId == projectId) && (i.UserId == userId));
                    break;

                case ConfigEntryScope.Project:
                    entry = allEntries.FirstOrDefault(i => (i.UserId == null) && (i.ProjectId == projectId));
                    break;

                case ConfigEntryScope.Global:
                    entry = allEntries.FirstOrDefault(i => (i.ProjectId == null) && (i.UserId == null));
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }

                if (entry != null)
                {
                    break;
                }
            }

            if (entry == null)
            {
                m_log.Error($"Config entry {definition.Key} not found. ProjectId={projectId}, UserId={userId}");
            }

            return(entry);
        }
Example #10
0
 public FileImageService(string baseDirectory, ISysConfig config)
 {
     _baseDirectory = baseDirectory + config.ImageDatabaseFolderName;
 }
Example #11
0
 public GstTaxCalculator(ISysConfig config)
 {
     _config = config;
 }
Example #12
0
 public PaymentService(ISysConfig config)
 {
     _config = config;
 }