BO4E/EnergyIdentificationCodes/EnergyIdentificationCodeExtensions.cs
/// <summary>
/// returns true iff the <paramref name="bilanzierungsGebietEic"/> is valid EIC by BDEW (<see cref="IsValidEICBDEW"/>) and does obey the rules for Bilanzierungsgebiete.
/// </summary>
/// <param name="bilanzierungsGebietEic"></param>
/// <returns></returns>
/// <remarks>See https://bdew-codes.de/Content/Files/EIC/Awh_20171218_EIC-Vergabe_V1-0.pdf section 2.2.2</remarks>
returns true iff the  is valid EIC by BDEW () and does obey the rules for Bilanzierungsgebiete.
returns true iff the is valid EIC by BDEW () and does obey the rules for Bilanzierungsgebiete .
public static bool IsValidBilanzierungsGebietId(this string bilanzierungsGebietEic)
        {
            if (!IsValidEICBDEW(bilanzierungsGebietEic))
            {
                return false;
            }
            var eicType = GetEICType(EicRegex.Match(bilanzierungsGebietEic).Groups["typ"].Value);
            return eicType == EicType.AREA && GermanControlAreas.ContainsKey(bilanzierungsGebietEic.Substring(3, 1));
        }
public static bool IsValidBilanzierungsGebietId ( this string bilanzierungsGebietEic ) { if ( ! IsValidEICBDEW ( bilanzierungsGebietEic ) ) { return false ; } var eicType = GetEICType ( EicRegex . Match ( bilanzierungsGebietEic ) . Groups [ " " ] . Value ) ; return eicType == EicType . AREA && GermanControlAreas . ContainsKey ( bilanzierungsGebietEic . Substring ( 3 , 1 ) ) ; }
returns true iff the  is valid EIC by BDEW () and does obey the rules for Bilanzierungsgebiete.
returns true iff the is valid EIC by BDEW () and does obey the rules for Bilanzierungsgebiete .
None
string
this
bilanzierungsGebietEic
None
remarks
None