Skip to content
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

Merged
merged 2 commits into from
Mar 23, 2022
Merged

Abstraction for config framework #313

merged 2 commits into from
Mar 23, 2022

Conversation

isra-fel
Copy link
Member

@isra-fel isra-fel commented Mar 13, 2022

This PR contains the abstractions of config framework.
The main interface is IConfigManager, with abstract base class ConfigDefinition and a bunch of parameter and output types.

@isra-fel isra-fel marked this pull request as ready for review March 14, 2022 06:17
BethanyZhou
BethanyZhou previously approved these changes Mar 16, 2022
Copy link
Contributor

@BethanyZhou BethanyZhou left a 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);
Copy link
Member Author

@isra-fel isra-fel Mar 22, 2022

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>
Copy link
Member

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?

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'm not 100% sure if false = not specified, so let me just revert this csproj file.

dingmeng-xue
dingmeng-xue previously approved these changes Mar 23, 2022
@isra-fel
Copy link
Member Author

csproj is reverted. Please approve again @dingmeng-xue @BethanyZhou , thanks :)

@isra-fel isra-fel merged commit 846d6af into Azure:main Mar 23, 2022
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