C# Class Prebuild.Core.Utilities.Helper

Mostrar archivo Open project: aurora-sim/Aurora-Libs

Public Methods

Method 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

Method Description
Helper ( ) : System

Initializes the Helper class.

Method Details

AssemblyFullName() public static method

public static AssemblyFullName ( string assemblyName, ProjectType projectType ) : string
assemblyName string
projectType ProjectType
return string

AttributeValue() public static method

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.
return string

CheckType() public static method

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.
return object

DeleteIfExists() public static method

Deletes if exists.
public static DeleteIfExists ( string file ) : bool
file string The file.
return bool

EndPath() public static method

Ends the path.
public static EndPath ( string path ) : string
path string The path.
return string

EndPath() public static method

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

EnumAttributeValue() public static method

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.
return object

FindGroups() public static method

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].
return System.Collections.Specialized.StringCollection

InterpolateForEnvironmentVariables() public static method

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

InterpolateForVariables() public static method

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.
return string

MakeFilePath() public static method

Makes the file path.
public static MakeFilePath ( string path, string name ) : string
path string The path.
name string The name.
return string

MakeFilePath() public static method

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.
return string

MakePathRelativeTo() public static method

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

MakeReferencePath() public static method

public static MakeReferencePath ( string path ) : string
path string
return string

NormalizePath() public static method

Normalizes the path.
public static NormalizePath ( string path ) : string
path string The path.
return string

NormalizePath() public static method

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

ParseBoolean() public static method

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].
return bool

ReplaceGroups() public static method

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.
return string

ResolvePath() public static method

Resolves the path.
public static ResolvePath ( string path ) : string
path string The path.
return string

SetCurrentDir() public static method

Sets the current dir.
public static SetCurrentDir ( string path ) : void
path string The path.
return void

TranslateValue() public static method

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