Beispiel #1
0
        internal EndpointData(MethodData method, HttpMethod httpMethod, ControllerData controller, bool deprecated)
        {
            _headers           = new Lazy <IReadOnlyList <RequestParameterData> >(() => HeaderFactory.GetEndpointHeaders(this));
            _requestParameters = new Lazy <IReadOnlyList <RequestParameterData> >(() => RequestParameterFactory.GetEndpointParameters(this).ToArray());
            _statusCodes       = new Lazy <IReadOnlyList <HttpStatusCode> >(() => StatusCodeFactory.GetEndpointStatusCodes(this).ToArray());
            _responseType      = new Lazy <TypeData>(() => ResponseFactory.GetEndpointResponse(this));

            Method     = method;
            HttpMethod = httpMethod;
            Controller = controller;
            Deprecated = deprecated;
        }