借助网络配置,控制Modbus工具的日志显示,避免卡死界面
智能大石头 authored at 2021-12-11 22:09:19
846.00 B
XCoder
using System.Text.RegularExpressions;

namespace NewLife.XCoder.Models;

/// <summary>正则匹配结果项</summary>
public class RegexMatchItem
{
    /// <summary>序号</summary>
    public Int32 Index { get; set; }

    /// <summary>匹配值</summary>
    public String Value { get; set; } = "";

    /// <summary>行号</summary>
    public Int32 Line { get; set; }

    /// <summary>位置</summary>
    public Int32 Position { get; set; }

    /// <summary>长度</summary>
    public Int32 Length { get; set; }

    /// <summary>位置描述</summary>
    public String Location => $"({Line},{Position},{Length})";

    /// <summary>单行显示值(转义换行与制表符)</summary>
    public String Display => RegexTextHelper.Escape(Value);

    /// <summary>原始 Match 对象</summary>
    public Match? Match { get; set; }
}