public void Execute(CaseSet testCases) { if (!testCases.Variables.Contains(ColumnName)) { throw new ArgumentOutOfRangeException(String.Format("No column named '{0}' has been found.", ColumnName)); } var index = testCases.Variables.ToList().FindIndex(v => v == ColumnName); foreach (DataRow row in testCases.Content.Rows) { if ((string)row[ColumnName] != "(none)") { if (NewText.GetValue(row) != "(none)" && OldText.GetValue(row) != "(none)") { row[ColumnName] = ((string)row[ColumnName]).Replace(OldText.GetValue(row), NewText.GetValue(row)); } else { row[ColumnName] = "(none)"; } } } }
static int interfaceを受け取る非ジェネリック版(IValuable item) => item.GetValue();