public static string WriteHeaderMethod(this MethodBase methodBase, ClosureEntities crRuntime, bool writeEndColon = true) { var retType = methodBase.GetReturnType().ToCppName(); var sb = new StringBuilder(); // Since the method signature for the call is the external interface we // provide to our clients, the signature remains the same, an dinternally the // PInvoke method will do parameter marshalling in case the types are different. var arguments = methodBase.GetArgumentsAsText(); sb.AppendFormat("{0} {1}({2})", retType, methodBase.ClangMethodSignature(crRuntime), arguments); if (writeEndColon) { sb.Append(";"); } return(sb.ToString()); }