Class EncodingMappingRule
- Namespace
- Apq.Cfg.EncodingSupport
- Assembly
- Apq.Cfg.dll
编码映射规则
public sealed class EncodingMappingRule
- Inheritance
-
EncodingMappingRule
- Inherited Members
Constructors
EncodingMappingRule(string, EncodingMappingType, Encoding, int)
创建编码映射规则
public EncodingMappingRule(string pattern, EncodingMappingType type, Encoding encoding, int priority = 0)
Parameters
patternstring匹配模式
typeEncodingMappingType匹配类型
encodingEncoding目标编码
priorityint优先级(数值越大优先级越高)
Properties
Encoding
目标编码
public Encoding Encoding { get; }
Property Value
Pattern
匹配模式
public string Pattern { get; }
Property Value
Priority
优先级(数值越大优先级越高,默认 0)
public int Priority { get; }
Property Value
Type
匹配类型
public EncodingMappingType Type { get; }
Property Value
Methods
IsMatch(string)
检查文件路径是否匹配此规则
public bool IsMatch(string filePath)
Parameters
filePathstring文件路径
Returns
- bool
是否匹配
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.