Table of Contents

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

encoding Encoding
confidence float
method EncodingDetectionMethod
hasBom bool
rawEncodingName string
filePath string

Properties

Confidence

检测置信度(0.0-1.0)

public float Confidence { get; }

Property Value

float

DetectedAt

检测时间

public DateTimeOffset DetectedAt { get; }

Property Value

DateTimeOffset

Encoding

检测到的编码

public Encoding Encoding { get; }

Property Value

Encoding

FilePath

文件路径

public string FilePath { get; }

Property Value

string

HasBom

是否有 BOM 标记

public bool HasBom { get; }

Property Value

bool

Method

检测方法

public EncodingDetectionMethod Method { get; }

Property Value

EncodingDetectionMethod

RawEncodingName

原始编码名称(来自检测库)

public string? RawEncodingName { get; }

Property Value

string

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.