Detector.MobileDevice.GetAllProperties C# (CSharp) Method

GetAllProperties() private method

private GetAllProperties ( ) : Property[]
return Property[]
        public Property[] GetAllProperties()
        {
            List<Property> results = new List<Property>();

            // Get all the properties and values for the device.
            SortedList<string, List<string>> allProperties =
                Context.Request.Browser.Capabilities[Constants.FiftyOneDegreesProperties] as SortedList<string, List<string>>;

            // Check properties are available in case the device couldn't
            // be determined.
            if (allProperties != null)
            {
                // Copy all the properties and values to the return format.
                allProperties.Capacity = allProperties.Count;
                foreach (string key in allProperties.Keys)
                    if (allProperties[key].Count > 0)
                        results.Add(new Property(key, allProperties[key].ToArray()));
            }

            return results.ToArray();
        }