com.armatsoftware.code.engine.storage
4.1.0
dotnet add package com.armatsoftware.code.engine.storage --version 4.1.0
NuGet\Install-Package com.armatsoftware.code.engine.storage -Version 4.1.0
<PackageReference Include="com.armatsoftware.code.engine.storage" Version="4.1.0" />
paket add com.armatsoftware.code.engine.storage --version 4.1.0
#r "nuget: com.armatsoftware.code.engine.storage, 4.1.0"
// Install com.armatsoftware.code.engine.storage as a Cake Addin
#addin nuget:?package=com.armatsoftware.code.engine.storage&version=4.1.0
// Install com.armatsoftware.code.engine.storage as a Cake Tool
#tool nuget:?package=com.armatsoftware.code.engine.storage&version=4.1.0
Code Engine Storage
Table of Contents
Code Engine Storage
Code Engine Storage is a storage implementation for the Code Engine. Its primary purpose is to create protection mechanism against data orrution and to provide a way to store and retrieve the custom logic in a secure and controlled environment.
Benefits
Data Completeness
Specific subject action model defintions and their validation ensure completeness of the created actions and their data.
Data Integrity
Stored subject action data model hierarchy and rules within the implementation ensure the integrity of the stored data.
Versioning
The storage implementation provides versioning for the stored subject actions, allowing for safe creation and updates as well as "release" of specific versions of the stored subject action.
An update of a stored subject action creates a new version of the action that is not yet active, allowing for safe continued use of prior revisions.
Once a revision (or version) of a stored subject action is activated, it becomes the current version and is used by the code engine provider going forward. Depending on the caching configuration, the current version may still be cached and effective for a specific period of time until its expiration.
Ideally, the responsibility of creating and updating stored subject actions should be separated from the responsibility of activating one or another version.
Ease of Use
With the default storage implementation, you only need to choose between using one of the provided storage adapters or provide your own custom implementation for one.
How to use it?
- Start with an existing solution or brand new.
- You should already have the main package
com.armatsoftware.code.engine
added to your solution andUseCodeEngine()
initialization set up. - Look up NuGet packages for
armatsoftware.code.engine.storage
. - Add the main package
com.armatsoftware.code.engine.storage
to your solution. - Include initialization logic for the default storage implementation. Provide your own custom implementation of the storage adapter or use one provided by Code Engine (look on NuGet). Ex:
orbuilder.Services.UseCodeEngineStorage();
builder.Services.UseCodeEngineStorage(new CustomStorageAdapter());
- Inject the
IActionStorage
and use it as needed to manage the subject actions. Ex:[HttpPost, Route("create")] public IEnumerable<ISubjectAction<SimpleSubject>> Create([FromServices] IActionStorage storage, [FromBody] SimpleSubjectUpdateModel updateModel) { storage.AddAction<SimpleSubject>(updateModel.Name, updateModel.Code, updateModel.Author, updateModel.Comment); return storage.GetActions<SimpleSubject>(); }
- Inject
IActionProvider
to retrieve the stored subject actions and use them in your code. Ex:[HttpGet, Route("actions")] public string GetActions([FromServices] IActionProvider storage) { return string.Join(", ", storage.Retrieve<SimpleSubject>().Select(x => x.Name)); }
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.