Actually, I wanted a way to register many NHibernate session factories tied their corresponding configuration,mapped classes, and other session factory related info. So if I register a session factory with the key "s1", the configuration will be registered with "s1.config", then In a method where I have reference to the kernel and the session factory I can get its configuration. Maybe theres an easier way to do that, but I dont know much about nhibernate so thats the only thing I can think of.
2010/5/11 Krzysztof Koźmic (2) <[email protected]>: > no, you can't. You get just the object. Why would you want its key? > > On 11 Maj, 15:42, Thiago de Arruda <[email protected]> wrote: >> If I register a component : >> >> kernel.AddComponentInstance("key", someComponent); >> >> If I get a reference to 'someComponent' on another method, can I get >> its corresponding kernel key? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Castle Project Users" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group >> athttp://groups.google.com/group/castle-project-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Castle Project Users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/castle-project-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.
