-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42113 from dotnet/merges/master-to-master-vs-deps
Merge master to master-vs-deps
- Loading branch information
Showing
38 changed files
with
1,200 additions
and
868 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
#nullable enable | ||
|
||
namespace Microsoft.CodeAnalysis | ||
{ | ||
internal static partial class SourceCodeKindExtensions | ||
{ | ||
internal static SourceCodeKind MapSpecifiedToEffectiveKind(this SourceCodeKind kind) | ||
{ | ||
switch (kind) | ||
{ | ||
case SourceCodeKind.Script: | ||
#pragma warning disable CS0618 // SourceCodeKind.Interactive is obsolete | ||
case SourceCodeKind.Interactive: | ||
#pragma warning restore CS0618 // SourceCodeKind.Interactive is obsolete | ||
return SourceCodeKind.Script; | ||
|
||
case SourceCodeKind.Regular: | ||
default: | ||
return SourceCodeKind.Regular; | ||
} | ||
} | ||
|
||
internal static bool IsValid(this SourceCodeKind value) | ||
{ | ||
return value >= SourceCodeKind.Regular && value <= SourceCodeKind.Script; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.