private static void AppendNamespaceHashCode(ref HashCodeBuilder builder, NamespaceReferenceHandle namespaceRefHandle, MetadataReader reader) { NamespaceReference namespaceReference = reader.GetNamespaceReference(namespaceRefHandle); Handle parentHandle = namespaceReference.ParentScopeOrNamespace; HandleType parentHandleType = parentHandle.HandleType; if (parentHandleType == HandleType.NamespaceReference) { AppendNamespaceHashCode(ref builder, parentHandle.ToNamespaceReferenceHandle(reader), reader); string namespaceNamePart = reader.GetString(namespaceReference.Name); builder.Append(namespaceNamePart); builder.Append("."); } else { Debug.Assert(parentHandleType == HandleType.ScopeReference); Debug.Assert(String.IsNullOrEmpty(reader.GetString(namespaceReference.Name)), "Root namespace with a name?"); } }
} // Offset public NamespaceReference GetNamespaceReference(MetadataReader reader) { return reader.GetNamespaceReference(this); } // GetNamespaceReference