The Resolver Manager (ResolverMgr) Class
Retired Content |
---|
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The ESB Dispatcher and DispatcherDisassemble pipeline components use the ResolverMgr class to perform resolution. The ESB dynamic transformation and dynamic delivery agents also use the ResolverManager class to perform just-in-time (JIT) resolution.
The ResolverMgr class is part of the project named ESB.Resolver.csproj, located in the \Source\Core\Source\ESB.Resolver** **folder. The ESB Guidance Core installer installs and registers the ResolverMgr class in the global assembly cache.
You can use this class within your own code where you need to perform dynamic resolution of endpoints or maps. You can also extend this class to use a custom resolution method. However, keep in mind that the class already supports a resolution mechanism that can use any custom resolver assembly, which should accommodate any alternative resolution algorithm you may require.
The following code shows how you can use the ResolverMgr class to resolve a map.
// Move to retrieve the first resolver
resolvers = itineraryStep.ResolverCollection;
resolver = resolvers.Current;
// Pass the resolver configuration to the Resolver manager for resolution
resolverDictionary = Microsoft.Practices.ESB.Resolver.ResolverMgr.Resolve(
InboundMessage, resolver);
// set transport properties
transportLocation = resolverDictionary.Item("Resolver.TransportLocation");
transportType = resolverDictionary.Item("Resolver.TransportType");
Your resolver connection string will usually specify the property values for at least one resolution method, such as a rules policy, custom assembly, XPath statement, or UDDI label and server name. Finally, it returns a dictionary object with a collection of resolver facts, which can be easily populated with custom facts from a concrete resolver.
For more information about how the ESB resolution mechanism works, see Using Dynamic Resolution and Routing.