예제 #1
0
 internal StoreParticipantEntryId(ParticipantEntryId.WabEntryFlag flags, ParticipantEntryId.Reader reader)
 {
     EnumValidator.AssertValid <ParticipantEntryId.WabEntryFlag>(flags);
     this.isMapiPDL         = StoreParticipantEntryId.WabEntryFlagToMapiPDL(flags);
     this.emailAddressIndex = StoreParticipantEntryId.WabEntryFlagToEmailAddressIndex(flags);
     this.ltEntryId         = reader.ReadLTEntryId();
     this.useWabFormat      = true;
     reader.EnsureEnd();
 }
예제 #2
0
 private StoreParticipantEntryId(StoreObjectId itemId, bool isMapiPDL, EmailAddressIndex emailIndex, bool useWabFormat)
 {
     EnumValidator.AssertValid <EmailAddressIndex>(emailIndex);
     using (ParticipantEntryId.Reader reader = new ParticipantEntryId.Reader(itemId.ProviderLevelItemId))
     {
         this.ltEntryId = reader.ReadLTEntryId();
         reader.EnsureEnd();
     }
     this.isMapiPDL         = isMapiPDL;
     this.emailAddressIndex = emailIndex;
     this.useWabFormat      = useWabFormat;
 }
        internal OneOffParticipantEntryId(ParticipantEntryId.Reader reader)
        {
            this.flags = (OneOffFlag)reader.ReadUInt32();
            Encoding encoding = ((this.flags & (OneOffFlag)2147483648U) == (OneOffFlag)2147483648U) ? Encoding.Unicode : CTSGlobals.AsciiEncoding;

            this.emailDisplayName = Util.NullIf <string>(reader.ReadZString(encoding), string.Empty);
            this.emailAddressType = Util.NullIf <string>(reader.ReadZString(encoding), string.Empty);
            this.emailAddress     = Util.NullIf <string>(reader.ReadZString(encoding), string.Empty);
            reader.EnsureEnd();
            if (this.emailAddress == "Unknown")
            {
                this.emailAddress = null;
            }
        }
예제 #4
0
        internal ADParticipantEntryId(ParticipantEntryId.WabEntryFlag?flags, ParticipantEntryId.Reader reader)
        {
            uint num = reader.ReadUInt32();

            if (num != 1U)
            {
                throw new NotSupportedException(ServerStrings.ExUnsupportedABProvider("Exchange WAB", num.ToString()));
            }
            this.legacyRecipientDisplayType = new LegacyRecipientDisplayType?((LegacyRecipientDisplayType)reader.ReadUInt32());
            if (flags == null && this.legacyRecipientDisplayType == LegacyRecipientDisplayType.MailUser)
            {
                this.legacyRecipientDisplayType = null;
            }
            this.legacyDN     = reader.ReadZString(CTSGlobals.AsciiEncoding);
            this.flags        = ADParticipantEntryId.ReplaceObjectTypeInformation(flags ?? ParticipantEntryId.WabEntryFlag.Envelope, ref this.legacyRecipientDisplayType, this.legacyDN);
            this.useWabFormat = (flags != null);
            reader.EnsureEnd();
        }
예제 #5
0
        private static IList <ParticipantEntryId> FromFlatEntryList(ParticipantEntryId.Reader reader)
        {
            int num = reader.ReadInt32();

            reader.ReadInt32();
            IList <ParticipantEntryId> list = new List <ParticipantEntryId>();

            for (int i = 0; i < num; i++)
            {
                int num2 = reader.ReadInt32();
                list.Add(ParticipantEntryId.TryFromEntryId(reader.TearNext(num2)));
                if (reader.BytesRemaining != 0)
                {
                    reader.ReadPadding(num2, 4);
                }
            }
            reader.EnsureEnd();
            return(list);
        }
예제 #6
0
        internal StoreParticipantEntryId(ParticipantEntryId.Reader reader)
        {
            uint num = reader.ReadUInt32();

            if (num != 3U)
            {
                throw new NotSupportedException(ServerStrings.ExUnsupportedABProvider("OLABP", num.ToString()));
            }
            uint num2 = reader.ReadUInt32();

            this.isMapiPDL         = (num2 == 5U);
            this.emailAddressIndex = StoreParticipantEntryId.IndexToEmailAddressIndex(reader.ReadUInt32());
            if (reader.ReadUInt32() != 70U)
            {
                throw new NotSupportedException(ServerStrings.ExInvalidParticipantEntryId);
            }
            this.ltEntryId = reader.ReadLTEntryId();
            if (reader.BytesRemaining != 3)
            {
                reader.EnsureEnd();
            }
        }