static SmartDetector() { // To increase Azure calls performance we increase default connection limit (default is 2) and ThreadPool minimum threads to allow more open connections ServicePointManager.DefaultConnectionLimit = 100; ThreadPool.SetMinThreads(100, 100); // Force use the most updated TLS protocol SecurityProtocol.RemoveUnsecureProtocols(); Container = DependenciesInjector.GetContainer() .RegisterType <ISmartDetectorApi, SmartDetectorApi>(); }
static Analyze() { // To increase Azure calls performance we increase default connection limit (default is 2) and ThreadPool minimum threads to allow more open connections ServicePointManager.DefaultConnectionLimit = 100; ThreadPool.SetMinThreads(100, 100); // Force use the most updated TLS protocol SecurityProtocol.RemoveUnsecureProtocols(); Container = DependenciesInjector.GetContainer() .InjectAnalysisDependencies(withChildProcessRunner: true); }