Exemple #1
0
 protected void Application_Start()
 {
     ConfigurationManagerHelper.SetManager(new ConfigManager());
     AreaRegistration.RegisterAllAreas();
     FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
 }
        public static IServiceCollection AddVeracity(this IServiceCollection services, IConfiguration configuration, string key, out TokenProviderConfiguration tokenProviderConfiguration)
        {
            ConfigurationManagerHelper.SetManager(new NullConfig());

            var t = new TokenProviderConfiguration();

            configuration.Bind(key, t);
            tokenProviderConfiguration = t;
            return(services);
        }
        static void Main(string[] args)
        {
            ConfigurationManagerHelper.SetManager(new ConfigManager());
            Resolver.LoadModuleConfiguration <Dummy>();
            var resolver = Resolver.CreateScopedResolver();

            {
                var instance = resolver.GetService <IDummyService>();
                Console.WriteLine(instance.GetMessage());
            }
        }
 protected void Application_Start()
 {
     ConfigurationManagerHelper.SetManager(new ConfigManager());
     this.AddDependencyInjection <AppServiceConfig>();//Uses Microsoft.Extensions.DependencyInjection as the IoC container and configures the veracity sdk bindings
     AreaRegistration.RegisterAllAreas();
     GlobalConfiguration.Configure(WebApiConfig.Register);
     FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
     RouteConfig.RegisterRoutes(RouteTable.Routes);
     BundleConfig.RegisterBundles(BundleTable.Bundles);
     //ClientFactory.RegisterTokenProvider(new TokenProvider());
 }
 public static void Load()
 {
     ConfigurationManagerHelper.SetManager(new WebConfigManager());
     if (ConfigurationManager.AppSettings["disableAutoLoader"] == "true")
     {
         return;
     }
     if (AppDomain.CurrentDomain.GetAssemblies().Where(NotSystemAssembly).Any(LookForConfigurationImplementation))
     {
         //Logging.DebugMessage("IocConfig found");
     }
 }
Exemple #6
0
 static void Main(string[] args)
 {
     try
     {
         ConfigurationManagerHelper.SetManager(new DummyManager());
         B2CGlobalConfiguration.AadPolicy = "B2C_1A_SignInWithADFSIdp";
         B2CGlobalConfiguration.AadTenant = "dnvglb2ctest.onmicrosoft.com";
         B2CGlobalConfiguration.Audience  = "aa307cec-db8a-4224-8d5f-e864f16b1ad0";
         IdentityModelEventSource.ShowPII = true;
         //B2CGlobalConfiguration.AudienceV1 = "https://dnvglb2ctest.onmicrosoft.com/af7f55bc-5f35-44a7-a18a-c62ef80bdd5d";
         B2CGlobalConfiguration.AudienceV1    = "https://dnvglb2ctest.onmicrosoft.com/efb3e529-2f80-458b-aedf-7f4c8c794b45";
         B2CGlobalConfiguration.ValidIssuer   = "https://login.microsoftonline.com/ed815121-cdfa-4097-b524-e2b23cd36eb6/v2.0";
         B2CGlobalConfiguration.ValidIssuerV1 = "https://sts.windows.net/ed815121-cdfa-4097-b524-e2b23cd36eb6/";
         Console.WriteLine("Validating bearer token");
         TokenValidator.SetLogger(new ConsoleLogger());
         TokenValidator.Validate(string.Join("", args));
     }
     catch (Exception ex)
     {
         Console.WriteLine("Failed");
     }
     Console.ReadKey();
 }
Exemple #7
0
        static GremlinTests()
        {
            ConfigurationManagerHelper.SetManager(new NullManager());

            Resolver.LoadModuleConfiguration <TestBp>();
        }
Exemple #8
0
 static OAuthAuthenticationFilter()
 {
     ConfigurationManagerHelper.SetManager(new WebConfigManager());
 }
Exemple #9
0
 static Class1()
 {
     ConfigurationManagerHelper.SetManager(new Manager());
     Resolver.LoadModuleConfiguration <BlueprintBase>();
 }
 static AppBlueprint()
 {
     ConfigurationManagerHelper.SetManager(new ConfigReader());
     //var s = new StardustApiControllerActivator();
 }
Exemple #11
0
 public static IApplicationBuilder AddConfigurationManager(this IApplicationBuilder app, IDictionary <string, string> configSettings)
 {
     ConfigurationManagerHelper.SetManager(new CoreConfigurationManager(configSettings));
     return(app);
 }
Exemple #12
0
 public static IApplicationBuilder AddConfigurationManager(this IApplicationBuilder app, IConfigurationReader manager)
 {
     ConfigurationManagerHelper.SetManager(manager);
     return(app);
 }
        /// <summary>
        /// Binds the veracity related configuration settings to aspnetcore
        /// </summary>
        /// <param name="services"></param>
        /// <returns></returns>

        public static IServiceCollection AddVeracity(this IServiceCollection services, Func <IConfigurationReader> func)
        {
            ConfigurationManagerHelper.SetManager(func.Invoke());
            return(services);
        }
 /// <summary>
 /// Binds the veracity related configuration settings to aspnetcore
 /// </summary>
 /// <param name="services"></param>
 /// <returns></returns>
 public static IServiceCollection AddVeracity <T>(this IServiceCollection services) where T : IConfigurationReader, new()
 {
     ConfigurationManagerHelper.SetManager(new T());
     return(services);
 }