コード例 #1
0
        public async override Task <bool> MatchAsync(RoutingContextBase routingContext,
                                                     string sAddress,
                                                     IDictionary <string, object> Context,
                                                     Stream Body)
        {
            if (null == Predicate)
            {
                throw new ArgumentNullException("Predicate");
            }



            if (false == await base.MatchAsync(routingContext, sAddress, Context, Body))
            {
                return(false);
            }



            if (true == await Predicate.MatchAsync(routingContext, sAddress, Context, Body))
            {
                if (null != True)
                {
                    return(await True.MatchAsync(routingContext, sAddress, Context, Body));
                }
            }
            else
            {
                if (null != False)
                {
                    return(await False.MatchAsync(routingContext, sAddress, Context, Body));
                }
            }


            return(true);
        }