예제 #1
0
        public void SaveLink(DomainLinkConfig link, EditLinkParams editParams)
        {
            if (!editParams.IsLeftToRightActive && !editParams.IsRightToLeftActive)
                throw new ArgumentException();

            if (!Utils.CheckEnglishString(editParams.LeftCollectionName))
                throw new ArgumentOutOfRangeException("editParams.LeftCollectionName", Resources.OnlyLatinString);

            if (!Utils.CheckEnglishString(editParams.RightCollectionName))
                throw new ArgumentOutOfRangeException("editParams.RightCollectionName", Resources.OnlyLatinString);

            m_provider.SaveLink(link, editParams);

            link.Update(editParams);

            if (EditLinkCompleted != null)
                EditLinkCompleted(this, new EditLinkConfigArgs(link));

            IsModified = true;
        }