Windows Workflow Foundation (WF4) - Workflow Services and Auto-Start

This sample application demonstrates how you can create a Workflow Service that will automatically start and periodically wake up to do some work. The sample also demonstrates a UI that shows the progress of the work and provides control and query capabilities.

C# (249.0 KB)
 
 
 
 
 
4 Star
(6)
4,298 times
Add to favorites
4/28/2011
E-mail Twitter del.icio.us Digg Facebook
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.225
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace BatchWeb.Services {
    
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(ConfigurationName="Services.IBatchWorker")]
    public interface IBatchWorker {
        
        // CODEGEN: Generating message contract since the operation SubmitJob is neither RPC nor document wrapped.
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBatchWorker/SubmitJob", ReplyAction="http://tempuri.org/IBatchWorker/SubmitJobResponse")]
        BatchWeb.Services.SubmitJobResponse SubmitJob(BatchWeb.Services.SubmitJobRequest request);
        
        // CODEGEN: Generating message contract since the operation StopJob is neither RPC nor document wrapped.
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBatchWorker/StopJob", ReplyAction="http://tempuri.org/IBatchWorker/StopJobResponse")]
        BatchWeb.Services.StopJobResponse StopJob(BatchWeb.Services.StopJobRequest request);
        
        // CODEGEN: Generating message contract since the operation QueryJob is neither RPC nor document wrapped.
        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBatchWorker/QueryJob", ReplyAction="http://tempuri.org/IBatchWorker/QueryJobResponse")]
        BatchWeb.Services.QueryJobResponse QueryJob(BatchWeb.Services.QueryJobRequest request);
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class SubmitJobRequest {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.datacontract.org/2004/07/BatchWorker.Contracts", Order=0)]
        public BatchWorker.Contracts.BatchRequest BatchRequest;
        
        public SubmitJobRequest() {
        }
        
        public SubmitJobRequest(BatchWorker.Contracts.BatchRequest BatchRequest) {
            this.BatchRequest = BatchRequest;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class SubmitJobResponse {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.datacontract.org/2004/07/BatchWorker.Contracts", Order=0)]
        public BatchWorker.Contracts.BatchInfoResponse BatchInfoResponse;
        
        public SubmitJobResponse() {
        }
        
        public SubmitJobResponse(BatchWorker.Contracts.BatchInfoResponse BatchInfoResponse) {
            this.BatchInfoResponse = BatchInfoResponse;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class StopJobRequest {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/", Order=0)]
        public System.Nullable<System.Guid> guid;
        
        public StopJobRequest() {
        }
        
        public StopJobRequest(System.Nullable<System.Guid> guid) {
            this.guid = guid;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class StopJobResponse {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.datacontract.org/2004/07/BatchWorker.Contracts", Order=0)]
        public BatchWorker.Contracts.BatchInfoResponse BatchInfoResponse;
        
        public StopJobResponse() {
        }
        
        public StopJobResponse(BatchWorker.Contracts.BatchInfoResponse BatchInfoResponse) {
            this.BatchInfoResponse = BatchInfoResponse;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class QueryJobRequest {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.microsoft.com/2003/10/Serialization/", Order=0)]
        public System.Nullable<System.Guid> guid;
        
        public QueryJobRequest() {
        }
        
        public QueryJobRequest(System.Nullable<System.Guid> guid) {
            this.guid = guid;
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
    [System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
    public partial class QueryJobResponse {
        
        [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://schemas.datacontract.org/2004/07/BatchWorker.Contracts", Order=0)]
        public BatchWorker.Contracts.BatchInfoResponse BatchInfoResponse;
        
        public QueryJobResponse() {
        }
        
        public QueryJobResponse(BatchWorker.Contracts.BatchInfoResponse BatchInfoResponse) {
            this.BatchInfoResponse = BatchInfoResponse;
        }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public interface IBatchWorkerChannel : BatchWeb.Services.IBatchWorker, System.ServiceModel.IClientChannel {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class BatchWorkerClient : System.ServiceModel.ClientBase<BatchWeb.Services.IBatchWorker>, BatchWeb.Services.IBatchWorker {
        
        public BatchWorkerClient() {
        }
        
        public BatchWorkerClient(string endpointConfigurationName) : 
                base(endpointConfigurationName) {
        }
        
        public BatchWorkerClient(string endpointConfigurationName, string remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public BatchWorkerClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public BatchWorkerClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress) {
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        BatchWeb.Services.SubmitJobResponse BatchWeb.Services.IBatchWorker.SubmitJob(BatchWeb.Services.SubmitJobRequest request) {
            return base.Channel.SubmitJob(request);
        }
        
        public BatchWorker.Contracts.BatchInfoResponse SubmitJob(BatchWorker.Contracts.BatchRequest BatchRequest) {
            BatchWeb.Services.SubmitJobRequest inValue = new BatchWeb.Services.SubmitJobRequest();
            inValue.BatchRequest = BatchRequest;
            BatchWeb.Services.SubmitJobResponse retVal = ((BatchWeb.Services.IBatchWorker)(this)).SubmitJob(inValue);
            return retVal.BatchInfoResponse;
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        BatchWeb.Services.StopJobResponse BatchWeb.Services.IBatchWorker.StopJob(BatchWeb.Services.StopJobRequest request) {
            return base.Channel.StopJob(request);
        }
        
        public BatchWorker.Contracts.BatchInfoResponse StopJob(System.Nullable<System.Guid> guid) {
            BatchWeb.Services.StopJobRequest inValue = new BatchWeb.Services.StopJobRequest();
            inValue.guid = guid;
            BatchWeb.Services.StopJobResponse retVal = ((BatchWeb.Services.IBatchWorker)(this)).StopJob(inValue);
            return retVal.BatchInfoResponse;
        }
        
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
        BatchWeb.Services.QueryJobResponse BatchWeb.Services.IBatchWorker.QueryJob(BatchWeb.Services.QueryJobRequest request) {
            return base.Channel.QueryJob(request);
        }
        
        public BatchWorker.Contracts.BatchInfoResponse QueryJob(System.Nullable<System.Guid> guid) {
            BatchWeb.Services.QueryJobRequest inValue = new BatchWeb.Services.QueryJobRequest();
            inValue.guid = guid;
            BatchWeb.Services.QueryJobResponse retVal = ((BatchWeb.Services.IBatchWorker)(this)).QueryJob(inValue);
            return retVal.BatchInfoResponse;
        }
    }
}