Files
ZelWiki/ZelWiki.Models/DataModels/ProcessingInstructionCollection.cs
2025-02-23 18:47:21 +08:00

16 lines
582 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace ZelWiki.Models.DataModels
{
public class ProcessingInstructionCollection
{
public List<ProcessingInstruction> Collection { get; set; } = new();
/// <summary>
/// 如果集合包含给定的处理指令则返回true
/// </summary>
/// <param name="wikiInstruction">WikiInstruction.Protect</param>
/// <returns></returns>
public bool Contains(string wikiInstruction)
=> Collection.Any(o => string.Equals(o.Instruction, wikiInstruction, StringComparison.InvariantCultureIgnoreCase));
}
}