private async void LoadButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                FakeServiceReference.FakeServiceClient svc = new FakeServiceReference.FakeServiceClient();

                FakeServiceReference.SimpleAppointment appointment = await svc.GetSimpleAppointmentAsync();

                SubjectTextBox.Text  = appointment.Subject;
                LocationTextBox.Text = appointment.Location;
                StartDatePicker.Date = appointment.StartDate;
                EndDatePicker.Date   = appointment.EndDate;
            }
            catch
            {
                ResultTextBlock.Text = "Oops! Something went wrong!";
            }
        }
Exemple #2
0
 private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
 {
     return(FakeServiceClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_IFakeService));
 }
Exemple #3
0
 private static System.ServiceModel.Channels.Binding GetDefaultBinding()
 {
     return(FakeServiceClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_IFakeService));
 }
Exemple #4
0
 public FakeServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
     base(FakeServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Exemple #5
0
 public FakeServiceClient(EndpointConfiguration endpointConfiguration) :
     base(FakeServiceClient.GetBindingForEndpoint(endpointConfiguration), FakeServiceClient.GetEndpointAddress(endpointConfiguration))
 {
     this.Endpoint.Name = endpointConfiguration.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }
Exemple #6
0
 public FakeServiceClient() :
     base(FakeServiceClient.GetDefaultBinding(), FakeServiceClient.GetDefaultEndpointAddress())
 {
     this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_IFakeService.ToString();
     ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
 }