FiftyOne.Foundation.UI.Device.GetPropertyValuesAsStrings C# (CSharp) Method

GetPropertyValuesAsStrings() private method

private GetPropertyValuesAsStrings ( ) : List>.SortedList
return List>.SortedList
        public SortedList<string, List<string>> GetPropertyValuesAsStrings()
        {
            var results = new SortedList<string, List<string>>();

            // Add the properties and values first.
            foreach (var profile in _signature.Profiles.Where(i => i != null))
            {
                foreach (var property in profile.Properties)
                {
                    results.Add(
                        property.Name,
                        new List<string>(profile[property].ToStringArray()));
                }
            }

            return results;
        }

Usage Example

 /// <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(Device device)
 {
     Initialise(device.GetPropertyValuesAsStrings().ToDictionary(kvp => kvp.Key, kvp => kvp.Value.ToArray()));
     UserAgent = device.UserAgent;
 }