2021-04-09 18:06:04 +00:00
|
|
|
using Elsa.Activities.Console;
|
|
|
|
|
using Elsa.Activities.File;
|
|
|
|
|
using Elsa.Builders;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace Elsa.Samples.ReadLineToFile
|
|
|
|
|
{
|
|
|
|
|
public class ReadLineToFileWorkflow : IWorkflow
|
|
|
|
|
{
|
|
|
|
|
public void Build(IWorkflowBuilder builder)
|
|
|
|
|
{
|
2021-04-09 22:14:03 +00:00
|
|
|
var temp = "C:\\Temp\\Test.txt";
|
2021-04-09 18:06:04 +00:00
|
|
|
|
|
|
|
|
builder
|
|
|
|
|
.WriteLine("Enter text to write to file")
|
|
|
|
|
.ReadLine()
|
2021-04-09 22:14:03 +00:00
|
|
|
.OutFile(temp, CopyMode.Overwrite);
|
2021-04-09 18:06:04 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|