Raven.Database.Prefetching.PrefetchingBehavior.GetHighestJsonDocumentByEtag C# (CSharp) Method

GetHighestJsonDocumentByEtag() public static method

public static GetHighestJsonDocumentByEtag ( List past ) : JsonDocument
past List
return Raven.Abstractions.Data.JsonDocument
		public static JsonDocument GetHighestJsonDocumentByEtag(List<JsonDocument> past)
		{
			var highest = new ComparableByteArray(Etag.Empty);
			JsonDocument highestDoc = null;
			for (int i = past.Count - 1; i >= 0; i--)
			{
				Etag etag = past[i].Etag;
				if (highest.CompareTo(etag) > 0)
				{
					continue;
				}
				highest = new ComparableByteArray(etag);
				highestDoc = past[i];
			}
			return highestDoc;
		}