/// <summary> /// Asynchronously reads the <see cref="SpecType"/> which is specific to the <see cref="SpecRelation"/> class. /// </summary> /// <param name="reader"> /// an instance of <see cref="XmlReader"/> /// </param> /// <param name="token"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> protected override async Task ReadSpecTypeAsync(XmlReader reader, CancellationToken token) { if (token.IsCancellationRequested) { token.ThrowIfCancellationRequested(); } if (reader.ReadToDescendant("SPEC-RELATION-TYPE-REF")) { var reference = await reader.ReadElementContentAsStringAsync(); var specType = this.ReqIFContent.SpecTypes.SingleOrDefault(x => x.Identifier == reference); this.Type = (SpecRelationType)specType; if (specType == null) { this.logger.LogTrace("The SpecRelationType:{reference} could not be found and has been set to null on SpecRelation:{Identifier}", reference, Identifier); } } }