private void RaiseSessionStatusChangedAndTrace(MeterSessionStatus sessionStatus, string message)
 {
     sessionTracer.AppendLine(message);
     SessionStatusChanged?.Invoke(this, new SessionStatusChangedEventArgs()
     {
         SessionStatus = sessionStatus, CurrentSessionTrace = sessionTracer.ToString()
     });
 }
示例#2
0
        private void Session_SessionStatusChanged(object sender, SessionStatusEventArgs e)
        {
            var sse = convertO2GSessionStatusCodeToSessionStatusEnum(e.SessionStatus);

            SessionStatusChanged?.Invoke(this, new SessionStatusChangedEventArgs()
            {
                SessionStatus = sse
            });
        }
示例#3
0
        public DataManager(IDataProvider dataProvider, IDataBase dataBase)
        {
            this.dataProvider = dataProvider;
            repository        = dataBase;

            dataProvider.SessionStatusChanged += (object sender, SessionStatusChangedEventArgs e) =>
                                                 SessionStatusChanged?.Invoke(sender, e);
            dataProvider.RealTimeDataUpdated += (object sender, RealTimeDataUpdatedEventArgs e) =>
                                                RealTimeDataUpdated?.Invoke(sender, e);
        }
示例#4
0
 public void OnSessionStatusChanged(bool started, Exception e)
 {
     SessionStatusChanged?.Invoke(_accountID, started, e);
 }
示例#5
0
 protected void OnSessionStatusChanged(SessionStatusChangedEventArgs args)
 {
     SessionStatusChanged?.Invoke(this, args);
 }