Beispiel #1
0
        internal DbgDotNetValue GetDefaultValue(DmdType type)
        {
            if (!type.IsValueType)
            {
                return(new SyntheticNullValue(type));
            }
            var dnValue = TryCreateDefaultValue(type);

            if (dnValue != null)
            {
                return(dnValue);
            }
            if (!canFuncEval)
            {
                throw new InterpreterMessageException(PredefinedEvaluationErrorMessages.FuncEvalDisabled);
            }
            return(RecordValue(runtime.CreateInstanceNoConstructor(context, frame, type, cancellationToken)));
        }
Beispiel #2
0
        public override ILValue CreateTypeNoConstructor(DmdType type)
        {
            var res = runtime.CreateInstanceNoConstructor(context, frame, type, cancellationToken);

            return(CreateILValue(res));
        }
Beispiel #3
0
		public override ILValue CreateTypeNoConstructor(DmdType type) {
			if (!canFuncEval)
				throw new InterpreterMessageException(PredefinedEvaluationErrorMessages.FuncEvalDisabled);
			var res = runtime.CreateInstanceNoConstructor(context, frame, type, cancellationToken);
			return CreateILValue(res);
		}