Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var p = new MyServiceClient(new CustomBinding(b), new EndpointAddress(uri));
- var result = p.Execute(); // Don't Dispose proxy or you'll lose the actual exception.
- try {
- return result.Values;
- } finally {
- if (p.State != CommunicationState.Closed) {
- if (p.State != CommunicationState.Faulted) {
- p.Close();
- } else {
- p.Abort();
- }
- }
- }
- var p = new MyServiceClient(new CustomBinding(b), new EndpointAddress(uri));
- var result = p.Execute(); // Don't Dispose proxy or you'll lose the actual exception.
- try {
- return result.Values;
- } finally {
- if (p.State != CommunicationState.Closed) {
- if (p.State != CommunicationState.Faulted) {
- p.Close();
- } else {
- p.Abort();
- }
- }
- }
Add Comment
Please, Sign In to add comment