Beispiel #1
0
        /// <overloads>
        /// This creates a new build style that is a deep copy of the current
        /// instance.
        /// </overloads>
        /// <summary>
        /// This creates a new build style that is a deep copy of the current
        /// instance.
        /// </summary>
        /// <returns>
        /// A new build style that is a deep copy of this instance.
        /// </returns>
        /// <remarks>
        /// This is deep cloning of the members of this build style. If you
        /// need just a copy, use the copy constructor to create a new instance.
        /// </remarks>
        public override BuildStyle Clone()
        {
            BuildStyle style = new BuildStyle(this);

            if (_styleName != null)
            {
                style._styleName = String.Copy(_styleName);
            }
            if (_styleDir != null)
            {
                style._styleDir = _styleDir.Clone();
            }
            if (_stylePresentation != null)
            {
                style._stylePresentation = _stylePresentation.Clone();
            }

            if (_scripts != null)
            {
                style._scripts = _scripts.Clone();
            }
            if (_snippets != null)
            {
                style._snippets = _snippets.Clone();
            }
            if (_styleSheets != null)
            {
                style._styleSheets = _styleSheets.Clone();
            }
            if (_mathPackages != null)
            {
                style._mathPackages = _mathPackages.Clone();
            }
            if (_mathCommands != null)
            {
                style._mathCommands = _mathCommands.Clone();
            }

            return(style);
        }