Files
nadekobot/src/Nadeko.Bot.Common/Yml/CommentsObjectDescriptor.cs
2023-03-16 02:41:40 +01:00

30 lines
703 B
C#

#nullable disable
using YamlDotNet.Core;
using YamlDotNet.Serialization;
namespace NadekoBot.Common.Yml;
public sealed class CommentsObjectDescriptor : IObjectDescriptor
{
public string Comment { get; }
public object Value
=> _innerDescriptor.Value;
public Type Type
=> _innerDescriptor.Type;
public Type StaticType
=> _innerDescriptor.StaticType;
public ScalarStyle ScalarStyle
=> _innerDescriptor.ScalarStyle;
private readonly IObjectDescriptor _innerDescriptor;
public CommentsObjectDescriptor(IObjectDescriptor innerDescriptor, string comment)
{
_innerDescriptor = innerDescriptor;
Comment = comment;
}
}