Click or drag to resize
PFSFile Class
A PFSFile object is the top level access to a PFS file.
Inheritance Hierarchy
SystemObject
  DHI.PFSPFSFile

Namespace: DHI.PFS
Assembly: DHI.PFS (in DHI.PFS.dll) Version: 16.0.0.0 (11.1.1.1111)
Syntax
public class PFSFile

The PFSFile type exposes the following members.

Constructors
  NameDescription
Public methodPFSFile(String)
Load the PFS file given by the filePath.
Public methodPFSFile(String, Boolean)
Load an existing PFSFile given by the filePath.
Top
Properties
  NameDescription
Public propertyCount
Return the number of targets present in a parameter file.
Public propertyCustomResultFolder
Custom result folder.

Overrides the ProjectResultFolder, if the UseCustomResultFolder flag is true.

Managed by MzShell, when the PFS file is used as part of an open MzShell project

Public propertyItemInt32
Return a reference to the n'th target of a parameter file.

Short version of GetTarget(Int32) with

GetTarget(targetIndex+1)

Public propertyItemString
Return a reference to the first instance of a specific target name of a parameter file.

Short version of GetTarget(String, Int32) with

GetTarget(targetName,1)

Public propertyItemString, Int32
Return a reference to the n'th instance of a specific target name of a parameter file.

Short version of GetTarget(String, Int32) with

GetTarget(targetName, targetIndex+1)

Public propertyProjectResultFolder
Project result folder. A global result folder defined for the entire MzShell project.

Managed by MzShell, when the PFS file is used as part of an open MzShell project

Public propertyUseCustomResultFolder
Use custom result folder.

Overrides the ProjectResultFolder with the CustomResultFolder, if the flag is true.

Managed by MzShell, when the PFS file is used as part of an open MzShell project

Top
Methods
  NameDescription
Public methodClose
Terminate the access to a parameter file data structure and free the associated internal storage.
Public methodDeleteTarget(Int32)
Delete a target section from this pfs file, by section number
Public methodDeleteTarget(String, Int32)
Delete a target section from this pfs file, by section name and named number
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetResultFolder
Evaluatet the actual result folder, based on default result folder, ProjectResultFolder, UseCustomResultFolder and CustomResultFolder.

The default result folder is the path of the pfs file, followed by

"\PfsFileName.pfs - Result Files\"
.

When a project result folder is defined, the result folder is the project result folder, followed by

"\PfsFileName.pfs - Result Files\"
.

When a custom result folder is defined, that is the location of the result folder.

Public methodGetSectionFromHandle
Try to find the given section based on the sectionPath.
Public methodGetTarget(Int32)
Return a reference to the n'th target of a parameter file.
Public methodGetTarget(Int32, Boolean)
Return a reference to the n'th target of a parameter file, null if not existing.
Public methodGetTarget(String, Int32)
Return a reference to the n'th instance of a specific target name of a parameter file.
Public methodGetTarget(String, Int32, Boolean)
Return a reference to the n'th instance of a specific target name of a parameter file, null if not existing
Public methodGetTargetsCount
Return the number of targets present in a parameter file.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInsertNewTarget
Insert a new target section with specified name into this pfs file at the specified position
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWrite
Write the contents of a PFS object to file
Top
Extension Methods
  NameDescription
Public Extension MethodFindSection
Look in all targets of the pfs file and try find a section with the provided section name. It will not recurse into sub-sections, but only "level-2" sections are looked for.
(Defined by PFSExtensions.)
Top
Examples
Example of use:
// Load/Read file
PFSFile pfsFile = new PFSFile(filePath, false);

// Outmost section
PFSSection target = pfsFile.GetTarget("Run11", 1);

// Sub-sections
PFSSection section1 = target.GetSection("Results", 1);
PFSSection section2 = section1.GetSection("Result", 1);

// Keywords and paramters
string id = section2.GetKeyword("outid", 1).GetParameter(1).ToString();
See Also