StockSharp.Configuration 5.0.216

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package StockSharp.Configuration --version 5.0.216
                    
NuGet\Install-Package StockSharp.Configuration -Version 5.0.216
                    
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.216" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="StockSharp.Configuration" Version="5.0.216" />
                    
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.216
                    
#r "nuget: StockSharp.Configuration, 5.0.216"
                    
#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.216
                    
#: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.216
                    
Install as a Cake Addin
#tool nuget:?package=StockSharp.Configuration&version=5.0.216
                    
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.Algo.Compilation

Compilation components. 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.218 2,709 9/11/2025
5.0.217 801 9/1/2025
5.0.216 784 8/30/2025
5.0.215 921 8/10/2025
5.0.214 1,228 7/23/2025
5.0.213 1,194 7/20/2025
5.0.212 803 7/14/2025
5.0.211 754 7/8/2025
5.0.210 666 7/4/2025
5.0.209 719 6/30/2025
5.0.208 1,368 6/20/2025
5.0.207 707 6/18/2025
5.0.206 837 6/2/2025
5.0.205 963 5/14/2025
5.0.204 1,534 3/29/2025
5.0.203 690 3/27/2025
5.0.202 1,674 2/26/2025
5.0.201 1,713 2/14/2025
5.0.200 1,860 12/30/2024
5.0.199 1,497 11/18/2024
5.0.198 788 11/16/2024
5.0.197 1,282 10/14/2024
5.0.196 819 10/9/2024
5.0.195 747 10/7/2024
5.0.194 770 10/3/2024
5.0.193 875 9/23/2024
5.0.192 850 9/18/2024
5.0.191 878 9/16/2024
5.0.190 983 9/8/2024
5.0.189 1,290 8/24/2024
5.0.188 1,116 8/9/2024
5.0.187 1,188 8/1/2024
5.0.186 767 7/28/2024
5.0.185 1,128 7/4/2024
5.0.184 1,058 6/23/2024
5.0.183 1,009 6/13/2024
5.0.182 1,056 5/30/2024
5.0.181 831 5/22/2024
5.0.180 907 5/13/2024
5.0.179 1,136 5/5/2024
5.0.178 870 4/26/2024
5.0.177 889 4/25/2024
5.0.176 982 4/12/2024
5.0.175 1,090 4/4/2024
5.0.174 1,250 3/12/2024
5.0.173 2,060 2/21/2024
5.0.172 1,154 2/14/2024
5.0.171 1,065 2/12/2024
5.0.170 1,328 2/6/2024
5.0.169 1,384 1/31/2024
5.0.168 2,158 1/10/2024
5.0.167 1,586 12/15/2023
5.0.166 1,331 12/8/2023
5.0.165 1,624 11/28/2023
5.0.164 1,244 11/28/2023
5.0.163 2,541 10/8/2023
5.0.162 1,564 9/29/2023
5.0.161 1,592 9/19/2023
5.0.160 762 9/18/2023
5.0.159 2,220 7/30/2023
5.0.158 1,771 7/10/2023
5.0.157 1,562 7/8/2023
5.0.156 1,680 7/5/2023
5.0.155 1,565 6/22/2023
5.0.154 1,734 6/19/2023
5.0.153 2,263 5/14/2023
5.0.152 1,865 5/8/2023
5.0.151 2,219 4/21/2023
5.0.150 2,289 4/17/2023
5.0.149 2,304 4/7/2023
5.0.148 2,281 4/3/2023
5.0.147 3,088 3/6/2023
5.0.146 3,615 2/23/2023
5.0.145 2,912 2/13/2023
5.0.144 3,484 2/9/2023
5.0.143 3,331 2/8/2023
5.0.142 3,603 2/2/2023
5.0.141 3,628 1/30/2023
5.0.140 5,142 1/3/2023
5.0.139 4,157 12/30/2022
5.0.138 4,784 12/12/2022
5.0.137 4,546 12/8/2022
5.0.136 5,398 11/11/2022
5.0.135 19,073 11/1/2022
5.0.134 21,459 10/16/2022
5.0.133 43,218 9/8/2022
5.0.132 43,068 8/29/2022
5.0.131 43,458 8/24/2022
5.0.130 44,147 7/26/2022
5.0.129 43,170 7/19/2022
5.0.128 44,690 5/13/2022
5.0.127 43,072 4/30/2022
5.0.126 8,104 3/29/2022
5.0.125 44,864 3/25/2022
5.0.124 43,850 3/17/2022
5.0.123 43,165 2/15/2022
5.0.122 45,624 2/11/2022
5.0.121 7,983 2/2/2022
5.0.120 7,873 1/28/2022
5.0.119 42,294 1/26/2022
5.0.118 42,621 1/21/2022
5.0.117 42,310 1/21/2022
5.0.116 40,897 1/13/2022
5.0.115 26,608 12/29/2021
5.0.114 26,401 12/20/2021
5.0.113 26,424 12/11/2021
5.0.112 26,395 12/6/2021
5.0.111 28,067 11/29/2021
5.0.110 26,241 11/22/2021
5.0.109 27,263 11/13/2021
5.0.108 29,054 11/8/2021
5.0.107 1,749 11/8/2021
5.0.106 28,937 11/5/2021
5.0.105 29,945 10/21/2021
5.0.104 29,193 10/14/2021
5.0.103 29,214 10/14/2021
5.0.102 1,661 10/13/2021
5.0.101 4,549 10/13/2021
5.0.100 29,616 10/11/2021
5.0.99 30,975 10/8/2021
5.0.98 3,945 10/7/2021
5.0.97 29,780 10/7/2021
5.0.96 1,516 9/27/2021
5.0.95 30,711 9/23/2021
5.0.94 29,144 9/7/2021
5.0.93 30,247 7/31/2021
5.0.92 28,791 7/30/2021
5.0.91 28,429 7/30/2021
5.0.90 28,217 7/19/2021
5.0.89 29,001 7/13/2021
5.0.88 28,764 7/5/2021
5.0.87 30,159 6/16/2021
5.0.86 29,565 6/4/2021
5.0.85 29,019 5/15/2021
5.0.84 29,214 4/30/2021
5.0.83 28,954 4/26/2021
5.0.82 29,310 4/19/2021
5.0.81 28,805 4/16/2021
5.0.80 28,560 4/13/2021
5.0.79 28,458 4/12/2021
5.0.78 29,056 4/8/2021
5.0.77 28,617 4/7/2021
5.0.76 28,459 4/6/2021
5.0.75 28,673 3/29/2021
5.0.74 28,702 3/28/2021
5.0.73 28,936 3/26/2021
5.0.72 28,400 3/26/2021
5.0.71 28,488 3/24/2021
5.0.70 27,230 3/23/2021
5.0.69 27,063 3/18/2021
5.0.68 26,557 3/17/2021
5.0.67 27,141 3/12/2021
5.0.66 27,009 3/4/2021
5.0.65 2,847 3/4/2021
5.0.64 26,974 2/26/2021
5.0.63 27,221 2/17/2021
5.0.62 26,656 2/15/2021
5.0.61 26,457 2/13/2021
5.0.60 26,735 2/12/2021
5.0.59 27,309 2/7/2021
5.0.58 3,139 2/2/2021
5.0.57 2,941 2/2/2021
5.0.56 3,148 1/26/2021
5.0.55 3,036 1/25/2021
5.0.54 2,806 1/25/2021
5.0.53 3,210 1/21/2021
5.0.52 2,856 1/20/2021
5.0.51 2,726 1/19/2021
5.0.50 2,885 1/16/2021
5.0.49 4,724 1/14/2021
5.0.48 5,408 12/29/2020
5.0.47 5,847 12/23/2020
5.0.46 759 12/18/2020
5.0.45 4,960 12/18/2020
5.0.44 1,868 12/17/2020
5.0.43 9,737 12/14/2020
5.0.42 8,107 12/10/2020
5.0.41 5,840 12/1/2020
5.0.40 7,883 11/29/2020
5.0.39 4,587 11/22/2020
5.0.38 4,176 11/22/2020
5.0.38-a7 1,964 11/22/2020
5.0.38-a6 1,907 11/22/2020
5.0.37 5,847 11/13/2020
5.0.36 4,258 10/11/2020
5.0.35 4,765 9/20/2020
5.0.34 3,479 9/18/2020
5.0.33 4,499 9/15/2020
5.0.32 3,552 9/9/2020
5.0.31 3,576 9/3/2020
5.0.30 4,077 8/21/2020
5.0.29 3,975 8/11/2020
5.0.28 3,783 8/10/2020
5.0.27 4,474 8/10/2020
5.0.26 3,670 7/28/2020
5.0.25 3,527 7/19/2020
5.0.24 3,348 7/9/2020
5.0.23 3,294 7/7/2020
5.0.22 3,724 6/10/2020
5.0.21 3,317 6/9/2020
5.0.20 3,376 6/9/2020
5.0.19 3,830 6/4/2020
5.0.18 3,480 6/2/2020
5.0.17 3,503 5/29/2020
5.0.16 3,515 5/25/2020
5.0.15 3,305 5/21/2020
5.0.14 3,429 5/14/2020
5.0.13 3,246 5/12/2020
5.0.12 3,382 5/11/2020
5.0.11 3,374 5/9/2020
5.0.10 3,299 5/5/2020
5.0.9 3,247 5/4/2020
5.0.8 1,637 4/24/2020
5.0.7 1,528 4/22/2020
5.0.6 4,287 4/18/2020
5.0.5 3,268 4/16/2020
5.0.4 3,034 4/15/2020
5.0.3 3,568 4/12/2020
5.0.2 3,291 4/4/2020
5.0.1 3,228 3/27/2020
5.0.0 3,165 3/26/2020