Events indicating the activities performed by a given datasource.
상속: System.EventArgs
예제 #1
0
파일: Setup.cs 프로젝트: docevaad/Chain
 static void WriteDetails(ExecutionEventArgs e)
 {
     Debug.WriteLine("");
     Debug.WriteLine("Command text: ");
     Debug.WriteLine(e.ExecutionDetails.CommandText);
     Debug.Indent();
     foreach (var item in ((SqlServerCommandExecutionToken)e.ExecutionDetails).Parameters)
         Debug.WriteLine(item.ParameterName + ": " + (item.Value == null || item.Value == DBNull.Value ? "<NULL>" : item.Value));
     Debug.Unindent();
     Debug.WriteLine("******");
     Debug.WriteLine("");
 }
예제 #2
0
파일: TestBase.cs 프로젝트: docevaad/Chain
 void WriteDetails(ExecutionEventArgs e)
 {
     if (e.ExecutionDetails is SQLiteCommandExecutionToken)
     {
         WriteLine("");
         WriteLine("Command text: ");
         WriteLine(e.ExecutionDetails.CommandText);
         //m_Output.Indent();
         foreach (var item in ((SQLiteCommandExecutionToken)e.ExecutionDetails).Parameters)
             WriteLine(item.ParameterName + ": " + (item.Value == null || item.Value == DBNull.Value ? "<NULL>" : item.Value));
         //m_Output.Unindent();
         WriteLine("******");
         WriteLine("");
     }
 }
예제 #3
0
파일: TestBase.cs 프로젝트: docevaad/Chain
        void WriteDetails(ExecutionEventArgs e)
        {
            var token = e.ExecutionDetails as AccessCommandExecutionToken;
            if (token == null)
                return;

            WriteLine("");
            WriteLine("Command text: ");
            WriteLine(e.ExecutionDetails.CommandText);
            //m_Output.Indent();
            if (token.Parameters != null)
                foreach (var item in token.Parameters)
                    WriteLine(item.ParameterName + ": " + (item.Value == null || item.Value == DBNull.Value ? "<NULL>" : item.Value));
            //m_Output.Unindent();
            WriteLine("******");
            WriteLine("");
        }
예제 #4
0
파일: Setup.cs 프로젝트: docevaad/Chain
 static void DefaultDispatcher_ExecutionStarted(object sender, ExecutionEventArgs e)
 {
     Debug.WriteLine("******");
     Debug.WriteLine($"Execution started: {e.ExecutionDetails.OperationName}");
     WriteDetails(e);
 }
예제 #5
0
파일: Setup.cs 프로젝트: docevaad/Chain
 static void DefaultDispatcher_ExecutionFinished(object sender, ExecutionEventArgs e)
 {
     Debug.WriteLine("******");
     Debug.WriteLine($"Execution finished: {e.ExecutionDetails.OperationName}. Duration: {e.Duration.Value.TotalSeconds.ToString("N3")} sec. Rows affected: {(e.RowsAffected != null ? e.RowsAffected.Value.ToString("N0") : "<NULL>")}.");
     //WriteDetails(e);
 }
예제 #6
0
파일: Setup.cs 프로젝트: docevaad/Chain
 static void DefaultDispatcher_ExecutionError(object sender, ExecutionEventArgs e)
 {
     Debug.WriteLine("******");
     Debug.WriteLine($"Execution error: {e.ExecutionDetails.OperationName}. Duration: {e.Duration.Value.TotalSeconds.ToString("N3")} sec.");
     //WriteDetails(e);
 }
예제 #7
0
파일: TestBase.cs 프로젝트: docevaad/Chain
 void WriteDetails(ExecutionEventArgs e)
 {
     if (e.ExecutionDetails is PostgreSqlCommandExecutionToken)
     {
         WriteLine("");
         WriteLine("Command text: ");
         WriteLine(e.ExecutionDetails.CommandText);
         WriteLine("CommandType: " + e.ExecutionDetails.CommandType);
         //Indent();
         foreach (var item in ((PostgreSqlCommandExecutionToken)e.ExecutionDetails).Parameters)
             WriteLine(item.ParameterName + ": " + (item.Value == null || item.Value == DBNull.Value ? "<NULL>" : item.Value));
         //Unindent();
         WriteLine("******");
         WriteLine("");
     }
 }
예제 #8
0
파일: TestBase.cs 프로젝트: docevaad/Chain
 void WriteDetails(ExecutionEventArgs e)
 {
     if (e.ExecutionDetails is SqlServerCommandExecutionToken)
     {
         WriteLine("");
         WriteLine("Command text: ");
         WriteLine(e.ExecutionDetails.CommandText);
         //Indent();
         foreach (var item in ((SqlServerCommandExecutionToken)e.ExecutionDetails).Parameters)
             WriteLine(item.ParameterName + ": " + (item.Value == null || item.Value == DBNull.Value ? "<NULL>" : item.Value) + " [" + item.SqlDbType + "]");
         //Unindent();
         WriteLine("******");
         WriteLine("");
     }
 }