protected override void DoCustomBindings()
 {
     ServicePointManager.ServerCertificateValidationCallback = CertificateValidation;
     Configurator.Bind <IReplaceableSerializer>().To <JsonReplaceableSerializer>().SetSingletonScope();
     Configurator.Bind <IConfigurationReader>().To <StarterkitConfigurationReader>().SetSingletonScope();//update this to add caching and other features not supported in the standard
     //override the default bindings here....
     base.DoCustomBindings();
 }
Beispiel #2
0
 /// <summary>
 /// Place your bindings here
 /// </summary>
 protected override void DoCustomBindings()
 {
     Configurator.Bind <IReplaceableSerializer>().To <JsonReplaceableSerializer>().SetSingletonScope();
     Configurator.Bind <IConfigurationReader>().To <StarterkitConfigurationReader>().SetSingletonScope();//update this to add caching and other features not supported in the standard
     Configurator.Bind <ISupportCodeGenerator>().To <SupportCodeGenerator>().SetSingletonScope();
     //override the default bindings here....
     base.DoCustomBindings();
 }
Beispiel #3
0
        private void InitializeContainer(IApplicationBuilder app)
        {
            // Add application presentation components:
            //container.RegisterMvcControllers(app);

            Configurator.Bind(container, Configuration);

            // Allow Simple Injector to resolve services from ASP.NET Core.
            container.AutoCrossWireAspNetComponents(app);
        }
Beispiel #4
0
 protected sealed override void SetDefaultBindings()
 {
     Configurator.Bind <IAppPoolRecycler>().To <AppPoolRecycler>().SetSingletonScope();
     //Setting default JsonSettings
     JsonConvert.DefaultSettings = () => new JsonSerializerSettings
     {
         NullValueHandling    = NullValueHandling.Ignore,
         DateFormatHandling   = DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling = DateTimeZoneHandling.Utc,
         Culture = CultureInfo.InvariantCulture,
     };
     Configurator.Bind <IConfigurationReader>().To <StarterkitConfigurationReader>();
     Configurator.Bind <IReplaceableSerializer>().To <ProtobufReplaceableSerializer>().SetSingletonScope();
     ServicePointManager.ServerCertificateValidationCallback = CertificateValidation;
     Bind <IUrlFormater, UrlFormater>().SetSingletonScope().AllowOverride = false;
     Configurator.Bind <IServiceTearDown>().To <DefaultServiceTearDown>().SetSingletonScope();
     Configurator.Bind <IStardustWebInitializer>().To <WebInitializer>().SetTransientScope();
 }
Beispiel #5
0
 /// <summary>Place your bindings here</summary>
 protected override void DoCustomBindings()
 {
     base.DoCustomBindings();
     Configurator.Bind <ITestApi>().To <TestApiImp>().SetTransientScope();
 }