Example #1
0
        public override IEnumerable <object> Invoke(object argument, Context context)
        {
            Uri link = UriEx.From((string)argument, () => ReportBadArgument(context, argument));

            if (link == null)
            {
                return(null);
            }

            ReportVisitingPage(link, context);

            context.CurrentAddress = link;

            try
            {
                context.PageContent = webClient.DownloadString(link);
            }
            catch (WebException ex)
            {
                Warn(context, ex.Message);
            }

            return(null);
        }