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