// Token: 0x060018A0 RID: 6304 RVA: 0x00054F7C File Offset: 0x0005317C private Persona GetPersonaFromADObject(object[] values) { ADObjectId adobjectId = (ADObjectId)values[0]; string displayName = values[1].ToString(); string text = values[2].ToString(); string text2 = values[3].ToString(); Persona persona = new Persona { Attributions = new Attribution[] { GetPersonaOrganizationHierarchyCommand.galAttribution }, ADObjectId = adobjectId.ObjectGuid, DisplayName = displayName, Title = text, Titles = new StringAttributedValue[] { new StringAttributedValue(text, new string[] { "0" }) }, EmailAddress = new EmailAddressWrapper { EmailAddress = text2, RoutingType = "SMTP", MailboxType = MailboxHelper.MailboxTypeType.Mailbox.ToString() } }; persona.PersonaId = IdConverter.PersonaIdFromADObjectId(persona.ADObjectId); return(persona); }
private static Persona GetPersonaFromADObject(ADRawEntry rawEntry) { if (rawEntry == null) { return(null); } ADObjectId adobjectId = rawEntry[ADObjectSchema.Id] as ADObjectId; if (adobjectId == null) { return(null); } Persona persona = new Persona(); persona.PersonaId = IdConverter.PersonaIdFromADObjectId(adobjectId.ObjectGuid); RecipientType recipientType = (RecipientType)rawEntry[ADRecipientSchema.RecipientType]; PersonType personType = ADRecipient.IsRecipientTypeDL(recipientType) ? PersonType.DistributionList : PersonType.Person; RecipientTypeDetails recipientTypeDetails = (RecipientTypeDetails)rawEntry[ADRecipientSchema.RecipientTypeDetails]; if (recipientTypeDetails == RecipientTypeDetails.GroupMailbox) { personType = PersonType.ModernGroup; } persona.PersonaType = PersonaTypeConverter.ToString(personType); object obj = rawEntry[ADRecipientSchema.DisplayName]; if (obj != null) { persona.DisplayName = (obj as string); } object obj2 = rawEntry[ADRecipientSchema.PrimarySmtpAddress]; if (obj2 != null) { persona.EmailAddress = new EmailAddressWrapper { Name = (persona.DisplayName ?? string.Empty), EmailAddress = obj2.ToString(), RoutingType = "SMTP", MailboxType = MailboxHelper.ConvertToMailboxType(personType).ToString() }; } object obj3 = rawEntry[ADUserSchema.RTCSIPPrimaryUserAddress]; if (obj3 != null) { persona.ImAddress = obj3.ToString(); } return(persona); }