Mercurial > silverbladetech
view SilverlightExampleApp/SilverlightExampleApp.Interfaces/Services/ClientDataService.cs @ 63:536498832a79
Latest version before changing bindings to Listbox
author | Steven Hollidge <stevenhollidge@hotmail.com> |
---|---|
date | Sun, 22 Apr 2012 13:33:42 +0100 |
parents | 3591c26bd63e |
children |
line wrap: on
line source
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.17379 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ // // This code was auto-generated by SlSvcUtil, version 5.0.61118.0 // [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] [System.ServiceModel.ServiceContractAttribute(Namespace="", ConfigurationName="ClientDataService")] public interface ClientDataService { [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:ClientDataService/Get", ReplyAction="urn:ClientDataService/GetResponse")] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.ObjectModel.ObservableCollection<object>))] System.IAsyncResult BeginGet(int id, System.AsyncCallback callback, object asyncState); object EndGet(System.IAsyncResult result); [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:ClientDataService/GetAll", ReplyAction="urn:ClientDataService/GetAllResponse")] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.ObjectModel.ObservableCollection<object>))] System.IAsyncResult BeginGetAll(System.AsyncCallback callback, object asyncState); System.Collections.ObjectModel.ObservableCollection<object> EndGetAll(System.IAsyncResult result); [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:ClientDataService/Insert", ReplyAction="urn:ClientDataService/InsertResponse")] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.ObjectModel.ObservableCollection<object>))] System.IAsyncResult BeginInsert(object item, System.AsyncCallback callback, object asyncState); void EndInsert(System.IAsyncResult result); [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:ClientDataService/Update", ReplyAction="urn:ClientDataService/UpdateResponse")] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.ObjectModel.ObservableCollection<object>))] System.IAsyncResult BeginUpdate(object item, System.AsyncCallback callback, object asyncState); void EndUpdate(System.IAsyncResult result); [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="urn:ClientDataService/Delete", ReplyAction="urn:ClientDataService/DeleteResponse")] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.ObjectModel.ObservableCollection<object>))] System.IAsyncResult BeginDelete(object item, System.AsyncCallback callback, object asyncState); void EndDelete(System.IAsyncResult result); } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] public interface ClientDataServiceChannel : ClientDataService, System.ServiceModel.IClientChannel { } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] public partial class GetCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { private object[] results; public GetCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; } public object Result { get { base.RaiseExceptionIfNecessary(); return ((object)(this.results[0])); } } } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] public partial class GetAllCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { private object[] results; public GetAllCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : base(exception, cancelled, userState) { this.results = results; } public System.Collections.ObjectModel.ObservableCollection<object> Result { get { base.RaiseExceptionIfNecessary(); return ((System.Collections.ObjectModel.ObservableCollection<object>)(this.results[0])); } } } [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] public partial class ClientDataServiceClient : System.ServiceModel.ClientBase<ClientDataService>, ClientDataService, IClientDataServiceClient { private BeginOperationDelegate onBeginGetDelegate; private EndOperationDelegate onEndGetDelegate; private System.Threading.SendOrPostCallback onGetCompletedDelegate; private BeginOperationDelegate onBeginGetAllDelegate; private EndOperationDelegate onEndGetAllDelegate; private System.Threading.SendOrPostCallback onGetAllCompletedDelegate; private BeginOperationDelegate onBeginInsertDelegate; private EndOperationDelegate onEndInsertDelegate; private System.Threading.SendOrPostCallback onInsertCompletedDelegate; private BeginOperationDelegate onBeginUpdateDelegate; private EndOperationDelegate onEndUpdateDelegate; private System.Threading.SendOrPostCallback onUpdateCompletedDelegate; private BeginOperationDelegate onBeginDeleteDelegate; private EndOperationDelegate onEndDeleteDelegate; private System.Threading.SendOrPostCallback onDeleteCompletedDelegate; private BeginOperationDelegate onBeginOpenDelegate; private EndOperationDelegate onEndOpenDelegate; private System.Threading.SendOrPostCallback onOpenCompletedDelegate; private BeginOperationDelegate onBeginCloseDelegate; private EndOperationDelegate onEndCloseDelegate; private System.Threading.SendOrPostCallback onCloseCompletedDelegate; public ClientDataServiceClient() { } public ClientDataServiceClient(string endpointConfigurationName) : base(endpointConfigurationName) { } public ClientDataServiceClient(string endpointConfigurationName, string remoteAddress) : base(endpointConfigurationName, remoteAddress) { } public ClientDataServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : base(endpointConfigurationName, remoteAddress) { } public ClientDataServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : base(binding, remoteAddress) { } public System.Net.CookieContainer CookieContainer { get { System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>(); if ((httpCookieContainerManager != null)) { return httpCookieContainerManager.CookieContainer; } else { return null; } } set { System.ServiceModel.Channels.IHttpCookieContainerManager httpCookieContainerManager = this.InnerChannel.GetProperty<System.ServiceModel.Channels.IHttpCookieContainerManager>(); if ((httpCookieContainerManager != null)) { httpCookieContainerManager.CookieContainer = value; } else { throw new System.InvalidOperationException("Unable to set the CookieContainer. Please make sure the binding contains an HttpC" + "ookieContainerBindingElement."); } } } public event System.EventHandler<GetCompletedEventArgs> GetCompleted; public event System.EventHandler<GetAllCompletedEventArgs> GetAllCompleted; public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> InsertCompleted; public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> UpdateCompleted; public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> DeleteCompleted; public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> OpenCompleted; public event System.EventHandler<System.ComponentModel.AsyncCompletedEventArgs> CloseCompleted; [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.IAsyncResult ClientDataService.BeginGet(int id, System.AsyncCallback callback, object asyncState) { return base.Channel.BeginGet(id, callback, asyncState); } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] object ClientDataService.EndGet(System.IAsyncResult result) { return base.Channel.EndGet(result); } private System.IAsyncResult OnBeginGet(object[] inValues, System.AsyncCallback callback, object asyncState) { int id = ((int)(inValues[0])); return ((ClientDataService)(this)).BeginGet(id, callback, asyncState); } private object[] OnEndGet(System.IAsyncResult result) { object retVal = ((ClientDataService)(this)).EndGet(result); return new object[] { retVal}; } private void OnGetCompleted(object state) { if ((this.GetCompleted != null)) { InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); this.GetCompleted(this, new GetCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState)); } } public void GetAsync(int id) { this.GetAsync(id, null); } public void GetAsync(int id, object userState) { if ((this.onBeginGetDelegate == null)) { this.onBeginGetDelegate = new BeginOperationDelegate(this.OnBeginGet); } if ((this.onEndGetDelegate == null)) { this.onEndGetDelegate = new EndOperationDelegate(this.OnEndGet); } if ((this.onGetCompletedDelegate == null)) { this.onGetCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetCompleted); } base.InvokeAsync(this.onBeginGetDelegate, new object[] { id}, this.onEndGetDelegate, this.onGetCompletedDelegate, userState); } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.IAsyncResult ClientDataService.BeginGetAll(System.AsyncCallback callback, object asyncState) { return base.Channel.BeginGetAll(callback, asyncState); } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.Collections.ObjectModel.ObservableCollection<object> ClientDataService.EndGetAll(System.IAsyncResult result) { return base.Channel.EndGetAll(result); } private System.IAsyncResult OnBeginGetAll(object[] inValues, System.AsyncCallback callback, object asyncState) { return ((ClientDataService)(this)).BeginGetAll(callback, asyncState); } private object[] OnEndGetAll(System.IAsyncResult result) { System.Collections.ObjectModel.ObservableCollection<object> retVal = ((ClientDataService)(this)).EndGetAll(result); return new object[] { retVal}; } private void OnGetAllCompleted(object state) { if ((this.GetAllCompleted != null)) { InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); this.GetAllCompleted(this, new GetAllCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState)); } } public void GetAllAsync() { this.GetAllAsync(null); } public void GetAllAsync(object userState) { if ((this.onBeginGetAllDelegate == null)) { this.onBeginGetAllDelegate = new BeginOperationDelegate(this.OnBeginGetAll); } if ((this.onEndGetAllDelegate == null)) { this.onEndGetAllDelegate = new EndOperationDelegate(this.OnEndGetAll); } if ((this.onGetAllCompletedDelegate == null)) { this.onGetAllCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetAllCompleted); } base.InvokeAsync(this.onBeginGetAllDelegate, null, this.onEndGetAllDelegate, this.onGetAllCompletedDelegate, userState); } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.IAsyncResult ClientDataService.BeginInsert(object item, System.AsyncCallback callback, object asyncState) { return base.Channel.BeginInsert(item, callback, asyncState); } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] void ClientDataService.EndInsert(System.IAsyncResult result) { base.Channel.EndInsert(result); } private System.IAsyncResult OnBeginInsert(object[] inValues, System.AsyncCallback callback, object asyncState) { object item = ((object)(inValues[0])); return ((ClientDataService)(this)).BeginInsert(item, callback, asyncState); } private object[] OnEndInsert(System.IAsyncResult result) { ((ClientDataService)(this)).EndInsert(result); return null; } private void OnInsertCompleted(object state) { if ((this.InsertCompleted != null)) { InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); this.InsertCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState)); } } public void InsertAsync(object item) { this.InsertAsync(item, null); } public void InsertAsync(object item, object userState) { if ((this.onBeginInsertDelegate == null)) { this.onBeginInsertDelegate = new BeginOperationDelegate(this.OnBeginInsert); } if ((this.onEndInsertDelegate == null)) { this.onEndInsertDelegate = new EndOperationDelegate(this.OnEndInsert); } if ((this.onInsertCompletedDelegate == null)) { this.onInsertCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnInsertCompleted); } base.InvokeAsync(this.onBeginInsertDelegate, new object[] { item}, this.onEndInsertDelegate, this.onInsertCompletedDelegate, userState); } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.IAsyncResult ClientDataService.BeginUpdate(object item, System.AsyncCallback callback, object asyncState) { return base.Channel.BeginUpdate(item, callback, asyncState); } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] void ClientDataService.EndUpdate(System.IAsyncResult result) { base.Channel.EndUpdate(result); } private System.IAsyncResult OnBeginUpdate(object[] inValues, System.AsyncCallback callback, object asyncState) { object item = ((object)(inValues[0])); return ((ClientDataService)(this)).BeginUpdate(item, callback, asyncState); } private object[] OnEndUpdate(System.IAsyncResult result) { ((ClientDataService)(this)).EndUpdate(result); return null; } private void OnUpdateCompleted(object state) { if ((this.UpdateCompleted != null)) { InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); this.UpdateCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState)); } } public void UpdateAsync(object item) { this.UpdateAsync(item, null); } public void UpdateAsync(object item, object userState) { if ((this.onBeginUpdateDelegate == null)) { this.onBeginUpdateDelegate = new BeginOperationDelegate(this.OnBeginUpdate); } if ((this.onEndUpdateDelegate == null)) { this.onEndUpdateDelegate = new EndOperationDelegate(this.OnEndUpdate); } if ((this.onUpdateCompletedDelegate == null)) { this.onUpdateCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnUpdateCompleted); } base.InvokeAsync(this.onBeginUpdateDelegate, new object[] { item}, this.onEndUpdateDelegate, this.onUpdateCompletedDelegate, userState); } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] System.IAsyncResult ClientDataService.BeginDelete(object item, System.AsyncCallback callback, object asyncState) { return base.Channel.BeginDelete(item, callback, asyncState); } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] void ClientDataService.EndDelete(System.IAsyncResult result) { base.Channel.EndDelete(result); } private System.IAsyncResult OnBeginDelete(object[] inValues, System.AsyncCallback callback, object asyncState) { object item = ((object)(inValues[0])); return ((ClientDataService)(this)).BeginDelete(item, callback, asyncState); } private object[] OnEndDelete(System.IAsyncResult result) { ((ClientDataService)(this)).EndDelete(result); return null; } private void OnDeleteCompleted(object state) { if ((this.DeleteCompleted != null)) { InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); this.DeleteCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState)); } } public void DeleteAsync(object item) { this.DeleteAsync(item, null); } public void DeleteAsync(object item, object userState) { if ((this.onBeginDeleteDelegate == null)) { this.onBeginDeleteDelegate = new BeginOperationDelegate(this.OnBeginDelete); } if ((this.onEndDeleteDelegate == null)) { this.onEndDeleteDelegate = new EndOperationDelegate(this.OnEndDelete); } if ((this.onDeleteCompletedDelegate == null)) { this.onDeleteCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnDeleteCompleted); } base.InvokeAsync(this.onBeginDeleteDelegate, new object[] { item}, this.onEndDeleteDelegate, this.onDeleteCompletedDelegate, userState); } private System.IAsyncResult OnBeginOpen(object[] inValues, System.AsyncCallback callback, object asyncState) { return ((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(callback, asyncState); } private object[] OnEndOpen(System.IAsyncResult result) { ((System.ServiceModel.ICommunicationObject)(this)).EndOpen(result); return null; } private void OnOpenCompleted(object state) { if ((this.OpenCompleted != null)) { InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); this.OpenCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState)); } } public void OpenAsync() { this.OpenAsync(null); } public void OpenAsync(object userState) { if ((this.onBeginOpenDelegate == null)) { this.onBeginOpenDelegate = new BeginOperationDelegate(this.OnBeginOpen); } if ((this.onEndOpenDelegate == null)) { this.onEndOpenDelegate = new EndOperationDelegate(this.OnEndOpen); } if ((this.onOpenCompletedDelegate == null)) { this.onOpenCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnOpenCompleted); } base.InvokeAsync(this.onBeginOpenDelegate, null, this.onEndOpenDelegate, this.onOpenCompletedDelegate, userState); } private System.IAsyncResult OnBeginClose(object[] inValues, System.AsyncCallback callback, object asyncState) { return ((System.ServiceModel.ICommunicationObject)(this)).BeginClose(callback, asyncState); } private object[] OnEndClose(System.IAsyncResult result) { ((System.ServiceModel.ICommunicationObject)(this)).EndClose(result); return null; } private void OnCloseCompleted(object state) { if ((this.CloseCompleted != null)) { InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state)); this.CloseCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(e.Error, e.Cancelled, e.UserState)); } } public void CloseAsync() { this.CloseAsync(null); } public void CloseAsync(object userState) { if ((this.onBeginCloseDelegate == null)) { this.onBeginCloseDelegate = new BeginOperationDelegate(this.OnBeginClose); } if ((this.onEndCloseDelegate == null)) { this.onEndCloseDelegate = new EndOperationDelegate(this.OnEndClose); } if ((this.onCloseCompletedDelegate == null)) { this.onCloseCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnCloseCompleted); } base.InvokeAsync(this.onBeginCloseDelegate, null, this.onEndCloseDelegate, this.onCloseCompletedDelegate, userState); } protected override ClientDataService CreateChannel() { return new ClientDataServiceClientChannel(this); } private class ClientDataServiceClientChannel : ChannelBase<ClientDataService>, ClientDataService { public ClientDataServiceClientChannel(System.ServiceModel.ClientBase<ClientDataService> client) : base(client) { } public System.IAsyncResult BeginGet(int id, System.AsyncCallback callback, object asyncState) { object[] _args = new object[1]; _args[0] = id; System.IAsyncResult _result = base.BeginInvoke("Get", _args, callback, asyncState); return _result; } public object EndGet(System.IAsyncResult result) { object[] _args = new object[0]; object _result = ((object)(base.EndInvoke("Get", _args, result))); return _result; } public System.IAsyncResult BeginGetAll(System.AsyncCallback callback, object asyncState) { object[] _args = new object[0]; System.IAsyncResult _result = base.BeginInvoke("GetAll", _args, callback, asyncState); return _result; } public System.Collections.ObjectModel.ObservableCollection<object> EndGetAll(System.IAsyncResult result) { object[] _args = new object[0]; System.Collections.ObjectModel.ObservableCollection<object> _result = ((System.Collections.ObjectModel.ObservableCollection<object>)(base.EndInvoke("GetAll", _args, result))); return _result; } public System.IAsyncResult BeginInsert(object item, System.AsyncCallback callback, object asyncState) { object[] _args = new object[1]; _args[0] = item; System.IAsyncResult _result = base.BeginInvoke("Insert", _args, callback, asyncState); return _result; } public void EndInsert(System.IAsyncResult result) { object[] _args = new object[0]; base.EndInvoke("Insert", _args, result); } public System.IAsyncResult BeginUpdate(object item, System.AsyncCallback callback, object asyncState) { object[] _args = new object[1]; _args[0] = item; System.IAsyncResult _result = base.BeginInvoke("Update", _args, callback, asyncState); return _result; } public void EndUpdate(System.IAsyncResult result) { object[] _args = new object[0]; base.EndInvoke("Update", _args, result); } public System.IAsyncResult BeginDelete(object item, System.AsyncCallback callback, object asyncState) { object[] _args = new object[1]; _args[0] = item; System.IAsyncResult _result = base.BeginInvoke("Delete", _args, callback, asyncState); return _result; } public void EndDelete(System.IAsyncResult result) { object[] _args = new object[0]; base.EndInvoke("Delete", _args, result); } } }