WIP
DirectOutput framework for virtual pinball cabinets WIP
Go to:
Overview 
DirectOutput.General.FilePattern Class Reference

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

Inheritance 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.

Definition at line 12 of file FilePattern.cs.

Constructor & Destructor Documentation

DirectOutput.General.FilePattern.FilePattern ( string  Pattern)

Initializes a new instance of the FilePattern class.

Parameters
PatternThe file pattern.

Definition at line 221 of file FilePattern.cs.

DirectOutput.General.FilePattern.FilePattern ( )

Initializes a new instance of the FilePattern class.

Definition at line 245 of file FilePattern.cs.

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.

Definition at line 148 of file FilePattern.cs.

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.

Definition at line 116 of file FilePattern.cs.

System.Xml.Schema.XmlSchema DirectOutput.General.FilePattern.GetSchema ( )

Method is required by the IXmlSerializable interface

Returns
Returns always null

Definition at line 21 of file FilePattern.cs.

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

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

Definition at line 30 of file FilePattern.cs.

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.

Definition at line 97 of file FilePattern.cs.

override string DirectOutput.General.FilePattern.ToString ( )

Returns a System.String that represents this instance.

Returns
A System.String that represents this instance.

Definition at line 236 of file FilePattern.cs.

void DirectOutput.General.FilePattern.WriteXml ( System.Xml.XmlWriter  writer)

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

Definition at line 47 of file FilePattern.cs.

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.

Definition at line 169 of file FilePattern.cs.

string DirectOutput.General.FilePattern.Pattern
getset

Gets or sets the pattern used to look for files.

The pattern used to look for files.

Definition at line 80 of file FilePattern.cs.

Event Documentation

PropertyChangedEventHandler DirectOutput.General.FilePattern.PropertyChanged

Is fired if the value of a property changes.

Definition at line 59 of file FilePattern.cs.


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