BililiveRecorder/BililiveRecorder.Flv/Pipeline/ProcessingComment.cs

32 lines
825 B
C#
Raw Normal View History

2021-02-27 20:44:04 +08:00
using System;
namespace BililiveRecorder.Flv.Pipeline
{
public class ProcessingComment
{
2022-06-17 17:42:50 +08:00
public ProcessingComment(CommentType type, bool actionRequired, string comment)
2021-02-27 20:44:04 +08:00
{
2022-06-17 17:42:50 +08:00
this.Type = type;
this.ActionRequired = actionRequired;
this.Comment = comment ?? throw new ArgumentNullException(nameof(comment));
2021-02-27 20:44:04 +08:00
}
2021-04-07 18:24:05 +08:00
/// <summary>
/// Type
/// </summary>
2022-06-17 17:42:50 +08:00
public CommentType Type { get; }
/// <summary>
/// Action Required
/// </summary>
public bool ActionRequired { get; }
2021-02-27 20:44:04 +08:00
2021-04-07 18:24:05 +08:00
/// <summary>
/// Comment
/// </summary>
2022-06-17 17:42:50 +08:00
public string Comment { get; }
2021-02-27 20:44:04 +08:00
2022-06-17 17:42:50 +08:00
public override string ToString() => $"({this.Type},{(this.ActionRequired ? "A" : "C")}): {this.Comment}";
2021-02-27 20:44:04 +08:00
}
}