RefineInnerStackTrace() публичный Метод

public RefineInnerStackTrace ( string stack ) : void
stack string
Результат void
Пример #1
0
        public void FxCopLogReader_Context_RefineInnerStackTrace()
        {
            FxCopLogReader.Context context = TestHelper.CreateProjectContext();

            context.RefineInnerStackTrace(@"myinnertrace");
            Assert.Equal(@"myinnertrace", context.InnerStackTrace);
        }
Пример #2
0
        public void FxCopLogReader_Context_RefineProjectToExceptionIssue()
        {
            FxCopLogReader.Context context = TestHelper.CreateProjectContext();

            context.RefineException(true, "CA0001", "binary.dll#namespace#member(string)");
            context.RefineExceptionType("type");
            context.RefineExceptionMessage("message");
            context.RefineStackTrace("trace");
            context.RefineInnerExceptionType("innertype");
            context.RefineInnerExceptionMessage("innermessage");
            context.RefineInnerStackTrace("innertrace");

            string exception = FxCopLogReader.MakeExceptionMessage("Rule", "CA1000", context.ExceptionType, context.ExceptionMessage, context.StackTrace, context.InnerExceptionType, context.InnerExceptionMessage, context.InnerStackTrace);

            context.RefineIssue(exception, null, null, null, null, null, null);

            Assert.Equal("Rule CA1000 exception: type: message trace. Inner Exception: innertype: innermessage innertrace", context.Message);
            Assert.Equal("binary.dll#namespace#member(string)", context.ExceptionTarget);

            context.ClearException();
            Assert.Null(context.Target);
            Assert.Null(context.Module);
            Assert.Null(context.Namespace);
            Assert.Null(context.Type);
            Assert.Null(context.Member);
            Assert.Null(context.Message);
            Assert.Null(context.ResolutionName);

            Assert.False(context.Exception);
            Assert.Null(context.ExceptionType);
            Assert.Null(context.ExceptionMessage);
            Assert.Null(context.StackTrace);
            Assert.Null(context.InnerExceptionType);
            Assert.Null(context.InnerExceptionMessage);
            Assert.Null(context.InnerStackTrace);
        }