[en] Constructor Parameters (solved)

Topics: Technical Support
Jul 13, 2011 at 7:32 AM

Hi there, i am playing around with Zyan lately and i have to say you've done great job, thanks for sharing with us. :)

Now the question, how can i register an object that has constructor parameters?!?

Thanks in advance Geo

Jul 13, 2011 at 12:45 PM

Hi, Geo!

Thanks for your interest.

You can register component factory:

using (var host = new ZyanComponentHost("Sample", port))
	host.RegisterComponent<IService>(() => new Service(arg1, arg2, ...));

Regards, yallie