Sharkable 0.0.9
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Sharkable --version 0.0.9
NuGet\Install-Package Sharkable -Version 0.0.9
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="Sharkable" Version="0.0.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sharkable" Version="0.0.9" />
<PackageReference Include="Sharkable" />
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 Sharkable --version 0.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Sharkable, 0.0.9"
#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=Sharkable&version=0.0.9
#tool nuget:?package=Sharkable&version=0.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Sharkable
a dotnet minimal api framework collection
Usage
automatic dependency injection
//first add extension
using Sharkable
builder.Services.AddShark();
//for aot users please specify assemblies by youself and avoid code trim
build.Services.AddShark(typeof(Program).Assembly);
[ScopedService] //inject class as a scoped service by the given attribute
public class Monitor : IMonitor
{
public void Show()
{
...
}
}
//map an endpoint and it works!
app.MapGet("/monitor",([FromServices]IMonitor monitor) =>
{
monitor.Show();
});
endpoint auto mapper
create a new class
[SharkEndpoint]
public class TestEndpoint
{
[SharkMethod("show", SharkHttpMethod.GET)]
public void Show()
{
...
}
}
//will now generate a http post method with the url
// api/test/show
for more use sample please see Sharkable.Sample project
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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Sharkable:
Package | Downloads |
---|---|
Sharkable.AutoCrud.SqlSugar
a dotnet minimal api framework collection aimed to support aot |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.0.24 | 128 | 6 months ago |
0.0.23 | 117 | 7 months ago |
0.0.21 | 113 | 7 months ago |
0.0.20 | 114 | 7 months ago |
0.0.19 | 116 | 7 months ago |
0.0.18 | 117 | 7 months ago |
0.0.17 | 106 | 7 months ago |
0.0.16 | 101 | 7 months ago |
0.0.15 | 99 | 7 months ago |
0.0.14 | 95 | 7 months ago |
0.0.13 | 104 | 7 months ago |
0.0.12 | 98 | 7 months ago |
0.0.11 | 105 | 7 months ago |
0.0.10 | 108 | 7 months ago |
0.0.9 | 107 | 7 months ago |
0.0.8 | 133 | 7 months ago |
0.0.6 | 153 | 7 months ago |
0.0.4 | 160 | 7 months ago |
0.0.2 | 154 | 7 months ago |
0.0.1 | 144 | 7 months ago |
add option configuration and assembly context