locked
Newbie WF question regarding "Activity<T>" RRS feed

  • Question

  • Hello all, I'm trying to learn WF from a book I had lying around ("Pro WF 4" by Bukovics). I'm confused about some code I've come across in Chapter 2. Here's the except:

    Quoted from chapter:
    "Create a WorkFlow Console application...add a new Code Activity to the project, and name it AddNumbers. Here is the code for this activity:"

    using System;
    using System.Activities;
    using System.Activities.Expressions;
    using System.Activities.Statements;
    
    namespace ExpressionActivitites
    {
        public sealed class AddNumbers : Activity<Int32>
        {

    What exactly is "Activity<Int32>"? When creating a new Code Activity my class should be inheriting from "CodeActivity" no?

    Wednesday, July 27, 2016 12:14 AM

Answers

  • Hi,

    It's used to return some value from an Activity.  Reference: Workflow Foundation 4.0 Activity Model (I)

    Regards,

    Angie


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Marked as answer by LKeene Thursday, July 28, 2016 3:34 PM
    • Edited by Angie Xu Friday, July 29, 2016 8:04 AM
    Thursday, July 28, 2016 6:31 AM