Exemple #1
0
 public DependencyItem(DependencyItemSourceInfo from, DependencyItemSourceInfo to, DependencyItemSourceInfo reportedBy, string type)
 {
     From       = from;
     To         = to;
     ReportedBy = reportedBy;
     Type       = type;
 }
Exemple #2
0
        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));
        }
Exemple #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));
 }
Exemple #4
0
 public ReferenceItem(DependencyItemSourceInfo reference, string file, string reportedBy)
 {
     Reference  = reference;
     File       = file;
     ReportedBy = reportedBy;
 }
Exemple #5
0
 public DependencyItem ChangeReportedBy(DependencyItemSourceInfo r)
 {
     return(new DependencyItem(this.From, this.To, r, this.Type));
 }
Exemple #6
0
 public DependencyItem ChangeTo(DependencyItemSourceInfo t)
 {
     return(new DependencyItem(this.From, t, this.ReportedBy, this.Type));
 }
Exemple #7
0
 public DependencyItem ChangeFrom(DependencyItemSourceInfo f)
 {
     return(new DependencyItem(f, this.To, this.ReportedBy, this.Type));
 }