示例#1
0
 public override ILValue Box(ILValue value, DmdType type)
 {
     if (type.IsValueType)
     {
         var dnValue    = TryGetDotNetValue(value, type, canCreateValue: true) ?? throw new InvalidOperationException();
         var boxedValue = dnValue.Box(evalInfo) ?? runtime.Box(evalInfo, dnValue);
         RecordValue(boxedValue);
         return(new BoxedValueTypeILValue(this, value, boxedValue.Value, type));
     }
     return(value);
 }