Example #1
0
        public override string ToString(FormatType format, object supplement = null)
        {
            switch (format)
            {
            case FormatType.Brief:
                return($"{Id}.{Word} [{Abbreviation}]");

            case FormatType.Detail:
                return($"{Id}.{Word} [{Abbreviation}]{Pinyin?.BeIfNotWhiteSpace($"\n拼音:{Pinyin}")}{Explanation?.BeIfNotWhiteSpace($"\n解释:{Explanation}")}{Derivation?.BeIfNotWhiteSpace($"\n来源:{Derivation}")}{Example?.BeIfNotWhiteSpace($"\n例子:{Example}")}");
            }
            return(null);
        }