/// <summary> /// Initializes a new instance of the <see cref="EmployeeController"/> class. /// </summary> /// <param name="_serviceClient"> /// The _service client. /// </param> public EmployeeWCFController(IEmployeeBoService _serviceClient) { var orginalservice=_serviceClient as ServicePoxry.AWServiceReference.EmployeeBoServiceClient; orginalservice.ClientCredentials.UserName.UserName = "******"; orginalservice.ClientCredentials.UserName.Password = "******"; orginalservice.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode =System.ServiceModel.Security.X509CertificateValidationMode.None; this.serviceClient = orginalservice; }
/// <summary> /// Initializes a new instance of the <see cref="EmployeeController"/> class. /// </summary> /// <param name="_serviceClient"> /// The _service client. /// </param> public EmployeeWCFController(IEmployeeBoService _serviceClient) { var orginalservice = _serviceClient as ServicePoxry.AWServiceReference.EmployeeBoServiceClient; orginalservice.ClientCredentials.UserName.UserName = "******"; orginalservice.ClientCredentials.UserName.Password = "******"; orginalservice.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None; this.serviceClient = orginalservice; }
/// <summary> /// The get employee controller. /// </summary> /// <param name="service"> /// The service. /// </param> /// <returns> /// Employee Controller /// </returns> private static EmployeeWCFController GetEmployeeController(IEmployeeBoService service) { var controller = new EmployeeWCFController(service); controller.ControllerContext = new ControllerContext { Controller = controller, RequestContext = new RequestContext(new MockHttpContext(), new RouteData()) }; return(controller); }
/// <summary> /// Initializes a new instance of the <see cref="EmployeeController"/> class. /// </summary> /// <param name="_serviceClient"> /// The _service client. /// </param> public EmployeeWCFController(IEmployeeBoService _serviceClient) { this.serviceClient = _serviceClient; }
/// <summary> /// The get employee controller. /// </summary> /// <param name="service"> /// The service. /// </param> /// <returns> /// Employee Controller /// </returns> private static EmployeeController GetEmployeeController(IEmployeeBoService service) { var controller = new EmployeeController(service); controller.ControllerContext = new ControllerContext { Controller = controller, RequestContext = new RequestContext(new MockHttpContext(), new RouteData()) }; return controller; }