Example #1
0
		public object Clone ()
		{
			var clone = new IndentStack (ie,stack.Length);
			
			clone.stack = (Node[]) stack.Clone ();
			clone.size = size;
			
			return clone;
		}
Example #2
0
        public object Clone()
        {
            var clone = new IndentStack(ie, stack.Length);

            clone.stack = (Node[])stack.Clone();
            clone.size  = size;

            return(clone);
        }
Example #3
0
        public IndentEngine(DFormattingOptions policy, bool tabsToSpaces = false, int indentWidth = 4, bool keepAlignmentSpaces = true)
        {
            if (policy == null)
            {
                throw new ArgumentNullException("policy");
            }

            this.Policy              = policy;
            this.tabsToSpaces        = tabsToSpaces;
            this.indentWidth         = indentWidth;
            this.keepAlignmentSpaces = keepAlignmentSpaces;
            stack   = new IndentStack(this);
            linebuf = new StringBuilder();
            Reset();
        }
Example #4
0
		public IndentEngine(DFormattingOptions policy, bool tabsToSpaces = false, int indentWidth = 4, bool keepAlignmentSpaces = true)
		{
			if (policy == null)
				throw new ArgumentNullException ("policy");
			
			this.Policy = policy;
			this.tabsToSpaces = tabsToSpaces;
			this.indentWidth = indentWidth;
			this.keepAlignmentSpaces = keepAlignmentSpaces;
			stack = new IndentStack (this);
			linebuf = new StringBuilder ();
			Reset ();
		}