コード例 #1
0
 public void FillFrom(AttributListeType attr)
 {
     PNR            = attr.GetPnr();
     MatchedName    = attr.Egenskab.FirstOrDefault()?.NavnStruktur?.PersonNameStructure?.ToString();
     MatchedAddress = ((attr.RegisterOplysning.FirstOrDefault()?.Item as CprBorgerType)?
                       .FolkeregisterAdresse?.Item as DanskAdresseType)?.AddressComplete?.AddressPostal?
                      .ToAddressString();
     Error = null;
 }
コード例 #2
0
        // TODO: Move the validation logic to facade method

        /// <summary>
        /// This method traverses the attributes and returns true if
        /// all attributes are empty.
        /// </summary>
        /// <param name="attributes"></param>
        /// <returns></returns>
        private static Boolean AllAttributesEmpty(AttributListeType attributes)
        {
            if (attributes != null)
            {
                if (attributes.Egenskab == null || attributes.Egenskab.Length == 0)
                {
                    if (attributes.RegisterOplysning == null || attributes.RegisterOplysning.Length == 0)
                    {
                        return(true);
                    }
                }
            }
            else
            {
                return(true);
            }
            return(false);
        }