6
6
using System . Net . Http . Formatting ;
7
7
using System . Threading . Tasks ;
8
8
9
- using Microsoft . Azure . WebJobs ;
10
9
using Microsoft . Extensions . Logging ;
11
10
using Microsoft . Practices . ServiceLocation ;
12
11
13
12
using Sample . Extensions ;
14
13
using Sample . Functions . Extensions ;
15
- using Sample . Functions . ParameterOptions ;
16
14
using Sample . Models . Functions . Responses ;
17
15
18
16
namespace Sample . Functions . FunctionFactories
@@ -36,31 +34,12 @@ public abstract class FunctionBase : IFunction
36
34
/// </summary>
37
35
public IServiceLocator ServiceLocator { get ; set ; }
38
36
39
- /// <summary>
40
- /// Gets or sets the <see cref="FunctionParameterOptions"/> instance.
41
- /// </summary>
42
- public FunctionParameterOptions ParameterOptions { protected get ; set ; }
43
-
44
- /// <summary>
45
- /// Invokes the function.
46
- /// </summary>
47
- /// <param name="req"><see cref="HttpRequestMessage"/> instance.</param>
48
- /// <returns>Returns the <see cref="HttpResponseMessage"/> instance.</returns>
49
- public virtual Task < HttpResponseMessage > InvokeAsync ( HttpRequestMessage req )
37
+ /// <inheritdoc />
38
+ public virtual Task < HttpResponseMessage > InvokeAsync < TOptions > ( HttpRequestMessage req , TOptions options = default ( TOptions ) )
50
39
{
51
40
return null ;
52
41
}
53
42
54
- /// <summary>
55
- /// Invokes the function.
56
- /// </summary>
57
- /// <param name="info"><see cref="TimerInfo"/> instance.</param>
58
- /// <returns>Returns the <see cref="Task"/>.</returns>
59
- public virtual Task InvokeAsync ( TimerInfo info )
60
- {
61
- return Task . CompletedTask ;
62
- }
63
-
64
43
/// <summary>
65
44
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
66
45
/// </summary>
@@ -107,15 +86,6 @@ protected virtual void ReleaseUnmanagedResources()
107
86
// Release unmanaged resources here.
108
87
}
109
88
110
- /// <summary>
111
- /// Ensures whether the <see cref="FunctionParameterOptions"/> instance has been loaded or not.
112
- /// </summary>
113
- /// <returns>Returns <c>True</c>, if <see cref="FunctionParameterOptions"/> instance has been loaded; otherwise returns <c>False</c>.</returns>
114
- protected bool EnsureParameterOptionsLoaded ( )
115
- {
116
- return ! this . ParameterOptions . IsNullOrDefault ( ) ;
117
- }
118
-
119
89
/// <summary>
120
90
/// Checks whether the request contains payload or not.
121
91
/// </summary>
0 commit comments