public ContentTypeRegistration(IEnumerable<PropertyRegistration> properties, IEnumerable<TabRegistration> tabs, IEnumerable<ContentTypeCompositionRegistration> compositions, string alias, string name, Type clrType, ContentTypeAttribute contentTypeAttribute) { _properties = properties.ToList(); _tabs = tabs.ToList(); _compositions = compositions.ToList(); _alias = alias; _name = name; _clrType = clrType; _contentTypeAttribute = contentTypeAttribute; }
private void GetCodeFirstParent(Type type, out ContentTypeAttribute parentAttribute, out Type parentType) { parentAttribute = null; parentType = type; while (parentType != null && parentAttribute == null) { parentType = parentType.BaseType; if (parentType != null) { parentAttribute = parentType.GetCodeFirstAttribute<ContentTypeAttribute>(); } } }