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); }
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); }); }
public Commenter(TranslationConfiguration translationConfiguration, ITypeScriptExpression expression) { TranslationConfiguration = translationConfiguration.NullToException(new ArgumentNullException(nameof(translationConfiguration))); Expression = expression.NullToException(new ArgumentNullException(nameof(expression))); }