From 6ec0ab476c43c218a2bbfbf86dbcc937c3b8f6c5 Mon Sep 17 00:00:00 2001 From: Luiz Henrique Cassettari Date: Tue, 10 Dec 2024 16:56:01 -0300 Subject: [PATCH] Remove not used --- .../Revit/Utils/AssemblyMetadataUtils.cs | 46 ------------------- 1 file changed, 46 deletions(-) delete mode 100644 ricaun.RevitTest.Application/Revit/Utils/AssemblyMetadataUtils.cs diff --git a/ricaun.RevitTest.Application/Revit/Utils/AssemblyMetadataUtils.cs b/ricaun.RevitTest.Application/Revit/Utils/AssemblyMetadataUtils.cs deleted file mode 100644 index c236cc5..0000000 --- a/ricaun.RevitTest.Application/Revit/Utils/AssemblyMetadataUtils.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System.Linq; -using System.Reflection; - -namespace ricaun.RevitTest.Application.Revit -{ - public static class AssemblyMetadataUtils - { - public static string Get(this AssemblyMetadataAttribute[] attributes, string key) - { - var attribute = attributes.FirstOrDefault(e => e.Key.IndexOf(key, System.StringComparison.InvariantCultureIgnoreCase) != -1); - return attribute?.Value; - } - - public static double GetDouble(this AssemblyMetadataAttribute[] attributes, string key, double defaultValue = 0.0) - { - var value = attributes.Get(key); - if (double.TryParse(value, out double result)) - { - return result; - } - return defaultValue; - } - - public static double GetDouble(this Assembly assembly, string key, double defaultValue = 0.0) - { - var value = assembly.Get(key); - if (double.TryParse(value, out double result)) - { - return result; - } - return defaultValue; - } - - public static string Get(this Assembly assembly, string key) - { - return assembly.GetAssemblyMetadata(key)?.Value; - } - - internal static AssemblyMetadataAttribute GetAssemblyMetadata(this Assembly assembly, string key) - { - return assembly - .GetCustomAttributes() - .FirstOrDefault(e => e.Key.IndexOf(key, System.StringComparison.InvariantCultureIgnoreCase) != -1); - } - } -} \ No newline at end of file