コード例 #1
0
        public override BuildFeedback Clone()
        {
            BuildFeedback feedback = new BuildFeedback(this);

            if (_logoImage != null)
            {
                feedback._logoImage = _logoImage.Clone();
            }
            if (_logoLink != null)
            {
                feedback._logoLink = String.Copy(_logoLink);
            }
            if (_logoText != null)
            {
                feedback._logoText = String.Copy(_logoText);
            }

            if (_copyrightLink != null)
            {
                feedback._copyrightLink = String.Copy(_copyrightLink);
            }
            if (_copyrightText != null)
            {
                feedback._copyrightText = String.Copy(_copyrightText);
            }
            if (_productName != null)
            {
                feedback._productName = String.Copy(_productName);
            }
            if (_companyName != null)
            {
                feedback._companyName = String.Copy(_companyName);
            }
            if (_emailAddress != null)
            {
                feedback._emailAddress = String.Copy(_emailAddress);
            }
            if (_postalAddress != null)
            {
                feedback._postalAddress = String.Copy(_postalAddress);
            }

            return(feedback);
        }
コード例 #2
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);
        }