public static void Start(Shell cont) { _instance = cont; string path = Path.Combine(AppRootPath, "Logs"); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } Logger.Set(ProjectAssembly.GetName().Name, path); ServicePointManager.ServerCertificateValidationCallback = delegate(object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return(true); }; ServicePointManager.Expect100Continue = true; }
public static void Start(Shell cont) { App = cont; Logger.Set(ProjectAssembly.GetName().Name); AppDomain.CurrentDomain.ProcessExit += (e, s) => { App.Dispose(); }; string envName = EnvironmentName == null ? "" : "-" + EnvironmentName; Console.Title = ProjectAssembly.GetName().Name + "-v" + ProjectAssembly.GetVersionString() + envName; if (App.useTransporter) { Transporter.Start(); } if (App.useTimedJobs) { App.StartJobs(); } cont.OnReady(); }
public Shell() { ProjectAssembly = GetType().Assembly; SolutionFolder = AppDomain.CurrentDomain.BaseDirectory.GetBeforeFirst("\\" + ProjectAssembly.GetName().Name); EnvironmentName = GetEnvironmentName(); }