From a0e10c27810811a88ba5bf0b20bd77c501558230 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 3 Dec 2022 15:39:28 +0300 Subject: [PATCH] 20221203-3 --- anbs_cp/Classes/ActionState.cs | 20 +++++++++++++++++--- anbs_cp/anbs_cp.csproj | 6 +++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/anbs_cp/Classes/ActionState.cs b/anbs_cp/Classes/ActionState.cs index f8b5401..c53a9c7 100644 --- a/anbs_cp/Classes/ActionState.cs +++ b/anbs_cp/Classes/ActionState.cs @@ -176,11 +176,11 @@ public sealed class ActionState /// Добавление информации /// /// Текст информации - /// Объект информации - public void AddInfo (string message, string warningObject = "") + /// Объект информации + public void AddInfo (string message, string infoObject = "") { //Создаю информацию - ActionInfo info = new(warningObject, message); + ActionInfo info = new(infoObject, message); //Добавляю информацию AddInfo(info); @@ -295,5 +295,19 @@ public sealed class ActionState /// Количество информационных сообщений public int InfoCount (bool ignoreStatus) => ignoreStatus ? Info.Count(static info => !info.IsStatusInfo) : Info.Count; #endregion + + #region Добавление другого состояния + + /// + /// Добавляет другое состояние (например, результат другого действия, который возвращает ). + /// + /// Запись состояния + public void AddState(ActionState state) + { + AddErrors(state.Errors); + AddWarnings(state.Warnings); + AddInfos(state.Info); + } + #endregion #endregion } \ No newline at end of file diff --git a/anbs_cp/anbs_cp.csproj b/anbs_cp/anbs_cp.csproj index 7278cd8..2629cda 100644 --- a/anbs_cp/anbs_cp.csproj +++ b/anbs_cp/anbs_cp.csproj @@ -2,7 +2,7 @@ net7.0 - 2022.1203.2 + 2022.1203.3 Alexander Babaev ANB Software Components Pack Library of some useful functions in C# language. @@ -15,8 +15,8 @@ True https://git.babaev-an.ru/babaev-an/anbsoftware_componentspack https://git.babaev-an.ru/babaev-an/anbsoftware_componentspack - 2022.1203.2 - 2022.1203.2 + 2022.1203.3 + 2022.1203.3 ANBSoftware.ComponentsPack MIT 6.0