public async Task <IEnumerable <NeuronResult> > GetAll(Guid?centralGuid = null, RelativeType type = RelativeType.NotSet, NeuronQuery neuronQuery = null, int?limit = 1000, CancellationToken token = default(CancellationToken))
        {
            IEnumerable <NeuronResult> result = null;

            result = this.GetNeuronResults(
                centralGuid,
                string.Empty,
                InMemoryNeuronRepository.ConvertRelativeToDirection(type),
                neuronQuery,
                limit);

            return(await Task.FromResult(result));
        }
        public async Task <IEnumerable <NeuronResult> > Get(Guid guid, Guid?centralGuid = null, RelativeType type = RelativeType.NotSet, bool shouldLoadTerminals = false, CancellationToken token = default(CancellationToken))
        {
            IEnumerable <NeuronResult> result = null;

            if (!centralGuid.HasValue)
            {
                result = new NeuronResult[] { new NeuronResult()
                                              {
                                                  Neuron = this.cache[guid]
                                              } }
            }
            ;
            else
            {
                var temp = this.GetNeuronResults(centralGuid.Value, string.Empty, InMemoryNeuronRepository.ConvertRelativeToDirection(type));
                // TODO: optimize by passing this into GetNeuronResults AQL
                result = temp.Where(nr =>
                                    (nr.Neuron != null && nr.Neuron.Id == guid.ToString()) ||
                                    (nr.Terminal != null && nr.Terminal.TargetId == guid.ToString())
                                    );
            }

            return(await Task.FromResult(result));
        }