public ContentTypeCreator(ContentTypeRegistryService owner, IEnumerable <Lazy <ContentTypeDefinition, IContentTypeDefinitionMetadata> > contentTypeDefinitions)
            {
                this.owner      = owner;
                rawContentTypes = new Dictionary <string, RawContentType>(StringComparer.OrdinalIgnoreCase);
                foreach (var md in contentTypeDefinitions.Select(a => a.Metadata))
                {
                    var typeName = md.Name;
                    Debug2.Assert(!(typeName is null));
                    if (typeName is null)
                    {
                        continue;
                    }
                    Debug.Assert(!rawContentTypes.ContainsKey(typeName));
                    if (rawContentTypes.ContainsKey(typeName))
                    {
                        continue;
                    }
                    var baseTypes = (md.BaseDefinition ?? Array.Empty <string>()).ToArray();
                    Debug2.Assert(!(baseTypes is null));
                    if (baseTypes is null)
                    {
                        continue;
                    }
                    var rawCt = new RawContentType(typeName, baseTypes, md.MimeType);
                    rawContentTypes.Add(rawCt.Typename, rawCt);
                }
                var list = rawContentTypes.Values.Select(a => a.Typename).ToArray();

                foreach (var typeName in list)
                {
                    TryCreate(typeName, 0);
                }
            }
			public ContentTypeCreator(ContentTypeRegistryService owner, IEnumerable<Lazy<ContentTypeDefinition, IContentTypeDefinitionMetadata>> contentTypeDefinitions) {
				this.owner = owner;
				rawContentTypes = new Dictionary<string, RawContentType>(StringComparer.OrdinalIgnoreCase);
				foreach (var md in contentTypeDefinitions.Select(a => a.Metadata)) {
					var typeName = md.Name;
					Debug.Assert(typeName != null);
					if (typeName == null)
						continue;
					Debug.Assert(!rawContentTypes.ContainsKey(typeName));
					if (rawContentTypes.ContainsKey(typeName))
						continue;
					var baseTypes = (md.BaseDefinition ?? Array.Empty<string>()).ToArray();
					Debug.Assert(baseTypes != null);
					if (baseTypes == null)
						continue;
					var rawCt = new RawContentType(typeName, baseTypes);
					rawContentTypes.Add(rawCt.Typename, rawCt);
				}
				var list = rawContentTypes.Values.Select(a => a.Typename).ToArray();
				foreach (var typeName in list)
					TryCreate(typeName, 0);
			}