Class AssociationType
Describes a type of association.
Inheritance
Inherited Members
Namespace: EPiServer.Commerce.Catalog.Linking
Assembly: EPiServer.Business.Commerce.dll
Version: 13.30.0Syntax
public class AssociationType : IReadOnly<AssociationType>, IReadOnly
Constructors
AssociationType()
Declaration
public AssociationType()
Fields
DefaultTypeId
The default association type id.
Declaration
public const string DefaultTypeId = "Default"
Field Value
Type | Description |
---|---|
System.String |
Properties
Description
Gets or sets the description of the association type.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Id
Gets or sets the id of the association type.
Declaration
public string Id { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IsReadOnly
Indicates whether the current object instance is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
CreateWritableClone()
Creates a writable copy of the current object.
Declaration
public AssociationType CreateWritableClone()
Returns
Type | Description |
---|---|
AssociationType | A writable copy of the current object. |
Remarks
The cloning is a deep-copy.
MakeReadOnly()
Changes the object instance into a read-only object.
Declaration
public void MakeReadOnly()
Remarks
After calling this method, any attempt to change the object instance or any contained object will generate a System.NotSupportedException. I.e. the semantics is "deep read-only".
Note! After setting an object to read-only it is not possible to revert back to read-write mode. You will have to call the CreateWritableClone method to get a copy that can be modified.
ThrowIfReadOnly()
Calls EPiServer.Data.Validator.ValidateNotReadOnly(EPiServer.Data.Entity.IReadOnly) which throws an exception if the item is in read-only mode. Subtypes should call this before accepting any modification to the object.
Declaration
protected void ThrowIfReadOnly()