public void Initialize() { try { m_itmesSubsciptions = new Dictionary <string, string>(); // m_providerUserName = System.Configuration.ConfigurationManager.AppSettings.Get("UserName"); m_providerPassword = System.Configuration.ConfigurationManager.AppSettings.Get("Password"); m_ReceivedFeedBCollecion = new BlockingCollection <FeedMessage>(); // establish connecion with wcf FeedProvider Service //wcf create channel with Provider. EnableLogger = bool.Parse(System.Configuration.ConfigurationManager.AppSettings["EnableLogger"]); m_logHandler = new LogsHandler(); m_FeedcallbackHandler = new IFeedCallbackHandler(m_ReceivedFeedBCollecion, EnableLogger, m_logHandler); m_InstanceContext = new InstanceContext(m_FeedcallbackHandler); m_factory = new DuplexChannelFactory <IDataFeed>(m_InstanceContext, "netTcpBinding_Ifeed"); m_IDataFeedService = m_factory.CreateChannel(); ((ICommunicationObject)m_IDataFeedService).Closed += DataAadapter_Closed; ((ICommunicationObject)m_IDataFeedService).Faulted += DataAadapter_Faulted; ((ICommunicationObject)m_IDataFeedService).Opened += DataAadapter_Opened; m_PingTimerIntervals = Int32.Parse(System.Configuration.ConfigurationManager.AppSettings["PingTiemrIntervals"]); if (EnableLogger) { m_logHandler.StartLogging(); } m_subscirptionQueue = new ConcurrentQueue <string>(); Task.Factory.StartNew(() => { StartProcessFeed(); // sending feed to LS server. }); Task.Factory.StartNew(() => { HandleSubscriptions(); // receive subscribtion from LS server. }); } catch (Exception exp) { m_NLog.Error("Error on Constructor. Error Details : {0} ", exp.ToString()); } }
async Task ExecuteLoadItemsCommand() { if (LoadItemsIsBusy) { return; } LoadItemsIsBusy = true; try { Items.Clear(); var items = await MainTableDataStore.GetItemsAsync(true); foreach (var item in items) { Items.Add(item); } } catch (Exception ex) { LogsHandler.WriteException(ex); } finally { LoadItemsIsBusy = false; } }
public AppsController(AppStoreContext context, ClickHouseDatabase clickDB, UserManager <User> userManager, IHostEnvironment env, NotificationsHub notificationsHub) { _context = context; _userManager = userManager; _env = env; _fileHandler = new FileHandler(_env.ContentRootPath, _context); _notificationsHub = notificationsHub; _logsHandler = new LogsHandler(clickDB); }
static Repository() { try { me = new Repository(); } catch (Exception Ex) { LogsHandler.WriteException(Ex); } }
public ActionResult Index() { IndexViewModel _model = new IndexViewModel(); _model.dicProperties = new Dictionary <string, string>(); _model.dicProperties = AppSettings.VerifyProperties(); LogsHandler.LogTest(); //GitCommand.GitCommands.GitPull(); //TestJson(); return(View(_model)); }
/// <summary> /// Initializes a new instance of the Database. /// if the database doesn't exist, it will create the database and all the tables. /// </summary> /// <param name='path'> /// Path. /// </param> public Database(string path) : base(path, true, "Password") { try { LogsHandler.WriteDebug("CreateTable MainTable"); // create the tables CreateTable <DataAccessLayer.Models.Tables.MainTable>(); } catch (Exception Ex) { LogsHandler.WriteException(Ex); } }
protected Repository() { try { LogsHandler.WriteDebug("DataModel.DAL.Repository: Initiate Repository"); // set the db location dbLocation = DatabaseFilePath; // instantiate the database db = new DL.Database(dbLocation); } catch (Exception Ex) { LogsHandler.WriteException(Ex); } }
public static void Main(string[] args) { LogsHandler.ConfigureLogging(); CreateHostBuilder(args).Build().Run(); }
public static void Main(string[] args) { LogsHandler.ConfigureLogging(); RabbitMqHandler.ListenForIntegrationEvents(); CreateHost(args); }
public static void Main(string[] args) { LogsHandler.ConfigureLogging(); CreateHost(args); }
public IFeedCallbackHandler(BlockingCollection <FeedMessage> receivedFeedBCollecion, bool enableLogger, LogsHandler logsHanlder) { m_receivedFeedBCollecion = receivedFeedBCollecion; EnableLogger = enableLogger; m_logsHandler = logsHanlder; }