コード例 #1
0
ファイル: DependencyItem.cs プロジェクト: zyj0021/docfx
 public DependencyItem(DependencyItemSourceInfo from, DependencyItemSourceInfo to, DependencyItemSourceInfo reportedBy, string type)
 {
     From       = from;
     To         = to;
     ReportedBy = reportedBy;
     Type       = type;
 }
コード例 #2
0
ファイル: DependencyGraph.cs プロジェクト: timpatt/docfx
        private DependencyItemSourceInfo TryResolveReference(DependencyItemSourceInfo source)
        {
            if (source.SourceType == DependencyItemSourceType.File)
            {
                return(source);
            }
            string file;

            if (!_referenceItems.TryGetValue(source, out file))
            {
                Logger.LogInfo($"Dependency graph Failed to resolve reference: {JsonUtility.Serialize(source)}.");
                return(null);
            }
            return(source.ChangeSourceType(DependencyItemSourceType.File).ChangeValue(file));
        }
コード例 #3
0
 private DependencyItemSourceInfo TryResolveReference(Dictionary <DependencyItemSourceInfo, string> indexer, DependencyItemSourceInfo source)
 {
     if (source.SourceType == DependencyItemSourceType.File)
     {
         return(source);
     }
     if (!indexer.TryGetValue(source, out string file))
     {
         return(null);
     }
     return(source.ChangeSourceType(DependencyItemSourceType.File).ChangeValue(file));
 }
コード例 #4
0
 public ReferenceItem(DependencyItemSourceInfo reference, string file, string reportedBy)
 {
     Reference  = reference;
     File       = file;
     ReportedBy = reportedBy;
 }
コード例 #5
0
ファイル: DependencyItem.cs プロジェクト: zyj0021/docfx
 public DependencyItem ChangeReportedBy(DependencyItemSourceInfo r)
 {
     return(new DependencyItem(this.From, this.To, r, this.Type));
 }
コード例 #6
0
ファイル: DependencyItem.cs プロジェクト: zyj0021/docfx
 public DependencyItem ChangeTo(DependencyItemSourceInfo t)
 {
     return(new DependencyItem(this.From, t, this.ReportedBy, this.Type));
 }
コード例 #7
0
ファイル: DependencyItem.cs プロジェクト: zyj0021/docfx
 public DependencyItem ChangeFrom(DependencyItemSourceInfo f)
 {
     return(new DependencyItem(f, this.To, this.ReportedBy, this.Type));
 }