Exemplo n.º 1
0
        private static IVsReferenceItem ToPackageDownload(DownloadDependency library)
        {
            var properties = new VsReferenceProperties(
                new[] { new VsReferenceProperty("Version", library.VersionRange.OriginalString) }
                );

            return(new VsReferenceItem(library.Name, properties));
        }
Exemplo n.º 2
0
        private static IVsReferenceItem ToToolReference(LibraryRange libraryRange)
        {
            var properties = new VsReferenceProperties(
                new[] { new VsReferenceProperty("Version", libraryRange.VersionRange.OriginalString) }
                );

            return(new VsReferenceItem(libraryRange.Name, properties));
        }
Exemplo n.º 3
0
        private static IVsReferenceItem ToProjectReference(LibraryDependency library)
        {
            var properties = new VsReferenceProperties(
                new[] { new VsReferenceProperty("ProjectFileFullPath", library.LibraryRange.Name) }
                );

            return(new VsReferenceItem(library.Name, properties));
        }
Exemplo n.º 4
0
        private static IVsReferenceItem ToFrameworkReference(FrameworkDependency frameworkDependency)
        {
            var properties = new VsReferenceProperties(
                new[] { new VsReferenceProperty("PrivateAssets", FrameworkDependencyFlagsUtils.GetFlagString(frameworkDependency.PrivateAssets)) }
                );

            return(new VsReferenceItem(frameworkDependency.Name, properties));
        }
Exemplo n.º 5
0
        private static IVsReferenceItem ToPackageDownload(IGrouping <string, DownloadDependency> library)
        {
            string versionProperty = string.Join(";", library.Select(e => e.VersionRange.OriginalString));

            var properties = new VsReferenceProperties(
                new[] { new VsReferenceProperty("Version", versionProperty) }
                );

            return(new VsReferenceItem(library.Key, properties));
        }
Exemplo n.º 6
0
        public ProjectRestoreInfoBuilder WithTool(string name, string version)
        {
            var properties = new VsReferenceProperties
            {
                { "Version", version }
            };

            _pri.ToolReferences = new VsReferenceItems
            {
                new VsReferenceItem(name, properties)
            };

            return(this);
        }