Exemplo n.º 1
0
 public void Write(ChildrenList_CreateOnlyParentRaw childrenList_CreateOnlyParentRaw)
 {
     if (childrenList_CreateOnlyParentRaw.Key != nextKey)
     {
         throw new Exception($"ChildrenList_CreateOnlyParentRaw's key {childrenList_CreateOnlyParentRaw.Key} should be {nextKey}.");
     }
     nextKey++;
     csvWriter.StartNewLine();
     csvWriter.Write(childrenList_CreateOnlyParentRaw.Text);
     csvWriter.WriteEndOfLine();
 }
Exemplo n.º 2
0
 public bool ReadLine([NotNullWhen(true)] out ChildrenList_CreateOnlyParentRaw?childrenList_CreateOnlyParentRaw)
 {
     if (csvReader.IsEndOfFileReached())
     {
         csvReader.Dispose();
         childrenList_CreateOnlyParentRaw = null;
         return(false);
     }
     childrenList_CreateOnlyParentRaw      = new ChildrenList_CreateOnlyParentRaw();
     childrenList_CreateOnlyParentRaw.Key  = nextKey++;
     childrenList_CreateOnlyParentRaw.Text = csvReader.ReadString();
     csvReader.ReadEndOfLine();
     return(true);
 }