-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add helpful ShellFeaturesManager extensions #16191
Conversation
Great, thanks a lot 🤗 This is such a needed thing... |
return featuresToEnable; | ||
} | ||
|
||
public static async Task EnableFeaturesAsync(this IShellFeaturesManager shellFeaturesManager, params string[] featureIds) | ||
{ | ||
ArgumentNullException.ThrowIfNull(featureIds); |
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.
You need to check if the array is empty too
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.
It would do nothing when array is empty as this is handled by the underlying method.
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.
IMHO know need to call GetAvailableFeaturesAsync()
if the featureIds
is empty
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.
@hishamco done. anything else?
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.
The second time you can request a review rather than mention
Adding the following two extensions