build: initial project release
This commit is contained in:
commit
2e94c513fc
60 changed files with 4935 additions and 0 deletions
26
src/process.dummy.app/OutputTarget.cs
Normal file
26
src/process.dummy.app/OutputTarget.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
// Copyright (c) The Geekeey Authors
|
||||
// SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
[Flags]
|
||||
internal enum OutputTarget
|
||||
{
|
||||
StdOut = 1,
|
||||
StdErr = 2,
|
||||
All = StdOut | StdErr
|
||||
}
|
||||
|
||||
internal static class OutputTargetExtensions
|
||||
{
|
||||
public static IEnumerable<StreamWriter> GetWriters(this Output output, OutputTarget target)
|
||||
{
|
||||
if (target.HasFlag(OutputTarget.StdOut))
|
||||
{
|
||||
yield return output.Stdout;
|
||||
}
|
||||
|
||||
if (target.HasFlag(OutputTarget.StdErr))
|
||||
{
|
||||
yield return output.Stderr;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue