public DataProviders(DataProviderContext context)
 {
     Kusto       = new DataProviderLogDecorator(context, new KustoDataProvider(_cache, context.Configuration.KustoConfiguration));
     Observer    = new DataProviderLogDecorator(context, SupportObserverDataProviderFactory.GetDataProvider(_cache, context.Configuration));
     GeoMaster   = new DataProviderLogDecorator(context, new GeoMasterDataProvider(_cache, context.Configuration.GeoMasterConfiguration));
     AppInsights = new DataProviderLogDecorator(context, new AppInsightsDataProvider(_cache, context.Configuration.AppInsightsConfiguration));
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="DataProviders" /> class.
        /// </summary>
        /// <param name="context">Data provider context</param>
        public DataProviders(DataProviderContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            Kusto       = new DataProviderLogDecorator(context, new KustoDataProvider(_cache, context.Configuration.KustoConfiguration, context.RequestId));
            Observer    = new DataProviderLogDecorator(context, SupportObserverDataProviderFactory.GetDataProvider(_cache, context.Configuration));
            GeoMaster   = new DataProviderLogDecorator(context, new GeoMasterDataProvider(_cache, context.Configuration.GeoMasterConfiguration));
            AppInsights = new DataProviderLogDecorator(context, new AppInsightsDataProvider(_cache, context.Configuration.AppInsightsConfiguration));
            Mdm         = new DataProviderLogDecorator(context, new MdmDataProvider(_cache, context.Configuration.MdmConfiguration, context.RequestId));
        }
        public DataProviders(DataProviderContext context)
        {
            Kusto          = new KustoLogDecorator(context, new KustoDataProvider(_cache, context.Configuration.KustoConfiguration, context.RequestId, context.KustoHeartBeatService));
            Observer       = new ObserverLogDecorator(context, SupportObserverDataProviderFactory.GetDataProvider(_cache, context.Configuration, context));
            GeoMaster      = new GeoMasterLogDecorator(context, new GeoMasterDataProvider(_cache, context));
            AppInsights    = new AppInsightsLogDecorator(context, new AppInsightsDataProvider(_cache, context.Configuration.AppInsightsConfiguration));
            ChangeAnalysis = new ChangeAnalysisLogDecorator(context, new ChangeAnalysisDataProvider(_cache, context.Configuration.ChangeAnalysisDataProviderConfiguration, context.RequestId, context.clientObjectId, context.clientPrincipalName, Kusto, context.receivedHeaders));
            Asc            = new AscLogDecorator(context, new AscDataProvider(_cache, context.Configuration.AscDataProviderConfiguration, context.RequestId));
            Mdm            = (MdmDataSource ds) =>
            {
                switch (ds)
                {
                case MdmDataSource.Antares:
                    return(new MdmLogDecorator(context, new MdmDataProvider(_cache, context.Configuration.AntaresMdmConfiguration, context.RequestId)));

                case MdmDataSource.Networking:
                    return(new MdmLogDecorator(context, new MdmDataProvider(_cache, context.Configuration.NetworkingMdmConfiguration, context.RequestId)));

                default:
                    throw new NotSupportedException($"{ds} is not supported.");
                }
            };
        }
Exemple #4
0
 public DataProviders(DataSourcesConfiguration configuration)
 {
     Kusto     = new DataProviderLogDecorator(new KustoDataProvider(_cache, configuration.KustoConfiguration));
     Observer  = new DataProviderLogDecorator(SupportObserverDataProviderFactory.GetDataProvider(_cache, configuration));
     GeoMaster = new DataProviderLogDecorator(new GeoMasterDataProvider(_cache, configuration.GeoMasterConfiguration));
 }