Ejemplo n.º 1
0
        public ActionResult Index()
        {
            ServiceReference1.ServicePCClient pc =
                new ServiceReference1.ServicePCClient();
            Task <Post> post = pc.GetPostByIdAsync(1);

            return(View(post));
        }
Ejemplo n.º 2
0
 private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
 {
     return(ServicePCClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_IServicePC));
 }
Ejemplo n.º 3
0
 private static System.ServiceModel.Channels.Binding GetDefaultBinding()
 {
     return(ServicePCClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_IServicePC));
 }
Ejemplo n.º 4
0
 public ServicePCClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
     base(ServicePCClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Ejemplo n.º 5
0
 public ServicePCClient(EndpointConfiguration endpointConfiguration) :
     base(ServicePCClient.GetBindingForEndpoint(endpointConfiguration), ServicePCClient.GetEndpointAddress(endpointConfiguration))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Ejemplo n.º 6
0
 public ServicePCClient() :
     base(ServicePCClient.GetDefaultBinding(), ServicePCClient.GetDefaultEndpointAddress())
 {
     this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_IServicePC.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }