Raven.Database.Tasks.RemoveFromIndexTask.Execute C# (CSharp) Метод

Execute() публичный Метод

public Execute ( WorkContext context ) : void
context Raven.Database.Indexing.WorkContext
Результат void
		public override void Execute(WorkContext context)
		{
			var keysToRemove = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
			try
			{
				context.TransactionalStorage.Batch(accessor =>
				{
					keysToRemove = new HashSet<string>(Keys.Where(key=>FilterDocuments(context, accessor, key)));
					accessor.Indexing.TouchIndexEtag(Index);
				});
				if (keysToRemove.Count == 0)
					return;
				context.IndexStorage.RemoveFromIndex(Index, keysToRemove.ToArray(), context);
			}
			finally
			{
				context.MarkAsRemovedFromIndex(keysToRemove);
			}
		}