| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- //------------------------------------------------------------------------------
- // <auto-generated>
- // This code was generated by a tool.
- // Runtime Version:2.0.50727.1433
- //
- // Changes to this file may cause incorrect behavior and will be lost if
- // the code is regenerated.
- // </auto-generated>
- //------------------------------------------------------------------------------
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace Proxy.MonoTests.Features.Client
- {
- [System.CodeDom.Compiler.GeneratedCodeAttribute ("System.ServiceModel", "3.0.0.0")]
- [System.ServiceModel.ServiceContractAttribute (Namespace = "http://MonoTests.Features.Contracts", ConfigurationName = "IAsyncCallTesterContract")]
- public interface IAsyncCallTesterContract
- {
- [System.ServiceModel.OperationContractAttribute(Action = "http://MonoTests.Features.Contracts/IAsyncCallTesterContract/Query", ReplyAction = "http://MonoTests.Features.Contracts/IAsyncCallTesterContract/QueryResponse")]
- string Query (string query);
- [System.ServiceModel.OperationContractAttribute(AsyncPattern = true, Action = "http://MonoTests.Features.Contracts/IAsyncCallTesterContract/Query", ReplyAction = "http://MonoTests.Features.Contracts/IAsyncCallTesterContract/QueryResponse")]
- System.IAsyncResult BeginQuery (string query, System.AsyncCallback callback, object asyncState);
- string EndQuery (System.IAsyncResult result);
- }
- [System.CodeDom.Compiler.GeneratedCodeAttribute ("System.ServiceModel", "3.0.0.0")]
- public interface IAsyncCallTesterContractChannel : IAsyncCallTesterContract, System.ServiceModel.IClientChannel
- {
- }
- [System.Diagnostics.DebuggerStepThroughAttribute ()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute ("System.ServiceModel", "3.0.0.0")]
- public partial class QueryCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
- {
- private object [] results;
- public QueryCompletedEventArgs (object [] results, System.Exception exception, bool cancelled, object userState) :
- base (exception, cancelled, userState)
- {
- this.results = results;
- }
- public string Result
- {
- get
- {
- base.RaiseExceptionIfNecessary ();
- return ((string) (this.results [0]));
- }
- }
- }
- [System.Diagnostics.DebuggerStepThroughAttribute ()]
- [System.CodeDom.Compiler.GeneratedCodeAttribute ("System.ServiceModel", "3.0.0.0")]
- public partial class AsyncCallTesterContractClient : System.ServiceModel.ClientBase<IAsyncCallTesterContract>, IAsyncCallTesterContract
- {
- private BeginOperationDelegate onBeginQueryDelegate;
- private EndOperationDelegate onEndQueryDelegate;
- private System.Threading.SendOrPostCallback onQueryCompletedDelegate;
- public AsyncCallTesterContractClient ()
- {
- }
- public AsyncCallTesterContractClient (string endpointConfigurationName) :
- base (endpointConfigurationName)
- {
- }
- public AsyncCallTesterContractClient (string endpointConfigurationName, string remoteAddress) :
- base (endpointConfigurationName, remoteAddress)
- {
- }
- public AsyncCallTesterContractClient (string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
- base (endpointConfigurationName, remoteAddress)
- {
- }
- public AsyncCallTesterContractClient (System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
- base (binding, remoteAddress)
- {
- }
- public event System.EventHandler<QueryCompletedEventArgs> QueryCompleted;
- public string Query (string query)
- {
- return base.Channel.Query (query);
- }
- [System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState.Advanced)]
- public System.IAsyncResult BeginQuery (string query, System.AsyncCallback callback, object asyncState)
- {
- return base.Channel.BeginQuery (query, callback, asyncState);
- }
- [System.ComponentModel.EditorBrowsableAttribute (System.ComponentModel.EditorBrowsableState.Advanced)]
- public string EndQuery (System.IAsyncResult result)
- {
- return base.Channel.EndQuery (result);
- }
- private System.IAsyncResult OnBeginQuery (object [] inValues, System.AsyncCallback callback, object asyncState)
- {
- string s = ((string) (inValues [0]));
- return this.BeginQuery (s, callback, asyncState);
- }
- private object [] OnEndQuery (System.IAsyncResult result)
- {
- string retVal = this.EndQuery (result);
- return new object [] {
- retVal};
- }
- private void OnQueryCompleted (object state)
- {
- System.EventHandler<QueryCompletedEventArgs> handler = this.QueryCompleted;
- if ((handler != null)) {
- InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs) (state));
- handler (this, new QueryCompletedEventArgs (e.Results, e.Error, e.Cancelled, e.UserState));
- }
- }
- public void QueryAsync (string query)
- {
- this.QueryAsync (query, null);
- }
- public void QueryAsync (string query, object userState)
- {
- if ((this.onBeginQueryDelegate == null)) {
- this.onBeginQueryDelegate = new BeginOperationDelegate (this.OnBeginQuery);
- }
- if ((this.onEndQueryDelegate == null)) {
- this.onEndQueryDelegate = new EndOperationDelegate (this.OnEndQuery);
- }
- if ((this.onQueryCompletedDelegate == null)) {
- this.onQueryCompletedDelegate = new System.Threading.SendOrPostCallback (this.OnQueryCompleted);
- }
- base.InvokeAsync (this.onBeginQueryDelegate, new object [] {
- query}, this.onEndQueryDelegate, this.onQueryCompletedDelegate, userState);
- }
- }
- }
|