mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Removed unused methods
--HG-- branch : dev
This commit is contained in:
@@ -29,14 +29,6 @@ namespace Orchard.ContentManagement.Handlers {
|
||||
Filters.Add(new InlineStorageFilter<TPart> { OnCreated = handler });
|
||||
}
|
||||
|
||||
protected void OnSaving<TPart>(Action<SaveContentContext, TPart> handler) where TPart : class, IContent {
|
||||
Filters.Add(new InlineStorageFilter<TPart> { OnSaving = handler });
|
||||
}
|
||||
|
||||
protected void OnSaved<TPart>(Action<SaveContentContext, TPart> handler) where TPart : class, IContent {
|
||||
Filters.Add(new InlineStorageFilter<TPart> { OnSaved = handler });
|
||||
}
|
||||
|
||||
protected void OnLoading<TPart>(Action<LoadContentContext, TPart> handler) where TPart : class, IContent {
|
||||
Filters.Add(new InlineStorageFilter<TPart> { OnLoading = handler });
|
||||
}
|
||||
@@ -97,8 +89,6 @@ namespace Orchard.ContentManagement.Handlers {
|
||||
public Action<InitializingContentContext, TPart> OnInitializing { get; set; }
|
||||
public Action<CreateContentContext, TPart> OnCreating { get; set; }
|
||||
public Action<CreateContentContext, TPart> OnCreated { get; set; }
|
||||
public Action<SaveContentContext, TPart> OnSaving { get; set; }
|
||||
public Action<SaveContentContext, TPart> OnSaved { get; set; }
|
||||
public Action<LoadContentContext, TPart> OnLoading { get; set; }
|
||||
public Action<LoadContentContext, TPart> OnLoaded { get; set; }
|
||||
public Action<VersionContentContext, TPart, TPart> OnVersioning { get; set; }
|
||||
@@ -121,12 +111,6 @@ namespace Orchard.ContentManagement.Handlers {
|
||||
protected override void Created(CreateContentContext context, TPart instance) {
|
||||
if (OnCreated != null) OnCreated(context, instance);
|
||||
}
|
||||
protected override void Saving(SaveContentContext context, TPart instance) {
|
||||
if (OnSaving != null) OnSaving(context, instance);
|
||||
}
|
||||
protected override void Saved(SaveContentContext context, TPart instance) {
|
||||
if (OnSaved != null) OnSaved(context, instance);
|
||||
}
|
||||
protected override void Loading(LoadContentContext context, TPart instance) {
|
||||
if (OnLoading != null) OnLoading(context, instance);
|
||||
}
|
||||
@@ -211,18 +195,6 @@ namespace Orchard.ContentManagement.Handlers {
|
||||
Created(context);
|
||||
}
|
||||
|
||||
void IContentHandler.Saving(SaveContentContext context) {
|
||||
foreach (var filter in Filters.OfType<IContentStorageFilter>())
|
||||
filter.Saving(context);
|
||||
Saving(context);
|
||||
}
|
||||
|
||||
void IContentHandler.Saved(SaveContentContext context) {
|
||||
foreach (var filter in Filters.OfType<IContentStorageFilter>())
|
||||
filter.Saved(context);
|
||||
Saved(context);
|
||||
}
|
||||
|
||||
void IContentHandler.Loading(LoadContentContext context) {
|
||||
foreach (var filter in Filters.OfType<IContentStorageFilter>())
|
||||
filter.Loading(context);
|
||||
@@ -312,9 +284,6 @@ namespace Orchard.ContentManagement.Handlers {
|
||||
protected virtual void Creating(CreateContentContext context) { }
|
||||
protected virtual void Created(CreateContentContext context) { }
|
||||
|
||||
protected virtual void Saving(SaveContentContext context) { }
|
||||
protected virtual void Saved(SaveContentContext context) { }
|
||||
|
||||
protected virtual void Loading(LoadContentContext context) { }
|
||||
protected virtual void Loaded(LoadContentContext context) { }
|
||||
|
||||
|
@@ -5,8 +5,6 @@
|
||||
public virtual void Initializing(InitializingContentContext context) {}
|
||||
public virtual void Creating(CreateContentContext context) {}
|
||||
public virtual void Created(CreateContentContext context) {}
|
||||
public virtual void Saving(SaveContentContext context) {}
|
||||
public virtual void Saved(SaveContentContext context) {}
|
||||
public virtual void Loading(LoadContentContext context) {}
|
||||
public virtual void Loaded(LoadContentContext context) {}
|
||||
public virtual void Versioning(VersionContentContext context) {}
|
||||
|
@@ -5,8 +5,6 @@
|
||||
void Initializing(InitializingContentContext context);
|
||||
void Creating(CreateContentContext context);
|
||||
void Created(CreateContentContext context);
|
||||
void Saving(SaveContentContext context);
|
||||
void Saved(SaveContentContext context);
|
||||
void Loading(LoadContentContext context);
|
||||
void Loaded(LoadContentContext context);
|
||||
void Versioning(VersionContentContext context);
|
||||
|
@@ -4,8 +4,6 @@ namespace Orchard.ContentManagement.Handlers {
|
||||
void Initializing(InitializingContentContext context);
|
||||
void Creating(CreateContentContext context);
|
||||
void Created(CreateContentContext context);
|
||||
void Saving(SaveContentContext context);
|
||||
void Saved(SaveContentContext context);
|
||||
void Loading(LoadContentContext context);
|
||||
void Loaded(LoadContentContext context);
|
||||
void Versioning(VersionContentContext context);
|
||||
|
@@ -5,8 +5,6 @@ namespace Orchard.ContentManagement.Handlers {
|
||||
protected virtual void Initializing(InitializingContentContext context, TPart instance) { }
|
||||
protected virtual void Creating(CreateContentContext context, TPart instance) { }
|
||||
protected virtual void Created(CreateContentContext context, TPart instance) { }
|
||||
protected virtual void Saving(SaveContentContext context, TPart instance) { }
|
||||
protected virtual void Saved(SaveContentContext context, TPart instance) { }
|
||||
protected virtual void Loading(LoadContentContext context, TPart instance) { }
|
||||
protected virtual void Loaded(LoadContentContext context, TPart instance) { }
|
||||
protected virtual void Versioning(VersionContentContext context, TPart existing, TPart building) { }
|
||||
@@ -39,16 +37,6 @@ namespace Orchard.ContentManagement.Handlers {
|
||||
Created(context, context.ContentItem.As<TPart>());
|
||||
}
|
||||
|
||||
void IContentStorageFilter.Saving(SaveContentContext context) {
|
||||
if (context.ContentItem.Is<TPart>())
|
||||
Saving(context, context.ContentItem.As<TPart>());
|
||||
}
|
||||
|
||||
void IContentStorageFilter.Saved(SaveContentContext context) {
|
||||
if (context.ContentItem.Is<TPart>())
|
||||
Saved(context, context.ContentItem.As<TPart>());
|
||||
}
|
||||
|
||||
void IContentStorageFilter.Loading(LoadContentContext context) {
|
||||
if (context.ContentItem.Is<TPart>())
|
||||
Loading(context, context.ContentItem.As<TPart>());
|
||||
|
@@ -309,7 +309,6 @@
|
||||
<Compile Include="ContentManagement\Handlers\RemoveContentContext.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ContentManagement\Handlers\SaveContentContext.cs" />
|
||||
<Compile Include="ContentManagement\Handlers\StorageFilter.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
|
Reference in New Issue
Block a user