Class PageStoreBase

The base class that defines the events for page providers / DataFactory.

Inheritance
System.Object
PageStoreBase
Implements
System.IDisposable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
public class PageStoreBase : IContentEvents, IDisposable

Constructors

PageStoreBase()

Default constructor.

Declaration
public PageStoreBase()
Remarks

This is only meant to be used in test scenarios.

Methods

CreateSaveEventArgs(IContent, SaveAction, AccessLevel)

Creates an instance of SavePageEventArgs.

Declaration
protected SaveContentEventArgs CreateSaveEventArgs(IContent content, SaveAction action, AccessLevel access)
Parameters
Type Name Description
IContent content

The content to save.

SaveAction action

The requested save action.

AccessLevel access

The required access level.

Returns
Type Description
SaveContentEventArgs

A fully initialized SavePageEventArgs instance.

Dispose()

Implemenation of System.IDisposable

Declaration
public void Dispose()

Dispose(Boolean)

Actual implementation of Dispose.

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

RaiseCancellableDeleteEvent(String, String, DeleteContentEventArgs)

Raises a cancellable delete event.

Declaration
protected void RaiseCancellableDeleteEvent(string key, string defaultReason, DeleteContentEventArgs eventArgs)
Parameters
Type Name Description
System.String key

The event identifier.

System.String defaultReason

The default cancel reason.

DeleteContentEventArgs eventArgs

The DeleteContentEventArgs instance containing the event data.

Remarks

If the events is cancelled a EPiServerCancelException is thrown. Unless the cancelling handler sets the CancelReason of PageEventArgs, the defaultReason is used as exception message.

RaiseCancellablePageEvent(String, String, ContentEventArgs)

Raises a cancellable page event.

Declaration
protected void RaiseCancellablePageEvent(string key, string defaultReason, ContentEventArgs eventArgs)
Parameters
Type Name Description
System.String key

The event identifier.

System.String defaultReason

The default cancel reason.

ContentEventArgs eventArgs

The PageEventArgs instance containing the event data.

Remarks

If the events is cancelled a EPiServerCancelException is thrown. Unless the cancelling handler sets the CancelReason of PageEventArgs, the defaultReason is used as exception message.

RaiseChildrenEvent(String, ChildrenEventArgs)

Raises a page children event.

Declaration
protected bool RaiseChildrenEvent(string key, ChildrenEventArgs eventArgs)
Parameters
Type Name Description
System.String key

The event identifier.

ChildrenEventArgs eventArgs

The ChildrenEventArgs instance containing the event data.

Returns
Type Description
System.Boolean

True if the event did not cancel.

RaiseDeleteEvent(String, DeleteContentEventArgs)

Raises the specified delete event.

Declaration
protected bool RaiseDeleteEvent(string key, DeleteContentEventArgs eventArgs)
Parameters
Type Name Description
System.String key

The event identifier.

DeleteContentEventArgs eventArgs

The DeleteContentEventArgs instance containing the event data.

Returns
Type Description
System.Boolean

True if the event did not cancel.

RaisePageEvent(String, ContentEventArgs)

Raises the specified page event.

Declaration
protected bool RaisePageEvent(string key, ContentEventArgs eventArgs)
Parameters
Type Name Description
System.String key

The event identifier.

ContentEventArgs eventArgs

The ContentEventArgs instance containing the event data.

Returns
Type Description
System.Boolean

True if the event did not cancel.

RaisePageEvent(String, IList<PageReference>, ContentEventArgs)

Raises the specified page event for the passed page links.

Declaration
[Obsolete("This method is not used anymore, it was used in pre 7 versions.")]
protected bool RaisePageEvent(string key, IList<PageReference> pageLinks, ContentEventArgs eventArgs)
Parameters
Type Name Description
System.String key

The event identifier.

System.Collections.Generic.IList<PageReference> pageLinks

The page links.

ContentEventArgs eventArgs

The PageEventArgs instance containing the event data.

Returns
Type Description
System.Boolean

True if no event invocation was cancelled, false otherwise.

Events

CheckedInContent

Occurs when a version of a content item has been checked in.

Declaration
public event EventHandler<ContentEventArgs> CheckedInContent
Event Type
Type Description
System.EventHandler<ContentEventArgs>
Remarks

This event will be raised after one of the CreatedContent or SavedContent events.

CheckedInPage

Occurs when a version has been checked in

Declaration
[Obsolete("Use IContentEvents.CheckedInContent instead")]
public event PageEventHandler CheckedInPage
Event Type
Type Description
PageEventHandler

CheckingInContent

Occurs when a version of a content item is about to be checked in.

Declaration
public event EventHandler<ContentEventArgs> CheckingInContent
Event Type
Type Description
System.EventHandler<ContentEventArgs>
Remarks

This event will be raised after one of the CreatingContent or SavingContent events.

CheckingInPage

Occurs when a version is requested to be checked in

Declaration
[Obsolete("Use IContentEvents.CheckingInContent instead")]
public event PageEventHandler CheckingInPage
Event Type
Type Description
PageEventHandler

CreatedContent

Occurs when a new content item has been saved to the repository.

Declaration
public event EventHandler<ContentEventArgs> CreatedContent
Event Type
Type Description
System.EventHandler<ContentEventArgs>
Remarks

This event will be raised along with the PublishedContent or the CheckedInContent if the content item should be published or checked in while created.

CreatedPage

Occurs when a new page is created

Declaration
[Obsolete("Use IContentEvents.CreatedContent instead")]
public event PageEventHandler CreatedPage
Event Type
Type Description
PageEventHandler

CreatingContent

Occurs when a new content item is about to be saved to the repository.

Declaration
public event EventHandler<ContentEventArgs> CreatingContent
Event Type
Type Description
System.EventHandler<ContentEventArgs>
Remarks

This event will be raised along with the PublishingContent or the CheckingInContent if the content item should be published or checked in while created.

CreatingPage

Occurs when a page is requested to be created

Declaration
[Obsolete("Use IContentEvents.CreatingContent instead")]
public event PageEventHandler CreatingPage
Event Type
Type Description
PageEventHandler

DeletedContent

Occurs when a content item has been deleted from the wastebasket.

Declaration
public event EventHandler<DeleteContentEventArgs> DeletedContent
Event Type
Type Description
System.EventHandler<DeleteContentEventArgs>
Remarks

Note that this event is not raised when a content item is moved to the wastebasket. At that point only the MovedContent event is raised.

DeletedContentLanguage

Occurs when a language branch of a content item has been deleted.

Declaration
public event EventHandler<ContentEventArgs> DeletedContentLanguage
Event Type
Type Description
System.EventHandler<ContentEventArgs>

DeletedContentVersion

Occurs when a content item version has been deleted.

Declaration
public event EventHandler<ContentEventArgs> DeletedContentVersion
Event Type
Type Description
System.EventHandler<ContentEventArgs>

DeletedPage

Occurs when a page has been deleted

Declaration
[Obsolete("Use IContentEvents.DeletedContent instead")]
public event PageEventHandler DeletedPage
Event Type
Type Description
PageEventHandler

DeletedPageLanguage

Occurs when a language branch of a page has been deleted

Declaration
[Obsolete("Use IContentEvents.DeletedContentLanguage instead")]
public event PageEventHandler DeletedPageLanguage
Event Type
Type Description
PageEventHandler

DeletingContent

Occurs when a content item is about to be deleted permanently.

Declaration
public event EventHandler<DeleteContentEventArgs> DeletingContent
Event Type
Type Description
System.EventHandler<DeleteContentEventArgs>
Remarks

Note that this event is not raised when a content item is about to be moved to the wastebasket. At that point only the MovingContent event is raised.

DeletingContentLanguage

Occurs when a language branch of a content item is about to be deleted.

Declaration
public event EventHandler<ContentEventArgs> DeletingContentLanguage
Event Type
Type Description
System.EventHandler<ContentEventArgs>

DeletingContentVersion

Occurs when a content item version is about to be deleted permanently.

Declaration
public event EventHandler<ContentEventArgs> DeletingContentVersion
Event Type
Type Description
System.EventHandler<ContentEventArgs>

DeletingPage

Occurs when a page is requested to be deleted

Declaration
[Obsolete("Use IContentEvents.DeletingContent instead")]
public event PageEventHandler DeletingPage
Event Type
Type Description
PageEventHandler

DeletingPageLanguage

Occurs when a language branch of a page is requested to be deleted

Declaration
[Obsolete("Use IContentEvents.DeletingContentLanguage instead")]
public event PageEventHandler DeletingPageLanguage
Event Type
Type Description
PageEventHandler

FailedLoadingChildren

Occurs when a page list failed for some reason.

Declaration
public event ChildrenEventHandler FailedLoadingChildren
Event Type
Type Description
ChildrenEventHandler
Remarks

This event is generated if a LoadingChildrem is NOT followed by a LoadedChildren, i e FailedLoadingChildren is called instead of LoadedChildren. This is typically used if you need to clean up something that was initiated by LoadingChildren.

FailedLoadingContent

Occurs when an exception was raised while a content item was loaded from the repository.

Declaration
public event EventHandler<ContentEventArgs> FailedLoadingContent
Event Type
Type Description
System.EventHandler<ContentEventArgs>
Remarks

This event is raised if a LoadingContent is NOT followed by a LoadedContent, i e FailedLoadingContent is called instead of LoadedContent. This is typically used if you need to clean up something that was initiated by LoadingContent.

FailedLoadingPage

Occurs when a page load failed for some reason.

Declaration
[Obsolete("Use IContentEvents.FailedLoadingContent instead")]
public event PageEventHandler FailedLoadingPage
Event Type
Type Description
PageEventHandler
Remarks

This event is generated if a LoadingPage is NOT followed by a LoadedPage, i e FailedLoadingPage is called instead of LoadedPage. This is typically used if you need to clean up something that was initiated by LoadingPage.

FinishedLoadingChildren

Occurs when a list has been loaded from GetChildren

Declaration
public event ChildrenEventHandler FinishedLoadingChildren
Event Type
Type Description
ChildrenEventHandler
Remarks

This event is triggered after loading dynamic and personalized data.

FinishedLoadingPage

Occurs when a page is loaded through GetPage

Declaration
[Obsolete("Use IContentEvents.LoadedContent instead")]
public event PageEventHandler FinishedLoadingPage
Event Type
Type Description
PageEventHandler
Remarks

This event is triggered after loading dynamic and personalized data.

LoadedChildren

Occurs when a list has been loaded from GetChildren

Declaration
public event ChildrenEventHandler LoadedChildren
Event Type
Type Description
ChildrenEventHandler
Remarks

This event is triggered before loading dynamic and personalized data.

LoadedContent

Occurs when a content item has been loaded from the repository.

Declaration
public event EventHandler<ContentEventArgs> LoadedContent
Event Type
Type Description
System.EventHandler<ContentEventArgs>

LoadedDefaultContent

Occurs when a new content item has been created and initalized through the GetDefaultContent method.

Declaration
public event EventHandler<ContentEventArgs> LoadedDefaultContent
Event Type
Type Description
System.EventHandler<ContentEventArgs>

LoadedDefaultPageData

Occurs when a empty page is loaded through GetDefaultPageData

Declaration
[Obsolete("Use IContentEvents.LoadedDefaultContent instead")]
public event PageEventHandler LoadedDefaultPageData
Event Type
Type Description
PageEventHandler

LoadedPage

Occurs when a page is loaded through GetPage

Declaration
[Obsolete("Use IContentEvents.LoadedContent instead")]
public event PageEventHandler LoadedPage
Event Type
Type Description
PageEventHandler
Remarks

This event is triggered before loading dynamic and personalized data.

LoadingChildren

Occurs when a list is requested from GetChildren

Declaration
public event ChildrenEventHandler LoadingChildren
Event Type
Type Description
ChildrenEventHandler

LoadingContent

Occurs when a content item are about to be loaded from the repository.

Declaration
public event EventHandler<ContentEventArgs> LoadingContent
Event Type
Type Description
System.EventHandler<ContentEventArgs>

LoadingDefaultContent

Occurs when a new content item is about to be created and initalized through the GetDefaultContent method.

Declaration
public event EventHandler<ContentEventArgs> LoadingDefaultContent
Event Type
Type Description
System.EventHandler<ContentEventArgs>

LoadingDefaultPageData

Occurs when a empty page is requested through GetDefaultPageData

Declaration
[Obsolete("Use IContentEvents.LoadingDefaultContent instead")]
public event PageEventHandler LoadingDefaultPageData
Event Type
Type Description
PageEventHandler

LoadingPage

Occurs when a page is requested through GetPage

Declaration
[Obsolete("Use IContentEvents.LoadingContent instead")]
public event PageEventHandler LoadingPage
Event Type
Type Description
PageEventHandler

MovedContent

Occurs when a content item has been moved from one location to another.

Declaration
public event EventHandler<ContentEventArgs> MovedContent
Event Type
Type Description
System.EventHandler<ContentEventArgs>
Remarks

Note that this event is also raised when a content item is moved to the wastebasket.

MovedPage

Occurs when a page has been moved

Declaration
[Obsolete("Use IContentEvents.MovedContent instead")]
public event PageEventHandler MovedPage
Event Type
Type Description
PageEventHandler

MovingContent

Occurs when a content item is about to be moved from one location to another.

Declaration
public event EventHandler<ContentEventArgs> MovingContent
Event Type
Type Description
System.EventHandler<ContentEventArgs>
Remarks

Note that this event is also raised when a content item is about to be moved to the wastebasket.

MovingPage

Occurs when a page is requested to be moved

Declaration
[Obsolete("Use IContentEvents.MovingContent instead")]
public event PageEventHandler MovingPage
Event Type
Type Description
PageEventHandler

PublishedContent

Occurs when a content item or a version of a content item has been published.

Declaration
public event EventHandler<ContentEventArgs> PublishedContent
Event Type
Type Description
System.EventHandler<ContentEventArgs>
Remarks

This event will be raised after one of the CreatedContent or SavedContent events.

PublishedPage

Occurs when a page/version has been published

Declaration
[Obsolete("Use IContentEvents.PublishedContent instead")]
public event PageEventHandler PublishedPage
Event Type
Type Description
PageEventHandler

PublishingContent

Occurs when a content item or a version of a content item is requested to be published.

Declaration
public event EventHandler<ContentEventArgs> PublishingContent
Event Type
Type Description
System.EventHandler<ContentEventArgs>
Remarks

This event will be raised after one of the CreatingContent or SavingContent events.

PublishingPage

Occurs when a page/version is requested to be published

Declaration
[Obsolete("Use IContentEvents.PublishingContent instead")]
public event PageEventHandler PublishingPage
Event Type
Type Description
PageEventHandler

RejectedContent

Occurs when a version of a content item has been rejected.

Declaration
public event EventHandler<ContentEventArgs> RejectedContent
Event Type
Type Description
System.EventHandler<ContentEventArgs>

RejectingContent

Occurs when a version of a content item is about to be rejected.

Declaration
public event EventHandler<ContentEventArgs> RejectingContent
Event Type
Type Description
System.EventHandler<ContentEventArgs>

SavedContent

Occurs when an existing content item has been saved to the repository.

Declaration
public event EventHandler<ContentEventArgs> SavedContent
Event Type
Type Description
System.EventHandler<ContentEventArgs>
Remarks

This event will be raised along with the PublishedContent or the CheckedInContent if the content item should be published or checked in while saved.

SavedPage

Occurs when a existing page is modified and saved

Declaration
[Obsolete("Use IContentEvents.SavedContent instead")]
public event PageEventHandler SavedPage
Event Type
Type Description
PageEventHandler

SavingContent

Occurs when an existing content item is about to be saved to the repository.

Declaration
public event EventHandler<ContentEventArgs> SavingContent
Event Type
Type Description
System.EventHandler<ContentEventArgs>
Remarks

This event will be raised along with the PublishingContent or the CheckingInContent if the content item should be published or checked in while saved.

SavingPage

Occurs when a existing page is modified and saved

Declaration
[Obsolete("Use IContentEvents.SavingContent instead")]
public event PageEventHandler SavingPage
Event Type
Type Description
PageEventHandler

Implements

System.IDisposable

Extension Methods