singrdk/base/Applications/echo/echo.sg

39 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2008-03-05 09:52:00 -05:00
////////////////////////////////////////////////////////////////////////////////
//
// Microsoft Research Singularity
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Note: Singularity pipe test program.
//
using System;
using Microsoft.Singularity;
using Microsoft.Singularity.Channels;
using Microsoft.SingSharp.Reflection;
using Microsoft.Singularity.Applications;
using Microsoft.Singularity.Io;
using Microsoft.Singularity.Configuration;
[assembly: Transform(typeof(ApplicationResourceTransform))]
namespace Microsoft.Singularity.Applications
{
2008-11-17 18:29:00 -05:00
[ConsoleCategory(HelpMessage="Print arguments to stdout", DefaultAction=true)]
2008-03-05 09:52:00 -05:00
internal class Parameters
{
[OutputEndpoint("data")]
public readonly TRef<UnicodePipeContract.Imp:READY> Stdout;
2008-11-17 18:29:00 -05:00
[StringArrayParameter("Args", HelpMessage="The arguments to echo.")]
public string[] Args;
2008-03-05 09:52:00 -05:00
reflective internal Parameters();
internal int AppMain() {
2008-11-17 18:29:00 -05:00
Console.WriteLine("running");
string line = Args != null ? String.Join(" ", Args) : "";
Console.WriteLine(line);
2008-03-05 09:52:00 -05:00
return 0;
}
}
}