コード例 #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;
コード例 #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";
コード例 #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;