本文整理汇总了C#中Categories.HasFlag方法的典型用法代码示例。如果您正苦于以下问题:C# Categories.HasFlag方法的具体用法?C# Categories.HasFlag怎么用?C# Categories.HasFlag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Categories
的用法示例。
在下文中一共展示了Categories.HasFlag方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ConvertCategoriesToQueryParameterValue
public static string ConvertCategoriesToQueryParameterValue(Categories categories)
{
var returnValue = string.Empty;
if (categories.HasFlag(Categories.Abstract))
{
returnValue += Categories.Abstract + ",";
}
if (categories.HasFlag(Categories.Animals))
{
returnValue += Categories.Animals + ",";
}
if (categories.HasFlag(Categories.BlackAndWhite))
{
returnValue += "black and white,";
}
if (categories.HasFlag(Categories.Celebrities))
{
returnValue += Categories.Celebrities + ",";
}
if (categories.HasFlag(Categories.CityAndArchitecture))
{
returnValue += "City and Architecture,";
}
if (categories.HasFlag(Categories.Commercial))
{
returnValue += Categories.Commercial + ",";
}
if (categories.HasFlag(Categories.Concert))
{
returnValue += Categories.Concert + ",";
}
if (categories.HasFlag(Categories.Family))
{
returnValue += Categories.Family + ",";
}
if (categories.HasFlag(Categories.Fashion))
{
returnValue += Categories.Fashion + ",";
}
if (categories.HasFlag(Categories.Film))
{
returnValue += Categories.Film + ",";
}
if (categories.HasFlag(Categories.FineArt))
{
returnValue += Categories.FineArt + ",";
}
if (categories.HasFlag(Categories.Food))
{
returnValue += Categories.Food + ",";
}
if (categories.HasFlag(Categories.Journalism))
{
returnValue += Categories.Journalism + ",";
}
if (categories.HasFlag(Categories.Landscapes))
{
returnValue += Categories.Landscapes + ",";
}
if (categories.HasFlag(Categories.Macro))
{
returnValue += Categories.Macro + ",";
}
if (categories.HasFlag(Categories.Nature))
{
returnValue += Categories.Nature + ",";
}
if (categories.HasFlag(Categories.Nude))
{
returnValue += Categories.Nude + ",";
}
if (categories.HasFlag(Categories.People))
{
returnValue += Categories.People + ",";
}
if (categories.HasFlag(Categories.PerformingArts))
{
returnValue += Categories.PerformingArts + ",";
}
if (categories.HasFlag(Categories.Sport))
{
returnValue += Categories.Sport + ",";
}
if (categories.HasFlag(Categories.StillLife))
{
returnValue += Categories.StillLife + ",";
}
if (categories.HasFlag(Categories.Street))
{
returnValue += Categories.Street + ",";
}
if (categories.HasFlag(Categories.Transportation))
{
returnValue += Categories.Transportation + ",";
}
if (categories.HasFlag(Categories.Travel))
{
returnValue += Categories.Travel + ",";
}
//.........这里部分代码省略.........