Exemple #1
0
        private static void InitializeDepedencyInjections()
        {
            var serviceProvider = new ServiceCollection()
                                  .AddSingleton <IAppHostSingleton, AppHostSingleton>()
                                  .BuildServiceProvider();

            _AppHostSingleton = serviceProvider.GetService <IAppHostSingleton>();
        }
        public PizzaToppingDataJson(IAppHostSingleton appHostSingleton)
        {
            _AppHostSingleton = appHostSingleton;
            _AppHostSingleton = AppHostSingleton.GetInstance();

            var HostAppConfig = _AppHostSingleton.GetConfiguration();

            PizzaToppingURL = HostAppConfig.GetSection("PizzaToppingsJsonfile").Value;
        }