private static void CreateUserConfiguration(StoreRetentionPolicyTagHelper tagHelper)
		{
			byte[] xmlData = MrmFaiFormatter.Serialize(tagHelper.TagData, tagHelper.defaultArchiveTagData, tagHelper.deletedTags, tagHelper.retentionHoldData, tagHelper.fullCrawlRequired, tagHelper.exchangePrincipal);
			CreateUserConfigurationType createUserConfiguration = new CreateUserConfigurationType
			{
				UserConfiguration = new UserConfigurationType
				{
					UserConfigurationName = new UserConfigurationNameType
					{
						Name = "MRM",
						Item = new DistinguishedFolderIdType
						{
							Id = DistinguishedFolderIdNameType.inbox
						}
					},
					XmlData = xmlData
				}
			};
			StoreRetentionPolicyTagHelper.CallEwsWithRetries(() => tagHelper.serviceBinding.CreateUserConfiguration(createUserConfiguration), delegate(ResponseMessageType responseMessage, int messageIndex)
			{
				if (responseMessage.ResponseClass == ResponseClassType.Success)
				{
					ExTraceGlobals.ELCTracer.TraceDebug(0L, "Successfully created MRM user configuration");
					return true;
				}
				ExTraceGlobals.ELCTracer.TraceDebug(0L, "MRM user configuration was not created");
				return false;
			}, tagHelper);
		}
		internal void SaveToXSO()
		{
			if (this.configItem != null)
			{
				MrmFaiFormatter.Serialize(this.TagData, this.defaultArchiveTagData, this.deletedTags, this.retentionHoldData, this.configItem, this.fullCrawlRequired, this.mailboxSession.MailboxOwner);
				this.configItem.Save();
				return;
			}
			throw new ElcUserConfigurationException(Strings.ElcUserConfigurationConfigurationItemNotAvailable);
		}
        // Token: 0x06000417 RID: 1047 RVA: 0x0001CE4C File Offset: 0x0001B04C
        internal bool SaveConfigItem(IArchiveProcessor archiveProcessor)
        {
            bool      result = false;
            Exception arg    = null;

            try
            {
                MrmFaiFormatter.Serialize(this.storeTagDictionary, this.storeDefaultArchiveTagDictionary, this.deletedTags, new RetentionHoldData(base.SuspendExpiration, base.ADUser.RetentionComment, base.ADUser.RetentionUrl), this.configItem, false, base.MailboxSession.MailboxOwner);
                this.configItem.Save();
                IMailboxInfo archiveMailbox = base.MailboxSession.MailboxOwner.GetArchiveMailbox();
                if (!base.MailboxSession.MailboxOwner.MailboxInfo.IsArchive && archiveProcessor != null && archiveMailbox != null && archiveMailbox.IsRemote)
                {
                    CloudArchiveProcessor cloudArchiveProcessor = archiveProcessor as CloudArchiveProcessor;
                    if (cloudArchiveProcessor != null && cloudArchiveProcessor.ArchiveEwsClient != null)
                    {
                        byte[] xmlData = MrmFaiFormatter.Serialize(this.storeTagDictionary, this.storeDefaultArchiveTagDictionary, null, new RetentionHoldData(base.SuspendExpiration, base.ADUser.RetentionComment, base.ADUser.RetentionUrl), this.fullCrawlRequired, base.MailboxSession.MailboxOwner);
                        if (!cloudArchiveProcessor.SaveConfigItemInArchive(xmlData))
                        {
                            ElcUserInformation.Tracer.TraceError((long)this.GetHashCode(), "The MRM FAI message could not be saved to the cross-premise archive");
                            return(false);
                        }
                    }
                }
                result = true;
            }
            catch (Exception ex)
            {
                if (ex is ObjectNotFoundException || ex is ObjectExistedException || ex is SaveConflictException || ex is StorageTransientException || ex is StoragePermanentException)
                {
                    result = false;
                    ElcUserInformation.Tracer.TraceDebug <IExchangePrincipal, MailboxSession, Exception>((long)this.GetHashCode(), "The MRM FAI message could not be saved. Mailbox Owner {0}, Mailbox Session {1}. Exception: {2}", base.MailboxSession.MailboxOwner, base.MailboxSession, arg);
                    throw new TransientMailboxException(ex);
                }
                throw;
            }
            return(result);
        }