private IParameterInformation CreateThisParameterInformation(ITypeInformation thisType) => new ParameterInformation( this, 0, "this__", thisType.IsValueType ? thisType.MakeByReference() : thisType, emptyCustomAttribute);
public override Func <IExtractContext, string[]> Apply(ITypeInformation operand, DecodeContext decodeContext) { return(LdelemConverterUtilities.Apply( elementType => operand.IsAssignableFrom(elementType), operand.MakeByReference(), true, decodeContext)); }
public override ExpressionEmitter Prepare(ITypeInformation operand, DecodeContext decodeContext) { return(LdelemConverterUtilities.Prepare( elementType => operand.IsAssignableFrom(elementType), operand.MakeByReference(), true, decodeContext)); }
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)) }); }