private void UpdatePronounLayerFor(PronounBuilder pronounBuilder)
        {
            LayerPronoun dbSavedPronounLayer;
            LayerPronoun existingPronounLayer = LayerPronouns.FirstOrDefault(pronounLayer => pronounLayer.ID.Equals(pronounBuilder.FlexDB_ID));

            if (existingPronounLayer != null)
            {
                dbSavedPronounLayer = existingPronounLayer;
            }
            else
            {
                dbSavedPronounLayer = new LayerPronoun {
                    ID = pronounBuilder.FlexDB_ID
                };
                LayerPronouns.InsertOnSubmit(dbSavedPronounLayer);
            }
            dbSavedPronounLayer.PronounCase = pronounBuilder.CaseSpecified ? (byte)pronounBuilder.Case : null;
            dbSavedPronounLayer.Person      = pronounBuilder.PersonSpecified ? (byte)pronounBuilder.Person : null;
            dbSavedPronounLayer.Number      = pronounBuilder.NumberSpecified ? (byte)pronounBuilder.Number : null;
            dbSavedPronounLayer.Gender      = pronounBuilder.GenderSpecified ? (byte)pronounBuilder.Gender : null;
        }
 private void BuildPronounLayerOf(PronounBuilder pronounBuilder, UnifiedNode pronounResult)
 {
     pronounBuilder.CaseSpecified = pronounResult.PronounCase != null;
     if (pronounBuilder.CaseSpecified)
     {
         pronounBuilder.Case = (PronounCase)pronounResult.PronounCase;
     }
     pronounBuilder.PersonSpecified = pronounResult.Pronoun_Person != null;
     if (pronounBuilder.PersonSpecified)
     {
         pronounBuilder.Person = (person)pronounResult.Pronoun_Person;
     }
     pronounBuilder.NumberSpecified = pronounResult.Pronoun_Number != null;
     if (pronounBuilder.NumberSpecified)
     {
         pronounBuilder.Number = (numberAgreement)pronounResult.Pronoun_Number;
     }
     pronounBuilder.GenderSpecified = pronounResult.Pronoun_Gender != null;
     if (pronounBuilder.GenderSpecified)
     {
         pronounBuilder.Gender = (gender)pronounResult.Pronoun_Gender;
     }
 }
Beispiel #3
0
 internal PronounProperties(PronounBuilder pb)
 {
     Model = pb;
     partOfSpeechDescription = WordBuilder.DescriptionFor(Model);
 }