using System;
using System.Collections.Generic;
namespace Cosmos.BuildEngine
{
///
/// A target onto which a "builded" version of Cosmos can be deployed.
///
public abstract class CosmosBuildTarget
{
///
/// The result of a target on which the build engine may act.
///
public class TargetResult
{
///
/// The type of action that may be taken on a result.
///
public enum TargetResultType : byte
{
///
/// Target deploy failed. Error message provided as result.
///
Failed = 0,
///
/// A data file was created. Path (relative to build directory) provided as result.
///
File_Data = 1,
///
/// A file was created (or exists) which should be shell-executed. Path (relative to build directory) provided as result.
///
File_Execute = 2,
///
/// A command should be shell-executed. Command provided as result. All paths should be relative to build directory.
///
String_Execute = 4
}
///
/// See TargetResultType.
///
public readonly TargetResultType ResultType;
///
/// The result of the Target. See TargetResultType.
///
public readonly String Result;
///
/// Primary Constructor.
///
/// See TargetResultType.
/// See TargetResultType.
public TargetResult(TargetResultType resulttype, String result)
{
ResultType = resulttype;
Result = result;
}
}
///
/// Deploys the target.
///
/// Path (relative to build directory) of the built Cosmos binary.
/// See TargetResult.
public abstract TargetResult DeployTarget(String BuiltBinaryPath, IEnumerable Options);
public abstract IEnumerable GetBuildOptions();
public abstract String GetDisplayName();
}
}