libplanet
libplanet copied to clipboard
Define a common method to get an `IStore` instance from a string
There are methods doing the similar thing in several places:
- Libplanet.Extensions.Cocona:
StatsCommand.LoadStoreFromUri()method - Libplanet.Extensions.Cocona:
StoreCommand.LoadStoreFromUri()method - Libplanet.Explorer.Executable:
Program.LoadStore()method
What they do is to instantiate an implementation of IStore from a given string. Not only for getting rid of code duplication, but also for establishing a standard-ish format to referring Libplanet stores[^1], it's good to have a common method to do this. If we have a shared format for it, we can utilize it elsewhere as well, for example, configuration files.
[^1]: Think of JDBC URLs or ODBC connection strings.
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.