Esempio n. 1
0
        public void LoadPlugins(List <string> includeSet)
        {
            var s = Stopwatch.StartNew();

            if (includeSet.Contains("Licensing"))
            {
                LicensingManager = LoadPlugin <ILicensingManager>("Licensing.dll", typeof(ILicensingManager)) as ILicensingManager;
            }

            if (includeSet.Contains("DashboardClient"))
            {
                DashboardClient = LoadPlugin <IDashboardClient>("DashboardClient.dll", typeof(IDashboardClient)) as IDashboardClient;
            }

            if (includeSet.Contains("DeploymentTasks"))
            {
                var deploymentTaskPlugin = LoadPlugin <IDeploymentTaskProviderPlugin>("DeploymentTasks.dll", typeof(IDeploymentTaskProviderPlugin)) as IDeploymentTaskProviderPlugin;
                DeploymentTaskProviders = new List <IDeploymentTaskProviderPlugin>
                {
                    deploymentTaskPlugin
                };
            }

            s.Stop();

            _log?.Debug($"Plugin load took {s.ElapsedMilliseconds}ms");
        }
        public void LoadPlugins()
        {
            var s = Stopwatch.StartNew();

            LicensingManager = LoadPlugin <ILicensingManager>("Licensing.dll", typeof(ILicensingManager)) as ILicensingManager;
            DashboardClient  = LoadPlugin <IDashboardClient>("DashboardClient.dll", typeof(IDashboardClient)) as IDashboardClient;

            s.Stop();

            _log?.Debug($"Plugin load took {s.ElapsedMilliseconds}ms");
        }
Esempio n. 3
0
        public void LoadPlugins(List <string> includeSet)
        {
            var s = Stopwatch.StartNew();

            if (includeSet.Contains("Licensing"))
            {
                LicensingManager = LoadPlugin <ILicensingManager>("Plugin.Licensing.dll", typeof(ILicensingManager)) as ILicensingManager;
            }

            if (includeSet.Contains("DashboardClient"))
            {
                DashboardClient = LoadPlugin <IDashboardClient>("Plugin.DashboardClient.dll", typeof(IDashboardClient)) as IDashboardClient;
            }

            if (includeSet.Contains("DeploymentTasks"))
            {
                // TODO: wildcard filename match
                var deploymentTaskPlugin = LoadPlugin <IDeploymentTaskProviderPlugin>("Plugin.DeploymentTasks.Core.dll", typeof(IDeploymentTaskProviderPlugin)) as IDeploymentTaskProviderPlugin;
                DeploymentTaskProviders = new List <IDeploymentTaskProviderPlugin>
                {
                    deploymentTaskPlugin
                };

                var azure = LoadPlugin <IDeploymentTaskProviderPlugin>("Plugin.DeploymentTasks.Azure.dll", typeof(IDeploymentTaskProviderPlugin)) as IDeploymentTaskProviderPlugin;
                DeploymentTaskProviders.Add(azure);
            }

            if (includeSet.Contains("CertificateManagers"))
            {
                var certManagerProviders = LoadPlugin <ICertificateManagerProviderPlugin>("Plugin.CertificateManagers.dll", typeof(ICertificateManagerProviderPlugin)) as ICertificateManagerProviderPlugin;
                CertificateManagerProviders = new List <ICertificateManagerProviderPlugin>
                {
                    certManagerProviders
                };
            }

            s.Stop();

            _log?.Debug($"Plugin load took {s.ElapsedMilliseconds}ms");
        }