Click or drag to resize
ParagraphUnitBuffer Class
A buffer for IParagraphUnit instances

The buffer can be turned on and off. While turned on, it caches all paragraph units passed to it through calls on ProcessParagraphUnit(IParagraphUnit). When turned off, the paragraph units are output to the IBilingualContentHandler set as the Output property.

Call Hold to make the buffer start buffering paragraph unit calls. Call Release to have all buffered paragraph units output to the Output content processor and stop buffering calls.

You can access and modify the content of the buffer through the BufferedParagraphUnits property.

Inheritance Hierarchy
SystemObject
  Sdl.FileTypeSupport.Framework.Core.Utilities.BilingualApiParagraphUnitBuffer

Namespace: Sdl.FileTypeSupport.Framework.Core.Utilities.BilingualApi
Assembly: Sdl.FileTypeSupport.Framework.Core.Utilities (in Sdl.FileTypeSupport.Framework.Core.Utilities.dll) Version: 1.0.0.0 (1.0.2551.0)
Syntax
public class ParagraphUnitBuffer

The ParagraphUnitBuffer type exposes the following members.

Constructors
  NameDescription
Public methodParagraphUnitBuffer
Default constructor - creates a new empty buffer that is not holding.
Public methodParagraphUnitBuffer(IBilingualContentHandler)
Construct with the bilingual content processor that will be used for output from the buffer.
Top
Properties
  NameDescription
Public propertyBufferedParagraphUnits
Provides access to the ParagraphUnits that are currently in the buffer.
Public propertyIsEmpty
true if the buffer is empty.
Public propertyIsHolding
Indicates if the buffer is actively buffering calls.
Public propertyOutput
When the buffer is not holding calls, all ParagraphUnits will be output to this interface.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHold
Start buffering ParagraphUnits. If the buffer is already holding, this call has no effect.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodProcessParagraphUnit
Call this to process a ParagraphUnit. If the buffer is holding, the paragraph unit will be added to the buffer and output once the buffer has been released. If not, the paragraph unit will be output immediately.
Public methodRelease
Releases the buffer content by calling the appropriate Process method for each ParagraphUnit on the Output. Removes all ParagraphUnits from the buffer.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

This class is used in the implementation of the Native to Bilingual Converter and other implementations in which buffering of bilingual content is necessary.

See Also
Community
Edit

Be the first to Edit the community content of this topic.
Comments