public void TestIgnoredColumn_HandlePreAndPostProcessing() { var ignored = new IgnoredColumn() { ColumnName = "Ignored", NullFormatter = NullFormatter.ForValue("NULL"), OnParsing = (ctx, value) => { Assert.AreEqual("NULL", value); return(value); }, OnParsed = (ctx, value) => { Assert.IsNull(value); return(value); }, OnFormatting = (ctx, value) => { Assert.IsNull(value); return(value); }, OnFormatted = (ctx, value) => { Assert.AreEqual("NULL", value); return(value); } }; object value = ignored.Parse(null, "NULL"); Assert.IsNull(value); string formatted = ignored.Format(null, value); Assert.AreEqual("NULL", formatted); }
public IgnoredMapping AddIgnored() { var column = new IgnoredColumn(); var mapping = new IgnoredMapping(column, lookup.Count); string key = $"@Ignored_{mapping.FileIndex}"; lookup.Add(key, mapping); ++ignoredCount; return(mapping); }
/// ------------------------------------------------------------------------------------ public void SetIgnoreStateForCurrentRow(bool ignored) { if (ignored) { _annotationFile.Tiers.MarkSegmentAsIgnored(CurrentCellAddress.Y); Stop(); EditMode = DataGridViewEditMode.EditProgrammatically; EndEdit(); } else { _annotationFile.Tiers.MarkSegmentAsUnignored(CurrentCellAddress.Y); BeginEdit(true); } IsDirty = true; IgnoredColumn.HandleProgramaticValueChange(); InvalidateRow(CurrentCellAddress.Y); }
public IgnoredMapping(IgnoredColumn column) { this.column = column; }
public IgnoredMapping(IgnoredColumn column, int fileIndex) { this.column = column; this.FileIndex = fileIndex; }
public IgnoredMapping(IgnoredColumn column, int physicalIndex) { this.column = column; PhysicalIndex = physicalIndex; }