public DiagnosticItem(AssetsFileTarget target, AssetsFileTargetLibrary library, AssetsFileLogMessage log) : base(log.Message) { Target = target; Library = library; Log = log; }
public PackageBuildFileGroupItem(AssetsFileTarget target, AssetsFileTargetLibrary library, PackageBuildFileGroupType groupType) : base(GetGroupLabel(groupType)) { Target = target; Library = library; GroupType = groupType; }
public PackageAssemblyItem(AssetsFileTarget target, AssetsFileTargetLibrary library, string path, PackageAssemblyGroupType groupType) : base(System.IO.Path.GetFileName(path)) { Target = target; Library = library; Path = path; GroupType = groupType; }
public PackageContentFileItem(AssetsFileTarget target, AssetsFileTargetLibrary library, AssetsFileTargetLibraryContentFile contentFile, IFileIconProvider fileIconProvider) : base(GetProcessedContentFilePath(contentFile.Path)) { Target = target; Library = library; ContentFile = contentFile; _fileIconProvider = fileIconProvider; }
public PackageBuildFileItem(AssetsFileTarget target, AssetsFileTargetLibrary library, string path, PackageBuildFileGroupType groupType, FileOpener fileOpener) : base(System.IO.Path.GetFileName(path)) { Target = target; Library = library; Path = path; GroupType = groupType; _fileOpener = fileOpener; }
internal bool TryUpdateState(AssetsFileTarget target, AssetsFileTargetLibrary library) { if (ReferenceEquals(Target, target) && ReferenceEquals(Library, library)) { return(false); } Target = target; Library = library; return(true); }
public void ParseLibraries_LockFileTargetLibrariesMatchesDependencies_Succeeds() { // Arrange var lockFileTarget = new LockFileTarget(); lockFileTarget.Libraries = new List <LockFileTargetLibrary> { new LockFileTargetLibrary() { Name = "packageA", Type = "package", Version = NuGetVersion.Parse("1.0.0") }, new LockFileTargetLibrary() { Name = "packageB", Type = "package", Version = NuGetVersion.Parse("1.0.0") }, new LockFileTargetLibrary() { Name = "projectA", Type = "project", Version = NuGetVersion.Parse("1.0.0") }, new LockFileTargetLibrary() { Name = "projectB", Type = "project", Version = NuGetVersion.Parse("1.0.0") } }; ImmutableDictionary <string, AssetsFileTargetLibrary> dependencies = AssetsFileDependenciesSnapshot.ParseLibraries(lockFileTarget); Assert.Equal(lockFileTarget.Libraries.Count, dependencies.Count); Assert.All <LockFileTargetLibrary>(lockFileTarget.Libraries, source => { Assert.True(dependencies.ContainsKey(source.Name)); AssetsFileTargetLibrary target = dependencies[source.Name]; Assert.Equal(source.Name, target.Name); Assert.Equal(source.Version.ToNormalizedString(), target.Version); AssetsFileLibraryType sourceType; Assert.True(Enum.TryParse <AssetsFileLibraryType>(source.Type, ignoreCase: true, out sourceType)); Assert.Equal(sourceType, target.Type); }); }
protected override bool TryUpdateItem(ProjectReferenceItem item, AssetsFileTarget targetData, AssetsFileTargetLibrary library) { return(item.TryUpdateState(targetData, library)); }
protected override ProjectReferenceItem CreateItem(AssetsFileTarget targetData, AssetsFileTargetLibrary library) { return(new ProjectReferenceItem(targetData, library)); }
public BrowseObject(AssetsFileTargetLibrary library) => _library = library;
public ProjectReferenceItem(AssetsFileTarget target, AssetsFileTargetLibrary library) : base(library.Name) { Target = target; Library = library; }
public PackageContentFileGroupItem(AssetsFileTarget target, AssetsFileTargetLibrary library) : base(VsResources.PackageContentFilesGroupName) { Target = target; Library = library; }
protected abstract bool TryUpdateItem(TItem item, AssetsFileTarget targetData, AssetsFileTargetLibrary library);
protected abstract TItem CreateItem(AssetsFileTarget targetData, AssetsFileTargetLibrary library);
private static string GetCaption(AssetsFileTargetLibrary library) => $"{library.Name} ({library.Version})";
public PackageReferenceItem(AssetsFileTarget target, AssetsFileTargetLibrary library) : base(GetCaption(library)) { Library = library; Target = target; }