Skip to content

AppSettings has wrong type (<string, IAppSetting> should be <string, string>) #46

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

Open
MattMcL4475 opened this issue Jan 24, 2017 · 0 comments

Comments

@MattMcL4475
Copy link

MattMcL4475 commented Jan 24, 2017

Currently when retrieving the AppSettings from a WebApp, the object that is returned is:

IReadOnlyDictionary<string, IAppSetting> AppSettings

This seems to be incorrect; I would expect AppSettings to contain a dictionary of key/value pairs. Instead, it contains a dictionary of key/[value.key, value.value] pairs.

Notice how one has to access the desired key/value pair:

var webApp = azure.WebApps.GetById(resourceId);
var settings = webApp.AppSettings;
foreach (var setting in settings)
{
    var key = setting.Value.Key;  // this is strange.  Should be "setting.Key"
    var value = setting.Value.Value; // this is strange.  Should be "setting.Value"
}
@MattMcL4475 MattMcL4475 changed the title IReadOnlyDictionary<string, IAppSetting> AppSettings has wrong signature IReadOnlyDictionary<string, IAppSetting> AppSettings should be IReadOnlyDictionary<string, string> Jan 24, 2017
@MattMcL4475 MattMcL4475 changed the title IReadOnlyDictionary<string, IAppSetting> AppSettings should be IReadOnlyDictionary<string, string> AppSettings has wrong type (<string, IAppSetting> should be <string, string> Jan 24, 2017
@MattMcL4475 MattMcL4475 changed the title AppSettings has wrong type (<string, IAppSetting> should be <string, string> AppSettings has wrong type (<string, IAppSetting> should be <string, string>) Jan 24, 2017
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

No branches or pull requests

1 participant