BO4E/EnergyIdentificationCodes/EnergyIdentificationCodeExtensions.cs
/// <summary>
/// Converts a object type string <paramref name="type"/> to a <see cref="EicType"/>
/// </summary>
/// <param name="type">character specifying the type. e.g. 'X' or 'A'</param>
/// <returns></returns>
Converts a object type string  to a
Converts a object type string to a
public static EicType GetEICType(string type)
        {
            if (string.IsNullOrWhiteSpace(type))
            {
                throw new ArgumentNullException(nameof(type));
            }
            return type switch
            {
                "A" => EicType.SUBSTATION,
                "T" => EicType.TIE_LINES,
                "V" => EicType.LOCATION,
                "W" => EicType.RESOURCE_OBJECT,
                "X" => EicType.MARKET_PARTICIPANT,
                "Y" => EicType.AREA,
                "Z" => EicType.MEASURING_POINT,
                _ => throw new ArgumentException($"The type '{type}' is not a valid EIC type character.")
            };
        }
public static EicType GetEICType ( string type ) { if ( string . IsNullOrWhiteSpace ( type ) ) { throw new ArgumentNullException ( nameof ( type ) ) ; } return type switch { " " => EicType . SUBSTATION , " " => EicType . TIE_LINES , " " => EicType . LOCATION , " " => EicType . RESOURCE_OBJECT , " " => EicType . MARKET_PARTICIPANT , " " => EicType . AREA , " " => EicType . MEASURING_POINT , _ => throw new ArgumentException ( $" The type ' { type } ' is not a valid EIC type character. " ) } ; }
Converts a object type string  to a
Converts a object type string to a
None
type
string
character specifying the type. e.g.
character specifying the type . e . g .