I would like to create a windows form application,
But I would like this widows form should host WCF server so other application will be able to communicate with this windows application.
So I add to the windows application project interface for the WCF contract and add also class that implement this interface.
Now on the windows form application constructor I add
ServiceHost calcHost = new ServiceHost(typeof(Service));
calcHost.Open();
and now I need to implement that the WCF methods will be able to interact with the windows form.
I was unable to do that.
My question is – is my architecture is correct or should I need to create the WCF differently if it ok, how should the WCF will interact with the windows form application?