Represent interface information
internal class InterfaceMetadata
{
private readonly Dictionary<ulong, PropertyMetadata> tblHashNames;
public Guid Id { get; set; }
public Type InterfaceType { get; set; }
public string Name { get; set; }
public Type Concrete { get; set; }
public List<PropertyMetadata> Properties { get; set; }
public List<InterfaceMetadata> Parents { get; set; }
public PropertyMetadata GetProperty(string name, bool ignoreCase);
public void UpdateMetadata();
}public PropertyMetadata GetProperty(string name, bool ignoreCase);Description: retrieve property information by name.
name: property name.
ignoreCase: ignore character casing when searching for property.
public void UpdateMetadata();Description: this function populate tblHashNames field with all properties and their name hash for fast access.
public Guid Id { get; set; }Description: interface id, from Type.GUID.
public Type InterfaceType { get; set; }Description: Type class for this interface.
public string Name { get; set; }Description: interface name.
public Type Concrete { get; set; }Description: concrete class type for this interface.
public List<PropertyMetadata> Properties { get; set; }Description: list of properties in this interface.
public List<InterfaceMetadata> Parents { get; set; }Description: list of interfaces that this interface implements.
private readonly Dictionary<ulong, PropertyMetadata> tblHashNames;Description: provide fast access to properties using their name hash.
After the interface collect all information required then the function UpdateMetadata gets called to fill the hash table tblHashNames with properties twice, one with provided name, and another using lower case version.
The hash function is CalculateHash in DataMap.