Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Autogenerated .Net bindings for CWL

License

NotificationsYou must be signed in to change notification settings

common-workflow-lab/CWLDotNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

example workflow

This project contains .Net objects and utilities auto-generated byhttps://github.com/common-workflow-language/schema_salad for parsing documents corresponding to thehttps://w3id.org/cwl/cwl schema

Usage

Loading Documents

// Specify the CWL file to loadUrifileUri=newUri(Path.GetFullPath("my-cwl-document.cwl"));// Read the file contentsstringfileContent=System.IO.File.ReadAllText(fileUri.AbsolutePath);// Parse the CWL documentvardoc=CWLDotNet.RootLoader.LoadDocument(fileContent,fileUri.AbsoluteUri);// Work with the documentdoc.Switch(    CommandLineTool=>Console.WriteLine("The loaded document is a CommandLineTool"),    ExpressionTool=>Console.WriteLine("The loaded document is a ExpressionTool"),    Workflow=>Console.WriteLine("The loaded document is a Workflow"),    Operation=>Console.WriteLine("The loaded document is an Operation"),    ListOf=>Console.WriteLine("This is a list of one of: CommandLineTool | ExpressionTool | Workflow | Operation"));

Creating, Editing and Serializing Documents

usingSystem.Text.Json;usingCWLDotNet;// Create a CommandLineTool with empty inputs and outputsCommandLineToolmytool=newCommandLineTool(new(),new());// Set the base commandmytool.baseCommand="echo";// Create an input parameter with a default valueCommandInputParameterinput1=newCommandInputParameter(CWLType.INT);input1.default_="Hello World!";// Add the input to the toolmytool.inputs.Add(input1);// Serialize the toolstringoutDoc=JsonSerializer.Serialize(mytool.Save());

Documentation

The complete documentation, autogenerated byDocFX can be found under the following link:https://common-workflow-lab.github.io/CWLDotNet/

Limitations

CWLDotNet only supports the CWL v1.2 syntax. Other documents have to be upgraded using thecwl-upgrader

Maintainers

@ZimmerA


[8]ページ先頭

©2009-2025 Movatter.jp