コード例 #1
0
        private static BeltStatusCode GetBeltStatusCodeFromString(string s)
        {
            BeltStatusCode GetUnknownOrUnspecified(string u)
            {
                return(string.IsNullOrWhiteSpace(u)
                    ? BeltStatusCode.Unspecified
                    : BeltStatusCode.Unknown
                       );
            }

            return(XmlEnumStringConverter.ParseOrDefault(s,
                                                         GetUnknownOrUnspecified
                                                         ));
        }
コード例 #2
0
        private static CustomsType GetCustomsTypeFromString(string s)
        {
            CustomsType GetUnknownOrUnspecified(string u)
            {
                return(string.IsNullOrWhiteSpace(u)
                    ? CustomsType.Unspecified
                    : CustomsType.Unknown
                       );
            }

            return(XmlEnumStringConverter.ParseOrDefault(s,
                                                         GetUnknownOrUnspecified
                                                         ));
        }
コード例 #3
0
        private static FlightDirection GetFlightDirectionFromString(string s)
        {
            FlightDirection GetUnknownOrUnspecified(string u)
            {
                return(string.IsNullOrWhiteSpace(u)
                    ? FlightDirection.Unspecified
                    : FlightDirection.Unknown
                       );
            }

            return(XmlEnumStringConverter.ParseOrDefault(s,
                                                         GetUnknownOrUnspecified
                                                         ));
        }