public void Write (StringBuilder text, SignatureType type, GlobalInfo info) { if (IsConst && (type == SignatureType.Native || type == SignatureType.NativeC)) text.Append ("const "); if (type != SignatureType.Native && type != SignatureType.NativeC) { if (IsRef && !IsReturnType) text.Append ("ref "); if (IsOut && !IsReturnType) text.Append ("out "); } if (type == SignatureType.NativeC && info.IsEnum (Value)) { text.Append (GetPrettyType ().Replace (Value.Replace ("*", ""), "int")); } else if (type == SignatureType.Native || type == SignatureType.NativeC) { text.Append (GetPrettyType ()); } else { text.Append (GetManagedType ()); } }
public void Write(StringBuilder text, SignatureType type, GlobalInfo info) { if (IsConst && (type == SignatureType.Native || type == SignatureType.NativeC)) { text.Append("const "); } if (type != SignatureType.Native && type != SignatureType.NativeC) { if (IsRef && !IsReturnType) { text.Append("ref "); } if (IsOut && !IsReturnType) { text.Append("out "); } } if (type == SignatureType.NativeC && info.IsEnum(Value)) { text.Append(GetPrettyType().Replace(Value.Replace("*", ""), "int")); } else if (type == SignatureType.Native || type == SignatureType.NativeC) { if (Value == "GCHandle") { text.Append("void *"); } else { text.Append(GetPrettyType()); } } else { text.Append(GetManagedType()); } }
public void WriteCall(StringBuilder text, SignatureType type) { if (type != SignatureType.Native && type != SignatureType.NativeC) { if (ParameterType.IsRef) { text.Append("ref "); } if (ParameterType.IsOut) { text.Append("out "); } } if (type == SignatureType.NativeC && GlobalInfo.IsEnum(ParameterType.Value)) { text.Append("("); text.Append(ParameterType.Value); text.Append(") "); } text.Append(Name); }