8000 Enable nullable: Microsoft.PowerShell.Commands.IRegistryWrapper (#14177) · PowerShell/PowerShell@e927e94 · GitHub
[go: up one dir, main page]

Skip to content

Commit e927e94

Browse files
authored
Enable nullable: Microsoft.PowerShell.Commands.IRegistryWrapper (#14177)
1 parent 562f4f3 commit e927e94

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/System.Management.Automation/namespaces/RegistryWrapper.cs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,31 @@
1717

1818
namespace Microsoft.PowerShell.Commands
1919
{
20+
21+
#nullable enable
2022
internal interface IRegistryWrapper
2123
{
22-
void SetValue(string name, object value);
24+
void SetValue(string? name, object value);
2325

24-
void SetValue(string name, object value, RegistryValueKind valueKind);
26+
void SetValue(string? name, object value, RegistryValueKind valueKind);
2527

2628
string[] GetValueNames();
2729 8000

2830
void DeleteValue(string name);
2931

3032
string[] GetSubKeyNames();
3133

32-
IRegistryWrapper CreateSubKey(string subkey);
34+
IRegistryWrapper? CreateSubKey(string subkey);
3335

34-
IRegistryWrapper OpenSubKey(string name, bool writable);
36+
IRegistryWrapper? OpenSubKey(string name, bool writable);
3537

3638
void DeleteSubKeyTree(string subkey);
3739

38-
object GetValue(string name);
40+
object? GetValue(string? name);
3941

40-
object GetValue(string name, object defaultValue, RegistryValueOptions options);
42+
object? GetValue(string? name, object? defaultValue, RegistryValueOptions options);
4143

42-
RegistryValueKind GetValueKind(string name);
44+
RegistryValueKind GetValueKind(string? name);
4345

4446
object RegistryKey { get; }
4547

@@ -53,6 +55,7 @@ internal interface IRegistryWrapper
5355

5456
int SubKeyCount { get; }
5557
}
58+
#nullable restore
5659

5760
internal static class RegistryWrapperUtils
5861
{

0 commit comments

Comments
 (0)
0