AvalonStudio.TextEditor.Indentation.CSharp.CSharpIndentationStrategy.Indent C# (CSharp) Method

Indent() public method

Performs indentation using the specified document accessor.
public Indent ( IDocumentAccessor document, bool keepEmptyLines, int caretOffset ) : int
document IDocumentAccessor Object used for accessing the document line-by-line
keepEmptyLines bool Specifies whether empty lines should be kept
caretOffset int
return int
		public int Indent(IDocumentAccessor document, bool keepEmptyLines, int caretOffset)
		{
			if (document == null)
				throw new ArgumentNullException("document");
			var settings = new IndentationSettings();
			settings.IndentString = IndentationString;
			settings.LeaveEmptyLines = keepEmptyLines;

			var r = new IndentationReformatter();
			r.Reformat(document, settings);
			return caretOffset;
		}
CSharpIndentationStrategy