//================================ // Constructor //================================ public Parser() { this.stateCount = 0; this.currentState = STATE_DEFAULT; this.currentOptionName = string.Empty; this.noArgOptionEvents = new Dictionary <uint, OptionEventHandler>(); this.oneArgOptionEvents = new Dictionary <uint, OptionEventHandler>(); this.nextStates = new Dictionary <string, uint>(); this.ArgumentEvent = null; this.WarningEvent = null; }
protected virtual void OnWarning(IntPtr converter, string warningText) { if (_log.IsTraceEnabled) { _log.Warn("T:" + Thread.CurrentThread.Name + " Conversion Warning: " + warningText); } WarningEventHandler handler = Warning; try { handler?.Invoke(this, warningText); } catch (Exception e) { _log.Warn("T:" + Thread.CurrentThread.Name + " Exception in Warning event handler", e); } }
protected virtual void OnWarning(IntPtr converter, string warningText) { Tracer.Warn("T:" + Thread.CurrentThread.Name + " Conversion Warning: " + warningText); WarningEventHandler handler = this.Warning; try { if (handler != null) { handler(this, warningText); } } catch (Exception e) { Tracer.Warn("T:" + Thread.CurrentThread.Name + " Exception in Warning event handler", e); } }
protected virtual void OnWarning(IntPtr converter, string warningText) { Tracer.Warn(string.Format("T:{0} Conversion Warning: {1}", Thread.CurrentThread.Name, warningText)); WarningEventHandler handler = this.Warning; try { if (handler != null) { handler(this, warningText); } } catch (Exception e) { Tracer.Warn(string.Format("T:{0} Exception in Warning event handler", Thread.CurrentThread.Name), e); } }