示例#1
0
        public CssSettings Clone()
        {
            // create the new settings object and copy all the properties from
            // the current settings
            var newSettings = new CssSettings
            {
                AllowEmbeddedAspNetBlocks = AllowEmbeddedAspNetBlocks,
                ColorNames                = ColorNames,
                CommentMode               = CommentMode,
                FixIE8Fonts               = FixIE8Fonts,
                IgnoreAllErrors           = IgnoreAllErrors,
                IgnoreErrorList           = IgnoreErrorList,
                Indent                    = Indent,
                KillSwitch                = KillSwitch,
                LineBreakThreshold        = LineBreakThreshold,
                MinifyExpressions         = MinifyExpressions,
                OutputMode                = OutputMode,
                PreprocessorDefineList    = PreprocessorDefineList,
                TermSemicolons            = TermSemicolons,
                CssType                   = CssType,
                BlocksStartOnSameLine     = BlocksStartOnSameLine,
                RemoveEmptyBlocks         = RemoveEmptyBlocks,
                IgnoreRazorEscapeSequence = IgnoreRazorEscapeSequence,
                DecodeEscapes             = DecodeEscapes
            };

            // add the resource strings (if any)
            newSettings.AddResourceStrings(ResourceStrings);

            foreach (var item in ReplacementTokens)
            {
                newSettings.ReplacementTokens.Add(item);
            }

            foreach (var item in ReplacementFallbacks)
            {
                newSettings.ReplacementTokens.Add(item);
            }

            foreach (var item in ExcludeVendorPrefixes)
            {
                newSettings.ExcludeVendorPrefixes.Add(item);
            }

            return(newSettings);
        }
示例#2
0
        public CssSettings Clone()
        {
            // create the new settings object and copy all the properties from
            // the current settings
            var newSettings = new CssSettings()
            {
                AllowEmbeddedAspNetBlocks = this.AllowEmbeddedAspNetBlocks,
                ColorNames             = this.ColorNames,
                CommentMode            = this.CommentMode,
                FixIE8Fonts            = this.FixIE8Fonts,
                IgnoreAllErrors        = this.IgnoreAllErrors,
                IgnoreErrorList        = this.IgnoreErrorList,
                IndentSize             = this.IndentSize,
                KillSwitch             = this.KillSwitch,
                LineBreakThreshold     = this.LineBreakThreshold,
                MinifyExpressions      = this.MinifyExpressions,
                OutputMode             = this.OutputMode,
                PreprocessorDefineList = this.PreprocessorDefineList,
                TermSemicolons         = this.TermSemicolons,
                CssType = this.CssType,
                BlocksStartOnSameLine = this.BlocksStartOnSameLine,
                RemoveEmptyBlocks     = this.RemoveEmptyBlocks,
            };

            // add the resource strings (if any)
            newSettings.AddResourceStrings(this.ResourceStrings);

            foreach (var item in this.ReplacementTokens)
            {
                newSettings.ReplacementTokens.Add(item);
            }

            foreach (var item in this.ReplacementFallbacks)
            {
                newSettings.ReplacementTokens.Add(item);
            }

            foreach (var item in this.ExcludeVendorPrefixes)
            {
                newSettings.ExcludeVendorPrefixes.Add(item);
            }

            return(newSettings);
        }