Esempio n. 1
0
        private void LoadExtensions()
        {
            Platform.Log(LogLevel.Debug, "Loading extensions..");
            WebEditStudyProcessorExtensionPoint ex = new WebEditStudyProcessorExtensionPoint();

            _plugins = CollectionUtils.Select(
                ex.CreateExtensions(),
                (IWebEditStudyProcessorExtension plugin) => plugin.Enabled);

            if (_plugins != null && _plugins.Count > 0)
            {
                Platform.Log(LogLevel.Debug, "{0} extension(s) found:", _plugins.Count);
                foreach (IWebEditStudyProcessorExtension plugin in _plugins)
                {
                    plugin.Initialize();
                    IWebEditStudyProcessorExtension extension = plugin;
                    StudyEditing += ((sender, ev) => extension.OnStudyEditing(ev.Context));
                    StudyEdited  += ((sender, ev) => extension.OnStudyEdited(ev.Context));
                }
            }
        }
Esempio n. 2
0
		private void LoadExtensions()
		{
			Platform.Log(LogLevel.Debug, "Loading extensions..");
			WebEditStudyProcessorExtensionPoint ex = new WebEditStudyProcessorExtensionPoint();
			_plugins = CollectionUtils.Select(
								ex.CreateExtensions(),
								(IWebEditStudyProcessorExtension plugin) => plugin.Enabled);

			if (_plugins != null && _plugins.Count > 0)
			{

				Platform.Log(LogLevel.Debug, "{0} extension(s) found:", _plugins.Count);
				foreach (IWebEditStudyProcessorExtension plugin in _plugins)
				{
					plugin.Initialize();
					IWebEditStudyProcessorExtension extension = plugin;
					StudyEditing += ((sender, ev) => extension.OnStudyEditing(ev.Context));
					StudyEdited += ((sender, ev) => extension.OnStudyEdited(ev.Context));
				}
			}
		}