public void Initialize(string registrySettingsPath, IContentEditorLogger logger, IContentTarget contentTarget, ISettingsProvider settingsProvider) { try { GlobalEditorOptions.Init(contentTarget, settingsProvider); HtmlEditorControl.AllowCachedEditor(); Assembly assembly = Assembly.GetExecutingAssembly(); ApplicationEnvironment.Initialize(assembly, Path.GetDirectoryName(assembly.Location), registrySettingsPath, contentTarget.ProductName); ContentSourceManager.Initialize(false); Trace.Listeners.Clear(); if (logger != null) { _logger = new RedirectionLogger(logger); Trace.Listeners.Add(_logger); } #if DEBUG Trace.Listeners.Add(new DefaultTraceListener()); #endif } catch (Exception e) { Trace.Fail("Failed to initialize Shared Canvas: " + e); Trace.Flush(); throw; } }
public static void Init(IContentTarget contentTarget, ISettingsProvider settingsProvider) { Debug.Assert(!_initialized, "Initializing GlobalEditorOptions more than once!"); _initialized = true; _contentTarget = contentTarget; _settingsProvider = settingsProvider; }
public void Initialize(string registrySettingsPath, IContentEditorLogger logger, IContentTarget contentTarget, ISettingsProvider settingsProvider) { try { GlobalEditorOptions.Init(contentTarget, settingsProvider); HtmlEditorControl.AllowCachedEditor(); Assembly assembly = Assembly.GetExecutingAssembly(); ApplicationEnvironment.Initialize(assembly, Path.GetDirectoryName(assembly.Location), registrySettingsPath, contentTarget.ProductName); ContentSourceManager.Initialize(false); Trace.Listeners.Clear(); if (logger != null) { _logger = new RedirectionLogger(logger); Trace.Listeners.Add(_logger); } #if DEBUG Trace.Listeners.Add(new DefaultTraceListener()); #endif } catch (Exception e) { Trace.Fail("Failed to initialize Shared Canvas: " + e); Trace.Flush(); throw; } }