
Some checks failed
Build / Compute Version (push) Successful in 6s
Build / Build Nuget package (NuGet) (push) Successful in 3m38s
Build / Build Nuget package (CringeBootstrap.Abstractions) (push) Successful in 4m2s
Build / Build Nuget package (SharedCringe) (push) Successful in 4m1s
Build / Build Nuget package (CringePlugins) (push) Successful in 4m18s
Build / Build Launcher (push) Failing after 4m31s
global service provider with our stuff so we stop using statics everywhere polly retry policy for httpclient
21 lines
543 B
C#
21 lines
543 B
C#
using System.Reflection;
|
|
using Json.Schema;
|
|
using Json.Schema.Generation;
|
|
|
|
namespace CringePlugins.Config.Spec;
|
|
|
|
public interface IConfigurationSpecProvider
|
|
{
|
|
static abstract JsonSchema Spec { get; }
|
|
|
|
static JsonSchema? FromType(Type type)
|
|
{
|
|
if (type.IsAssignableTo(typeof(IConfigurationSpecProvider)))
|
|
{
|
|
return (JsonSchema)type.GetProperty(nameof(Spec), BindingFlags.Static | BindingFlags.Public | BindingFlags.DeclaredOnly)!
|
|
.GetValue(null)!;
|
|
}
|
|
|
|
return null;
|
|
}
|
|
} |