add AssemblyAppVersionAttribute

This commit is contained in:
Pilzinsel64
2024-08-30 12:01:52 +02:00
parent 11889dac61
commit fd77deb494
2 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
using System.Reflection;
namespace Pilz.Extensions;
public static class AssemblyExtensions
{
public static AppVersion GetAppVersion(this Assembly @this)
{
return @this.GetCustomAttribute<AssemblyAppVersionAttribute>()?.Version ?? new();
}
}