-
Notifications
You must be signed in to change notification settings - Fork 644
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
Update copyright for NuGet Gallery #5278
Conversation
|
||
set | ||
{ | ||
_ExternalBrandingMessage = string.Format(value, DateTime.Now.Year); |
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.
DateTime.UtcNow
- better than guessing what timezone the server is running under
@@ -279,7 +281,16 @@ public class AppConfiguration : IAppConfiguration | |||
/// <summary> | |||
/// Gets/sets a string that is brand string to display in the footer | |||
/// </summary> | |||
public string ExternalBrandingMessage { get; set; } | |||
public string ExternalBrandingMessage { |
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 personally feel that config classes should be as dumb as possible. Could we perhaps make this a view concern (do it in .cshtml)?
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.
Also, we should add XML docs stating that this accepts a single {0}
string format token which is replaced with the UTC year.
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.
There are several places where the branding string is being checked for existence and assignment. I personally feel doing it once at the source of the truth is perhaps better, so that if/when we drag this along to another view we do not miss it.
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.
Sounds fine!
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.
Unit test then
Added support to update date dynamically from the app for the formatted branding message. Sending config updates to NuGet Deployment.
Fixes #5233