IfcDoc.FormatCSV.WriteItem C# (CSharp) Method

WriteItem() private method

private WriteItem ( System writer, DocObject docEntity, int level, string topLevelName ) : void
writer System
docEntity DocObject
level int
topLevelName string
return void
        private void WriteItem(System.IO.StreamWriter writer, DocObject docEntity, int level, string topLevelName)
        {
            for (int i = 0; i < level; i++)
            {
                writer.Write(topLevelName + ".");
            }

            writer.Write(docEntity.Name);

            if (this.m_locales != null)
            {
                foreach (string locale in this.m_locales)
                {
                    string localname = "";
                    string localdesc = "";

                    foreach (DocLocalization docLocal in docEntity.Localization)
                    {
                        if (docLocal.Locale.StartsWith(locale))
                        {
                            localname = docLocal.Name;
                            localdesc = docLocal.Documentation;
                            break;
                        }
                    }

                    writer.Write("\t");
                    writer.Write(localname);
                    writer.Write("\t");
                    writer.Write(localdesc);
                }
            }

            writer.WriteLine();
        }