Click or drag to resize
AbstractNativeFileParser Class
Abstract base class that provides boilerplate implementation for native file parsers. Deriving your file parser from this class will save you some implementation work. Provides a default implementation of the ParseNext method. You can override the BeforeParsing, DuringParsing and AfterParsing in your parser implementation in order to separate initialization and clean-up code from the core parsing code.
Inheritance Hierarchy

Namespace: Sdl.FileTypeSupport.Framework.NativeApi
Assembly: Sdl.FileTypeSupport.Framework.Core (in Sdl.FileTypeSupport.Framework.Core.dll) Version: 1.0.0.0 (1.0.2551.0)
Syntax
public abstract class AbstractNativeFileParser : AbstractNativeFileTypeComponent, 
	INativeFileParser, INativeFileTypeComponent, IParser, IDisposable

The AbstractNativeFileParser type exposes the following members.

Constructors
  NameDescription
Protected methodAbstractNativeFileParser
Protected constructor that should only be called by derived classes
Top
Properties
  NameDescription
Protected propertyCurrentStage
The stage of processing that the parser has reached
Public propertyMessageReporter
The message reporter to be used for reporting non-critical issues.
(Inherited from AbstractNativeFileTypeComponent.)
Public propertyOutput
Default implementation of the Output property
Public propertyPropertiesFactory
The factory used to create native properties objects
(Inherited from AbstractNativeFileTypeComponent.)
Top
Methods
  NameDescription
Protected methodAfterParsing
The implementation of ParseNext will call this method once, after parsing has been completed (which is indicated by DuringParsing returning false). Override this method to do clean-up work such as closing the file etc. once parsing is complete. The default implementation does nothing.
Protected methodBeforeParsing
The implementation of ParseNext will call this method the very first time that ParseNext is called. Override this method to perform setup work for the parsing such as initializing the state, opening the file to be parsed, etc. The default implementation of this method does nothing.
Public methodDispose
Implements IDisposable. Just calls Dispose saying that this is an explicit disposal and tells the GC not to call the Finalizer.
Protected methodDispose(Boolean)
Last change for the Parser to dispose manage and unmanged objects. It can be overriden by subclases.
Protected methodDuringParsing
The implementation of ParseNext will call this method to perform actual parsing of the file. BeforeParsing will always be called before this method. Override this method to perform the parsing in suitably small chunks. Returns true as long as there is more content to be parsed. Once this function returns false, the AfterParsing method will be called once. During parsing the implementation may call OnProgress(Object, ProgressEventArgs) to report the current progress. The default implementation returns false.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
The distructor just calls Dispose with false parameter specifying this is a cakl from GC.
(Overrides ObjectFinalize.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOnProgress(Byte)
Helper method to set up the Progress event
Public methodOnProgress(Object, ProgressEventArgs)
Helper method to fire the Progress event
Public methodOutputText
Helper method to output plain text
Public methodParseNext
Default implementation that takes care of dividing the parsing into three stages, before parsing, during parsing, and after parsing, by calling the methods BeforeParsing, DuringParsing, and AfterParsing that derived classes should normally override to do the setup, parsing, and clean-up work. Derived classes do not need to override this method unless they need to add additional functionality outside of the three parsing implementation methods.
Public methodReportMessage(Object, String, ErrorLevel, String, String)
Calls the corresponding method on the message reporter property.
(Inherited from AbstractNativeFileTypeComponent.)
Public methodReportMessage(Object, String, ErrorLevel, String, LocationMarkerId, LocationMarkerId)
Calls the corresponding method on the message reporter property.
(Inherited from AbstractNativeFileTypeComponent.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Public eventProgress
Progress reporting events, typically attached to when a progress reporter is used
Top
See Also
Community
Edit

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