当前位置: 首页>>代码示例>>C#>>正文


C# DkmClrValue.GetValueString方法代码示例

本文整理汇总了C#中Microsoft.VisualStudio.Debugger.Evaluation.ClrCompilation.DkmClrValue.GetValueString方法的典型用法代码示例。如果您正苦于以下问题:C# DkmClrValue.GetValueString方法的具体用法?C# DkmClrValue.GetValueString怎么用?C# DkmClrValue.GetValueString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft.VisualStudio.Debugger.Evaluation.ClrCompilation.DkmClrValue的用法示例。


在下文中一共展示了DkmClrValue.GetValueString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TryFormatValue

        /// <summary>
        /// This method is called by the debug engine to populate the text representing the value
        /// of an expression.
        /// </summary>
        /// <param name="clrValue">The raw value to get the text for</param>
        /// <param name="inspectionContext">Context of the evaluation.  This contains options/flags
        /// to be used during compilation. It also contains the InspectionSession.  The inspection
        /// session is the object that provides lifetime management for our objects.  When the user
        /// steps or continues the process, the debug engine will dispose of the inspection session</param>
        /// <param name="formatSpecifiers"></param>
        /// <returns>The text representing the given value</returns>
        string IDkmClrFormatter.GetValueString(DkmClrValue clrValue, DkmInspectionContext inspectionContext, ReadOnlyCollection<string> formatSpecifiers)
        {
            DkmClrType clrType = clrValue.Type;
            if (clrType == null)
            {
                // This can be null in some error cases
                return string.Empty;
            }

            // Try to format the value.  If we can't format the value, delegate to the C# Formatter.
            string value = TryFormatValue(clrValue, inspectionContext);
            return value ?? clrValue.GetValueString(inspectionContext, formatSpecifiers);
        }
开发者ID:OToL,项目名称:ConcordExtensibilitySamples,代码行数:24,代码来源:IrisFormatter.cs

示例2:

 string IDkmClrFormatter.GetValueString(DkmClrValue clrValue, DkmInspectionContext inspectionContext, ReadOnlyCollection<string> formatSpecifiers)
 {
     return clrValue.GetValueString(inspectionContext, formatSpecifiers);
 }
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:4,代码来源:CustomResultProviderTests.cs

示例3: CreateRawViewRow

 private EvalResult CreateRawViewRow(
     ResultProvider resultProvider,
     DkmInspectionContext inspectionContext,
     EvalResultDataItem parent,
     DkmClrValue value)
 {
     var displayName = Resources.RawView;
     var displayValue = value.GetValueString(inspectionContext, Formatter.NoFormatSpecifiers);
     var displayType = ResultProvider.GetTypeName(
         inspectionContext,
         value,
         _typeAndInfo.ClrType,
         _typeAndInfo.Info,
         isPointerDereference: false);
     var expansion = new TupleExpansion(_typeAndInfo, _cardinality, useRawView: true);
     return new EvalResult(
         ExpansionKind.Explicit,
         displayName,
         default(TypeAndCustomInfo),
         _typeAndInfo,
         useDebuggerDisplay: false,
         value: value,
         displayValue: displayValue,
         expansion: expansion,
         childShouldParenthesize: parent.ChildShouldParenthesize,
         fullName: parent.FullNameWithoutFormatSpecifiers,
         childFullNamePrefixOpt: parent.ChildFullNamePrefix,
         formatSpecifiers: Formatter.AddFormatSpecifier(parent.FormatSpecifiers, "raw"),
         category: DkmEvaluationResultCategory.Data,
         flags: DkmEvaluationResultFlags.ReadOnly,
         editableValue: null,
         inspectionContext: inspectionContext,
         displayName: displayName,
         displayType: displayType);
 }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:35,代码来源:TupleExpansion.cs

示例4:

 string IDkmClrFormatter2.GetValueString(DkmClrValue value, DkmClrCustomTypeInfo customTypeInfo, DkmInspectionContext inspectionContext, ReadOnlyCollection<string> formatSpecifiers)
 {
     return value.GetValueString(inspectionContext, formatSpecifiers);
 }
开发者ID:Rickinio,项目名称:roslyn,代码行数:4,代码来源:Formatter.cs


注:本文中的Microsoft.VisualStudio.Debugger.Evaluation.ClrCompilation.DkmClrValue.GetValueString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。