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