You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Zero/ConfigurationTests/Program.cs

37 lines
1.1 KiB

using System;
using ZeroLevel;
namespace ConfigurationTests
{
class Program
{
5 years ago
static void Main(string[] args)
{
var config = Configuration.ReadSetFromIniFile("config.ini").Bind<AppConfig>();
Console.WriteLine(config.Url);
Console.WriteLine(config.BatchSize);
Console.WriteLine("Ports");
foreach (var port in config.Port)
{
Console.WriteLine($"\t{port}");
}
Console.WriteLine("Shemes");
foreach (var sheme in config.Sheme)
{
Console.WriteLine($"\t{sheme}");
}
Console.WriteLine($"Range list: {string.Join(", ", config.List)}");
Console.WriteLine("Service");
Console.WriteLine($"\tAppKey: {config.Service.AppKey}");
Console.WriteLine($"\tAppName: {config.Service.AppName}");
Console.WriteLine($"\tServiceGroup: {config.Service.ServiceGroup}");
Console.WriteLine($"\tServiceType: {config.Service.ServiceType}");
5 years ago
Console.ReadKey();
}
}
}

Powered by TurnKey Linux.