private IQueryable<WebMachine> ApplyAstoriaMachineCriteria(IQueryable<WebMachine> query, AstoriaMachineSearchCriteria astoriaSpecificCriteria)
        {
            if (astoriaSpecificCriteria != null)
            {
                string majorReleaseVersion = null;
                string setupType = null;
                string versioning = null;
                string setupRunning = null;

                setupType = MapBooleanValueToString(astoriaSpecificCriteria.SetupType);
                majorReleaseVersion = MapMajorReleaseVersionToString(astoriaSpecificCriteria.MajorReleaseVersion);
                setupRunning = MapBooleanValueToString(astoriaSpecificCriteria.SetupRunning);
                versioning = MapBooleanValueToString(astoriaSpecificCriteria.Versioning);

                if (setupRunning != null)
                {
                    query = query.Where(m => m.SetupRunning == setupRunning);
                }

                if (versioning != null)
                {
                    query = query.Where(m => m.Versioning == astoriaSpecificCriteria.Versioning.Value);
                }

                if (majorReleaseVersion != null)
                {
                    query = query.Where(m => m.AstoriaVersion == majorReleaseVersion);
                }

                if (setupType != null)
                {
                    query = query.Where(m => m.SetupType == setupType);
                }
            }

            return query;
        }
        /// <summary>
        /// Begins looking for a WebServer
        /// </summary>
        /// <param name="machineSearchCriteria">Machine specific criteria</param>
        /// <param name="astoriaMachineSearchCriteria">Astoria specific criteria</param>
        /// <param name="callback">WebServer return results</param>
        public void BeginLookup(
            MachineSearchCriteria machineSearchCriteria, 
            AstoriaMachineSearchCriteria astoriaMachineSearchCriteria, 
            EventHandler<WebServerLocatorCompleteEventArgs> callback)
        {
            if (callback == null)
            {
                throw new TaupoArgumentNullException("callback");
            }

            this.IsComplete = false;
            this.callBack = callback;

            IQueryable<WebMachine> machinesQuery = this.strategy.WebServersQueryRoot;

            machinesQuery = this.ApplyMachineSearchCriteria(machinesQuery, machineSearchCriteria);

            machinesQuery = this.ApplyAstoriaMachineCriteria(machinesQuery, astoriaMachineSearchCriteria);

            machinesQuery = machinesQuery.OrderBy(m => m.LastUsed);
            this.strategy.BeginExecute(this.OnQueryComplete, machinesQuery);
        }