C# Question

How can I get all the object identifiers from Spring context?

In a project I am using Spring.NET and I have a unit test where I want to get from the Spring context all the identifiers of the objects.

How can I do such a thing?

At the moment I have a private array of string identifiers.

What I want to do is to build the array dynamically and not maintaining it whenever I change something in the Spring configuration.

I know there is the following method:

applicationContext.GetObject(id);


which gets an object from the context by id.

How can I take all the ids of the context in order to build the array dynamically?

Thank you.

Answer Source

People I have found the answer.

There is a GetObjectDefinitionNames method which returns all object names.

Thank you.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download