/// <summary> /// Constructs a new instance of ClientCapability. /// See http://51degrees.mobi/Products/DeviceData/PropertyDictionary.aspx /// for a full list of available properties. /// All the properties used are non-lists and therefore the first /// item contained in the values list contains the only available value. /// </summary> public FiftyOneClientCapability(BaseDeviceInfo device) { Initialise(device.GetAllProperties()); UserAgent = device.UserAgent; }
private void Create(BaseDeviceInfo device, IDictionary properties, IDictionary currentProperties) { // Enhance with the capabilities from the device data. if (device != null) { // Enhance the default capabilities collection based on the device. Enhance(properties, currentProperties, device); // Add the 51Degrees.mobi device properties to the collection. properties.Add(Constants.FiftyOneDegreesProperties, device.GetAllProperties()); // If an adapters patch file has been loaded then include this // capability in the exposed list of capabilities. string adapters = GetAdapters(device); if (String.IsNullOrEmpty(adapters) == false) SetValue(properties, "adapters", adapters); } }