-
Notifications
You must be signed in to change notification settings - Fork 56
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
Abstraction for config framework #313
Conversation
src/Authentication.Abstractions/Authentication.Abstractions.csproj
Outdated
Show resolved
Hide resolved
src/Authentication.Abstractions/Authentication.Abstractions.csproj
Outdated
Show resolved
Hide resolved
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.
LGTM
/// The `invocation` parameter is typed `object` because we don't want Authentication.Abstractions project to take dependency on PowerShell SDK. | ||
/// However at runtime it needs to be of type `InvocationInfo`.</remarks> | ||
/// <returns>Value of the config, or the default value if never set.</returns> | ||
T GetConfigValue<T>(string key, object invocation = null); |
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.
invocation
was made an object
type as we don't want to take dependency on the PowerShell SDK in the Authentication.Abstractions
project, yet we still like to keep the simple syntax.
@@ -2,6 +2,7 @@ | |||
|
|||
<PropertyGroup> | |||
<IncludeHyak>true</IncludeHyak> | |||
<IsCmdletProject>false</IsCmdletProject> |
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.
@isral-fel, Is it still required?
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.
I'm not 100% sure if false = not specified, so let me just revert this csproj file.
csproj is reverted. Please approve again @dingmeng-xue @BethanyZhou , thanks :) |
This PR contains the abstractions of config framework.
The main interface is
IConfigManager
, with abstract base classConfigDefinition
and a bunch of parameter and output types.