void PageConstructor()
{
UIService.UIServiceClient myService=GetUIService();
myServices.Completed.... += CompletedEvent(....);
}
void PageLoad(....)
{
myService.Async...();
}
public static UIService.UIServiceClient GetUIService()
{
var uri = new Uri(Application.Current.Host.Source, "../SLServices/UIService.svc");
return new UIService.UIServiceClient("CustomBinding_IUIService", uri.AbsoluteUri);
}
Also read WCF is Singleton if you want to understand why I put this code in the constructor.
No comments:
Post a Comment