Click or drag to resize
AbstractFilePreTweaker Class
Provides an implementation of a NativeFileTweaker that handles the work of creating a backup of the original file. Override the virtual Tweak method to perform the actual work of modifying the file.
Inheritance Hierarchy
SystemObject
  Sdl.FileTypeSupport.Framework.Core.Utilities.NativeApiAbstractFilePreTweaker
    Sdl.FileTypeSupport.Framework.Core.Utilities.NativeApiRegExFilePreTweaker

Namespace: Sdl.FileTypeSupport.Framework.Core.Utilities.NativeApi
Assembly: Sdl.FileTypeSupport.Framework.Core.Utilities (in Sdl.FileTypeSupport.Framework.Core.Utilities.dll) Version: 1.0.0.0 (1.0.2343.0)
Syntax
public abstract class AbstractFilePreTweaker : IFilePreTweaker, 
	IFileTweaker

The AbstractFilePreTweaker type exposes the following members.

Constructors
  NameDescription
Protected methodAbstractFilePreTweaker
AbstractFilePreTweaker constructor
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 a hash function for a particular type.
(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 methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Protected methodTweak
This method should be overridden to provide an implementation of the processing performed before the native file is parsed by the framework.
Public methodTweakFilePreParsing
Default implementation of the INativeFileTweaker.TweakFilePreParsing method that will check to see if the file will be tweaked (see WillFileBeTweaked), and whether the encoding has been detected during sniffing if RequireValidEncoding is true and then call Tweak. Derived classes should normally override the Tweak method instead.
Protected methodWillFileBeTweaked
This method can optionally be overridden to let the framework know whether the tweaking operation will actually modify the file. This helps the framework know whether a backup of the file should be created and can allow read-only files to be processed without error if no tweaking is required. By default, this returns true.
Top
Properties
  NameDescription
Public propertyEnabled
Controls whether the tweaker is run during parsing. Default is true.
Public propertyMessageReporter
The default implementation stores the message reporter in a field.
Protected propertyName
The property contains a name for the file tweaker that can be overridden in derived classes. This name is used in error messages.
Public propertyRequireValidEncoding
This property governs whether the File Tweaker requires encoding information before it will tweak a file. This may be needed to ensure that the file the tweaker uses the correct encoding.
Top
Examples
For an example of the use of this class, see RegExFilePreTweaker.
See Also
Community
Edit
Be the first to Edit the community content of this topic.
Comments