Beispiel #1
0
        private GrpcValueInfo CreateValueInfoAndUpdateStores(RemoteValue remoteValue)
        {
            if (remoteValue == null)
            {
                return(null);
            }

            string expressionPath;
            var    hasExpressionPath = remoteValue.GetExpressionPath(out expressionPath);
            var    valueInfo         = new GrpcValueInfo
            {
                ExpressionPath    = expressionPath ?? "",
                HasExpressionPath = hasExpressionPath,
                NumChildren       = remoteValue.GetNumChildren(),
                Summary           = remoteValue.GetSummary() ?? "",
                TypeName          = remoteValue.GetTypeName() ?? "",
                Value             = remoteValue.GetValue() ?? "",
                ValueType         = EnumUtil.ConvertTo <Debugger.Common.ValueType>(
                    remoteValue.GetValueType()),
                IsPointerType = remoteValue.TypeIsPointerType(),
                ByteSize      = remoteValue.GetByteSize(),
            };
            var typeInfo = remoteValue.GetTypeInfo();

            if (typeInfo != null)
            {
                valueInfo.Type = GrpcFactoryUtils.CreateType(
                    typeInfo, typeStore.AddObject(typeInfo));
            }
            return(valueInfo);
        }
 public virtual string FormatExpressionForAssignment(
     RemoteValue remoteValue, string expression)
 {
     if (remoteValue.GetTypeInfo().GetTypeFlags().HasFlag(TypeFlags.IS_FLOAT))
     {
         return(FloatRadixConversionHelper.TryConvertToFloatFromNumberString(
                    expression, new System.Lazy <int>(() => (int)remoteValue.GetByteSize())));
     }
     return(expression);
 }
 public ulong GetByteSize() => value.GetByteSize();