(1.) Excellent... either way, just something to bring up now that it'll surface somewhere :)
(2.) I understand you wanting it as simple as possible. I'll build my version and let you see where I'm at... either way, just seems like now is the time to get it right... not that what you have isn't right... maybe just not "rightest" ;)
(3.) Agreed, not sure there was any reason there would be others... just felt a little to closed/coupled... this would be more correct:
(4.) Me too... this was my first-blush read, not sure how correct it is... but I wanted to raise the flag now before there's an API to support.
(5.) Yes, I'm not sure what the expectation of the value Result is (not enough holistic review, yet)... it just seemed odd that the behavior is different and raised my "life-cycle/GC-roots/side-effect" flag... probably nothing wrong here, but seems like a lot of inference for very little gain in code-path. I've been know to be too pedantic.
(2.) I understand you wanting it as simple as possible. I'll build my version and let you see where I'm at... either way, just seems like now is the time to get it right... not that what you have isn't right... maybe just not "rightest" ;)
(3.) Agreed, not sure there was any reason there would be others... just felt a little to closed/coupled... this would be more correct:
public DbCommandInterceptionContext(DbInterceptionContext copyFrom)
: base(copyFrom)
{
var asResultType = copyFrom as IDbInterceptionContextWithResult<TResult>;
if (asResultType != null)
{
_isResultSet = asResultType.IsResultSet;
_result = asResultType.Result;
}
}
Note that TResult would be hard-coded as DbCommandTree in DbCommandTreeInterceptionContext.cs -- but if there were an intermediate form (e.g. if DbCommandTreeInterceptionContext inherited from DbInterceptionContext<DbCommandTree> we wouldn't even need the copy-constructor for that class).(4.) Me too... this was my first-blush read, not sure how correct it is... but I wanted to raise the flag now before there's an API to support.
(5.) Yes, I'm not sure what the expectation of the value Result is (not enough holistic review, yet)... it just seemed odd that the behavior is different and raised my "life-cycle/GC-roots/side-effect" flag... probably nothing wrong here, but seems like a lot of inference for very little gain in code-path. I've been know to be too pedantic.