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

Class PropertyLongString

A property representing a string value of undetermined length.

Inheritance
System.Object
PropertyLongString
Inherited Members
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: 11.20.7
Syntax
public class PropertyLongString : PropertyData, IReadOnly<PropertyData>, IReadOnly, ILazyProperty

Constructors

PropertyLongString()

Initializes a new instance of the PropertyLongString class.

Declaration
public PropertyLongString()

PropertyLongString(String)

Initializes a new instance of the PropertyLongString class.

Declaration
public PropertyLongString(string value)
Parameters
Type Name Description
System.String value

The value for the new PropertyLongString.

Properties

FolderID

Gets the folder ID for the current page.

Declaration
[Obsolete("Page Folder ID was only used to support the old Virtual Path Provider system")]
public virtual int FolderID { get; }
Property Value
Type Description
System.Int32

The folder ID for the current page.

IsLongStringLoaded

Checks if the longstring has been loaded.

Declaration
[Obsolete("Lazy loading mechanism has been replaced and is no longer exposed externally.", true)]
public bool IsLongStringLoaded { get; }
Property Value
Type Description
System.Boolean

true if the longstring has been loaded.; otherwise, false.

Remarks

If delayed loading is activated for long strings the actual value for the property might not be loaded at the same time as the rest of the data for the page.

IsNull

Check for null property (no value has been set).

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

true if this property is null; otherwise, false.

Overrides

LongString

Gets or sets the value of the property typed as a System.String.

Declaration
protected virtual string LongString { get; set; }
Property Value
Type Description
System.String

The value of the property typed as a System.String.

Gets or sets the PageReference to the current page.

Declaration
public virtual PageReference PageLink { get; set; }
Property Value
Type Description
PageReference

The PageReference to the current page.

PropertyValueType

Gets the System.Type for this property.

Declaration
public override Type PropertyValueType { get; }
Property Value
Type Description
System.Type

The System.Type of the property value.

Overrides

Type

Property type as defined by enum PropertyDataType.

Declaration
public override PropertyDataType Type { get; }
Property Value
Type Description
PropertyDataType

The type as defined by enum PropertyDataType.

Overrides

UseLongStringLegacyControl

Gets or sets a value indicating use of long string legacy control "EPiServer.Web.PropertyControls.PropertyLongStringControl".

Declaration
[Obsolete("Properties are mapped to controls through IPropertyControlFactory")]
public static bool UseLongStringLegacyControl { get; set; }
Property Value
Type Description
System.Boolean

Value

The value of the property.

Declaration
public override object Value { get; set; }
Property Value
Type Description
System.Object

The value of the property.

Overrides
Remarks

Value returns null if the property has no value defined.

Methods

GetDelayedLoadedString(Boolean)

Gets the delayed loaded string.

Declaration
[Obsolete("Lazy loading mechanism has been replaced and is no longer exposed externally. Just use LongString getter.", true)]
protected string GetDelayedLoadedString(bool storeLocally)
Parameters
Type Name Description
System.Boolean storeLocally

if set to true store the fetched value on this instance so that it does not have to be loaded again.

Returns
Type Description
System.String

The delayed loaded string.

Remarks

This is used to avoid loading lange string properties on the initial loading of the page. Instead the value is loaded the first time it is accessed.

IsEmptyValue(Object)

Called to determine if current value is considered empty.

Declaration
protected override bool IsEmptyValue(object value)
Parameters
Type Name Description
System.Object value
Returns
Type Description
System.Boolean
Overrides
Remarks

Default implementation returns true for System.String.Empty

Parse(String)

Create a new PropertyLongString with the value passed to the method.

Declaration
public static PropertyLongString Parse(string value)
Parameters
Type Name Description
System.String value

The value for the new PropertyLongString.

Returns
Type Description
PropertyLongString

A new instance of PropertyLongString with the value passed to the method.

Remarks

As PropertyLongString stores its value as a string no parsing is necessary.

ParseToObject(String)

Create a new PropertyLongString with the value passed to the method.

Declaration
[Obsolete("ParseToObject is no longer required to be implemented. The same functionality can be achieved by creating a new instance and calling the ParseToSelf method.")]
public override PropertyData ParseToObject(string value)
Parameters
Type Name Description
System.String value

The value for the new PropertyLongString.

Returns
Type Description
PropertyData

A new instance of PropertyLongString with the value passed to the method.

Overrides
Remarks

As PropertyLongString stores its value as a string no parsing is necessary.

ParseToSelf(String)

Parses a string and assigns it to the value of this instance.

Declaration
public override void ParseToSelf(string value)
Parameters
Type Name Description
System.String value

The new value for the property.

Overrides
Remarks

As PropertyLongString stores its value as a string no parsing is necessary.

ReadAdditionalDatabaseInformation(IDataRecord)

Reads additional database information from the provided System.Data.IDataRecord.

Declaration
[Obsolete("Lazy loading mechanism has been replaced and is no longer exposed externally.", true)]
protected void ReadAdditionalDatabaseInformation(IDataRecord record)
Parameters
Type Name Description
System.Data.IDataRecord record

SetDefaultValue()

Sets the default value for this property.

Declaration
protected override void SetDefaultValue()
Overrides

Explicit Interface Implementations

ILazyProperty.AssignValueFactory(Func<Object>)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Assigns a factory method that can provide a property with the value.

Declaration
void ILazyProperty.AssignValueFactory(Func<object> valueFactory)
Parameters
Type Name Description
System.Func<System.Object> valueFactory

The value factory method.

ILazyProperty.HasLazyValue

Declaration
bool ILazyProperty.HasLazyValue { get; }
Returns
Type Description
System.Boolean

Implements

Extension Methods

EPiServer.Core.PropertyDataExtensions.TranslateDisplayName(EPiServer.Core.PropertyData)
EPiServer.Core.PropertyDataExtensions.TranslateDescription(EPiServer.Core.PropertyData)