Пример #1
0
        private void SetEntryIds(ParticipantEntryId[] mainEntryIds, ParticipantEntryId[] oneOffEntryIds, byte[][] extraBytes)
        {
            bool flag = this.alwaysStream;

            byte[][] array = DistributionList.EncodeEntryIds(mainEntryIds);
            byte[][] value = DistributionList.EncodeEntryIds(oneOffEntryIds);
            this.computedChecksum = DistributionList.ComputeChecksum(array);
            if (!flag)
            {
                flag = DistributionList.NeedToStream(DistributionListSchema.Members, array);
            }
            if (!flag)
            {
                flag = DistributionList.NeedToStream(DistributionListSchema.OneOffMembers, value);
            }
            if (flag)
            {
                using (Stream stream = base.OpenPropertyStream(DistributionListSchema.DLStream, PropertyOpenMode.Create))
                {
                    DistributionList.SerializeEntryIdsOnStream(this.alwaysStream, stream, mainEntryIds, oneOffEntryIds, extraBytes);
                    this.SetFakeEntryInLegacyPDL();
                    goto IL_93;
                }
            }
            base.Delete(DistributionListSchema.DLStream);
            this[DistributionListSchema.Members]       = array;
            this[DistributionListSchema.OneOffMembers] = value;
IL_93:
            this[DistributionListSchema.DLChecksum] = (int)this.computedChecksum;
        }