Class AbstractBilingualParser
Base class that can be used to implement bilingual parsers.
Takes care of the basics involved in implementing the IBilingualParser and IBilingualFileTypeComponent interfaces.
Implements
Inherited Members
Namespace: Sdl.FileTypeSupport.Framework.BilingualApi
Assembly: Sdl.FileTypeSupport.Framework.Core.dll
Syntax
public abstract class AbstractBilingualParser : AbstractBilingualFileTypeComponent, IBilingualContentMessageReporter, IBasicMessageReporter, IBilingualContentMessageReporterWithExtendedData, IBasicMessageReporterWithExtendedData, IBilingualParser, IParser, IDisposable, IBilingualFileTypeComponent
Remarks
Implementations are not required to derive from this class. It is designed as a convenient default implementation to be used when appropriate.
Constructors
AbstractBilingualParser()
Declaration
protected AbstractBilingualParser()
Properties
DocumentProperties
Default implementation; stores the value in a data member.
Declaration
public IDocumentProperties DocumentProperties { get; set; }
Property Value
Type | Description |
---|---|
IDocumentProperties |
FileRestriction
Default implementation; sotres the value in a data member.
Declaration
public Predicate<IPersistentFileConversionProperties> FileRestriction { get; set; }
Property Value
Type | Description |
---|---|
System.Predicate<IPersistentFileConversionProperties> |
Output
Default implementation; stores the value in a data member.
Declaration
public IBilingualContentHandler Output { get; set; }
Property Value
Type | Description |
---|---|
IBilingualContentHandler |
Methods
Dispose()
Implements IDisposable. Just calls Dispose saying that this is an explicit disposal and tells the GC not to call the Finalizer.
Declaration
public void Dispose()
Dispose(Boolean)
Last change for the Parser to dispose manage and unmanged objects. It can be overriden by subclases.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | indicates if the dispose is explicit or implicit (from GC) |
Finalize()
The distructor just calls Dispose with false parameter specifying this is a cakl from GC.
Declaration
protected void Finalize()
OnProgress(Byte)
Raises the Progress event.
Declaration
public virtual void OnProgress(byte percent)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | percent |
ParseNext()
The framework calls this method to parse a chunk of content. It must be overridden in derived classes to provide the actual parser implementation.
Declaration
public abstract bool ParseNext()
Returns
Type | Description |
---|---|
System.Boolean |
|
Events
Progress
Default implementation of this event. Use OnProgress(Byte) to raise the event.
Declaration
public event EventHandler<ProgressEventArgs> Progress
Event Type
Type | Description |
---|---|
System.EventHandler<ProgressEventArgs> |