diff --git a/cpp/Platform.Interfaces.Tests/Platform.Interfaces.Tests.cpp b/cpp/Platform.Interfaces.Tests/Platform.Interfaces.Tests.cpp index c59ac914..2b8dfac1 100644 --- a/cpp/Platform.Interfaces.Tests/Platform.Interfaces.Tests.cpp +++ b/cpp/Platform.Interfaces.Tests/Platform.Interfaces.Tests.cpp @@ -30,17 +30,17 @@ namespace Platform::Interfaces::Tests { } } - TEST(CompileTests, CriterionMatcher) { - struct EmptyCriterionMatcher : public ICriterionMatcher { + TEST(CompileTests, Matcher) { + struct EmptyMatcher : public IMatcher { bool IsMatched(int) { return {}; } }; - static_assert(CCriterionMatcher); + static_assert(CMatcher); { - CCriterionMatcher auto criterionMatcher = EmptyCriterionMatcher{}; + CMatcher auto matcher = EmptyMatcher{}; - ASSERT_TRUE((CCriterionMatcher)); - ASSERT_TRUE((CCriterionMatcher)); + ASSERT_TRUE((CMatcher)); + ASSERT_TRUE((CMatcher)); } } diff --git a/cpp/Platform.Interfaces/CCriterionMatcher.h b/cpp/Platform.Interfaces/CMatcher.h similarity index 74% rename from cpp/Platform.Interfaces/CCriterionMatcher.h rename to cpp/Platform.Interfaces/CMatcher.h index 348f42d9..abe35f66 100644 --- a/cpp/Platform.Interfaces/CCriterionMatcher.h +++ b/cpp/Platform.Interfaces/CMatcher.h @@ -4,7 +4,7 @@ namespace Platform::Interfaces { template - concept CCriterionMatcher = requires(TSelf self, TArgument argument) { + concept CMatcher = requires(TSelf self, TArgument argument) { { self.IsMatched(argument) } -> std::same_as; }; } // namespace Platform::Interfaces diff --git a/cpp/Platform.Interfaces/ICriterionMatcher.h b/cpp/Platform.Interfaces/IMatcher.h similarity index 64% rename from cpp/Platform.Interfaces/ICriterionMatcher.h rename to cpp/Platform.Interfaces/IMatcher.h index a2fc4784..86246c1c 100644 --- a/cpp/Platform.Interfaces/ICriterionMatcher.h +++ b/cpp/Platform.Interfaces/IMatcher.h @@ -2,12 +2,12 @@ namespace Platform::Interfaces { template - struct ICriterionMatcher; + struct IMatcher; template - struct ICriterionMatcher { + struct IMatcher { virtual bool IsMatched(TArgument argument) = 0; - virtual ~ICriterionMatcher() = default; + virtual ~IMatcher() = default; }; } // namespace Platform::Interfaces diff --git a/cpp/Platform.Interfaces/Platform.Interfaces.h b/cpp/Platform.Interfaces/Platform.Interfaces.h index e6cbd2ff..e8e8131e 100644 --- a/cpp/Platform.Interfaces/Platform.Interfaces.h +++ b/cpp/Platform.Interfaces/Platform.Interfaces.h @@ -8,7 +8,7 @@ #include "CSet.h" #include "CDictionary.h" #include "CCounter.h" -#include "CCriterionMatcher.h" +#include "CMatcher.h" #include "CFactory.h" #include "CProperties.h" #include "CProvider.h" @@ -17,7 +17,7 @@ #include "ICounter[TResult, TArgument].h" #include "ICounter[TResult].h" -#include "ICriterionMatcher.h" +#include "IMatcher.h" #include "IFactory.h" #include "IProperties.h" #include "IProperty.h" diff --git a/csharp/Platform.Interfaces.Tests/InterfacesTests.cs b/csharp/Platform.Interfaces.Tests/InterfacesTests.cs index ecd9b4d1..6bb42a2a 100644 --- a/csharp/Platform.Interfaces.Tests/InterfacesTests.cs +++ b/csharp/Platform.Interfaces.Tests/InterfacesTests.cs @@ -12,7 +12,7 @@ public static void BuildTest() { ICounter c1 = null; ICounter c2 = null; - ICriterionMatcher cm1 = null; + IMatcher cm1 = null; IFactory f1 = null; IProperties p1 = null; IProperty p2 = null; diff --git a/csharp/Platform.Interfaces/ICriterionMatcher.cs b/csharp/Platform.Interfaces/IMatcher.cs similarity index 53% rename from csharp/Platform.Interfaces/ICriterionMatcher.cs rename to csharp/Platform.Interfaces/IMatcher.cs index 68928362..07d15d84 100644 --- a/csharp/Platform.Interfaces/ICriterionMatcher.cs +++ b/csharp/Platform.Interfaces/IMatcher.cs @@ -1,26 +1,26 @@ namespace Platform.Interfaces { /// - /// Defines a criterion matcher, that contains a specific method for determining whether the argument matches the criterion or not. - /// Определяет объект который проверяет соответствие критерию и содержит конкретный метод для определения, соответствует ли аргумент критерию или нет. + /// Defines a matcher that contains a specific method for determining whether the argument matches or not. + /// Определяет объект который проверяет соответствие и содержит конкретный метод для определения, соответствует ли аргумент или нет. /// /// /// Argument type. /// Тип аргумента. /// - public interface ICriterionMatcher + public interface IMatcher { /// - /// Determines whether the argument matches the criterion. - /// Определяет, соответствует ли аргумент критерию. + /// Determines whether the argument matches. + /// Определяет, соответствует ли аргумент. /// /// /// The argument. /// Аргумент. /// /// - /// A value that determines whether the argument matches the criterion. - /// Значение, определяющие соответствует ли аргумент критерию. + /// A value that determines whether the argument matches. + /// Значение, определяющие соответствует ли аргумент. /// bool IsMatched(TArgument argument); }