public override void WriteNamespace(NamespaceDeclaration namespaceDeclaration) { if (this.currentDepth == 0) { //we need to track every namespace alias appeared in root element to figure out right alias for MC namespace this.rootLevelNamespaces.Add(namespaceDeclaration.Prefix); //Remember namespaces needed to be ignored at top level so we will add ignore attribute for them when we write start object if (NameSpaces.ShouldIgnore(namespaceDeclaration.Namespace)) { this.namespacesToIgnore.Add(namespaceDeclaration.Prefix); } if (namespaceDeclaration.Namespace == NameSpaces.DebugSymbol) { debugSymbolNamespaceAdded = true; } } EmitNamespace(namespaceDeclaration); }