/// <summary> /// Converts <see cref="GeneratedTypesVisibility"/> to an appropriate <see cref="MemberAttributes"/> instance. /// </summary> /// <param name="gtv"></param> /// <returns></returns> public static MemberAttributes ToMemberAttribute(this GeneratedTypesVisibility gtv) => gtv.HasFlag(GeneratedTypesVisibility.Internal) || gtv == GeneratedTypesVisibility.Internal ? MemberAttributes.Assembly : MemberAttributes.Public;
/// <summary> /// Converts <see cref="GeneratedTypesVisibility"/> to a keyword for use in code-generation. /// </summary> /// <param name="gtv"></param> /// <returns></returns> public static string ToKeyword(this GeneratedTypesVisibility gtv) => gtv.HasFlag(GeneratedTypesVisibility.Internal) || gtv == GeneratedTypesVisibility.Internal ? "internal" : "public";
/// <summary> /// Converts <see cref="GeneratedTypesVisibility"/> to an appropriate <see cref="TypeAttributes"/> instance. /// </summary> /// <param name="gtv"></param> /// <returns></returns> public static TypeAttributes ToTypeAttribute(this GeneratedTypesVisibility gtv) => gtv.HasFlag(GeneratedTypesVisibility.Internal) || gtv == GeneratedTypesVisibility.Internal ? TypeAttributes.NestedAssembly : TypeAttributes.Public;