private string AccessFlagsAsString(ClassAccessFlags accessFlags) { string result = accessFlags.HasFlag(ClassAccessFlags.Public) ? "public " : string.Empty; result += accessFlags.HasFlag(ClassAccessFlags.Final) ? "final " : string.Empty; result += accessFlags.HasFlag(ClassAccessFlags.Super) ? "super " : string.Empty; result += accessFlags.HasFlag(ClassAccessFlags.Interface) ? "interface " : string.Empty; result += accessFlags.HasFlag(ClassAccessFlags.Abstract) ? "abstract " : string.Empty; result += accessFlags.HasFlag(ClassAccessFlags.Synthetic) ? "synthetic " : string.Empty; result += accessFlags.HasFlag(ClassAccessFlags.Annotation) ? "annotation " : string.Empty; result += accessFlags.HasFlag(ClassAccessFlags.Enum) ? "enum " : string.Empty; return(result.Trim()); }
private string AccessFlagsAsString(ClassAccessFlags accessFlags) { string result = accessFlags.HasFlag(ClassAccessFlags.Public) ? "public " : string.Empty; result += accessFlags.HasFlag(ClassAccessFlags.Final) ? "final " : string.Empty; result += accessFlags.HasFlag(ClassAccessFlags.Super) ? "super " : string.Empty; result += accessFlags.HasFlag(ClassAccessFlags.Interface) ? "interface " : string.Empty; result += accessFlags.HasFlag(ClassAccessFlags.Abstract) ? "abstract " : string.Empty; result += accessFlags.HasFlag(ClassAccessFlags.Synthetic) ? "synthetic " : string.Empty; result += accessFlags.HasFlag(ClassAccessFlags.Annotation) ? "annotation " : string.Empty; result += accessFlags.HasFlag(ClassAccessFlags.Enum) ? "enum " : string.Empty; return result.Trim(); }
public static bool IsPubliclyVisible(this ClassAccessFlags flags) => flags.HasFlag(ClassAccessFlags.Public) || flags.HasFlag(ClassAccessFlags.Protected);