namespace QWERTYkez.WordProcessor; public readonly struct ReplaceItem { public ReplaceItem() { } public ReplaceItem(string text) { Text = text; } public ReplaceItem(string text, bool breakPage) { Text = text; BreakPage = breakPage; } public string Text { get; init; } = string.Empty; public bool BreakPage { get; init; } = false; // Неявное преобразование из ReplaceItem в string //public static implicit operator string(ReplaceItem item) => item.Text; // Явное преобразование из string в ReplaceItem public static explicit operator ReplaceItem(string text) => new() { Text = text }; }