コード例 #1
0
ファイル: ConfigurationTest.cs プロジェクト: zhshen/HuaweiAMS
 private static void OutputChannelSettings(LiveChannelSettings settings)
 {
     foreach (LiveChannelConfigurationElement element in settings.Channels)
     {
         Console.WriteLine("Channel Name: {0}, Account Name: {1}",
             element.ChannelName, element.Name);
     }
 }
コード例 #2
0
        public static LiveChannelSettings GetConfig()
        {
            LiveChannelSettings settings = (LiveChannelSettings)ConfigurationBroker.GetSection("liveChannelSettings");

            if (settings == null)
                settings = new LiveChannelSettings();

            return settings;
        }
コード例 #3
0
        public static LiveChannelSettings GetConfig()
        {
            LiveChannelSettings settings = (LiveChannelSettings)ConfigurationBroker.GetSection("liveChannelSettings");

            if (settings == null)
            {
                settings = new LiveChannelSettings();
            }

            return(settings);
        }