public string Format(NdrFormatContext context)
        {
            StringBuilder builder = new StringBuilder();

            builder.AppendFormat("[Guid(\"{0}\")]", Iid).AppendLine();
            string base_name = context.IidsToNames.ContainsKey(BaseIid) ?
                               context.IidsToNames[BaseIid] : String.Format("/* Unknown IID {0} */ IUnknown", BaseIid);

            builder.AppendFormat("interface {0} : {1} {{", Name, base_name).AppendLine();
            foreach (NdrProcedureDefinition proc in Procs)
            {
                builder.AppendFormat("    {0}", proc.FormatProcedure(context)).AppendLine();
            }
            builder.AppendLine("}").AppendLine();
            return(builder.ToString());
        }
        public string Format(IDictionary <Guid, string> iids_to_names)
        {
            NdrFormatContext context = new NdrFormatContext(iids_to_names, _instance.ComplexTypesWithNames);

            return(Format(context));
        }