ToString() public method

public ToString ( ) : string
return string
Esempio n. 1
0
    public string ToStringDetailed()
    {
        string productString = "(null)";

        if (null != _products)
        {
            productString = Logger.ToString <Product>(_products);
        }
        string mediumString = "(null)";

        if (null != _medium)
        {
            mediumString = _medium.ToString();
        }

        return(string.Format("IReaction[name:{0}, products:{1}, isActive:{2}, medium:{3}, "
                             + "reactionSpeed:{4}, energyCost:{5}, enableSequential:{6}, enableEnergy:{7} ]",
                             _name,                                      //!< The name of the reaction
                             productString,                              //!< The list of products
                             _isActive,                                  //!< Activation boolean
                             mediumString,                               //!< The medium where the reaction will be executed
                             _reactionSpeed,                             //!< Speed coefficient of the reaction
                             _energyCost,                                //!< Energy consumed by the reaction
                             enableSequential,
                             enableEnergy
                             ));
    }
Esempio n. 2
0
 private string toString(Medium mat)
 {
     return(mat == null ? "none" : mat.ToString());
 }
Esempio n. 3
0
 public static void RenderMedium(StringBuilder sb, Medium m)
 {
     sb.Append(m.ToString());
 }