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:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")]
|
||||
Reference in New Issue
Block a user