{"id":14987843,"url":"https://github.com/apache/openwhisk-runtime-dotnet","last_synced_at":"2025-07-03T17:32:48.705Z","repository":{"id":33544337,"uuid":"152629467","full_name":"apache/openwhisk-runtime-dotnet","owner":"apache","description":"Apache OpenWhisk Runtime .Net supports Apache OpenWhisk functions written in .Net languages","archived":false,"fork":false,"pushed_at":"2024-10-04T17:51:17.000Z","size":231,"stargazers_count":35,"open_issues_count":4,"forks_count":28,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-06-01T17:32:02.661Z","etag":null,"topics":["apache","cloud","docker","dot-net","dotnet","faas","functions","functions-as-a-service","openwhisk","openwhisk-runtime","serverless","serverless-architectures","serverless-functions"],"latest_commit_sha":null,"homepage":"https://openwhisk.apache.org/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-11T17:24:23.000Z","updated_at":"2025-03-02T03:40:40.000Z","dependencies_parsed_at":"2024-08-23T15:19:34.871Z","dependency_job_id":"84022701-8d1c-4a4d-a621-71dcf2ae8817","html_url":"https://github.com/apache/openwhisk-runtime-dotnet","commit_stats":{"total_commits":54,"total_committers":18,"mean_commits":3.0,"dds":0.5185185185185186,"last_synced_commit":"a9706af7f7351362d20a43d18dabfa8fad7342d2"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/apache/openwhisk-runtime-dotnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-runtime-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-runtime-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-runtime-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-runtime-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/openwhisk-runtime-dotnet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fopenwhisk-runtime-dotnet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259548524,"owners_count":22874875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache","cloud","docker","dot-net","dotnet","faas","functions","functions-as-a-service","openwhisk","openwhisk-runtime","serverless","serverless-architectures","serverless-functions"],"created_at":"2024-09-24T14:15:33.649Z","updated_at":"2025-07-03T17:32:48.637Z","avatar_url":"https://github.com/apache.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n--\u003e\n\n# Apache OpenWhisk runtimes for .NET\n\n[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n[![Continuous Integration](https://github.com/apache/openwhisk-runtime-dotnet/actions/workflows/ci.yaml/badge.svg)](https://github.com/apache/openwhisk-runtime-dotnet/actions/workflows/ci.yaml)\n\n## Give it a try today\n\nCreate a C# project called Apache.OpenWhisk.Example.Dotnet:\n\n```bash\ndotnet new classlib -n Apache.OpenWhisk.Example.Dotnet -lang \"C#\"\ncd Apache.OpenWhisk.Example.Dotnet\n```\n\nInstall the [Newtonsoft.Json](https://www.newtonsoft.com/json) NuGet package as follows:\n\n```bash\ndotnet add package Newtonsoft.Json -v 13.0.1\n```\n\nNow create a file called `Hello.cs` with the following content:\n\n```csharp\nusing System;\nusing Newtonsoft.Json.Linq;\n\nnamespace Apache.OpenWhisk.Example.Dotnet\n{\n    public class Hello\n    {\n        public JObject Main(JObject args)\n        {\n            string name = \"stranger\";\n            if (args.ContainsKey(\"name\")) {\n                name = args[\"name\"].ToString();\n            }\n            JObject message = new JObject();\n            message.Add(\"greeting\", new JValue($\"Hello, {name}!\"));\n            return (message);\n        }\n    }\n}\n```\nPublish the project as follows:\n\n```bash\ndotnet publish -c Release -o out\n```\n\nZip the published files as follows:\n\n```bash\ncd out\nzip -r -0 helloDotNet.zip *\n```\n\nCreate the action\n\n```bash\nwsk action update helloDotNet helloDotNet.zip --main Apache.OpenWhisk.Example.Dotnet::Apache.OpenWhisk.Example.Dotnet.Hello::Main --kind dotnet:6.0\n```\n\nFor the return result, not only support `dictionary` but also support `array`\n\nSo a very simple `hello array` function would be:\n\n```csharp\nusing System;\nusing Newtonsoft.Json.Linq;\n\nnamespace Apache.OpenWhisk.Tests.Dotnet\n{\n    public class HelloArray\n    {\n        public JArray Main(JObject args)\n        {\n            JArray jarray = new JArray();\n            jarray.Add(\"a\");\n            jarray.Add(\"b\");\n            return (jarray);\n        }\n    }\n}\n```\n\nAnd support array result for sequence action as well, the first action's array result can be used as next action's input parameter.\n\nSo the function can be:\n\n```csharp\nusing System;\nusing Newtonsoft.Json.Linq;\n\nnamespace Apache.OpenWhisk.Tests.Dotnet\n{\n    public class HelloPassArrayParam\n    {\n        public JArray Main(JArray args)\n        {\n            return (args);\n        }\n    }\n}\n```\n\n## Changelogs\n\n- [.NET 6.0 CHANGELOG.md](core/net6.0/CHANGELOG.md)\n\n## Quick Start Guides\n\n- [.NET Core 6.0](core/net6.0/QUICKSTART.md)\n\n# License\n\n[Apache 2.0](LICENSE.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fopenwhisk-runtime-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fopenwhisk-runtime-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fopenwhisk-runtime-dotnet/lists"}