Created
January 15, 2010 23:23
-
-
Save chaliy/278509 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Processing.Services | |
open System.Runtime.Serialization | |
open System.Collections.Generic | |
open System.ServiceModel | |
[<DataContract(Namespace="urn:just-applications:nventree:batch-v1.0")>] | |
type Argument() = | |
let mutable key : string = "" | |
let mutable arg_value : string = "" | |
[<DataMember(Name = "Key", IsRequired = true, Order = 0)>] | |
member public this.Key with get() = key and set(value) = key <- value | |
[<DataMember(Name = "Value", IsRequired = true, Order = 1)>] | |
member public this.Value with get() = arg_value and set(value) = arg_value <- value | |
[<DataContract(Namespace="urn:just-applications:nventree:batch-v1.0")>] | |
type BatchItem() = | |
let mutable args : List<Argument> = List<Argument>() | |
[<DataMember(Name = "Arguments", IsRequired = true, Order = 0)>] | |
member public this.Arguments with get() = args and set(value) = args <- value | |
[<DataContract(Namespace="urn:just-applications:nventree:batch-v1.0")>] | |
type Batch() = | |
let mutable id : string = "" | |
let mutable processorKey : string = "" | |
let mutable items : List<BatchItem> = List<BatchItem>() | |
[<DataMember(Name = "Id", IsRequired = true, Order = 0)>] | |
member public this.Id with get() = id and set(value) = id <- value | |
[<DataMember(Name = "ProcessorKey", IsRequired = true, Order = 1)>] | |
member public this.ProcessorKey with get() = processorKey and set(value) = processorKey <- value | |
[<DataMember(Name = "Items", IsRequired = true, Order = 2)>] | |
member public this.Items with get() = items and set(value) = items <- value | |
[<ServiceContract(Name = "BatchQueueContract", | |
ConfigurationName = "BatchQueue", | |
Namespace = "urn:just-applications:nventree:batch-v1.0", | |
SessionMode = SessionMode.Required)>] | |
type BatchQueue = | |
new() = BatchQueue() | |
[<OperationContract(IsOneWay = true)>] | |
member this.Queue(b:Batch) : unit = | |
printfn "Queued!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment