Ejemplo n.º 1
0
 /// <summary>
 /// Stores the command's success output inside the <see cref="Entity"/>
 /// </summary>
 /// <param name="dataLocation">the location to store the result at</param>
 /// <param name="dataType">the path to the place to store the score</param>
 /// <param name="scale">the number the output should be multiplied with before being inserted</param>
 /// <param name="storeSuccess">true if it only should store if the command was successfull</param>
 /// <returns>The function running the command</returns>
 public Function Store(IDataLocation dataLocation, ID.StoreTypes dataType, double scale = 1, bool storeSuccess = false)
 {
     ForFunction.AddCommand(new ExecuteStoreData(dataLocation, dataType, scale, !storeSuccess));
     return(ForFunction);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Intializes a new <see cref="ExecuteStoreData"/> command
 /// </summary>
 /// <param name="dataLocation">The location to store the result in</param>
 /// <param name="valueType">The type of number to store the result as</param>
 /// <param name="scale">A number to multiply the result by before storing it</param>
 /// <param name="storeResult">True if it should store the result. False if it should store success</param>
 public ExecuteStoreData(IDataLocation dataLocation, ID.StoreTypes valueType, double scale, bool storeResult = true) : base(storeResult)
 {
     DataLocation = dataLocation;
     ValueType    = valueType;
     Scale        = scale;
 }