AvalonStudio.TextEditor.Document.TextDocument.FireChangeEvents C# (CSharp) Method

FireChangeEvents() private method

Fires TextChanged, TextLengthChanged, LineCountChanged if required.
private FireChangeEvents ( ) : void
return void
		internal void FireChangeEvents()
		{
			// it may be necessary to fire the event multiple times if the document is changed
			// from inside the event handlers
			while (fireTextChanged)
			{
				fireTextChanged = false;
				if (TextChanged != null)
					TextChanged(this, EventArgs.Empty);
				OnPropertyChanged("Text");

				var textLength = rope.Length;
				if (textLength != oldTextLength)
				{
					oldTextLength = textLength;
					if (TextLengthChanged != null)
						TextLengthChanged(this, EventArgs.Empty);
					OnPropertyChanged("TextLength");
				}
				var lineCount = lineTree.LineCount;
				if (lineCount != oldLineCount)
				{
					oldLineCount = lineCount;
					if (LineCountChanged != null)
						LineCountChanged(this, EventArgs.Empty);
					OnPropertyChanged("LineCount");
				}
			}
		}