bool AutoFix(PreCondError err) { DieIf(err == null, "Internal Error. Err can't be null."); var msg = $"{err.ToString()}\nDo you want autofix it?"; return(Confirm(msg)); }
public void Add(string name, object expected, object actual) { DieIf(IsNullOrEmpty(name), "[Add] name is required."); var pce = new PreCondError(name, expected, actual); if (Head == null) { Head = new PreCondNode(pce); WriteLine($"Set head {Count}"); } else { var tail = Head; while (tail.Next != null) { tail = tail.Next; } tail.Next = new PreCondNode(pce); WriteLine($"Set next {Count}"); } Count++; }
public PreCondNode(PreCondError err) { Err = err; }