private ReadServiceContextInfoResponse QueryData()
        {
            var serverName = Environment.MachineName;

            if (serverName == Environment.MachineName)
            {
                var handler = new ReadServiceContextInfoHandler();
                var response = (ReadServiceContextInfoResponse)handler.Handle(new ReadServiceContextInfoRequest());

                foreach (var instance in response.ServiceInstances)
                {
                    if (instance.ServicesName.GetHashCode().Equals(_serviceInstanceId))
                        return (ReadServiceContextInfoResponse)handler.Handle(new ReadServiceContextInfoRequest() { ServicesName = instance.ServicesName });
                }

                return null;
            }
            else
            {
                //TODO: Future code to get instances from other servers
                //var response = DispatchRequest<ReadServiceContextInfoResponse>(new ReadServiceContextInfoRequest() { IncludeChildServiceContexts = false }, "net.tcp://" + serverName + ":50555/Agatha.Common.WCF.IWcfRequestProcessor.svc");
                //serviceContexts.AddRange(response.ChildServiceContexts);
            }

            return null;
        }
        private IEnumerable<ServiceInstanceInfo> QueryData()
        {
            var serverNames = new List<string>() { Environment.MachineName };
            var serviceContexts = new List<ServiceInstanceInfo>();

            foreach (var serverName in serverNames)
            {
                if (serverName == Environment.MachineName)
                {
                    var handler = new ReadServiceContextInfoHandler();
                    var response = (ReadServiceContextInfoResponse)handler.Handle(new ReadServiceContextInfoRequest());
                    serviceContexts.AddRange(response.ServiceInstances);
                }
                else
                {
                    //TODO: Future code to get instances from other servers
                    //var response = DispatchRequest<ReadServiceContextInfoResponse>(new ReadServiceContextInfoRequest() { IncludeChildServiceContexts = false }, "net.tcp://" + serverName + ":50555/Agatha.Common.WCF.IWcfRequestProcessor.svc");
                    //serviceContexts.AddRange(response.ChildServiceContexts);
                }
            }

            //Filters
            var nameFilterValue = string.IsNullOrEmpty(_viewModel.FilterFields.Single(f => f.FieldName == "Name").FieldValue) ? string.Empty : _viewModel.FilterFields.Single(f => f.FieldName == "Name").FieldValue;
            if (!string.IsNullOrEmpty(nameFilterValue))
                serviceContexts = serviceContexts.Where(c => c.ServicesName.ToUpperInvariant().Contains(nameFilterValue.ToUpperInvariant())).ToList();

            return serviceContexts;
        }