LocalAuthListManagementProfile.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using EVCB_OCPP.Packet.Features.LocalAuthListManagement;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace EVCB_OCPP.Packet.Features
  8. {
  9. public class LocalAuthListManagementProfile : Profile
  10. {
  11. public LocalAuthListManagementProfile()
  12. {
  13. Name = "LocalAuthListManagement";
  14. //加入支援的Features
  15. features.Add(new GetLocalListVersionFeature());
  16. features.Add(new SendLocalListFeature());
  17. actions.Add(Actions.GetLocalListVersion.ToString());
  18. actions.Add(Actions.SendLocalList.ToString());
  19. }
  20. public string GetActionFromConfirmation(Type seekType)
  21. {
  22. return features.Where(x => x.GetConfirmationType() == seekType).FirstOrDefault().GetAction();
  23. }
  24. public string GetActionFromRequest(Type seekType)
  25. {
  26. return GetFeaturebyType(seekType).GetAction();
  27. }
  28. }
  29. }