AK.F1.Timing.Live.LiveData.ToSessionType C# (CSharp) Method

ToSessionType() public static method

Converts the specified timing session value into a AK.F1.Timing.Messages.Session.SessionType.
/// Thrown when could not be converted. ///
public static ToSessionType ( int value ) : SessionType
value int The value to convert.
return SessionType
        public static SessionType ToSessionType(int value)
        {
            switch(value)
            {
                case 0:
                    return SessionType.None;
                case 1:
                    return SessionType.Race;
                case 2:
                    return SessionType.Practice;
                case 3:
                case 4:
                case 5:
                    return SessionType.Qually;
                default:
                    throw Guard.LiveData_UnableToConvertToSessionType(value);
            }
        }