Ejemplo n.º 1
0
        /*
         *      Get string representation from individual element.
         *      If type E is unknown then return null, otherwise return element's string representation.
         */
        private static string getString <E>(ref E element)
        {
            ToStringable tos = element as ToStringable;

            // non-fatal error, as element that is array, we need to avoid endless loop in calling
            if (tos == null)
            {
                return(null);
            }

            return(tos.toString());
        }
Ejemplo n.º 2
0
        /// <summary>Build string representation of object</summary>
        /// <param name="obj">Object to get string representation</param>
        /// <returns>string</returns>
        public static string build(ToStringable obj)
        {
            string s = "{";

            if (obj != null)
            {
                s += obj.toString();
            }

            s += "}";
            return(s);
        }
Ejemplo n.º 3
0
 public void FancySignature(string foo, int bar, ToStringable stringable, [DoNotLog]string secret)
 {
 }