当前位置: 首页>>代码示例>>C#>>正文


C# Categories.HasFlag方法代码示例

本文整理汇总了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 + ",";
            }
//.........这里部分代码省略.........
开发者ID:frasalyu,项目名称:CCSWE-500px-API-and-sample,代码行数:101,代码来源:Converter.cs


注:本文中的Categories.HasFlag方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。