* Cleaned up project.json * Updated README with example on how to deserialize json request body * Added reference to System.Runtime.Serialization.Json as this would seems a common usage * Added C# example files to the /Examples directory
12 lines
282 B
C#
12 lines
282 B
C#
using System;
|
|
using Fission.DotNetCore.Api;
|
|
|
|
public class FissionFunction
|
|
{
|
|
public string Execute(FissionContext context){
|
|
var x = Convert.ToInt32(context.Arguments["x"]);
|
|
var y = Convert.ToInt32(context.Arguments["y"]);
|
|
return (x+y).ToString();
|
|
}
|
|
|