-
Notifications
You must be signed in to change notification settings - Fork 94
/
Copy pathMockFunctionRegistry.cs
53 lines (44 loc) · 1.48 KB
/
MockFunctionRegistry.cs
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jace.Execution;
namespace Jace.Tests.Mocks
{
public class MockFunctionRegistry : IFunctionRegistry
{
private HashSet<string> functionNames;
public MockFunctionRegistry()
: this(new string[] { "sin", "cos", "csc", "sec", "asin", "acos", "tan", "cot", "atan", "acot", "loge", "log10", "logn", "sqrt", "abs" })
{
}
public MockFunctionRegistry(IEnumerable<string> functionNames)
{
this.functionNames = new HashSet<string>(functionNames);
}
public FunctionInfo GetFunctionInfo(string functionName)
{
return new FunctionInfo(functionName, 1, false, null);
}
public bool IsFunctionName(string functionName)
{
return functionNames.Contains(functionName);
}
public void RegisterFunction(string functionName, Delegate function)
{
throw new NotImplementedException();
}
public void RegisterFunction(string functionName, Delegate function, bool isOverWritable)
{
throw new NotImplementedException();
}
public void RegisterFunction(string functionName, int numberOfParameters)
{
throw new NotImplementedException();
}
public bool UnregisterFunction(string functionName)
{
throw new NotImplementedException();
}
}
}