Esempio n. 1
0
 public App(string name, IEnumerable <Script> scripts, IEnumerable <Style> styles, ITranslationRepository translations)
 {
     Name         = name;
     Scripts      = scripts.ToList().AsReadOnly();
     Styles       = styles.ToList().AsReadOnly();
     Translations = translations;
 }
 public KitabController()
 {
     this.imamRepository        = new ImamRepository();
     kitabRepository            = new KitabRepository();
     chapterRepository          = new ChapterRepository();
     this.translationRepository = new TranslationRepository();
 }
Esempio n. 3
0
 public TextLocalizer(
     i18nSettings settings,
     ITranslationRepository translationRepository)
 {
     _settings = settings;
     _translationRepository = translationRepository;
 }
Esempio n. 4
0
 public TranslationService(
     IAntiForgeryValidationService antiForgeryValidationService,
     ILocalizationServiceWrapper localizationService,
     ITranslationRepository translationRepository,
     IContentTypeRepository contentTypeRepository,
     HttpRequestBase request)
 {
     if (antiForgeryValidationService == null)
     {
         throw new ArgumentNullException("antiForgeryValidationService");
     }
     if (localizationService == null)
     {
         throw new ArgumentNullException("localizationService");
     }
     if (translationRepository == null)
     {
         throw new ArgumentNullException("translationRepository");
     }
     if (request == null)
     {
         throw new ArgumentNullException("request");
     }
     _antiForgeryValidationService = antiForgeryValidationService;
     _localizationService          = localizationService;
     _translationRepository        = translationRepository;
     _contentTypeRepository        = contentTypeRepository;
     _request = request;
 }
Esempio n. 5
0
	    public TextLocalizer(
            i18nSettings settings,
            ITranslationRepository translationRepository)
	    {
            _settings = settings;
		    _translationRepository = translationRepository;
	    }
 public TranslationManager(
     IConfigurationService configurationService,
     ITranslationRepository translationRepository)
 {
     _configurationService  = configurationService;
     _translationRepository = translationRepository;
 }
Esempio n. 7
0
        public ColorQuery(IColorRepository colorRepository, ITranslationRepository translationRepository)
        {
            Field <TranslationType>(
                "translation",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <IntGraphType> > {
                Name = "id", Description = "Category id"
            }
                    ),
                resolve: context => translationRepository.GetTranslationAsync(context.GetArgument <int>("id")).Result
                );

            Field <ColorType>(
                "color",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <IntGraphType> > {
                Name = "id", Description = "Product id"
            }
                    ),
                resolve: context => colorRepository.GetColorAsync(context.GetArgument <int>("id")).Result
                );
            Field <ListGraphType <ColorType> >(
                "colors",
                resolve: context => colorRepository.ColorsAsync()
                );
        }
 public TranslationService(ILanguageService languageService, IProjectService projectService, ITranslationCache cache, ITranslationRepository repository)
 {
     _languageService = languageService;
     _projectService  = projectService;
     _cache           = cache;
     _repository      = repository;
 }
 public MetadataResultBuilder(
     IOptions <OAuthHostOptions> options,
     ITranslationRepository translationRepository)
 {
     _options = options.Value;
     _translationRepository = translationRepository;
     _dic = new Dictionary <string, Type>();
 }
Esempio n. 10
0
 public MetadataResultBuilder(
     IOptions <SimpleIdServerCommonOptions> options,
     ITranslationRepository translationRepository)
 {
     _options = options.Value;
     _translationRepository = translationRepository;
     _dic = new Dictionary <string, Type>();
 }
Esempio n. 11
0
 //
 // GET: /Word/
 public WordController(IAuthService authService, IWordRepository wordRepository, IAccountRepository accountRepository, ILanguageInfosRepository languageInfosRepository, IDictionaryRepository dictionaryRepository, ITranslationRepository translationRepository)
 {
     _authService = authService;
     _wordRepository = wordRepository;
     _accountRepository = accountRepository;
     _dictionaryRepository = dictionaryRepository;
     _translationRepository = translationRepository;
     _languageInfosRepository = languageInfosRepository;
 }
Esempio n. 12
0
 public TranslationPresentation(ITranslationRepository translationRepository, IMapper mapper, ITvProgrammeRepository programmeRepository,
                                ITvScheduleRepository scheduleRepository, IUserService userService)
 {
     _translationRepository = translationRepository;
     _mapper = mapper;
     _programmeRepository = programmeRepository;
     _scheduleRepository  = scheduleRepository;
     _userService         = userService;
 }
Esempio n. 13
0
 public App(string id, Component component, IEnumerable <Script> scripts, IEnumerable <Style> styles, IEnumerable <Resource> resources, ITranslationRepository translations)
 {
     Id           = id;
     Component    = component;
     Scripts      = scripts.ToList().AsReadOnly();
     Styles       = styles.ToList().AsReadOnly();
     Resources    = resources.ToList().AsReadOnly();
     Translations = translations;
 }
 public TranslateQueryHandler(IOptions <AppSettings> settings, ITranslateService translateSvc, ITranslationRepository translateRepo,
                              IUnitOfWork uow, IIdentityService identitySvc)
 {
     _settings      = settings;
     _translateSvc  = translateSvc;
     _translateRepo = translateRepo;
     _uow           = uow;
     _identitySvc   = identitySvc;
 }
Esempio n. 15
0
        public ColorType(ITranslationRepository repo)
        {
            Field(x => x.Id).Description("Color id.");
            Field(x => x.Rgb, nullable: true).Description("RGB code.");

            Field <ListGraphType <TranslationType> >(
                "translations",
                resolve: context => repo.GetTranslationsByColor(context.Source.Id).Result
                );
        }
 public LocalizationServiceDecorator(
     ILocalizationServiceWrapper inner,
     IContentLanguageWrapper contentLanguage,
     ITranslationRepository translationRepository)
 {
     if (inner == null) throw new ArgumentNullException("inner");
     if (contentLanguage == null) throw new ArgumentNullException("contentLanguage");
     if (translationRepository == null) throw new ArgumentNullException("translationRepository");
     _inner = inner;
     _contentLanguage = contentLanguage;
     _translationRepository = translationRepository;
 }
Esempio n. 17
0
        public void Translations_ShouldLazyLoadRepository()
        {
            // Arrange
            IUnitOfWork unitOfWork = new UnitOfWork(null);

            // Act
            ITranslationRepository firstRepository  = unitOfWork.Translations;
            ITranslationRepository secondRepository = unitOfWork.Translations;

            // Assert
            Assert.NotNull(firstRepository);
            Assert.NotNull(secondRepository);
            Assert.Equal(firstRepository, secondRepository);
        }
Esempio n. 18
0
        public PhotosController(ITranslationRepository repo, IMapper mapper, IOptions <CloudinarySettings> cloudinaryConfig)
        {
            _cloudinaryConfig = cloudinaryConfig;
            _mapper           = mapper;
            _repo             = repo;

            Account acc = new Account(
                _cloudinaryConfig.Value.CloudName,
                _cloudinaryConfig.Value.ApiKey,
                _cloudinaryConfig.Value.ApiSecret
                );

            _cloudinary = new Cloudinary(acc);
        }
Esempio n. 19
0
 public TranslationService(
     IAntiForgeryValidationService antiForgeryValidationService,
     ILocalizationServiceWrapper localizationService,
     ITranslationRepository translationRepository,
     IContentTypeRepository contentTypeRepository,
     HttpRequestBase request)
 {
     if (antiForgeryValidationService == null) throw new ArgumentNullException("antiForgeryValidationService");
     if (localizationService == null) throw new ArgumentNullException("localizationService");
     if (translationRepository == null) throw new ArgumentNullException("translationRepository");
     if (request == null) throw new ArgumentNullException("request");
     _antiForgeryValidationService = antiForgeryValidationService;
     _localizationService = localizationService;
     _translationRepository = translationRepository;
     _contentTypeRepository = contentTypeRepository;
     _request = request;
 }
Esempio n. 20
0
        public ColorMutation(IColorRepository colorRepository, ITranslationRepository translationRepository)
        {
            Name = "Mutation";

            Field <ColorType>(
                "create",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <ColorType> > {
                Name = "color"
            }
                    ),
                resolve: context =>
            {
                var color = context.GetArgument <Color>("color");
                return(colorRepository.Add(color));
            });
        }
Esempio n. 21
0
 public LocalizationServiceDecorator(
     ILocalizationServiceWrapper inner,
     IContentLanguageWrapper contentLanguage,
     ITranslationRepository translationRepository)
 {
     if (inner == null)
     {
         throw new ArgumentNullException("inner");
     }
     if (contentLanguage == null)
     {
         throw new ArgumentNullException("contentLanguage");
     }
     if (translationRepository == null)
     {
         throw new ArgumentNullException("translationRepository");
     }
     _inner                 = inner;
     _contentLanguage       = contentLanguage;
     _translationRepository = translationRepository;
 }
 public TranslationsController(ITranslationRepository translationRepository)
 {
     this.translationRepository = translationRepository;
 }
 public TranslationService(ITranslationRepository translationRepository)
 {
     this.translationRepository = translationRepository;
 }
Esempio n. 24
0
 public TranslationService(ITranslationRepository TranslationRepository)
 {
     _TranslationRepository = TranslationRepository;
 }
Esempio n. 25
0
 public Handler(ITranslationRepository translationRepo)
 {
     _translationRepo = translationRepo;
 }
Esempio n. 26
0
 public UsersController(ITranslationRepository repo, IMapper mapper)
 {
     _mapper = mapper;
     _repo   = repo;
 }
Esempio n. 27
0
 public TranslationMerger(ITranslationRepository repository)
 {
     _repository = repository;
 }
Esempio n. 28
0
 public TranslationService(ITranslationRepository translationRepository, ITranslationLogRepository logRepository, IMemberService memberService)
 {
     this.translationRepository = translationRepository;
     this.logRepository         = logRepository;
     this.memberService         = memberService;
 }
 public HistoryController(ITranslationRepository translationRepository)
 {
     _translationRepository = translationRepository;
 }
Esempio n. 30
0
 public ArticleController(IArticleRepository articleRepository,
                                     ITranslationRepository translationRepository)
 {
     this.articleRepository = articleRepository;
     this.translationRepository = translationRepository;
 }
Esempio n. 31
0
 public TranslationMerger(ITranslationRepository repository)
 {
     _repository = repository;
 }
Esempio n. 32
0
 public TranslationService(ITranslationRepository repository)
 {
     _repository = repository;
 }
Esempio n. 33
0
 public ShakespeareTranslationService(ITranslationRepository translationRepository)
 {
     _translationRepository = translationRepository;
 }
Esempio n. 34
0
 public TranslationMethods(ITranslationRepository TranslationRepository, ILanguageRepository LanguageRepository)
 {
     _repLanguage    = LanguageRepository;
     _repTranslation = TranslationRepository;
 }
Esempio n. 35
0
 public TranslationController(ITranslationRepository TranslationRepository, ILanguageRepository LanguageRepository)
 {
     _repLanguage    = LanguageRepository;
     _repTranslation = TranslationRepository;
 }
Esempio n. 36
0
 public MockVideoController(ITranslationRepository repo)
 {
     translationTestRepo = repo;
 }
Esempio n. 37
0
 public ChecklistsService()
 {
     _checklistRepo   = new ChecklistRepository();
     _itemRepo        = new ItemRepository();
     _translationRepo = new TranslationRepository();
 }
Esempio n. 38
0
 public ExportService(ITranslationRepository repository)
 {
     _repository = repository;
 }