Class MarkupData
Abstract entity representing an item that can be included inside a MarkupDataContainer. Examples: TextMarkup, PlaceholderTag, TagPair.
Inheritance
Inherited Members
Namespace: Sdl.Core.Bcm.BcmModel
Assembly: Sdl.Core.Bcm.BcmModel.dll
Syntax
public abstract class MarkupData : MetadataContainer, ICloneable<MarkupData>
Remarks
Inheritors of MarkupData should not implement themselves System.IEquatable<>, but should override MarkupData equality.
Constructors
MarkupData()
Initializes a new instance of the MarkupData class.
Declaration
protected MarkupData()
MarkupData(String)
Initializes a new instance of the MarkupData class.
Declaration
protected MarkupData(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The identifier. |
Properties
Ancestors
This item's MarkupDataContainer ancestors, in ascending order.
Declaration
public IEnumerable<MarkupDataContainer> Ancestors { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<MarkupDataContainer> |
Id
Markup data unique id (GUID).
Declaration
public string Id { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IndexInParent
The index of this item in the parent MarkupDataContainer. -1 if it doesn't have a parent.
Declaration
public int IndexInParent { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsContainer
True if this MarkupData is a container. Otherwise false.
Declaration
public bool IsContainer { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Parent
The MarkupDataContainer parent container.
Declaration
public MarkupDataContainer Parent { get; set; }
Property Value
Type | Description |
---|---|
MarkupDataContainer |
ParentFragment
The Fragment containing this item.
Declaration
public Fragment ParentFragment { get; }
Property Value
Type | Description |
---|---|
Fragment |
ParentParagraph
The Paragraph containing this item.
Declaration
public Paragraph ParentParagraph { get; }
Property Value
Type | Description |
---|---|
Paragraph |
ParentParagraphUnit
The ParagraphUnit containing this item.
Declaration
public virtual ParagraphUnit ParentParagraphUnit { get; set; }
Property Value
Type | Description |
---|---|
ParagraphUnit |
ParentSegment
The Segment containing this item. Null if the item isn't inside of a Segment.
Declaration
public Segment ParentSegment { get; }
Property Value
Type | Description |
---|---|
Segment |
Type
Gets or sets the type. Should be implement in derived classes to uniquely identify the type of MarkupData on deserialization.
Declaration
protected abstract string Type { get; set; }
Property Value
Type | Description |
---|---|
System.String | The type. |
Methods
AcceptVisitor(BcmVisitor)
Accepts a visitor of type BcmVisitor.
Declaration
public abstract void AcceptVisitor(BcmVisitor visitor)
Parameters
Type | Name | Description |
---|---|---|
BcmVisitor | visitor | The BcmVisitor used to visit this item. |
Clone()
Clones the item to a new MarkupData.
Declaration
public virtual MarkupData Clone()
Returns
Type | Description |
---|---|
MarkupData |
Equals(MarkupData)
Indicates whether the current object is equal to another object of the same type.
Declaration
public virtual bool Equals(MarkupData other)
Parameters
Type | Name | Description |
---|---|---|
MarkupData | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current object is equal to the |
Equals(Object)
Performs a deep-equals comparison.
System.Object.Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for this instance. |
Overrides
UniqueClone()
Creates clone of the current object, with a new unique Id.
Declaration
public virtual MarkupData UniqueClone()
Returns
Type | Description |
---|---|
MarkupData | A clone with a new unique Id. |