AvalonStudio.TextEditor.Document.TextSourceVersionProvider.Version.CompareAge C# (CSharp) 메소드

CompareAge() 공개 메소드

public CompareAge ( ITextSourceVersion other ) : int
other ITextSourceVersion
리턴 int
			public int CompareAge(ITextSourceVersion other)
			{
				if (other == null)
					throw new ArgumentNullException("other");
				var o = other as Version;
				if (o == null || provider != o.provider)
					throw new ArgumentException("Versions do not belong to the same document.");
				// We will allow overflows, but assume that the maximum distance between checkpoints is 2^31-1.
				// This is guaranteed on x86 because so many checkpoints don't fit into memory.
				return Math.Sign(unchecked(id - o.id));
			}