Skip to content

Commit e7bb224

Browse files
committed
Annotate Microsoft.VisualStudio.ProjectSystem.Managed.dll for nullability
1 parent 3ab58bd commit e7bb224

File tree

83 files changed

+428
-332
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+428
-332
lines changed

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
2626
<LangVersion>8.0</LangVersion>
2727
<Features>strict</Features>
28-
<NullableReferenceTypes>true</NullableReferenceTypes>
28+
<!--<NullableReferenceTypes Condition="'$(IsTestProject)' != 'true'">true</NullableReferenceTypes>-->
2929
<WarningsNotAsErrors>$(WarningsNotAsErrors);8600;8601;8602;8603;8604;8618;8619;8620;8622;8625;8626;8629</WarningsNotAsErrors>
3030
</PropertyGroup>
3131

src/Microsoft.VisualStudio.ProjectSystem.Managed/Build/BuildUtilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static ProjectPropertyElement GetProperty(ProjectRootElement project, str
6868
/// <returns>Collection of individual values in the property.</returns>
6969
public static IEnumerable<string> GetPropertyValues(string propertyValue, char delimiter = ';')
7070
{
71-
HashSet<string> seen = null;
71+
HashSet<string>? seen = null;
7272

7373
// We need to ensure that we return values in the specified order.
7474
foreach (string value in new LazyStringSplit(propertyValue, delimiter))

src/Microsoft.VisualStudio.ProjectSystem.Managed/Composition/OrderPrecedenceImportCollectionExtensions.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ internal static IEnumerable<T> ExtensionValues<T>(this OrderPrecedenceImportColl
5656
}
5757
}
5858

59-
public static T FirstOrDefaultValue<T>(this OrderPrecedenceImportCollection<T> imports, Func<T, bool> predicate)
59+
public static T? FirstOrDefaultValue<T>(this OrderPrecedenceImportCollection<T> imports, Func<T, bool> predicate)
60+
where T : class
6061
{
6162
Requires.NotNull(imports, nameof(imports));
6263

@@ -72,7 +73,8 @@ public static T FirstOrDefaultValue<T>(this OrderPrecedenceImportCollection<T> i
7273
return default;
7374
}
7475

75-
public static TImport FirstOrDefaultValue<TImport, TArg>(this OrderPrecedenceImportCollection<TImport> imports, Func<TImport, TArg, bool> predicate, TArg arg)
76+
public static TImport? FirstOrDefaultValue<TImport, TArg>(this OrderPrecedenceImportCollection<TImport> imports, Func<TImport, TArg, bool> predicate, TArg arg)
77+
where TImport : class
7678
{
7779
Requires.NotNull(imports, nameof(imports));
7880

src/Microsoft.VisualStudio.ProjectSystem.Managed/IO/SimpleFileWatcher.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ namespace Microsoft.VisualStudio.IO
1010
/// </summary>
1111
internal sealed class SimpleFileWatcher : IDisposable
1212
{
13-
private FileSystemWatcher FileWatcher { get; set; }
14-
private FileSystemEventHandler _handler;
15-
private RenamedEventHandler _renameHandler;
13+
private FileSystemWatcher? FileWatcher { get; set; }
14+
private FileSystemEventHandler? _handler;
15+
private RenamedEventHandler? _renameHandler;
1616

1717
// For unit tests
1818
public SimpleFileWatcher()

src/Microsoft.VisualStudio.ProjectSystem.Managed/ImmutableCollectionLinqExtensions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ public static bool Any<TKey, TValue>(this ImmutableDictionary<TKey, TValue> immu
3939
return false;
4040
}
4141

42-
public static T FirstOrDefault<T, TArg>(this ImmutableArray<T> immutableArray, Func<T, TArg, bool> predicate, TArg arg)
42+
public static T? FirstOrDefault<T, TArg>(this ImmutableArray<T> immutableArray, Func<T, TArg, bool> predicate, TArg arg)
43+
where T : class
4344
{
4445
foreach (T obj in immutableArray)
4546
{

src/Microsoft.VisualStudio.ProjectSystem.Managed/LinqExtensions.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ public static T FirstOrDefault<T, TArg>(this IEnumerable<T> source, Func<T, TArg
1717
return obj;
1818
}
1919

20-
return default;
20+
return default!;
2121
}
2222

2323
[Pure]
24-
public static T SingleOrDefault<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg)
24+
public static T? SingleOrDefault<T, TArg>(this IEnumerable<T> source, Func<T, TArg, bool> predicate, TArg arg)
25+
where T : class
2526
{
2627
using (IEnumerator<T> enumerator = source.GetEnumerator())
2728
{

src/Microsoft.VisualStudio.ProjectSystem.Managed/Microsoft.VisualStudio.ProjectSystem.Managed.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<Summary>Microsoft VisualStudio Managed Project System</Summary>
1313
<PackageTags>Roslyn Managed Project System VisualStudio</PackageTags>
1414
<NoWarn>$(NoWarn);NU5125</NoWarn>
15+
<NullableReferenceTypes>true</NullableReferenceTypes>
1516
</PropertyGroup>
1617
<ItemGroup>
1718
<InternalsVisibleTo Include="Microsoft.VisualStudio.ProjectSystem.Managed.VS" />

src/Microsoft.VisualStudio.ProjectSystem.Managed/PooledObjects/ObjectPool.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ private struct Element
3333

3434
// Storage for the pool objects. The first item is stored in a dedicated field because we
3535
// expect to be able to satisfy most requests from it.
36-
private T _firstItem;
36+
private T? _firstItem;
3737
private readonly Element[] _items;
3838

3939
// factory is stored for the lifetime of the pool. We will call this only when pool needs to
@@ -72,7 +72,7 @@ internal T Allocate()
7272
// Note that the initial read is optimistically not synchronized. That is intentional.
7373
// We will interlock only when we have a candidate. in a worst case we may miss some
7474
// recently returned objects. Not a big deal.
75-
T inst = _firstItem;
75+
T? inst = _firstItem;
7676
if (inst == null || inst != Interlocked.CompareExchange(ref _firstItem, null, inst))
7777
{
7878
inst = AllocateSlow();
@@ -93,7 +93,9 @@ private T AllocateSlow()
9393
T inst = items[i].Value;
9494
if (inst != null)
9595
{
96+
#pragma warning disable CS8625 // Workaround https://github.com/dotnet/roslyn/issues/31865
9697
if (inst == Interlocked.CompareExchange(ref items[i].Value, null, inst))
98+
#pragma warning restore CS8625
9799
{
98100
return inst;
99101
}

src/Microsoft.VisualStudio.ProjectSystem.Managed/PooledObjects/PooledArray.Enumerator.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ public void Dispose()
3232
{
3333
}
3434

35+
#pragma warning disable CS8603 // Workaround https://github.com/dotnet/roslyn/issues/31867
3536
object System.Collections.IEnumerator.Current => Current;
37+
#pragma warning restore CS8603
3638

3739
public void Reset() => _index = -1;
3840
}

src/Microsoft.VisualStudio.ProjectSystem.Managed/PooledObjects/PooledArray.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ internal sealed partial class PooledArray<T> : IReadOnlyCollection<T>, IReadOnly
1313
{
1414
private readonly ImmutableArray<T>.Builder _builder;
1515

16-
private readonly ObjectPool<PooledArray<T>> _pool;
16+
private readonly ObjectPool<PooledArray<T>>? _pool;
1717

1818
public PooledArray(int size)
1919
{
@@ -71,7 +71,9 @@ public void SetItem(int index, T value)
7171
{
7272
while (index > _builder.Count)
7373
{
74+
#pragma warning disable CS8625 // Workaround https://github.com/dotnet/roslyn/issues/31865
7475
_builder.Add(default);
76+
#pragma warning restore CS8625
7577
}
7678

7779
if (index == _builder.Count)
@@ -177,7 +179,10 @@ public ImmutableArray<U> ToDowncastedImmutable<U>()
177179
var tmp = PooledArray<U>.GetInstance(Count);
178180
foreach (T i in this)
179181
{
182+
#pragma warning disable CS8600,CS8604 // Workaround for https://github.com/dotnet/roslyn/issues/31866
180183
tmp.Add((U)i);
184+
#pragma warning restore CS8600,CS8604
185+
181186
}
182187

183188
return tmp.ToImmutableAndFree();
@@ -213,7 +218,7 @@ public T[] ToArrayAndFree()
213218
// 1) Expose Freeing primitive.
214219
public void Free()
215220
{
216-
ObjectPool<PooledArray<T>> pool = _pool;
221+
ObjectPool<PooledArray<T>>? pool = _pool;
217222
if (pool != null)
218223
{
219224
// We do not want to retain (potentially indefinitely) very large builders
@@ -274,7 +279,7 @@ public static ObjectPool<PooledArray<T>> CreatePool()
274279

275280
public static ObjectPool<PooledArray<T>> CreatePool(int size)
276281
{
277-
ObjectPool<PooledArray<T>> pool = null;
282+
ObjectPool<PooledArray<T>>? pool = null;
278283
pool = new ObjectPool<PooledArray<T>>(() => new PooledArray<T>(pool), size);
279284
return pool;
280285
}
@@ -284,7 +289,9 @@ public Enumerator GetEnumerator()
284289
return new Enumerator(this);
285290
}
286291

292+
#pragma warning disable CS8616 // Workaround https://github.com/dotnet/roslyn/issues/31862
287293
IEnumerator<T> IEnumerable<T>.GetEnumerator()
294+
#pragma warning restore CS8616
288295
{
289296
return GetEnumerator();
290297
}
@@ -294,7 +301,7 @@ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
294301
return GetEnumerator();
295302
}
296303

297-
internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K> comparer = null)
304+
internal Dictionary<K, ImmutableArray<T>> ToDictionary<K>(Func<T, K> keySelector, IEqualityComparer<K>? comparer = null)
298305
{
299306
if (Count == 1)
300307
{

src/Microsoft.VisualStudio.ProjectSystem.Managed/PooledObjects/PooledDictionary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void Free()
3535
// if someone needs to create a pool;
3636
public static ObjectPool<PooledDictionary<K, V>> CreatePool()
3737
{
38-
ObjectPool<PooledDictionary<K, V>> pool = null;
38+
ObjectPool<PooledDictionary<K, V>>? pool = null;
3939
pool = new ObjectPool<PooledDictionary<K, V>>(() => new PooledDictionary<K, V>(pool), 128);
4040
return pool;
4141
}

src/Microsoft.VisualStudio.ProjectSystem.Managed/PooledObjects/PooledHashSet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public void Free()
2727
// if someone needs to create a pool;
2828
public static ObjectPool<PooledHashSet<T>> CreatePool()
2929
{
30-
ObjectPool<PooledHashSet<T>> pool = null;
30+
ObjectPool<PooledHashSet<T>>? pool = null;
3131
pool = new ObjectPool<PooledHashSet<T>>(() => new PooledHashSet<T>(pool), 128);
3232
return pool;
3333
}

src/Microsoft.VisualStudio.ProjectSystem.Managed/PooledObjects/PooledStringBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public string ToStringAndFree(int startIndex, int length)
6363
/// <returns></returns>
6464
public static ObjectPool<PooledStringBuilder> CreatePool(int size = 32)
6565
{
66-
ObjectPool<PooledStringBuilder> pool = null;
66+
ObjectPool<PooledStringBuilder>? pool = null;
6767
pool = new ObjectPool<PooledStringBuilder>(() => new PooledStringBuilder(pool), size);
6868
return pool;
6969
}

src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/AbstractMultiLifetimeComponent.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ internal abstract class AbstractMultiLifetimeComponent : OnceInitializedOnceDisp
1515
{
1616
private readonly object _lock = new object();
1717
private TaskCompletionSource<object> _loadedSource = new TaskCompletionSource<object>();
18-
private IMultiLifetimeInstance _instance;
18+
private IMultiLifetimeInstance? _instance;
1919

2020
protected AbstractMultiLifetimeComponent(JoinableTaskContextNode joinableTaskContextNode)
2121
: base(joinableTaskContextNode)
2222
{
2323
}
2424

25-
public IMultiLifetimeInstance Instance
25+
public IMultiLifetimeInstance? Instance
2626
{
2727
get { return _instance; }
2828
}
@@ -49,7 +49,7 @@ public async Task LoadAsync()
4949

5050
private async Task LoadCoreAsync()
5151
{
52-
TaskCompletionSource<object> loadedSource = null;
52+
TaskCompletionSource<object>? loadedSource = null;
5353
IMultiLifetimeInstance instance;
5454
lock (_lock)
5555
{
@@ -65,12 +65,12 @@ private async Task LoadCoreAsync()
6565
// While all callers should wait on InitializeAsync,
6666
// only one should complete the completion source
6767
await instance.InitializeAsync();
68-
loadedSource?.SetResult(null);
68+
loadedSource?.SetResult(null!);
6969
}
7070

7171
public Task UnloadAsync()
7272
{
73-
IMultiLifetimeInstance instance = null;
73+
IMultiLifetimeInstance? instance = null;
7474

7575
lock (_lock)
7676
{

src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/AbstractSpecialFolderProjectTreePropertiesProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private void ApplySpecialFolderProperties(IProjectTreeCustomizablePropertyValues
9393
propertyValues.Flags = propertyValues.Flags.Union(FolderFlags);
9494

9595
// Avoid overwriting icon if the image provider didn't provide one
96-
ProjectImageMoniker icon = _imageProvider.GetProjectImage(FolderImageKey);
96+
ProjectImageMoniker? icon = _imageProvider.GetProjectImage(FolderImageKey);
9797
if (icon != null)
9898
{
9999
propertyValues.Icon = icon;

src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/ActiveConfiguredProjectsLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ internal class ActiveConfiguredProjectsLoader : OnceInitializedOnceDisposed
1717
private readonly IActiveConfigurationGroupService _activeConfigurationGroupService;
1818
private readonly IUnconfiguredProjectTasksService _tasksService;
1919
private readonly ITargetBlock<IProjectVersionedValue<IConfigurationGroup<ProjectConfiguration>>> _targetBlock;
20-
private IDisposable _subscription;
20+
private IDisposable? _subscription;
2121

2222
[ImportingConstructor]
2323
public ActiveConfiguredProjectsLoader(UnconfiguredProject project, IActiveConfigurationGroupService activeConfigurationGroupService, IUnconfiguredProjectTasksService tasksService)

src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/ActiveConfiguredProjectsProvider.cs

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,28 +76,31 @@ public async Task<ImmutableDictionary<string, ConfiguredProject>> GetActiveConfi
7676
{
7777
var builder = PooledDictionary<string, ConfiguredProject>.GetInstance();
7878

79-
ActiveConfiguredObjects<ConfiguredProject> projects = await GetActiveConfiguredProjectsAsync();
79+
ActiveConfiguredObjects<ConfiguredProject>? projects = await GetActiveConfiguredProjectsAsync();
8080

81-
bool isCrossTargeting = projects.Objects.All(project => project.ProjectConfiguration.IsCrossTargeting());
82-
if (isCrossTargeting)
81+
if (projects != null)
8382
{
84-
foreach (ConfiguredProject project in projects.Objects)
83+
bool isCrossTargeting = projects.Objects.All(project => project.ProjectConfiguration.IsCrossTargeting());
84+
if (isCrossTargeting)
8585
{
86-
string targetFramework = project.ProjectConfiguration.Dimensions[ConfigurationGeneral.TargetFrameworkProperty];
87-
builder.Add(targetFramework, project);
86+
foreach (ConfiguredProject project in projects.Objects)
87+
{
88+
string targetFramework = project.ProjectConfiguration.Dimensions[ConfigurationGeneral.TargetFrameworkProperty];
89+
builder.Add(targetFramework, project);
90+
}
91+
}
92+
else
93+
{
94+
builder.Add(string.Empty, projects.Objects[0]);
8895
}
89-
}
90-
else
91-
{
92-
builder.Add(string.Empty, projects.Objects[0]);
9396
}
9497

9598
return builder.ToImmutableDictionaryAndFree();
9699
}
97100

98-
public async Task<ActiveConfiguredObjects<ConfiguredProject>> GetActiveConfiguredProjectsAsync()
101+
public async Task<ActiveConfiguredObjects<ConfiguredProject>?> GetActiveConfiguredProjectsAsync()
99102
{
100-
ActiveConfiguredObjects<ProjectConfiguration> configurations = await GetActiveProjectConfigurationsAsync();
103+
ActiveConfiguredObjects<ProjectConfiguration>? configurations = await GetActiveProjectConfigurationsAsync();
101104
if (configurations == null)
102105
return null;
103106

@@ -113,7 +116,7 @@ public async Task<ActiveConfiguredObjects<ConfiguredProject>> GetActiveConfigure
113116
return new ActiveConfiguredObjects<ConfiguredProject>(builder.MoveToImmutable(), configurations.DimensionNames);
114117
}
115118

116-
public async Task<ActiveConfiguredObjects<ProjectConfiguration>> GetActiveProjectConfigurationsAsync()
119+
public async Task<ActiveConfiguredObjects<ProjectConfiguration>?> GetActiveProjectConfigurationsAsync()
117120
{
118121
ProjectConfiguration activeSolutionConfiguration = _services.ActiveConfiguredProjectProvider.ActiveProjectConfiguration;
119122
if (activeSolutionConfiguration == null)

src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/AppDesignerFolderProjectTreePropertiesProvider.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ public void UpdateProjectTreeSettings(IImmutableDictionary<string, IProjectRuleS
5858
//
5959
// TODO: Read these default values from the rules themselves
6060
// See: https://github.com/dotnet/roslyn-project-system/issues/209
61-
string folderName = ruleSnapshots.GetPropertyOrDefault(AppDesigner.SchemaName, AppDesigner.FolderNameProperty, "Properties");
62-
string contextsVisibleOnlyInShowAllFiles = ruleSnapshots.GetPropertyOrDefault(AppDesigner.SchemaName, AppDesigner.ContentsVisibleOnlyInShowAllFilesProperty, "false");
61+
string? folderName = ruleSnapshots.GetPropertyOrDefault(AppDesigner.SchemaName, AppDesigner.FolderNameProperty, "Properties");
62+
string? contextsVisibleOnlyInShowAllFiles = ruleSnapshots.GetPropertyOrDefault(AppDesigner.SchemaName, AppDesigner.ContentsVisibleOnlyInShowAllFilesProperty, "false");
6363

64-
projectTreeSettings = projectTreeSettings.SetItem(AppDesigner.FolderNameProperty, folderName);
65-
projectTreeSettings = projectTreeSettings.SetItem(AppDesigner.ContentsVisibleOnlyInShowAllFilesProperty, contextsVisibleOnlyInShowAllFiles);
64+
projectTreeSettings = projectTreeSettings.SetItem(AppDesigner.FolderNameProperty, folderName!);
65+
projectTreeSettings = projectTreeSettings.SetItem(AppDesigner.ContentsVisibleOnlyInShowAllFilesProperty, contextsVisibleOnlyInShowAllFiles!);
6666
}
6767

6868
protected sealed override bool IsCandidateSpecialFolder(IProjectTreeCustomizablePropertyContext propertyContext, ProjectTreeFlags flags)

src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Build/ImplicitlyActiveConfiguredProjectReadyToBuild.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private Task GetLatestActivationTask()
4848
}
4949
else if (nowActive)
5050
{
51-
_activationTask.TrySetResult(null);
51+
_activationTask.TrySetResult(null!);
5252
}
5353

5454
return _activationTask.Task;

src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Configuration/BaseProjectConfigurationDimensionProvider.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ internal abstract class BaseProjectConfigurationDimensionProvider : IProjectConf
2424
/// <param name="dimensionName">Name of the dimension.</param>
2525
/// <param name="propertyName">Name of the project property containing the dimension values.</param>
2626
/// <param name="dimensionDefaultValue">The default value of the dimension, for example "AnyCPU".</param>
27-
protected BaseProjectConfigurationDimensionProvider(IProjectAccessor projectAccessor, string dimensionName, string propertyName, string dimensionDefaultValue = null)
27+
protected BaseProjectConfigurationDimensionProvider(IProjectAccessor projectAccessor, string dimensionName, string propertyName, string? dimensionDefaultValue = null)
2828
{
2929
Requires.NotNull(projectAccessor, nameof(projectAccessor));
3030

@@ -44,7 +44,7 @@ public string PropertyName
4444
get;
4545
}
4646

47-
public string DimensionDefaultValue
47+
public string? DimensionDefaultValue
4848
{
4949
get;
5050
}
@@ -134,7 +134,7 @@ public virtual async Task<IEnumerable<KeyValuePair<string, IEnumerable<string>>>
134134

135135
public async Task<IEnumerable<KeyValuePair<string, string>>> GetBestGuessDefaultValuesForDimensionsAsync(UnconfiguredProject project)
136136
{
137-
string defaultValue = await FindDefaultValueFromDimensionPropertyAsync(project) ?? DimensionDefaultValue;
137+
string? defaultValue = await FindDefaultValueFromDimensionPropertyAsync(project) ?? DimensionDefaultValue;
138138
if (defaultValue != null)
139139
return new[] { new KeyValuePair<string, string>(DimensionName, defaultValue) };
140140

@@ -158,7 +158,7 @@ public async Task<IEnumerable<KeyValuePair<string, string>>> GetBestGuessDefault
158158
/// <remarks>
159159
/// This needs to get the evaluated property in order to get inherited properties defines in props or targets.
160160
/// </remarks>
161-
protected async Task<string> GetPropertyValue(UnconfiguredProject project, string propertyName = null)
161+
protected async Task<string> GetPropertyValue(UnconfiguredProject project, string? propertyName = null)
162162
{
163163
ConfiguredProject configuredProject = await project.GetSuggestedConfiguredProjectAsync();
164164

@@ -168,7 +168,7 @@ protected async Task<string> GetPropertyValue(UnconfiguredProject project, strin
168168
});
169169
}
170170

171-
private async Task<string> FindDefaultValueFromDimensionPropertyAsync(UnconfiguredProject project)
171+
private async Task<string?> FindDefaultValueFromDimensionPropertyAsync(UnconfiguredProject project)
172172
{
173173
string values = await FindDimensionPropertyAsync(project);
174174
if (string.IsNullOrEmpty(values))

0 commit comments

Comments
 (0)