wx.Build.IBuildAction Interface Reference

Inheritance diagram for wx.Build.IBuildAction:

Inheritance graph

List of all members.

Public Member Functions

void AppendBooCode (List< string > booCodeLines, string indention, BuildToolFamilyEnv env)
void CollectChoicePoints (IDictionary< string, ICollection< string >> collectionOfChoicePoints)
bool ContainsPrerequisite (IBuildProduct prereq)
bool Execute (BuildToolFamilyEnv env, DateTime validityOfBuildSystem)
ICollection
< IBuildProduct
GetPrerequisites ()
System.Diagnostics.ProcessStartInfo GetProgramStartInfo (BuildToolFamilyEnv env)
ICollection
< IBuildProduct
GetTargets ()
DateTime GetValidity ()
DateTime GetValidityDemand ()
bool TargetsAreConsistent (DateTime validityOfBuildSystem)

Properties

IBuildActionProvider ActionProvider [get]
FeatureList Features [get]
string Name [get]
ICollection< Type > ParameterTypes [get]
ActionPriority Priority [get]
BuildProject Project [get, set]
IDictionary< string,
EnvironmentVarInfo
UsedVars [get]


Detailed Description

A build action is an action presupposing particular symbolic targets and content files achieving symbolic targets and/or particular content files. Build actions implement a method Execute() that will test for the prerequisites and execute the actions on success.

Actions will usually be created by action providers (implementing wx.Build.IActionProvider). However, some actions will be directly called bythe projects.


Member Function Documentation

void wx.Build.IBuildAction.AppendBooCode ( List< string >  booCodeLines,
string  indention,
BuildToolFamilyEnv  env 
)

This method will create BOO source code and append this code to the provided text writer.

Parameters:
env This is an environment that different tools of the same family may use to exchange information. This store is typically used to save information on configuration files or thinsgs of that kind that will be shared among all tools of the same family.
booCode The code that will actually build something. Each list entry will be a line of code in the resulting BOO program.
indention A string that shall preceed all created lines.
Refer to IBuildActionProvider.AppendToBooPreamble() for an example.
Exceptions:
NotSupportedException Will be thrown if this feature is not supported.

Implemented in wx.Build.AlternativeBuildActions, wx.Build.SequenceOfBuildActions, wx.Build.NamedAction, wx.Build.FileTestAction, wx.Build.Cxx.GCC.GccAsCompiler, wx.Build.Cxx.GCC.GccAsLinker, wx.Build.Cxx.GCC.WindRes, wx.Build.Mono.Gmcs, wx.Build.MS.Cl, wx.Build.MS.Link, wx.Build.MS.RC, wx.Build.MS.Csc, wx.Build.Release.ReplaceVersionInRCFile, and wx.Build.Release.CopyFileAction.

void wx.Build.IBuildAction.CollectChoicePoints ( IDictionary< string, ICollection< string >>  collectionOfChoicePoints  ) 

This method collects all choice points within this action. Choice points are represented by a name and a collection of alternatives.

Parameters:
collectionOfChoicePoints The collection that will be extended by the choice points of this action.
The current implementation provides a choice point for the compilation and linking of C/C++ programs, "CppDevelopmentSystem" of the alternatives "GCC" and "MS VC". Thus, actions on C/C++ compilation will add the following choice point:
            if (!collectionOfChoicePoints.ContainsKey("CppDevelopmentSystem"))
                collectionOfChoicePoints.Add("CppDevelopmentSystem", new List&lt;string&gt;());
            collectionOfChoicePoints["CppDevelopmentSystem"].Add("GCC");
            collectionOfChoicePoints["CppDevelopmentSystem"].Add("MS VC");

Implemented in wx.Build.AlternativeBuildActions, wx.Build.SequenceOfBuildActions, and wx.Build.NamedAction.

bool wx.Build.IBuildAction.ContainsPrerequisite ( IBuildProduct  prereq  ) 

True iff prereq is among the GetPrerequisites().

Implemented in wx.Build.AlternativeBuildActions, wx.Build.SequenceOfBuildActions, wx.Build.NamedAction, wx.Build.Net.CSharpCodeProvider, wx.Build.Cxx.GCC.WindRes, wx.Build.Mono.Gmcs, wx.Build.MS.Cl, wx.Build.MS.Link, wx.Build.MS.RC, and wx.Build.MS.Csc.

bool wx.Build.IBuildAction.Execute ( BuildToolFamilyEnv  env,
DateTime  validityOfBuildSystem 
)

Implemented in wx.Build.AlternativeBuildActions, wx.Build.SequenceOfBuildActions, wx.Build.NamedAction, wx.Build.FileTestAction, wx.Build.Net.CSharpCodeProvider, wx.Build.Cxx.GCC.GccAsCompiler, wx.Build.Cxx.GCC.GccAsLinker, wx.Build.Cxx.GCC.WindRes, wx.Build.Mono.Gmcs, wx.Build.MS.Cl, wx.Build.MS.Link, wx.Build.MS.RC, wx.Build.MS.Csc, wx.Build.MS.Al, wx.Build.Release.ReplaceVersionInRCFile, wx.Build.Release.ReplaceVersionInCSharpFile, and wx.Build.Release.CopyFileAction.

ICollection<IBuildProduct> wx.Build.IBuildAction.GetPrerequisites (  ) 

This is a collection of preconditions that have to be achieved before running this project. Preconds will be used by internal references to determine applicability of a project and to determine, whether the project has to be rebuilt. Refer to Targets .

Implemented in wx.Build.AlternativeBuildActions, wx.Build.SequenceOfBuildActions, wx.Build.NamedAction, wx.Build.FileTestAction, wx.Build.Net.CSharpCodeProvider, wx.Build.Cxx.GCC.GccAsCompiler, wx.Build.Cxx.GCC.GccAsLinker, wx.Build.Cxx.GCC.WindRes, wx.Build.Mono.Gmcs, wx.Build.MS.Cl, wx.Build.MS.Link, wx.Build.MS.RC, wx.Build.MS.Csc, wx.Build.MS.Al, wx.Build.Release.ReplaceVersionInRCFile, wx.Build.Release.ReplaceVersionInCSharpFile, and wx.Build.Release.CopyFileAction.

System.Diagnostics.ProcessStartInfo wx.Build.IBuildAction.GetProgramStartInfo ( BuildToolFamilyEnv  env  ) 

If this action starts an external program via System.Diagnostics.Process, this will be the start info of the program to start. The result is null if this does not start a program as process. However, even actions that use process info may return null . This information is not mandatory.

Implemented in wx.Build.AlternativeBuildActions, wx.Build.SequenceOfBuildActions, wx.Build.NamedAction, wx.Build.Cxx.GCC.GccAsCompiler, wx.Build.Cxx.GCC.GccAsLinker, wx.Build.Cxx.GCC.WindRes, wx.Build.Mono.Gmcs, wx.Build.MS.Cl, wx.Build.MS.Link, wx.Build.MS.RC, and wx.Build.MS.Csc.

ICollection<IBuildProduct> wx.Build.IBuildAction.GetTargets (  ) 

This returns a collection of those objects that are known to be generated or updated after this has been achieved. This helps internal inferences. This may be null if this project is not about files and other reusable build targets.

The internal inference will refer to this propertiy in order to determine, which action to run for a specific target. So, only mention targets, that are actually achieved running this action. This collection will also be used to determine, whether this project has to be run again on rebuilding. If the Preconds have earlier validity than this, then the action will be omitted on rebuilding.

Implemented in wx.Build.AlternativeBuildActions, wx.Build.SequenceOfBuildActions, wx.Build.NamedAction, wx.Build.FileTestAction, wx.Build.Net.CSharpCodeProvider, wx.Build.Cxx.GCC.GccAsCompiler, wx.Build.Cxx.GCC.GccAsLinker, wx.Build.Cxx.GCC.WindRes, wx.Build.Mono.Gmcs, wx.Build.MS.Cl, wx.Build.MS.Link, wx.Build.MS.RC, wx.Build.MS.Csc, wx.Build.MS.Al, wx.Build.Release.ReplaceVersionInRCFile, wx.Build.Release.ReplaceVersionInCSharpFile, and wx.Build.Release.CopyFileAction.

DateTime wx.Build.IBuildObject.GetValidity (  )  [inherited]

Returns validity timstamp of this object. Whenever this is equal or later than all prerequisites, this is considered consistent with the prerequisites on rebuilding.

Implemented in wx.Build.FeatureList, wx.Build.AlternativeBuildActions, wx.Build.SequenceOfBuildActions, wx.Build.NamedAction, wx.Build.RefToProject, wx.Build.ContentFile, wx.Build.ContentFiles, wx.Build.FileSelector, wx.Build.FileProducts, and wx.Build.ResourceDesignator.

DateTime wx.Build.IBuildObject.GetValidityDemand (  )  [inherited]

This is the counterpart of the Validity . If this occurs as a prerequisite, this shall be compared with the Validity of the target in order to assess whether rebuild is necessary or not.

Implemented in wx.Build.FeatureList, wx.Build.AlternativeBuildActions, wx.Build.SequenceOfBuildActions, wx.Build.NamedAction, wx.Build.RefToProject, wx.Build.ContentFile, wx.Build.ContentFiles, wx.Build.FileSelector, wx.Build.FileProducts, and wx.Build.ResourceDesignator.

bool wx.Build.IBuildAction.TargetsAreConsistent ( DateTime  validityOfBuildSystem  ) 

True, if this action is not required to run because all targets are up to date.

Parameters:
validityOfBuildSystem indicates the last change of either this DLL or the assembly defining the project. So, all action will be repeated (even if rebuild is specified) if the project definition changes or the implementation of the build system has been enhanced since the final build. This argument will be computed and propagated by the project.

Implemented in wx.Build.AlternativeBuildActions, wx.Build.SequenceOfBuildActions, and wx.Build.NamedAction.


Property Documentation

IBuildActionProvider wx.Build.IBuildAction.ActionProvider [get]

The class that created this action. This is often the action itself.

Implemented in wx.Build.AlternativeBuildActions, wx.Build.SequenceOfBuildActions, wx.Build.NamedAction, wx.Build.FileTestAction, wx.Build.Net.CSharpCodeProvider, wx.Build.Cxx.GCC.GccAsCompiler, wx.Build.Cxx.GCC.GccAsLinker, wx.Build.Cxx.GCC.WindRes, wx.Build.Mono.Gmcs, wx.Build.MS.Cl, wx.Build.MS.Link, wx.Build.MS.RC, wx.Build.MS.Csc, wx.Build.MS.Al, wx.Build.Release.ReplaceVersionInRCFile, wx.Build.Release.ReplaceVersionInCSharpFile, and wx.Build.Release.CopyFileAction.

FeatureList wx.Build.IBuildAction.Features [get]

Provides access to the features of this action. Features usually are defined by the project. The project will set this at the actions that it creates to build the task.

Implemented in wx.Build.AlternativeBuildActions, wx.Build.SequenceOfBuildActions, and wx.Build.NamedAction.

string wx.Build.IBuildAction.Name [get]

The name of the action. This is for messages and print outs. Usually, this is the name of the action provider. However, projects do not have a provider but a name as member.

Implementors must make sur that names only contain letters, digits and the dot '.'. This is to ease serialization of build plans as batch files.

Implemented in wx.Build.AlternativeBuildActions, wx.Build.SequenceOfBuildActions, wx.Build.NamedAction, wx.Build.FileTestAction, wx.Build.Net.CSharpCodeProvider, wx.Build.Cxx.GCC.GccAsCompiler, wx.Build.Cxx.GCC.GccAsLinker, wx.Build.Cxx.GCC.WindRes, wx.Build.Mono.Gmcs, wx.Build.MS.Cl, wx.Build.MS.Link, wx.Build.MS.RC, wx.Build.MS.Csc, wx.Build.MS.Al, wx.Build.Release.ReplaceVersionInRCFile, wx.Build.Release.ReplaceVersionInCSharpFile, and wx.Build.Release.CopyFileAction.

ICollection<Type> wx.Build.IBuildAction.ParameterTypes [get]

Returns a collection (typically an array) of relevant parameter types in the BuildConfig. This may be empty or null if instances of this class do not refer to parameter types.

Implemented in wx.Build.AlternativeBuildActions, wx.Build.SequenceOfBuildActions, wx.Build.NamedAction, wx.Build.Mono.Gmcs, wx.Build.MS.Cl, and wx.Build.MS.Csc.

ActionPriority wx.Build.IBuildAction.Priority [get]

Priority of this action. May be everything but user-defined.

Implemented in wx.Build.AlternativeBuildActions, wx.Build.SequenceOfBuildActions, wx.Build.NamedAction, wx.Build.FileTestAction, wx.Build.Net.CSharpCodeProvider, wx.Build.Cxx.GCC.GccAsCompiler, wx.Build.Cxx.GCC.GccAsLinker, wx.Build.Cxx.GCC.WindRes, wx.Build.Mono.Gmcs, wx.Build.MS.Cl, wx.Build.MS.Link, wx.Build.MS.RC, wx.Build.MS.Csc, wx.Build.MS.Al, wx.Build.Release.ReplaceVersionInRCFile, wx.Build.Release.ReplaceVersionInCSharpFile, and wx.Build.Release.CopyFileAction.

BuildProject wx.Build.IBuildAction.Project [get, set]

The project that requested this action. the result may be null if this instance also implements IBuildActionProvider and this instance is meant to be a action provider and not an action. Note, that projects may be set only once. This will be done by the infrastructure. Thus, do not use the setter.

Implemented in wx.Build.AlternativeBuildActions, wx.Build.SequenceOfBuildActions, and wx.Build.NamedAction.

IDictionary<string, EnvironmentVarInfo> wx.Build.IBuildAction.UsedVars [get]

This returns null since useually shell variables are not used by actions. summary> Execute the action and report errors, warnings, and other messages. This will start a build procedure either reusing results of previous builds (rebuild) or making everything from scratch. So, if the desired mode (refer to BuildConfig) is rebuild, this simply does nothing if this action already has been executed with the same prerequisites.

The build environment will pass an occasionally empty instance of class BuildToolFamilyEnv where this may retrieve or store information that other tools of the same family have created before or other tools of the same family may use later. Actions MUST ALSO WORK when started with an empty environment.

Parameters:
validityOfBuildSystem indicates the last change of either this DLL or the assembly defining the project. So, all action will be repeated (even if rebuild is specified) if the project definition changes or the implementation of the build system has been enhanced since the final build. This argument will be computed and propagated by the project.
env Thsi is an environment that different tools of the same family may use to exchange information. This store is typically used to save information on configuration files or thinsgs of that kind that will be shared among all tools of the same family.
Returns:
true on success and false on failure, that should however also be reported to the error handler.

Implemented in wx.Build.AlternativeBuildActions, wx.Build.SequenceOfBuildActions, wx.Build.NamedAction, wx.Build.Cxx.GCC.GccAsCompiler, wx.Build.Cxx.GCC.WindRes, wx.Build.MS.Cl, wx.Build.MS.Link, wx.Build.MS.RC, wx.Build.Release.ReplaceVersionInRCFile, and wx.Build.Release.ReplaceVersionInCSharpFile.


The wx.NET Build System.   (c) 2009-2010 Harald Meyer auf'm Hofe