xml - How to categorize containers in Unity configuration file -
is possible apply category attribute container tag can later use retrieve containers?
i looking in config file:
<container name="example1" category="externalservice"> <container name="example2" category="externalservice"> <container name="example3" category="miscellaneous">
then in code want able like...
section.containers.where(c => c.category == "externalservice").tolist();
thanks!
i think can't. use kind of "namespace" categorize containers:
<container name="externalservice.example1"> <container name="externalservice.example2"> <container name="miscellaneous.example3">
and then:
section.containers .where(c => c.category.startswith("externalservice.")) .tolist();
Comments
Post a Comment