private string[] GetTableNamesFrom(DataSet dataSet) { List <string> tableNames = new List <string>(); if (ValidateTableNames(dataSet)) { foreach (DataTable table in dataSet.Tables) { tableNames.Add(table.TableName); } } else if (dataSet.Tables.Count > Section.TableNames.Count) { Assertie.Fail( "M_Fixture_Temp_ObjectValidator_AssertTableNumberImp", Section.TableNames.Count, dataSet.Tables.Count, Section); } else { string messageFormat = Resi.Get("M_Fixture_Temp_ObjectValidator_UseTableOrder"); Loggi.Warn(String.Format(messageFormat, Section)); for (int i = 0; i < dataSet.Tables.Count; i++) { Loggi.Warn("DataSet.Table[" + i + "] = " + Section.TableNames[i]); tableNames.Add(Section.TableNames[i]); } } return(tableNames.ToArray()); }
public void Warn_stringはWarningレベルでログ出力を行う() { // when Loggi.Warn("aaa"); // then traceListener.AssertMessage("Warning", "aaa", null); }
private void SetEnabledIdentityInsert(bool enabled, string tableName) { if (connection.IsSQLServer && HasIdentityColumn(tableName)) { try { string onOff = enabled ? " ON" : " OFF"; ExecuteNonQuery(connection.CreateCommand("SET IDENTITY_INSERT " + tableName + onOff)); } catch (Exception e) { Loggi.Warn(e); } } }
public void Warn_string_ExceptionはWarningレベルでログ出力を行う() { // setup try { throwException("eee"); } catch (Exception e) { // when Loggi.Warn("aaa", e); // then traceListener.AssertMessage("Warning", "aaa", e); } }