MakoIoT.Device.Services.Configuration
1.0.70.61196
See the version list below for details.
dotnet add package MakoIoT.Device.Services.Configuration --version 1.0.70.61196
NuGet\Install-Package MakoIoT.Device.Services.Configuration -Version 1.0.70.61196
<PackageReference Include="MakoIoT.Device.Services.Configuration" Version="1.0.70.61196" />
<PackageVersion Include="MakoIoT.Device.Services.Configuration" Version="1.0.70.61196" />
<PackageReference Include="MakoIoT.Device.Services.Configuration" />
paket add MakoIoT.Device.Services.Configuration --version 1.0.70.61196
#r "nuget: MakoIoT.Device.Services.Configuration, 1.0.70.61196"
#addin nuget:?package=MakoIoT.Device.Services.Configuration&version=1.0.70.61196
#tool nuget:?package=MakoIoT.Device.Services.Configuration&version=1.0.70.61196
Mako-IoT.Device.Services.Configuration
Provides easy way of reading and updating configuration settings with strongly-typed objects. Settings are stored in persistent storage via IStorageService.
Usage
Create class for your settings. You may use multiple classes, one for every component. Provide section name as static/const string.
public class MyAppConfig
{
public string ApiUrl { get; set; }
public string SslCertificate { get; set; }
public string Timezone { get; set; }
public static string SectionName => "MyAppConfig";
}
Use IConfigurationService to read and/or update settings.
public class MyAppService : IMyAppService
{
private readonly MyAppConfig _config;
public MyAppService(IConfigurationService configService)
{
_config = (MyAppService)configService.GetConfigSection(MyAppService.SectionName, typeof(MyAppService));
}
//[...]
}
Add Configuration and FileStorage components in your device builder. You can specify default settings, which will be written on startup.
public class Program
{
public static void Main()
{
DeviceBuilder.Create()
.AddConfiguration(c =>
{
c.WriteDefault(MyAppConfig.SectionName, new MyAppConfig
{
ApiUrl = "http://my-app.my-company.com/api"
});
})
.AddFileStorage()
.Build()
.Start();
Thread.Sleep(Timeout.InfiniteTimeSpan);
}
}
Note: setting overwrite = true in the WriteDefault will overwrite settings with the defaults every time (even if settings already exist).
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
-
- MakoIoT.Device.Services.Interface (>= 1.0.54.39044)
- nanoFramework.CoreLibrary (>= 1.17.7)
- nanoFramework.DependencyInjection (>= 1.1.30)
- nanoFramework.Json (>= 2.2.189)
- nanoFramework.System.Collections (>= 1.5.63)
- nanoFramework.System.IO.Streams (>= 1.1.91)
- nanoFramework.System.Text (>= 1.3.36)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on MakoIoT.Device.Services.Configuration:
Package | Downloads |
---|---|
MakoIoT.Device.Services.ConfigurationManager
Configuration mode manager for MAKO-IoT |
|
MakoIoT.Device.Services.ConfigurationApi
REST API for configuration with MAKO-IoT |
|
MakoIoT.Device.Platform.LocalConfig
MAKO-IoT Platform local configuration library. On-device web server, WiFi AP |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.73.61577 | 147 | 4 days ago |
1.0.72.2302 | 153 | 5 days ago |
1.0.71.26164 | 514 | 18 days ago |
1.0.70.61196 | 317 | a month ago |
1.0.69.15488 | 239 | a month ago |
1.0.68.40789 | 438 | a month ago |
1.0.67.38396 | 322 | a month ago |
1.0.65.14622 | 496 | 2 months ago |
1.0.64.18364 | 349 | 2 months ago |
1.0.62.51969 | 466 | 4 months ago |
1.0.61.54678 | 228 | 4 months ago |
1.0.60.53758 | 170 | 4 months ago |
1.0.59.12833 | 373 | 5 months ago |
1.0.58.59368 | 387 | 5 months ago |
1.0.57.55232 | 583 | 6 months ago |
1.0.56.46476 | 238 | 6 months ago |
1.0.55.40619 | 332 | 6 months ago |
1.0.54.20410 | 263 | 6 months ago |
1.0.53.22614 | 366 | 7 months ago |
1.0.52.61265 | 441 | 7 months ago |
1.0.51.5543 | 336 | 7 months ago |
1.0.50.16692 | 346 | 7 months ago |
1.0.49.30436 | 460 | 8 months ago |
1.0.48.44460 | 259 | 8 months ago |
1.0.47.11163 | 724 | 10 months ago |
1.0.46.22575 | 1,108 | 5/18/2024 |
1.0.45.29329 | 169 | 5/17/2024 |
1.0.44.911 | 1,270 | 4/9/2024 |
1.0.43.25265 | 232 | 4/8/2024 |
1.0.42.31032 | 421 | 4/3/2024 |
1.0.41.11032 | 446 | 3/23/2024 |
1.0.40.13779 | 322 | 3/21/2024 |
1.0.39.3446 | 2,072 | 1/6/2024 |
1.0.38.57711 | 456 | 12/30/2023 |
1.0.37.47513 | 261 | 12/30/2023 |
1.0.36.62303 | 885 | 12/2/2023 |
1.0.35.24200 | 279 | 12/1/2023 |
1.0.34.49211 | 518 | 11/17/2023 |
1.0.33.44373 | 314 | 11/16/2023 |
1.0.32.19851 | 458 | 11/12/2023 |
1.0.31.51806 | 1,368 | 10/9/2023 |
1.0.30.25325 | 456 | 10/6/2023 |
1.0.29.64214 | 369 | 10/4/2023 |
1.0.27.26144 | 1,072 | 5/29/2023 |
1.0.25.42009 | 495 | 5/25/2023 |
1.0.24.48276 | 342 | 5/25/2023 |
1.0.21.23813 | 149 | 5/22/2023 |
1.0.20.48349 | 357 | 5/22/2023 |