コード例 #1
0
 /// <summary>
 /// Formats a property value for display purposes
 /// </summary>
 /// <param name="value">The property value to format</param>
 /// <param name="flags">Additional <see cref="FormatFlags"/> with formatting instructions.</param>
 /// <returns>A string containing the property's value in a suitably formatted structure</returns>
 public string FormatForDisplay(PropVariant value, FormatFlags flags)
 {
     _propDescription.FormatForDisplay(value.MarshalledPointer, (PROPDESC_FORMAT_FLAGS)flags, out string sFormatted);
     return(sFormatted);
 }
コード例 #2
0
 /// <summary>
 /// Coerces a <see cref="PropVariant"/> value into a canonical format to suit this property.
 /// </summary>
 /// <param name="value">The <see cref="PropVariant"/> value to coerce into a canonical format</param>
 public void CoerceToCanonicalValue(PropVariant value)
 {
     _propDescription.CoerceToCanonicalValue(value.MarshalledPointer);
     value.MarshalPointerToValue();
 }