DirectOutput
DirectOutput framework R2 for virtual pinball cabinets.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros Pages
DirectOutput.General.FilePattern Class Reference

A file pattern class used to lookup files matching a specified pattern. More...

Inheritance diagram for DirectOutput.General.FilePattern:
Collaboration diagram for DirectOutput.General.FilePattern:

Public Member Functions

System.Xml.Schema.XmlSchema GetSchema ()
 Method is required by the IXmlSerializable interface More...
 
void ReadXml (System.Xml.XmlReader reader)
 Deserializes the FilePattern in the XmlReader.
ReadXml is part of the IXmlSerializable interface. More...
 
void WriteXml (System.Xml.XmlWriter writer)
 Serializes the FilePattern to Xml.
WriteXml is part of the IXmlSerializable interface. More...
 
string ReplacePlaceholders (Dictionary< string, string > ReplaceValues=null)
 Returns the pattern with replaced placeholders. More...
 
List< FileInfo > GetMatchingFiles (Dictionary< string, string > ReplaceValues=null)
 Gets the files matching the value of the property Pattern. More...
 
FileInfo GetFirstMatchingFile (Dictionary< string, string > ReplaceValues=null)
 Gets the first file matching the value of the Pattern property. More...
 
 FilePattern (string Pattern)
 Initializes a new instance of the FilePattern class. More...
 
override string ToString ()
 Returns a System.String that represents this instance. More...
 
 FilePattern ()
 Initializes a new instance of the FilePattern class. More...
 

Properties

string Pattern [get, set]
 Gets or sets the pattern used to look for files. More...
 
bool IsValid [get]
 Gets a value indicating whether the Pattern is valid. More...
 

Events

PropertyChangedEventHandler PropertyChanged
 Is fired if the value of a property changes. More...
 

Detailed Description

A file pattern class used to lookup files matching a specified pattern.

Constructor & Destructor Documentation

DirectOutput.General.FilePattern.FilePattern ( string  Pattern)

Initializes a new instance of the FilePattern class.

Parameters
PatternThe file pattern.
DirectOutput.General.FilePattern.FilePattern ( )

Initializes a new instance of the FilePattern class.

Member Function Documentation

FileInfo DirectOutput.General.FilePattern.GetFirstMatchingFile ( Dictionary< string, string >  ReplaceValues = null)

Gets the first file matching the value of the Pattern property.

Parameters
ReplaceValuesDictionary containing key/value pairs used to replace placeholders in the form {PlaceHolder} in the pattern.
Returns
The first file matching the value of the Pattern property or null if no file matches the pattern.
List<FileInfo> DirectOutput.General.FilePattern.GetMatchingFiles ( Dictionary< string, string >  ReplaceValues = null)

Gets the files matching the value of the property Pattern.

Parameters
ReplaceValuesDictionary containing key/value pairs used to replace placeholders in the form {PlaceHolder} in the pattern.
Returns
The list of files matching the value of the property Pattern or a empty list if no file matches the pattern.
System.Xml.Schema.XmlSchema DirectOutput.General.FilePattern.GetSchema ( )

Method is required by the IXmlSerializable interface

Returns
Returns always null
void DirectOutput.General.FilePattern.ReadXml ( System.Xml.XmlReader  reader)

Deserializes the FilePattern in the XmlReader.
ReadXml is part of the IXmlSerializable interface.

string DirectOutput.General.FilePattern.ReplacePlaceholders ( Dictionary< string, string >  ReplaceValues = null)

Returns the pattern with replaced placeholders.

Parameters
ReplaceValuesA dictionary containg the replace values.
Returns
Pattern with replaced placeholders.
override string DirectOutput.General.FilePattern.ToString ( )

Returns a System.String that represents this instance.

Returns
A System.String that represents this instance.
void DirectOutput.General.FilePattern.WriteXml ( System.Xml.XmlWriter  writer)

Serializes the FilePattern to Xml.
WriteXml is part of the IXmlSerializable interface.

Property Documentation

bool DirectOutput.General.FilePattern.IsValid
get

Gets a value indicating whether the Pattern is valid.

true if the Pattern is valid; otherwise, false.

string DirectOutput.General.FilePattern.Pattern
getset

Gets or sets the pattern used to look for files.

The pattern used to look for files.

Event Documentation

PropertyChangedEventHandler DirectOutput.General.FilePattern.PropertyChanged

Is fired if the value of a property changes.


The documentation for this class was generated from the following file: