Cleaned out remaining dependencies on BaseViewModel (sln builds once again - yay)

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-09-01 15:51:41 -07:00
parent d6e3ac97dd
commit a40ebd5f7e
8 changed files with 18 additions and 29 deletions

View File

@@ -19,7 +19,9 @@ namespace Orchard.Tests.UI.Notify {
return new ActionExecutedContext(controllerContext, actionDescriptor, false/*cancelled*/, null/*exception*/);
}
[Test]
#if REFACTORING
[Test]
public void AfterActionExecutedMessagesShouldAppearInTempData() {
var sink = new Notifier();
var filter = new NotifyFilter(sink);
@@ -58,8 +60,6 @@ namespace Orchard.Tests.UI.Notify {
Assert.That(executedContext.Controller.TempData["messages"], Is.StringContaining("dont-destroy"));
}
#if REFACTORING
[Test]
public void TempDataBuildsMessagesWhenResultExecutingIsBaseViewModel() {
var sink = new Notifier();

View File

@@ -1,10 +1,9 @@
using System.Web.Mvc;
using Orchard.Mvc.ViewModels;
namespace Orchard.Core.Dashboard.Controllers {
public class AdminController : Controller {
public ActionResult Index() {
return View(new AdminViewModel());
return View();
}
}
}

View File

@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Web.Mvc;
using JetBrains.Annotations;
using Orchard.Logging;
using Orchard.Mvc.ViewModels;
using Orchard.Services;
using Orchard.Settings;
using Orchard.Themes;
@@ -25,14 +24,13 @@ namespace Orchard.Core.HomePage.Controllers {
public ActionResult Index() {
try {
var homepage = CurrentSite.HomePage;
if (String.IsNullOrEmpty(homepage)) {
return View(new BaseViewModel());
}
if (String.IsNullOrEmpty(homepage))
return View();
var homePageParameters = homepage.Split(';');
if (homePageParameters.Length != 2) {
return View(new BaseViewModel());
}
if (homePageParameters.Length != 2)
return View();
var providerName = homePageParameters[0];
var item = Int32.Parse(homePageParameters[1]);
@@ -50,10 +48,10 @@ namespace Orchard.Core.HomePage.Controllers {
return result;
}
return View(new BaseViewModel());
return View();
}
catch {
return View(new BaseViewModel());
return View();
}
}
}

View File

@@ -2,7 +2,6 @@
using System.Web.Mvc;
using Orchard.Data.Migration.Generator;
using Orchard.Localization;
using Orchard.Mvc.ViewModels;
using Orchard.UI.Admin;
using Orchard.UI.Notify;
@@ -21,7 +20,7 @@ namespace Orchard.DevTools.Controllers {
public Localizer T { get; set; }
public ActionResult Index() {
return View(new BaseViewModel());
return View();
}
public ActionResult UpdateDatabase() {

View File

@@ -1,15 +1,12 @@
using System;
using System.Dynamic;
using System.Web;
using System.Web.Mvc;
using Orchard.DevTools.Models;
using Orchard.DisplayManagement;
using Orchard.Localization;
using Orchard.Mvc.ViewModels;
using Orchard.Themes;
using Orchard.UI.Notify;
using Orchard.UI.Admin;
using Orchard.UI.Zones;
namespace Orchard.DevTools.Controllers {
[Themed]
@@ -28,7 +25,7 @@ namespace Orchard.DevTools.Controllers {
public Localizer T { get; set; }
public ActionResult Index() {
return View(new BaseViewModel());
return View();
}
public ActionResult NotAuthorized() {

View File

@@ -95,10 +95,6 @@ namespace Orchard.Themes.Controllers {
}
}
public ActionResult Install() {
return View(new BaseViewModel());
}
[HttpPost]
public ActionResult Install(FormCollection input) {
try {

View File

@@ -39,6 +39,7 @@
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.ComponentModel.DataAnnotations">

View File

@@ -6,7 +6,6 @@ using System.Web.Mvc;
using System.Web.Security;
using Orchard.Logging;
using Orchard.Mvc.Extensions;
using Orchard.Mvc.ViewModels;
using Orchard.Security;
using Orchard.Users.Services;
using Orchard.Users.ViewModels;
@@ -44,7 +43,7 @@ namespace Orchard.Users.Controllers {
//TODO: (erikpo) Add a setting for whether or not to log access denieds since these can fill up a database pretty fast from bots on a high traffic site
Logger.Information("Access denied to user #{0} '{1}' on {2}", currentUser.Id, currentUser.UserName, returnUrl);
return View(new BaseViewModel());
return View();
}
public ActionResult LogOn() {
@@ -89,7 +88,7 @@ namespace Orchard.Users.Controllers {
public ActionResult Register() {
ViewData["PasswordLength"] = MinPasswordLength;
return View(new BaseViewModel());
return View();
}
[HttpPost]
@@ -118,7 +117,7 @@ namespace Orchard.Users.Controllers {
public ActionResult ChangePassword() {
ViewData["PasswordLength"] = MinPasswordLength;
return View(new BaseViewModel());
return View();
}
[Authorize]
@@ -152,7 +151,7 @@ namespace Orchard.Users.Controllers {
}
public ActionResult ChangePasswordSuccess() {
return View(new BaseViewModel());
return View();
}
protected override void OnActionExecuting(ActionExecutingContext filterContext) {