Data item to associate a computed raw string with a DkmClrValue.
Inheritance: DkmDataItem
Example #1
0
        internal string GetUnderlyingString(DkmClrValue value)
        {
            RawStringDataItem dataItem = value.GetDataItem <RawStringDataItem>();

            if (dataItem != null)
            {
                return(dataItem.RawString);
            }

            string underlyingString = GetUnderlyingStringImpl(value);

            dataItem = new RawStringDataItem(underlyingString);
            value.SetDataItem(DkmDataCreationDisposition.CreateNew, dataItem);
            return(underlyingString);
        }
Example #2
0
        private string GetUnderlyingString(DkmClrValue value, DkmInspectionContext inspectionContext)
        {
            RawStringDataItem dataItem = value.GetDataItem <RawStringDataItem>();

            if (dataItem != null)
            {
                return(dataItem.RawString);
            }

            string underlyingString = GetUnderlyingStringImpl(value, inspectionContext);

            dataItem = new RawStringDataItem(underlyingString);
            value.SetDataItem(DkmDataCreationDisposition.CreateNew, dataItem);
            return(underlyingString);
        }
        internal string GetUnderlyingString(DkmClrValue value, DkmInspectionContext inspectionContext)
        {
            RawStringDataItem dataItem = value.GetDataItem<RawStringDataItem>();
            if (dataItem != null)
            {
                return dataItem.RawString;
            }

            string underlyingString = GetUnderlyingStringImpl(value, inspectionContext);
            dataItem = new RawStringDataItem(underlyingString);
            value.SetDataItem(DkmDataCreationDisposition.CreateNew, dataItem);
            return underlyingString;
        }