public ChargingPoolInfo(CPInfoList CPInfoList, WWCP.ChargingPool_Id PoolId, Address Address, GeoCoordinate?GeoLocation) { #region Initial checks if (CPInfoList == null) { throw new ArgumentNullException(nameof(CPInfoList), "The given CPInfoList must not be null!"); } if (PoolId == null) { throw new ArgumentNullException(nameof(PoolId), "The given charging pool identification must not be null!"); } if (Address == null) { throw new ArgumentNullException(nameof(Address), "The given address must not be null!"); } if (GeoLocation == null) { throw new ArgumentNullException(nameof(GeoLocation), "The given geo location must not be null!"); } #endregion this.CPInfoList = CPInfoList; this.PoolId = PoolId; this.Address = Address; this.GeoLocation = GeoLocation; this._ChargingStations = new List <ChargeStationInfo>(); }
public void AddOrUpdateCPInfo(WWCP.ChargingPool_Id ChargingPoolId, Address Address, GeoCoordinate?PoolLocation, String ChargingStationXMLId, EVSE_Id EVSEId) { ChargingPoolInfo _ChargingPoolInfo = null; // Existing charging pool... if (_ChargingPools.TryGetValue(ChargingPoolId, out _ChargingPoolInfo)) { _ChargingPoolInfo.AddOrUpdateCSInfo(ChargingStationXMLId, EVSEId); } // ...or a new one! else { _ChargingPoolInfo = new ChargingPoolInfo(this, ChargingPoolId, Address, PoolLocation); _ChargingPoolInfo.AddOrUpdateCSInfo(ChargingStationXMLId.IsNotNullOrEmpty() ? ChargingStationXMLId : WWCP.ChargingStation_Id.Create(EVSEId.ToWWCP().Value).ToString(), EVSEId); _ChargingPools.Add(_ChargingPoolInfo.PoolId, _ChargingPoolInfo); } }
public EVSEInfo(WWCP.ChargingPool_Id PoolId, Address PoolAddress, GeoCoordinate?PoolLocation, WWCP.ChargingStation_Id StationId) { this.PoolId = PoolId; this.PoolAddress = PoolAddress; this.PoolLocation = PoolLocation; this.StationId = StationId; }