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

namespace Workflow4Basics
{
    public class ReadLine : NativeActivity
    {
        public OutArgument<string> Output { get; set; }

        protected override void Execute(NativeActivityContext context)
        {
            context.CreateBookmark("ReadLineBookmark",
                new BookmarkCallback(OnComplete));
        }

        protected void OnComplete(NativeActivityContext ctx, Bookmark bm, object obj)
        {
            Output.Set(ctx, obj);
        }

        protected override bool CanInduceIdle
        {
            get
            {
                return true;
            }
        }
    }
}
