예제 #1
0
        bool PipeContext.TryGetPayload <TPayload>(out TPayload payload)
        {
            if (_payloadCache != null)
            {
                return(_payloadCache.TryGetPayload(out payload));
            }

            return(_context.TryGetPayload(out payload));
        }
예제 #2
0
        /// <summary>
        /// Attemts
        /// </summary>
        /// <param name="payload"></param>
        /// <typeparam name="TPayload"></typeparam>
        /// <returns></returns>
        public virtual bool TryGetPayload <TPayload>(out TPayload payload)
            where TPayload : class
        {
            payload = this as TPayload;
            if (payload != null)
            {
                return(true);
            }

            return(_payloadCache.TryGetPayload(out payload));
        }
예제 #3
0
        public virtual bool TryGetPayload <TPayload>(out TPayload context)
            where TPayload : class
        {
            context = this as TPayload;
            if (context != null)
            {
                return(true);
            }

            return(_payloadCache.TryGetPayload(out context));
        }
예제 #4
0
 public bool TryGetPayload <TPayload>(out TPayload payload)
     where TPayload : class
 {
     return(_payloadCache.TryGetPayload(out payload) || _parentCache.TryGetPayload(out payload));
 }
예제 #5
0
 public virtual bool TryGetPayload <TPayload>(out TPayload context)
     where TPayload : class
 {
     return(_payloadCache.TryGetPayload(out context) || _context.TryGetPayload(out context));
 }
예제 #6
0
 bool IReadOnlyPayloadCollection.TryGetPayload <T>(out T payload)
 {
     return(_payloadCache.TryGetPayload(out payload) || _parentCache.TryGetPayload(out payload));
 }