示例#1
0
        /// <summary>
        /// Clones these options.
        /// </summary>
        /// <returns>A clone of these options.</returns>
        public HConsoleTargetOptions Clone()
        {
            var clone = new HConsoleTargetOptions();

            if (_hasIndent)
            {
                clone.SetIndent(Indent);
            }
            if (_hasPrefix)
            {
                clone.SetPrefix(Prefix);
            }
            if (_hasLevel)
            {
                clone.SetLevel(Level);
            }
            return(clone);
        }
        /// <summary>
        /// Clones these options.
        /// </summary>
        /// <returns>A clone of these options.</returns>
        public HConsoleTargetOptions Clone()
        {
            var clone = new HConsoleTargetOptions(_options);

            if (_hasIndent)
            {
                clone.SetIndent(Indent);
            }
            if (_hasPrefix)
            {
                clone.SetPrefix(Prefix);
            }
            if (_hasLevel)
            {
                clone.SetLevel(Level);
            }
            if (_hasTimeStamp)
            {
                clone.EnableTimeStamp(TimeStampEnabled, TimeStampOrigin);
            }
            return(clone);
        }