public bool ReadLine([NotNullWhen(true)] out ChildrenList_ParentRaw?childrenList_ParentRaw)
        {
            if (csvReader.IsEndOfFileReached())
            {
                csvReader.Dispose();
                childrenList_ParentRaw = null;
                return(false);
            }
            childrenList_ParentRaw = new ChildrenList_ParentRaw();
            var firstLineChar = csvReader.ReadFirstLineChar();

            if (firstLineChar == csvConfig.LineCharAdd)
            {
                childrenList_ParentRaw.RawState = RawStateEnum.Read;
            }
            else if (firstLineChar == csvConfig.LineCharUpdate)
            {
                childrenList_ParentRaw.RawState = RawStateEnum.Updated;
            }
            else if (firstLineChar == csvConfig.LineCharDelete)
            {
                childrenList_ParentRaw.RawState = RawStateEnum.Deleted;
            }
            else
            {
                throw new NotSupportedException($"Illegal first line character '{firstLineChar}' found in '{csvReader.GetPresentContent()}'.");
            }
            childrenList_ParentRaw.Key  = csvReader.ReadInt();
            childrenList_ParentRaw.Text = csvReader.ReadString();
            csvReader.ReadEndOfLine();
            return(true);
        }
 public void Write(ChildrenList_ParentRaw childrenList_ParentRaw)
 {
     if (childrenList_ParentRaw.Key < 0)
     {
         throw new Exception($"ChildrenList_ParentRaw's key {childrenList_ParentRaw.Key} needs to be greater equal 0.");
     }
     if (childrenList_ParentRaw.Key <= lastKey)
     {
         throw new Exception($"ChildrenList_ParentRaw's key {childrenList_ParentRaw.Key} must be greater than the last written ChildrenList_Parent's key {lastKey}.");
     }
     lastKey = childrenList_ParentRaw.Key;
     csvWriter.WriteFirstLineChar(csvConfig.LineCharAdd);
     csvWriter.Write(childrenList_ParentRaw.Key);
     csvWriter.Write(childrenList_ParentRaw.Text);
     csvWriter.WriteEndOfLine();
 }