Skip to content

Add CustomRulePath property to settings file #803

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

Merged
merged 15 commits into from
Jul 31, 2017

Conversation

kapilmb
Copy link

@kapilmb kapilmb commented Jul 22, 2017

No description provided.

private bool OverrideSwitchParam(bool paramValue, string paramName)
{
return MyInvocation.BoundParameters.ContainsKey(paramName)
? ((SwitchParameter)MyInvocation.BoundParameters[paramName]).ToBool()

Choose a reason for hiding this comment

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

what if this is false..do you want to use the original value

Copy link
Author

Choose a reason for hiding this comment

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

The idea is that if the user doesn't specify a switch, then use the value from the settings file. But if the user specifies the switch on the command line then use the command line argument.

For example, if IncludeDefaultRules is set to $true in the settings file and if the user specifies -IncludeDefaultRules:$false on the command line, then the final value for IncludeDefaultRules will be set to $false

Choose a reason for hiding this comment

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

Ok

@Krishna-Vutukuri
Copy link

LGTM

@kapilmb kapilmb merged commit 0eee586 into development Jul 31, 2017
@kapilmb kapilmb deleted the kapilmb/update-settings branch July 31, 2017 21:11
@kapilmb
Copy link
Author

kapilmb commented Jul 31, 2017

@KrishnaV-MSFT Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants