Created
April 23, 2017 11:12
-
-
Save GordonBeeming/2d3747d186d5b263e95183b559f8376c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Route("version")] | |
public ActionResult Version() | |
{ | |
var version = "DEV Build?"; | |
var descriptionAttribute = this.GetType().Assembly.GetCustomAttributes<AssemblyDescriptionAttribute>().FirstOrDefault(); | |
if ((descriptionAttribute?.Description ?? version) != version && descriptionAttribute.Description.Length > 0) | |
{ | |
version = descriptionAttribute.Description; | |
} | |
return Content(version); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment