Create one library containing the class(es) that access your centralized XML settings, and reference that library from the other libraries.
You don't necessarily need a Singleton for this, but putting it in one place will allow you to focus your efforts on things to improve it later, possibly caching, etc.
发布评论
评论(1)
创建一个包含访问集中式 XML 设置的类的库,并从其他库引用该库。
为此,您不一定需要单例,但将其放在一个地方将使您能够将精力集中在以后改进它的事情上,可能是缓存等。
Create one library containing the class(es) that access your centralized XML settings, and reference that library from the other libraries.
You don't necessarily need a Singleton for this, but putting it in one place will allow you to focus your efforts on things to improve it later, possibly caching, etc.