Esempio n. 1
0
 private void ParseMapiProperties()
 {
     base.Clear();
     if (this.blob != null)
     {
         IList <ParticipantEntryId> list;
         try
         {
             list = ParticipantEntryId.FromFlatEntryList(this.blob);
         }
         catch (CorruptDataException)
         {
             this.isCorrectionNeeded = true;
             throw;
         }
         string[] array = null;
         if (this.names != null)
         {
             array = this.names.Split(new char[]
             {
                 ';'
             });
             if (array.Length != list.Count)
             {
                 array = null;
             }
         }
         int num = 0;
         foreach (ParticipantEntryId participantEntryId in list)
         {
             Participant.Builder builder = new Participant.Builder();
             string text = null;
             if (array != null)
             {
                 text = array[num].Trim();
             }
             num++;
             if (participantEntryId is OneOffParticipantEntryId || participantEntryId is ADParticipantEntryId)
             {
                 builder.SetPropertiesFrom(participantEntryId);
             }
             else
             {
                 this.isCorrectionNeeded = true;
                 if (text == null)
                 {
                     continue;
                 }
                 builder.EmailAddress = text;
                 builder.RoutingType  = "SMTP";
             }
             if (text != null)
             {
                 builder.DisplayName = text;
             }
             base.Items.Add(builder.ToParticipant());
         }
     }
     this.isListChanged = false;
 }
Esempio n. 2
0
 internal static IList <ParticipantEntryId> FromFlatEntryList(byte[] bytes)
 {
     return(ParticipantEntryId.TranslateExceptions <IList <ParticipantEntryId> >(delegate
     {
         IList <ParticipantEntryId> result;
         using (ParticipantEntryId.Reader reader = new ParticipantEntryId.Reader(bytes))
         {
             result = ParticipantEntryId.FromFlatEntryList(reader);
         }
         return result;
     }));
 }