示例#1
0
        /// <summary>
        /// Executes the representor
        /// </summary>
        /// <param name="currentRepresentor">the currentRepresentor</param>
        /// <param name="transitionRequestHandler">the transitionRequestHandler</param>
        /// <returns>crichton representor</returns>
        public Task <CrichtonRepresentor> ExecuteAsync(CrichtonRepresentor currentRepresentor, ITransitionRequestHandler transitionRequestHandler)
        {
            var transition = new CrichtonTransition()
            {
                Uri = Url
            };

            return(transitionRequestHandler.RequestTransitionAsync(transition));
        }
        /// <summary>
        /// Executes the representor
        /// </summary>
        /// <param name="currentRepresentor">the currentRepresentor</param>
        /// <param name="transitionRequestHandler">the transitionRequestHandler</param>
        /// <returns>crichton representor</returns>
        public Task <CrichtonRepresentor> ExecuteAsync(CrichtonRepresentor currentRepresentor, ITransitionRequestHandler transitionRequestHandler)
        {
            if (currentRepresentor == null)
            {
                throw new ArgumentNullException("currentRepresentor");
            }
            if (transitionRequestHandler == null)
            {
                throw new ArgumentNullException("transitionRequestHandler");
            }

            var transition = LocateTransition(currentRepresentor);

            return(transitionRequestHandler.RequestTransitionAsync(transition));
        }
示例#3
0
        /// <summary>
        /// Executes the representor
        /// </summary>
        /// <param name="currentRepresentor">the currentRepresentor</param>
        /// <param name="transitionRequestHandler">the transitionRequestHandler</param>
        /// <returns>crichton representor</returns>
        public Task <CrichtonRepresentor> ExecuteAsync(CrichtonRepresentor currentRepresentor, ITransitionRequestHandler transitionRequestHandler)
        {
            if (currentRepresentor == null)
            {
                throw new ArgumentNullException("currentRepresentor");
            }
            if (transitionRequestHandler == null)
            {
                throw new ArgumentNullException("transitionRequestHandler");
            }

            var selfTransition = new CrichtonTransition()
            {
                Uri = currentRepresentor.SelfLink
            };

            return(transitionRequestHandler.RequestTransitionAsync(selfTransition));
        }
        /// <summary>
        /// Executes the representor
        /// </summary>
        /// <param name="currentRepresentor">the currentRepresentor</param>
        /// <param name="transitionRequestHandler">the transitionRequestHandler</param>
        /// <returns>crichton representor</returns>
        public Task <CrichtonRepresentor> ExecuteAsync(CrichtonRepresentor currentRepresentor, ITransitionRequestHandler transitionRequestHandler)
        {
            var transition = LocateTransition(currentRepresentor);

            return(transitionRequestHandler.RequestTransitionAsync(transition, Data));
        }