예제 #1
0
        public static string GetValueAsString <TEnum>(this IAIMPPropertyList propertyList, TEnum propId) where TEnum : Enum
        {
            var value  = propertyList.GetValueAsObject <IAIMPString>(propId);
            var result = value.GetData();

            Marshal.FinalReleaseComObject(value);
            return(result);
        }
예제 #2
0
 public static T GetValueAsObject <T>(this IAIMPPropertyList propertyList, Enum propId)
 {
     propertyList.GetValueAsObject(Convert.ToInt32(propId), typeof(T).GUID, out var value).EnsureSuccess();
     return((T)value);
 }