示例#1
0
        public void DataServiceFailure()
        {
            DataServiceFailureEvent.Fire("test", new Exception("test exception"));
            Assert.AreEqual(1, log.Entries.Count - startCount);

            string expected = "test Exception: System.Exception: test exception";
            string actual   = log.Entries[log.Entries.Count - 1].Message;

            Assert.AreEqual(expected, actual);
        }
示例#2
0
        /// <summary>
        /// <para>Publish an instrumentation event that indicates there was an error while attempting to create a provider.</para>
        /// </summary>
        /// <param name="name"><para>The name of the configuration object.</para></param>
        /// <param name="e"><para>The <see cref="Exception"/> to publish.</para></param>
        protected override void PublishFailureEvent(string name, Exception e)
        {
            string errorMsg = SR.ExceptionMessageCreateServiceFailure(name);

            DataServiceFailureEvent.Fire(errorMsg, e);
        }
示例#3
0
 private void FireDataServiceFailureEvent()
 {
     DataServiceFailureEvent.Fire(testMessage, new Exception(testMessage));
 }