コード例 #1
0
ファイル: LexPhonetic.cs プロジェクト: JohnThomson/libpalaso
		public override IPalasoDataObjectProperty Clone()
		{
			var clone = new LexPhonetic();
			clone.Traits.AddRange(Traits.Select(t => t.Clone()));
			clone.Fields.AddRange(Fields.Select(f=>(LexField) f.Clone()));
			clone.EmbeddedXmlElements = new List<string>(EmbeddedXmlElements);
			clone.Forms = Forms.Select(f => (LanguageForm)f.Clone()).ToArray();
			return clone;
		}
コード例 #2
0
ファイル: LexPhonetic.cs プロジェクト: JohnThomson/libpalaso
		public bool Equals(LexPhonetic other)
		{
			if (ReferenceEquals(null, other)) return false;
			if (ReferenceEquals(this, other)) return true;
			if (!base.Equals(other)) return false;
			if (!Traits.SequenceEqual(other.Traits)) return false;
			if (!Fields.SequenceEqual(other.Fields)) return false;
			return true;
		}
コード例 #3
0
        public override IPalasoDataObjectProperty Clone()
        {
            var clone = new LexPhonetic();

            clone.Traits.AddRange(Traits.Select(t => t.Clone()));
            clone.Fields.AddRange(Fields.Select(f => (LexField)f.Clone()));
            clone.EmbeddedXmlElements = new List <string>(EmbeddedXmlElements);
            clone.Forms = Forms.Select(f => (LanguageForm)f.Clone()).ToArray();
            return(clone);
        }
コード例 #4
0
 public bool Equals(LexPhonetic other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     if (!base.Equals(other))
     {
         return(false);
     }
     if (!Traits.SequenceEqual(other.Traits))
     {
         return(false);
     }
     if (!Fields.SequenceEqual(other.Fields))
     {
         return(false);
     }
     return(true);
 }
コード例 #5
0
		public void EntryWithSimplePronunciation()
		{
			using (var session = new LiftExportAsFragmentTestSession())
			{
				var e = session.CreateItem();
				var phonetic = new LexPhonetic();
				phonetic.SetAlternative("ipa", "one");
				e.Pronunciations.Add(phonetic);
				session.LiftWriter.Add(e);
				session.LiftWriter.End();
				AssertHasOneMatch("entry/pronunciation/form[@lang='ipa' and text='one']", session);
			}
		}