Beispiel #1
0
 private static void SyncIM(ImAddressKey imAddressKey,
                            IdentificacionTipo identificacionTipo,
                            Contact contact,
                            Persona persona, IObjectSpace objectSpace)
 {
     if (contact.ImAddresses.Contains(imAddressKey))
     {
         var im = contact.ImAddresses[imAddressKey];
         SyncIdentificacion(persona, identificacionTipo, objectSpace, im, imAddressKey.ToString( ));
     }
 }
Beispiel #2
0
 private static void SyncEmail(EmailAddressKey emailAddressKey,
                               IdentificacionTipo identificacionTipo,
                               Contact contact,
                               Persona persona, IObjectSpace objectSpace)
 {
     if (contact.EmailAddresses.Contains(emailAddressKey))
     {
         var email = contact.EmailAddresses[emailAddressKey];
         SyncIdentificacion(persona, identificacionTipo, objectSpace, email.Address, emailAddressKey.ToString( ));
     }
 }
Beispiel #3
0
 private static void SyncIdentificacion(Persona persona, IdentificacionTipo identificacion, IObjectSpace objectSpace, string value, string srcPropertyName)
 {
     if (!string.IsNullOrWhiteSpace(value) && identificacion != null)
     {
         var identif = persona.Identificaciones.FirstOrDefault(r => r.Tipo.Oid == identificacion.Oid && r.Notas.Contains("EXCH:" + srcPropertyName));
         if (identif == null)
         {
             identif        = objectSpace.CreateObject <Identificacion>( );
             identif.Tipo   = objectSpace.GetObjectByKey <IdentificacionTipo>(identificacion.Oid);
             identif.Notas += "\r\nEXCH:" + srcPropertyName;
             persona.Identificaciones.Add(identif);
         }
         identif.Valor = value;
     }
 }
Beispiel #4
0
        private static void SyncTelefono(PhoneNumberKey phoneNumberKey,
                                         IdentificacionTipo identificacionTipo,
                                         Contact contact,
                                         Persona persona, IObjectSpace objectSpace, Identificadores config)
        {
            if (identificacionTipo == null)
            {
                identificacionTipo = config.IdentificacionTipoTelOtro;
            }

            if (contact.PhoneNumbers.Contains(phoneNumberKey))
            {
                var phone = contact.PhoneNumbers[phoneNumberKey];
                SyncIdentificacion(persona, identificacionTipo, objectSpace, phone, phoneNumberKey.ToString( ));
            }
        }