/// <summary> /// Creates a interface implementation from an interface implementation metadata row. /// </summary> /// <param name="parentModule">The module that contains the interface implementation.</param> /// <param name="token">The token to initialize the interface implementation for.</param> /// <param name="row">The metadata table row to base the interface implementation on.</param> public SerializedInterfaceImplementation(SerializedModuleDefinition parentModule, MetadataToken token, InterfaceImplementationRow row) : base(token) { _parentModule = parentModule ?? throw new ArgumentNullException(nameof(parentModule)); _row = row; }
private void DefineInterfaces(MetadataToken ownerToken, IEnumerable <InterfaceImplementation> interfaces) { var table = Metadata.TablesStream.GetSortedTable <InterfaceImplementation, InterfaceImplementationRow>(TableIndex.InterfaceImpl); foreach (var implementation in interfaces) { var row = new InterfaceImplementationRow( ownerToken.Rid, GetTypeDefOrRefIndex(implementation.Interface)); table.Add(implementation, row); } }