FiftyOne.Foundation.Mobile.Detection.WebProvider.GetContextItems C# (CSharp) Method

GetContextItems() static private method

Returns a collection that can be used to persist data across the request. If using .NET 4 or above the HttpRequest context items collection is used. If lower versions then the current context, if it exists is used. If there is no collection available then null is returned and the requesting routine will need to work without the benefit of persisting the detection result across the request.
The implementation varies by .NET version.
static private GetContextItems ( HttpRequest request ) : System.Collections.IDictionary
request System.Web.HttpRequest
return System.Collections.IDictionary
        internal static System.Collections.IDictionary GetContextItems(HttpRequest request)
        {
            System.Collections.IDictionary items = null;
            if (request.RequestContext != null &&
                request.RequestContext.HttpContext !=null)
            {
                items = request.RequestContext.HttpContext.Items;
            }
            return items;
        }