public static async Task <IType> GenerateTypeAsync(this ITypeCollection typeCollection, Authentication authentication) { if (typeCollection.GetService(typeof(ITypeCategoryCollection)) is ITypeCategoryCollection typeCategoryCollection) { var category = await typeCategoryCollection.GetRandomTypeCategoryAsync(); return(await category.GenerateTypeAsync(authentication)); } throw new NotImplementedException(); }
public void GetService() { Console.Write(types.GetService(typeof(ICremaHost))); }