202 references to LibraryIncludeFlags
Microsoft.Build.NuGetSdkResolver (2)
RestoreRunnerEx.cs (2)
72SuppressParent = LibraryIncludeFlags.All, 74IncludeType = LibraryIncludeFlags.None,
NuGet.Build.Tasks.Console (8)
MSBuildStaticGraphRestore.cs (8)
382IncludeType = GetLibraryIncludeFlags(packageReferenceItem.GetProperty("IncludeAssets"), LibraryIncludeFlags.All) & ~GetLibraryIncludeFlags(packageReferenceItem.GetProperty("ExcludeAssets"), LibraryIncludeFlags.None), 474ExcludeAssets = GetLibraryIncludeFlags(projectReferenceItem.GetProperty("ExcludeAssets"), LibraryIncludeFlags.None), 475IncludeAssets = GetLibraryIncludeFlags(projectReferenceItem.GetProperty("IncludeAssets"), LibraryIncludeFlags.All), 666/// Gets the <see cref="LibraryIncludeFlags" /> for the specified value. 670/// <returns>The <see cref="LibraryIncludeFlags" /> for the specified value, otherwise the <paramref name="defaultValue" />.</returns> 671private static LibraryIncludeFlags GetLibraryIncludeFlags(string value, LibraryIncludeFlags defaultValue)
NuGet.CommandLine.XPlat (8)
Commands\PackageReferenceCommands\AddPackageReferenceCommandRunner.cs (6)
368var includeType = dependency.IncludeType; 369var suppressParent = dependency.SuppressParent; 373includeType == LibraryIncludeFlags.All) 375suppressParent = LibraryIncludeFlags.All; 376includeType = LibraryIncludeFlags.All & ~LibraryIncludeFlags.Compile;
Utility\MSBuildAPIUtility.cs (2)
491if (libraryDependency.IncludeType != LibraryIncludeFlags.All) 689if (libraryDependency.IncludeType != LibraryIncludeFlags.All)
NuGet.Commands (102)
CommandRunners\PackCommandRunner.cs (8)
312LibraryIncludeFlags effectiveInclude = dependency.IncludeType & ~dependency.SuppressParent; 314if (dependency.IncludeType == LibraryIncludeFlags.None || dependency.SuppressParent == LibraryIncludeFlags.All) 345if (effectiveInclude == LibraryIncludeFlags.All) 347includes.Add(LibraryIncludeFlags.All.ToString()); 349else if ((effectiveInclude & LibraryIncludeFlags.ContentFiles) == LibraryIncludeFlags.ContentFiles) 356if ((LibraryIncludeFlagUtils.NoContent & ~effectiveInclude) != LibraryIncludeFlags.None)
RestoreCommand\CompatibilityChecker.cs (9)
41Dictionary<string, LibraryIncludeFlags> includeFlags, 103LibraryIncludeFlags packageIncludeFlags; 106packageIncludeFlags = LibraryIncludeFlags.All; 113(LibraryIncludeFlags.Compile 114| LibraryIncludeFlags.Runtime)) == LibraryIncludeFlags.None) 159if ((packageIncludeFlags & LibraryIncludeFlags.Runtime) == LibraryIncludeFlags.Runtime) 430dependencyType: LibraryIncludeFlags.All);
RestoreCommand\DependencyGraphResolver.cs (4)
433if ((childLibraryDependencyIndex != LibraryDependencyIndex.Project && childLibraryDependency.SuppressParent == LibraryIncludeFlags.All) 562&& childLibraryDependency.SuppressParent != LibraryIncludeFlags.All 595&& childLibraryDependency.SuppressParent != LibraryIncludeFlags.All 1283if (dependency.SuppressParent == LibraryIncludeFlags.All)
RestoreCommand\LockFileBuilder.cs (9)
27private readonly Dictionary<RestoreTargetGraph, Dictionary<string, LibraryIncludeFlags>> _includeFlagGraphs; 32Dictionary<string, LibraryIncludeFlags>> includeFlagGraphs) 198LibraryIncludeFlags includeFlags; 201includeFlags = ~LibraryIncludeFlags.ContentFiles; 548Dictionary<string, LibraryIncludeFlags> dependenciesIncludeFlags = _includeFlagGraphs[targetGraph]; 550LibraryIncludeFlags suppressParent = LibraryIncludeFlags.All; 560if (suppressParent == LibraryIncludeFlags.All) 565if (!dependenciesIncludeFlags.TryGetValue(centralPackageVersion.Name, out LibraryIncludeFlags includeType))
RestoreCommand\LockFileBuilderCache.cs (2)
34private readonly ConcurrentDictionary<(CriteriaKey, string path, string aliases, LibraryIncludeFlags, int dependencyCount), Lazy<(LockFileTargetLibrary, bool, NuGetFramework, NuGetFramework)>> _lockFileTargetLibraryCache = 109internal (LockFileTargetLibrary, bool, NuGetFramework, NuGetFramework) GetLockFileTargetLibrary(RestoreTargetGraph graph, NuGetFramework framework, LocalPackageInfo localPackageInfo, string aliases, LibraryIncludeFlags libraryIncludeFlags, List<LibraryDependency> dependencies, Func<(LockFileTargetLibrary, bool, NuGetFramework, NuGetFramework)> valueFactory)
RestoreCommand\RestoreCommand.cs (3)
42private readonly Dictionary<RestoreTargetGraph, Dictionary<string, LibraryIncludeFlags>> _includeFlagGraphs 43= new Dictionary<RestoreTargetGraph, Dictionary<string, LibraryIncludeFlags>>(); 1757Dictionary<RestoreTargetGraph, Dictionary<string, LibraryIncludeFlags>> includeFlagGraphs,
RestoreCommand\Utility\IncludeFlagUtils.cs (16)
18internal static Dictionary<string, LibraryIncludeFlags> FlattenDependencyTypes( 19Dictionary<RestoreTargetGraph, Dictionary<string, LibraryIncludeFlags>> includeFlagGraphs, 23Dictionary<string, LibraryIncludeFlags> flattenedFlags; 33internal static Dictionary<string, LibraryIncludeFlags> FlattenDependencyTypes( 37var result = new Dictionary<string, LibraryIncludeFlags>(StringComparer.OrdinalIgnoreCase); 49LibraryIncludeFlags includeType = IsDependencyPruned(dependency, specFramework?.PackagesToPrune) ? 50LibraryIncludeFlags.None : 79Dictionary<string, LibraryIncludeFlags> result) 110var typeIntersection = GetDependencyType(graph, root); 134LibraryIncludeFlags currentTypes; 165&& dependency.SuppressParent != LibraryIncludeFlags.All) 168LibraryIncludeFlags typeIntersection = 184private static LibraryIncludeFlags GetDependencyType( 193var flags = match.IncludeType; 241public DependencyNode(GraphItem<RemoteResolveResult> item, LibraryIncludeFlags dependencyType) 250public LibraryIncludeFlags DependencyType { get; }
RestoreCommand\Utility\LockFileUtils.cs (27)
35LibraryIncludeFlags dependencyType) 66LibraryIncludeFlags dependencyType, 175LibraryIncludeFlags dependencyType, 330LibraryIncludeFlags dependencyType, 349LibraryIncludeFlags.Runtime, 358LibraryIncludeFlags.Runtime, 367LibraryIncludeFlags.Native, 491LibraryIncludeFlags dependencyType, 527&& d.SuppressParent != LibraryIncludeFlags.All 948LibraryIncludeFlags dependencyType, 949LibraryIncludeFlags groupType, 963if ((dependencyType & groupType) == LibraryIncludeFlags.None) 1035public static void ExcludeItems(LockFileTargetLibrary lockFileLib, LibraryIncludeFlags dependencyType) 1037if ((dependencyType & LibraryIncludeFlags.Runtime) == LibraryIncludeFlags.None) 1044if ((dependencyType & LibraryIncludeFlags.Compile) == LibraryIncludeFlags.None) 1050if ((dependencyType & LibraryIncludeFlags.Native) == LibraryIncludeFlags.None) 1055if ((dependencyType & LibraryIncludeFlags.ContentFiles) == LibraryIncludeFlags.None 1063if ((dependencyType & LibraryIncludeFlags.BuildTransitive) == LibraryIncludeFlags.None && 1064(dependencyType & LibraryIncludeFlags.Build) == LibraryIncludeFlags.None) 1070else if ((dependencyType & LibraryIncludeFlags.Build) == LibraryIncludeFlags.None)
RestoreCommand\Utility\MSBuildRestoreUtility.cs (16)
133public static (LibraryIncludeFlags includeType, LibraryIncludeFlags suppressParent) GetLibraryDependencyIncludeFlags(string includeAssets, string excludeAssets, string privateAssets) 135var includeFlags = GetIncludeFlags(includeAssets, LibraryIncludeFlags.All); 136var excludeFlags = GetIncludeFlags(excludeAssets, LibraryIncludeFlags.None); 138var includeType = includeFlags & ~excludeFlags; 139var suppressParent = GetIncludeFlags(privateAssets, LibraryIncludeFlagUtils.DefaultSuppressParent); 150dependency.IncludeAssets = GetIncludeFlags(includeAssets, LibraryIncludeFlags.All); 151dependency.ExcludeAssets = GetIncludeFlags(excludeAssets, LibraryIncludeFlags.None); 652(var includeType, var suppressParent) = GetLibraryDependencyIncludeFlags(item); 812private static (LibraryIncludeFlags includeType, LibraryIncludeFlags suppressParent) GetLibraryDependencyIncludeFlags(IMSBuildItem item) 817private static LibraryIncludeFlags GetIncludeFlags(string value, LibraryIncludeFlags defaultValue)
RestoreCommand\Utility\PackageSpecFactory.cs (8)
764ExcludeAssets = GetLibraryIncludeFlags(projectReferenceItem.GetMetadata("ExcludeAssets"), LibraryIncludeFlags.None), 765IncludeAssets = GetLibraryIncludeFlags(projectReferenceItem.GetMetadata("IncludeAssets"), LibraryIncludeFlags.All), 819IncludeType = GetLibraryIncludeFlags(packageReferenceItem.GetMetadata("IncludeAssets"), LibraryIncludeFlags.All) & ~GetLibraryIncludeFlags(packageReferenceItem.GetMetadata("ExcludeAssets"), LibraryIncludeFlags.None), 914/// Gets the <see cref="LibraryIncludeFlags" /> for the specified value. 918/// <returns>The <see cref="LibraryIncludeFlags" /> for the specified value, otherwise the <paramref name="defaultValue" />.</returns> 919private static LibraryIncludeFlags GetLibraryIncludeFlags(string? value, LibraryIncludeFlags defaultValue)
NuGet.DependencyResolver.Core (4)
PackagingUtility.cs (3)
18var includeType = LibraryIncludeFlagUtils.NoContent; 29var excludeType = LibraryIncludeFlagUtils.GetFlags(dependency.Exclude); 45SuppressParent = LibraryIncludeFlags.None
Remote\RemoteDependencyWalker.cs (1)
145|| dependency.SuppressParent != LibraryIncludeFlags.All)
NuGet.LibraryModel (37)
LibraryDependency.cs (5)
20public LibraryIncludeFlags IncludeType { get; init; } = LibraryIncludeFlags.All; 22public LibraryIncludeFlags SuppressParent { get; init; } = LibraryIncludeFlagUtils.DefaultSuppressParent; 77LibraryIncludeFlags includeType, 78LibraryIncludeFlags suppressParent,
LibraryIncludeFlagUtils.cs (32)
19public static readonly LibraryIncludeFlags DefaultSuppressParent = 20(LibraryIncludeFlags.Build | LibraryIncludeFlags.ContentFiles | LibraryIncludeFlags.Analyzers); 22public static readonly LibraryIncludeFlags NoContent = LibraryIncludeFlags.All & ~LibraryIncludeFlags.ContentFiles; 27public static LibraryIncludeFlags GetFlags(IEnumerable<string> flags) 34var result = LibraryIncludeFlags.None; 41result |= LibraryIncludeFlags.All; 44result |= LibraryIncludeFlags.Runtime; 47result |= LibraryIncludeFlags.Compile; 50result |= LibraryIncludeFlags.Build; 53result |= LibraryIncludeFlags.ContentFiles; 56result |= LibraryIncludeFlags.Native; 59result |= LibraryIncludeFlags.Analyzers; 62result |= LibraryIncludeFlags.BuildTransitive | LibraryIncludeFlags.Build; 75public static string GetFlagString(LibraryIncludeFlags flags) 77if (flags == LibraryIncludeFlags.None) 82if (flags == LibraryIncludeFlags.All) 89foreach (LibraryIncludeFlags value in EnumUtility.GetValues<LibraryIncludeFlags>()) 91if (value != LibraryIncludeFlags.None && flags.HasFlag(value)) 103public static LibraryIncludeFlags GetFlags(string flags, LibraryIncludeFlags defaultFlags) 105var result = defaultFlags; 123private static readonly ConcurrentDictionary<LibraryIncludeFlags, string> LibraryIncludeFlagsCache = new(); 126/// Efficiently converts <see cref="LibraryIncludeFlags"/> to it's <see cref="string"/> representation. 128/// <param name="includeFlags">The <see cref="LibraryIncludeFlags"/> instance to get the <see cref="string"/> representation for.</param> 130public static string AsString(this LibraryIncludeFlags includeFlags)
NuGet.PackageManagement (10)
BuildIntegratedInstallationContext.cs (3)
37public LibraryIncludeFlags SuppressParent { get; set; } = LibraryIncludeFlagUtils.DefaultSuppressParent; 42public LibraryIncludeFlags IncludeType { get; set; } = LibraryIncludeFlags.All;
BuildIntegratedPackageReference.cs (2)
33developmentDependency: dependency?.SuppressParent == LibraryIncludeFlags.All, 54developmentDependency: dependency?.SuppressParent == LibraryIncludeFlags.All,
BuildIntegration\BuildIntegratedRestoreUtility.cs (5)
177dependency.IncludeType == LibraryIncludeFlags.All) 179var includeType = LibraryIncludeFlags.All & ~LibraryIncludeFlags.Compile; 183SuppressParent = LibraryIncludeFlags.All
NuGet.ProjectModel (31)
JsonPackageSpecReader.Utf8JsonStreamReader.cs (17)
210var dependencyIncludeFlagsValue = LibraryIncludeFlags.All; 211var dependencyExcludeFlagsValue = LibraryIncludeFlags.None; 212var suppressParentFlagsValue = LibraryIncludeFlagUtils.DefaultSuppressParent; 253var includeFlags = dependencyIncludeFlagsValue & ~dependencyExcludeFlagsValue; 274ref LibraryIncludeFlags dependencyIncludeFlagsValue, 275ref LibraryIncludeFlags dependencyExcludeFlagsValue, 276ref LibraryIncludeFlags suppressParentFlagsValue, 333var dependencyIncludeFlagsValue = LibraryIncludeFlags.All; 334var dependencyExcludeFlagsValue = LibraryIncludeFlags.None; 335var suppressParentFlagsValue = LibraryIncludeFlagUtils.DefaultSuppressParent; 461var includeFlags = dependencyIncludeFlagsValue & ~dependencyExcludeFlagsValue; 1370defaultFlags: LibraryIncludeFlags.All), 1374defaultFlags: LibraryIncludeFlags.None),
PackageSpecReferenceDependencyProvider.cs (2)
405SuppressParent = isPruned ? LibraryIncludeFlags.All : dependency.SuppressParent, 406IncludeType = isPruned ? LibraryIncludeFlags.None : dependency.IncludeType,
PackageSpecWriter.cs (5)
250if (project.IncludeAssets != LibraryIncludeFlags.All) 255if (project.ExcludeAssets != LibraryIncludeFlags.None) 374var expandedMode = dependency.IncludeType != LibraryIncludeFlags.All 390if (dependency.IncludeType != LibraryIncludeFlags.All) 470if (dependency.IncludeType != LibraryIncludeFlags.All)
ProjectLockFile\PackagesLockFileUtilities.cs (3)
259if (visitedP2PReference.Add(reference.ProjectUniqueName) && reference.PrivateAssets != LibraryIncludeFlags.All) 476&& dep.SuppressParent != LibraryIncludeFlags.All 479var transitivelyFlowingProjectReferences = projectRestoreReferences.Where(e => e.PrivateAssets != LibraryIncludeFlags.All);
ProjectRestoreReference.cs (4)
24public LibraryIncludeFlags IncludeAssets { get; set; } = LibraryIncludeFlags.All; 26public LibraryIncludeFlags ExcludeAssets { get; set; } 28public LibraryIncludeFlags PrivateAssets { get; set; } = LibraryIncludeFlagUtils.DefaultSuppressParent;