コード例 #1
0
        private static void RunForMixedConfig()
        {
            Console.WriteLine(Environment.NewLine + "**************** Mixed configuration");
            MainMixedConfiguration mixedConfiguration = new MainMixedConfiguration();

            DumpConfiguration(mixedConfiguration);
        }
コード例 #2
0
        private static void DumpConfiguration(MainMixedConfiguration configuration)
        {
            Console.WriteLine();
            Console.WriteLine("#### settings from app.config ####");
            Console.WriteLine("AppString: " + configuration.MixedAppString);
            Console.WriteLine("AppBool: " + configuration.MixedAppBoolean);
            Console.WriteLine("AppDecimal: " + configuration.MixedAppDecimal);
            Console.WriteLine("AppGuid: " + configuration.MixedAppGuid);
            Console.WriteLine("AppComplex.Id: " + configuration.MixedAppComplex.Id);
            Console.WriteLine("AppComplex.Name: " + configuration.MixedAppComplex.Name);
            Console.WriteLine("AppComplex.Amount: " + configuration.MixedAppComplex.Amount);

            Console.WriteLine();
            Console.WriteLine("#### settings from config.json ####");
            Console.WriteLine("JsonString: " + configuration.MixedJsonString);
            Console.WriteLine("JsonBool: " + configuration.MixedJsonBoolean);
            Console.WriteLine("JsonDecimal: " + configuration.MixedJsonDecimal);
            Console.WriteLine("JsonGuid: " + configuration.MixedJsonGuid);
            Console.WriteLine("JsonComplex.Id: " + configuration.MixedJsonComplex.Id);
            Console.WriteLine("JsonComplex.Name: " + configuration.MixedJsonComplex.Name);
            Console.WriteLine("JsonComplex.Amount: " + configuration.MixedJsonComplex.Amount);
        }