DNA 1.0.7867.27064
dotnet add package DNA --version 1.0.7867.27064
NuGet\Install-Package DNA -Version 1.0.7867.27064
<PackageReference Include="DNA" Version="1.0.7867.27064" />
<PackageVersion Include="DNA" Version="1.0.7867.27064" />
<PackageReference Include="DNA" />
paket add DNA --version 1.0.7867.27064
#r "nuget: DNA, 1.0.7867.27064"
#:package DNA@1.0.7867.27064
#addin nuget:?package=DNA&version=1.0.7867.27064
#tool nuget:?package=DNA&version=1.0.7867.27064
Easily turn your console app into an application that can run as a windows service or console app depending on environment.
public class Program : DNA.Program
{
static void Main(string[] args)
{
DNA.Program.Main(() => {
DefLogs.Log.O("I'm a service writing to a logfile!");
}, args);
}
}
Easily execute post build code:
[PostBuildExecute]
public static void UnimportantFunctionName()
{
//I get run on postbuild!
//Requirements:
/*Post-build event command line in project:*/
//DNA --postbuild=$(TargetFileName)
}
Easily add custom command line parameters:
DNA.Utils.CommandLineProcessor.Commands.Add(new CommandLineArgument("--file", (arg) =>
{
// this code will run if the exe is passed "-f" or "--file" as an argument
// -f=document.txt
Log.O(String.Format("Deleting document: {0}",(string)args));
//Output:
//Deleting document: document.txt
})
default commands :
-h, --help -i, --install (install as a service on this machine based off config data, requires Admin) -u --uninstall (uninstalls the service)
Easily spin up an API focused micro-webserver that supports TLS, dynamic cert generation & Basic Auth. Add commands to execute dynamic functions and return real time data - including options to specify mime type & http response codes. Deliver all kinds of data including html, css, javascript, json, images etc. Accept commands to run functions you specify, such as restarting the service remotely.
DNA.Web.Monitor server = new Web.Monitor();
server.Pages.Add("GetTime", (url) =>
{
return new Web.Payload(new
{
CurrentTime = DateTime.Now
});
});
server.Start();
Easily Cache data of any data type in memory for any time with built-in expiry-based garbage collection. If a key is not specified, the filename+codeline is used to encourage usage in loops or frequent functions.
var data1 = Cache.Hit(() => { return new Random().Next(); });
var data2 = Cache.Hit(() => { return new Guid(); }, 1000); //1 second cache
var data3 = Cache.Hit(() => { return DateTime.Now; }, 1000, "key-date" ); //specify key
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
- Dapper.Contrib (>= 1.50.5)
- HtmlAgilityPack (>= 1.8.7)
- morelinq (>= 3.0.0)
- Newtonsoft.Json (>= 11.0.2)
- Oracle.ManagedDataAccess (>= 18.3.0)
- protobuf-net (>= 2.3.17)
- StackExchange.Redis (>= 2.0.519)
- System.Memory (>= 4.5.1)
- System.Threading.Tasks.Extensions (>= 4.5.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.7867.27064 | 1,233 | 7/16/2021 |
| 1.0.7867.24512 | 617 | 7/16/2021 |
| 1.0.7103.26270 | 1,198 | 6/13/2019 |
| 1.0.7103.21414 | 926 | 6/13/2019 |
| 1.0.7103.18568 | 911 | 6/13/2019 |
| 1.0.7103.17431 | 894 | 6/13/2019 |
| 1.0.7047.25172 | 964 | 4/18/2019 |
| 1.0.7044.28634 | 962 | 4/15/2019 |
| 1.0.7044.24712 | 948 | 4/15/2019 |
| 1.0.7044.23301 | 960 | 4/15/2019 |
| 1.0.7041.33572 | 970 | 4/12/2019 |
| 1.0.7041.33140 | 944 | 4/12/2019 |
| 1.0.7041.30613 | 940 | 4/12/2019 |
| 1.0.7038.33487 | 982 | 4/9/2019 |
| 1.0.7038.32950 | 964 | 4/9/2019 |
| 1.0.7030.29795 | 958 | 4/1/2019 |
| 1.0.7017.18080 | 937 | 3/19/2019 |
| 1.0.7004.22597 | 953 | 3/6/2019 |
| 1.0.6998.31030 | 953 | 2/28/2019 |