Exemplo n.º 1
0
        internal DkmEvaluationAsyncResult FormatAsyncResult(
            string name,
            string fullName,
            DkmClrValue value,
            DkmClrType declaredType = null,
            DkmClrCustomTypeInfo declaredTypeInfo  = null,
            DkmInspectionContext inspectionContext = null
            )
        {
            DkmEvaluationAsyncResult asyncResult = default(DkmEvaluationAsyncResult);
            var workList = new DkmWorkList();

            value.GetResult(
                workList,
                DeclaredType: declaredType ?? value.Type,
                CustomTypeInfo: declaredTypeInfo,
                InspectionContext: inspectionContext ?? DefaultInspectionContext,
                FormatSpecifiers: Formatter.NoFormatSpecifiers,
                ResultName: name,
                ResultFullName: fullName,
                CompletionRoutine: r => asyncResult = r
                );
            workList.Execute();
            return(asyncResult);
        }
 void IDkmClrResultProvider.GetResult(DkmClrValue clrValue, DkmWorkList workList, DkmClrType declaredType, DkmClrCustomTypeInfo customTypeInfo, DkmInspectionContext inspectionContext, ReadOnlyCollection <string> formatSpecifiers, string resultName, string resultFullName, DkmCompletionRoutine <DkmEvaluationAsyncResult> completionRoutine)
 {
     clrValue.GetResult(
         workList,
         declaredType,
         customTypeInfo,
         inspectionContext,
         formatSpecifiers,
         resultName,
         resultFullName,
         result =>
     {
         var type = declaredType.GetLmrType();
         if (type.IsPointer)
         {
             var r = (DkmSuccessEvaluationResult)result.Result;
             // TODO: Why aren't modopts for & properties included?
             r.GetChildren(
                 workList,
                 1,
                 inspectionContext,
                 children =>
             {
                 var c = (DkmSuccessEvaluationResult)children.InitialChildren[0];
                 r     = DkmSuccessEvaluationResult.Create(
                     c.InspectionContext,
                     c.StackFrame,
                     r.Name,
                     r.FullName,
                     c.Flags,
                     c.Value,
                     r.EditableValue,
                     r.Type,
                     r.Category,
                     r.Access,
                     r.StorageType,
                     r.TypeModifierFlags,
                     null,
                     r.CustomUIVisualizers,
                     null,
                     null);
                 completionRoutine(new DkmEvaluationAsyncResult(r));
             });
         }
         else
         {
             completionRoutine(result);
         }
     });
 }
Exemplo n.º 3
0
 public void GetResult(DkmClrValue clrValue, DkmWorkList workList, DkmClrType declaredType, DkmClrCustomTypeInfo customTypeInfo, DkmInspectionContext inspectionContext, ReadOnlyCollection <string> formatSpecifiers, string resultName, string resultFullName, DkmCompletionRoutine <DkmEvaluationAsyncResult> completionRoutine)
 {
     clrValue.GetResult(workList, declaredType, customTypeInfo, inspectionContext, formatSpecifiers, resultName, resultFullName, completionRoutine);
     return;
 }