Pomona.RequestProcessing.HandlerMethod.MatchMethodTakingExistingResourceAndForm C# (CSharp) 메소드

MatchMethodTakingExistingResourceAndForm() 개인적인 메소드

private MatchMethodTakingExistingResourceAndForm ( ResourceType resourceType ) : RouteAction
resourceType Pomona.Common.TypeSystem.ResourceType
리턴 Pomona.Routing.RouteAction
        private RouteAction MatchMethodTakingExistingResourceAndForm(ResourceType resourceType)
        {
            var existingTypeParam = Parameters.SingleOrDefaultIfMultiple(x => x.Type.IsAssignableFrom(resourceType));
            if (existingTypeParam == null)
                return null;

            // Find exactly one form parameter after resource arg:
            var formParam = Parameters.Skip(existingTypeParam.Position + 1).SingleOrDefaultIfMultiple(x => x.IsTransformedType);
            if (formParam == null)
                return null;

            var resourceTypeParam = Parameters.Where(x => x.IsResource && x.Type.IsAssignableFrom(resourceType));
            return resourceTypeParam.Any() ? new HandlerMethodTakingFormInvoker(this, formParam, existingTypeParam) : null;
        }