C# Class Prebuild.Core.Utilities.Helper

Afficher le fichier Open project: aurora-sim/Aurora-Libs

Méthodes publiques

Méthode Description
AssemblyFullName ( string assemblyName, ProjectType projectType ) : string

AttributeValue ( XmlNode node, string attr, string def ) : string

Attributes the value.

CheckType ( Type typeToCheck, Type attr, Type inter ) : object

Checks the type.

DeleteIfExists ( string file ) : bool

Deletes if exists.

EndPath ( string path ) : string

Ends the path.

EndPath ( string path, char separatorCharacter ) : string

Ends the path.

EnumAttributeValue ( XmlNode node, string attr, Type enumType, object def ) : object

Enums the attribute value.

FindGroups ( string target, string beforeGroup, string afterGroup, bool includeDelimitersInSubstrings ) : StringCollection

Gets a collection of StringLocationPair objects that represent the matches

InterpolateForEnvironmentVariables ( string target ) : string

Replaces ${var} statements in a string with the corresonding environment variable with name var

InterpolateForVariables ( string target, StringLookup lookup ) : string

Replaces ${var} statements in a string with the corresonding values as detirmined by the lookup delegate

MakeFilePath ( string path, string name ) : string

Makes the file path.

MakeFilePath ( string path, string name, string ext ) : string

Makes the file path.

MakePathRelativeTo ( string startPath, string endPath ) : string

Makes a relative path

MakeReferencePath ( string path ) : string

NormalizePath ( string path ) : string

Normalizes the path.

NormalizePath ( string path, char separatorCharacter ) : string

Normalizes the path.

ParseBoolean ( XmlNode node, string attr, bool defaultValue ) : bool

Parses the boolean.

ReplaceGroups ( string target, string beforeGroup, string afterGroup, StringLookup lookup ) : string

Replaces the groups.

ResolvePath ( string path ) : string

Resolves the path.

SetCurrentDir ( string path ) : void

Sets the current dir.

TranslateValue ( Type translateType, string translationItem ) : object

Translates the value.

Private Methods

Méthode Description
Helper ( ) : System

Initializes the Helper class.

Method Details

AssemblyFullName() public static méthode

public static AssemblyFullName ( string assemblyName, ProjectType projectType ) : string
assemblyName string
projectType ProjectType
Résultat string

AttributeValue() public static méthode

Attributes the value.
public static AttributeValue ( XmlNode node, string attr, string def ) : string
node System.Xml.XmlNode The node.
attr string The attr.
def string The def.
Résultat string

CheckType() public static méthode

Checks the type.
public static CheckType ( Type typeToCheck, Type attr, Type inter ) : object
typeToCheck System.Type The type to check.
attr System.Type The attr.
inter System.Type The inter.
Résultat object

DeleteIfExists() public static méthode

Deletes if exists.
public static DeleteIfExists ( string file ) : bool
file string The file.
Résultat bool

EndPath() public static méthode

Ends the path.
public static EndPath ( string path ) : string
path string The path.
Résultat string

EndPath() public static méthode

Ends the path.
public static EndPath ( string path, char separatorCharacter ) : string
path string The path.
separatorCharacter char The separator character.
Résultat string

EnumAttributeValue() public static méthode

Enums the attribute value.
public static EnumAttributeValue ( XmlNode node, string attr, Type enumType, object def ) : object
node System.Xml.XmlNode The node.
attr string The attr.
enumType System.Type Type of the enum.
def object The def.
Résultat object

FindGroups() public static méthode

Gets a collection of StringLocationPair objects that represent the matches
public static FindGroups ( string target, string beforeGroup, string afterGroup, bool includeDelimitersInSubstrings ) : StringCollection
target string The target.
beforeGroup string The before group.
afterGroup string The after group.
includeDelimitersInSubstrings bool if set to true [include delimiters in substrings].
Résultat System.Collections.Specialized.StringCollection

InterpolateForEnvironmentVariables() public static méthode

Replaces ${var} statements in a string with the corresonding environment variable with name var
public static InterpolateForEnvironmentVariables ( string target ) : string
target string
Résultat string

InterpolateForVariables() public static méthode

Replaces ${var} statements in a string with the corresonding values as detirmined by the lookup delegate
public static InterpolateForVariables ( string target, StringLookup lookup ) : string
target string The target.
lookup StringLookup The lookup.
Résultat string

MakeFilePath() public static méthode

Makes the file path.
public static MakeFilePath ( string path, string name ) : string
path string The path.
name string The name.
Résultat string

MakeFilePath() public static méthode

Makes the file path.
public static MakeFilePath ( string path, string name, string ext ) : string
path string The path.
name string The name.
ext string The ext.
Résultat string

MakePathRelativeTo() public static méthode

Makes a relative path
public static MakePathRelativeTo ( string startPath, string endPath ) : string
startPath string Path to start from
endPath string Path to end at
Résultat string

MakeReferencePath() public static méthode

public static MakeReferencePath ( string path ) : string
path string
Résultat string

NormalizePath() public static méthode

Normalizes the path.
public static NormalizePath ( string path ) : string
path string The path.
Résultat string

NormalizePath() public static méthode

Normalizes the path.
public static NormalizePath ( string path, char separatorCharacter ) : string
path string The path.
separatorCharacter char The separator character.
Résultat string

ParseBoolean() public static méthode

Parses the boolean.
public static ParseBoolean ( XmlNode node, string attr, bool defaultValue ) : bool
node System.Xml.XmlNode The node.
attr string The attr.
defaultValue bool if set to true [default value].
Résultat bool

ReplaceGroups() public static méthode

Replaces the groups.
public static ReplaceGroups ( string target, string beforeGroup, string afterGroup, StringLookup lookup ) : string
target string The target.
beforeGroup string The before group.
afterGroup string The after group.
lookup StringLookup The lookup.
Résultat string

ResolvePath() public static méthode

Resolves the path.
public static ResolvePath ( string path ) : string
path string The path.
Résultat string

SetCurrentDir() public static méthode

Sets the current dir.
public static SetCurrentDir ( string path ) : void
path string The path.
Résultat void

TranslateValue() public static méthode

Translates the value.
public static TranslateValue ( Type translateType, string translationItem ) : object
translateType System.Type Type of the translate.
translationItem string The translation item.
Résultat object