Golem.Core.RecipeCataloger.ExtractRecipesFromType C# (CSharp) Method

ExtractRecipesFromType() private method

private ExtractRecipesFromType ( Type type, LoadedAssemblyInfo la ) : void
type System.Type
la LoadedAssemblyInfo
return void
        private void ExtractRecipesFromType(Type type, LoadedAssemblyInfo la)
        {
            //find the attribute on the assembly if there is one
            var recipeAtt = GetRecipeAttributeOrNull(type);

            //if not found, return
            if (recipeAtt == null) return;

            //create recipe details from attribute
            Recipe recipe = CreateRecipeFromAttribute(type, recipeAtt);

            //associate recipe with assembly
            la.FoundRecipes.Add(recipe);

            //trawl through and add the tasks
            AddTasksToRecipe(type, recipe);
        }