public AuthenticationService.AuthenticationServiceClient GetAuthenticationClient(ILoginSettings loginSettings) { var client = new AuthenticationService.AuthenticationServiceClient(); client.Endpoint.Address = new EndpointAddress(_appSettings.AuthenticationServiceUri); if (client.Endpoint.Behaviors.Find <EndpointBehavior>() == null && loginSettings != null) { var customBehavior = new EndpointBehavior(loginSettings.UserName, loginSettings.Password, loginSettings.CustomerId); client.Endpoint.Behaviors.Add(customBehavior); } return(client); }
public TrexPortalService.TrexSlServiceClient GetServiceClient(ILoginSettings loginSettings) { var client = new TrexPortalService.TrexSlServiceClient(); client.Endpoint.Address = new EndpointAddress(_appSettings.TrexWcfServiceEndpointUri); if (client.Endpoint.Behaviors.Find <EndpointBehavior>() == null && loginSettings != null) { var customBehavior = new EndpointBehavior(loginSettings.UserName, loginSettings.Password, loginSettings.CustomerId); client.Endpoint.Behaviors.Add(customBehavior); } return(client); }
public void SetOnReceive(EndpointBehavior behavior) { Shaft.Behavior = behavior; Clients.onReceiveChanged(behavior); }