Skip to content

Commit e222260

Browse files
committed
Add net6.0 target framework
1 parent e8b7077 commit e222260

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Microsoft.VisualStudio.Validation/Microsoft.VisualStudio.Validation.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>netstandard2.0</TargetFramework>
3+
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
44
<RootNamespace>Microsoft</RootNamespace>
55

66
<Description>Common input validation and state verification utility methods.</Description>

src/Microsoft.VisualStudio.Validation/Requires.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ public static void Argument([DoesNotReturnIf(false)] bool condition, string? par
446446
NotNull(resourceManager, nameof(resourceManager));
447447
if (!condition)
448448
{
449-
throw new ArgumentException(Format(resourceManager.GetString(unformattedMessageResourceName, CultureInfo.CurrentCulture), arg1), parameterName);
449+
throw new ArgumentException(Format(resourceManager.GetString(unformattedMessageResourceName, CultureInfo.CurrentCulture)!, arg1), parameterName);
450450
}
451451
}
452452

@@ -463,7 +463,7 @@ public static void Argument([DoesNotReturnIf(false)] bool condition, string? par
463463
NotNull(resourceManager, nameof(resourceManager));
464464
if (!condition)
465465
{
466-
throw new ArgumentException(Format(resourceManager.GetString(unformattedMessageResourceName, CultureInfo.CurrentCulture), arg1, arg2), parameterName);
466+
throw new ArgumentException(Format(resourceManager.GetString(unformattedMessageResourceName, CultureInfo.CurrentCulture)!, arg1, arg2), parameterName);
467467
}
468468
}
469469

@@ -479,7 +479,7 @@ public static void Argument([DoesNotReturnIf(false)] bool condition, string? par
479479
NotNull(resourceManager, nameof(resourceManager));
480480
if (!condition)
481481
{
482-
throw new ArgumentException(Format(resourceManager.GetString(unformattedMessageResourceName, CultureInfo.CurrentCulture), args), parameterName);
482+
throw new ArgumentException(Format(resourceManager.GetString(unformattedMessageResourceName, CultureInfo.CurrentCulture)!, args), parameterName);
483483
}
484484
}
485485

src/Microsoft.VisualStudio.Validation/Verify.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public static void NotDisposed(IDisposableObservable disposedValue, string? mess
101101

102102
if (disposedValue.IsDisposed)
103103
{
104-
string objectName = disposedValue.GetType().FullName;
104+
string objectName = disposedValue.GetType().FullName ?? string.Empty;
105105
if (message is object)
106106
{
107107
throw new ObjectDisposedException(objectName, message);
@@ -121,7 +121,7 @@ public static void NotDisposed([DoesNotReturnIf(false)] bool condition, object?
121121
{
122122
if (!condition)
123123
{
124-
string objectName = disposedValue is object ? disposedValue.GetType().FullName : string.Empty;
124+
string objectName = disposedValue is object ? (disposedValue.GetType().FullName ?? string.Empty) : string.Empty;
125125
if (message is object)
126126
{
127127
throw new ObjectDisposedException(objectName, message);

0 commit comments

Comments
 (0)