Click or drag to resize
INativeFileSnifferSniff Method
Called by the framework to invoke the file sniffer for a specific file.

Namespace: Sdl.FileTypeSupport.Framework.NativeApi
Assembly: Sdl.FileTypeSupport.Framework.Core (in Sdl.FileTypeSupport.Framework.Core.dll) Version: 1.0.0.0 (1.0.2343.0)
Syntax
SniffInfo Sniff(
	string nativeFilePath,
	Language suggestedSourceLanguage,
	Codepage suggestedCodepage,
	INativeTextLocationMessageReporter messageReporter,
	ISettingsGroup settingsGroup
)

Parameters

nativeFilePath
Type: SystemString
Fill path to the file to sniff.
suggestedSourceLanguage
Type: Language
Expected source language of the file.
suggestedCodepage
Type: Codepage
Possible suggested codepage of the file (based on its expected language).
messageReporter
Type: Sdl.FileTypeSupport.Framework.NativeApiINativeTextLocationMessageReporter
Supplied by the framework to allow file sniffers to report file-related information that may be of interest.
settingsGroup
Type: ISettingsGroup
Supplied by the framework to allow file sniffers to change their behavior depending on their settings. This parameter is intended as the sole means to gain access to settings in the sniffer - methods used for other components will invalidate the stateless model of file sniffers and should not be used.

Return Value

Type: SniffInfo
An instance of a SniffInfo object where the IsSupported property has been set to true or false to indicate if the file is of a supported type. The return value may also indicate the detected encoding, source, and target language, together with the detection confidence levels.
Remarks
The implementation of this method must be stateless and thread-safe.
See Also
Community
Edit
Be the first to Edit the community content of this topic.
Comments