Class EncodingDetectionResult
- Namespace
- Apq.Cfg.EncodingSupport
- Assembly
- Apq.Cfg.dll
编码检测结果
public sealed class EncodingDetectionResult
- Inheritance
-
EncodingDetectionResult
- Inherited Members
Constructors
EncodingDetectionResult(Encoding, float, EncodingDetectionMethod, bool, string?, string)
public EncodingDetectionResult(Encoding encoding, float confidence, EncodingDetectionMethod method, bool hasBom, string? rawEncodingName, string filePath)
Parameters
encodingEncodingconfidencefloatmethodEncodingDetectionMethodhasBomboolrawEncodingNamestringfilePathstring
Properties
Confidence
检测置信度(0.0-1.0)
public float Confidence { get; }
Property Value
DetectedAt
检测时间
public DateTimeOffset DetectedAt { get; }
Property Value
Encoding
检测到的编码
public Encoding Encoding { get; }
Property Value
FilePath
文件路径
public string FilePath { get; }
Property Value
HasBom
是否有 BOM 标记
public bool HasBom { get; }
Property Value
Method
检测方法
public EncodingDetectionMethod Method { get; }
Property Value
RawEncodingName
原始编码名称(来自检测库)
public string? RawEncodingName { get; }
Property Value
Methods
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.