internal RestControllerMethodInfo( MethodInfo methodInfo, string urlPrefix, Func<object[]> constructorArgs, bool isAsync) { constructorArgs.GuardNull(nameof(constructorArgs)); _urlPrefix = urlPrefix; IsAsync = isAsync; ControllerConstructorArgs = constructorArgs; MethodInfo = methodInfo; InitializeValidParameterTypes(); InitializeParameters(); InitializeVerb(); InitializeFindParameterRegex(); InitializeMatchUriRegex(); InitializeContentParameter(); }
internal RestControllerMethodInfo( MethodInfo methodInfo, string urlPrefix, Func <object[]> constructorArgs, bool isAsync) { constructorArgs.GuardNull(nameof(constructorArgs)); _urlPrefix = urlPrefix; IsAsync = isAsync; ControllerConstructorArgs = constructorArgs; MethodInfo = methodInfo; InitializeValidParameterTypes(); InitializeParameters(); InitializeVerb(); InitializeFindParameterRegex(); InitializeMatchUriRegex(); InitializeBodyParameter(); }
internal RestControllerMethodInfo( MethodInfo methodInfo, Func <object[]> constructorArgs, bool isAsync) { constructorArgs.GuardNull(nameof(constructorArgs)); IsAsync = isAsync; ControllerConstructorArgs = constructorArgs; MethodInfo = methodInfo; InitializeValidParameterTypes(); InitializeParameters(); InitializeVerb(); GetUrlToMatch(methodInfo); InitializeFindParameterRegex(_urlToMatch); InitializeMatchUriRegex(); InitializeContentParameter(); }
internal RestControllerMethodInfo( MethodInfo methodInfo, Func <object[]> constructorArgs, TypeWrapper typeWrapper) { constructorArgs.GuardNull(nameof(constructorArgs)); _uriParser = new UriParser(); _matchUri = GetUriFromMethod(methodInfo); ReturnTypeWrapper = typeWrapper; ControllerConstructorArgs = constructorArgs; MethodInfo = methodInfo; _validParameterTypes = GetValidParameterTypes(); _parameterGetters = GetParameterGetters(methodInfo); Verb = GetVerb(); Type contentParameterType; HasContentParameter = TryGetContentParameterType(methodInfo, out contentParameterType); ContentParameterType = contentParameterType; }