本文整理汇总了C#中PropVariant.SetInt方法的典型用法代码示例。如果您正苦于以下问题:C# PropVariant.SetInt方法的具体用法?C# PropVariant.SetInt怎么用?C# PropVariant.SetInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropVariant
的用法示例。
在下文中一共展示了PropVariant.SetInt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateLeafCondition
/// <summary>
/// Creates a leaf condition node that represents a comparison of property value and Integer value.
/// </summary>
/// <param name="propertyName">The name of a property to be compared, or null for an unspecified property.
/// The locale name of the leaf node is LOCALE_NAME_USER_DEFAULT.</param>
/// <param name="value">The Integer value against which the property value should be compared.</param>
/// <param name="operation">Specific condition to be used when comparing the actual value and the expected value of the given property</param>
/// <returns>SearchCondition based on the given parameters</returns>
/// <remarks>
/// The search will only work for files that are indexed, as well as the specific properties are indexed. To find
/// the properties that are indexed, look for the specific property's property description and
/// <see cref="P:Microsoft.WindowsAPICodePack.Shell.PropertySystem.ShellPropertyDescription.TypeFlags"/> property for IsQueryable flag.
/// </remarks>
public static SearchCondition CreateLeafCondition(string propertyName, int value, SearchConditionOperation operation)
{
PropVariant propVar = new PropVariant();
propVar.SetInt(value);
return CreateLeafCondition(propertyName, propVar, "System.StructuredQuery.CustomProperty.Integer", operation);
}