ABsoluteMaybe.UserFiltering.SpiderFilter.FilterOut C# (CSharp) Method

FilterOut() public method

public FilterOut ( string userId ) : bool
userId string
return bool
        public bool FilterOut(string userId)
        {
            if (string.IsNullOrWhiteSpace(Context.Request.UserAgent))
                return true;

            var userAgent = HttpContext.Current.Request.UserAgent;
            return userAgent == null || _bots.Any(userAgent.Contains);
        }