Created
January 15, 2010 23:27
-
-
Save chaliy/278511 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Runtime.Serialization; | |
using System.ServiceModel; | |
namespace ProcessingService | |
{ | |
[DataContract(Namespace = "urn:just-applications:nventree:batch-v1.0")] | |
public class Argument | |
{ | |
[DataMember(IsRequired = true, Order = 0)] | |
public string Key { get; set; } | |
[DataMember(IsRequired = true, Order = 1)] | |
public string Value { get; set; } | |
} | |
[DataContract(Namespace = "urn:just-applications:nventree:batch-v1.0")] | |
public class BatchItem | |
{ | |
[DataMember(IsRequired = true, Order = 0)] | |
public List<Argument> Arguments { get; set; } | |
} | |
[DataContract(Namespace = "urn:just-applications:nventree:batch-v1.0")] | |
public class Batch | |
{ | |
[DataMember(IsRequired = true, Order = 0)] | |
public string Id { get; set; } | |
[DataMember(IsRequired = true, Order = 1)] | |
public string ProcessorKey { get; set; } | |
[DataMember(IsRequired = true, Order = 2)] | |
public List<BatchItem> Items { get; set; } | |
} | |
[ServiceContract(Name = "BatchQueueContract", | |
ConfigurationName = "BatchQueue", | |
Namespace = "urn:just-applications:nventree:batch-v1.0", | |
SessionMode = SessionMode.Required)] | |
public class BatchQueue | |
{ | |
[OperationContract(IsOneWay = true)] | |
public void Queue(Batch batch) | |
{ | |
Console.WriteLine("Queued!"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment