Skip to content

Conversation

@TomFinley
Copy link
Contributor

Fixes #1824 .

Note that some internal things that instead operate on top of delegates will still have Action disposer delegates, but my expectation is that most of those things are (or should be) disposable.

The usual advice about the commits being a useful way to review still apply, though less so than in prior PRs since there are fewer bulk renamings than elsewhere.

/// via the <see cref="DisposeCore(bool)"/> functionality.
/// </summary>
/// <param name="disposing"></param>
protected sealed override void Dispose(bool disposing)
Copy link
Member

@sfilipi sfilipi Dec 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disposing [](start = 52, length = 9)

just curious, why not call it "dispose"? #Resolved

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/dispose-pattern
I think this is MS recommendation.


In reply to: 239561491 [](ancestors = 239561491)

Copy link
Contributor Author

@TomFinley TomFinley Dec 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, as @Ivanidzo4ka says, disposing is preferred. I only diverged from the pattern sparingly, since disposal/finalization is one of those things that hard enough to get "right" that slavish devotion to the pattern really helps keep the code maintainable and correct, right down to their recommendations to the names of the parameters, the order of the if statements, order of base calls, and so on, and so on.

public override bool IsColumnActive(int col)
{
return _row.IsColumnActive(col);
return Input.IsColumnActive(col);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return [](start = 24, length = 6)

you tend to prefer => for other one-liners.

Copy link
Contributor Author

@TomFinley TomFinley Dec 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kinda. Sometimes. I agree this seems like a situation where normally I'd prefer the => syntax.

Copy link
Member

@sfilipi sfilipi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

private abstract class TypedRowBase
private abstract class TypedRowBase : WrappingRow
{
protected readonly IChannel Ch;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protected readonly IChannel Ch; [](start = 12, length = 31)

Not related to PR, but why we have channel here?
All it does is just work as IExceptionContext. Why it has to be IChannel?

Copy link
Contributor

@Ivanidzo4ka Ivanidzo4ka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@TomFinley TomFinley merged commit 1f73f72 into dotnet:master Dec 6, 2018
@TomFinley TomFinley deleted the tfinley/RowDispose branch March 6, 2019 16:32
@ghost ghost locked as resolved and limited conversation to collaborators Mar 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants