12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using EVCB_OCPP.Packet.Features.Reservation;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace EVCB_OCPP.Packet.Features
- {
-
- public class ReservationProfile : Profile
- {
- public ReservationProfile()
- {
- Name = "Reservation";
- //加入支援的Features
- features.Add(new CancelReservationFeature());
- features.Add(new ReserveNowFeature());
- actions.Add(Actions.CancelReservation.ToString());
- actions.Add(Actions.ReserveNow.ToString());
- }
- public string GetActionFromConfirmation(Type seekType)
- {
- return features.Where(x => x.GetConfirmationType() == seekType).FirstOrDefault().GetAction();
- }
- public string GetActionFromRequest(Type seekType)
- {
- return GetFeaturebyType(seekType).GetAction();
- }
- }
- }
|