コード例 #1
0
        //================================
        // 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;
        }
コード例 #2
0
ファイル: SimplePechkin.cs プロジェクト: kylepmanuel/Pechkin
        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);
            }
        }
コード例 #3
0
ファイル: SimplePechkin.cs プロジェクト: yellowjime/Examples
        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);
            }
        }
コード例 #4
0
ファイル: SimplePechkin.cs プロジェクト: wislon/TuesPechkin
        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);
            }
        }