Пример #1
0
        public static async Task <PhrasesByTextAndLanguageRetriever> CreateNewAsync(
            Criteria.FindPhraseInPhraseListCriteria criteria)
        {
            var result = await DataPortal.CreateAsync <PhrasesByTextAndLanguageRetriever>(criteria);

            return(result);
        }
Пример #2
0
        public void DataPortal_Create(Criteria.FindPhraseInPhraseListCriteria criteria)
        {
            //INITIALIZE
            RetrieverId           = Guid.NewGuid();
            RetrievedPhrases      = null;
            RetrievedSinglePhrase = null;

            var retrievedPhrase = FindPhraseInPhraseList(criteria.PhraseText,
                                                         criteria.LanguageText,
                                                         criteria.Phrases);

            //if we directly add this retrievedPhrase, then it will be a child
            //we need to get the non-child version of this
            //RetrievedPhrases.Add(criteriaPhrase.Id, retrievedPhrase);
            if (criteria.GetPhraseFromDB && retrievedPhrase != null && retrievedPhrase.IsChild)
            {
                var nonChildVersion = PhraseEdit.GetPhraseEdit(retrievedPhrase.Id);
                RetrievedSinglePhrase = nonChildVersion;
            }
            else
            {
                RetrievedSinglePhrase = retrievedPhrase;
            }
        }
Пример #3
0
 public static void CreateNew(Criteria.FindPhraseInPhraseListCriteria criteria)
 {
     DataPortal.Create <PhrasesByTextAndLanguageRetriever>(criteria);
 }