From b3f35fafe6a80f8cff88b9ba19545089a7f5f49d Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 1 Nov 2023 12:57:43 +0300 Subject: [PATCH] 2023111-1 --- anbs_cp/Classes/ActionState.cs | 16 ++++++++++++++-- anbs_cp/anbs_cp.csproj | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/anbs_cp/Classes/ActionState.cs b/anbs_cp/Classes/ActionState.cs index 034feee..1bba81d 100644 --- a/anbs_cp/Classes/ActionState.cs +++ b/anbs_cp/Classes/ActionState.cs @@ -14,9 +14,9 @@ namespace anbs_cp.Classes; public class ActionState { /// - /// Конструктор + /// Конструктор по умолчанию /// - protected ActionState () + public ActionState () { Info = new(); Warnings = new(); @@ -24,6 +24,18 @@ public class ActionState Value = default; } + /// + /// Конструктор с указанием начального значения + /// + /// Начальное значение + public ActionState (T defaultValue) + { + Info = new(); + Warnings = new(); + Errors = new(); + Value = defaultValue; + } + /// /// Список информации /// diff --git a/anbs_cp/anbs_cp.csproj b/anbs_cp/anbs_cp.csproj index c1ad123..843b5b4 100644 --- a/anbs_cp/anbs_cp.csproj +++ b/anbs_cp/anbs_cp.csproj @@ -2,7 +2,7 @@ net7.0 - 2023.1101.0 + 2023.1101.1 Александр Бабаев Набор компонентов ANB Software Библиотека полезных методов языка C#