Esempio n. 1
0
 public AustralianPostOfficeBox(
     AustralianPostOfficeBoxType type,
     AustralianPostOfficeBoxNumber number,
     AustralianLocality locality,
     AustralianPostcode postcode,
     AustralianState state)
 {
     Type     = type;
     Number   = number;
     Locality = locality;
     Postcode = postcode;
     State    = state;
 }
Esempio n. 2
0
        public bool TryParse(string s, out AustralianState result)
        {
            if (string.IsNullOrWhiteSpace(s))
            {
                result = Unknown;
                return(false);
            }

            s = s.Trim();

            foreach (var wellKnownState in _wellKnownStates)
            {
                if (StringComparer.OrdinalIgnoreCase.Equals(wellKnownState.ShortName, s))
                {
                    result = wellKnownState;
                    return(true);
                }

                if (StringComparer.OrdinalIgnoreCase.Equals(wellKnownState.LongName, s))
                {
                    result = wellKnownState;
                    return(true);
                }

                if (StringComparer.CurrentCultureIgnoreCase.Equals(wellKnownState.NativeShortName, s))
                {
                    result = wellKnownState;
                    return(true);
                }

                if (StringComparer.OrdinalIgnoreCase.Equals(wellKnownState.NativeLongName, s))
                {
                    result = wellKnownState;
                    return(true);
                }
            }

            result = Unknown;
            return(false);
        }
 public AustralianAddressee(AustralianStreetAddress address, AustralianPostcode postcode, AustralianState state)
 {
     Address  = address;
     Postcode = postcode;
     State    = state;
 }
 public AustralianAddressee(AustralianPostOfficeBox postOfficeBox, AustralianPostcode postcode, AustralianState state)
 {
     PostOfficeBox = postOfficeBox;
     Postcode      = postcode;
     State         = state;
 }