VOOZH about

URL: https://www.nuget.org/packages/View.OrchestratorBase/

⇱ NuGet Gallery | View.OrchestratorBase 0.4.0.3




👁 Image
View.OrchestratorBase 0.4.0.3

dotnet add package View.OrchestratorBase --version 0.4.0.3
 
 
NuGet\Install-Package View.OrchestratorBase -Version 0.4.0.3
 
 
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="View.OrchestratorBase" Version="0.4.0.3" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="View.OrchestratorBase" Version="0.4.0.3" />
 
Directory.Packages.props
<PackageReference Include="View.OrchestratorBase" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add View.OrchestratorBase --version 0.4.0.3
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: View.OrchestratorBase, 0.4.0.3"
 
 
#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.
#:package View.OrchestratorBase@0.4.0.3
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=View.OrchestratorBase&version=0.4.0.3
 
Install as a Cake Addin
#tool nuget:?package=View.OrchestratorBase&version=0.4.0.3
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

View.io Orchestrator Base Classes and Interfaces

Base classes and interfaces that must be implemented to deploy code with the View Orchestrator.

C# Requirements

Include Dependent Libraries

Install the View.OrchestratorBase NuGet package:

PM> Install-Package View.OrchestratorBase

Modify your .csproj file to include the following inside a PropertyGroup:

<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>

This ensures dependency and package DLLs are copied to your output directory rather than referenced as packages.

Helpful links:

Implement Base Class and Interface

The base class StepBase and interface IStepProcessor must be implemented to be deployed on the View Orchestrator. Your code should expect a StepRequest as its input, and return a StepResponse as its output.

using View.OrchestratorBase

public class MyClass : StepBase, IStepProcessor
{
	public async Task<StepResponse> Process(StepRequest req)
	{
		// your code here

		StepResponse resp = new StepResponse
		{
			Result = StepResultEnum.Success, // or Failure, or Exception
			Data = Encoding.UTF8.GetBytes([your data here])
		};

		return resp;
	}
}

Python Requirements

User python scripts are encapsulated into a wrapper script by the Orchestrator and executed in a new shell process for each invocation. The following constraints must be met:

  • Orchestrator will invoke a method you implement as def process(req):
  • The input parameter req will always be a dictionary, following the same key names as the C# StepRequest class
  • The method must return a dictionary serializable to JSON using json.dumps(resp)
  • The Data property of the return dictionary must be a base64 string

Request and Response Dictionaries

The properties found within the input dictionary are identical to those found in the C# StepRequest class:

  • GUID - unique identifier for the request
  • Url - the URL on which the step was invoked
  • Headers - a dictionary (NameValueCollection) containing the headers attached to the request
  • Query - a dictionary (NameValueCollection) containing URL query elements
  • Data - base64-encoded string containing the input data, should be decoded before use

The returned dictionary should use the same key names as found in the C# StepResponse class:

  • Result - Success, Failure, Exception
  • StatusCode - an HTTP status code (integer)
  • ContentType - MIME type of the data within the Data property
  • Data - base64-encoded string of the response data, your code must perform the encoding

Example

import base64

def process(req) -> dict:
 input_data = str(base64.b64decode(req["Data"]))
	print("Received " + input_data)
	resp = {} 
 resp["Result"] = "Success"
 resp["StatusCode"] = 200
 resp["ContentType"] = "text/plain"
 resp["Data"] = base64.b64encode(str.encode("You said " + input_data)).decode("utf-8")
 return resp
Product Versions Compatible and additional computed target framework versions.
.NET net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on View.OrchestratorBase:

Package Downloads
View.Models

Database models, services, and supporting classes for for View AI.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.0.3 209 8/10/2024
0.4.0.1 652 7/3/2024
0.3.0.6 192 6/29/2024
0.3.0.5 199 6/14/2024
0.3.0.4 201 6/14/2024
0.3.0.3 195 6/14/2024
0.3.0.2 216 6/13/2024
0.3.0.1 198 6/13/2024