diff options
author | vnugent <public@vaughnnugent.com> | 2023-11-06 23:48:57 -0500 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2023-11-06 23:48:57 -0500 |
commit | 0ff71b1b49edc46e279db1c00235f666907386e3 (patch) | |
tree | eba6ae42141c5accdec1fb6f49d469de578cec45 /lib/VNLib.Plugins.Extensions.Loading/src | |
parent | d15303e584571dcc506f806dfb8ce59ea0309dbb (diff) |
mostly some cache stuff
Diffstat (limited to 'lib/VNLib.Plugins.Extensions.Loading/src')
-rw-r--r-- | lib/VNLib.Plugins.Extensions.Loading/src/LoadingExtensions.cs | 2 | ||||
-rw-r--r-- | lib/VNLib.Plugins.Extensions.Loading/src/ServiceExportAttribute.cs (renamed from lib/VNLib.Plugins.Extensions.Loading/src/ExternServiceAttribute.cs) | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/VNLib.Plugins.Extensions.Loading/src/LoadingExtensions.cs b/lib/VNLib.Plugins.Extensions.Loading/src/LoadingExtensions.cs index 554e40f..8432cde 100644 --- a/lib/VNLib.Plugins.Extensions.Loading/src/LoadingExtensions.cs +++ b/lib/VNLib.Plugins.Extensions.Loading/src/LoadingExtensions.cs @@ -383,7 +383,7 @@ namespace VNLib.Plugins.Extensions.Loading Type[] matchingTypes = manLib.TryGetAllMatchingTypes<T>().ToArray(); //try to get the first type that has the extern attribute, or fall back to the first public & concrete type - Type? exported = matchingTypes.FirstOrDefault(t => t.GetCustomAttribute<ExternServiceAttribute>() != null) + Type? exported = matchingTypes.FirstOrDefault(t => t.GetCustomAttribute<ServiceExportAttribute>() != null) ?? matchingTypes.Where(t => !t.IsAbstract && t.IsPublic).FirstOrDefault(); _ = exported ?? throw new TypeLoadException($"The desired external asset type {typeof(T).Name} is not exported as part of the assembly {manLib.Assembly.FullName}"); diff --git a/lib/VNLib.Plugins.Extensions.Loading/src/ExternServiceAttribute.cs b/lib/VNLib.Plugins.Extensions.Loading/src/ServiceExportAttribute.cs index 369b4bb..023c68e 100644 --- a/lib/VNLib.Plugins.Extensions.Loading/src/ExternServiceAttribute.cs +++ b/lib/VNLib.Plugins.Extensions.Loading/src/ServiceExportAttribute.cs @@ -3,9 +3,9 @@ * * Library: VNLib * Package: VNLib.Plugins.Extensions.Loading -* File: ExternServiceAttribute.cs +* File: ServiceExportAttribute.cs * -* ExternServiceAttribute.cs is part of VNLib.Plugins.Extensions.Loading which is part of the larger +* ServiceExportAttribute.cs is part of VNLib.Plugins.Extensions.Loading which is part of the larger * VNLib collection of libraries and utilities. * * VNLib.Plugins.Extensions.Loading is free software: you can redistribute it and/or modify @@ -35,9 +35,9 @@ namespace VNLib.Plugins.Extensions.Loading /// </para> /// </summary> [AttributeUsage(AttributeTargets.Class)] - public sealed class ExternServiceAttribute: Attribute + public sealed class ServiceExportAttribute: Attribute { - public ExternServiceAttribute() + public ServiceExportAttribute() { } } } |