예제 #1
0
        /// <inheritdoc/>
        public override bool TryCreate(ScriptBindingContext context, out ScriptBinding binding)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            binding = null;

            if (string.Compare(context.Type, "timerTrigger", StringComparison.OrdinalIgnoreCase) == 0)
            {
                binding = new TimerTriggerScriptBinding(context);
            }

            return(binding != null);
        }
        /// <inheritdoc/>
        public override bool TryCreate(ScriptBindingContext context, out ScriptBinding binding)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            binding = null;

            if (string.Equals(context.Type, "timerTrigger", StringComparison.OrdinalIgnoreCase))
            {
                binding = new TimerTriggerScriptBinding(_nameResolver, _environment, context);
            }

            return(binding != null);
        }