Esempio n. 1
0
 private IParameterInformation CreateThisParameterInformation(ITypeInformation thisType) =>
 new ParameterInformation(
     this,
     0,
     "this__",
     thisType.IsValueType ? thisType.MakeByReference() : thisType,
     emptyCustomAttribute);
Esempio n. 2
0
 public override Func <IExtractContext, string[]> Apply(ITypeInformation operand, DecodeContext decodeContext)
 {
     return(LdelemConverterUtilities.Apply(
                elementType => operand.IsAssignableFrom(elementType),
                operand.MakeByReference(),
                true,
                decodeContext));
 }
Esempio n. 3
0
 public override ExpressionEmitter Prepare(ITypeInformation operand, DecodeContext decodeContext)
 {
     return(LdelemConverterUtilities.Prepare(
                elementType => operand.IsAssignableFrom(elementType),
                operand.MakeByReference(),
                true,
                decodeContext));
 }
Esempio n. 4
0
        private static ExpressionEmitter Prepare(
            ILocalVariableInformation target, ITypeInformation targetType, DecodeContext decodeContext, bool isReference)
        {
            targetType = isReference ? targetType.MakeByReference() : targetType;

            var symbol = decodeContext.PushStack(targetType);

            return((extractContext, _) => new[] { string.Format(
                                                      "{0} = {1}{2}",
                                                      extractContext.GetSymbolName(symbol),
                                                      // NOTE: Don't check "targetType.IsByReference" instead "isReference."
                                                      //   Because it's maybe double encoded byref type.
                                                      isReference ? "&" : string.Empty,
                                                      extractContext.GetSymbolName(target)) });
        }