Class PropertyContentReference
Property representing a link to a content item.
Inherited Members
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public class PropertyContentReference : PropertyData, IReadOnly<PropertyData>, IReadOnly
  Constructors
PropertyContentReference()
Initializes a new instance of the PropertyContentReference class.
Declaration
public PropertyContentReference()
  PropertyContentReference(ContentReference)
Initializes a new instance of the PropertyContentReference class.
Declaration
public PropertyContentReference(ContentReference contentLink)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ContentReference | contentLink | The content link.  | 
      
PropertyContentReference(Guid)
Initializes a new instance of the PropertyContentReference class.
Declaration
public PropertyContentReference(Guid contentGuid)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Guid | contentGuid | The page GUID.  | 
      
PropertyContentReference(Int32)
Initializes a new instance of the PropertyContentReference class.
Declaration
public PropertyContentReference(int contentID)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | contentID | The content ID.  | 
      
PropertyContentReference(Int32, Int32)
Initializes a new instance of the PropertyContentReference class.
Declaration
public PropertyContentReference(int contentID, int workID)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | contentID | The content ID.  | 
      
| System.Int32 | workID | The work ID.  | 
      
PropertyContentReference(Int32, Int32, String)
Initializes a new instance of the PropertyContentReference class.
Declaration
public PropertyContentReference(int contentID, int workID, string providerName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | contentID | The content ID.  | 
      
| System.Int32 | workID | The work ID.  | 
      
| System.String | providerName | Name of the provider.  | 
      
PropertyContentReference(Int32, String)
Initializes a new instance of the PropertyContentReference class.
Declaration
public PropertyContentReference(int contentID, string providerName)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | contentID | The content ID.  | 
      
| System.String | providerName | Name of the provider.  | 
      
Properties
ContentLink
Gets or sets the content link.
Declaration
public virtual ContentReference ContentLink { get; set; }
  Property Value
| Type | Description | 
|---|---|
| ContentReference | The content link.  | 
      
GuidValue
Gets or sets the GUID value.
Declaration
public virtual Guid GuidValue { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Guid | The GUID value.  | 
      
ID
Gets or sets the ID for this content reference.
Declaration
public virtual int ID { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Int32 | The ID for this content reference.  | 
      
IsNull
Check for null property (no value has been set).
Declaration
public override bool IsNull { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
  | 
      
Overrides
IsSelfReference
Gets a value indicating whether this instance is self reference.
Declaration
public virtual bool IsSelfReference { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
  | 
      
LinkMapper
Gets or sets the link mapper.
Declaration
public Injected<IPermanentLinkMapper> LinkMapper { get; set; }
  Property Value
| Type | Description | 
|---|---|
| Injected<IPermanentLinkMapper> | The link mapper.  | 
      
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
ProviderName
Gets or sets the provider name for this content reference.
Declaration
public virtual string ProviderName { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.String | The provider name for this content reference.  | 
      
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 or null if the property has no value defined.  | 
      
Overrides
WorkID
Gets or sets the work ID for this content reference.
Declaration
public virtual int WorkID { get; set; }
  Property Value
| Type | Description | 
|---|---|
| System.Int32 | The work ID for this content reference.  | 
      
Methods
Copy()
Creates a copy of this object.
Declaration
public override PropertyData Copy()
  Returns
| Type | Description | 
|---|---|
| PropertyData | A PropertyData object.  | 
      
Overrides
CreateWritableClone()
Creates a writable clone of the property.
Declaration
public override PropertyData CreateWritableClone()
  Returns
| Type | Description | 
|---|---|
| PropertyData | A writable copy of the property.  | 
      
Overrides
EnsureType(ContentReference)
Ensure that the type is of correct type.
Declaration
protected virtual ContentReference EnsureType(ContentReference contentLink)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ContentReference | contentLink | The instance.  | 
      
Returns
| Type | Description | 
|---|---|
| ContentReference | A ContentReference or inherited type.  | 
      
MakeReadOnly()
Convert this property to ReadOnly
Declaration
public override void MakeReadOnly()
  Overrides
Remarks
Implementors should override this method when exposing complex objects that should be read-only as well.
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()