| INativeFileSnifferSniff Method |
Called by the framework to invoke the file sniffer for a specific file.
Namespace: Sdl.FileTypeSupport.Framework.NativeApiAssembly: Sdl.FileTypeSupport.Framework.Core (in Sdl.FileTypeSupport.Framework.Core.dll) Version: 1.0.0.0 (1.0.2551.0)
SyntaxSniffInfo Sniff(
string nativeFilePath,
Language suggestedSourceLanguage,
Codepage suggestedCodepage,
INativeTextLocationMessageReporter messageReporter,
ISettingsGroup settingsGroup
)
Function Sniff (
nativeFilePath As String,
suggestedSourceLanguage As Language,
suggestedCodepage As Codepage,
messageReporter As INativeTextLocationMessageReporter,
settingsGroup As ISettingsGroup
) As SniffInfo
SniffInfo^ Sniff(
String^ nativeFilePath,
Language^ suggestedSourceLanguage,
Codepage^ suggestedCodepage,
INativeTextLocationMessageReporter^ messageReporter,
ISettingsGroup^ settingsGroup
)
abstract Sniff :
nativeFilePath : string *
suggestedSourceLanguage : Language *
suggestedCodepage : Codepage *
messageReporter : INativeTextLocationMessageReporter *
settingsGroup : ISettingsGroup -> SniffInfo
Parameters
- nativeFilePath
- Type: SystemString
Fill path to the file to sniff. - suggestedSourceLanguage
- Type: Sdl.Core.GlobalizationLanguage
Expected source language of the file. - suggestedCodepage
- Type: Sdl.Core.GlobalizationCodepage
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: Sdl.Core.SettingsISettingsGroup
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:
SniffInfoAn 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
Comments