Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

leverage out null pattern in IsValidDeploymentItem #4048

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ internal IList<DeploymentItem> GetClassLevelDeploymentItems(Type type, ICollecti
/// <param name="warning"> The warning message if it is an invalid deployment item. </param>
/// <returns> Returns true if it is a valid deployment item. </returns>
[SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#", Justification = "Internal method.")]
internal static bool IsValidDeploymentItem([NotNullWhen(true)] string? sourcePath, [NotNullWhen(true)] string? relativeOutputDirectory, out string warning)
internal static bool IsValidDeploymentItem([NotNullWhen(true)] string? sourcePath, [NotNullWhen(true)] string? relativeOutputDirectory, [NotNullWhen(false)] out string? warning)
{
if (StringEx.IsNullOrEmpty(sourcePath))
{
Expand All @@ -105,7 +105,7 @@ internal static bool IsValidDeploymentItem([NotNullWhen(true)] string? sourcePat
return false;
}

warning = string.Empty;
warning = null;
return true;
}

Expand Down
Loading