コード例 #1
0
        private void OnBegin(IntPtr converter)
        {
            int expectedPhaseCount = Toolset.GetPhaseCount(converter);

            Tracer.Trace(string.Format("T:{0} Conversion started, {1} phases awaiting", Thread.CurrentThread.Name, expectedPhaseCount));

            try
            {
                if (Begin != null)
                {
                    var args = new BeginEventArgs
                    {
                        Document           = ProcessingDocument,
                        ExpectedPhaseCount = expectedPhaseCount
                    };

                    Begin(this, args);
                }
            }
            catch (Exception e)
            {
                Tracer.Warn(String.Format("T:{1} Exception in Begin event handler {0}", e, Thread.CurrentThread.Name));
            }
        }
コード例 #2
0
        private void OnBegin(IntPtr converter)
        {
            int expectedPhaseCount = Toolset.GetPhaseCount(converter);

            Tracer.Trace(string.Format("T:{0} Conversion started, {1} phases awaiting", Thread.CurrentThread.Name, expectedPhaseCount));

            try
            {
                if (Begin != null)
                {
                    var args = new BeginEventArgs
                    {
                        Document = ProcessingDocument,
                        ExpectedPhaseCount = expectedPhaseCount
                    };

                    Begin(this, args);
                }
            }
            catch (Exception e)
            {
                Tracer.Warn(String.Format("T:{1} Exception in Begin event handler {0}", e, Thread.CurrentThread.Name));
            }
        }