ToString() public method

Converts the current configuration to a string.
public ToString ( ) : string
return string
コード例 #1
0
ファイル: Config.cs プロジェクト: yyp2003net/akka.net
        /// <summary>
        /// Converts the current configuration to a string
        /// </summary>
        /// <param name="includeFallback">if true returns string with current config combined with fallback key-values else only current config key-values</param>
        /// <returns>TBD</returns>
        public string ToString(bool includeFallback)
        {
            if (includeFallback == false)
            {
                return(ToString());
            }

            Config current = this;

            if (current.Fallback == null)
            {
                return(current.ToString());
            }

            Config clone = Copy();

            while (current.Fallback != null)
            {
                clone.Root.GetObject().Merge(current.Fallback.Root.GetObject());
                current = current.Fallback;
            }

            return(clone.ToString());
        }