You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
672 B
25 lines
672 B
using JetBrains.Annotations;
|
|
using Recyclarr.Common;
|
|
using Recyclarr.TrashLib.Config.Yaml;
|
|
using YamlDotNet.Serialization;
|
|
|
|
namespace Recyclarr.TrashLib.Config.EnvironmentVariables;
|
|
|
|
[UsedImplicitly]
|
|
public class EnvironmentVariablesYamlBehavior : IYamlBehavior
|
|
{
|
|
private readonly IEnvironment _environment;
|
|
|
|
public EnvironmentVariablesYamlBehavior(IEnvironment environment)
|
|
{
|
|
_environment = environment;
|
|
}
|
|
|
|
public void Setup(DeserializerBuilder builder)
|
|
{
|
|
builder
|
|
.WithNodeDeserializer(new EnvironmentVariablesDeserializer(_environment))
|
|
.WithTagMapping("!env_var", typeof(EnvironmentVariableTag));
|
|
}
|
|
}
|