diff --git a/LrcParser/Parser/DecodeConfig.cs b/LrcParser/Parser/DecodeConfig.cs new file mode 100644 index 0000000..b39c624 --- /dev/null +++ b/LrcParser/Parser/DecodeConfig.cs @@ -0,0 +1,6 @@ +// Copyright (c) karaoke.dev . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +namespace LrcParser.Parser; + +public abstract class DecodeConfig; diff --git a/LrcParser/Parser/EncodeConfig.cs b/LrcParser/Parser/EncodeConfig.cs new file mode 100644 index 0000000..4cdb488 --- /dev/null +++ b/LrcParser/Parser/EncodeConfig.cs @@ -0,0 +1,6 @@ +// Copyright (c) karaoke.dev . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +namespace LrcParser.Parser; + +public abstract class EncodeConfig; diff --git a/LrcParser/Parser/IHasParserConfig.cs b/LrcParser/Parser/IHasParserConfig.cs new file mode 100644 index 0000000..9c4b584 --- /dev/null +++ b/LrcParser/Parser/IHasParserConfig.cs @@ -0,0 +1,12 @@ +// Copyright (c) karaoke.dev . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +namespace LrcParser.Parser; + +public interface IHasParserConfig + where TEncodeConfig : EncodeConfig + where TDecodeConfig : DecodeConfig +{ + TEncodeConfig EncodeConfig { get; set; } + TDecodeConfig DecodeConfig { get; set; } +} diff --git a/LrcParser/Parser/Kar/KarDecodeConfig.cs b/LrcParser/Parser/Kar/KarDecodeConfig.cs new file mode 100644 index 0000000..ce39324 --- /dev/null +++ b/LrcParser/Parser/Kar/KarDecodeConfig.cs @@ -0,0 +1,6 @@ +// Copyright (c) karaoke.dev . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +namespace LrcParser.Parser.Kar; + +public class KarDecodeConfig : DecodeConfig; diff --git a/LrcParser/Parser/Kar/KarEncodeConfig.cs b/LrcParser/Parser/Kar/KarEncodeConfig.cs new file mode 100644 index 0000000..64ecc12 --- /dev/null +++ b/LrcParser/Parser/Kar/KarEncodeConfig.cs @@ -0,0 +1,6 @@ +// Copyright (c) karaoke.dev . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +namespace LrcParser.Parser.Kar; + +public class KarEncodeConfig : EncodeConfig; diff --git a/LrcParser/Parser/Kar/KarParser.cs b/LrcParser/Parser/Kar/KarParser.cs index 5002f10..669ade6 100644 --- a/LrcParser/Parser/Kar/KarParser.cs +++ b/LrcParser/Parser/Kar/KarParser.cs @@ -12,8 +12,11 @@ namespace LrcParser.Parser.Kar; /// /// Parser for encode and decode .kar lyric format /// -public class KarParser : LyricParser +public class KarParser : LyricParser, IHasParserConfig { + public KarEncodeConfig EncodeConfig { get; set; } = new(); + public KarDecodeConfig DecodeConfig { get; set; } = new(); + public KarParser() { Register(); diff --git a/LrcParser/Parser/Lrc/LrcDecodeConfig.cs b/LrcParser/Parser/Lrc/LrcDecodeConfig.cs new file mode 100644 index 0000000..900e1dd --- /dev/null +++ b/LrcParser/Parser/Lrc/LrcDecodeConfig.cs @@ -0,0 +1,6 @@ +// Copyright (c) karaoke.dev . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +namespace LrcParser.Parser.Lrc; + +public class LrcDecodeConfig : DecodeConfig; diff --git a/LrcParser/Parser/Lrc/LrcEncodeConfig.cs b/LrcParser/Parser/Lrc/LrcEncodeConfig.cs new file mode 100644 index 0000000..7cc7562 --- /dev/null +++ b/LrcParser/Parser/Lrc/LrcEncodeConfig.cs @@ -0,0 +1,6 @@ +// Copyright (c) karaoke.dev . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +namespace LrcParser.Parser.Lrc; + +public class LrcEncodeConfig : EncodeConfig; diff --git a/LrcParser/Parser/Lrc/LrcParser.cs b/LrcParser/Parser/Lrc/LrcParser.cs index 09c5d0a..7378511 100644 --- a/LrcParser/Parser/Lrc/LrcParser.cs +++ b/LrcParser/Parser/Lrc/LrcParser.cs @@ -10,8 +10,11 @@ namespace LrcParser.Parser.Lrc; /// /// Parser for encode and decode .lrc lyric format /// -public class LrcParser : LyricParser +public class LrcParser : LyricParser, IHasParserConfig { + public LrcEncodeConfig EncodeConfig { get; set; } = new(); + public LrcDecodeConfig DecodeConfig { get; set; } = new(); + public LrcParser() { Register();