mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Removing AutomaticContentPartDriver and ContentPartDriver.ContentPartTemplate. Fixes last of build warnings.
--HG-- branch : dev
This commit is contained in:
@@ -93,14 +93,14 @@ namespace Orchard.Tests.ContentManagement.Handlers.Coordinators {
|
||||
|
||||
protected override DriverResult Editor(StubPart part, dynamic shapeHelper) {
|
||||
var viewModel = new StubViewModel { Foo = string.Join(",", part.Foo) };
|
||||
return ContentPartTemplate(viewModel).Location("last", "10");
|
||||
return new ContentTemplateResult(viewModel, null, Prefix).Location("last", "10");
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(StubPart part, IUpdateModel updater, dynamic shapeHelper) {
|
||||
var viewModel = new StubViewModel { Foo = string.Join(",", part.Foo) };
|
||||
updater.TryUpdateModel(viewModel, Prefix, null, null);
|
||||
part.Foo = viewModel.Foo.Split(new[] { ',' }).Select(x => x.Trim()).ToArray();
|
||||
return ContentPartTemplate(viewModel).Location("last", "10");
|
||||
return new ContentTemplateResult(viewModel, null, Prefix).Location("last", "10");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,22 +0,0 @@
|
||||
namespace Orchard.ContentManagement.Drivers {
|
||||
public abstract class AutomaticContentPartDriver<TPart> : ContentPartDriver<TPart> where TPart : ContentPart, new() {
|
||||
protected override string Prefix {
|
||||
get {
|
||||
return (typeof (TPart).Name);
|
||||
}
|
||||
}
|
||||
|
||||
protected override DriverResult Display(TPart part, string displayType, dynamic shapeHelper) {
|
||||
return ContentPartTemplate(part);
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(TPart part, dynamic shapeHelper) {
|
||||
return ContentPartTemplate(part);
|
||||
}
|
||||
|
||||
protected override DriverResult Editor(TPart part, IUpdateModel updater, dynamic shapeHelper) {
|
||||
updater.TryUpdateModel(part, Prefix, null, null);
|
||||
return ContentPartTemplate(part);
|
||||
}
|
||||
}
|
||||
}
|
@@ -58,19 +58,6 @@ namespace Orchard.ContentManagement.Drivers {
|
||||
return shapeFactory.Create(shapeType);
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
public ContentTemplateResult ContentPartTemplate(object model) {
|
||||
return new ContentTemplateResult(model, null, Prefix).Location(Zone);
|
||||
}
|
||||
[Obsolete]
|
||||
public ContentTemplateResult ContentPartTemplate(object model, string template) {
|
||||
return new ContentTemplateResult(model, template, Prefix).Location(Zone);
|
||||
}
|
||||
[Obsolete]
|
||||
public ContentTemplateResult ContentPartTemplate(object model, string template, string prefix) {
|
||||
return new ContentTemplateResult(model, template, prefix).Location(Zone);
|
||||
}
|
||||
|
||||
public CombinedResult Combined(params DriverResult[] results) {
|
||||
return new CombinedResult(results);
|
||||
}
|
||||
|
@@ -235,9 +235,6 @@
|
||||
<Compile Include="ContentManagement\DefaultContentQuery.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ContentManagement\Drivers\AutomaticContentPartDriver.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ContentManagement\Drivers\CombinedResult.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
|
Reference in New Issue
Block a user