Exemplo n.º 1
0
        /// <summary>
        /// Returns the network inputs for the <paramref name="quoteId"/>.
        /// </summary>
        /// <param name="date">The date that the network inputs should be generated for.</param>
        /// <returns>Returns the network inputs for the <paramref name="quoteId"/>.
        public IEnumerable <INetworkInput> GetNetworkInputs(int quoteId)
        {
            if (_isDisposed)
            {
                throw new ObjectDisposedException("DatasetService", "The service has been disposed.");
            }

            var dataset = _repository.GetTestingDataset(quoteId)?.ToList();

            if (dataset?.Count() != 1)
            {
                throw new DataMisalignedException("Dataset should only ever return 1 entry.");
            }

            return(ConvertToNetworkInputs(dataset.First()));
        }