コード例 #1
0
        private static void EvaluateDebuggerDisplayStringAndContinue(
            DkmClrValue value,
            DkmWorkList workList,
            DkmInspectionContext inspectionContext,
            DkmClrType targetType,
            string str,
            CompletionRoutine <DkmEvaluateDebuggerDisplayStringAsyncResult> onCompleted,
            CompletionRoutine <Exception> onException)
        {
            DkmCompletionRoutine <DkmEvaluateDebuggerDisplayStringAsyncResult> completionRoutine =
                result =>
            {
                try
                {
                    onCompleted(result);
                }
                catch (Exception e)
                {
                    onException(e);
                }
            };

            if (str == null)
            {
                completionRoutine(default(DkmEvaluateDebuggerDisplayStringAsyncResult));
            }
            else
            {
                value.EvaluateDebuggerDisplayString(workList, inspectionContext, targetType, str, completionRoutine);
            }
        }
コード例 #2
0
        private static void EvaluateDebuggerDisplayStringAndContinue(
            DkmClrValue value,
            WorkList workList,
            DkmInspectionContext inspectionContext,
            DkmClrType targetType,
            string str,
            CompletionRoutine <DkmEvaluateDebuggerDisplayStringAsyncResult> onCompleted,
            CompletionRoutine <Exception> onException)
        {
            DkmCompletionRoutine <DkmEvaluateDebuggerDisplayStringAsyncResult> completionRoutine =
                result =>
            {
                try
                {
                    onCompleted(result);
                }
                catch (Exception e) when(ExpressionEvaluatorFatalError.ReportNonFatalException(e, DkmComponentManager.ReportCurrentNonFatalException))
                {
                    onException(e);
                }
            };

            if (str == null)
            {
                completionRoutine(default(DkmEvaluateDebuggerDisplayStringAsyncResult));
            }
            else
            {
                value.EvaluateDebuggerDisplayString(workList.InnerWorkList, inspectionContext, targetType, str, completionRoutine);
            }
        }
コード例 #3
0
 internal static void EvaluateDebuggerDisplayStringAndContinue(this DkmClrValue value, DkmWorkList workList, DkmInspectionContext inspectionContext, DkmClrType targetType, string str, DkmCompletionRoutine <DkmEvaluateDebuggerDisplayStringAsyncResult> completionRoutine)
 {
     if (str == null)
     {
         completionRoutine(default(DkmEvaluateDebuggerDisplayStringAsyncResult));
     }
     else
     {
         value.EvaluateDebuggerDisplayString(workList, inspectionContext, targetType, str, completionRoutine);
     }
 }
コード例 #4
0
ファイル: TypeHelpers.cs プロジェクト: wenmingcai/roslyn-1
 private static string EvaluateDebuggerDisplayString(DkmClrValue value, string str)
 {
     return(str == null ? null : value.EvaluateDebuggerDisplayString(str));
 }