本文整理汇总了C#中Mission.HasFlag方法的典型用法代码示例。如果您正苦于以下问题:C# Mission.HasFlag方法的具体用法?C# Mission.HasFlag怎么用?C# Mission.HasFlag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mission
的用法示例。
在下文中一共展示了Mission.HasFlag方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetCategories
private static string GetCategories(Mission.Category category)
{
var sb = new StringBuilder();
if (category.HasFlag(Mission.Category.DEFAULT))
sb.AppendFormat("{0},", Mission.Category.DEFAULT);
if (category.HasFlag(Mission.Category.ORBIT))
sb.AppendFormat("{0},", Mission.Category.ORBIT);
if (category.HasFlag(Mission.Category.LANDING))
sb.AppendFormat("{0},", Mission.Category.LANDING);
if (category.HasFlag(Mission.Category.DOCKING))
sb.AppendFormat("{0},", Mission.Category.DOCKING);
if (category.HasFlag(Mission.Category.EVA))
sb.AppendFormat("{0},", Mission.Category.EVA);
if (category.HasFlag(Mission.Category.MINING))
sb.AppendFormat("{0},", Mission.Category.MINING);
if (category.HasFlag(Mission.Category.SATELLITE))
sb.AppendFormat("{0},", Mission.Category.SATELLITE);
if (category.HasFlag(Mission.Category.PROBE))
sb.AppendFormat("{0},", Mission.Category.PROBE);
if (category.HasFlag(Mission.Category.IMPACT))
sb.AppendFormat("{0},", Mission.Category.IMPACT);
if (category.HasFlag(Mission.Category.TIME))
sb.AppendFormat("{0},", Mission.Category.TIME);
if (category.HasFlag(Mission.Category.MANNED))
sb.AppendFormat("{0},", Mission.Category.MANNED);
if (category.HasFlag(Mission.Category.AVIATION))
sb.AppendFormat("{0},", Mission.Category.AVIATION);
if (category.HasFlag(Mission.Category.SCIENCE))
sb.AppendFormat("{0},", Mission.Category.SCIENCE);
if (category.HasFlag(Mission.Category.COMMUNICATION))
sb.AppendFormat("{0},", Mission.Category.COMMUNICATION);
if (category.HasFlag(Mission.Category.ROVER))
sb.AppendFormat("{0},", Mission.Category.ROVER);
if (category.HasFlag(Mission.Category.REPAIR))
sb.AppendFormat("{0},", Mission.Category.REPAIR);
return sb.ToString();
}