Ejemplo n.º 1
0
        public void AddTranslation(TranslationInfo translationInfo, TranslationInfoPresenter translationInfoPresenter)
        {
            TranslationInfoEditor freeEditor =
                this._translationInfoEditorsPool.FirstOrDefault(e => e.TranslationInfo == null);

            if (freeEditor == null)
            {
                this._translationInfoEditorsPool.Add(new TranslationInfoEditor(translationInfo,
                                                                               translationInfoPresenter));
            }
            else
            {
                freeEditor.TranslationInfo = translationInfo;
            }
        }
Ejemplo n.º 2
0
        public TranslationInfoEditor(TranslationInfo translationInfo, TranslationInfoPresenter translationInfoPresenter)
        {
            if (translationInfoPresenter == null)
            {
                throw new NullReferenceException(nameof(translationInfoPresenter));
            }

            if (translationInfo == null)
            {
                throw new NullReferenceException(nameof(translationInfo));
            }

            this._translationInfoPresenter = translationInfoPresenter;
            this._translationInfo          = translationInfo;

            this._newTranslationName = translationInfo.TranslationName;
            this._newCulture         = translationInfo.Culture;
        }