1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
using System.Workflow.ComponentModel;
using System.Workflow.Runtime;
using System.Workflow.Runtime.Hosting;
namespace System.Workflow.Activities
{
[Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")]
public abstract class WorkflowSubscriptionService
{
public abstract void CreateSubscription(MessageEventSubscription subscription);
public abstract void DeleteSubscription(Guid subscriptionId);
}
[Serializable]
[Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")]
public class MessageEventSubscription
{
Type interfaceType;
String operation;
List<CorrelationProperty> predicates;
Guid subscriptionId;
Guid workflowInstanceId;
IComparable queueName;
protected MessageEventSubscription()
{
}
public MessageEventSubscription(IComparable queueName, Guid instanceId)
: this(queueName, instanceId, Guid.NewGuid())
{
}
public MessageEventSubscription(IComparable queueName, Guid instanceId, Guid subscriptionId)
: this(queueName, instanceId, null, null, subscriptionId)
{
}
public MessageEventSubscription(IComparable queueName, Guid subscriptionId, Type interfaceType, String operation)
: this(queueName, Guid.Empty, interfaceType, operation, subscriptionId)
{
}
public MessageEventSubscription(IComparable queueName, Guid instanceId, Type interfaceType, String operation, Guid subscriptionId)
{
this.queueName = queueName;
this.workflowInstanceId = instanceId;
this.subscriptionId = subscriptionId;
this.interfaceType = interfaceType;
this.operation = operation;
this.predicates = new List<CorrelationProperty>();
}
public virtual Type InterfaceType
{
get
{
return this.interfaceType;
}
set
{
this.interfaceType = value;
}
}
public virtual String MethodName
{
get
{
return this.operation;
}
set
{
this.operation = value;
}
}
public virtual ICollection<CorrelationProperty> CorrelationProperties
{
get
{
return this.predicates;
}
}
//A Unique id for this subscription. It is needed because
//QueueName is not always guaranteed to be Unique.
//Needed in case of Multiple Subscription on Same Queue
public virtual Guid SubscriptionId
{
get
{
return this.subscriptionId;
}
}
public virtual IComparable QueueName
{
get
{
return this.queueName;
}
protected set
{
this.queueName = value;
}
}
public virtual Guid WorkflowInstanceId
{
get
{
return this.workflowInstanceId;
}
}
}
}
|