コード例 #1
0
ファイル: Classes.cs プロジェクト: andrey-kozyrev/LinguaSpace
 public override void Load(BinaryReader reader)
 {
     int count = reader.ReadInt32();
     for (int i = 0; i < count; ++i)
     {
         String type = reader.ReadString();
         String prefix = reader.ReadString();
         String data = reader.ReadString();
         VocabularyWordCollectionImpl words = (VocabularyWordCollectionImpl)meaning.Vocabulary.Words;
         IWord wd = new WordDesc(type, prefix, data);
         this.Items.Add(wd);
     }
 }
コード例 #2
0
ファイル: Classes.cs プロジェクト: andrey-kozyrev/LinguaSpace
 public override int IndexOf(String type, String prefix, String data)
 {
     Debug.Assert(type != null);
     Debug.Assert(prefix != null);
     Debug.Assert(data != null);
     type = type.Trim();
     prefix = prefix.Trim();
     data = data.Trim();
     Debug.Assert(type.Length > 0);
     Debug.Assert(data.Length > 0);
     WordDesc wd = new WordDesc(type, prefix, data);
     return IndexOf(wd);
 }