Microsoft.DocAsCode.Build.Engine.Incrementals.IncrementalBuildContext.ReportModelLoadInfo C# (CSharp) Метод

ReportModelLoadInfo() публичный Метод

report model load info
public ReportModelLoadInfo ( HostService hostService, IEnumerable files, BuildPhase phase ) : void
hostService HostService host service
files IEnumerable models' LocalPathFromRoot
phase BuildPhase the buildphase that the model was loaded at
Результат void
        public void ReportModelLoadInfo(HostService hostService, IEnumerable<string> files, BuildPhase? phase)
        {
            foreach (var f in files)
            {
                ReportModelLoadInfo(hostService, f, phase);
            }
        }

Same methods

IncrementalBuildContext::ReportModelLoadInfo ( HostService hostService, string file, BuildPhase phase ) : void

Usage Example

Пример #1
0
 private void ReloadUnloadedModelsPerCondition(IncrementalBuildContext incrementalContext, BuildPhase phase, Func<string, bool> condition)
 {
     if (!CanIncrementalBuild)
     {
         return;
     }
     var mi = incrementalContext.GetModelLoadInfo(this);
     var toLoadList = (from f in mi.Keys
                       where condition(f)
                       select LoadIntermediateModel(incrementalContext, f) into m
                       where m != null
                       select m).ToList();
     if (toLoadList.Count > 0)
     {
         Reload(Models.Concat(toLoadList));
         incrementalContext.ReportModelLoadInfo(this, toLoadList.Select(t => t.FileAndType.File), phase);
     }
 }