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

namespace NewLife.XCoder.Models;

/// <summary>正则捕获结果项</summary>
public class RegexCaptureItem
{
    /// <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 => $"({Position},{Length})";

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

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