Ejemplo n.º 1
0
		TextReplaceAction AddChange(int offset, int removedChars, string insertedText)
		{
			var action = new TextReplaceAction (offset, removedChars, insertedText);
			changes.Add(action);
			return action;
		}
Ejemplo n.º 2
0
		internal TextReplaceAction AddChange(int offset, int removedChars, string insertedText)
		{
			if (offset < 0)
				throw new ArgumentOutOfRangeException("offset", "Should be >= 0");
			if (offset >= document.TextLength)
				throw new ArgumentOutOfRangeException("offset", "Should be < document.TextLength");
			if (removedChars < 0)
				throw new ArgumentOutOfRangeException("removedChars", "Should be >= 0");
			if (removedChars > offset + document.TextLength)
				throw new ArgumentOutOfRangeException("removedChars", "Tried to remove beyond end of text");
			if (removedChars == 0 && string.IsNullOrEmpty (insertedText))
				return null;
			var action = new TextReplaceAction (offset, removedChars, insertedText);
			changes.Add(action);
			return action;
		}
Ejemplo n.º 3
0
 internal TextReplaceAction AddChange(int offset, int removedChars, string insertedText)
 {
     if (removedChars == 0 && string.IsNullOrEmpty (insertedText))
         return null;
     var action = new TextReplaceAction (offset, removedChars, insertedText);
     if (offset == 40 || offset == 44)
     Console.WriteLine("----" + action + Environment.NewLine + Environment.StackTrace);
     changes.Add(action);
     return action;
 }
Ejemplo n.º 4
0
 TextReplaceAction AddChange(int offset, int removedChars, string insertedText)
 {
     if (removedChars == 0 && string.IsNullOrEmpty (insertedText))
         return null;
     var action = new TextReplaceAction (offset, removedChars, insertedText);
     changes.Add(action);
     return action;
 }