Sort() public method

public Sort ( ) : void
return void
示例#1
0
        /// <summary>
        /// Export xref map file.
        /// </summary>
        private static void ExportXRefMap(DocumentBuildParameters parameters, DocumentBuildContext context)
        {
            Logger.LogVerbose("Exporting xref map...");
            var xrefMap = new XRefMap();

            xrefMap.References =
                (from xref in context.XRefSpecMap.Values.AsParallel().WithDegreeOfParallelism(parameters.MaxParallelism)
                 select new XRefSpec(xref)
            {
                Href = ((RelativePath)context.FileMap[xref.Href]).RemoveWorkingFolder().ToString() + "#" + XRefDetails.GetHtmlId(xref.Uid),
            }).ToList();
            xrefMap.Sort();
            YamlUtility.Serialize(
                Path.Combine(parameters.OutputBaseDir, XRefMapFileName),
                xrefMap);
            Logger.LogInfo("XRef map exported.");
        }
示例#2
0
        /// <summary>
        /// Export xref map file.
        /// </summary>
        private static string ExportXRefMap(DocumentBuildParameters parameters, DocumentBuildContext context)
        {
            Logger.LogVerbose("Exporting xref map...");
            var xrefMap = new XRefMap();

            xrefMap.References =
                (from xref in context.XRefSpecMap.Values.AsParallel().WithDegreeOfParallelism(parameters.MaxParallelism)
                 select new XRefSpec(xref)
            {
                Href = context.UpdateHref(xref.Href, RelativePath.WorkingFolder)
            }).ToList();
            xrefMap.Sort();
            string xrefMapFileNameWithVersion = GetXrefMapFileNameWithGroup(parameters);

            YamlUtility.Serialize(
                Path.GetFullPath(Environment.ExpandEnvironmentVariables(Path.Combine(parameters.OutputBaseDir, xrefMapFileNameWithVersion))),
                xrefMap,
                YamlMime.XRefMap);
            Logger.LogInfo("XRef map exported.");
            return(xrefMapFileNameWithVersion);
        }
        /// <summary>
        /// Export xref map file.
        /// </summary>
        private static string ExportXRefMap(DocumentBuildParameters parameters, DocumentBuildContext context)
        {
            Logger.LogVerbose("Exporting xref map...");
            var xrefMap = new XRefMap();

            xrefMap.References =
                (from xref in context.XRefSpecMap.Values.AsParallel().WithDegreeOfParallelism(parameters.MaxParallelism)
                 select new XRefSpec(xref)
            {
                Href = ((RelativePath)context.GetFilePath(UriUtility.GetNonFragment(xref.Href))).RemoveWorkingFolder() + UriUtility.GetFragment(xref.Href)
            }).ToList();
            xrefMap.Sort();
            string xrefMapFileNameWithVersion = string.IsNullOrEmpty(parameters.VersionName) ?
                                                XRefMapFileName :
                                                parameters.VersionName + "." + XRefMapFileName;

            YamlUtility.Serialize(
                xrefMapFileNameWithVersion,
                xrefMap,
                YamlMime.XRefMap);
            Logger.LogInfo("XRef map exported.");
            return(xrefMapFileNameWithVersion);
        }
示例#4
0
 /// <summary>
 /// Export xref map file.
 /// </summary>
 private static string ExportXRefMap(DocumentBuildParameters parameters, DocumentBuildContext context)
 {
     Logger.LogVerbose("Exporting xref map...");
     var xrefMap = new XRefMap();
     xrefMap.References =
         (from xref in context.XRefSpecMap.Values.AsParallel().WithDegreeOfParallelism(parameters.MaxParallelism)
          select new XRefSpec(xref)
          {
              Href = ((RelativePath)context.FileMap[UriUtility.GetNonFragment(xref.Href)]).RemoveWorkingFolder() + UriUtility.GetFragment(xref.Href)
          }).ToList();
     xrefMap.Sort();
     string xrefMapFileNameWithVersion = string.IsNullOrEmpty(parameters.VersionName) ?
         XRefMapFileName :
         parameters.VersionName + "." + XRefMapFileName;
     YamlUtility.Serialize(
         Path.Combine(parameters.OutputBaseDir, xrefMapFileNameWithVersion),
         xrefMap,
         YamlMime.XRefMap);
     Logger.LogInfo("XRef map exported.");
     return xrefMapFileNameWithVersion;
 }