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

CreateRecipeFromAttribute() private static method

private static CreateRecipeFromAttribute ( Type type, RecipeAttribute recipeAtt ) : Recipe
type System.Type
recipeAtt RecipeAttribute
return Recipe
        private static Recipe CreateRecipeFromAttribute(Type type, RecipeAttribute recipeAtt)
        {
            return new Recipe
                       {
                           Class = type,
                           Name = String.IsNullOrEmpty(recipeAtt.Name) ? (type.Name == "RecipesRecipe" ? "recipes" : type.Name.Replace("Recipe", "").ToLower()) : recipeAtt.Name,
                           Description = ! String.IsNullOrEmpty(recipeAtt.Description) ? recipeAtt.Description : null
                       };
        }