can't you add it to an existing NH Configuration?

--  
Krzysztof Kozmic


On Tuesday, 2 April 2013 at 3:21 AM, Johny wrote:

> Hello,
> For example I registered a NH configuration, and I want to add new mapping 
> files. How do I replace a Configuration object which already registered in 
> container?
>  
>  
> On Tuesday, February 22, 2011 9:41:30 AM UTC+7, Krzysztof Koźmic wrote:
> > Why would you replace a component instead of using the other value in the 
> > first  place?
> >  
> > What do you mean by "the service is not available anymore"?
> >  
> > K
> >  
> > On 22/02/2011 11:17 AM, Belvasis wrote:  
> > > I remove the component from the container for instance if i have to 
> > > register a different implementation or configuration for a service
> > > during runtime or the service is not available anymore etc. and i thought 
> > > remove/register would be an easy way to do that.
> > > In the current case i'm just a little confused because it ever worked 
> > > without any problem, even with the current code. In the moment
> > > i call RemoveComponent, there is no other component that depends on it. 
> > > But maybe i just can't see it.  
> > > Anyway,i think in this case i can avoid the use of RemoveComponent by 
> > > using a factory method instead.  
> > >  
> > >  
> > >  
> > > 2011/2/22 Krzysztof Koźmic <krzyszto...@gmail.com (javascript:)>
> > > > That's how it works. RemoveComponent will only remove the component 
> > > > when it's safe to do so, i.e. no other component depends on it.
> > > >  
> > > > Why are you removing the component from the container?
> > > >  
> > > > I'm asking because I want to remove that functionality from the 
> > > > container altogether i.e. not allow to remove components once they are 
> > > > registered.  
> > > >  
> > > >  
> > > >  
> > > >  
> > > > On 22/02/2011 9:52 AM, belvasis.de (http://belvasis.de)@googlemail.com 
> > > > (http://googlemail.com) wrote:
> > > > > Hi,
> > > > >  
> > > > > i have a behaviour that is very strange. I use the following to 
> > > > > Remove a registration from the
> > > > > Container:
> > > > >  
> > > > > if (m_pContainer.Kernel.HasComponent(i_strKey))
> > > > > {
> > > > > m_pContainer.Kernel.RemoveComponent(i_strKey);
> > > > > }
> > > > >  
> > > > > This works in most cases. But sometimes HasComponent is true for the 
> > > > > given i_strKey and i
> > > > > can see the component when inspecting the Kernel. After the call to 
> > > > > RemoveComponent,
> > > > > the result is still the same...the component with the i_strKey name 
> > > > > is sill there. So the next time
> > > > > i want to register a component with the i_strKey name, an exception 
> > > > > is thrown.
> > > > > Has anyone an idea why this happens and what i can do?
> > > > >  
> > > > > Thanks and Regards
> > > > >  
> > > > > B --
> > > > > You received this message because you are subscribed to the Google 
> > > > > Groups "Castle Project Users" group.
> > > > > To post to this group, send email to castle-pro...@googlegroups.com 
> > > > > (javascript:).
> > > > > To unsubscribe from this group, send email to 
> > > > > castle-project-users+unsubscr...@googlegroups.com (javascript:).
> > > > > 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 castle-pro...@googlegroups.com 
> > > > (javascript:).
> > > > To unsubscribe from this group, send email to 
> > > > castle-project-users+unsubscr...@googlegroups.com (javascript:).
> > > > 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 castle-pro...@googlegroups.com 
> > > (javascript:).
> > > To unsubscribe from this group, send email to 
> > > castle-project-users+unsubscr...@googlegroups.com (javascript:).
> > > 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 unsubscribe from this group and stop receiving emails from it, send an 
> email to castle-project-users+unsubscr...@googlegroups.com 
> (mailto:castle-project-users+unsubscr...@googlegroups.com).
> To post to this group, send email to castle-project-users@googlegroups.com 
> (mailto:castle-project-users@googlegroups.com).
> Visit this group at http://groups.google.com/group/castle-project-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>   
>   

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to castle-project-users+unsubscr...@googlegroups.com.
To post to this group, send email to castle-project-users@googlegroups.com.
Visit this group at http://groups.google.com/group/castle-project-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to