wx.Build.BuildConfig Class Reference

List of all members.

Public Member Functions

void Add (BuildParameters param)
void AddOrReplace (BuildParameters param)
bool Contains (Type parameterType)

Static Public Member Functions

static ICollection
< IBuildActionProvider
ActionProvidersProducing (ContentType target, ICollection< ContentType > acceptablePrereqs)
 
Returns:
All action providers producing files of type target that only have prereqs from acceptablePrereqs.

static ICollection
< IBuildActionProvider
ActionProvidersProducing (ContentType target)
static
CollectionOfBuildActions 
ActionsProducing (BuildProject p, BuildToolFamilyEnv env, ContentFile target, ICollection< IBuildProduct > acceptablePrereqs)
static void CloseSectionInXmlLogFile ()
static void CloseXmlLogfile ()
static BuildConfig GetConfig (string name)
static BuildConfig GetConfig ()
static BuildParameters GetDefaultParameterOfType (Type parameterType)
static string GetFullPathname (string pathname)
static void HandleErrorObject (ErrorObject.MessageType messageType, string msg, params object[] objects)
static void HandleErrorObject (ErrorObject obj)
static void HandleMessageObject (string message, params object[] objects)
static bool KnowConfig (string name)
static void LogActionsOnXmlLogFile (ICollection< IBuildAction > actions)
static void LogBuildProductOnXmlFiles (IBuildProduct buildProduct)
static void LogContentFileOnXmlFile (ContentFile file)
static void LogContentFilesOnXmlFile (IFileProducts fileProducts)
static void LogFeaturesOnXmlLog (FeatureList list)
static void LogOnXmlFile (ErrorObject obj)
static void LogProjectOnXmlLogFile (BuildProject project, bool fullLog)
static void LogResourceDesignatorOnXmlFile (ResourceDesignator rd)
static void LogStartInfoOnXmlLogFile (System.Diagnostics.ProcessStartInfo startInfo)
static void NewConfigFrom (string nameOfTheNewConfiguration, string existingConfig, bool makeDefault)
static void NewConfigFrom (string nameOfTheNewConfiguration, string existingConfig)
static void OpenBuildActionSectionInXmlLogFile (IBuildAction action, bool fullLog)
static void OpenProjectSectionInXmlLogFile (BuildProject project, bool fullLog)
static void OpenSectionInXmlLogFile (string sectionName)
static void OpenXmlLogFile ()
static IBuildAction ProduceTargetWithPrereqs (BuildProject p, BuildToolFamilyEnv env, DateTime validityOfBuildSystem, ContentFile target, ICollection< IBuildProduct > acceptablePrereqs)
static bool RemoveConfig (string nameOfTheConfigToRemove)
static IBuildAction RunOneOfArgumens (BuildToolFamilyEnv env, DateTime validityOfBuildSystem, CollectionOfBuildActions actions)

Public Attributes

AbortOptions AbortOptions = AbortOptions.AlwaysTryToProduceASomehowUsefulTarget

Properties

static
IBuildActionProvider[] 
AllActionProviders [get]
ICollection
< BuildParameters
AllParams [get]
static ErrorHandler ConfiguredErrorHandler [get, set]
static string DefaultConfig [get, set]
static bool IsMacOsX [get]
static bool IsOpenXmlLogFile [get]
static bool IsUnix [get]
static bool IsWindows [get]
static ICollection
< string > 
KnownConfigs [get]
BuildMode Mode [get, set]
string Name [get]
static bool NotWindows [get]
static string PathRoot [get, set]
static string PathRootVariable [get, set]
BuildParameters this [Type parameterType] [get]
static string XmlLogFileName [get, set]


Detailed Description

A configuration is a named collection of BuildParameters. This configuration holds at most one parameterset of a type. Properties and methods fall into two groups: The state of an instance consists of a named collection of BuildParameters - the configuration. All build actions will use the same build configuration. So, ensure that this configuration holds an instance for each required parameter class.

The second group embraces (static) class properties and (static) class methods. These implement a database of configurations where one is defined to be the default. Before conducting build actions, users may be asked to choose a configuration. The default will be used, if the user uses standard. Each build program may redefine this.

Two configurations will be created by standard: "Debug" and "Release", where "Release" is the default


Member Function Documentation

static ICollection<IBuildActionProvider> wx.Build.BuildConfig.ActionProvidersProducing ( ContentType  target,
ICollection< ContentType acceptablePrereqs 
) [static]

Returns:
All action providers producing files of type target that only have prereqs from acceptablePrereqs.

.

Parameters:
target is the type of file that shall be produced conducting the requested action
acceptablePrereqs may be null in order to state that all providers of target are welcome.

static ICollection<IBuildActionProvider> wx.Build.BuildConfig.ActionProvidersProducing ( ContentType  target  )  [static]

All action providers producing files of type target .

Parameters:
target is the desired type of contents.

static CollectionOfBuildActions wx.Build.BuildConfig.ActionsProducing ( BuildProject  p,
BuildToolFamilyEnv  env,
ContentFile  target,
ICollection< IBuildProduct acceptablePrereqs 
) [static]

Returns a collection of actions that are able to produce target presupposing at most the content files from acceptablePrereqs . The actions will be initilaized with features .

Parameters:
p The project that requires these actions. This method will use the features of this project.
target The target that shall be created by the requested actions.
acceptablePrereqs The build products that can be supposed to exist. actions may refer to these products.
env An opportunity for tools of the same family to share state.

void wx.Build.BuildConfig.Add ( BuildParameters  param  ) 

Adds a parameter set to the configuration. This will raise an exception if a parameter of this class is already known to the configuration.

Parameters:
param Parameters to be set.

void wx.Build.BuildConfig.AddOrReplace ( BuildParameters  param  ) 

Adds the provided parameters to this configuration like Add(). However, if this already contains a parameter set of this class, this pre-existing parameters will be removed silently.

Parameters:
param Parameters to be set.

static void wx.Build.BuildConfig.CloseSectionInXmlLogFile (  )  [static]

This will close the deepest open section (XML node) on the XML logfile.

static void wx.Build.BuildConfig.CloseXmlLogfile (  )  [static]

This will close the XML log file if one has been opened.

bool wx.Build.BuildConfig.Contains ( Type  parameterType  ) 

True iff this contains a parameter of the provided class.

static BuildConfig wx.Build.BuildConfig.GetConfig ( string  name  )  [static]

Returns the designated configuration. This throws an System.ArgumentOutOfRangeException() if the configuration is not known.

Predefined configurations are "release", "debug".

static BuildConfig wx.Build.BuildConfig.GetConfig (  )  [static]

Returns the properties of the BuildConfig.DefaultConfig.

static BuildParameters wx.Build.BuildConfig.GetDefaultParameterOfType ( Type  parameterType  )  [static]

Returns an instance of the argument type from the currently selected default parameters. The most convenient accessor for parameters. Reads the default configuration. Reads the parameter of the provided type from this parameter set and returns it if this exists. Otherwise, calls default CTor on the provided type.

static string wx.Build.BuildConfig.GetFullPathname ( string  pathname  )  [static]

Returns the argument as full pathname. However, relative paths will be interpreted relatively to the PathRoot rather than to the current working directory.

static void wx.Build.BuildConfig.HandleErrorObject ( ErrorObject.MessageType  messageType,
string  msg,
params object[]  objects 
) [static]

Convenience function creating an ErrorObject and handing it to the configured error handler. This is a NOP if the build program didn't configure an error handler.

static void wx.Build.BuildConfig.HandleErrorObject ( ErrorObject  obj  )  [static]

Call this to handle an error obejct by the configures error handler. This is a NOP if the build program didn't configure an error handler.

static void wx.Build.BuildConfig.HandleMessageObject ( string  message,
params object[]  objects 
) [static]

Pass a message on the configured error.

Parameters:
message is the message where wild cards like {0} will be expanded by the corresponding item of objects .
objects is an arrayof error objects that might be used in the message format string.

static bool wx.Build.BuildConfig.KnowConfig ( string  name  )  [static]

Is true iff the name is the name of a known configuration.

Parameters:
name The suspected name of a configuration.

static void wx.Build.BuildConfig.LogActionsOnXmlLogFile ( ICollection< IBuildAction actions  )  [static]

static void wx.Build.BuildConfig.LogBuildProductOnXmlFiles ( IBuildProduct  buildProduct  )  [static]

static void wx.Build.BuildConfig.LogContentFileOnXmlFile ( ContentFile  file  )  [static]

static void wx.Build.BuildConfig.LogContentFilesOnXmlFile ( IFileProducts  fileProducts  )  [static]

static void wx.Build.BuildConfig.LogFeaturesOnXmlLog ( FeatureList  list  )  [static]

static void wx.Build.BuildConfig.LogOnXmlFile ( ErrorObject  obj  )  [static]

Creates an entry in the XML log file of one has been opened.

static void wx.Build.BuildConfig.LogProjectOnXmlLogFile ( BuildProject  project,
bool  fullLog 
) [static]

static void wx.Build.BuildConfig.LogResourceDesignatorOnXmlFile ( ResourceDesignator  rd  )  [static]

static void wx.Build.BuildConfig.LogStartInfoOnXmlLogFile ( System.Diagnostics.ProcessStartInfo  startInfo  )  [static]

static void wx.Build.BuildConfig.NewConfigFrom ( string  nameOfTheNewConfiguration,
string  existingConfig,
bool  makeDefault 
) [static]

Creates a new configuration that contains the same parameters as the argument and makes it the default one of specified.

static void wx.Build.BuildConfig.NewConfigFrom ( string  nameOfTheNewConfiguration,
string  existingConfig 
) [static]

Creates a new configuration that contains the same parameters as the argument.

static void wx.Build.BuildConfig.OpenBuildActionSectionInXmlLogFile ( IBuildAction  action,
bool  fullLog 
) [static]

static void wx.Build.BuildConfig.OpenProjectSectionInXmlLogFile ( BuildProject  project,
bool  fullLog 
) [static]

This will open a section on the provided project. Close thiw like any other section with CloseSectionInXmlLog().

static void wx.Build.BuildConfig.OpenSectionInXmlLogFile ( string  sectionName  )  [static]

This will open a new section (XML subnode) in the XML log file if one has been opened.

static void wx.Build.BuildConfig.OpenXmlLogFile (  )  [static]

static IBuildAction wx.Build.BuildConfig.ProduceTargetWithPrereqs ( BuildProject  p,
BuildToolFamilyEnv  env,
DateTime  validityOfBuildSystem,
ContentFile  target,
ICollection< IBuildProduct acceptablePrereqs 
) [static]

This will try to produce target presupposing acceptablePrereqs. This will first try to find ActionsProducing(). Then, they will be executed in order of ActionPriority until one succeeds.

Returns:
the successfully executed action or null in case of errors.
Parameters:
acceptablePrereqs Collection of those biuld products that are considered to be available.
p This is the project that requests the actions to produce the targets. This method will use the features of this project.
target The file that shall be created by the requested actions.
env An opportunity for actions of the same family to share state.
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.

static bool wx.Build.BuildConfig.RemoveConfig ( string  nameOfTheConfigToRemove  )  [static]

Remove the named configuration if it exists and return true. If is does not exist, return false.

static IBuildAction wx.Build.BuildConfig.RunOneOfArgumens ( BuildToolFamilyEnv  env,
DateTime  validityOfBuildSystem,
CollectionOfBuildActions  actions 
) [static]

Runs one out of the argument actions. This will run the actions from the argument until the first succeeds. This succeeding action will be returned. If all actions fail (or the argument is empty), the result will be null .

Note, that this method will run actions according to the current mode BuildConfig .GetConfig().Mode. If BuildMode.Rebuild is specified, this will test availability and validity of targets before conducting any actions.

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.


Member Data Documentation

AbortOptions wx.Build.BuildConfig.AbortOptions = AbortOptions.AlwaysTryToProduceASomehowUsefulTarget

Set whether to treat all warnings as errors.


Property Documentation

IBuildActionProvider [] wx.Build.BuildConfig.AllActionProviders [static, get]

All available action providers.

ICollection<BuildParameters> wx.Build.BuildConfig.AllParams [get]

This returns a collection of all contained parameters.

ErrorHandler wx.Build.BuildConfig.ConfiguredErrorHandler [static, get, set]

The globally used error handler. This may be null. In that case, the build program didn't specify an error handler. Thus, all operations will be conducted silently.

string wx.Build.BuildConfig.DefaultConfig [static, get, set]

Defines the default configuration. Read this to find out the name of the default configuration. If you set a new default configuration, please use an already known configuration name, since this will raise an System.ArgumentOutOfRangeException() if the new name is yet unknown.

If the new configuration contains a PreferredModeParameter, the mode of the operation will be changed accordingly.

bool wx.Build.BuildConfig.IsMacOsX [static, get]

True iff this is a Mac OS X system. This compares the platform specifier of the OS version with "MaxOSX" - in order to prevent compilation problems with mono.

bool wx.Build.BuildConfig.IsOpenXmlLogFile [static, get]

True iff the XML log file is open and active.

bool wx.Build.BuildConfig.IsUnix [static, get]

True iff this is a Unix machine - concluded from the OS version of the environment.

bool wx.Build.BuildConfig.IsWindows [static, get]

If this is neither Unix nor Max OS X, then this is a Windows derivate.

ICollection<string> wx.Build.BuildConfig.KnownConfigs [static, get]

Returns the name of all confirgurations.

BuildMode wx.Build.BuildConfig.Mode [get, set]

Returns the mode that shall be used by the tools and actions.

string wx.Build.BuildConfig.Name [get]

This is the name of the configuration.

bool wx.Build.BuildConfig.NotWindows [static, get]

True if this is not Windows.

string wx.Build.BuildConfig.PathRoot [static, get, set]

This returns or sets a base directory that will be used in instances of ContentFiles and FileSelector as base of non-rootet path names. Assigning a value to this property will cause ContentFile.NormalizeOriginalFileName() actions in all known projects.

Typically, this is the directory of the entry assembly, i.e. the place of the build program. However, for those cases, where the build program is not securely located relatively to the code base of the project, you may alternatively specify an environment variable (property PathRootVariable). By default, the name of this variable is the name of the pathroot variable

string wx.Build.BuildConfig.PathRootVariable [static, get, set]

This is the name of the environment variable that will be used to determine the path root of all non-rootet local pathnames. Refer to PathRoot. The standard value here is empty (no effect). However, build programs may change this.

BuildParameters wx.Build.BuildConfig.this[Type parameterType] (  )  [get]

This returns the parameter of the provided class if one exists. If the parameter is missing, the system will try to generate one using the default CTor. If this also fails, the result will be an System.IndexOutOfRangeException.

string wx.Build.BuildConfig.XmlLogFileName [static, get, set]

Returns or defines the name of the XML log file that will be created on OpenXmlLogFile().summary> Is an XmlLogFileName has been configured, this will create a new protocol file of this name and initialize for writing.


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