BindOpen.Scoping
1.2.176
dotnet add package BindOpen.Scoping --version 1.2.176
NuGet\Install-Package BindOpen.Scoping -Version 1.2.176
<PackageReference Include="BindOpen.Scoping" Version="1.2.176" />
<PackageVersion Include="BindOpen.Scoping" Version="1.2.176" />
<PackageReference Include="BindOpen.Scoping" />
paket add BindOpen.Scoping --version 1.2.176
#r "nuget: BindOpen.Scoping, 1.2.176"
#:package BindOpen.Scoping@1.2.176
#addin nuget:?package=BindOpen.Scoping&version=1.2.176
#tool nuget:?package=BindOpen.Scoping&version=1.2.176
BindOpen.Kernel
BindOpen is a framework that enables the development of highly extensible applications. It allows you to enhance your .NET projects with custom script functions, connectors, entities, and tasks.
About
BindOpen.Kernel is the core module of the BindOpen framework. It enables you to easily model your business context, including data and operations.
BindOpen.Kernel is composed of the following modules:
- Data offers a comprehensive data model based on metadata.
- Scoping offers an effective mechanism for loading and using your extensions.
- Hosting allows you to integrate a BindOpen agent within the .NET service builder.
- Logging provides a straightforward and multi-dimensional logging system.
- Dtos.Converters provides packages to serialize and deserialize BindOpen.Kernel objects.
This repository contains the Data, Scoping and Dtos.Converters modules. The two other ones are separate repositories.
A full list of all the BindOpen repos is available as well.
Install
To get started, install the BindOpen.Kernel module you want to use.
Note: We recommend that later on, you install only the package you need.
From Visual Studio
Module | Instruction |
---|---|
BindOpen.Data | PM> Install-Package BindOpen.Data |
BindOpen.Scoping | PM> Install-Package BindOpen.Scoping |
BindOpen.Dtos.Converters | PM> Install-Package BindOpen.Dtos.Converters |
From .NET CLI
Module | Instruction |
---|---|
BindOpen.Data | > dotnet add package BindOpen.Data |
BindOpen.Scoping | > dotnet add package BindOpen.Scoping |
BindOpen.Dtos.Converters | > dotnet add package BindOpen.Dtos.Converters |
Get started
Data
Data package offers a comprehensive data model based on metadata.
Metadata
Define your data context using metadata.
var meta = BdoData.NewMeta("host", DataValueTypes.Text, "my-test-host");
Configuration
Your configurations can, for instance, be defined as a set of metadata, allowing flexible and declarative setups.
var config = BdoData.NewConfig(
"test-config",
BdoData.NewScalar("comment", DataValueTypes.Text, "Sunny day"),
BdoData.NewScalar("temperature", DataValueTypes.Integer, 25, 26, 26),
BdoData.NewScalar("date", DataValueTypes.Date, DateTime.Now),
BdoData.NewNode(
"subscriber"
BdoData.NewScalar("name", DataValueTypes.Text, "Ernest E."),
BdoData.NewScalar("code", DataValueTypes.Integer, 1560))
)
.WithTitle("Example of configuration")
.WithDescription(("en", "This is an example of description"))
Scoping
Scoping package offers an effective mechanism for loading and using your extensions.
var scope = BdoScoping.NewScope()
.LoadExtensions(q => q.AddAllAssemblies());
Script
Functions can be executed seamlessly using BindOpen's scripting capabilities.
// Define your script functions
[BdoFunction(
Name = "testFunction",
Description = "Returns true if second string parameter is the first one ending with underscore")]
public static object Fun_Func2a(
this string st1,
string st2)
{
return st1 == st2 + "_";
}
...
// Interprete script
var exp = "$testFunction('MYTABLE', $text('MYTABLE_'))";
var result = scope.Interpreter.Evaluate<bool?>(exp);
// result is True
Tasks
[BdoTask("taskFake")]
public class TaskFake : BdoTask
{
[BdoProperty(Name = "boolValue")]
public bool BoolValue { get; set; }
[BdoOutput(Name = "stringValue")]
public string StringValue { get; set; }
[BdoInput(Name = "enumValue")]
public ActionPriorities EnumValue { get; set; }
...
public override Task<bool> ExecuteAsync(
CancellationToken token,
IBdoScope scope = null,
IBdoMetaSet varSet = null,
RuntimeModes runtimeMode = RuntimeModes.Normal,
IBdoLog log = null)
{
...
Debug.WriteLine("Task completed");
return Task.FromResult(true);
}
}
...
var meta = BdoData.NewObject()
.WithDataType(BdoExtensionKinds.Task, "scoping.tests$taskFake")
.WithProperties(("boolValue", false))
.WithInputs(BdoData.NewScalar("enumValue", ActionPriorities.Low))
.WithOutputs(("stringValue", "test-out"));
var task = scope.CreateTask<TaskFake>(meta);
var cancelToken = new CancellationTokenSource();
task.Execute(cancelToken.Token, scope);
Dtos.Converters
Dtos.Converters provides packages to serialize and deserialize BindOpen.Kernel objects.
Serialization
Serialize your models to JSON and XML with minimal configuration.
var metaSet = BdoData.NewSet("test-io").With(("host", "host-test"), ("address", "0.0.0.0"));
metaSet.ToDto().SaveXml("output.xml");
Deserialization
Models can be easily deserialized from JSON and XML formats.
var metaSet = JsonHelper.LoadJson<MetaSetDb>("output.xml").ToPoco();
License
This project is licensed under the terms of the MIT license. See LICENSE.
Packages
This repository contains the code of the following Nuget packages:
Package | Provision |
---|---|
BindOpen.Abstractions | Interfaces and enumerations |
BindOpen.Data | Core data model |
BindOpen.Scoping | Extension manager |
BindOpen.Scoping.Extensions | Classes of extensions |
BindOpen.Scoping.Script | Script interpreter |
BindOpen.Dtos.Converters | Serialization / Deserialization |
BindOpen.Dtos | Data transfer classes |
The atomicity of these packages allows you install only what you need respecting your solution's architecture.
All of our NuGet packages are available from our NuGet.org profile page.
Other repos and Projects
BindOpen.Hosting enables you to integrate a BindOpen agent within the .NET service builder.
BindOpen.Logging provides a simple and multidimensional logging system, perfect to monitor nested task executions.
BindOpen.Labs is a collection of projects based on BindOpen.
A full list of all the repos is available as well.
Documentation and Further Learning
BindOpen Docs
The BindOpen Docs are the ideal place to start if you are new to BindOpen. They are categorized in 3 broader topics:
- Articles to learn how to use BindOpen;
- Notes to follow our releases;
- Api to have an overview of BindOpen APIs.
BindOpen Blog
The BindOpen Blog is where we announce new features, write engineering blog posts, demonstrate proof-of-concepts and features under development.
Feed back
If you're having trouble with BindOpen, file a bug on the BindOpen Issue Tracker.
Donation
You are welcome to support this project. All donations are optional but are greatly appreciated.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. 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. |
-
net9.0
- BindOpen.Scoping.Script (>= 1.2.176)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on BindOpen.Scoping:
Package | Downloads |
---|---|
BindOpen.Commands
A straightforward and comprehensive API for manipulating command-line arguments and handling related tasks. |
|
BindOpen.Messages.Email
A package to send and receive your messages. |
|
BindOpen.Hosting
BindOpen.Hosting provides full integration of BindOpen to the .NET standard configuration and dependency injection mechanisms. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.2.176 | 67 | 8/16/2025 |
1.2.175 | 94 | 8/14/2025 |
1.2.174 | 98 | 8/14/2025 |
1.2.173 | 113 | 1/21/2025 |
1.2.172 | 101 | 1/20/2025 |
1.2.171 | 103 | 1/16/2025 |
1.2.170 | 96 | 1/9/2025 |
1.2.169 | 132 | 7/19/2024 |
1.2.168 | 1,948 | 3/4/2024 |
1.2.167 | 152 | 3/2/2024 |
1.2.166 | 286 | 1/28/2024 |
1.2.165 | 294 | 1/22/2024 |
1.2.164 | 176 | 1/22/2024 |