StockSharp.Configuration 5.0.214

Prefix Reserved
dotnet add package StockSharp.Configuration --version 5.0.214
                    
NuGet\Install-Package StockSharp.Configuration -Version 5.0.214
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="StockSharp.Configuration" Version="5.0.214" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="StockSharp.Configuration" Version="5.0.214" />
                    
Directory.Packages.props
<PackageReference Include="StockSharp.Configuration" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add StockSharp.Configuration --version 5.0.214
                    
#r "nuget: StockSharp.Configuration, 5.0.214"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package StockSharp.Configuration@5.0.214
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=StockSharp.Configuration&version=5.0.214
                    
Install as a Cake Addin
#tool nuget:?package=StockSharp.Configuration&version=5.0.214
                    
Install as a Cake Tool

StockSharp.Configuration

StockSharp.Configuration is a .NET Standard library that centralizes various configuration facilities used by the StockSharp trading platform. It provides classes for storing application paths, loading settings, managing user credentials, and constructing message adapters. The assembly is titled S#.Configuration and described as "Configuration components."

Features

  • System paths – the Paths class defines all important directories and files used by StockSharp. Paths are initialized from PathsHolder and configuration files, as shown below:
    var companyPath = PathsHolder.CompanyPath ?? ConfigManager.TryGet<string>("companyPath");
    CompanyPath = companyPath.IsEmpty() ? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "StockSharp") : companyPath.ToFullPathIfNeed();
    CredentialsFile = Path.Combine(CompanyPath, $"credentials{DefaultSettingsExt}");
    PlatformConfigurationFile = Path.Combine(AppDataPath, $"platform_config{DefaultSettingsExt}");
    
    【F:Configuration/Paths.cs†L14-L26】
  • Start‑up settingsAppStartSettings stores language preference and online/offline mode and can be loaded or saved from the platform configuration file:
    public class AppStartSettings : IPersistable
    {
        public string Language { get; set; } = LocalizedStrings.ActiveLanguage;
        public bool Online { get; set; } = true;
        public static AppStartSettings TryLoad()
        {
            var configFile = Paths.PlatformConfigurationFile;
            if (configFile.IsEmptyOrWhiteSpace() || !configFile.IsConfigExists())
                return null;
            return configFile.Deserialize<SettingsStorage>()?.Load<AppStartSettings>();
        }
    }
    
    【F:Configuration/AppStartSettings.cs†L4-L41】
  • Credentials management – the ICredentialsProvider interface allows loading, saving and deleting of ServerCredentials. The default implementation persists credentials in Paths.CredentialsFile:
    public interface ICredentialsProvider
    {
        bool TryLoad(out ServerCredentials credentials);
        void Save(ServerCredentials credentials, bool keepSecret);
        void Delete();
    }
    
    【F:Configuration/ICredentialsProvider.cs†L4-L25】
    class DefaultCredentialsProvider : ICredentialsProvider
    {
        private ServerCredentials _credentials;
        bool ICredentialsProvider.TryLoad(out ServerCredentials credentials)
        {
            lock (this)
            {
                if(_credentials != null)
                {
                    credentials = _credentials.Clone();
                    return credentials.CanAutoLogin();
                }
                var file = Paths.CredentialsFile;
                credentials = null;
                if (file.IsConfigExists())
                {
                    credentials = new ServerCredentials();
                    credentials.LoadIfNotNull(file.Deserialize<SettingsStorage>());
                    _credentials = credentials.Clone();
                }
                return credentials?.CanAutoLogin() == true;
            }
        }
    }
    
    【F:Configuration/DefaultCredentialsProvider.cs†L3-L38】
  • Invariant serializationInvariantCultureSerializer saves configuration files using the invariant culture and UTF‑8 encoding, enabling culture‑independent settings:
    public static class InvariantCultureSerializer
    {
        public static void SerializeInvariant(this SettingsStorage settings, string fileName, bool bom = true)
        {
            if (settings is null)
                throw new ArgumentNullException(nameof(settings));
            Do.Invariant(() => settings.Serialize(fileName, bom));
        }
    }
    
    【F:Configuration/InvariantCultureSerializer.cs†L3-L23】
  • Message adapter discoveryInMemoryMessageAdapterProvider scans all local assemblies for IMessageAdapter implementations and can create adapters on demand:
    public class InMemoryMessageAdapterProvider : IMessageAdapterProvider
    {
        public InMemoryMessageAdapterProvider(IEnumerable<IMessageAdapter> currentAdapters, Type transportAdapter = null)
        {
            CurrentAdapters = currentAdapters ?? throw new ArgumentNullException(nameof(currentAdapters));
            var idGenerator = new IncrementalIdGenerator();
            PossibleAdapters = [.. GetAdapters().Select(t =>
            {
                try
                {
                    return t.CreateAdapter(idGenerator);
                }
                catch (Exception ex)
                {
                    ex.LogError();
                    return null;
                }
            }).WhereNotNull()];
        }
    }
    
    【F:Configuration/InMemoryMessageAdapterProvider.cs†L5-L51】
  • Utility helpers – the Paths class also exposes methods for serialization, backup management and building links to StockSharp documentation and store pages.

Usage

  1. Configure global paths before accessing Paths by setting PathsHolder.CompanyPath and PathsHolder.AppDataPath if your application uses custom directories.
  2. Load or create application start settings with AppStartSettings.TryLoad and save them using TrySave.
  3. Implement ICredentialsProvider or use DefaultCredentialsProvider to persist server credentials securely.
  4. Use InvariantCultureSerializer when you need stable serialization irrespective of system locale.
  5. Create an instance of InMemoryMessageAdapterProvider to dynamically discover available message adapters.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on StockSharp.Configuration:

Package Downloads
StockSharp.Algo

Trading algorithms. More info on web site https://stocksharp.com/store/

StockSharp.Licensing

Licensing components. More info on web site https://stocksharp.com/store/

StockSharp.Server.Core

Core server components. More info on web site https://stocksharp.com/store/

StockSharp.UdpDumper.Console

UDP Dumper. Console version

StockSharp.Studio.Compilation

Compilation components for S#.Studio. More info on web site https://stocksharp.com/store/

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.0.214 531 7/23/2025
5.0.213 201 7/20/2025
5.0.212 447 7/14/2025
5.0.211 450 7/8/2025
5.0.210 390 7/4/2025
5.0.209 442 6/30/2025
5.0.208 832 6/20/2025
5.0.207 427 6/18/2025
5.0.206 541 6/2/2025
5.0.205 666 5/14/2025
5.0.204 1,134 3/29/2025
5.0.203 392 3/27/2025
5.0.202 1,187 2/26/2025
5.0.201 1,203 2/14/2025
5.0.200 1,415 12/30/2024
5.0.199 1,211 11/18/2024
5.0.198 503 11/16/2024
5.0.197 998 10/14/2024
5.0.196 508 10/9/2024
5.0.195 465 10/7/2024
5.0.194 480 10/3/2024
5.0.193 606 9/23/2024
5.0.192 558 9/18/2024
5.0.191 585 9/16/2024
5.0.190 685 9/8/2024
5.0.189 925 8/24/2024
5.0.188 801 8/9/2024
5.0.187 752 8/1/2024
5.0.186 431 7/28/2024
5.0.185 824 7/4/2024
5.0.184 753 6/23/2024
5.0.183 687 6/13/2024
5.0.182 759 5/30/2024
5.0.181 592 5/22/2024
5.0.180 608 5/13/2024
5.0.179 777 5/5/2024
5.0.178 603 4/26/2024
5.0.177 605 4/25/2024
5.0.176 673 4/12/2024
5.0.175 805 4/4/2024
5.0.174 945 3/12/2024
5.0.173 1,565 2/21/2024
5.0.172 843 2/14/2024
5.0.171 796 2/12/2024
5.0.170 938 2/6/2024
5.0.169 1,080 1/31/2024
5.0.168 1,734 1/10/2024
5.0.167 1,295 12/15/2023
5.0.166 1,039 12/8/2023
5.0.165 1,271 11/28/2023
5.0.164 964 11/28/2023
5.0.163 2,210 10/8/2023
5.0.162 1,265 9/29/2023
5.0.161 1,306 9/19/2023
5.0.160 654 9/18/2023
5.0.159 1,944 7/30/2023
5.0.158 1,503 7/10/2023
5.0.157 1,256 7/8/2023
5.0.156 1,375 7/5/2023
5.0.155 1,316 6/22/2023
5.0.154 1,410 6/19/2023
5.0.153 1,964 5/14/2023
5.0.152 1,544 5/8/2023
5.0.151 1,897 4/21/2023
5.0.150 1,975 4/17/2023
5.0.149 2,011 4/7/2023
5.0.148 1,956 4/3/2023
5.0.147 2,802 3/6/2023
5.0.146 3,295 2/23/2023
5.0.145 2,615 2/13/2023
5.0.144 3,149 2/9/2023
5.0.143 3,043 2/8/2023
5.0.142 3,267 2/2/2023
5.0.141 3,297 1/30/2023
5.0.140 4,738 1/3/2023
5.0.139 3,810 12/30/2022
5.0.138 4,403 12/12/2022
5.0.137 4,184 12/8/2022
5.0.136 5,046 11/11/2022
5.0.135 18,475 11/1/2022
5.0.134 20,888 10/16/2022
5.0.133 42,434 9/8/2022
5.0.132 42,288 8/29/2022
5.0.131 42,660 8/24/2022
5.0.130 43,391 7/26/2022
5.0.129 42,412 7/19/2022
5.0.128 43,935 5/13/2022
5.0.127 42,298 4/30/2022
5.0.126 7,761 3/29/2022
5.0.125 44,149 3/25/2022
5.0.124 43,086 3/17/2022
5.0.123 42,509 2/15/2022
5.0.122 44,331 2/11/2022
5.0.121 7,656 2/2/2022
5.0.120 7,550 1/28/2022
5.0.119 41,585 1/26/2022
5.0.118 41,944 1/21/2022
5.0.117 41,596 1/21/2022
5.0.116 40,155 1/13/2022
5.0.115 25,886 12/29/2021
5.0.114 25,699 12/20/2021
5.0.113 25,761 12/11/2021
5.0.112 25,687 12/6/2021
5.0.111 27,243 11/29/2021
5.0.110 25,532 11/22/2021
5.0.109 26,487 11/13/2021
5.0.108 28,340 11/8/2021
5.0.107 1,621 11/8/2021
5.0.106 28,163 11/5/2021
5.0.105 29,288 10/21/2021
5.0.104 28,516 10/14/2021
5.0.103 28,550 10/14/2021
5.0.102 1,527 10/13/2021
5.0.101 4,260 10/13/2021
5.0.100 28,909 10/11/2021
5.0.99 30,298 10/8/2021
5.0.98 3,668 10/7/2021
5.0.97 29,125 10/7/2021
5.0.96 1,376 9/27/2021
5.0.95 29,907 9/23/2021
5.0.94 28,490 9/7/2021
5.0.93 29,556 7/31/2021
5.0.92 28,138 7/30/2021
5.0.91 27,804 7/30/2021
5.0.90 27,586 7/19/2021
5.0.89 28,336 7/13/2021
5.0.88 28,159 7/5/2021
5.0.87 29,558 6/16/2021
5.0.86 28,840 6/4/2021
5.0.85 28,427 5/15/2021
5.0.84 28,578 4/30/2021
5.0.83 28,301 4/26/2021
5.0.82 28,679 4/19/2021
5.0.81 28,162 4/16/2021
5.0.80 27,910 4/13/2021
5.0.79 27,816 4/12/2021
5.0.78 28,403 4/8/2021
5.0.77 27,979 4/7/2021
5.0.76 27,828 4/6/2021
5.0.75 28,021 3/29/2021
5.0.74 28,048 3/28/2021
5.0.73 28,325 3/26/2021
5.0.72 27,760 3/26/2021
5.0.71 27,851 3/24/2021
5.0.70 26,543 3/23/2021
5.0.69 26,405 3/18/2021
5.0.68 25,888 3/17/2021
5.0.67 26,544 3/12/2021
5.0.66 26,366 3/4/2021
5.0.65 2,647 3/4/2021
5.0.64 26,323 2/26/2021
5.0.63 26,620 2/17/2021
5.0.62 26,007 2/15/2021
5.0.61 25,831 2/13/2021
5.0.60 26,081 2/12/2021
5.0.59 26,753 2/7/2021
5.0.58 2,879 2/2/2021
5.0.57 2,676 2/2/2021
5.0.56 2,897 1/26/2021
5.0.55 2,757 1/25/2021
5.0.54 2,532 1/25/2021
5.0.53 2,938 1/21/2021
5.0.52 2,621 1/20/2021
5.0.51 2,503 1/19/2021
5.0.50 2,655 1/16/2021
5.0.49 4,344 1/14/2021
5.0.48 5,073 12/29/2020
5.0.47 5,417 12/23/2020
5.0.46 648 12/18/2020
5.0.45 4,590 12/18/2020
5.0.44 1,693 12/17/2020
5.0.43 9,010 12/14/2020
5.0.42 7,529 12/10/2020
5.0.41 5,354 12/1/2020
5.0.40 7,193 11/29/2020
5.0.39 4,300 11/22/2020
5.0.38 3,878 11/22/2020
5.0.38-a7 1,633 11/22/2020
5.0.38-a6 1,573 11/22/2020
5.0.37 5,268 11/13/2020
5.0.36 4,004 10/11/2020
5.0.35 4,490 9/20/2020
5.0.34 3,220 9/18/2020
5.0.33 4,188 9/15/2020
5.0.32 3,300 9/9/2020
5.0.31 3,314 9/3/2020
5.0.30 3,796 8/21/2020
5.0.29 3,697 8/11/2020
5.0.28 3,500 8/10/2020
5.0.27 4,203 8/10/2020
5.0.26 3,394 7/28/2020
5.0.25 3,274 7/19/2020
5.0.24 3,108 7/9/2020
5.0.23 3,036 7/7/2020
5.0.22 3,467 6/10/2020
5.0.21 3,108 6/9/2020
5.0.20 3,104 6/9/2020
5.0.19 3,542 6/4/2020
5.0.18 3,228 6/2/2020
5.0.17 3,262 5/29/2020
5.0.16 3,263 5/25/2020
5.0.15 3,050 5/21/2020
5.0.14 3,158 5/14/2020
5.0.13 3,019 5/12/2020
5.0.12 3,096 5/11/2020
5.0.11 3,145 5/9/2020
5.0.10 3,064 5/5/2020
5.0.9 2,974 5/4/2020
5.0.8 1,449 4/24/2020
5.0.7 1,359 4/22/2020
5.0.6 3,987 4/18/2020
5.0.5 3,049 4/16/2020
5.0.4 2,793 4/15/2020
5.0.3 3,308 4/12/2020
5.0.2 3,003 4/4/2020
5.0.1 2,976 3/27/2020
5.0.0 2,908 3/26/2020