public void SaveRevision(string title, string textData)
        {
            Console.WriteLine("SAVE REV " + title);
            var r = new TextDocumentRevision {
                ModifiedTimeUtc = DateTime.UtcNow,
                Title           = title,
                TextData        = textData,
            };

            if (revisionIndex >= 0 && revisionIndex + 1 < revisions.Count)
            {
                revisions.RemoveRange(revisionIndex + 1, (revisions.Count - (revisionIndex + 1)));
            }

            revisions.Add(r);
            revisionIndex = revisions.Count - 1;
        }
Пример #2
0
		public void SaveRevision (string title, string textData)
		{
			Console.WriteLine ("SAVE REV " + title);
			var r = new TextDocumentRevision {
				ModifiedTimeUtc = DateTime.UtcNow,
				Title = title,
				TextData = textData,
			};

			if (revisionIndex >= 0 && revisionIndex + 1 < revisions.Count) {
				revisions.RemoveRange (revisionIndex + 1, (revisions.Count - (revisionIndex + 1)));
			}

			revisions.Add (r);
			revisionIndex = revisions.Count - 1;
		}