コード例 #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));
        }
コード例 #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));
        }
コード例 #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));
        }
コード例 #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));
        }
コード例 #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));
        }
コード例 #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);
        }