Esempio n. 1
0
 // Token: 0x06000E77 RID: 3703 RVA: 0x00045448 File Offset: 0x00043648
 public static ADRawEntry ReadUserInformationRecord(ADObjectId id, Guid mdbGuid, Guid mbxGuid, bool createReadOnly, IEnumerable <MbxPropertyDefinition> properties, List <ValidationError> errors)
 {
     PropTag[]   array = MbxRecipientSession.PropTagsFromProperties(properties);
     PropValue[] array4;
     try
     {
         if (MbxRecipientSession.storeUserInformationReader != null)
         {
             uint[]   array2 = array.Cast <uint>().ToArray <uint>();
             object[] array3 = MbxRecipientSession.storeUserInformationReader.ReadUserInformation(mdbGuid, mbxGuid, array2);
             if (array3.Length != array2.Length)
             {
                 throw new ArgumentException("Number of returned property values doesn't match number of requested properties");
             }
             array4 = new PropValue[array2.Length];
             for (int i = 0; i < array4.Length; i++)
             {
                 if (array3[i] != null)
                 {
                     array4[i] = new PropValue((PropTag)array2[i], array3[i]);
                 }
                 else
                 {
                     array4[i] = new PropValue(PropTagHelper.ConvertToError((PropTag)array2[i]), -2147221233);
                 }
             }
         }
         else
         {
             using (ExRpcAdmin exRpcAdminInstance = MbxRecipientSession.GetExRpcAdminInstance())
             {
                 array4 = exRpcAdminInstance.ReadUserInfo(mdbGuid, mbxGuid, 0U, array);
             }
         }
     }
     catch (MapiPermanentException innerException)
     {
         throw new ADDriverStoreAccessPermanentException(innerException);
     }
     catch (MapiRetryableException innerException2)
     {
         throw new ADDriverStoreAccessTransientException(innerException2);
     }
     return(MbxRecipientSession.ADRawEntryFromPropValues(id, createReadOnly, array4, properties, errors));
 }
Esempio n. 2
0
 // Token: 0x06000E7B RID: 3707 RVA: 0x0004576C File Offset: 0x0004396C
 public static void UpdateUserInformationRecord(Guid mdbGuid, Guid mbxGuid, ADPropertyBag propertiesToUpdate, IEnumerable <MbxPropertyDefinition> propertiesToRemove)
 {
     PropValue[] properties    = MbxRecipientSession.PropValuesFromADPropertyBag(propertiesToUpdate);
     PropTag[]   deletePropTag = MbxRecipientSession.PropTagsFromProperties(propertiesToRemove);
     try
     {
         using (ExRpcAdmin exRpcAdminInstance = MbxRecipientSession.GetExRpcAdminInstance())
         {
             exRpcAdminInstance.UpdateUserInfo(mdbGuid, mbxGuid, 0U, properties, deletePropTag);
         }
     }
     catch (MapiPermanentException innerException)
     {
         throw new ADDriverStoreAccessPermanentException(innerException);
     }
     catch (MapiRetryableException innerException2)
     {
         throw new ADDriverStoreAccessTransientException(innerException2);
     }
 }