示例#1
0
        public override string ToString(FormatType formatType, object supplement = null)
        {
            return(formatType switch
            {
                FormatType.Brief => $"{ID}.{Reply}",
                FormatType.Detail => $"{ID}.{Reply}" +
                SourceUser?.Be($"\n贡献人:{SourceUser.Name}"),

                _ => throw new ArgumentOutOfRangeException(nameof(formatType), formatType, null)
            });
示例#2
0
 public override string ToString(FormatType format, object supplement = null)
 {
     return(format switch
     {
         FormatType.Brief => $"{AliasID}.{Alias}——{CorrespondingSong?.SongTitle}",
         FormatType.Detail => $"{AliasID}.{Alias}——{CorrespondingSong?.SongTitle}" +
         $"{SourceUser?.Be($"\n贡献者:{SourceUser.Name}")}",
         FormatType.Customize1 => $"{Alias}",
         _ => throw new ArgumentOutOfRangeException(nameof(format), format, null)
     });
示例#3
0
 public override string ToString(FormatType formatType, object supplement = null)
 {
     return(formatType switch
     {
         FormatType.Brief => $"{ID}.{(IsOminous ? "忌" : "宜")}{Title}:{Content}",
         FormatType.Detail => $"{ID}.{(IsOminous ? "忌" : "宜")}{Title}\n{Content}" +
         SourceUser?.Be($"\n贡献人:{SourceUser.Name}"),
         FormatType.Customize1 => $"{(IsOminous ? "忌" : "宜")}{Title}:{Content}",
         _ => throw new ArgumentOutOfRangeException(nameof(formatType), formatType, null)
     });