Skip to content

Conversation

@dingmeng-xue
Copy link
Member

No description provided.

@dingmeng-xue dingmeng-xue requested a review from isra-fel March 6, 2020 20:17
@isra-fel isra-fel self-assigned this Mar 7, 2020
/// If false, the logic of referencing default context would be omitted.
/// </summary>
protected virtual bool RequireDefaultContext => true;
protected virtual bool RequireDefaultContext() { return true; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've already been using this property in two cmdlets. Changing it to a method will require us to change those cmdlets as well. Would you want me to do that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example here we need to do the following update

-        protected override bool RequireDefaultContext => false;
+        protected override bool RequireDefaultContext() { return false; }

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. your original approach doesn't work. You can test too. No idea the syntax you are using. but my approach is the safe way and I verified it. I haven't submitted my commits in azure-powershell.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I write a simple example. It shows your code is correct. I'd like to change them back to follow convention if there is no other problem.

@isra-fel isra-fel merged commit 9560910 into Azure:msal Mar 7, 2020
isra-fel pushed a commit to Azure/azure-powershell that referenced this pull request Mar 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants