protected void ResolveParticipants(ConversionAddressCollection.ParticipantResolutionList resolutionList) { Participant.Job job = resolutionList.CreateResolutionJob(); if (this.ewsOutboundMimeConversion) { PropertyDefinition propertyDefinition; Participant.BatchBuilder.Execute(job, new Participant.BatchBuilder[] { Participant.BatchBuilder.ConvertRoutingType(this.TargetResolutionType, out propertyDefinition), Participant.BatchBuilder.RequestAllProperties(), Participant.BatchBuilder.CopyPropertiesFromInput(), Participant.BatchBuilder.GetPropertiesFromAD(this.GetRecipientCache(job.Count), null), this.useSimpleDisplayName ? Participant.BatchBuilder.ReplaceProperty(ParticipantSchema.DisplayName, ParticipantSchema.SimpleDisplayName) : null }); } else { PropertyDefinition propertyDefinition; Participant.BatchBuilder.Execute(job, new Participant.BatchBuilder[] { Participant.BatchBuilder.ConvertRoutingType(this.TargetResolutionType, out propertyDefinition), Participant.BatchBuilder.RequestAllProperties(), Participant.BatchBuilder.GetPropertiesFromAD(this.GetRecipientCache(job.Count), null), Participant.BatchBuilder.CopyPropertiesFromInput(), this.useSimpleDisplayName ? Participant.BatchBuilder.ReplaceProperty(ParticipantSchema.DisplayName, ParticipantSchema.SimpleDisplayName) : null }); } job.ApplyResults(); }
internal void Resolve() { this.ReplyTo.Resync(true); ConversionAddressCollection.ParticipantResolutionList participantResolutionList = base.CreateResolutionList(); base.ResolveParticipants(participantResolutionList); base.SetResolvedParticipants(participantResolutionList); this.ReplyTo.Resync(true); }
protected void SetResolvedParticipants(ConversionAddressCollection.ParticipantResolutionList participantList) { foreach (IConversionParticipantList conversionParticipantList in this.participantLists) { int count = conversionParticipantList.Count; for (int num = 0; num != count; num++) { Participant nextResolvedParticipant = participantList.GetNextResolvedParticipant(); if (nextResolvedParticipant != null) { if (nextResolvedParticipant.ValidationStatus == ParticipantValidationStatus.NoError) { conversionParticipantList[num] = nextResolvedParticipant; } else { StorageGlobals.ContextTraceError <Participant, Participant>(ExTraceGlobals.CcGenericTracer, "The resolved Participant is invalid. The source Participant will be used instead\r\n\tSource: {0}\r\n\tResolved: {1}", conversionParticipantList[num], nextResolvedParticipant); } } } } }
protected ConversionAddressCollection.ParticipantResolutionList CreateResolutionList() { ConversionAddressCollection.ParticipantResolutionList participantResolutionList = new ConversionAddressCollection.ParticipantResolutionList(); foreach (IConversionParticipantList conversionParticipantList in this.participantLists) { int count = conversionParticipantList.Count; for (int num = 0; num != count; num++) { Participant participant = null; Participant participant2 = conversionParticipantList[num]; if (conversionParticipantList.IsConversionParticipantAlwaysResolvable(num) || this.CanResolveParticipant(participant2)) { participant = participant2; } if (!this.disableLengthValidation && participant2 != null && (participant2.ValidationStatus == ParticipantValidationStatus.EmailAddressTooBig || participant2.ValidationStatus == ParticipantValidationStatus.RoutingTypeTooBig)) { StorageGlobals.ContextTraceError(ExTraceGlobals.CcInboundMimeTracer, "ConversionAddressCollection::CreateResolutionList: participant validation failed."); throw new ConversionFailedException(ConversionFailureReason.ExceedsLimit); } participantResolutionList.AddParticipantForResolution(participant); } } return(participantResolutionList); }