Skip to content

Conversation

@StephenMolloy
Copy link
Collaborator

Oops. I missed a few steps when fleshing out a non-greedy KeyPerFile.GetValue().

<add key="jsonCustomSetting1" value="Will be replaced by 'SimpleJson' with prefix='customSettings:' and stripPrefix='true'." />
<add key="SecretFromFile1" value="This will be replaced by KeyPerFile." />
<add key="SECRETFROMFILE2" value="As will this one." />
<add key="SubFeature--FeatureSecretA" value="This will be replaced by KeyPerFile if keyDelimiter is set to '--'." />
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please more specific and point out as File1? This could be confusing and leading to confusion

## ##
########################################################################################################################

Hello there. Sorry to bother you. If this is the first time you are installing this configuration builder into your
Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't bring up this message like this. If you do want to say something "sorry", I would be more specific on what the sorry is about, like sorry that sorry if this annoys you....

Copy link
Contributor

Choose a reason for hiding this comment

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

What about adding a "Warning" is more appropriate in this case, what do you think?

<add name="Secrets" userSecretsFile="~/App_Data/secrets.xml" mode="Greedy" type="Microsoft.Configuration.ConfigurationBuilders.UserSecretsConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.UserSecrets, Version=1.0.0.0, Culture=neutral" />
<add name="SimpleJson" jsonFile="~/App_Data/settings.json" ignoreMissingFile="true" type="Microsoft.Configuration.ConfigurationBuilders.SimpleJsonConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.Json, Version=1.0.0.0, Culture=neutral" />
<add name="KeyPerFile" directoryPath="~/../KeyPerFileSampleRoot" mode="Greedy" keyDelimiter="--" type="Microsoft.Configuration.ConfigurationBuilders.KeyPerFileConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.KeyPerFile, Version=1.0.0.0, Culture=neutral" />
<add name="KeyPerFile" directoryPath="~/../KeyPerFileSampleRoot" mode="Strict" keyDelimiter="--" type="Microsoft.Configuration.ConfigurationBuilders.KeyPerFileConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.KeyPerFile, Version=1.0.0.0, Culture=neutral" />
Copy link
Contributor

Choose a reason for hiding this comment

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

For my understanding, this is changed only for your testing purpose, correct?

@HongGit HongGit merged commit fba14ad into master Jul 6, 2018
@StephenMolloy StephenMolloy deleted the KeyPerFile-fix branch July 6, 2018 18:42
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.

4 participants