Пример #1
0
        public bool Equals(YmnosGroup ymnosGroup)
        {
            if (ymnosGroup == null)
            {
                throw new ArgumentNullException("YmnosGroup.Equals");
            }

            return(Ihos.Equals(ymnosGroup.Ihos) &&
                   Annotation == ymnosGroup.Annotation &&
                   Prosomoion == ymnosGroup.Prosomoion);
            //&& Annotation?.Equals(ymnosGroup.Annotation) == true
            //&& Prosomoion?.Equals(ymnosGroup.Prosomoion) == true);
        }
Пример #2
0
        /// <summary>
        /// Возвращает группу с параметрами родителя и с одним песнопением по указанному индексу
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        public YmnosGroup GetGroupWithSingleYmnos(int index)
        {
            if (index < 0 || index >= Ymnis.Count)
            {
                throw new IndexOutOfRangeException("GetGroupWithSingleYmnos");
            }

            var result = new YmnosGroup();

            result.CloneValues(this);
            result.Ymnis.Add(new Ymnos(Ymnis[index]));

            return(result);
        }
Пример #3
0
        private void CloneValues(YmnosGroup source)
        {
            if (source.Prosomoion != null)
            {
                Prosomoion = new Prosomoion(source.Prosomoion);
            }

            if (source.Annotation != null)
            {
                Annotation = new ItemText(source.Annotation);
            }

            Ihos = source.Ihos;
        }
Пример #4
0
        public YmnosStructure(YmnosStructure ymnosStructure)
        {
            if (ymnosStructure == null)
            {
                throw new ArgumentNullException("YmnosStructure");
            }

            ymnosStructure.Groups.ForEach(c => Groups.Add(new YmnosGroup(c)));

            if (ymnosStructure.Doxastichon != null)
            {
                Doxastichon = new YmnosGroup(ymnosStructure.Doxastichon);
            }

            ymnosStructure.Theotokion.ForEach(c => Theotokion.Add(new YmnosGroup(c)));
        }
Пример #5
0
        public YmnosGroup(YmnosGroup source)
        {
            CloneValues(source);

            source.Ymnis.ForEach(c => Ymnis.Add(new Ymnos(c)));
        }
Пример #6
0
 public YmnosStructure(YmnosGroup group)
 {
     Groups.Add(new YmnosGroup(group));
 }