示例#1
0
 public static TypeSpec GetEnumUnderlyingType(ModuleContainer module, TypeSpec nullableEnum)
 {
     return(MakeType(module, EnumSpec.GetUnderlyingType(GetUnderlyingType(nullableEnum))));
 }
示例#2
0
 /// <summary>
 /// Creates a ENUM based on the given <paramref name="specification"/>.
 /// <param name="specification">A specification for a ENUM.</param>
 /// <returns>The newly created ENUM.</returns>
 /// </summary>
 public IEnum CreateEnum(EnumSpec specification)
 {
     return(new UpccEnum(UmlPackage.CreateEnumeration(EnumSpecConverter.Convert(specification))));
 }
示例#3
0
文件: nullable.cs 项目: stanhuff/mono
 public static TypeSpec GetEnumUnderlyingType(ModuleContainer module, TypeSpec nullableEnum)
 {
     return(module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType(module,
                                                                     new[] { EnumSpec.GetUnderlyingType(GetUnderlyingType(nullableEnum)) }));
 }
示例#4
0
 /// <summary>
 /// Updates a ENUM to match the given <paramref name="specification"/>.
 /// <param name="@enum">A ENUM.</param>
 /// <param name="specification">A new specification for the given ENUM.</param>
 /// <returns>The updated ENUM. Depending on the implementation, this might be the same updated instance or a new instance!</returns>
 /// </summary>
 public IEnum UpdateEnum(IEnum @enum, EnumSpec specification)
 {
     return(new UpccEnum(UmlPackage.UpdateEnumeration(((UpccEnum)@enum).UmlEnumeration, EnumSpecConverter.Convert(specification))));
 }