public override Void AppendName(StringBuilder sb, ByRefType type, FormatOptions options) { AppendName(sb, type.ParameterType, options); sb.Append('&'); return(Void.Value); }
private void InitializeByRef(Cts.ByRefType entity, TypeSpecification record) { record.Signature = new ByReferenceSignature { Type = HandleType(entity.ParameterType) }; }
public string FormatName(ByRefType type) { StringBuilder sb = new StringBuilder(); AppendName(sb, type); return(sb.ToString()); }
public override IAssemblyDesc AppendName(StringBuilder sb, ByRefType type, bool assemblyQualify) { IAssemblyDesc homeAssembly = AppendName(sb, type.ParameterType, false); sb.Append('&'); if (assemblyQualify) { AppendAssemblyName(sb, homeAssembly); } return(homeAssembly); }
/// <summary> /// Marshals a ByRef. Expects the ByRef on the stack. Pushes a pinned /// unmanaged pointer to the stack. /// </summary> /// <returns>Type the ByRef was marshalled into.</returns> private TypeDesc EmitByRefMarshalling(ByRefType byRefType) { ILLocalVariable vPinnedByRef = _emitter.NewLocal(byRefType, true); _marshallingCodeStream.EmitStLoc(vPinnedByRef); _marshallingCodeStream.EmitLdLoc(vPinnedByRef); _marshallingCodeStream.Emit(ILOpcode.conv_i); return _context.GetWellKnownType(WellKnownType.IntPtr); }
public abstract void AppendName(StringBuilder sb, ByRefType type);
public override void AppendName(StringBuilder sb, ByRefType type) { FormatName(type.ParameterType); sb.Append(" ByRef"); }
public override void AppendName(StringBuilder sb, ByRefType type) { AppendNameWithValueClassPrefix(sb, type.ParameterType); sb.Append('&'); }
/// <summary> /// Marshals a ByRef. Expects the ByRef on the stack. Pushes a pinned /// unmanaged pointer to the stack. /// </summary> /// <returns>Type the ByRef was marshalled into.</returns> private TypeDesc EmitByRefMarshalling(ByRefType byRefType) { if (!IsBlittableType(byRefType.ParameterType)) throw new NotSupportedException(); ILLocalVariable vPinnedByRef = _emitter.NewLocal(byRefType, true); _marshallingCodeStream.EmitStLoc(vPinnedByRef); _marshallingCodeStream.EmitLdLoc(vPinnedByRef); _marshallingCodeStream.Emit(ILOpcode.conv_i); return byRefType.Context.GetWellKnownType(WellKnownType.IntPtr); }
public string FormatName(ByRefType type) { StringBuilder sb = new StringBuilder(); AppendName(sb, type); return sb.ToString(); }