ScriptStash 2.0.0
Error in package name.
dotnet add package ScriptStash --version 2.0.0
NuGet\Install-Package ScriptStash -Version 2.0.0
<PackageReference Include="ScriptStash" Version="2.0.0" />
<PackageVersion Include="ScriptStash" Version="2.0.0" />
<PackageReference Include="ScriptStash" />
paket add ScriptStash --version 2.0.0
#r "nuget: ScriptStash, 2.0.0"
#:package ScriptStash@2.0.0
#addin nuget:?package=ScriptStash&version=2.0.0
#tool nuget:?package=ScriptStash&version=2.0.0
ScriptStash ![ScriptStash Logo]()
What is ...
ScriptStash is a C# code loader for text/script files manipulation. It loads each script file once. Keeping it stored in-memory, ready to be used for any applicative reuse over and over. Also, it can be used for token-driven scripting (e.g. place in script token for SELECT-SQL table name, changing the query target table dynamically at run-time).
How it works ...
ScriptStash loads with System.IO.File each script at its destination folder and store it in-memory while your solution application running. ScriptStash can store dictionary key-value pairs for token injection to every stored tokenized script file. So, it can return the original file loaded, or a transformed text with all needed tokens replaced with values from given dictionary.
Usage ...
Usage examples:
- Maintain a query SQL scripts directory for a web-application with database storage.
- Keep reusable shell scripts for 3rd party ALM tool. Load and execute them from yours C# application utility.
- Store scripts from any scripting language (e.g. PowerShell, VBScript, JavaScript, etc.) for execution from C# app.
- Handle installation scripts batch, to be deployed on several environments with different inner setting per environment.
- Maintain test template scripts, with data-driven cases to be injected to each test template before execution.
Code Example ...
string scriptsFolder = "c:\project\scripts";
string pattern = "*.sql";
string genSelectAllQuery = "select_all_query.sql";
string genTemplateTableQuery = "template_table_query.sql";
:
:
ScriptStash mySqlStash = new ScriptStash(scriptsFolder, pattern);
string sqlText1 = myStash[genSelectAllQueryName].Text;
:
myStash.Tokens["<table-name>"] = "USERS";
myStash.Tokens["<where-clause>"] = "WHERE USER.City='Tel-Aviv";
string sqlText2 = myStash[genTemplateTableQuery].InjectTokens();
[!] For more indepth example please chek next Gist : Stash example - SQL queries
Documentation
Check out ScriptStash documentation pages here.
License
This project is MIT licensed. For more information, see license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 is compatible. netcoreapp3.1 is compatible. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 is compatible. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.0
- System.Text.Json (>= 5.0.2)
-
.NETCoreApp 3.1
- System.Text.Json (>= 5.0.2)
-
.NETFramework 4.7.2
- System.Text.Json (>= 5.0.2)
-
.NETFramework 4.8
- System.Text.Json (>= 5.0.2)
-
.NETStandard 2.0
- System.Text.Json (>= 5.0.2)
-
.NETStandard 2.1
- System.Text.Json (>= 5.0.2)
-
net5.0
- System.Text.Json (>= 5.0.2)
-
net6.0
- System.Text.Json (>= 5.0.2)
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 |
|---|
First release with dotnet multi framework support.