mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 03:19:56 +00:00
Core - Embed PluginApiVersion into the assembly metadata
This commit is contained in:
1 parent
22268fc945
commit
3f1eaeda29
2 files changed
+8
-1
No files matched your search
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Artemis.Core.JsonConverters;
|
||||
using Artemis.Core.Services;
|
||||
@@ -61,7 +62,8 @@ public static class Constants
|
||||
/// <summary>
|
||||
/// The current API version for plugins
|
||||
/// </summary>
|
||||
public static readonly int PluginApiVersion = CoreAssembly.GetName().Version.Major;
|
||||
public static readonly int PluginApiVersion = int.Parse(CoreAssembly.GetCustomAttributes<AssemblyMetadataAttribute>()
|
||||
.First(a => a.Key == "PluginApiVersion").Value);
|
||||
|
||||
/// <summary>
|
||||
/// The plugin info used by core components of Artemis
|
||||
|
||||
Reference in new issue
Block a user