Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Class SaveContentEventArgs

Event arguments used for save-related events.

Inheritance
System.Object
System.EventArgs
SaveContentEventArgs
Inherited Members
System.EventArgs.Empty
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
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
public class SaveContentEventArgs : ContentEventArgs

Constructors

SaveContentEventArgs(ContentReference, IContent)

Initializes a new instance of the SaveContentEventArgs class.

Declaration
[Obsolete("Use alternative constructor that includes the transition")]
public SaveContentEventArgs(ContentReference contentLink, IContent content)
Parameters
Type Name Description
ContentReference contentLink

The content link.

IContent content

The content.

SaveContentEventArgs(ContentReference, IContent, SaveAction)

Initializes a new instance of the SaveContentEventArgs class.

Declaration
[Obsolete("Use alternative constructor that includes the transition")]
public SaveContentEventArgs(ContentReference contentLink, IContent content, SaveAction action)
Parameters
Type Name Description
ContentReference contentLink

The content link.

IContent content

The content.

SaveAction action

The save action to perform.

SaveContentEventArgs(ContentReference, IContent, SaveAction, StatusTransition)

Declaration
public SaveContentEventArgs(ContentReference contentLink, IContent content, SaveAction action, StatusTransition transition)
Parameters
Type Name Description
ContentReference contentLink
IContent content
SaveAction action
StatusTransition transition

Properties

Action

Gets the requested save action.

Declaration
public SaveAction Action { get; }
Property Value
Type Description
SaveAction

The save action.

ForceCurrentVersion

Gets or sets a value indicating whether to save to overwrite the current version.

Declaration
public bool ForceCurrentVersion { get; set; }
Property Value
Type Description
System.Boolean

true if force overwrite of current version; otherwise, false.

MaskedAction

Gets the save action without any Force... flags.

Declaration
public SaveAction MaskedAction { get; }
Property Value
Type Description
SaveAction

The masked action.

RequireNewVersion

Gets or sets a value indicating whether the save operation will force a new version of the content.

Declaration
public bool RequireNewVersion { get; set; }
Property Value
Type Description
System.Boolean

true if force new version; otherwise, false.

Transition

Gets information on the transition that will happen or that has just completed.

Declaration
public StatusTransition Transition { get; }
Property Value
Type Description
StatusTransition
Remarks

Changes made to the save action by modifying the RequireNewVersion or ForceCurrentVersion on this SaveContentEventArgs might affect the transition, but this will not be reflected in this object.

Extension Methods