Ejemplo n.º 1
0
        public object PreloadLinkedOutputWithHandler(object inputData, HandlerChecker handlerChecker)
        {
            if (!this.IsLinkedAsset)
            {
                return(inputData);
            }

            handlerChecker = handlerChecker ?? DefaultHandlerChecker.Instance;
            if (this.Handlers?.Count != 2)
            {
                throw new System.ArgumentException("Linked Output requires 2 handlers, and the first handler is used for preloading.");
            }

            // the first handler is for preloading
            var handlerForPreload = this.Handlers.Take(1).ToList();

            return(handlerChecker.CheckWithHandlers(inputData, handlerForPreload));
        }
Ejemplo n.º 2
0
 public virtual object CheckOutputWithHandler(object inputData, HandlerChecker handlerChecker)
 {
     return(inputData);
 }
Ejemplo n.º 3
0
 public override object CheckOutputWithHandler(object inputData, HandlerChecker handlerChecker)
 {
     handlerChecker = handlerChecker ?? DefaultHandlerChecker.Instance;
     return(handlerChecker.CheckWithHandlers(inputData, this.Handlers));
 }