C
Curious
I have two projects, "CORE" and "Console". The "Console" project uses
objects and their associated methods defined in the "CORE" project.
Therefore, the "Console" project is depedent on the "CORE" project.
In "CORE" project, I have two classes, "Report" and "CoreConnection".
There is a "Files" method in the "Report" class that calls methods in
the "CoreConnection" class, specifically, "GetListFromStoredProcedure"
which in turn calls "RunSafeSql", which in turn calls
"InternalExecuteGenericSqlCall" which in turn, calls
"WriteSqlCallEndEvent".
In "Console" project, I have a class "JoinConsoleCoreConnection" which
is a child class of "CoreConnection". Now I call the "Files" method in
the "Report" class from a method in "JoinConsoleCoreConnection". So it
calls chains of methods in the "CoreConnection" class, including
"GetListFromStoredProcedure" which in turn calls "RunSafeSql", which
in turn calls "InternalExecuteGenericSqlCall", which in turn calls
"WriteSqlCallEndEvent".
Now I need to make a change: When I call the "Files" method in the
"Report" class ***from "JoinConsoleCoreConnection"***, I want to skip
the call to "WriteSqlCallEndEvent". What changes are necessary in
order to skip this step?
I understand that I probably will need to redefine the
"InternalExecuteGenericSqlCall" method to not call
"WriteSqlCallEndEvent" in the calling class,
"JoinConsoleCoreConnection". However, that will not work since
"RunSafeSql" in "CoreConnection" will only call the
"InternalExecuteGenericSqlCall" in "CoreConnection" (instead of the
one in "JoinConsoleCoreConnection").
Any advice?
objects and their associated methods defined in the "CORE" project.
Therefore, the "Console" project is depedent on the "CORE" project.
In "CORE" project, I have two classes, "Report" and "CoreConnection".
There is a "Files" method in the "Report" class that calls methods in
the "CoreConnection" class, specifically, "GetListFromStoredProcedure"
which in turn calls "RunSafeSql", which in turn calls
"InternalExecuteGenericSqlCall" which in turn, calls
"WriteSqlCallEndEvent".
In "Console" project, I have a class "JoinConsoleCoreConnection" which
is a child class of "CoreConnection". Now I call the "Files" method in
the "Report" class from a method in "JoinConsoleCoreConnection". So it
calls chains of methods in the "CoreConnection" class, including
"GetListFromStoredProcedure" which in turn calls "RunSafeSql", which
in turn calls "InternalExecuteGenericSqlCall", which in turn calls
"WriteSqlCallEndEvent".
Now I need to make a change: When I call the "Files" method in the
"Report" class ***from "JoinConsoleCoreConnection"***, I want to skip
the call to "WriteSqlCallEndEvent". What changes are necessary in
order to skip this step?
I understand that I probably will need to redefine the
"InternalExecuteGenericSqlCall" method to not call
"WriteSqlCallEndEvent" in the calling class,
"JoinConsoleCoreConnection". However, that will not work since
"RunSafeSql" in "CoreConnection" will only call the
"InternalExecuteGenericSqlCall" in "CoreConnection" (instead of the
one in "JoinConsoleCoreConnection").
Any advice?