replace v6 with experimental v7 code
This commit is contained in:
11
src/MpvNet/AppInfo.cs
Normal file
11
src/MpvNet/AppInfo.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
using System.Reflection;
|
||||
|
||||
namespace MpvNet;
|
||||
|
||||
public static class AppInfo
|
||||
{
|
||||
public static string Product => GetAssemblyAttribute<AssemblyProductAttribute>().Product;
|
||||
public static Version Version => Assembly.GetEntryAssembly()!.GetName().Version!;
|
||||
static T GetAssemblyAttribute<T>() => (T)(object)Assembly.GetEntryAssembly()!.GetCustomAttributes(typeof(T)).First();
|
||||
}
|
||||
Reference in New Issue
Block a user