Skip to content
This repository was archived by the owner on Nov 11, 2023. It is now read-only.

refactor: internal refactors#11

Open
iterma wants to merge 7 commits into
kxxt:masterfrom
iterma:classWslDistro
Open

refactor: internal refactors#11
iterma wants to merge 7 commits into
kxxt:masterfrom
iterma:classWslDistro

Conversation

@iterma

@iterma iterma commented Jul 28, 2022

Copy link
Copy Markdown
Contributor

Added constructor for simplicity and less redundancy (also less mutable 😉).

@kxxt

kxxt commented Jul 28, 2022

Copy link
Copy Markdown
Owner

Hi @iterma, thanks a lot for your contributions to this repo. I see that you opened multiple pull requests but this one(#11) is actually a superset of #10 and #9. I am going to close #9 and #10 in favor of this pull request, which simplifies the review process. Generally speaking, one pull request should only do one thing.

Comment on lines +13 to +16
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return (bool)value ? Visibility.Visible : Visibility.Collapsed; // Not used.
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This implementation of ConvertBack is not correct. What ConvertBack should do is converting from Visibility to bool, which is useless for our case. (FYI: It is useful in two-way bindings)

Comment on lines +13 to +16
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return (bool)value ? Visibility.Collapsed : Visibility.Visible; // Not used.
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

The same issue here. Wrong implementation here. And definitely no need to implement it.

public class CommandFailedException : Exception
namespace WSLDiskShrinker.Common;

[Serializable]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I don't see the point of making it Serializable. Can you explain it?

this.FailedProcess = p;
}

// Implement exception constructors (not used).

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Why adding implementations that are not used 😂?

@kxxt kxxt changed the title New constructor. refactor: internal refactors Jul 28, 2022
@iterma

iterma commented Jul 30, 2022

Copy link
Copy Markdown
Contributor Author

Sorry about the late response.

I saw your message but I'm out sailing for a few days, one of the reasons I prepared several PRs but shouldn't have sent them off.

I have my computer with me but the weather is too nice 😎☀️

Will return after the weekend.

// Thanks, anyway, for showing interest in the PRs.

@kxxt

kxxt commented Jul 30, 2022

Copy link
Copy Markdown
Owner

Sorry about the late response.

I saw your message but I'm out sailing for a few days, one of the reasons I prepared several PRs but shouldn't have sent them off.

I have my computer with me but the weather is too nice 😎☀️

Will return after the weekend.

// Thanks, anyway, for showing interest in the PRs.

Thanks for your continued effort in this repo.
We don't have to rush when doing open source. Actually your reply is fast when compared with other open source repos I have worked with.
I hope you enjoy your weekend 🎉

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.

2 participants