public CheckStep(CheckMethodStepRecords checkStepRecords, string checkStepName)
        {
            this.m_StepBegin = DateTime.Now;

            lock (m_lockObjectForSteps)
            {
                m_CheckStepRecords = checkStepRecords;
                m_CheckStepName    = checkStepName;
                m_StepThread       = Thread.CurrentThread;
                CheckStep.m_StepDepth++;

                // Note 2 (Atomic Check aspects reflected here: Check Steps)
                // The step is tracked here for step begin.
#if DEBUG
                this.m_FailBeforeCheckStepCode =
#endif
                m_CheckStepRecords.BeginStep(checkStepName, out this.m_timeoutMS);

                // Only enable timeouts if the thread is not STA. Timeouts for steps won't work for STA
                if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA)
                {
                    TimerCallback m_TimoutCallback = this.TimeOut;
                    this.m_timeoutTimer = new Timer(m_TimoutCallback, null, this.m_timeoutMS, Timeout.Infinite /*Send only one timeout event*/);
                }

                AbortMessage = string.Empty;
            }
        }
Exemplo n.º 2
0
        public CheckRunArtifact(XDocument checkRunArtifact, CheckConstants.RunSubCheckDelegate runSubCheckDelegate = null)
        {
            m_ArtifactLockObject         = new object();
            m_CheckRunArtifact_XDocument = checkRunArtifact;

            m_CheckRunData = new CheckRunData(m_CheckRunArtifact_XDocument.Root.Element(DataStringConstants.ElementNames.CheckRunData), runSubCheckDelegate);
            this.AddCheckBeginTimeStamp(m_CheckRunArtifact_XDocument);

            m_CheckCustomData        = new CheckCustomData(m_CheckRunArtifact_XDocument.Root.Element(DataStringConstants.ElementNames.CheckCustomData));
            m_CheckFailData          = new CheckFailData(m_CheckRunArtifact_XDocument.Root.Element(DataStringConstants.ElementNames.CheckFailData));
            m_CheckMethodStepRecords = new CheckMethodStepRecords(m_CheckRunArtifact_XDocument.Root.Element(DataStringConstants.ElementNames.CompleteCheckStepInfo));
        }
Exemplo n.º 3
0
 public CheckStepRunner(CheckMethodStepRecords checkStepRecords)
 {
     m_CheckStepRecords = checkStepRecords;
 }