-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
IPendingWork.xml
144 lines (132 loc) · 10.3 KB
/
IPendingWork.xml
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<Type Name="IPendingWork" FullName="System.Workflow.Runtime.IPendingWork">
<TypeSignature Language="C#" Value="public interface IPendingWork" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IPendingWork" />
<TypeSignature Language="DocId" Value="T:System.Workflow.Runtime.IPendingWork" />
<TypeSignature Language="VB.NET" Value="Public Interface IPendingWork" />
<TypeSignature Language="F#" Value="type IPendingWork = interface" />
<TypeSignature Language="C++ CLI" Value="public interface class IPendingWork" />
<AssemblyInfo>
<AssemblyName>System.Workflow.Runtime</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")]</AttributeName>
<AttributeName Language="F#">[<System.Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Provides methods to participate in a work batch.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> [!INCLUDE[DeprecatedContent](~/includes/deprecatedcontent-md.md)]
The <xref:System.Workflow.Runtime.IPendingWork> interface is provided for services that want to participate in the workflow runtime engine batching mechanism. The batching mechanism is especially useful for services that use a durable store. It is often important in these cases to maintain consistency between the durable store used by the service and the internal state of the workflow runtime engine.
If you want your service to participate in workflow transaction batching provided by the <xref:System.Workflow.Runtime.Hosting.WorkflowCommitWorkBatchService>, you must implement the methods defined by the <xref:System.Workflow.Runtime.IPendingWork> interface. The workflow runtime engine will call the <xref:System.Workflow.Runtime.IPendingWork.Commit%2A> method on your service to commit the batch.
The <xref:System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService> class implements the <xref:System.Workflow.Runtime.IPendingWork> interface.
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName="Commit">
<MemberSignature Language="C#" Value="public void Commit (System.Transactions.Transaction transaction, System.Collections.ICollection items);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Commit(class System.Transactions.Transaction transaction, class System.Collections.ICollection items) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Workflow.Runtime.IPendingWork.Commit(System.Transactions.Transaction,System.Collections.ICollection)" />
<MemberSignature Language="VB.NET" Value="Public Sub Commit (transaction As Transaction, items As ICollection)" />
<MemberSignature Language="F#" Value="abstract member Commit : System.Transactions.Transaction * System.Collections.ICollection -> unit" Usage="iPendingWork.Commit (transaction, items)" />
<MemberSignature Language="C++ CLI" Value="public:
 void Commit(System::Transactions::Transaction ^ transaction, System::Collections::ICollection ^ items);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Workflow.Runtime</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="transaction" Type="System.Transactions.Transaction" />
<Parameter Name="items" Type="System.Collections.ICollection" />
</Parameters>
<Docs>
<param name="transaction">The <see cref="T:System.Transactions.Transaction" /> associated with the pending work.</param>
<param name="items">The work items to be committed.</param>
<summary>Commits the list of work items by using the specified <see cref="T:System.Transactions.Transaction" /> object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The workflow runtime engine calls the <xref:System.Workflow.Runtime.IPendingWork.Commit%2A> method when its semantics dictate that the pending work in the work batch should be committed. When it reaches a commit point, the workflow runtime engine calls the <xref:System.Workflow.Runtime.IPendingWork.Commit%2A> method on each <xref:System.Workflow.Runtime.IPendingWork> object in its work batch; the workflow runtime engine passes the <xref:System.Workflow.Runtime.IPendingWork.Commit%2A> method the collection of items associated with that <xref:System.Workflow.Runtime.IPendingWork> object. Either all of the work in a batch succeeds or none of it succeeds. You should throw an exception if any of the work items passed to the <xref:System.Workflow.Runtime.IPendingWork.Commit%2A> method in your implementation cannot be committed. Depending on your implementation, you may want to perform some rollback in your <xref:System.Workflow.Runtime.IPendingWork.Commit%2A> method if it cannot commit its work items. If the workflow runtime engine successfully commits all of the work in the work batch, it calls <xref:System.Workflow.Runtime.IPendingWork.Complete%2A> with the `succeeded` parameter set to `true`; otherwise, it calls <xref:System.Workflow.Runtime.IPendingWork.Complete%2A> with `succeeded` set to `false`.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Complete">
<MemberSignature Language="C#" Value="public void Complete (bool succeeded, System.Collections.ICollection items);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Complete(bool succeeded, class System.Collections.ICollection items) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Workflow.Runtime.IPendingWork.Complete(System.Boolean,System.Collections.ICollection)" />
<MemberSignature Language="VB.NET" Value="Public Sub Complete (succeeded As Boolean, items As ICollection)" />
<MemberSignature Language="F#" Value="abstract member Complete : bool * System.Collections.ICollection -> unit" Usage="iPendingWork.Complete (succeeded, items)" />
<MemberSignature Language="C++ CLI" Value="public:
 void Complete(bool succeeded, System::Collections::ICollection ^ items);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Workflow.Runtime</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="succeeded" Type="System.Boolean" />
<Parameter Name="items" Type="System.Collections.ICollection" />
</Parameters>
<Docs>
<param name="succeeded">
<see langword="true" /> if the transaction succeeded; otherwise, <see langword="false" />.</param>
<param name="items">An <see cref="T:System.Collections.ICollection" /> of work items.</param>
<summary>Called when the transaction has completed.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If `succeeded` is `true`, the transaction succeeded and any resources used by the work batch may be released. If `succeeded` is `false`, the transaction failed. Depending on your implementation, you can perform any appropriate roll back on the work in the work batch when the transaction fails.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="MustCommit">
<MemberSignature Language="C#" Value="public bool MustCommit (System.Collections.ICollection items);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool MustCommit(class System.Collections.ICollection items) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Workflow.Runtime.IPendingWork.MustCommit(System.Collections.ICollection)" />
<MemberSignature Language="VB.NET" Value="Public Function MustCommit (items As ICollection) As Boolean" />
<MemberSignature Language="F#" Value="abstract member MustCommit : System.Collections.ICollection -> bool" Usage="iPendingWork.MustCommit items" />
<MemberSignature Language="C++ CLI" Value="public:
 bool MustCommit(System::Collections::ICollection ^ items);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Workflow.Runtime</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="items" Type="System.Collections.ICollection" />
</Parameters>
<Docs>
<param name="items">An <see cref="T:System.Collections.ICollection" /> of work items.</param>
<summary>Allows the items in the work batch to assert whether they must commit immediately.</summary>
<returns>
<see langword="true" /> if any item in the collection must be committed immediately; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If <xref:System.Workflow.Runtime.IPendingWork.MustCommit%2A> returns `false`, the work can be postponed to a future commit point. If any of the items must be committed, then return `true` and all items will be committed at the current commit point. For a discussion about possible commit points, see the <xref:System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService> class.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>