IsoBoiler 8.1.20
dotnet add package IsoBoiler --version 8.1.20
NuGet\Install-Package IsoBoiler -Version 8.1.20
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="IsoBoiler" Version="8.1.20" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IsoBoiler" Version="8.1.20" />
<PackageReference Include="IsoBoiler" />
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 IsoBoiler --version 8.1.20
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: IsoBoiler, 8.1.20"
#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.
#addin nuget:?package=IsoBoiler&version=8.1.20
#tool nuget:?package=IsoBoiler&version=8.1.20
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
IsoBoiler (8.1.14)
This package makes basic configuration of Azure Function Apps (isolated) easier.
Using <code>HostRunner.cs</code> within <code>Program.cs</code>
Application Insights:
All HostRunner methods will register Application Insights, but it won't trace anything unless a APPLICATIONINSIGHTS_CONNECTION_STRING is found in the environment variables. No error is thrown if it is not found.
.RunBasicWithServices()
//.RunBasicWithServices()
await HostRunner.RunWithServices((context, services) =>
{
services.Configure<AppSettings>(context.Configuration.GetSection("MyConfigFilter:AppSettings"));
services.AddHealthChecks();
services.AddScoped<IMyService, MyService>();
});
.RunWithServices()
//.RunWithServices() -> Requires APP_CONFIG_ENDPOINT environment variable. Errors if not found
await HostRunner.RunWithServices((context, services) =>
{
services.Configure<AppSettings>(context.Configuration.GetSection("MyConfigFilter:AppSettings"));
services.AddHealthChecks();
services.AddScoped<IMyService, MyService>();
});
//May provide a Configuration Filter with .UseConfigurationFilter(), or a Configuration Snapshot with .UseConfigurationSnapshot()
await HostRunner.UseConfigurationFilter("MyFilter")
.UseConfigurationSnapshot("MySnapshot")
.RunWithServices((context, services) => { /* ...registering services... */});
Using <code>ConfigHelper.cs</code> for Testing:
//Automatically uses the last word in the project name as the Configuration Filter, i.e. "My.Glorious.Project" would use "Project"
var configuration = ConfigHelper.BuildConfiguration("https://appcs-myappconfigresource-env.azconfig.io");
//Provide a manual Configuration Filter
var configuration = ConfigHelper.BuildConfiguration("https://appcs-myappconfigresource-env.azconfig.io", "MyConfigurationFilter");
//Provide a Configuration Snapshot (must manually provide a Configuration Filter)
var configuration = ConfigHelper.BuildConfiguration("https://appcs-myappconfigresource-env.azconfig.io", "MyConfigurationFilter", "MyConfigurationSnapshot");
//Create App Settings model from a configuration
var appSettings = configuration.GetSettings<AppSettings>("Packing:AppSettings");
//All-in-one method to get settings (builds configuration within)
var appSettings = ConfigHelper.GetSettings<AppSettings>("https://appcs-myappconfigresource-env.azconfig.io", "Packing:AppSettings");
//Get the default service provider. This can be useful to get the default configured services, such as IObjectSerializer
var defaultServiceProvider = ConfigHelper.GetDefaultServiceProvider();
//Get a service provider with a custom configuration delegate so you can register services. May be useful when testing Dependency Injection
var serviceProvider = ConfigHelper.GetServiceProvider((context, services) =>
{
services.Configure<AppSettings>(context.Configuration.GetSection("MyProjectName:AppSettings"));
services.AddScoped<IMyService, MyService>();
});
Using <code>MemoryCache.Extensions.cs</code>:
//The Method name will automatically be used as the cacheKey, but one can be manually provided as well. This does not work (currently?) with Methods that require parameters in order to make sure that the function is executed lazily.
return await _memoryCache.Get(MyMethodName);
return await _memoryCache.Get("MyCacheKey", MyMethodName);
//Provide a lambda function that will produce the results you want. You must provide a cacheKey value to do this.
return await _memoryCache.Get("MyCacheKey", async () =>
{
using (var connection = new SqlConnection("MyConnectionString"))
using (var command = new SqlCommand()
{
CommandType = CommandType.StoredProcedure,
Connection = connection,
CommandText = "MyStoredProc"
})
{
var returnList = new List<MyDataModel>();
await connection.OpenAsync();
using (var reader = command.ExecuteReader())
{
while (reader.Read())
{
returnList.Add(new MyDataModel(reader));
}
}
await connection.CloseAsync();
return returnList;
}
});
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Azure.Identity (>= 1.12.0)
- Microsoft.ApplicationInsights.WorkerService (>= 2.23.0)
- Microsoft.Azure.AppConfiguration.Functions.Worker (>= 8.1.2)
- Microsoft.Azure.Functions.Extensions (>= 1.1.0)
- Microsoft.Azure.Functions.Worker (>= 2.0.0)
- Microsoft.Azure.Functions.Worker.ApplicationInsights (>= 1.4.0)
- Microsoft.FeatureManagement (>= 4.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.