Esempio n. 1
0
		public override IPalasoDataObjectProperty Clone()
		{
			var clone = new LexReversal();
			clone.Type = Type;
			//copied directly from MultiText.Clone as we unfortunately can't just call that method and have it do the right thing.
			//If this class were composed of a multitext rather than inheriting this wouldn't be a problem.
			clone.EmbeddedXmlElements = new List<string>(EmbeddedXmlElements);
			clone.Forms = Forms.Select(f => (LanguageForm)f.Clone()).ToArray();
			return clone;
		}
Esempio n. 2
0
        public override IPalasoDataObjectProperty Clone()
        {
            var clone = new LexReversal();

            clone.Type = Type;
            //copied directly from MultiText.Clone as we unfortunately can't just call that method and have it do the right thing.
            //If this class were composed of a multitext rather than inheriting this wouldn't be a problem.
            clone.EmbeddedXmlElements = new List <string>(EmbeddedXmlElements);
            clone.Forms = Forms.Select(f => (LanguageForm)f.Clone()).ToArray();
            return(clone);
        }
Esempio n. 3
0
 public bool Equals(LexReversal other)
 {
     if (!base.Equals(other))
     {
         return(false);
     }
     if (Type != other.Type)
     {
         return(false);
     }
     return(true);
 }
Esempio n. 4
0
		public bool Equals(LexReversal other)
		{
			if (!base.Equals(other)) return false;
			if (Type != other.Type) return false;
			return true;
		}
Esempio n. 5
0
		public void SenseWith2Reversals()
		{
			using (var session = new LiftExportAsFragmentTestSession())
			{
				var sense = new LexSense();
				var reversal = new LexReversal {Type = "revType"};
				reversal.SetAlternative("en", "one");
				sense.Reversals.Add(reversal);
				var reversal2 = new LexReversal();
				reversal2.SetAlternative("en", "two");
				sense.Reversals.Add(reversal2);
				session.LiftWriter.Add(sense);
				session.LiftWriter.End();
				AssertHasOneMatch("sense/reversal/form[@lang='en' and text='one']", session);
				AssertHasOneMatch("sense/reversal/form[@lang='en' and text='two']", session);
				AssertHasOneMatch("sense/reversal[@type='revType']", session);
				AssertHasOneMatch("sense/reversal/@type", session); //only one had a type
			}
		}