public ADABRawEntry(ADABSession ownerSession, ABPropertyDefinitionCollection properties, ADRawEntry rawEntry) : base(ownerSession, properties) { if (rawEntry == null) { throw new ArgumentNullException("rawEntry"); } this.rawEntry = rawEntry; }
private List <ABRawEntry> ADRawEntryResultsToABRawEntries(ABPropertyDefinitionCollection properties, Result <ADRawEntry>[] activeDirectoryRawEntries) { List <ABRawEntry> list = new List <ABRawEntry>(activeDirectoryRawEntries.Length); foreach (Result <ADRawEntry> result in activeDirectoryRawEntries) { list.Add(this.ADRawEntryResultToABRawEntry(properties, result)); } return(list); }
private ADABRawEntry ADRawEntryResultToABRawEntry(ABPropertyDefinitionCollection properties, Result <ADRawEntry> result) { if (result.Data == null || result.Error != null) { if (result.Error == ProviderError.NotFound) { AirSyncDiagnostics.TraceDebug(base.Tracer, null, "Map Result<ADRawEntry> to null since result indicates entry not found."); } else { AirSyncDiagnostics.TraceError(base.Tracer, null, "Map Result<ADRawEntry> to null since result indicates unknown error or data is null."); } return(null); } return(new ADABRawEntry(this, properties, result.Data)); }
// Token: 0x0600095E RID: 2398 RVA: 0x00036D24 File Offset: 0x00034F24 internal static ADPropertyDefinition[] ConvertToADProperties(ABPropertyDefinitionCollection properties) { object nativePropertyCollection = properties.GetNativePropertyCollection("AD"); if (nativePropertyCollection != null) { return((ADPropertyDefinition[])nativePropertyCollection); } List <ADPropertyDefinition> list = new List <ADPropertyDefinition>(properties.Count); foreach (ABPropertyDefinition addressBookProperty in properties) { ADABPropertyMapper.AddCorrespondingADPropertyToList(list, addressBookProperty); } ADPropertyDefinition[] array = list.ToArray(); properties.SetNativePropertyCollection("AD", array); return(array); }
protected override ABRawEntry InternalFindById(ABObjectId id, ABPropertyDefinitionCollection properties) { ADABObjectId adabobjectId = (ADABObjectId)id; ADRawEntry rawEntry; try { rawEntry = this.recipientSession.ReadADRawEntry(adabobjectId.NativeId, ADABPropertyMapper.ConvertToADProperties(properties)); } catch (DataSourceOperationException ex) { throw new ABOperationException(ex.LocalizedString, ex); } catch (DataSourceTransientException ex2) { throw new ABTransientException(ex2.LocalizedString, ex2); } return(new ADABRawEntry(this, properties, rawEntry)); }
private List <ABRawEntry> RecipientsToABRawEntries(ICollection <ADRecipient> recipients, ABPropertyDefinitionCollection properties) { List <ABRawEntry> list = new List <ABRawEntry>(recipients.Count); foreach (ADRecipient recipient in recipients) { list.Add(this.RecipientToABRawEntry(recipient, properties)); } return(list); }
private ABRawEntry RecipientToABRawEntry(ADRecipient recipient, ABPropertyDefinitionCollection properties) { return(new ADABRawEntry(this, properties, recipient)); }
protected override List <ABRawEntry> InternalFindByANR(string anrMatch, int maxResults, ABPropertyDefinitionCollection properties) { ADRecipient[] recipients; try { recipients = this.recipientSession.FindByANR(anrMatch, maxResults, ADABSession.sortByDisplayName); } catch (DataSourceOperationException ex) { throw new ABOperationException(ex.LocalizedString, ex); } catch (DataSourceTransientException ex2) { throw new ABTransientException(ex2.LocalizedString, ex2); } return(this.RecipientsToABRawEntries(recipients, properties)); }
protected override IList <ABRawEntry> InternalFindByIds(ICollection <ABObjectId> ids, ABPropertyDefinitionCollection properties) { ADObjectId[] array = new ADObjectId[ids.Count]; int num = 0; foreach (ABObjectId abobjectId in ids) { ADABObjectId adabobjectId = (ADABObjectId)abobjectId; array[num++] = adabobjectId.NativeId; } Result <ADRawEntry>[] activeDirectoryRawEntries; try { activeDirectoryRawEntries = this.recipientSession.ReadMultiple(array, ADABPropertyMapper.ConvertToADProperties(properties)); } catch (DataSourceOperationException ex) { throw new ABOperationException(ex.LocalizedString, ex); } catch (DataSourceTransientException ex2) { throw new ABTransientException(ex2.LocalizedString, ex2); } return(this.ADRawEntryResultsToABRawEntries(properties, activeDirectoryRawEntries)); }