wx.Build.ContentFiles Class Reference

Designates a whole bunch of content files sharing the same content type. More...

Inheritance diagram for wx.Build.ContentFiles:

Inheritance graph

List of all members.

Public Member Functions

void Add (string filename)
void Add (ContentFile item)
void AddRange (ICollection< ContentFile > files)
void Clear ()
object Clone ()
int CompareTo (object o)
bool Contains (IBuildProduct file)
bool Contains (string filename)
bool Contains (ContentFile item)
 ContentFiles (ContentFiles src)
 ContentFiles (ContentType type, ContentFileLocation location, params string[] files)
 ContentFiles (ContentType type, params string[] files)
 ContentFiles ()
void CopyTo (ContentFile[] array, int arrayIndex)
override bool Equals (object obj)
bool Execute (BuildToolFamilyEnv env, DateTime validityOfBuildSystem)
IEnumerator
< ContentFile
GetEnumerator ()
override int GetHashCode ()
ContentFile GetOneFile ()
string GetOneFileName ()
ICollection
< RefToProject
GetProjects ()
System.Xml.Schema.XmlSchema GetSchema ()
ICollection
< IBuildProduct
GetTargets ()
DateTime GetValidity ()
DateTime GetValidityDemand ()
void NormalizeOriginalFileName (string nameOfAValidDirOrFile)
void ReadXml (System.Xml.XmlReader reader)
bool Remove (ContentFile item)
IFileProducts Replace (IFileProducts oldInstance, IFileProducts replacement)
void SetReadOnly ()
List< ContentFileToList ()
override string ToString ()
void WriteXml (System.Xml.XmlWriter writer)

Properties

int Count [get]
ContentFiles ExplicitFiles [get]
string[] Filenames [get]
ContentFiles Files [get]
bool IsReadOnly [get]
ICollection
< ContentFileLocation
Locations [get]
ContentType Type [get, set]


Detailed Description

Designates a whole bunch of content files sharing the same content type.

This is for instance useful in projects on linking that link objects from a whole number of sources together. This collection allows the declaration of projects that receive a whole number of files of the same type but of unknown number.

This always returns the least validity of a contained file. This, if only one contained file is missing, the validity will be DateTime.MinValue.

Please note, that this container will preserve the order in which the items have been added. This is important for many purposes. For instance, the GCC as linker requires the user to specify libraries in an order that reflects dependencies between them. Otherwise, the linker will fail to resolve all symbols.

Once created you may set this to be read-only. However, you will never set this to be writable again once it is for reading only. If this is read-only, all modifier will create exceptions.

This is also a IFileProducts that returns this content files as target without being associated with a building action.


Constructor & Destructor Documentation

wx.Build.ContentFiles.ContentFiles (  ) 

Use this to create an instance before using ReadXml().

wx.Build.ContentFiles.ContentFiles ( ContentType  type,
params string[]  files 
)

This produces a collection of file designators on the local file system ContentFileLocation .LocalFileSystem.

Parameters:
type is the common content type of all designated files. Please note, that this parameter will not take any effect if this is called without files.
files is a sequence of file names of type type . The file names may be relative to the directory of the entry assembly (not the current working directory).

wx.Build.ContentFiles.ContentFiles ( ContentType  type,
ContentFileLocation  location,
params string[]  files 
)

This produces a collection of file designators on the local file system ContentFileLocation.LocalFileSystem.

Parameters:
type is the common content type of all designated files.
location specifies the location of the designated files. Usually, this will describe files in the local file system. However, content files may also be part of the globale assembly cache and other places.
files is a sequence of file names of type type . If the local file system holds the designated files, the file names may be relative to the directory of the entry assembly (not the current working directory).

wx.Build.ContentFiles.ContentFiles ( ContentFiles  src  ) 

Copy CTor

Parameters:
src Source


Member Function Documentation

void wx.Build.ContentFiles.Add ( string  filename  ) 

Adds the designated file assuming consistent content type and a location in the local file system. This will raise an System.ArgumentException if this is read-only. Please note, that a file will appear twice in this list of it has been added twice.

void wx.Build.ContentFiles.Add ( ContentFile  item  ) 

Adds the argument to the contained files. This will raise an System.ArgumentException if this is read-only and a System.ArgumentException if the content type of the argument is inconsistent (not equal or containaed by to Type). Please note, that a file will appear twice in this list of it has been added twice.

void wx.Build.ContentFiles.AddRange ( ICollection< ContentFile files  ) 

Adds all members of the argument.

void wx.Build.ContentFiles.Clear (  ) 

After this this collection does not contain any filename. This will raise an System.ArgumentException if this is read-only.

object wx.Build.ContentFiles.Clone (  ) 

int wx.Build.ContentFiles.CompareTo ( object  o  ) 

bool wx.Build.ContentFiles.Contains ( IBuildProduct  file  ) 

True if this equals or the provided build product or the product is among its targets.

Parameters:
arg The build product that will be searched

Implements wx.Build.IFileProducts.

bool wx.Build.ContentFiles.Contains ( string  filename  ) 

True iff this contains a file of the provided name at location ContentFileLocation.LocalFileSystem.

bool wx.Build.ContentFiles.Contains ( ContentFile  item  ) 

True if this contains a file of the provided name of the provided content type.

void wx.Build.ContentFiles.CopyTo ( ContentFile[]  array,
int  arrayIndex 
)

override bool wx.Build.ContentFiles.Equals ( object  obj  ) 

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

Simply does nothing. Always reports success.

IEnumerator<ContentFile> wx.Build.ContentFiles.GetEnumerator (  ) 

override int wx.Build.ContentFiles.GetHashCode (  ) 

ContentFile wx.Build.ContentFiles.GetOneFile (  ) 

^This returns one of the contained files as ContentFile.

See also:
GetOneFileName

string wx.Build.ContentFiles.GetOneFileName (  ) 

This is one file that is contained. If this is empty, te result is null. Typically, this is the first filename that has been added.

ICollection<RefToProject> wx.Build.ContentFiles.GetProjects (  ) 

This returns null because this does not imply build projects.

Implements wx.Build.IBuildProduct.

System.Xml.Schema.XmlSchema wx.Build.ContentFiles.GetSchema (  ) 

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

Creates a collection of build objects that is equivalent to the represented files. This is useful when building collections of targets and preconditions.

DateTime wx.Build.ContentFiles.GetValidity (  ) 

Returns the least significant validity of a contained file. If only one of the contained files is missing, this will return DateTime .MinValue;

Implements wx.Build.IBuildObject.

DateTime wx.Build.ContentFiles.GetValidityDemand (  ) 

Returns the most significant validity of a contained file. If only one of the contained files is missing, this will return DateTime .MaxValue;

Implements wx.Build.IBuildObject.

void wx.Build.ContentFiles.NormalizeOriginalFileName ( string  nameOfAValidDirOrFile  ) 

You may use this method to control the form of the file name that will be used to serialize this (the original filename). The argument is a path to an existing file or directory. This will strip a directory information from this path. After that, the original file name will change to something equivalent to the absolute filename (referring to the same file) but now relative to the directory as specified by the argument.

Use this method to prepare content file instance for serialization in such a way that all file names become relative to the same directory.

Parameters:
nameOfAValidDirOrFile The name of an existing file or directory. This name will - if relative - be expanded using the BuildConfig. If this is null, this method will return without any effect. This may also be the name of a not yet existing file. In that case, however, the directory name shall exist.
See also:
OriginalFileName

Exceptions:
System.ArgumentException Will be raised if the argument is neither the path to an existing file nor directory.

Implements wx.Build.IFileProducts.

void wx.Build.ContentFiles.ReadXml ( System.Xml.XmlReader  reader  ) 

bool wx.Build.ContentFiles.Remove ( ContentFile  item  ) 

Removes item from the containes file names if the content type of item complies. Throws an System.ApplicationException, if this is read-only.

Returns:
true if an item has been removed.

IFileProducts wx.Build.ContentFiles.Replace ( IFileProducts  oldInstance,
IFileProducts  replacement 
)

Creates a copy where contained file descriptors have been changed. This will be used when projects are transformed e.g. to make a release (c.f. wx.Build.Release.MakeReleaseProject).

A special case occurs if replacement is null. This method can be used in this configuration to remove occurances of a file product term.

Exceptions:
System.Exception May occur, if the replacement is not of the same class as the old instance.
Parameters:
oldInstance The file descriptor that shall be replaced. If the replacement is null, all occurances of this descriptor will be removed.
replacemant The file descriptor that shall be used instead of oldInstance. This may be null. In that case, all occurances of oldInstance will be removed.
Returns:
A copy of this instance where all occurances of oldInstance have been replaced by replacement. The result may be replacement if this instance is equal to oldInstance. The result may be this instance if this is neither equal to oldInstance nor this is a container containing oldInstance.

The result is null if this equals oldInstance and the replacement is null.

Implements wx.Build.IFileProducts.

void wx.Build.ContentFiles.SetReadOnly (  ) 

Turns this into read-only mode. You may run this on already read-only instances. In this cases, this will be a NOP.

List<ContentFile> wx.Build.ContentFiles.ToList (  ) 

Returns a representation of this as list of content files.

override string wx.Build.ContentFiles.ToString (  ) 

void wx.Build.ContentFiles.WriteXml ( System.Xml.XmlWriter  writer  ) 


Property Documentation

int wx.Build.ContentFiles.Count [get]

Returns the number of containes files.

Implements wx.Build.IFileProducts.

ContentFiles wx.Build.ContentFiles.ExplicitFiles [get]

A collection of contained files that are addressed explicitely as instances of ContentFiles or ContentFile.

Implements wx.Build.IFileProducts.

string [] wx.Build.ContentFiles.Filenames [get]

A collection of the contained file names. This is in fact a copy of the containes filenames in order to prevent undesired side effects.

ContentFiles wx.Build.ContentFiles.Files [get]

This return this ... this itself is the target.

Implements wx.Build.IFileProducts.

bool wx.Build.ContentFiles.IsReadOnly [get]

True iff this is readonly and all modifiers will raise an System.ApplicationException.

ICollection<ContentFileLocation> wx.Build.ContentFiles.Locations [get]

Returns the collection locations of the contained files. In arbitrary order. Each location appears at most once.

ContentType wx.Build.ContentFiles.Type [get, set]

The content type associated with the contained files. This is in fact the least specific type that is guaranteed for all contained files. The files may have more specific types.

You may also set this type. However, the new type always shall contain the old one. This is useful if you want to add a file that is not contained be the current type. In that case, you may search for a type that implied the current type of this collection and contains the type of the file you want to add. If you found such a type, you may set it.

Implements wx.Build.IFileProducts.


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