Class ColorRecipe
Data container for single color recipe in Mixer.
Holds list of ingredients (colorant names with weights) to use in color mixing process
Used in client/server transfers, so needs separate sync-able container.
Inheritance
System.Object
ColorRecipe
Assembly: Eco.Shared.dll
Syntax
public class ColorRecipe : Object, IEquatable<ColorRecipe>
Constructors
ColorRecipe()
Declaration
Properties
HasData
Declaration
public bool HasData { get; }
Property Value
Type |
Description |
System.Boolean |
|
Ingredients
List of ingredients for recipe (colorant names with weights)
Declaration
[Eco(true)]
public List<ColorantWeight> Ingredients { get; }
Property Value
Multiplier
Declaration
[Eco(true)]
public int Multiplier { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
AddOnce(String)
Adds one portion of requested colorant to recipe
Declaration
public void AddOnce(string colorantName)
Parameters
Type |
Name |
Description |
System.String |
colorantName |
|
Equals(ColorRecipe)
Declaration
public bool Equals(ColorRecipe other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
GetAmount(String, Boolean)
Gets total weight of requested colorant in recipe
Declaration
public int GetAmount(string colorant, bool includeMultiplier = true)
Parameters
Type |
Name |
Description |
System.String |
colorant |
|
System.Boolean |
includeMultiplier |
|
Returns
Type |
Description |
System.Int32 |
|
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
GetTotalIngredientsUsed(Boolean)
Count amount of all ingredients used
Declaration
public int GetTotalIngredientsUsed(bool includeMultiplier = true)
Parameters
Type |
Name |
Description |
System.Boolean |
includeMultiplier |
|
Returns
Type |
Description |
System.Int32 |
|
MakeCopy()
Declaration
public ColorRecipe MakeCopy()
Returns
RemoveOnce(String)
Removes one portion of requested colorant from recipe
Declaration
public void RemoveOnce(string colorantName)
Parameters
Type |
Name |
Description |
System.String |
colorantName |
|
Implements
System.IEquatable<>
Extension Methods