CSharpFunctionalExtensions icon indicating copy to clipboard operation
CSharpFunctionalExtensions copied to clipboard

Request: Remove obsolete methods

Open Paul-Williams opened this issue 3 years ago • 7 comments

Would it be possible to draw a line and remove the multitude of obsolete methods from the various Result classes? They seem to have been building up over time, due to ad-hoc design, but surely they have to go, sometime? I would be happy to do this myself, but would not want to step on anyones toes...

Paul-Williams avatar Jun 20 '22 20:06 Paul-Williams

Or even, perhaps, annotate them with [EditorBrowsable(EditorBrowsableState.Never)] to prevent them appearing in intellisense.

Paul-Williams avatar Jun 20 '22 20:06 Paul-Williams

I like the latter option better. Keep them in the code (for now at least) but don't show in IntelliSense's code completion. A PR is welcome.

vkhorikov avatar Jun 21 '22 09:06 vkhorikov

As discussed, have applied the [EditorBrowsable(EditorBrowsableState.Never)] attribute to all Result methods which had previously been marked as Obsolete. PR: #418

FYI: Target Frameworks net40 & net45 are no longer supported under Visual Studio 2022. I have not touched this, however, I did have to temporarily remove them as targets in order to build locally, using VS2022.

I would be happy to also apply EditorBrowsable to the obsolete Maybe extension methods. I did not do so this time as it was not previously discussed.

Paul-Williams avatar Jun 21 '22 13:06 Paul-Williams

Merged the PR, thank you. Please go ahead with Maybe (and any other classes you may find) as well, for consistency sake. I'll publish a new lib version after that.

vkhorikov avatar Jun 22 '22 13:06 vkhorikov

As requested, have applied EditorBrowsableAttribute obsolete methods in MaybeExtensions class. PR: #419

Paul-Williams avatar Jun 22 '22 16:06 Paul-Williams

Thank you. Will be published with v2.29.4 shortly.

vkhorikov avatar Jun 23 '22 09:06 vkhorikov

My pleasure. Thank you for the excellent library and accompanying Plurasight course! Headed me down the path of functional-like programming ;)

Paul-Williams avatar Jun 23 '22 11:06 Paul-Williams