zaaReloaded2/zaaReloaded2/YamlTagMappingExtension.cs

29 lines
1.2 KiB
C#
Executable File

using zaaReloaded2.Controller;
using zaaReloaded2.Controller.Elements;
using YamlDotNet.Serialization;
using System.Collections.Generic;
namespace zaaReloaded2
{
static class YamlTagMappingExtension
{
public static TBuilder WithCommonTagMappings<TBuilder>(this TBuilder builder)
where TBuilder : BuilderSkeleton<TBuilder>
{
return builder
.WithTagMapping("!UserSettings", typeof(UserSettings))
.WithTagMapping("!Settings", typeof(Settings))
.WithTagMapping("!SettingsList", typeof(List<Settings>))
.WithTagMapping("!ElementsList", typeof(List<ElementBase>))
.WithTagMapping("!FormatElementsList", typeof(List<FormatElementBase>))
.WithTagMapping("!Items", typeof(Items))
.WithTagMapping("!CustomText", typeof(CustomText))
.WithTagMapping("!SelectFirstDay", typeof(SelectFirstDay))
.WithTagMapping("!SelectEachDay", typeof(SelectEachDay))
.WithTagMapping("!SelectLastDay", typeof(SelectLastDay))
.WithTagMapping("!TwoColumns", typeof(TwoColumns))
.WithTagMapping("!NextColumn", typeof(NextColumn));
}
}
}