Paths
System paths.
Properties
public static string AppNameWithVersion { get; }
value = Paths.AppNameWithVersion
App title with version.
public static string BuildVersion { get; }
value = Paths.BuildVersion
Build info version.
public static Assembly EntryAssembly { get; }
value = Paths.EntryAssembly
Entry assembly.
public static string InstalledVersion { get; }
value = Paths.InstalledVersion
Installed version of the product.
Methods
public static ISerializer<T> CreateSerializer<T>(bool bom)
result = Paths.CreateSerializer(bom)
Create serializer.
- bom
- Serializer adds UTF8 BOM preamble.
Returns: Serializer.
public static ValueTask<T> DeserializeAsync<T>(string filePath, IFileSystem fileSystem, CancellationToken cancellationToken)
result = Paths.DeserializeAsync(filePath, fileSystem, cancellationToken)
Deserialize value from the specified file.
- filePath
- File path.
- fileSystem
- File system.
- cancellationToken
- CancellationToken
Returns: Value.
public static ValueTask<T> DeserializeAsync<T>(string filePath, CancellationToken cancellationToken)
result = Paths.DeserializeAsync(filePath, cancellationToken)
Deserialize value from the specified file.
- filePath
- File path.
- cancellationToken
- CancellationToken
Returns: Value.
public static void DeserializeFromString<T>(T value, string str)
Paths.DeserializeFromString(value, str)
Deserialize state from .
- value
- Value.
- str
- String value.
public static ValueTask<T> DeserializeOrThrowAsync<T>(string filePath, IFileSystem fileSystem, CancellationToken cancellationToken)
result = Paths.DeserializeOrThrowAsync(filePath, fileSystem, cancellationToken)
Deserialize value from the specified file.
- filePath
- File path.
- fileSystem
- File system.
- cancellationToken
- CancellationToken
Returns: Value.
public static ValueTask<T> DeserializeOrThrowAsync<T>(string filePath, CancellationToken cancellationToken)
result = Paths.DeserializeOrThrowAsync(filePath, cancellationToken)
Deserialize value from the specified file.
- filePath
- File path.
- cancellationToken
- CancellationToken
Returns: Value.
public static T DeserializeOrThrow<T>(string filePath, IFileSystem fileSystem)
result = Paths.DeserializeOrThrow(filePath, fileSystem)
Deserialize value from the specified file.
- filePath
- File path.
- fileSystem
- File system.
Returns: Value.
public static T DeserializeOrThrow<T>(string filePath)
result = Paths.DeserializeOrThrow(filePath)
Deserialize value from the specified file.
- filePath
- File path.
Returns: Value.
public static T Deserialize<T>(string filePath, IFileSystem fileSystem)
result = Paths.Deserialize(filePath, fileSystem)
Deserialize value from the specified file.
- filePath
- File path.
- fileSystem
- File system.
Returns: Value.
public static T Deserialize<T>(Stream data)
result = Paths.Deserialize(data)
Deserialize value from the serialized data.
- data
- Serialized data.
Returns: Value.
public static T Deserialize<T>(string filePath)
result = Paths.Deserialize(filePath)
Deserialize value from the specified file.
- filePath
- File path.
Returns: Value.
public static T Deserialize<T>(byte[] data)
result = Paths.Deserialize(data)
Deserialize value from the serialized data.
- data
- Serialized data.
Returns: Value.
public static IEnumerable<string> EnumerateConfigs(string path, string filter)
result = Paths.EnumerateConfigs(path, filter)
Returns an files with DefaultSettingsExt extension.
- path
- The relative or absolute path to the directory to search.
- filter
- The search string to match against the names of files in path.
Returns: Files.
public static IEnumerable<string> EnumerateConfigs(string path, IFileSystem fileSystem, string filter)
result = Paths.EnumerateConfigs(path, fileSystem, filter)
Returns an files with DefaultSettingsExt extension.
- path
- The relative or absolute path to the directory to search.
- fileSystem
- File system.
- filter
- The search string to match against the names of files in path.
Returns: Files.
public static string GetAppDataPath(string appDataPath, string appName)
result = Paths.GetAppDataPath(appDataPath, appName)
Get AppDataPath.
- appDataPath
- Relative AppDataPath.
- appName
- AppName2
Returns: AppDataPath
public static string GetDocUrl(string docUrl)
result = Paths.GetDocUrl(docUrl)
To create localized url.
- docUrl
- Help topic.
Returns: Localized url.
public static string GetFileName(Guid id)
result = Paths.GetFileName(id)
Get file name for the specified id.
- id
- Identifier.
Returns: File name.
public static string GetFileNameWithoutExtension(Guid id, char? by)
result = Paths.GetFileNameWithoutExtension(id, by)
Get file name without extension for the specified id.
- id
- Identifier.
- by
- Replacing character.
Returns: File name without extension.
public static string GetHistoryDataPath(string startDir)
result = Paths.GetHistoryDataPath(startDir)
Get history data path.
- startDir
- Directory.
Returns: History data path.
public static string GetLogoUrl()
result = Paths.GetLogoUrl()
Get logo url.
Returns: Logo url.
public static string GetNuGetGlobalPackagesFolder()
result = Paths.GetNuGetGlobalPackagesFolder()
Get NuGet global packages folder path.
Returns: Path to NuGet global packages folder.
public static string GetPageUrl(long id, object urlPart)
result = Paths.GetPageUrl(id, urlPart)
Get page url.
- id
- Page id.
- urlPart
- Url part (topic id, file name etc.).
Returns: Localized url.
public static string GetWebSiteUrl()
result = Paths.GetWebSiteUrl()
Get website url.
Returns: Localized url.
public static bool IsConfigExists(string configFile, IFileSystem fileSystem)
result = Paths.IsConfigExists(configFile, fileSystem)
Determines the specified config file exists.
- configFile
- Config file.
- fileSystem
- File system.
Returns: Check result.
public static bool IsConfigExists(string configFile)
result = Paths.IsConfigExists(configFile)
Determines the specified config file exists.
- configFile
- Config file.
Returns: Check result.
public static string MakeBackup(string filePath)
result = Paths.MakeBackup(filePath)
Make the specified with Backup extension.
- filePath
- File path.
Returns: File path.
public static void MoveToBackup(string filePath, IFileSystem fileSystem, string backupFilePath)
Paths.MoveToBackup(filePath, fileSystem, backupFilePath)
Rename the specified file with Backup extension.
- filePath
- File path.
- fileSystem
- File system.
- backupFilePath
- Backup file path.
public static void ResetInstalledVersionCache()
Paths.ResetInstalledVersionCache()
Reset installed version cache so it would be re-generated next time when it's requested.
public static string SerializeToString<T>(T value, bool bom)
result = Paths.SerializeToString(value, bom)
Serialize state into String value.
- value
- Value.
- bom
- Serializer adds UTF8 BOM preamble.
Returns: String value.
public static void Serialize<T>(T value, string filePath, bool bom)
Paths.Serialize(value, filePath, bom)
Serialize value into the specified file.
- value
- Value.
- filePath
- File path.
- bom
- Add UTF8 BOM preamble.
public static void Serialize<T>(T value, IFileSystem fileSystem, string filePath, bool bom)
Paths.Serialize(value, fileSystem, filePath, bom)
Serialize value into the specified file.
- value
- Value.
- fileSystem
- File system.
- filePath
- File path.
- bom
- Add UTF8 BOM preamble.
public static byte[] Serialize<T>(T value, bool bom)
result = Paths.Serialize(value, bom)
Serialize value into byte array.
- value
- Value.
- bom
- Add UTF8 BOM preamble.
Returns: Serialized data.
public static string TryBuildDocUrl(string urlPart)
result = Paths.TryBuildDocUrl(urlPart)
Try to build documentation URL.
- urlPart
- URL part.
Returns: Absolute URL.
public static string TryGetInstalledPath(long productId, IFileSystem fileSystem)
result = Paths.TryGetInstalledPath(productId, fileSystem)
Try get installed path by product id.
- productId
- Identifier.
- fileSystem
- File system.
Returns: Installed path.
public static string TryGetInstalledVersion(string productInstallPath, IFileSystem fileSystem)
result = Paths.TryGetInstalledVersion(productInstallPath, fileSystem)
Get currently installed version of the product.
- productInstallPath
- File system path to product installation.
- fileSystem
- File system.
Returns: Installed version of the product.
Fields
public static readonly string AppDataPath
value = Paths.AppDataPath
The path to the settings directory.
public static readonly string CandlePatternsFile
value = Paths.CandlePatternsFile
The path to the file with candle patterns.
public static readonly string CompanyPath
value = Paths.CompanyPath
The path to directory with all applications.
public static readonly string CompilerCacheDir
value = Paths.CompilerCacheDir
The path to the compiler cache directory.
public static readonly string CredentialsFile
value = Paths.CredentialsFile
The path to the file with credentials.
public const string DefaultSettingsExt
value = Paths.DefaultSettingsExt
Default extension for settings file.
public static readonly IFileSystem FileSystem
value = Paths.FileSystem
Default file system.
public static readonly DateTime HistoryBeginDate
value = Paths.HistoryBeginDate
Begin date of HistoryDataPath.
public static readonly string HistoryDataPath
value = Paths.HistoryDataPath
Sample history data.
public const string HistoryDefaultSecurity
value = Paths.HistoryDefaultSecurity
Sample history data security.
public const string HistoryDefaultSecurity2
value = Paths.HistoryDefaultSecurity2
Sample history data security.
public static readonly DateTime HistoryEndDate
value = Paths.HistoryEndDate
End date of HistoryDataPath.
public const string InstallerConsoleName
value = Paths.InstallerConsoleName
Installer console exe name.
public static readonly string InstallerDir
value = Paths.InstallerDir
The path to the installer directory.
public static readonly string InstallerInstallationsConfigPath
value = Paths.InstallerInstallationsConfigPath
The path to the installer directory.
public const string InstallerUIName
value = Paths.InstallerUIName
Installer UI exe name.
public static readonly string PlatformConfigurationFile
value = Paths.PlatformConfigurationFile
The path to the configuration file of platform definition.
public static readonly string ProxyConfigurationFile
value = Paths.ProxyConfigurationFile
The path to the configuration file of proxy settings.
public static readonly string PythonUtilsPath
value = Paths.PythonUtilsPath
The path to the Python utils directory.
public static readonly string ReportLogsPath
value = Paths.ReportLogsPath
The path to the settings directory.
public static readonly string SecurityExtendedInfo
value = Paths.SecurityExtendedInfo
The path to the directory with securities extended info.
public static readonly string SecurityMappingDir
value = Paths.SecurityMappingDir
The path to the directory with securities id mapping.
public static readonly string SecurityNativeIdDir
value = Paths.SecurityNativeIdDir
The path to the directory with native security identifiers.
public static readonly string SnapshotsDir
value = Paths.SnapshotsDir
The path to the directory with snapshots of market data.
public static readonly string StorageDir
value = Paths.StorageDir
The path to the directory with market data.
public const string TokenBasedEmail
value = Paths.TokenBasedEmail
Email in case Token.