Ejemplo n.º 1
0
 private void PrefixLevel(DataDictionary dict, string prefix, Level l)
 {
     PrefixDictObjectName(dict, prefix, l);
     l.IDs.Items.ForEach(i => PrefixItem(dict, prefix, i));
     l.Records.ForEach(r => PrefixRecord(dict, prefix, r));
 }
Ejemplo n.º 2
0
        private string LoadLevel()
        {
            int newLevelNum = _level == null ? 1 : _level.LevelNum + 1;

            _level = new Level(_dictionary,newLevelNum);

            string line;

            while( ( line = ReadTrimmedLine() ) != null && !IsHeader(line) )
            {
                string argument,value;

                ParseLine(line,out argument,out value);

                if( AssignSharedComponents(_level,argument,value) )
                {
                }

                else
                    throw new DataDictionaryReaderException(line);
            }

            _dictionary.AddLevel(_level);

            return line;
        }
Ejemplo n.º 3
0
 public Record(Level level)
 {
     _parent = level;
     _items = new List<Item>();
     _occurrenceLabels = new List<string>();
     Required = true;
     MaxOccs = 1;
     Length = 0;
     RecordType = "";
 }
Ejemplo n.º 4
0
 public void AddLevel(Level level)
 {
     _levels.Add(level);
 }
Ejemplo n.º 5
0
        private void SaveLevel(Level level)
        {
            _tw.WriteLine();
            _tw.WriteLine(DataDictionaryElements.DICT_LEVEL);
            SaveSharedComponents(level);

            _tw.WriteLine();
            _tw.WriteLine(DataDictionaryElements.DICT_IDITEMS);

            foreach( Item item in level.IDs.Items )
                SaveItem(item);

            foreach( Record record in level.Records )
                SaveRecord(record);
        }