static void Main(string[] args) { _currentDomain.ProcessExit += CurrentDomain_ProcessExit; _currentDomain.UnhandledException += ExceptionsHandler; Console.WriteLine(@"Hello! This is OnLooker App!"); try { CDbDeploy.ConnectDataBase(); CDbDeploy.Update(); var t = new Thread(Go); t.Start(); t.Join(); } catch (Exception e) { SLogger.Log.Fatal("Unexpected termination: " + e.Message); Console.WriteLine($"Error: {e.Message}\nPress any key to close application"); } finally { CDbConnection.ConnectionClose(); } Console.ReadLine(); }
public void Initialize() { CDbDeploy.ConnectDataBase(); _currencyBase = new CurrencyInfo() { Name = "Test Currency Dollar", Code = "T#1" }; _currencyBase.ID = _currencyGateway.Create(_currencyBase); _currencyGateway.Get(_currencyBase.ID); _currencyQuoted = new CurrencyInfo() { Name = "Test Currency Euro", Code = "T#2" }; _currencyQuoted.ID = _currencyGateway.Create(_currencyQuoted); _pair = new CCurrencyPair() { BaseCurrency = _currencyBase, QuotedCurrency = _currencyQuoted }; _currencyQuotedForChange = new CurrencyInfo() { Name = "Test Currency Euro", Code = "T#3" }; _currencyQuotedForChange.ID = _currencyGateway.Create(_currencyQuotedForChange); _pairChanged = new CCurrencyPair() { BaseCurrency = _currencyBase, QuotedCurrency = _currencyQuotedForChange }; }
public void Initialize() { CDbDeploy.ConnectDataBase(); _userInfoGateway = new CUserInfoGateway(); _usrLoginGateway = new CUserLoginGateway(); _user = new UserInfo() { Email = "*****@*****.**", Name = "TestName" }; _login = new UserAuthInfo() { Login = "******", Password = "******" }; }
public void Initialize() { CDbDeploy.ConnectDataBase(); _tag = new CTag() { Value = "Test tag" }; _tag2 = new CTag() { Value = "Test2 tag" }; _tag.ID = _tagGateway.Create(_tag); _tag2.ID = _tagGateway.Create(_tag2); _article = new ArticleInfo() { Content = "test string", Country = new CountryInfo() { Code = "ALA", Name = "AALAND ISLANDS ", ID = 2 }, Date = DateTime.Now, Html = new byte[0], Tags = new[] { _tag, _tag2 }, Title = "Test Title", Url = "http://testurl" }; _articleChanged = new ArticleInfo() { Content = _article.Content, Country = _article.Country, Date = _article.Date, Html = _article.Html, Tags = _article.Tags, Title = "New Test Title", Url = _article.Url }; }