Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/20/09 13:56:55 (15 years ago)
Author:
kgrading
Message:

splitted the sendfinishedjob / snapshot method in two seperate methods, fixed the locking, added real memory management (#529)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Client.Communication/Service References/ServerService/Reference.cs

    r1366 r1379  
    2020        [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponseJob))]
    2121        [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponseResultReceived))]
     22        [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponsePlugin))]
    2223        HeuristicLab.Hive.Contracts.Response Login(HeuristicLab.Hive.Contracts.BusinessObjects.ClientInfo clientInfo);
    2324       
     
    4344        HeuristicLab.Hive.Contracts.ResponseJob EndSendJob(System.IAsyncResult result);
    4445       
    45         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientCommunicator/ProcessJobResult", ReplyAction="http://tempuri.org/IClientCommunicator/ProcessJobResultResponse")]
    46         HeuristicLab.Hive.Contracts.ResponseResultReceived ProcessJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, bool finished);
    47        
    48         [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IClientCommunicator/ProcessJobResult", ReplyAction="http://tempuri.org/IClientCommunicator/ProcessJobResultResponse")]
    49         System.IAsyncResult BeginProcessJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, bool finished, System.AsyncCallback callback, object asyncState);
    50        
    51         HeuristicLab.Hive.Contracts.ResponseResultReceived EndProcessJobResult(System.IAsyncResult result);
     46        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientCommunicator/StoreFinishedJobResult", ReplyAction="http://tempuri.org/IClientCommunicator/StoreFinishedJobResultResponse")]
     47        HeuristicLab.Hive.Contracts.ResponseResultReceived StoreFinishedJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception);
     48       
     49        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IClientCommunicator/StoreFinishedJobResult", ReplyAction="http://tempuri.org/IClientCommunicator/StoreFinishedJobResultResponse")]
     50        System.IAsyncResult BeginStoreFinishedJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, System.AsyncCallback callback, object asyncState);
     51       
     52        HeuristicLab.Hive.Contracts.ResponseResultReceived EndStoreFinishedJobResult(System.IAsyncResult result);
     53       
     54        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientCommunicator/ProcessSnapshot", ReplyAction="http://tempuri.org/IClientCommunicator/ProcessSnapshotResponse")]
     55        HeuristicLab.Hive.Contracts.ResponseResultReceived ProcessSnapshot(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception);
     56       
     57        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IClientCommunicator/ProcessSnapshot", ReplyAction="http://tempuri.org/IClientCommunicator/ProcessSnapshotResponse")]
     58        System.IAsyncResult BeginProcessSnapshot(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, System.AsyncCallback callback, object asyncState);
     59       
     60        HeuristicLab.Hive.Contracts.ResponseResultReceived EndProcessSnapshot(System.IAsyncResult result);
    5261       
    5362        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientCommunicator/Logout", ReplyAction="http://tempuri.org/IClientCommunicator/LogoutResponse")]
     
    5564        [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponseJob))]
    5665        [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponseResultReceived))]
     66        [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponsePlugin))]
    5767        HeuristicLab.Hive.Contracts.Response Logout(System.Guid clientId);
    5868       
     
    6171       
    6272        HeuristicLab.Hive.Contracts.Response EndLogout(System.IAsyncResult result);
     73       
     74        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientCommunicator/IsJobStillNeeded", ReplyAction="http://tempuri.org/IClientCommunicator/IsJobStillNeededResponse")]
     75        [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponseHB))]
     76        [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponseJob))]
     77        [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponseResultReceived))]
     78        [System.ServiceModel.ServiceKnownTypeAttribute(typeof(HeuristicLab.Hive.Contracts.ResponsePlugin))]
     79        HeuristicLab.Hive.Contracts.Response IsJobStillNeeded(long jobId);
     80       
     81        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IClientCommunicator/IsJobStillNeeded", ReplyAction="http://tempuri.org/IClientCommunicator/IsJobStillNeededResponse")]
     82        System.IAsyncResult BeginIsJobStillNeeded(long jobId, System.AsyncCallback callback, object asyncState);
     83       
     84        HeuristicLab.Hive.Contracts.Response EndIsJobStillNeeded(System.IAsyncResult result);
     85       
     86        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IClientCommunicator/SendPlugins", ReplyAction="http://tempuri.org/IClientCommunicator/SendPluginsResponse")]
     87        HeuristicLab.Hive.Contracts.ResponsePlugin SendPlugins(string[] pluginList);
     88       
     89        [System.ServiceModel.OperationContractAttribute(AsyncPattern=true, Action="http://tempuri.org/IClientCommunicator/SendPlugins", ReplyAction="http://tempuri.org/IClientCommunicator/SendPluginsResponse")]
     90        System.IAsyncResult BeginSendPlugins(string[] pluginList, System.AsyncCallback callback, object asyncState);
     91       
     92        HeuristicLab.Hive.Contracts.ResponsePlugin EndSendPlugins(System.IAsyncResult result);
    6393    }
    6494   
     
    126156    [System.Diagnostics.DebuggerStepThroughAttribute()]
    127157    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    128     public partial class ProcessJobResultCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
     158    public partial class StoreFinishedJobResultCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    129159       
    130160        private object[] results;
    131161       
    132         public ProcessJobResultCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
     162        public StoreFinishedJobResultCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
    133163                base(exception, cancelled, userState) {
    134164            this.results = results;
     
    145175    [System.Diagnostics.DebuggerStepThroughAttribute()]
    146176    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
     177    public partial class ProcessSnapshotCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
     178       
     179        private object[] results;
     180       
     181        public ProcessSnapshotCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
     182                base(exception, cancelled, userState) {
     183            this.results = results;
     184        }
     185       
     186        public HeuristicLab.Hive.Contracts.ResponseResultReceived Result {
     187            get {
     188                base.RaiseExceptionIfNecessary();
     189                return ((HeuristicLab.Hive.Contracts.ResponseResultReceived)(this.results[0]));
     190            }
     191        }
     192    }
     193   
     194    [System.Diagnostics.DebuggerStepThroughAttribute()]
     195    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    147196    public partial class LogoutCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    148197       
     
    164213    [System.Diagnostics.DebuggerStepThroughAttribute()]
    165214    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
     215    public partial class IsJobStillNeededCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
     216       
     217        private object[] results;
     218       
     219        public IsJobStillNeededCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
     220                base(exception, cancelled, userState) {
     221            this.results = results;
     222        }
     223       
     224        public HeuristicLab.Hive.Contracts.Response Result {
     225            get {
     226                base.RaiseExceptionIfNecessary();
     227                return ((HeuristicLab.Hive.Contracts.Response)(this.results[0]));
     228            }
     229        }
     230    }
     231   
     232    [System.Diagnostics.DebuggerStepThroughAttribute()]
     233    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
     234    public partial class SendPluginsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
     235       
     236        private object[] results;
     237       
     238        public SendPluginsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
     239                base(exception, cancelled, userState) {
     240            this.results = results;
     241        }
     242       
     243        public HeuristicLab.Hive.Contracts.ResponsePlugin Result {
     244            get {
     245                base.RaiseExceptionIfNecessary();
     246                return ((HeuristicLab.Hive.Contracts.ResponsePlugin)(this.results[0]));
     247            }
     248        }
     249    }
     250   
     251    [System.Diagnostics.DebuggerStepThroughAttribute()]
     252    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    166253    public partial class ClientCommunicatorClient : System.ServiceModel.ClientBase<HeuristicLab.Hive.Client.Communication.ServerService.IClientCommunicator>, HeuristicLab.Hive.Client.Communication.ServerService.IClientCommunicator {
    167254       
     
    184271        private System.Threading.SendOrPostCallback onSendJobCompletedDelegate;
    185272       
    186         private BeginOperationDelegate onBeginProcessJobResultDelegate;
    187        
    188         private EndOperationDelegate onEndProcessJobResultDelegate;
    189        
    190         private System.Threading.SendOrPostCallback onProcessJobResultCompletedDelegate;
     273        private BeginOperationDelegate onBeginStoreFinishedJobResultDelegate;
     274       
     275        private EndOperationDelegate onEndStoreFinishedJobResultDelegate;
     276       
     277        private System.Threading.SendOrPostCallback onStoreFinishedJobResultCompletedDelegate;
     278       
     279        private BeginOperationDelegate onBeginProcessSnapshotDelegate;
     280       
     281        private EndOperationDelegate onEndProcessSnapshotDelegate;
     282       
     283        private System.Threading.SendOrPostCallback onProcessSnapshotCompletedDelegate;
    191284       
    192285        private BeginOperationDelegate onBeginLogoutDelegate;
     
    195288       
    196289        private System.Threading.SendOrPostCallback onLogoutCompletedDelegate;
     290       
     291        private BeginOperationDelegate onBeginIsJobStillNeededDelegate;
     292       
     293        private EndOperationDelegate onEndIsJobStillNeededDelegate;
     294       
     295        private System.Threading.SendOrPostCallback onIsJobStillNeededCompletedDelegate;
     296       
     297        private BeginOperationDelegate onBeginSendPluginsDelegate;
     298       
     299        private EndOperationDelegate onEndSendPluginsDelegate;
     300       
     301        private System.Threading.SendOrPostCallback onSendPluginsCompletedDelegate;
    197302       
    198303        public ClientCommunicatorClient() {
     
    221326        public event System.EventHandler<SendJobCompletedEventArgs> SendJobCompleted;
    222327       
    223         public event System.EventHandler<ProcessJobResultCompletedEventArgs> ProcessJobResultCompleted;
     328        public event System.EventHandler<StoreFinishedJobResultCompletedEventArgs> StoreFinishedJobResultCompleted;
     329       
     330        public event System.EventHandler<ProcessSnapshotCompletedEventArgs> ProcessSnapshotCompleted;
    224331       
    225332        public event System.EventHandler<LogoutCompletedEventArgs> LogoutCompleted;
     333       
     334        public event System.EventHandler<IsJobStillNeededCompletedEventArgs> IsJobStillNeededCompleted;
     335       
     336        public event System.EventHandler<SendPluginsCompletedEventArgs> SendPluginsCompleted;
    226337       
    227338        public HeuristicLab.Hive.Contracts.Response Login(HeuristicLab.Hive.Contracts.BusinessObjects.ClientInfo clientInfo) {
     
    375486        }
    376487       
    377         public HeuristicLab.Hive.Contracts.ResponseResultReceived ProcessJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, bool finished) {
    378             return base.Channel.ProcessJobResult(clientId, jobId, result, percentage, exception, finished);
    379         }
    380        
    381         [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    382         public System.IAsyncResult BeginProcessJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, bool finished, System.AsyncCallback callback, object asyncState) {
    383             return base.Channel.BeginProcessJobResult(clientId, jobId, result, percentage, exception, finished, callback, asyncState);
    384         }
    385        
    386         [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    387         public HeuristicLab.Hive.Contracts.ResponseResultReceived EndProcessJobResult(System.IAsyncResult result) {
    388             return base.Channel.EndProcessJobResult(result);
    389         }
    390        
    391         private System.IAsyncResult OnBeginProcessJobResult(object[] inValues, System.AsyncCallback callback, object asyncState) {
     488        public HeuristicLab.Hive.Contracts.ResponseResultReceived StoreFinishedJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception) {
     489            return base.Channel.StoreFinishedJobResult(clientId, jobId, result, percentage, exception);
     490        }
     491       
     492        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
     493        public System.IAsyncResult BeginStoreFinishedJobResult(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, System.AsyncCallback callback, object asyncState) {
     494            return base.Channel.BeginStoreFinishedJobResult(clientId, jobId, result, percentage, exception, callback, asyncState);
     495        }
     496       
     497        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
     498        public HeuristicLab.Hive.Contracts.ResponseResultReceived EndStoreFinishedJobResult(System.IAsyncResult result) {
     499            return base.Channel.EndStoreFinishedJobResult(result);
     500        }
     501       
     502        private System.IAsyncResult OnBeginStoreFinishedJobResult(object[] inValues, System.AsyncCallback callback, object asyncState) {
    392503            System.Guid clientId = ((System.Guid)(inValues[0]));
    393504            long jobId = ((long)(inValues[1]));
     
    395506            double percentage = ((double)(inValues[3]));
    396507            System.Exception exception = ((System.Exception)(inValues[4]));
    397             bool finished = ((bool)(inValues[5]));
    398             return this.BeginProcessJobResult(clientId, jobId, result, percentage, exception, finished, callback, asyncState);
    399         }
    400        
    401         private object[] OnEndProcessJobResult(System.IAsyncResult result) {
    402             HeuristicLab.Hive.Contracts.ResponseResultReceived retVal = this.EndProcessJobResult(result);
     508            return this.BeginStoreFinishedJobResult(clientId, jobId, result, percentage, exception, callback, asyncState);
     509        }
     510       
     511        private object[] OnEndStoreFinishedJobResult(System.IAsyncResult result) {
     512            HeuristicLab.Hive.Contracts.ResponseResultReceived retVal = this.EndStoreFinishedJobResult(result);
    403513            return new object[] {
    404514                    retVal};
    405515        }
    406516       
    407         private void OnProcessJobResultCompleted(object state) {
    408             if ((this.ProcessJobResultCompleted != null)) {
     517        private void OnStoreFinishedJobResultCompleted(object state) {
     518            if ((this.StoreFinishedJobResultCompleted != null)) {
    409519                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
    410                 this.ProcessJobResultCompleted(this, new ProcessJobResultCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
    411             }
    412         }
    413        
    414         public void ProcessJobResultAsync(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, bool finished) {
    415             this.ProcessJobResultAsync(clientId, jobId, result, percentage, exception, finished, null);
    416         }
    417        
    418         public void ProcessJobResultAsync(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, bool finished, object userState) {
    419             if ((this.onBeginProcessJobResultDelegate == null)) {
    420                 this.onBeginProcessJobResultDelegate = new BeginOperationDelegate(this.OnBeginProcessJobResult);
    421             }
    422             if ((this.onEndProcessJobResultDelegate == null)) {
    423                 this.onEndProcessJobResultDelegate = new EndOperationDelegate(this.OnEndProcessJobResult);
    424             }
    425             if ((this.onProcessJobResultCompletedDelegate == null)) {
    426                 this.onProcessJobResultCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnProcessJobResultCompleted);
    427             }
    428             base.InvokeAsync(this.onBeginProcessJobResultDelegate, new object[] {
     520                this.StoreFinishedJobResultCompleted(this, new StoreFinishedJobResultCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
     521            }
     522        }
     523       
     524        public void StoreFinishedJobResultAsync(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception) {
     525            this.StoreFinishedJobResultAsync(clientId, jobId, result, percentage, exception, null);
     526        }
     527       
     528        public void StoreFinishedJobResultAsync(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, object userState) {
     529            if ((this.onBeginStoreFinishedJobResultDelegate == null)) {
     530                this.onBeginStoreFinishedJobResultDelegate = new BeginOperationDelegate(this.OnBeginStoreFinishedJobResult);
     531            }
     532            if ((this.onEndStoreFinishedJobResultDelegate == null)) {
     533                this.onEndStoreFinishedJobResultDelegate = new EndOperationDelegate(this.OnEndStoreFinishedJobResult);
     534            }
     535            if ((this.onStoreFinishedJobResultCompletedDelegate == null)) {
     536                this.onStoreFinishedJobResultCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnStoreFinishedJobResultCompleted);
     537            }
     538            base.InvokeAsync(this.onBeginStoreFinishedJobResultDelegate, new object[] {
    429539                        clientId,
    430540                        jobId,
    431541                        result,
    432542                        percentage,
    433                         exception,
    434                         finished}, this.onEndProcessJobResultDelegate, this.onProcessJobResultCompletedDelegate, userState);
     543                        exception}, this.onEndStoreFinishedJobResultDelegate, this.onStoreFinishedJobResultCompletedDelegate, userState);
     544        }
     545       
     546        public HeuristicLab.Hive.Contracts.ResponseResultReceived ProcessSnapshot(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception) {
     547            return base.Channel.ProcessSnapshot(clientId, jobId, result, percentage, exception);
     548        }
     549       
     550        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
     551        public System.IAsyncResult BeginProcessSnapshot(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, System.AsyncCallback callback, object asyncState) {
     552            return base.Channel.BeginProcessSnapshot(clientId, jobId, result, percentage, exception, callback, asyncState);
     553        }
     554       
     555        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
     556        public HeuristicLab.Hive.Contracts.ResponseResultReceived EndProcessSnapshot(System.IAsyncResult result) {
     557            return base.Channel.EndProcessSnapshot(result);
     558        }
     559       
     560        private System.IAsyncResult OnBeginProcessSnapshot(object[] inValues, System.AsyncCallback callback, object asyncState) {
     561            System.Guid clientId = ((System.Guid)(inValues[0]));
     562            long jobId = ((long)(inValues[1]));
     563            byte[] result = ((byte[])(inValues[2]));
     564            double percentage = ((double)(inValues[3]));
     565            System.Exception exception = ((System.Exception)(inValues[4]));
     566            return this.BeginProcessSnapshot(clientId, jobId, result, percentage, exception, callback, asyncState);
     567        }
     568       
     569        private object[] OnEndProcessSnapshot(System.IAsyncResult result) {
     570            HeuristicLab.Hive.Contracts.ResponseResultReceived retVal = this.EndProcessSnapshot(result);
     571            return new object[] {
     572                    retVal};
     573        }
     574       
     575        private void OnProcessSnapshotCompleted(object state) {
     576            if ((this.ProcessSnapshotCompleted != null)) {
     577                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
     578                this.ProcessSnapshotCompleted(this, new ProcessSnapshotCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
     579            }
     580        }
     581       
     582        public void ProcessSnapshotAsync(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception) {
     583            this.ProcessSnapshotAsync(clientId, jobId, result, percentage, exception, null);
     584        }
     585       
     586        public void ProcessSnapshotAsync(System.Guid clientId, long jobId, byte[] result, double percentage, System.Exception exception, object userState) {
     587            if ((this.onBeginProcessSnapshotDelegate == null)) {
     588                this.onBeginProcessSnapshotDelegate = new BeginOperationDelegate(this.OnBeginProcessSnapshot);
     589            }
     590            if ((this.onEndProcessSnapshotDelegate == null)) {
     591                this.onEndProcessSnapshotDelegate = new EndOperationDelegate(this.OnEndProcessSnapshot);
     592            }
     593            if ((this.onProcessSnapshotCompletedDelegate == null)) {
     594                this.onProcessSnapshotCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnProcessSnapshotCompleted);
     595            }
     596            base.InvokeAsync(this.onBeginProcessSnapshotDelegate, new object[] {
     597                        clientId,
     598                        jobId,
     599                        result,
     600                        percentage,
     601                        exception}, this.onEndProcessSnapshotDelegate, this.onProcessSnapshotCompletedDelegate, userState);
    435602        }
    436603       
     
    484651                        clientId}, this.onEndLogoutDelegate, this.onLogoutCompletedDelegate, userState);
    485652        }
     653       
     654        public HeuristicLab.Hive.Contracts.Response IsJobStillNeeded(long jobId) {
     655            return base.Channel.IsJobStillNeeded(jobId);
     656        }
     657       
     658        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
     659        public System.IAsyncResult BeginIsJobStillNeeded(long jobId, System.AsyncCallback callback, object asyncState) {
     660            return base.Channel.BeginIsJobStillNeeded(jobId, callback, asyncState);
     661        }
     662       
     663        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
     664        public HeuristicLab.Hive.Contracts.Response EndIsJobStillNeeded(System.IAsyncResult result) {
     665            return base.Channel.EndIsJobStillNeeded(result);
     666        }
     667       
     668        private System.IAsyncResult OnBeginIsJobStillNeeded(object[] inValues, System.AsyncCallback callback, object asyncState) {
     669            long jobId = ((long)(inValues[0]));
     670            return this.BeginIsJobStillNeeded(jobId, callback, asyncState);
     671        }
     672       
     673        private object[] OnEndIsJobStillNeeded(System.IAsyncResult result) {
     674            HeuristicLab.Hive.Contracts.Response retVal = this.EndIsJobStillNeeded(result);
     675            return new object[] {
     676                    retVal};
     677        }
     678       
     679        private void OnIsJobStillNeededCompleted(object state) {
     680            if ((this.IsJobStillNeededCompleted != null)) {
     681                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
     682                this.IsJobStillNeededCompleted(this, new IsJobStillNeededCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
     683            }
     684        }
     685       
     686        public void IsJobStillNeededAsync(long jobId) {
     687            this.IsJobStillNeededAsync(jobId, null);
     688        }
     689       
     690        public void IsJobStillNeededAsync(long jobId, object userState) {
     691            if ((this.onBeginIsJobStillNeededDelegate == null)) {
     692                this.onBeginIsJobStillNeededDelegate = new BeginOperationDelegate(this.OnBeginIsJobStillNeeded);
     693            }
     694            if ((this.onEndIsJobStillNeededDelegate == null)) {
     695                this.onEndIsJobStillNeededDelegate = new EndOperationDelegate(this.OnEndIsJobStillNeeded);
     696            }
     697            if ((this.onIsJobStillNeededCompletedDelegate == null)) {
     698                this.onIsJobStillNeededCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnIsJobStillNeededCompleted);
     699            }
     700            base.InvokeAsync(this.onBeginIsJobStillNeededDelegate, new object[] {
     701                        jobId}, this.onEndIsJobStillNeededDelegate, this.onIsJobStillNeededCompletedDelegate, userState);
     702        }
     703       
     704        public HeuristicLab.Hive.Contracts.ResponsePlugin SendPlugins(string[] pluginList) {
     705            return base.Channel.SendPlugins(pluginList);
     706        }
     707       
     708        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
     709        public System.IAsyncResult BeginSendPlugins(string[] pluginList, System.AsyncCallback callback, object asyncState) {
     710            return base.Channel.BeginSendPlugins(pluginList, callback, asyncState);
     711        }
     712       
     713        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
     714        public HeuristicLab.Hive.Contracts.ResponsePlugin EndSendPlugins(System.IAsyncResult result) {
     715            return base.Channel.EndSendPlugins(result);
     716        }
     717       
     718        private System.IAsyncResult OnBeginSendPlugins(object[] inValues, System.AsyncCallback callback, object asyncState) {
     719            string[] pluginList = ((string[])(inValues[0]));
     720            return this.BeginSendPlugins(pluginList, callback, asyncState);
     721        }
     722       
     723        private object[] OnEndSendPlugins(System.IAsyncResult result) {
     724            HeuristicLab.Hive.Contracts.ResponsePlugin retVal = this.EndSendPlugins(result);
     725            return new object[] {
     726                    retVal};
     727        }
     728       
     729        private void OnSendPluginsCompleted(object state) {
     730            if ((this.SendPluginsCompleted != null)) {
     731                InvokeAsyncCompletedEventArgs e = ((InvokeAsyncCompletedEventArgs)(state));
     732                this.SendPluginsCompleted(this, new SendPluginsCompletedEventArgs(e.Results, e.Error, e.Cancelled, e.UserState));
     733            }
     734        }
     735       
     736        public void SendPluginsAsync(string[] pluginList) {
     737            this.SendPluginsAsync(pluginList, null);
     738        }
     739       
     740        public void SendPluginsAsync(string[] pluginList, object userState) {
     741            if ((this.onBeginSendPluginsDelegate == null)) {
     742                this.onBeginSendPluginsDelegate = new BeginOperationDelegate(this.OnBeginSendPlugins);
     743            }
     744            if ((this.onEndSendPluginsDelegate == null)) {
     745                this.onEndSendPluginsDelegate = new EndOperationDelegate(this.OnEndSendPlugins);
     746            }
     747            if ((this.onSendPluginsCompletedDelegate == null)) {
     748                this.onSendPluginsCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnSendPluginsCompleted);
     749            }
     750            base.InvokeAsync(this.onBeginSendPluginsDelegate, new object[] {
     751                        pluginList}, this.onEndSendPluginsDelegate, this.onSendPluginsCompletedDelegate, userState);
     752        }
    486753    }
    487754}
Note: See TracChangeset for help on using the changeset viewer.