public static GetExplicit ( |
||
op | ||
to | ||
onlyStandard | bool | |
typeMapper | ITypeMapper | |
return |
protected internal void EmitGetHelper(Operand op, Type desiredType, bool allowExplicitConversion) { if (desiredType.IsByRef) { EmitGetHelper_Ref(op, desiredType); return; } if ((object)op == null) { if (desiredType.IsValueType) { throw new ArgumentNullException(nameof(op)); } IL.Emit(OpCodes.Ldnull); return; } EmitGetHelper_Conversion(op, desiredType, allowExplicitConversion ? Conversion.GetExplicit(op, desiredType, false, TypeMapper) : Conversion.GetImplicit(op, desiredType, false, TypeMapper)); }
internal void Convert(Operand op, Type to, bool allowExplicit) { Conversion conv = allowExplicit ? Conversion.GetExplicit(op, to, false) : Conversion.GetImplicit(op, to, false); conv.Emit(this, (object)op == null ? null : op.Type, to); }