public IEnumerable<ISpamFilter> GetSpamFilters() {

            var settings = _orchardServices.WorkContext.CurrentSite.As<AkismetSettingsPart>().Record;

            if (string.IsNullOrWhiteSpace(settings.ApiKey)) {
                yield break;
            }

            // don't return any filter if authenticated users are trusted, and current user authenticated
            if(_orchardServices.WorkContext.CurrentUser != null && settings.TrustAuthenticatedUsers) {
                yield break;    
            }

            var filter = new AkismetApiSpamFilter(AkismetServiceUrl, settings.ApiKey, _orchardServices.WorkContext.HttpContext);

            yield return filter;
        }
        public IEnumerable <ISpamFilter> GetSpamFilters()
        {
            var settings = _orchardServices.WorkContext.CurrentSite.As <AkismetSettingsPart>().Record;

            if (string.IsNullOrWhiteSpace(settings.ApiKey))
            {
                yield break;
            }

            // don't return any filter if authenticated users are trusted, and current user authenticated
            if (_orchardServices.WorkContext.CurrentUser != null && settings.TrustAuthenticatedUsers)
            {
                yield break;
            }

            var filter = new AkismetApiSpamFilter(AkismetServiceUrl, settings.ApiKey, _orchardServices.WorkContext.HttpContext);

            yield return(filter);
        }