public static RType GetOrCreateType([NotNull] string name, RTypeAttributes attributes, [CanBeNull] RType parent, [CanBeNull] RType declaringType) { return Instance.GetOrCreate(name, () => new RType(name, attributes, parent, declaringType)); }
public static TypeAttributes GetTypeAttributes(RTypeAttributes modifiers) { TypeAttributes attrs = TypeAttributes.Class; if (modifiers.HasFlag(RTypeAttributes.Abstract)) { attrs |= TypeAttributes.Abstract; } if (modifiers.HasFlag(RTypeAttributes.Sealed)) { attrs |= TypeAttributes.Sealed; } if (modifiers.HasFlag(RTypeAttributes.Public)) { attrs |= TypeAttributes.Public; } if (modifiers.HasFlag(RTypeAttributes.Private) || modifiers.HasFlag(RTypeAttributes.Protected)) { attrs |= TypeAttributes.NotPublic; } return attrs; }
public RType(string name, RTypeAttributes attributes, RType parent, RType declaringType = null) { Name = name; Attributes = attributes; BaseType = parent; DeclaringType = declaringType; if (IsClass && BaseType == null) { BaseType = AnyTy; } }
public RType DefineNestedType(string name, RTypeAttributes attributes, RType parent) { RType nested = new RType(name, attributes, parent, this); _nested.Add(nested); return nested; }
public RType([NotNull] string name, RTypeAttributes attributes = RTypeAttributes.Class) { Name = name; Attributes = attributes; BaseType = AnyTy; }