Beispiel #1
0
        public BusType(Protobuf.BusType busTypePb)
        {
            this.Id    = busTypePb.Id;
            this.Name  = busTypePb.Name;
            this.Seats = busTypePb.Seats;

            this.Bus = (HashSet <Bus>)busTypePb.Bus.Select(b => new Bus(b));
        }
Beispiel #2
0
        public Protobuf.BusType ToPBMessage()
        {
            Protobuf.BusType busTypePb = new Protobuf.BusType();
            busTypePb.Id    = this.Id;
            busTypePb.Name  = this.Name;
            busTypePb.Seats = this.Seats;

            busTypePb.Bus.AddRange(this.Bus.Select(b => b.ToPBMessage()));
            return(busTypePb);
        }