diff --git a/Reflection_Engine/Query/IsReleased.cs b/Reflection_Engine/Query/IsReleased.cs deleted file mode 100644 index 4ca005849..000000000 --- a/Reflection_Engine/Query/IsReleased.cs +++ /dev/null @@ -1,97 +0,0 @@ -/* - * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2024, the respective contributors. All rights reserved. - * - * Each contributor holds copyright over their respective contributions. - * The project versioning (Git) records all such contribution source information. - * - * - * The BHoM is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3.0 of the License, or - * (at your option) any later version. - * - * The BHoM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this code. If not, see . - */ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Reflection; -using BH.oM.Base.Attributes; - -namespace BH.Engine.Reflection -{ - public static partial class Query - { - /***************************************************/ - /**** Public Methods ****/ - /***************************************************/ - - public static bool IsReleased(this MethodBase method) - { - if (method == null) - return false; - - ReleasedAttribute attribute = method.GetCustomAttribute(); - if (attribute != null) - { - try - { - Version version = new Version(attribute.FromVersion); - return (version.CompareTo(method.DeclaringType.Assembly.GetName().Version) <= 0); - } - catch - { - return true; - } - } - else - return false; - } - - - /***************************************************/ - - public static bool IsReleased(this Type type) - { - if (type == null) - return false; - - ReleasedAttribute attribute = type.GetCustomAttribute(); - if (attribute != null) - { - try - { - Version version = new Version(attribute.FromVersion); - return (version.CompareTo(type.Assembly.GetName().Version) > 0); - } - catch - { - return true; - } - } - else - return false; - } - - - /***************************************************/ - - - - } -} - - - - - diff --git a/Reflection_Engine/Versioning_71.json b/Reflection_Engine/Versioning_71.json new file mode 100644 index 000000000..59bd8508f --- /dev/null +++ b/Reflection_Engine/Versioning_71.json @@ -0,0 +1,6 @@ +{ + "MessageForDeleted": { + "BH.Engine.Reflection.Query.IsReleased(System.Reflection.MethodBase)": "This method has been removed as a part of legacy cleanup. Please contact developers in case you still need it.", + "BH.Engine.Reflection.Query.IsReleased(System.Type)": "This method has been removed as a part of legacy cleanup. Please contact developers in case you still need it." + } +} \ No newline at end of file