using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace HotelPms.SourceFactory.FileEdit
|
{
|
public class EditData
|
{
|
public string FilePath { get; set; } = string.Empty;
|
|
|
public Encoding Encoding { get; set; } = Encoding.UTF8;
|
|
public List<Item> Data { get; set; } = new List<Item>();
|
|
/// <summary>
|
/// 存在かどうか
|
/// </summary>
|
/// <param name="key"></param>
|
/// <returns></returns>
|
public bool Exists(string key)
|
{
|
string context = File.ReadAllText(FilePath, Encoding);
|
return context.Contains(key);
|
}
|
}
|
}
|