chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
namespace Step03.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Food Ingredients used in steps such GatherIngredientStep, CutFoodStep, FryFoodStep
|
||||
/// </summary>
|
||||
public enum FoodIngredients
|
||||
{
|
||||
Pototoes,
|
||||
Fish,
|
||||
Buns,
|
||||
Sauce,
|
||||
Condiments,
|
||||
None
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Extensions to have access to friendly string names for <see cref="FoodIngredients"/>
|
||||
/// </summary>
|
||||
public static class FoodIngredientsExtensions
|
||||
{
|
||||
private static readonly Dictionary<FoodIngredients, string> s_foodIngredientsStrings = new()
|
||||
{
|
||||
{ FoodIngredients.Pototoes, "Potatoes" },
|
||||
{ FoodIngredients.Fish, "Fish" },
|
||||
{ FoodIngredients.Buns, "Buns" },
|
||||
{ FoodIngredients.Sauce, "Sauce" },
|
||||
{ FoodIngredients.Condiments, "Condiments" },
|
||||
{ FoodIngredients.None, "None" }
|
||||
};
|
||||
|
||||
public static string ToFriendlyString(this FoodIngredients ingredient)
|
||||
{
|
||||
return s_foodIngredientsStrings[ingredient];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
namespace Step03.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Food Items that can be prepared by the PrepareSingleFoodItemProcess
|
||||
/// </summary>
|
||||
public enum FoodItem
|
||||
{
|
||||
PotatoFries,
|
||||
FriedFish,
|
||||
FishSandwich,
|
||||
FishAndChips
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Extensions to have access to friendly string names for <see cref="FoodItem"/>
|
||||
/// </summary>
|
||||
public static class FoodItemExtensions
|
||||
{
|
||||
private static readonly Dictionary<FoodItem, string> s_foodItemsStrings = new()
|
||||
{
|
||||
{ FoodItem.PotatoFries, "Potato Fries" },
|
||||
{ FoodItem.FriedFish, "Fried Fish" },
|
||||
{ FoodItem.FishSandwich, "Fish Sandwich" },
|
||||
{ FoodItem.FishAndChips, "Fish & Chips" },
|
||||
};
|
||||
|
||||
public static string ToFriendlyString(this FoodItem item)
|
||||
{
|
||||
return s_foodItemsStrings[item];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user