예제 #1
0
 public SymbolNamer(
     TranslationConfiguration translationConfiguration,
     ITranslationContext translationContext)
 {
     TranslationConfiguration = translationConfiguration.NullToException(new ArgumentNullException(nameof(translationConfiguration)));
     TranslationContext       = translationContext.NullToException(new ArgumentNullException(nameof(translationContext)));
 }
        private static ITranslationConfiguration CreateTranslationConfiguration(IComponentContext context)
        {
            var configuration = context.Resolve <IConfiguration>();

            var result = new TranslationConfiguration();

            new ConfigureFromConfigurationOptions <TranslationConfiguration>(configuration.GetSection("Translation"))
            .Configure(result);

            return(result);
        }
예제 #3
0
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity <Language>(l =>
            {
                LanguageConfiguration.Configure(l);
                LanguageSeeder.Seed(l);
            });

            modelBuilder.Entity <HomePageData>(h =>
            {
                HomepageConfiguration.Configure(h);
                HomepageSeeder.Seed(h);
            });

            modelBuilder.Entity <TranslationCategory>(t =>
            {
                TranslationCategoryConfiguration.Configure(t);
                TranslationCategorySeeder.Seed(t);
            });

            modelBuilder.Entity <Token>(t =>
            {
                TokenConfiguration.Configure(t);
                TokenSeeder.Seed(t);
            });

            modelBuilder.Entity <Translation>(t =>
            {
                TranslationConfiguration.Configure(t);
                TranslationSeeder.Seed(t);
            });

            modelBuilder.Entity <ErrorCode>(e =>
            {
                ErrorCodeConfiguration.Configure(e);
                ErrorCodeSeeder.Seed(e);
            });

            modelBuilder.Entity <ErrorTranslation>(e =>
            {
                ErrorTranslationConfiguration.Configure(e);
                ErrorTranslationSeeder.Seed(e);
            });
        }
예제 #4
0
 public Commenter(TranslationConfiguration translationConfiguration, ITypeScriptExpression expression)
 {
     TranslationConfiguration = translationConfiguration.NullToException(new ArgumentNullException(nameof(translationConfiguration)));
     Expression = expression.NullToException(new ArgumentNullException(nameof(expression)));
 }