add AssemblyAppVersionAttribute
This commit is contained in:
11
Pilz/Extensions/AssemblyExtensions.cs
Normal file
11
Pilz/Extensions/AssemblyExtensions.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user