コード例 #1
0
        public static IRegistration Register <A, R>(this IRegistration registration, Func <A, R> source)
        {
            var targetType = typeof(Func <A, R>);
            var curried    = Functional.Curry(source);

            registration.Add(targetType, () => curried);

            return(registration);
        }
コード例 #2
0
 public IHttpActionResult Post(registration model)
 {
     if (ModelState.IsValid)
     {
         return(Ok(registrationRepository.Add(model)));
     }
     else
     {
         return(BadRequest());
     }
 }