Example #1
0
        /// <summary>
        /// Returns whether or not an event with the given makeup has been recorded.
        /// </summary>
        public bool ContainsEvent(string cmdletName, string parameterSet, int errorCode = Int32.MinValue)
        {
            var expectedRecord = EventRecord.Create(cmdletName, parameterSet, errorCode);

            for (int i = 0; i < _events.Length; i++)
            {
                if (_events[i].Equals(expectedRecord))
                {
                    return(true);
                }
            }

            return(false);
        }
Example #2
0
 public void ReportFailure(string cmdletName, string parameterSet, string projectNumber, int errorCode)
 {
     Report(EventRecord.Create(cmdletName, parameterSet, projectNumber, errorCode));
 }
Example #3
0
 public void ReportSuccess(string cmdletName, string parameterSet, string projectNumber)
 {
     Report(EventRecord.Create(cmdletName, parameterSet, projectNumber, Int32.MinValue));
 }