SaaS CMS has officially launched! Learn more now.

Class PropertyBoolean

Property representing a Boolean value.

Inheritance
System.Object
PropertyBoolean
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
public class PropertyBoolean : PropertyData, IReadOnly<PropertyData>, IReadOnly
Remarks

A boolean value can be either false, true or null. Default value is null.

Constructors

PropertyBoolean()

Initializes a new instance of the PropertyBoolean class.

Declaration
public PropertyBoolean()

PropertyBoolean(Boolean)

Initializes a new instance of the PropertyBoolean class.

Declaration
public PropertyBoolean(bool boolValue)
Parameters
Type Name Description
System.Boolean boolValue

The initial value of the property.

Properties

Boolean

Gets or sets the actual value for this property as a System.Boolean.

Declaration
public virtual Nullable<bool> Boolean { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>

The actual value for this property as a System.Boolean.

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

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

Parse(String)

Creates a new instance of PropertyBoolean with the given value, ie reversed ToString().

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

The string value to parse.

Returns
Type Description
PropertyBoolean

A a new instance of PropertyBoolean with the given value.

Remarks

Throws a InvalidPropertyValueException if the value can not be parsed as a System.Boolean.

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

SetDefaultValue()

Sets the default value for this property.

Declaration
protected override void SetDefaultValue()
Overrides

Implements

Extension Methods