string INdrFormatter.FormatComProxy(NdrComProxyDefinition com_proxy) { NdrStringBuilder builder = new NdrStringBuilder(); string base_name = this.IidToName(com_proxy.BaseIid); if (base_name == null) { string unknown_iid = $"Unknown IID {com_proxy.BaseIid}"; string comment = (this as INdrFormatterInternal).FormatComment(unknown_iid); base_name = $"{comment} IUnknown"; } builder.AppendLine( "class __declspec(uuid(\"{0}\")) {1} : public {2} {{\npublic:", com_proxy.Iid, (this as INdrFormatterInternal).DemangleComName(com_proxy.Name), base_name ); builder.PushIndent(' ', 4); foreach (NdrProcedureDefinition proc in com_proxy.Procedures) { builder.AppendLine(this.FormatProcedure(proc)); } builder.PopIndent(); builder.AppendLine("};").AppendLine(); return(builder.ToString()); }
string INdrFormatter.FormatComProxy(NdrComProxyDefinition com_proxy) { return(com_proxy.Format(this)); }