Class PropertyString
A property representing a string value less than 255 characters.
Inheritance
Inherited Members
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 10.10.4Syntax
public class PropertyString : PropertyData, IReadOnly<PropertyData>, IReadOnly
Constructors
PropertyString()
Initializes a new instance of the PropertyString class.
Declaration
public PropertyString()
PropertyString(String)
Initializes a new instance of the PropertyString class.
Declaration
public PropertyString(string stringValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | stringValue | The string value. |
Properties
IsNull
Check for null property (no value has been set).
Declaration
public override bool IsNull { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Overrides
MaxLength
Gets or sets the max length of the string.
Declaration
public virtual int MaxLength { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The max length of the string. |
Remarks
Default value is 255.
PropertyValueType
Gets the System.Type of the property value.
Declaration
public override Type PropertyValueType { get; }
Property Value
Type | Description |
---|---|
System.Type | The System.Type of the property value. |
Overrides
String
Gets or sets the string value.
Declaration
protected virtual string String { get; set; }
Property Value
Type | Description |
---|---|
System.String | The string value. |
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
Value
Gets or sets 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
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)
Creates a new instance of PropertyString with the given value.
Declaration
public static PropertyString Parse(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The value. |
Returns
Type | Description |
---|---|
PropertyString | A new instance of PropertyString with the given value. |
Remarks
No parsing is needed as the property is stored as a string.
ParseToObject(String)
Creates a new instance of PropertyString with the given value, ie reversed ToString().
Declaration
public override PropertyData ParseToObject(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The string value. |
Returns
Type | Description |
---|---|
PropertyData | A new instance of PropertyString with the given value. |
Overrides
Remarks
No parsing is needed as the property is stored as a string.
ParseToSelf(String)
Sets the value of the property from a string representation.
Declaration
public override void ParseToSelf(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The string value to parse. |
Overrides
Remarks
No parsing is needed as the property is stored as a string.
SetDefaultValue()
Sets the default value for this property.
Declaration
protected override void SetDefaultValue()