using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Activities;

namespace Workflow4Basics
{
    public class Format : CodeActivity
    {
        public InArgument<string> FormatString { get; set; }
        public InArgument<string> Value { get; set; }
        public OutArgument<string> Result { get; set; }

        protected override void Execute(CodeActivityContext context)
        {
            Result.Set(context, 
                string.Format(FormatString.Get(context),
                    Value.Get(context)));
        }
    }
}
