Пример #1
0
        private static HashSet <NativeStorePropertyDefinition> GetCacheProperties(bool skipSkippable)
        {
            HashSet <NativeStorePropertyDefinition> hashSet = new HashSet <NativeStorePropertyDefinition>();

            foreach (ConversionItemParticipants.ParticipantDefinitionEntry participantDefinitionEntry in ConversionItemParticipants.ParticipantEntries)
            {
                if (!skipSkippable || !participantDefinitionEntry.IsSkippable)
                {
                    EmbeddedParticipantProperty participantProperty = participantDefinitionEntry.ParticipantProperty;
                    hashSet.Add(participantProperty.DisplayNamePropertyDefinition);
                    hashSet.Add(participantProperty.EmailAddressPropertyDefinition);
                    hashSet.Add(participantProperty.RoutingTypePropertyDefinition);
                    hashSet.Add(participantProperty.EntryIdPropertyDefinition);
                    if (participantProperty.SmtpAddressPropertyDefinition != null)
                    {
                        hashSet.Add(participantProperty.SmtpAddressPropertyDefinition);
                    }
                    if (participantProperty.SipUriPropertyDefinition != null)
                    {
                        hashSet.Add(participantProperty.SipUriPropertyDefinition);
                    }
                    if (participantProperty.SidPropertyDefinition != null)
                    {
                        hashSet.Add(participantProperty.SidPropertyDefinition);
                    }
                    if (participantProperty.GuidPropertyDefinition != null)
                    {
                        hashSet.Add(participantProperty.GuidPropertyDefinition);
                    }
                }
            }
            return(hashSet);
        }
Пример #2
0
        private void WriteTnefParticipant(TnefAttributeTag legacyTnefAttribute, ConversionItemParticipants.ParticipantIndex index)
        {
            Participant participant = this.addressCache.Participants[index];

            if (ItemToTnefConverter.IsCompleteParticipant(participant))
            {
                this.tnefWriter.StartAttribute(legacyTnefAttribute, TnefAttributeLevel.Message);
                EmbeddedParticipantProperty embeddedParticipantProperty = ConversionItemParticipants.GetEmbeddedParticipantProperty(index);
                this.tnefWriter.WriteProperty(embeddedParticipantProperty.EmailAddressPropertyDefinition, participant.EmailAddress);
                this.tnefWriter.WriteProperty(embeddedParticipantProperty.RoutingTypePropertyDefinition, participant.RoutingType);
                this.tnefWriter.WriteProperty(embeddedParticipantProperty.DisplayNamePropertyDefinition, string.IsNullOrEmpty(participant.DisplayName) ? participant.EmailAddress : participant.DisplayName);
            }
        }
Пример #3
0
 internal ParticipantDefinitionEntry(EmbeddedParticipantProperty participantDefinition, ConversionItemParticipants.ParticipantDefinitionEntryFlags flags)
 {
     this.participantProperty = participantDefinition;
     this.flags = flags;
 }
 internal ContactEmailSlotParticipantProperty(EmailAddressIndex emailAddressIndex, NativeStorePropertyDefinition displayNamePropertyDefinition, NativeStorePropertyDefinition emailAddressPropertyDefinition, NativeStorePropertyDefinition routingTypePropertyDefinition, NativeStorePropertyDefinition entryIdPropertyDefinition, NativeStorePropertyDefinition emailAddressForDisplayPropertyDefinition, params PropertyDependency[] additionalDependencies) : base("Contact" + emailAddressIndex.ToString(), ParticipantEntryIdConsumer.ContactEmailSlot, displayNamePropertyDefinition, emailAddressPropertyDefinition, routingTypePropertyDefinition, entryIdPropertyDefinition, null, null, null, null, EmbeddedParticipantProperty.GetDependencies(additionalDependencies, new NativeStorePropertyDefinition[]
 {
     InternalSchema.EntryId,
     emailAddressForDisplayPropertyDefinition
 }))
 {
     this.emailAddressForDisplayPropDef = emailAddressForDisplayPropertyDefinition;
     this.emailAddressIndex             = emailAddressIndex;
 }
Пример #5
0
 protected EmbeddedParticipantProperty(string displayName, ParticipantEntryIdConsumer entryIdConsumer, NativeStorePropertyDefinition displayNamePropertyDefinition, NativeStorePropertyDefinition emailAddressPropertyDefinition, NativeStorePropertyDefinition routingTypePropertyDefinition, NativeStorePropertyDefinition entryIdPropertyDefinition, NativeStorePropertyDefinition smtpAddressPropertyDefinition, NativeStorePropertyDefinition sipUriPropertyDefinition, NativeStorePropertyDefinition sidPropertyDefinition, NativeStorePropertyDefinition guidPropertyDefinition, params PropertyDependency[] additionalDependencies) : base(displayName, typeof(Participant), PropertyFlags.None, Array <PropertyDefinitionConstraint> .Empty, EmbeddedParticipantProperty.GetDependencies(additionalDependencies, new NativeStorePropertyDefinition[]
 {
     displayNamePropertyDefinition,
     emailAddressPropertyDefinition,
     routingTypePropertyDefinition,
     entryIdPropertyDefinition,
     smtpAddressPropertyDefinition,
     sipUriPropertyDefinition,
     sidPropertyDefinition,
     guidPropertyDefinition
 }))
 {
     this.entryIdConsumer     = entryIdConsumer;
     this.displayNamePropDef  = displayNamePropertyDefinition;
     this.emailAddressPropDef = emailAddressPropertyDefinition;
     this.routingTypePropDef  = routingTypePropertyDefinition;
     this.entryIdPropDef      = entryIdPropertyDefinition;
     this.smtpAddressPropDef  = smtpAddressPropertyDefinition;
     this.sipUriPropDef       = sipUriPropertyDefinition;
     this.sidPropDef          = sidPropertyDefinition;
     this.guidPropDef         = guidPropertyDefinition;
 }