Not sure how to phrase this question, but here is the problem.
I have a namespace designed: my.foo.bar
In one of my classes, I accidentally named the namespace my.foo.Bar
I want to fix the namespace capitalization so that everyone is on the same page, but this is a shared library, and I can't afford to recompile all programs using this.
So, is there something I can create that, in essence, redirects my.foo.Bar
to my.foo.bar
?
On your Mac, do one of the following: Remove an item from the Finder sidebar: Drag the item out of the Finder sidebar until you see the remove sign . Remove an alias from the Dock: Drag the item out of the Dock until you see Remove. If you remove an item from the sidebar or Dock, only the alias is removed.
The Mac counterpart to a Windows "shortcut," an alias can be placed on the desktop or stored in other folders, and clicking the alias is the same as clicking the original file's icon. However, deleting an alias does not remove the original file.
You need to use unalias command on Linux or Unix to remove bash shell aliases. The alias command used to create aliases. It works on bash, ksh, csh and other Unix shells.
Not globally. You can use namespace aliases, but only in the client code. It sounds like you might need to take a breaking change.
One way of doing it, if it is only one or two classes, would be to copy them from my.foo.Bar
to my.foo.bar
, deprecate the ones in the bad namespace using the Obsolete attribute, and slowly move clients over to the correct ones.
If the class is stateless, then the class in the my.foo.Bar
namespace could delegate to the one in the my.foo.bar
namespace as @JohnSaunders suggests, but only if client's usage of that class doesn't preclude delegation (everything is a method or a property, that class's Type isn't used via reflection, etc).
The best you can do is to take all of the types in the badly-named namespace, and create versions of them in the correct namespace. These can delegate to the bad namespace versions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With