protected override QueryCompletedResult EndQueryCore(IAsyncResult asyncResult)
 {
     MockAsyncResult ar = (MockAsyncResult)asyncResult;
     int entityCount = ar.Entities.Count();
     QueryCompletedResult results = new QueryCompletedResult(ar.Entities, new Entity[0], entityCount, new ValidationResult[0]);
     return results;
 }
 protected override QueryCompletedResult EndQueryCore(IAsyncResult asyncResult)
 {
     // Maybe assert expected type
     if (this.Error != null)
     {
         throw this.Error;
     }
     AdcAsyncResult result = asyncResult as AdcAsyncResult;
     QueryCompletedResult results;
     if (result.User == null)
     {
         results = new QueryCompletedResult(new MockUser[0], new Entity[0], 0, new ValidationResult[0]);
     }
     else
     {
         results = new QueryCompletedResult(new MockUser[] { result.User }, new Entity[0], 1, new ValidationResult[0]);
     }
     return results;
 }