- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFunction.cs
More file actions
Latest commit
30 lines (30 loc) · 1.15 KB
/
Copy pathFunction.cs
File metadata and controls
30 lines (30 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
namespaceSteveSharp
{
publicclassFunction
{
publicstringName="";
publicList<string>Body{get;set;}
publicFunction(stringname,List<string>body)
{
Name=name;
Body=body;
Displays.NewFunction(name);
}
publicstaticstringReturn(inti)
{
return"return "+i;
}
publicstaticstringCall(stringfunction)
{
return"function "+function;
}
publicstaticstringSchedule(stringfunction,stringtime,boolappend=false,boolreplace=false){
if(append&&!replace)return$"schedule function {function}{time} append";
elseif(!append&&replace)return$"schedule function {function}{time} replace";
elsereturn$"schedule function {function}{time}";
}
publicstringScheduleSelf(stringtime,boolappend=false,boolreplace=false)=>Schedule(Name,time,append,replace);
publicstaticstringClearSchedule(stringfunction)=>$"schedule clear {function}";
publicstringClearSchedule()=>ClearSchedule(Name);
}
}