More settings work

- stubs of work to continue tonight (IShellSettinsLoader's SaveSettings)

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-02-08 15:57:30 -08:00
parent 8b00d2301c
commit a6841c4294
3 changed files with 16 additions and 1 deletions

View File

@@ -54,6 +54,10 @@ namespace Orchard.Tests.Environment {
public IEnumerable<IShellSettings> LoadSettings() {
return new[] { new ShellSettings { Name = "testing" } };
}
public void SaveSettings(IShellSettings settings) {
}
}
public class StuExtensionManager : IExtensionManager {

View File

@@ -1,7 +1,13 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<SetupViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Setup.ViewModels"%>
<h1><%=Html.TitleForPage("Orchard " + _Encoded("Setup"))%></h1><%
<h1><%=Html.TitleForPage("Orchard " + _Encoded("Setup"))%></h1>
<div class="">
</div>
<%
using (Html.BeginFormAntiForgeryPost()) { %>
<%=Html.ValidationSummary() %>
<fieldset>

View File

@@ -8,6 +8,7 @@ using Yaml.Grammar;
namespace Orchard.Environment.Configuration {
public interface IShellSettingsLoader {
IEnumerable<IShellSettings> LoadSettings();
void SaveSettings(IShellSettings settings);
}
public class ShellSettingsLoader : IShellSettingsLoader {
@@ -16,6 +17,10 @@ namespace Orchard.Environment.Configuration {
return LoadSettings().ToArray();
}
public void SaveSettings(IShellSettings settings) {
}
static IEnumerable<IShellSettings> LoadSettings() {
foreach (var yamlDocument in LoadFiles()) {
yield return ParseSettings(yamlDocument);