Yup, it didn't work. Unfortunately, WCF treats
InstanceContextMode.SingleCall a little differently and actualy tries to
create an instance up front using default constructor (not container). I
added a work around for this, but unfortunately you must have a default
constructor.
thanks,
craig
On Tue, Dec 2, 2008 at 5:09 PM, ppcanodehuelva <[EMAIL PROTECTED]>wrote:
>
> By making some tests, i found a problem, which i don't know whether is
> the normal behavior or a bug on the version in the trunk.
>
> I have a service like that:
>
> [ServiceBehavior(
> InstanceContextMode = InstanceContextMode.Single,
> )]
> public class LogbookService:ILogbookContract
> {
> ILogger logger = NullLogger.Instance;
> public ILogger Logger
> {
> get { return logger; }
> set { logger = value; }
> }
> ..................................
> }
>
> When the component is registered on the container it gets well the
> facility.
>
> Assert.IsInstanceOfType(typeof(ConsoleLogger), ((LogbookService)
> _container["logbookservice"]).Logger);
>
> But when a client calls the service, the Logger property is still
> NullLogger.
>
>
> Regards
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Development List" 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-devel?hl=en
-~----------~----~----~----~------~----~------~--~---