Try our conversational search powered by Generative AI!

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: 7.19.2
Syntax
public class PropertyLongString : PropertyData, IReadOnly<PropertyData>, IReadOnly, IPropertyLoadDataHandler

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
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
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 PropertyLongStringControl.

Declaration
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

Copy()

Creates a copy of this object.

Declaration
public override PropertyData Copy()
Returns
Type Description
PropertyData

A new PropertyData object.

Overrides

CreatePropertyControl()

Creates an PropertyLongStringControl that is used to display a user interface for the property.

Declaration
public override IPropertyControl CreatePropertyControl()
Returns
Type Description
IPropertyControl

An PropertyLongStringControl that is used to display a user interface for the property.

Overrides
Remarks

It is possible to change which control should be used by registering a different IPropertyControl for the PropertyData class in PropertyControlClassFactory.

GetDelayedLoadedString(Boolean)

Gets the delayed loaded string.

Declaration
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.

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
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
protected void ReadAdditionalDatabaseInformation(IDataRecord record)
Parameters
Type Name Description
System.Data.IDataRecord record

The System.Data.IDataRecord with the information for the property.

SetDefaultValue()

Sets the default value for this property.

Declaration
protected override void SetDefaultValue()
Overrides

Explicit Interface Implementations

IPropertyLoadDataHandler.Load(String, IDataRecord)

Custom data load of the data and settings for the property.

Declaration
void IPropertyLoadDataHandler.Load(string key, IDataRecord record)
Parameters
Type Name Description
System.String key

The name of the property.

System.Data.IDataRecord record

The System.Data.IDataRecord that contains the data for the property.

Implements

Extension Methods