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
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="com.armatsoftware.code.engine.storage" Version="4.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add com.armatsoftware.code.engine.storage --version 4.1.0
#r "nuget: com.armatsoftware.code.engine.storage, 4.1.0"
#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 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

  1. Code EngineStorage
  2. Benefits
  3. How to use it?

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?

  1. Start with an existing solution or brand new.
  2. You should already have the main package com.armatsoftware.code.engine added to your solution and UseCodeEngine() initialization set up.
  3. Look up NuGet packages for armatsoftware.code.engine.storage.
  4. Add the main package com.armatsoftware.code.engine.storage to your solution.
  5. 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:
    builder.Services.UseCodeEngineStorage();
    
    or
    builder.Services.UseCodeEngineStorage(new CustomStorageAdapter());
    
  6. 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>();
     }
    
  7. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
4.1.0 95 3/1/2024
4.0.0 92 3/1/2024