-
Notifications
You must be signed in to change notification settings - Fork 899
Give DirectoryHelper.DeleteDirectory() a more meaningful name #980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Milestone
Comments
/cc @ThomasBarnekow |
@nulltoken Having looked at the TryParse pattern, we could potentially do the following:
|
ThomasBarnekow
added a commit
to ThomasBarnekow/libgit2sharp
that referenced
this issue
Apr 14, 2015
Rename TryDeleteDirectory(string, int, int, int) to DeleteDirectory(...) because this method can still throw exceptions and is not fully in line with the try-parse pattern. Introduce TryDeleteDirectory(string) : bool as a try-parse pattern-compliant option to delete directories recursively without throwing exceptions. Remove DeleteSubdirectories(string) method because it is not used anywhere. Use 'var' keyword consistently across all methods. Related to libgit2#980
ThomasBarnekow
added a commit
to ThomasBarnekow/libgit2sharp
that referenced
this issue
Apr 15, 2015
Rename TryDeleteDirectory(string, int, int, int) to DeleteDirectory(...) because this method can still throw exceptions and is not fully in line with the try-parse pattern. Introduce TryDeleteDirectory(string) : bool as a try-parse pattern-compliant option to delete directories recursively without throwing exceptions. Remove DeleteSubdirectories(string) method because it is not used anywhere. Use 'var' keyword consistently across all methods. Related to libgit2#980
ThomasBarnekow
added a commit
to ThomasBarnekow/libgit2sharp
that referenced
this issue
Apr 16, 2015
Rename TryDeleteDirectory(string, int, int, int) to DeleteDirectory(...) because this method can still throw exceptions and is not fully in line with the try-parse pattern. Introduce TryDeleteDirectory(string) : bool as a try-parse pattern-compliant option to delete directories recursively without throwing exceptions. Remove DeleteSubdirectories(string) method because it is not used anywhere. Use 'var' keyword consistently across all methods. Related to libgit2#980
ThomasBarnekow
added a commit
to ThomasBarnekow/libgit2sharp
that referenced
this issue
Apr 17, 2015
Rename TryDeleteDirectory(string, int, int, int) to DeleteDirectory(...) because this method can still throw exceptions and is not fully in line with the try-parse pattern. Introduce TryDeleteDirectory(string) : bool as a try-parse pattern-compliant option to delete directories recursively without throwing exceptions. Remove DeleteSubdirectories(string) method because it is not used anywhere. Use 'var' keyword consistently across all methods. Related to libgit2#980
ThomasBarnekow
added a commit
to ThomasBarnekow/libgit2sharp
that referenced
this issue
Apr 18, 2015
Rename TryDeleteDirectory(string, int, int, int) to DeleteDirectory(...) because this method can still throw exceptions and is not fully in line with the try-parse pattern. Introduce TryDeleteDirectory(string) : bool as a try-parse pattern-compliant option to delete directories recursively without throwing exceptions. Remove DeleteSubdirectories(string) method because it is not used anywhere. Use 'var' keyword consistently across all methods. Related to libgit2#980
Fixed by #1022 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From #977 (comment)
Why not? However, by convention,
TryXxxx
methods expose a certain signature (a returnedbool
and an inout
param). I'd prefer using a name that doesn't conflict with a known pattern.The text was updated successfully, but these errors were encountered: