November Happy Hour will be moved to Thursday December 5th.

Struct StatusTransition

Represents the transition of a IContent item from one VersionStatus to another.

Implements
System.IEquatable<StatusTransition>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 10.10.4
Syntax
public struct StatusTransition : IEquatable<StatusTransition>

Constructors

StatusTransition(VersionStatus, VersionStatus, Boolean)

Initializes a new instance of the StatusTransition class.

Declaration
public StatusTransition(VersionStatus currentStatus, VersionStatus nextStatus, bool createNewVersion)
Parameters
Type Name Description
VersionStatus currentStatus
VersionStatus nextStatus
System.Boolean createNewVersion

Fields

Invalid

Gets a StatusTransition that represents an invalid transition.

Declaration
public static readonly StatusTransition Invalid
Field Value
Type Description
StatusTransition

Properties

CreateNewVersion

Gets a value indicating if a new content version should be created as a part of the transition.

Declaration
public bool CreateNewVersion { get; }
Property Value
Type Description
System.Boolean
Remarks

For content not implementing IVersionable, this property will always be false unless the content item is new, in which case it will be true.

CurrentStatus

Gets the current VersionStatus of the content item.

Declaration
public VersionStatus CurrentStatus { get; }
Property Value
Type Description
VersionStatus
Remarks

For content that does not implement IVersionable and therefore doesn't have a Status, this property will always be Published for existing content items and in the case of a new items, NotCreated.

NextStatus

Gets the VersionStatus that the content item will transition to.

Declaration
public VersionStatus NextStatus { get; }
Property Value
Type Description
VersionStatus
Remarks

For content that does not implement IVersionable and therefore doesn't have a Status, this property will always be Published.

VersionedContent

Gets an value indicating if the transition represents a transition for an content item implementing IVersionable

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

Methods

Equals(StatusTransition)

Declaration
public bool Equals(StatusTransition other)
Parameters
Type Name Description
StatusTransition other
Returns
Type Description
System.Boolean

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean
Overrides
System.ValueType.Equals(System.Object)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.ValueType.GetHashCode()

IsStatusChange()

Gets an value indicating if the transition represents a change of the VersionStatus.

Declaration
public bool IsStatusChange()
Returns
Type Description
System.Boolean

true if NextStatus is different from the CurrentStatus status.

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.ValueType.ToString()

Unversioned(Boolean)

Gets a StatusTransition that represents the standard transition for an Unversioned content item.

Declaration
public static StatusTransition Unversioned(bool isNewContent)
Parameters
Type Name Description
System.Boolean isNewContent

Value indicating if the unversioned content never been saved before

Returns
Type Description
StatusTransition

Operators

Equality(StatusTransition, StatusTransition)

Declaration
public static bool operator ==(StatusTransition left, StatusTransition right)
Parameters
Type Name Description
StatusTransition left
StatusTransition right
Returns
Type Description
System.Boolean

Inequality(StatusTransition, StatusTransition)

Declaration
public static bool operator !=(StatusTransition left, StatusTransition right)
Parameters
Type Name Description
StatusTransition left
StatusTransition right
Returns
Type Description
System.Boolean

Implements

System.IEquatable<T>

Extension Methods