-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable nullables on SettingsMigrator (#3744)
- v17.14.0-preview-25107-01
- v17.13.0
- v17.12.0
- v17.11.1
- v17.11.0
- v17.11.0-release-24373-02
- v17.11.0-release-24352-06
- v17.10.0
- v17.10.0-release-24177-07
- v17.10.0-preview-24080-01
- v17.9.0
- v17.9.0-release-23619-01
- v17.9.0-preview-23577-04
- v17.9.0-preview-23531-01
- v17.9.0-preview-23503-02
- v17.8.0
- v17.8.0-release-23468-02
- v17.8.0-rebrand
- v17.8.0-preview-23424-02
- v17.8.0-preview-23371-04
- v17.7.2
- v17.7.1
- v17.7.0
- v17.7.0-preview-23364-03
- v17.7.0-preview.23280.1
- v17.7.0-preview.23214.2
- v17.6.3
- v17.6.2
- v17.6.1
- v17.6.0
- v17.6.0-preview-20230223-05
- v17.5.0
- v17.5.0-preview-20221221-03
- v17.5.0-preview-20221003-04
- v17.4.1
- v17.4.0
- v17.4.0-preview-20221003-03
- v17.4.0-preview-20220726-02
- v17.4.0-preview-20220707-01
- v17.3.3
- v17.3.2
- v17.3.1
- v17.3.0
- before-arcade
1 parent
fd9d907
commit 39ae335
Showing
8 changed files
with
151 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
// <auto-generated> | ||
// This code is auto-generated. Changes to this file will be lost! | ||
// This T4 file is copied in various projects because inclusion as link or through shared project | ||
// doesn't allow to generate the C# file locally. If some modification is required, please update | ||
// all instances. | ||
// </auto-generated> | ||
|
||
#nullable enable | ||
|
||
using System.Diagnostics; | ||
using System.Diagnostics.CodeAnalysis; | ||
|
||
namespace SettingsMigrator; | ||
|
||
internal static class StringUtils | ||
{ | ||
/// <inheritdoc cref="string.IsNullOrEmpty(string)"/> | ||
[SuppressMessage("ApiDesign", "RS0030:Do not used banned APIs", Justification = "Replacement API to allow nullable hints for compiler")] | ||
public static bool IsNullOrEmpty([NotNullWhen(returnValue: false)] this string? value) | ||
=> string.IsNullOrEmpty(value); | ||
|
||
/// <inheritdoc cref="string.IsNullOrWhiteSpace(string)"/> | ||
[SuppressMessage("ApiDesign", "RS0030:Do not used banned APIs", Justification = "Replacement API to allow nullable hints for compiler")] | ||
public static bool IsNullOrWhiteSpace([NotNullWhen(returnValue: false)] this string? value) | ||
=> string.IsNullOrWhiteSpace(value); | ||
} | ||
|
||
[SuppressMessage("ApiDesign", "RS0030:Do not used banned APIs", Justification = "Replacement API to allow nullable hints for compiler")] | ||
internal static class TPDebug | ||
{ | ||
/// <inheritdoc cref="Debug.Assert(bool)"/> | ||
[Conditional("DEBUG")] | ||
public static void Assert([DoesNotReturnIf(false)] bool b) | ||
=> Debug.Assert(b); | ||
|
||
/// <inheritdoc cref="Debug.Assert(bool, string)"/> | ||
[Conditional("DEBUG")] | ||
public static void Assert([DoesNotReturnIf(false)] bool b, string message) | ||
=> Debug.Assert(b, message); | ||
} |
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,45 @@ | ||
<#@ template debug="true" hostspecific="true" language="C#" #> | ||
<#@ output extension=".cs" #> | ||
<#@ assembly name="System.Core" #> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
// <auto-generated> | ||
// This code is auto-generated. Changes to this file will be lost! | ||
// This T4 file is copied in various projects because inclusion as link or through shared project | ||
// doesn't allow to generate the C# file locally. If some modification is required, please update | ||
// all instances. | ||
// </auto-generated> | ||
|
||
#nullable enable | ||
|
||
using System.Diagnostics; | ||
using System.Diagnostics.CodeAnalysis; | ||
|
||
namespace <#= System.Runtime.Remoting.Messaging.CallContext.LogicalGetData("NamespaceHint") #>; | ||
|
||
internal static class StringUtils | ||
{ | ||
/// <inheritdoc cref="string.IsNullOrEmpty(string)"/> | ||
[SuppressMessage("ApiDesign", "RS0030:Do not used banned APIs", Justification = "Replacement API to allow nullable hints for compiler")] | ||
public static bool IsNullOrEmpty([NotNullWhen(returnValue: false)] this string? value) | ||
=> string.IsNullOrEmpty(value); | ||
|
||
/// <inheritdoc cref="string.IsNullOrWhiteSpace(string)"/> | ||
[SuppressMessage("ApiDesign", "RS0030:Do not used banned APIs", Justification = "Replacement API to allow nullable hints for compiler")] | ||
public static bool IsNullOrWhiteSpace([NotNullWhen(returnValue: false)] this string? value) | ||
=> string.IsNullOrWhiteSpace(value); | ||
} | ||
|
||
[SuppressMessage("ApiDesign", "RS0030:Do not used banned APIs", Justification = "Replacement API to allow nullable hints for compiler")] | ||
internal static class TPDebug | ||
{ | ||
/// <inheritdoc cref="Debug.Assert(bool)"/> | ||
[Conditional("DEBUG")] | ||
public static void Assert([DoesNotReturnIf(false)] bool b) | ||
=> Debug.Assert(b); | ||
|
||
/// <inheritdoc cref="Debug.Assert(bool, string)"/> | ||
[Conditional("DEBUG")] | ||
public static void Assert([DoesNotReturnIf(false)] bool b, string message) | ||
=> Debug.Assert(b, message); | ||
} |
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 |
---|---|---|
@@ -1,26 +1,27 @@ | ||
#nullable enable | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.Migrator | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.Migrator.Migrate(string oldFilePath, string newFilePath) -> void | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.Migrator.Migrate(string! oldFilePath, string! newFilePath) -> void | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.Migrator.Migrator() -> void | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.PathResolver | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.PathResolver.GetTargetPath(string[] args) -> string | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.PathResolver.GetTargetPath(string![]! args) -> string? | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.PathResolver.PathResolver() -> void | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.Program | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Datacollectors.get -> System.Xml.XmlNodeList | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Datacollectors.get -> System.Xml.XmlNodeList? | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Datacollectors.set -> void | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Deployment.get -> System.Xml.XmlNode | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Deployment.get -> System.Xml.XmlNode? | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Deployment.set -> void | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Execution.get -> System.Xml.XmlNode | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Execution.get -> System.Xml.XmlNode? | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Execution.set -> void | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Hosts.get -> System.Xml.XmlNode | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Hosts.get -> System.Xml.XmlNode? | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Hosts.set -> void | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Script.get -> System.Xml.XmlNode | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Script.get -> System.Xml.XmlNode? | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Script.set -> void | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.TestSettingsNodes() -> void | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Timeout.get -> System.Xml.XmlNode | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Timeout.get -> System.Xml.XmlNode? | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.Timeout.set -> void | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.UnitTestConfig.get -> System.Xml.XmlNode | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.UnitTestConfig.get -> System.Xml.XmlNode? | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.UnitTestConfig.set -> void | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.WebSettings.get -> System.Xml.XmlNode | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.WebSettings.get -> System.Xml.XmlNode? | ||
Microsoft.VisualStudio.TestPlatform.SettingsMigrator.TestSettingsNodes.WebSettings.set -> void | ||
static Microsoft.VisualStudio.TestPlatform.SettingsMigrator.Program.Main(string[] args) -> int | ||
static Microsoft.VisualStudio.TestPlatform.SettingsMigrator.Program.Main(string![]! args) -> int |
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