-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Enable nullable: Microsoft.PowerShell.Commands.IRegistryWrapper #14177
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
Enable nullable: Microsoft.PowerShell.Commands.IRegistryWrapper #14177
Conversation
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
@powercode Please resolve merge conflicts. |
362a583
to
0bff675
Compare
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
/azp run |
Azure Pipelines successfully started running 5 pipeline(s). |
/azp list |
|
||
void SetValue(string name, object value, RegistryValueKind valueKind); | ||
void SetValue(string? name, object value, RegistryValueKind valueKind); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it mean to set a null-named key in the registry?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A registry key can have one value that is not associated with any name. When this unnamed value is displayed in the registry editor, the string "(Default)" appears instead of a name. To set this unnamed value, specify either null or the empty string ("") for name.
|
||
string[] GetValueNames(); | ||
|
||
void DeleteValue(string name); | ||
|
||
string[] GetSubKeyNames(); | ||
|
||
IRegistryWrapper CreateSubKey(string subkey); | ||
IRegistryWrapper? CreateSubKey(string subkey); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is null returned when create fails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returns
RegistryKey
The newly created subkey, or null if the operation failed. If a zero-length string is specified for subkey, the current RegistryKey object is returned.
|
||
void DeleteSubKeyTree(string subkey); | ||
|
||
object GetValue(string name); | ||
object? GetValue(string? name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is null returned when the key doesn't exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returns
Object
The value associated with name, or null if name is not found.
/azp run PowerShell-CI-Windows-daily |
Azure Pipelines successfully started running 1 pipeline(s). |
Tracking issue: #12631.