Golem.Core.RecipeCataloger.CreateRecipeFromAttribute C# (CSharp) 메소드

CreateRecipeFromAttribute() 개인적인 정적인 메소드

private static CreateRecipeFromAttribute ( Type type, RecipeAttribute recipeAtt ) : Recipe
type System.Type
recipeAtt RecipeAttribute
리턴 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
                       };
        }