using System; using ZeroLevel.Services; namespace TestApp { internal static class Program { private static void Main(string[] args) { var fiber = new Fiber(); fiber .Add((s) => { Console.WriteLine("1"); s.Add("1", 1); return s; }) .Add((s) => { Console.WriteLine("2"); s.Add("2", 2); return s; }) .Add((s) => { Console.WriteLine("3"); s.Add("3", 3); return s; }) .Add((s) => { Console.WriteLine("4"); s.Add("4", 4); return s; }) .Add((s) => { Console.WriteLine("5"); s.Add("5", 5); return s; }); var result = fiber.Run(); Console.WriteLine(); Console.WriteLine("Result"); foreach (var key in result.Keys()) { Console.WriteLine($"{key}: {result.Get(key)}"); } Console.ReadKey(); /*Configuration.Save(Configuration.ReadFromApplicationConfig()); Bootstrap.Startup(args, () => Configuration.ReadSetFromIniFile("config.ini")) .EnableConsoleLog(ZeroLevel.Services.Logging.LogLevel.System | ZeroLevel.Services.Logging.LogLevel.FullDebug) //.UseDiscovery() .Run() .WaitWhileStatus(ZeroServiceStatus.Running) .Stop(); Bootstrap.Shutdown();*/ } } }