public static ForeignCitizenCountry[] FromXmlType(CountryIdentificationCodeType[] countries, bool isNationality)
 {
     if (countries != null)
     {
         int ordinal = 0;
         return(countries
                .Select(c => ForeignCitizenCountry.FromXmlType(c, isNationality, ordinal++))
                .Where(c => c != null)
                .ToArray());
     }
     return(new ForeignCitizenCountry[0]);
 }
Exemple #2
0
        public static ForeignCitizenData FromXmlType(UdenlandskBorgerType oio)
        {
            if (oio != null)
            {
                var ret = new ForeignCitizenData()
                {
                    BirthCountryRef = CountryRef.FromXmlType(oio.FoedselslandKode),
                    CivilRegistrationReplacementIdentifier = oio.PersonCivilRegistrationReplacementIdentifier,
                    PersonIdentifier = oio.PersonIdentifikator,
                };

                ret.ForeignCitizenCountries.AddRange(ForeignCitizenCountry.FromXmlType(oio.SprogKode, false));
                ret.ForeignCitizenCountries.AddRange(ForeignCitizenCountry.FromXmlType(oio.PersonNationalityCode, true));

                return(ret);
            }
            return(null);
        }