public RppFieldInfo([NotNull] string name, [NotNull] RType fieldType, RFieldAttributes attributes, [NotNull] RType declaringType) { Name = name; Type = fieldType; Attributes = attributes; DeclaringType = declaringType; }
private static FieldAttributes GetAttributes(RFieldAttributes attributes) { FieldAttributes attrs = FieldAttributes.Public; if (attributes.HasFlag(RFieldAttributes.Public)) { attrs |= FieldAttributes.Public; } if (attributes.HasFlag(RFieldAttributes.Private)) { attrs |= FieldAttributes.Private; } if (attributes.HasFlag(RFieldAttributes.InitOnly)) { attrs |= FieldAttributes.InitOnly; } if (attributes.HasFlag(RFieldAttributes.Static)) { attrs |= FieldAttributes.Static; } return attrs; }
public RppFieldInfo DefineField([NotNull] string name, [NotNull] RType type, RFieldAttributes attributes) { RppFieldInfo field = new RppFieldInfo(name, type, attributes, this); _fields.Add(field); return field; }