Ejemplo n.º 1
0
 public DefaultRootServices()
 {
     // Use Lazy to delay the creation of objects to when a request is being processed.
     // When initializing the app thehi may throw "Request is not available in this context" from WebConfigService 
     translationRepository = new Lazy<POTranslationRepository>(() => new POTranslationRepository(new i18nSettings(new WebConfigSettingService())));
     urlLocalizer = new UrlLocalizer();
     textLocalizer = new Lazy<TextLocalizer>(() => new TextLocalizer(new i18nSettings(new WebConfigSettingService()), TranslationRepositoryForApp));
     earlyUrlLocalizer = new EarlyUrlLocalizer(urlLocalizer);
     nuggetLocalizer = new Lazy<NuggetLocalizer>(() => new NuggetLocalizer(new i18nSettings(new WebConfigSettingService()), TextLocalizerForApp));
 }
Ejemplo n.º 2
0
 public DefaultRootServices()
 {
     // Use Lazy to delay the creation of objects to when a request is being processed.
     // When initializing the app thehi may throw "Request is not available in this context" from WebConfigService
     translationRepository = new Lazy <POTranslationRepository>(() => new POTranslationRepository(new i18nSettings(new WebConfigSettingService())));
     urlLocalizer          = new UrlLocalizer();
     textLocalizer         = new Lazy <TextLocalizer>(() => new TextLocalizer(new i18nSettings(new WebConfigSettingService()), TranslationRepositoryForApp));
     earlyUrlLocalizer     = new EarlyUrlLocalizer(urlLocalizer);
     nuggetLocalizer       = new Lazy <NuggetLocalizer>(() => new NuggetLocalizer(new i18nSettings(new WebConfigSettingService()), TextLocalizerForApp));
 }
Ejemplo n.º 3
0
 public ResponseFilter(
     HttpContextBase httpContext,
     Stream outputStream,
     IEarlyUrlLocalizer earlyUrlLocalizer,
     INuggetLocalizer nuggetLocalizer)
 {
     m_httpContext       = httpContext;
     m_outputStream      = outputStream;
     m_earlyUrlLocalizer = earlyUrlLocalizer;
     m_nuggetLocalizer   = nuggetLocalizer;
 }
Ejemplo n.º 4
0
 public ResponseFilter(
     System.Web.HttpContextBase httpContext, 
     Stream outputStream,
     IEarlyUrlLocalizer earlyUrlLocalizer,
     INuggetLocalizer nuggetLocalizer)
 {
     m_httpContext = httpContext;
     m_outputStream = outputStream;
     m_earlyUrlLocalizer = earlyUrlLocalizer;
     m_nuggetLocalizer = nuggetLocalizer;
 }