Skip to content

Commit 0ed7e52

Browse files
committed
common
1 parent 69f9e71 commit 0ed7e52

5 files changed

Lines changed: 7 additions & 6 deletions

File tree

File renamed without changes.

src/NuGet.Core/NuGet.Common/NuGetFeatureFlags.cs renamed to build/Shared/NuGetFeatureFlags.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace NuGet.Common
88
{
9-
public static class NuGetFeatureFlags
9+
internal static class NuGetFeatureFlags
1010
{
1111
internal const string UsesNSJDeserializationSwitchName = "NuGet.UsesNSJDeserialization";
1212
internal const string UsesNSJDeserializationEnvVar = "NUGET_USES_NSJ_DESERIALIZATION";
@@ -16,11 +16,11 @@ public static class NuGetFeatureFlags
1616

1717
/// <summary>Feature switch for NSJ deserialization. Defaults to <see langword="true"/>.</summary>
1818
[FeatureSwitchDefinition(UsesNSJDeserializationSwitchName)]
19-
public static bool NSJDeserializationFeatureSwitch { get; } =
19+
internal static bool NSJDeserializationFeatureSwitch { get; } =
2020
!AppContext.TryGetSwitch(UsesNSJDeserializationSwitchName, out bool value) || value;
2121

2222
/// <summary>Returns <see langword="false"/> when env var <c>NUGET_USES_NSJ_DESERIALIZATION</c> is <c>false</c>.</summary>
23-
public static bool IsNSJDeserializationEnabledByEnvironment(IEnvironmentVariableReader? env = null)
23+
internal static bool IsNSJDeserializationEnabledByEnvironment(IEnvironmentVariableReader? env = null)
2424
{
2525
if (env is null)
2626
{

src/NuGet.Core/NuGet.Common/NuGet.Common.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@
3838
</ItemGroup>
3939

4040
<ItemGroup Label="NuGet Shared">
41+
<Compile Include="$(SharedDirectory)\AotCompatibilityAttributes.cs" />
4142
<Compile Include="$(SharedDirectory)\EncodingUtility.cs" />
4243
<Compile Include="$(SharedDirectory)\NullableAttributes.cs" />
44+
<Compile Include="$(SharedDirectory)\NuGetFeatureFlags.cs" />
4345
<Compile Include="$(SharedDirectory)\SimplePool.cs" />
4446
<Compile Include="$(SharedDirectory)\StringBuilderPool.cs" />
4547
<Compile Include="$(SharedDirectory)\TaskResult.cs" />
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
11
#nullable enable
2-
NuGet.Common.NuGetFeatureFlags
3-
static NuGet.Common.NuGetFeatureFlags.IsNSJDeserializationEnabledByEnvironment(NuGet.Common.IEnvironmentVariableReader? env = null) -> bool
4-
static NuGet.Common.NuGetFeatureFlags.NSJDeserializationFeatureSwitch.get -> bool

src/NuGet.Core/NuGet.Protocol/NuGet.Protocol.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
<Compile Include="$(SharedDirectory)\HashCodeCombiner.cs" />
4040
<Compile Include="$(SharedDirectory)\NoAllocEnumerateExtensions.cs" />
4141
<Compile Include="$(SharedDirectory)\NullableAttributes.cs" />
42+
<Compile Include="$(SharedDirectory)\NuGetFeatureFlags.cs" />
43+
<Compile Include="$(SharedDirectory)\AotCompatibilityAttributes.cs" />
4244
<Compile Include="$(SharedDirectory)\SimplePool.cs" />
4345
<Compile Include="$(SharedDirectory)\StringBuilderPool.cs" />
4446
<Compile Include="$(SharedDirectory)\TaskResult.cs" />

0 commit comments

Comments
 (0)