Exemple #1
0
 public TupleValueNodeProvider(bool addParens, DmdType slotType, DbgDotNetValueNodeInfo nodeInfo, TupleField[] tupleFields)
 {
     this.addParens   = addParens;
     this.slotType    = slotType;
     this.nodeInfo    = nodeInfo;
     this.tupleFields = tupleFields;
 }
Exemple #2
0
        public ArrayValueNodeProvider(DbgDotNetValueNodeProviderFactory owner, bool addParens, DmdType slotType, DbgDotNetValueNodeInfo valueInfo)
        {
            this.owner     = owner;
            this.addParens = addParens;
            this.slotType  = slotType;
            this.valueInfo = valueInfo;

            bool b = valueInfo.Value.GetArrayInfo(out arrayCount, out dimensionInfos) && dimensionInfos.Length != 0;

            Debug.Assert(b);
            if (!b)
            {
                dimensionInfos = new[] { new DbgDotNetArrayDimensionInfo(0, arrayCount) }
            }
            ;
            if (dimensionInfos.Length > 1)
            {
                indexes = new int[dimensionInfos.Length];
            }
        }
 public DbgDotNetValueNodeImpl(LanguageValueNodeFactory valueNodeFactory, DbgDotNetValueNodeProvider childNodeProvider, DbgDotNetText name, DbgDotNetValueNodeInfo nodeInfo, string expression, string imageName, bool isReadOnly, bool causesSideEffects, DmdType expectedType, DmdType actualType, string errorMessage, DbgDotNetText valueText)
 {
     if (name.Parts == null)
     {
         throw new ArgumentException();
     }
     this.valueNodeFactory  = valueNodeFactory ?? throw new ArgumentNullException(nameof(valueNodeFactory));
     this.childNodeProvider = childNodeProvider;
     this.nodeInfo          = nodeInfo;
     Name              = name;
     Value             = nodeInfo?.DisplayValue;
     Expression        = expression ?? throw new ArgumentNullException(nameof(expression));
     ImageName         = imageName ?? throw new ArgumentNullException(nameof(imageName));
     IsReadOnly        = isReadOnly;
     CausesSideEffects = causesSideEffects;
     ExpectedType      = expectedType;
     ActualType        = actualType;
     ErrorMessage      = errorMessage;
     this.valueText    = valueText;
 }
Exemple #4
0
        void Create(DbgEvaluationContext context, DbgStackFrame frame, List <DbgDotNetValueNodeProvider> providers, bool addParens, DmdType slotType, DbgDotNetValueNodeInfo nodeInfo, DbgValueNodeEvaluationOptions options, CreateFlags createFlags, CancellationToken cancellationToken)
        {
            var type = nodeInfo.Value.Type;

            if (type.IsByRef)
            {
                type = type.GetElementType();
            }
            var state = GetOrCreateTypeState(type);

            CreateCore(context, frame, providers, addParens, slotType, nodeInfo, state, options, createFlags, cancellationToken);
        }
Exemple #5
0
        public DbgDotNetValueNodeProvider Create(DbgEvaluationContext context, DbgStackFrame frame, bool addParens, DmdType slotType, DbgDotNetValueNodeInfo nodeInfo, DbgValueNodeEvaluationOptions options, CancellationToken cancellationToken)
        {
            var providers = new List <DbgDotNetValueNodeProvider>(2);

            Create(context, frame, providers, addParens, slotType, nodeInfo, options, CreateFlags.None, cancellationToken);
            return(DbgDotNetValueNodeProvider.Create(providers));
        }