Example #1
0
 public LibraryRange(string name, VersionRange versionRange, LibraryType target, LibraryDependencyType type, string sourceFilePath, int sourceLine, int sourceColumn)
 {
     Name           = name;
     VersionRange   = versionRange;
     Target         = target;
     Type           = type;
     SourceFilePath = sourceFilePath;
     SourceLine     = sourceLine;
     SourceColumn   = sourceColumn;
 }
Example #2
0
        public LockFileLookup(LockFile lockFile)
        {
            _packages = new Dictionary <Tuple <string, NuGetVersion>, LockFileLibrary>();
            _projects = new Dictionary <string, LockFileLibrary>();

            foreach (var library in lockFile.Libraries)
            {
                var libraryType = LibraryType.Parse(library.Type);

                if (libraryType == LibraryType.Package)
                {
                    _packages[Tuple.Create(library.Name, library.Version)] = library;
                }
                if (libraryType == LibraryType.Project)
                {
                    _projects[library.Name] = library;
                }
            }
        }
Example #3
0
 public LibraryRange(string name, VersionRange versionRange, LibraryType target, LibraryDependencyType type)
     : this(name, versionRange, target, type, sourceFilePath : string.Empty, sourceLine : 0, sourceColumn : 0)
 {
 }
Example #4
0
 public LibraryRange(string name, LibraryType target)
     : this(name, null, target, LibraryDependencyType.Default, sourceFilePath : string.Empty, sourceLine : 0, sourceColumn : 0)
 {
 }
Example #5
0
 public LibraryIdentity(string name, NuGetVersion version, LibraryType type)
 {
     Name    = name;
     Version = version;
     Type    = type;
 }
Example #6
0
 public LibraryIdentity(string name, LibraryType type)
     : this(name, null, type)
 {
 }