Opening
In the previous article, we mainly talked about how to use the collection activity to design and develop a workflow in step 1 of workflow extension-[previous]-wf4.0 for activities in the collection group. In this article, we will continue
Describes the usage of the other two activities in a collection activity.
Summary
In this article, we are the second extension article. This article mainly describes the usage of collection. Generally, we operate collections in the following ways: add, delete, and query, therefore, WF provides the following four types by default.
Collection activities:
Specifically, I think we can literally tell you a story. Let's take a look at the specific usage details.
Finally, let's sort out a process and integrate all the activities of these four sets into a process.
Outline
1. Opening
2. Summary
3. Outline
4. Usage of collection activities [II]
Set usage [lower] 1. existsincollection <t> Activity
1. Create a console project:
2. Add the corresponding node to the designer:
Initialization variable information:
3. refer to the previous articleArticleAbout addtocollection <t> activity settings, the above activity settings are identical, after the settings are complete, as follows:
4. Add an existsincollection activity under the addtocollection activity:
5. Next we will add other writeline activities to help us test the output results:
6. Run F5 and check the result to see if the result is consistent with our expectation:
The above describes the existsincollection <t> activity. The usage of other activities is similar.
Next let's take a look at the removefromcollection usage. The main function of this activity is to remove the specified item from the set.
2. removefromcollection <t> Activity
The specific function of removefromcollection is to remove the specified items in the specific target set. The specific usage is as follows:
1. Create an activity file, drag a sequence and addtocollection, and add a removefromcollection activity:
2. Add a removefromcollection <t> activity under the addtocollection activity. The properties of the activity are as follows:
3. Next, we will add several writeline activities to identify the start and end of the WF process, and record the specific content of each operation as follows:
The above content is a bit large, so I split it, but the above images are complete together. If you cannot understand it, please referCodeRight:
4. Run F5 and check the specific running result to see if we want it. What is the output result of the set after the removefromcollection activity is completed?
Source code download
More communication
official blog: http://www.smarteas.net/
Official Website: http://www.agilelab.cn/
if you have any questions about using the agileeas. NET development platform, use the following contact methods or communication methods.
1. Telephone-Email:
He gozhou: hegezhou_hot@163.com Mobile: 18691480181 blog: http://www.cnblogs.com/hegezhou_hot/
2. QQ communication:
308961614-Network Name: h.o. T