public Task <IBinding> TryCreateAsync(BindingProviderContext context)
        {
            ParameterInfo parameter = context.Parameter;

            if (parameter.ParameterType != typeof(TextWriter))
            {
                return(Task.FromResult <IBinding>(null));
            }

            IBinding binding = new ConsoleOutputBinding(parameter.Name);

            return(Task.FromResult(binding));
        }
        public Task <IBinding> TryCreateAsync(BindingProviderContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            ParameterInfo parameter = context.Parameter;

            if (parameter.ParameterType != typeof(TextWriter))
            {
                return(Task.FromResult <IBinding>(null));
            }

            IBinding binding = new ConsoleOutputBinding(parameter.Name);

            return(Task.FromResult(binding));
        }