Esempio n. 1
0
        public HuanXiSha(string name, Pian shangPian, Pian xiaPian)
            : base(name, "浣溪沙", shangPian, xiaPian)
        {
            if (shangPian == null)
            {
                throw new ArgumentNullException(nameof(shangPian));
            }
            if (xiaPian == null)
            {
                throw new ArgumentNullException(nameof(xiaPian));
            }

            if (this.ShangPian.NumberOfJus != NumberOfJusOfShangPian)
            {
                throw new ArgumentException($"上片的句数不正确,上片的句数应为:{NumberOfJusOfShangPian}");
            }

            if (this.XiaPian.NumberOfJus != NumberOfJusOfXiaPian)
            {
                throw new ArgumentException($"下片的句数不正确,下片的句数应为:{NumberOfJusOfXiaPian}");
            }

            int line = 1;

            foreach (var ju in shangPian.Jus)
            {
                if (ju.NumberOfZis != NumberOfZisForEachJu)
                {
                    throw new Exception($"上片第{line}句的字数不正确,应为:{NumberOfZisForEachJu}");
                }

                line++;
            }

            line = 1;
            foreach (var ju in xiaPian.Jus)
            {
                if (ju.NumberOfZis != NumberOfZisForEachJu)
                {
                    throw new Exception($"下片第{line}句的字数不正确,应为:{NumberOfZisForEachJu}");
                }

                line++;
            }

            this.ShangPian.Description = "上片或上阕三句全用韵";
            this.XiaPian.Description   = "下片或下阕末二句用韵";
        }
Esempio n. 2
0
 public ShuiDiaoGeTou(string name, Pian shangPian, Pian xiaPian)
     : base(name, "水调歌头", shangPian, xiaPian)
 {
 }
Esempio n. 3
0
 protected PianCi(string name, string ciPaiMing, Pian shangPian, Pian xiaPian)
     : base(name, ciPaiMing)
 {
     this.ShangPian = shangPian;
     this.XiaPian   = xiaPian;
 }