Class ParagraphUnitCollection
A KeyBasedCollection<TKey, TValue> of ParagraphUnits. Adds support for setting the parent elements and additonal helper properties.
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: Sdl.LanguagePlatform.TranslationMemoryApi.LiteBCM.Collection
Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
Syntax
public class ParagraphUnitCollection : KeyBasedCollection<string, ParagraphUnit>, IList<ParagraphUnit>, ICollection<ParagraphUnit>, IEnumerable<ParagraphUnit>, IEnumerable, IEquatable<KeyBasedCollection<string, ParagraphUnit>>
Constructors
ParagraphUnitCollection()
Initializes a new instance of the ParagraphUnitCollection class.
Declaration
public ParagraphUnitCollection()
ParagraphUnitCollection(IList<ParagraphUnit>)
Initializes a new instance of the ParagraphUnitCollection class.
Declaration
public ParagraphUnitCollection(IList<ParagraphUnit> paragraphUnits)
Parameters
Type | Name | Description |
---|---|---|
IList<ParagraphUnit> | paragraphUnits | A pre-populated list with the paragraph units to use for the initialization |
Properties
AllSegmentPairs
Gets all segment pairs.
Declaration
public IEnumerable<SegmentPair> AllSegmentPairs { get; }
Property Value
Type | Description |
---|---|
IEnumerable<SegmentPair> | All segment pairs. |
ParentFile
Gets or sets the parent file.
Declaration
public File ParentFile { get; }
Property Value
Type | Description |
---|---|
File | The parent file. |
SegmentCount
Gets the segment count.
Declaration
public int SegmentCount { get; }
Property Value
Type | Description |
---|---|
Int32 | The segment count. |
Methods
OnItemAdded(ParagraphUnit)
Ensures the newly added item has the correct parent file references set.
Declaration
protected override void OnItemAdded(ParagraphUnit item)
Parameters
Type | Name | Description |
---|---|---|
ParagraphUnit | item | The ParagraphUnit item that was just added to the collection. |
Overrides
Sdl.LanguagePlatform.TranslationMemoryApi.LiteBCM.Collection.KeyBasedCollection<System.String, Sdl.LanguagePlatform.TranslationMemoryApi.LiteBCM.ParagraphUnit>.OnItemAdded(Sdl.LanguagePlatform.TranslationMemoryApi.LiteBCM.ParagraphUnit)
Implements
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.IEquatable<T>