RegisterInternalXrefSpec() public method

public RegisterInternalXrefSpec ( XRefSpec xrefSpec ) : void
xrefSpec XRefSpec
return void
Example #1
0
 private static 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 {((RelativePath)xref.Href).RemoveWorkingFolder()}.");
             }
             else
             {
                 context.RegisterInternalXrefSpec(spec);
             }
         }
     }
     foreach (var spec in result.ExternalXRefSpecs)
     {
         if (!string.IsNullOrWhiteSpace(spec?.Uid))
         {
             context.ReportExternalXRefSpec(spec);
         }
     }
 }
Example #2
0
 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);
         }
     }
 }