Microsoft.DocAsCode.Build.Engine.SingleDocumentBuilder.RegisterXRefSpec C# (CSharp) Method

RegisterXRefSpec() private method

private RegisterXRefSpec ( DocumentBuildContext context, SaveResult result ) : void
context DocumentBuildContext
result Microsoft.DocAsCode.Plugins.SaveResult
return void
        private void RegisterXRefSpec(DocumentBuildContext context, SaveResult result)
        {
            foreach (var spec in result.XRefSpecs)
            {
                if (!string.IsNullOrWhiteSpace(spec?.Uid))
                {
                    XRefSpec xref;
                    if (context.XRefSpecMap.TryGetValue(spec.Uid, out xref))
                    {
                        Logger.LogWarning($"Uid({spec.Uid}) has already been defined in {((TypeForwardedToRelativePath)xref.Href).RemoveWorkingFolder()}.");
                    }
                    else
                    {
                        context.RegisterInternalXrefSpec(spec);
                    }
                }
            }
            foreach (var spec in result.ExternalXRefSpecs)
            {
                if (!string.IsNullOrWhiteSpace(spec?.Uid))
                {
                    context.ReportExternalXRefSpec(spec);
                }
            }
        }