Exemplo n.º 1
0
        /// <summary>
        /// Create a new linked train instance.
        /// </summary>
        /// <param name="link">Parent link object.</param>
        /// <param name="countingIndex">The counting index of this train, relative to <paramref name="link"/>.</param>
        public LinkedTrain(TrainLink link, int countingIndex) : base(link.ParentTrain.XMLEntity.XName, link.ParentTimetable)
        {
            this.link          = link;
            this.countingIndex = countingIndex;
            baseTrain          = link.ParentTrain;
            link._InternalInjectLinkedTrain(this, countingIndex);

            link.Apply(true, true);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Create a new linked train instance, based on an existing xml structure.
 /// </summary>
 /// <param name="link">Parent link object.</param>
 /// <param name="countingIndex">The counting index of this train, relative to <paramref name="link"/>.</param>
 /// <param name="entity">The pre-existing xml structure.</param>
 public LinkedTrain(TrainLink link, int countingIndex, XMLEntity entity) : base(entity, link.ParentTimetable)
 {
     this.link          = link;
     this.countingIndex = countingIndex;
     baseTrain          = link.ParentTrain;
 }