Renaming that which cannot be renamed

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4044816
This commit is contained in:
loudej
2009-12-31 07:26:44 +00:00
parent d0e2cc94f2
commit da7a015ea8
11 changed files with 0 additions and 174 deletions

View File

@@ -1,6 +0,0 @@
using Orchard.ContentManagement;
namespace Orchard.Tests.ContentManagement.Models {
public class Alpha : ContentPart {
}
}

View File

@@ -1,20 +0,0 @@
using System.Collections.Generic;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Handlers;
using Orchard.ContentManagement.ViewModels;
namespace Orchard.Tests.ContentManagement.Models {
public class AlphaHandler : ContentHandler {
public AlphaHandler() {
OnGetDisplayViewModel<Alpha>((ctx, part) => ctx.AddDisplay(new TemplateViewModel(part) { Position = "3" }));
}
public override IEnumerable<ContentType> GetContentTypes() {
return new[] { new ContentType { Name = "alpha" } };
}
protected override void Activating(ActivatingContentContext context) {
if (context.ContentType == "alpha") {
context.Builder.Weld<Alpha>();
}
}
}
}

View File

@@ -1,6 +0,0 @@
using Orchard.ContentManagement;
namespace Orchard.Tests.ContentManagement.Models {
public class Beta : ContentPart {
}
}

View File

@@ -1,20 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Handlers;
namespace Orchard.Tests.ContentManagement.Models {
public class BetaHandler : ContentHandler {
public override System.Collections.Generic.IEnumerable<Orchard.ContentManagement.ContentType> GetContentTypes() {
return new[] { new ContentType { Name = "beta" } };
}
protected override void Activating(ActivatingContentContext context) {
if (context.ContentType == "beta") {
context.Builder.Weld<Beta>();
}
}
}
}

View File

@@ -1,25 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Orchard.Data;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Handlers;
using Orchard.Tests.ContentManagement.Records;
namespace Orchard.Tests.ContentManagement.Models {
public class Delta : ContentPart<DeltaRecord> {
}
public class DeltaHandler : ContentHandler {
public override System.Collections.Generic.IEnumerable<Orchard.ContentManagement.ContentType> GetContentTypes() {
return new[] { new ContentType { Name = "delta" } };
}
public DeltaHandler(IRepository<DeltaRecord> repository) {
Filters.Add(new ActivatingFilter<Delta>(x => x == "delta"));
Filters.Add(new StorageFilter<DeltaRecord>(repository));
}
}
}

View File

@@ -1,23 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Handlers;
using Orchard.Data;
using Orchard.Tests.ContentManagement.Records;
namespace Orchard.Tests.ContentManagement.Models {
public class Epsilon : ContentPart<EpsilonRecord> {
}
public class EpsilonHandler : ContentHandler {
public EpsilonHandler(IRepository<EpsilonRecord> repository) {
Filters.Add(new ActivatingFilter<Epsilon>(x => x == "gamma"));
Filters.Add(new StorageVersionFilter<EpsilonRecord>(repository));
}
}
}

View File

@@ -1,10 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Orchard.ContentManagement;
namespace Orchard.Tests.ContentManagement.Models {
class Flavored : ContentPart {
}
}

View File

@@ -1,15 +0,0 @@
using Orchard.ContentManagement.Handlers;
using Orchard.ContentManagement.ViewModels;
namespace Orchard.Tests.ContentManagement.Models {
public class FlavoredHandler : ContentHandler {
public FlavoredHandler() {
OnGetDisplayViewModel<Flavored>((ctx, part) => ctx.AddDisplay(new TemplateViewModel(part)));
}
protected override void Activating(ActivatingContentContext context) {
if (context.ContentType == "beta" || context.ContentType == "alpha") {
context.Builder.Weld<Flavored>();
}
}
}
}

View File

@@ -1,23 +0,0 @@
using Orchard.Data;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Handlers;
using Orchard.Tests.ContentManagement.Records;
namespace Orchard.Tests.ContentManagement.Models {
public class Gamma : ContentPart<GammaRecord> {
}
public class GammaHandler : ContentHandler {
public override System.Collections.Generic.IEnumerable<ContentType> GetContentTypes() {
return new[] { new ContentType { Name = "gamma" } };
}
public GammaHandler(IRepository<GammaRecord> repository) {
Filters.Add(new ActivatingFilter<Gamma>(x => x == "gamma"));
Filters.Add(new StorageFilter<GammaRecord>(repository));
}
}
}

View File

@@ -1,10 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Orchard.ContentManagement;
namespace Orchard.Tests.ContentManagement.Models {
public class Styled : ContentPart {
}
}

View File

@@ -1,16 +0,0 @@
using Orchard.ContentManagement.Handlers;
using Orchard.ContentManagement.ViewModels;
namespace Orchard.Tests.ContentManagement.Models {
public class StyledHandler : ContentHandler {
public StyledHandler() {
OnGetDisplayViewModel<Styled>((ctx, part) => ctx.AddDisplay(new TemplateViewModel(part) { Position = "10" }));
}
protected override void Activating(ActivatingContentContext context) {
if (context.ContentType == "alpha") {
context.Builder.Weld<Styled>();
}
}
}
}