static EndecaUtils() { var container = new WindsorBootstrap().Container; Log = container.Resolve <ILogger>(); EndecaConnection = new HttpENEConnection(EndecaUrl, EndecaPort); }
static void Main(string[] args) { var container = new WindsorBootstrap().Container; var builder = container.Resolve <IBuilder>(); builder.Build(args); container.Dispose(); }
static void Main(string[] args) { var runType = GetRunType(args); var container = new WindsorBootstrap(runType).Container; var builder = container.Resolve <IBuilder>(); DateTime?startTime = null; DateTime?endTime = null; builder.Build(runType, startTime, endTime); container.Dispose(); }
static void Main(string[] args) { var runType = GetRunType(args); var container = new WindsorBootstrap(runType).Container; var builder = container.Resolve <IBuilder>(); DateTime?startTime = null; DateTime?endTime = null; if (runType == RunType.OnDemand) { // TODO: get start and end dates from args } builder.Build(runType, startTime, endTime); container.Dispose(); }
static void Main(string[] args) { Task.Run(async() => { var container = WindsorBootstrap.Start(); await InitializePersistency(container); _friendsListService = container.Resolve <FriendsListService>(); _nearestFriendsService = container.Resolve <NearestFriendsService>(); bool visitAgain; do { visitAgain = await VisitFriend(); } while (visitAgain); }).GetAwaiter().GetResult(); }
static void Main(string[] args) { var runType = GetRunType(args); var container = new WindsorBootstrap(runType).Container; var builder = container.Resolve <IBuilder>(); try { if (runType == RunType.OnDemand) { ProductDataParamsObject productArgs = new ProductDataParamsObject(args); productArgs.CheckParams(); string _helptext = productArgs.GetHelpIfNeeded(); //Print help to console if requested if (!string.IsNullOrEmpty(_helptext)) { Console.WriteLine(_helptext); Environment.Exit(0); } builder.Build(runType, productArgs.StartTime, productArgs.EndTime); } else { builder.Build(runType, null, null); } } catch (Exception ex) { Console.WriteLine(ex.Message); } finally { container.Dispose(); } }