Inheritance: System.Attribute
Exemplo n.º 1
0
 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
                };
 }