Esempio n. 1
0
 /// <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;
Esempio n. 2
0
 /// <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";
Esempio n. 3
0
 /// <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;