make stuff nonstatic
This commit is contained in:
1 parent
29eecc7887
commit
2cf6cd4a7d
3 files changed
+40
-15
No files matched your search
@@ -7,12 +7,17 @@ internal readonly struct EndpointInvocationInfo {
|
||||
|
||||
internal readonly MethodInfo methodInfo;
|
||||
internal readonly List<QueryParameterInfo> queryParameters;
|
||||
internal readonly BaseEndpointCheckAttribute[] requiredChecks;
|
||||
internal readonly InternalEndpointCheckAttribute[] requiredChecks;
|
||||
/// <summary>
|
||||
/// a reference to the object in which this method is defined (or null if the class is static)
|
||||
/// </summary>
|
||||
internal readonly object? typeInstanceReference;
|
||||
|
||||
public EndpointInvocationInfo(MethodInfo methodInfo, List<QueryParameterInfo> queryParameters, BaseEndpointCheckAttribute[] requiredChecks) {
|
||||
public EndpointInvocationInfo(MethodInfo methodInfo, List<QueryParameterInfo> queryParameters, InternalEndpointCheckAttribute[] requiredChecks, object? typeInstanceReference) {
|
||||
this.methodInfo = methodInfo ?? throw new ArgumentNullException(nameof(methodInfo));
|
||||
this.queryParameters = queryParameters ?? throw new ArgumentNullException(nameof(queryParameters));
|
||||
this.requiredChecks = requiredChecks;
|
||||
this.typeInstanceReference = typeInstanceReference;
|
||||
}
|
||||
|
||||
public readonly bool CheckAll(HttpListenerRequest req) => requiredChecks.All(x => x.Check(req));
|
||||
|
||||
Reference in new issue
Block a user