Skip to content

Commit

Permalink
API review updates (#25450)
Browse files Browse the repository at this point in the history
Part of #24743

- Add params to ContextParameterBinding and related
- Remove RelationalConnection.DbConnectionState
- Move commandSource constructor parameters to the end in *EventData classes and IRelationalCommandDiagnosticsLogger
  • Loading branch information
ajcvickers authored Aug 9, 2021
1 parent eb44e96 commit 270a608
Show file tree
Hide file tree
Showing 16 changed files with 162 additions and 160 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public CommandCorrelatedEventData(
/// <param name="connectionId"> A correlation ID that identifies the <see cref="DbConnection" /> instance being used. </param>
/// <param name="async"> Indicates whether or not the command was executed asynchronously. </param>
/// <param name="startTime"> The start time of this event. </param>
/// <param name="commandSource">Source of the command.</param>
/// <param name="commandSource"> Source of the command. </param>
public CommandCorrelatedEventData(
EventDefinitionBase eventDefinition,
Func<EventDefinitionBase, EventData, string> messageGenerator,
Expand Down
6 changes: 3 additions & 3 deletions src/EFCore.Relational/Diagnostics/CommandEndEventData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public CommandEndEventData(
/// <param name="async"> Indicates whether or not the command was executed asynchronously. </param>
/// <param name="logParameterValues"> Indicates whether or not the application allows logging of parameter values. </param>
/// <param name="startTime"> The start time of this event. </param>
/// <param name="commandSource">Source of the command.</param>
/// <param name="duration"> The duration this event. </param>
/// <param name="commandSource"> Source of the command. </param>
public CommandEndEventData(
EventDefinitionBase eventDefinition,
Func<EventDefinitionBase, EventData, string> messageGenerator,
Expand All @@ -84,8 +84,8 @@ public CommandEndEventData(
bool async,
bool logParameterValues,
DateTimeOffset startTime,
CommandSource commandSource,
TimeSpan duration)
TimeSpan duration,
CommandSource commandSource)
: base(
eventDefinition,
messageGenerator,
Expand Down
10 changes: 5 additions & 5 deletions src/EFCore.Relational/Diagnostics/CommandErrorEventData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ public CommandErrorEventData(
/// <param name="async"> Indicates whether or not the command was executed asynchronously. </param>
/// <param name="logParameterValues"> Indicates whether or not the application allows logging of parameter values. </param>
/// <param name="startTime"> The start time of this event. </param>
/// <param name="commandSource">Source of the command.</param>
/// <param name="duration"> The duration this event. </param>
/// <param name="commandSource"> Source of the command. </param>
public CommandErrorEventData(
EventDefinitionBase eventDefinition,
Func<EventDefinitionBase, EventData, string> messageGenerator,
Expand All @@ -90,8 +90,8 @@ public CommandErrorEventData(
bool async,
bool logParameterValues,
DateTimeOffset startTime,
CommandSource commandSource,
TimeSpan duration)
TimeSpan duration,
CommandSource commandSource)
: base(
eventDefinition,
messageGenerator,
Expand All @@ -104,8 +104,8 @@ public CommandErrorEventData(
async,
logParameterValues,
startTime,
commandSource,
duration)
duration,
commandSource)
{
Exception = exception;
}
Expand Down
2 changes: 1 addition & 1 deletion src/EFCore.Relational/Diagnostics/CommandEventData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public CommandEventData(
/// <param name="async"> Indicates whether or not the command was executed asynchronously. </param>
/// <param name="logParameterValues"> Indicates whether or not the application allows logging of parameter values. </param>
/// <param name="startTime"> The start time of this event. </param>
/// <param name="commandSource">Source of the command.</param>
/// <param name="commandSource"> Source of the command. </param>
public CommandEventData(
EventDefinitionBase eventDefinition,
Func<EventDefinitionBase, EventData, string> messageGenerator,
Expand Down
10 changes: 5 additions & 5 deletions src/EFCore.Relational/Diagnostics/CommandExecutedEventData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ public CommandExecutedEventData(
/// <param name="async"> Indicates whether or not the command was executed asynchronously. </param>
/// <param name="logParameterValues"> Indicates whether or not the application allows logging of parameter values. </param>
/// <param name="startTime"> The start time of this event. </param>
/// <param name="commandSource">Source of the command.</param>
/// <param name="duration"> The duration this event. </param>
/// <param name="commandSource"> Source of the command. </param>
public CommandExecutedEventData(
EventDefinitionBase eventDefinition,
Func<EventDefinitionBase, EventData, string> messageGenerator,
Expand All @@ -88,8 +88,8 @@ public CommandExecutedEventData(
bool async,
bool logParameterValues,
DateTimeOffset startTime,
CommandSource commandSource,
TimeSpan duration)
TimeSpan duration,
CommandSource commandSource)
: base(
eventDefinition,
messageGenerator,
Expand All @@ -102,8 +102,8 @@ public CommandExecutedEventData(
async,
logParameterValues,
startTime,
commandSource,
duration)
duration,
commandSource)
=> Result = result;

/// <summary>
Expand Down
Loading

0 comments on commit 270a608

Please sign in to comment.