Update: Configuration Framework +CallerMemberName

Simplified creation of configuration modules; Scope is obtained from
abstract, Property names become keys (via CallerMemberName); Simple
generic Get/Set methods are used; Helpers for Obsfucation and Json are
available.
This commit is contained in:
Gary Sharp
2013-05-03 20:48:15 +10:00
parent d19ad7d0dc
commit 8533ec2fe0
23 changed files with 545 additions and 684 deletions
@@ -85,7 +85,7 @@ namespace Disco.Web.Areas.Config.Models.SystemConfig
public UpdateResponse UpdateLatestResponse { get; set; }
public bool UpdateBetaDeployment { get; set; }
public static IndexModel FromConfiguration(ConfigurationContext config)
public static IndexModel FromConfiguration(SystemConfiguration config)
{
return new IndexModel()
{
@@ -104,7 +104,7 @@ namespace Disco.Web.Areas.Config.Models.SystemConfig
public void ToConfiguration(DiscoDataContext db)
{
ConfigurationContext config = db.DiscoConfiguration;
SystemConfiguration config = db.DiscoConfiguration;
//config.DataStoreLocation = DataStoreLocation;
config.ProxyAddress = ProxyAddress;
config.ProxyPort = ProxyPort;
+1 -1
View File
@@ -70,7 +70,7 @@ namespace Disco.Web
}
public static MvcHtmlString OrganisationLogoUrl(this UrlHelper urlHelper, int Width = 256, int Height = 256)
{
var config = new Disco.Data.Configuration.ConfigurationContext(null);
var config = new Disco.Data.Configuration.SystemConfiguration(null);
return new MvcHtmlString(urlHelper.Action(MVC.API.System.OrganisationLogo(Width, Height, config.OrganisationLogoHash)));
}
#endregion
+2 -2
View File
@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.2.0430.1219")]
[assembly: AssemblyFileVersion("1.2.0430.1219")]
[assembly: AssemblyVersion("1.2.0503.2044")]
[assembly: AssemblyFileVersion("1.2.0503.2044")]