/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using QuantConnect.Interfaces;
using QuantConnect.Packets;
namespace QuantConnect.Data
{
///
/// Represents the set of parameters for the method
///
public class HistoryProviderInitializeParameters
{
///
/// The job
///
public AlgorithmNodePacket Job { get; }
///
/// The API instance
///
public IApi Api { get; }
///
/// The provider used to get data when it is not present on disk
///
public IDataProvider DataProvider { get; }
///
/// The provider used to cache history data files
///
public IDataCacheProvider DataCacheProvider { get; }
///
/// The provider used to get a map file resolver to handle equity mapping
///
public IMapFileProvider MapFileProvider { get; }
///
/// The provider used to get factor files to handle equity price scaling
///
public IFactorFileProvider FactorFileProvider { get; }
///
/// A function used to send status updates
///
public Action StatusUpdateAction { get; }
///
/// True if parallel history requests are enabled
///
/// Parallel history requests are faster but require more ram and cpu usage
/// and are not compatible with some
public bool ParallelHistoryRequestsEnabled { get; }
///
/// The data permission manager
///
public IDataPermissionManager DataPermissionManager { get; }
///
/// The object store
///
public IObjectStore ObjectStore { get; }
///
/// The algorithm settings instance to use
///
public IAlgorithmSettings AlgorithmSettings { get; }
///
/// Initializes a new instance of the class from the specified parameters
///
/// The job
/// The API instance
/// Provider used to get data when it is not present on disk
/// Provider used to cache history data files
/// Provider used to get a map file resolver to handle equity mapping
/// Provider used to get factor files to handle equity price scaling
/// Function used to send status updates
/// True if parallel history requests are enabled
/// The data permission manager to use
/// The object store to use
/// The algorithm settings instance to use
public HistoryProviderInitializeParameters(
AlgorithmNodePacket job,
IApi api,
IDataProvider dataProvider,
IDataCacheProvider dataCacheProvider,
IMapFileProvider mapFileProvider,
IFactorFileProvider factorFileProvider,
Action statusUpdateAction,
bool parallelHistoryRequestsEnabled,
IDataPermissionManager dataPermissionManager,
IObjectStore objectStore,
IAlgorithmSettings algorithmSettings)
{
Job = job;
Api = api;
DataProvider = dataProvider;
DataCacheProvider = dataCacheProvider;
MapFileProvider = mapFileProvider;
FactorFileProvider = factorFileProvider;
StatusUpdateAction = statusUpdateAction;
ParallelHistoryRequestsEnabled = parallelHistoryRequestsEnabled;
DataPermissionManager = dataPermissionManager;
ObjectStore = objectStore;
AlgorithmSettings = algorithmSettings;
}
}
}