Browse Source

Remove unused helper methods

Marcin Ziąbek 2 months ago
parent
commit
7d95afc408
1 changed files with 0 additions and 29 deletions
  1. 0 29
      Source/QuestPDF/Helpers/Helpers.cs

+ 0 - 29
Source/QuestPDF/Helpers/Helpers.cs

@@ -18,35 +18,6 @@ namespace QuestPDF.Helpers
             SkNativeDependencyCompatibilityChecker.Test();
             SkNativeDependencyCompatibilityChecker.Test();
         }
         }
         
         
-        internal static byte[] LoadEmbeddedResource(string resourceName)
-        {
-            using var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName);
-            using var reader = new BinaryReader(stream);
-            
-            return reader.ReadBytes((int) stream.Length);
-        }
-        
-        private static PropertyInfo? ToPropertyInfo<T, TValue>(this Expression<Func<T, TValue>> selector)
-        {
-            return (selector.Body as MemberExpression)?.Member as PropertyInfo;
-        }
-        
-        internal static string? GetPropertyName<T, TValue>(this Expression<Func<T, TValue>> selector) where TValue : class
-        {
-            return selector.ToPropertyInfo()?.Name;
-        }
-        
-        internal static TValue? GetPropertyValue<T, TValue>(this T target, Expression<Func<T, TValue>> selector) where TValue : class
-        {
-            return selector.ToPropertyInfo()?.GetValue(target) as TValue;
-        }
-        
-        internal static void SetPropertyValue<T, TValue>(this T target, Expression<Func<T, TValue>> selector, TValue value)
-        {
-            var property = selector.ToPropertyInfo() ?? throw new Exception("Expected property with getter and setter.");
-            property?.SetValue(target, value);
-        }
-
         internal static string PrettifyName(this string text)
         internal static string PrettifyName(this string text)
         {
         {
             return Regex.Replace(text, @"([a-z])([A-Z])", "$1 $2", RegexOptions.Compiled);
             return Regex.Replace(text, @"([a-z])([A-Z])", "$1 $2", RegexOptions.Compiled);