{"action":"closed","issue":{"url":"https://api.github.com/repos/NFig/NFig/issues/4","repository_url":"https://api.github.com/repos/NFig/NFig","labels_url":"https://api.github.com/repos/NFig/NFig/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/NFig/NFig/issues/4/comments","events_url":"https://api.github.com/repos/NFig/NFig/issues/4/events","html_url":"https://github.com/NFig/NFig/issues/4","id":164681306,"number":4,"title":"Breaking 3.0 Changes","user":{"login":"bretcope","id":3608260,"avatar_url":"https://avatars.githubusercontent.com/u/3608260?v=3","gravatar_id":"","url":"https://api.github.com/users/bretcope","html_url":"https://github.com/bretcope","followers_url":"https://api.github.com/users/bretcope/followers","following_url":"https://api.github.com/users/bretcope/following{/other_user}","gists_url":"https://api.github.com/users/bretcope/gists{/gist_id}","starred_url":"https://api.github.com/users/bretcope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bretcope/subscriptions","organizations_url":"https://api.github.com/users/bretcope/orgs","repos_url":"https://api.github.com/users/bretcope/repos","events_url":"https://api.github.com/users/bretcope/events{/privacy}","received_events_url":"https://api.github.com/users/bretcope/received_events","type":"User","site_admin":false},"labels":[{"id":405549175,"url":"https://api.github.com/repos/NFig/NFig/labels/announcement","name":"announcement","color":"c2e0c6","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/NFig/NFig/milestones/1","html_url":"https://github.com/NFig/NFig/milestones/3.0","labels_url":"https://api.github.com/repos/NFig/NFig/milestones/1/labels","id":1873704,"number":1,"title":"3.0","description":"","creator":{"login":"bretcope","id":3608260,"avatar_url":"https://avatars.githubusercontent.com/u/3608260?v=3","gravatar_id":"","url":"https://api.github.com/users/bretcope","html_url":"https://github.com/bretcope","followers_url":"https://api.github.com/users/bretcope/followers","following_url":"https://api.github.com/users/bretcope/following{/other_user}","gists_url":"https://api.github.com/users/bretcope/gists{/gist_id}","starred_url":"https://api.github.com/users/bretcope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bretcope/subscriptions","organizations_url":"https://api.github.com/users/bretcope/orgs","repos_url":"https://api.github.com/users/bretcope/repos","events_url":"https://api.github.com/users/bretcope/events{/privacy}","received_events_url":"https://api.github.com/users/bretcope/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":3,"state":"open","created_at":"2016-07-09T17:58:53Z","updated_at":"2016-11-20T03:25:10Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-07-09T19:17:45Z","updated_at":"2016-11-20T03:25:10Z","closed_at":"2016-11-20T03:25:10Z","body":"There are actually quite a few breaking changes coming in 3.0, so I'm starting this issue to track them.\n\nThe one big thing that's not changing at all is how settings and default values are defined, so there should not be any changes required to your Settings classes.\n### NFigAsyncStore merged into NFigStore\n\n`NFigAsyncStore` has been removed. `NFigStore` now has both synchronous and asynchronous methods. All of the async methods are abstract, so must be implemented by inherited classes. The synchronous methods are virtual, and the default implementations use [Task.Run](https://msdn.microsoft.com/en-us/library/system.threading.tasks.task.run%28v=vs.110%29.aspx) to simply call the async methods and wait on the result. If you're implementing a store based on a database driver with native support for synchronous calls, you should consider providing your own implementation of the sync methods.\n### NFigStore instances are Tier and DataCenter specific\n\nYou now have to provide the current tier and data center when initializing an NFigStore.\n\n`GetAppSettings()` and `SubscribeToAppSettings()` no longer accept tier or data center parameters. Set and clear override methods no longer accept a tier argument, but do still accept a data center argument.\n\nThese changes were made for a few reasons:\n1. To simplify the interfaces.\n2. The idea of getting or setting overrides for a tier other than your current tier was dubious to begin with, unless you had multiple tiers connected to the same data source (a horrible idea). So having tier as an argument was misleading. [NFig.UI](https://github.com/NFig/NFig.UI) never supported editing other tiers.\n3. With the addition of encrypted settings, it's expected that different tiers will use different encryption keys. Therefore, it wouldn't be possible to decrypt settings from a different tier, making it truly impossible to provide settings from another tier.\n### User parameter\n\nSet and clear override methods now have a `string user` parameter in order to support the new logging features. The parameter is not \"optional\", but you can pass `null` if you don't care about logging.\n\nNFig is not opinionated about the format of the user string, and will accept any arbitrary string. Logging implementations should support strings of at least 100 [UCS-2](https://en.wikipedia.org/wiki/UTF-16) characters, as well as null.\n### GetSettingInfo Removed\n\n`.GetSettingInfo()`, and its async counterpart, have been removed. You can use `GetAllSettingInfos()` and then filter down to the individual SettingInfo that you need.\n### GetAllSettingInfos only returns defaults relevant to the current tier\n\nPreviously, `GetAllSettingInfos()` returned all known default and override values. Because of the introduction of encrypted settings, it would be impossible to provide useful information about encrypted settings from another tier (unless all tiers shared the same encryption keys, which is a bad idea). The easiest way around this is to simply discard all defaults which are irrelevant to the current tier upon initialization.\n\n> NFig will still _validate_ unencrypted defaults values for all tiers in order to catch as many errors as possible during local development, but it will not maintain any state about them after validation.\n### Exceptions are no longer Generic\n\n`InvalidSettingValueException` and `InvalidSettingOverridesException` no longer have type parameters. The `Tier` and `DataCenter` properties are also removed from `InvalidSettingValueException`. Tier is not applicable since it will always be the current tier of the application. DataCenter is still accessible in string form via `exception.Data[\"DataCenter\"]`. The property was removed so that the exception types wouldn't need type arguments.\n### SettingsFactory is internal\n\n`SettingsFactory` is now an internal class. There is no reason to use it directly now that `NFigMemoryStore` is available.\n### NFigStore Implementation Changes\n\nThere are numerous internal changes to what inheriting classes need to implement. Since the only implementation I'm aware of at this time is [NFig.Redis](https://github.com/NFig/NFig.Redis), I'm not going to worry about documenting them. If anyone has questions, they can ask.\n"}}
{"actor":{"display_login":"bretcope"}}