Sharkable 0.0.11
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.11
NuGet\Install-Package Sharkable -Version 0.0.11
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.11" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Sharkable --version 0.0.11
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Sharkable, 0.0.11"
#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.
// Install Sharkable as a Cake Addin #addin nuget:?package=Sharkable&version=0.0.11 // Install Sharkable as a Cake Tool #tool nuget:?package=Sharkable&version=0.0.11
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 (new style)
create a new class
public class TestEndpoint : ISharkEndpoint
{
public void AddRoutes(IEndpointRouteBuilder app)
{
app.MapGet("show", ()=>"test result");
}
}
//will now generate a http post method with the url
// api/test/show
endpoint auto mapper (old style)
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. |
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 | 103 | 10/2/2024 |
0.0.23 | 99 | 9/27/2024 |
0.0.21 | 91 | 9/25/2024 |
0.0.20 | 91 | 9/24/2024 |
0.0.19 | 95 | 9/24/2024 |
0.0.18 | 93 | 9/24/2024 |
0.0.17 | 87 | 9/23/2024 |
0.0.16 | 80 | 9/21/2024 |
0.0.15 | 78 | 9/19/2024 |
0.0.14 | 77 | 9/19/2024 |
0.0.13 | 86 | 9/19/2024 |
0.0.12 | 80 | 9/18/2024 |
0.0.11 | 85 | 9/17/2024 |
0.0.10 | 92 | 9/17/2024 |
0.0.9 | 88 | 9/16/2024 |
0.0.8 | 119 | 9/16/2024 |
0.0.6 | 138 | 9/12/2024 |
0.0.4 | 147 | 9/11/2024 |
0.0.2 | 141 | 9/3/2024 |
0.0.1 | 131 | 9/2/2024 |
add SharkEndpoint; add snake case format