protected ContentTypeModuleBase(IPropertyModule propertyModule, Guid performanceTimer) { _performanceTimer = performanceTimer; _propertyModule = propertyModule; _register = new ContentTypeRegister(out _controller); _typesUsedInCompositions = new Lazy<List<ContentTypeRegistration>>(() => { var usedInCompositions = new List<ContentTypeRegistration>(_register.Registrations.SelectMany(x => GetComposingTypes(x, null))); usedInCompositions.AddRange(_register.Registrations.SelectMany(x => GetAllAncestorTypes(x))); usedInCompositions = usedInCompositions.Distinct().ToList(); return usedInCompositions; }); ResetContentTypesCache(); }
public bool TryGetMediaType(Type type, out MediaTypeRegistration registration) { ContentTypeRegistration reg; if (ContentTypeRegister.TryGetContentType(type, out reg)) { registration = reg as MediaTypeRegistration; return(registration != null); } else { registration = null; return(false); } }
public bool TryGetDocumentType(string alias, out DocumentTypeRegistration registration) { ContentTypeRegistration reg; if (ContentTypeRegister.TryGetContentType(alias, out reg)) { registration = reg as DocumentTypeRegistration; return(registration != null); } else { registration = null; return(false); } }
internal ContentTypeRegisterController(ContentTypeRegister instance) { _instance = instance; }
internal ContentTypeRegisterController(ContentTypeRegister instance) { _instance = instance; }