removeAlias abstract method
Removes an alias from the registry.
Removes the specified alias from the registry, making it no longer
valid for accessing the associated object. This does not affect the
primary name or the object itself.
Parameters:
alias: The alias to remove from the registry
Throws:
InvalidArgumentExceptionifaliasis not registered as an alias
Example:
final registry = MyAliasRegistry();
registry.registerAlias('logService', 'logger');
// Alias is active
print(registry.isAlias('logger')); // true
// Remove the alias
registry.removeAlias('logger');
// Alias is no longer active
print(registry.isAlias('logger')); // false
// Primary name remains unaffected
final service = registry.get('logService'); // Still works
Implementation
void removeAlias(String alias);