Пример #1
0
 public static bool TryGetStringValue(this IPortableDeviceValues values, PropertyKey key, out string value)
 {
     if (values.HasKeyValue(key))
     {
         values.GetStringValue(key, out value);
         return(true);
     }
     value = string.Empty;
     return(false);
 }
Пример #2
0
        public static string GetNameFromGuid(PortableDeviceApiLib._tagpropertykey key, PortableDeviceApiLib.tag_inner_PROPVARIANT values)
        {
            PortableDeviceApiLib.IPortableDeviceValues pValues = (PortableDeviceApiLib.IPortableDeviceValues) new PortableDeviceTypesLib.PortableDeviceValuesClass();
            string contentTypeName;

            pValues.SetValue(ref key, ref values);
            pValues.GetStringValue(ref key, out contentTypeName);

            return(contentTypeName);
        }