Ejemplo n.º 1
0
        public override void Split(TimeSpan duration, out PlaybillItem first, out PlaybillItem second)
        {
            if (duration <= TimeSpan.Zero)
            {
                throw new ArgumentOutOfRangeException("duration", string.Format("<{0}>无效,必须大于TimeSpan.Zero。", duration));
            }

            // Note: 是否在自动垫片上操作?

            PlayRange firstRange, secondRange;

            this.PlaySource.Break(duration, out firstRange, out secondRange);

            var segment             = this.PlaySource as PlaySourceSegment;
            NormalPlaySource source = segment != null ? segment.PlaySource : (NormalPlaySource)this.PlaySource;

            var firstSource = PlaySourceSegment.Create(source, firstRange);

            first = CreateInternal(firstSource);

            var secondSource = PlaySourceSegment.Create(source, secondRange);

            second = CreateInternal(secondSource);
        }
Ejemplo n.º 2
0
 private AutoPlaybillItem(PlaySourceSegment playSource)
     : base(playSource, ScheduleMode.Auto)
 {
 }