Table of Contents

Class Paths

Namespace
StockSharp.Configuration
Assembly
StockSharp.Configuration.dll

System paths.

public static class Paths
Inheritance
Paths
Inherited Members

Fields

AppDataPath

The path to the settings directory.

public static readonly string AppDataPath

Field Value

string

AppName

App title.

public static readonly string AppName

Field Value

string

BackupExt

Backup extension for settings file.

public const string BackupExt = ".bak"

Field Value

string

CandlePatternsFile

The path to the file with candle patterns.

public static readonly string CandlePatternsFile

Field Value

string

CompanyPath

The path to directory with all applications.

public static readonly string CompanyPath

Field Value

string

CompilerCacheDir

The path to the compiler cache directory.

public static readonly string CompilerCacheDir

Field Value

string

CredentialsFile

The path to the file with credentials.

public static readonly string CredentialsFile

Field Value

string

CsEx

CS file extension.

public const string CsEx = ".cs"

Field Value

string

DefaultSettingsExt

Default extension for settings file.

public const string DefaultSettingsExt = ".json"

Field Value

string

DllEx

Assembly file extension.

public const string DllEx = ".dll"

Field Value

string

HistoryBeginDate

Begin date of HistoryDataPath.

public static readonly DateTime HistoryBeginDate

Field Value

DateTime

HistoryDataPath

Sample history data.

public static readonly string HistoryDataPath

Field Value

string

HistoryEndDate

End date of HistoryDataPath.

public static readonly DateTime HistoryEndDate

Field Value

DateTime

InstallerConsoleName

Installer console exe name.

public const string InstallerConsoleName = "StockSharp.Installer.Console"

Field Value

string

InstallerDir

The path to the installer directory.

public static readonly string InstallerDir

Field Value

string

InstallerInstallationsConfigPath

The path to the installer directory.

public static readonly string InstallerInstallationsConfigPath

Field Value

string

InstallerUIName

Installer UI exe name.

public const string InstallerUIName = "StockSharp.Installer.UI"

Field Value

string

JsonEx

JSON file extension.

public const string JsonEx = ".json"

Field Value

string

LogsDir

The path to the logs directory.

public static readonly string LogsDir

Field Value

string

PlatformConfigurationFile

The path to the configuration file of platform definition.

public static readonly string PlatformConfigurationFile

Field Value

string

ProxyConfigurationFile

The path to the configuration file of proxy settings.

public static readonly string ProxyConfigurationFile

Field Value

string

ReportLogsPath

The path to the settings directory.

public static readonly string ReportLogsPath

Field Value

string

SecurityExtendedInfo

The path to the directory with securities extended info.

public static readonly string SecurityExtendedInfo

Field Value

string

SecurityMappingDir

The path to the directory with securities id mapping.

public static readonly string SecurityMappingDir

Field Value

string

SecurityNativeIdDir

The path to the directory with native security identifiers.

public static readonly string SecurityNativeIdDir

Field Value

string

SetupName

Setup name.

public const string SetupName = "stocksharp_setup"

Field Value

string

SnapshotsDir

The path to the directory with snapshots of market data.

public static readonly string SnapshotsDir

Field Value

string

StorageDir

The path to the directory with market data.

public static readonly string StorageDir

Field Value

string

TokenBasedEmail

Ecng.ComponentModel.ServerCredentials.Email in case Ecng.ComponentModel.ServerCredentials.Token.

public const string TokenBasedEmail = "x"

Field Value

string

Properties

AppName2

public static string AppName2 { get; }

Property Value

string

AppNameWithVersion

App title with version.

public static string AppNameWithVersion { get; }

Property Value

string

Bot

Bot in Telegram.

public static string Bot { get; }

Property Value

string

BuildVersion

Build info version.

public static string BuildVersion { get; }

Property Value

string

Chat

Chat in Telegram.

public static string Chat { get; }

Property Value

string

Domain

Web site domain.

public static string Domain { get; }

Property Value

string

EntryAssembly

Entry assembly.

public static Assembly EntryAssembly { get; }

Property Value

Assembly

InstalledVersion

Installed version of the product.

public static string InstalledVersion { get; }

Property Value

string

Methods

CreateSerializer<T>(bool)

Create serializer.

public static ISerializer<T> CreateSerializer<T>(bool bom = true)

Parameters

bom bool

Serializer adds UTF8 BOM preamble.

Returns

ISerializer<T>

Serializer.

Type Parameters

T

Value type.

DeserializeFromString<T>(T, string)

Deserialize value state from str.

public static void DeserializeFromString<T>(this T value, string str) where T : IPersistable

Parameters

value T

Value.

str string

string value.

Type Parameters

T

Type of value.

DeserializeOrThrow<T>(string)

Deserialize value from the specified file.

public static T DeserializeOrThrow<T>(this string filePath)

Parameters

filePath string

File path.

Returns

T

Value.

Type Parameters

T

Value type.

DeserializeWithMigration<T>(string)

[Obsolete("Use Deserialize instead.")]
public static T DeserializeWithMigration<T>(this string filePath)

Parameters

filePath string

Returns

T

Type Parameters

T

Deserialize<T>(byte[])

Deserialize value from the serialized data.

public static T Deserialize<T>(this byte[] data)

Parameters

data byte[]

Serialized data.

Returns

T

Value.

Type Parameters

T

Value type.

Deserialize<T>(Stream)

Deserialize value from the serialized data.

public static T Deserialize<T>(this Stream data)

Parameters

data Stream

Serialized data.

Returns

T

Value.

Type Parameters

T

Value type.

Deserialize<T>(string)

Deserialize value from the specified file.

public static T Deserialize<T>(this string filePath)

Parameters

filePath string

File path.

Returns

T

Value.

Type Parameters

T

Value type.

EnumerateConfigs(string, string)

Returns an files with DefaultSettingsExt extension.

public static IEnumerable<string> EnumerateConfigs(this string path, string filter = "*")

Parameters

path string

The relative or absolute path to the directory to search.

filter string

The search string to match against the names of files in path.

Returns

IEnumerable<string>

Files.

GetAppDataPath(string, string)

public static string GetAppDataPath(string appDataPath, string appName)

Parameters

appDataPath string

Relative AppDataPath.

appName string

AppName2

Returns

string

AppDataPath

GetDocUrl(string)

To create localized url.

public static string GetDocUrl(string docUrl)

Parameters

docUrl string

Help topic.

Returns

string

Localized url.

GetFileName(Guid)

Get file name for the specified id.

public static string GetFileName(this Guid id)

Parameters

id Guid

Identifier.

Returns

string

File name.

GetFileNameWithoutExtension(Guid, char?)

Get file name without extension for the specified id.

public static string GetFileNameWithoutExtension(this Guid id, char? by = '_')

Parameters

id Guid

Identifier.

by char?

Replacing character.

Returns

string

File name without extension.

GetHistoryDataPath(string)

Get history data path.

public static string GetHistoryDataPath(string startDir)

Parameters

startDir string

Directory.

Returns

string

History data path.

GetLogoUrl()

Get logo url.

public static string GetLogoUrl()

Returns

string

Logo url.

GetPageUrl(long, object)

Get page url.

public static string GetPageUrl(long id, object urlPart = null)

Parameters

id long

Page id.

urlPart object

Url part (topic id, file name etc.).

Returns

string

Localized url.

GetWebSiteUrl()

Get website url.

public static string GetWebSiteUrl()

Returns

string

Localized url.

IsConfigExists(string)

Determines the specified config file exists.

public static bool IsConfigExists(this string configFile)

Parameters

configFile string

Config file.

Returns

bool

Check result.

MakeBackup(string)

Make the specified filePath with BackupExt extension.

public static string MakeBackup(this string filePath)

Parameters

filePath string

File path.

Returns

string

File path.

MoveToBackup(string, string)

Rename the specified file with BackupExt extension.

public static void MoveToBackup(this string filePath, string backupFilePath = null)

Parameters

filePath string

File path.

backupFilePath string

Backup file path.

ResetInstalledVersionCache()

Reset installed version cache so it would be re-generated next time when it's requested.

public static void ResetInstalledVersionCache()

SerializeToString<T>(T, bool)

Serialize value state into string value.

public static string SerializeToString<T>(this T value, bool bom = true)

Parameters

value T

Value.

bom bool

Serializer adds UTF8 BOM preamble.

Returns

string

string value.

Type Parameters

T

Type of value.

Serialize<T>(T, bool)

Serialize value into byte array.

public static byte[] Serialize<T>(this T value, bool bom = true)

Parameters

value T

Value.

bom bool

Add UTF8 BOM preamble.

Returns

byte[]

Serialized data.

Type Parameters

T

Value type.

Serialize<T>(T, string, bool)

Serialize value into the specified file.

public static void Serialize<T>(this T value, string filePath, bool bom = true)

Parameters

value T

Value.

filePath string

File path.

bom bool

Add UTF8 BOM preamble.

Type Parameters

T

Value type.

TryBuildDocUrl(string)

Try to build documentation URL.

public static string TryBuildDocUrl(this string urlPart)

Parameters

urlPart string

URL part.

Returns

string

Absolute URL.

TryGetInstalledPath(long)

Try get installed path by product id.

public static string TryGetInstalledPath(long productId)

Parameters

productId long

Identifier.

Returns

string

Installed path.

TryGetInstalledVersion(string)

Get currently installed version of the product.

public static string TryGetInstalledVersion(string productInstallPath)

Parameters

productInstallPath string

File system path to product installation.

Returns

string

Installed version of the product.