Example #1
0
 public void Deconstruct(out string chinese, out Etymology etymologies, out Oracle[] oracles, out Bronze[] bronzes, out Seal[] seals, out Liushutong[] liushutongs)
 {
     chinese     = this.Chinese;
     etymologies = this.Etymology;
     oracles     = this.Oracles;
     bronzes     = this.Bronzes;
     seals       = this.Seals;
     liushutongs = this.Liushutongs;
 }
Example #2
0
 public AnalyzeResult(string chinese, Etymology etymologies, Oracle[] oracles, Bronze[] bronzes,
                      Seal[] seals, Liushutong[] liushutongs)
 {
     this.Chinese        = chinese;
     this.Etymology      = etymologies ?? throw new ArgumentNullException(nameof(etymologies));
     this.Oracles        = oracles ?? throw new ArgumentNullException(nameof(oracles));
     this.Bronzes        = bronzes ?? throw new ArgumentNullException(nameof(bronzes));
     this.Seals          = seals ?? throw new ArgumentNullException(nameof(seals));
     this.Liushutongs    = liushutongs ?? throw new ArgumentNullException(nameof(liushutongs));
     this.CharacterCount = oracles.Length + bronzes.Length + seals.Length + liushutongs.Length;
 }
 public static string Title(this Etymology etymology) =>
 etymology.HasSimplified()
         ? $"{etymology.FormattedId()} {etymology.TraditionalInitial}{etymology.TraditionalUnicode.ToHex()} → {etymology.SimplifiedInitial}{etymology.SimplifiedUnicode.ToHex()}"
         : $"{etymology.FormattedId()} {etymology.TraditionalInitial}{etymology.TraditionalUnicode.ToHex()}";
 public static bool HasSimplified(this Etymology etymology) =>
 !string.IsNullOrEmpty(etymology.Simplified) && !etymology.Simplified.StartsWith(CharacterPartPrefix, StringComparison.OrdinalIgnoreCase);
Example #5
0
 public static bool HasSimplified(this Etymology etymology) =>
 !string.IsNullOrEmpty(etymology.Simplified) && etymology.Simplified.Characters().First().IsSingleChineseCharacter();