예제 #1
0
 public void Dispose()
 {
     if (this.loader == null)
     {
         return;
     }
     this.loader.Dispose();
     this.loader = (Loader)null;
     this.textBufferFactoryProvider = (ITextBufferFactory)null;
     this.textEditorFactoryProvider = (ITextEditorFactory)null;
     this.editorCommandsProvider    = (IEditorOperationsProvider)null;
     this.undoManagerProvider       = (ITextBufferUndoManagerProvider)null;
     this.contentTypeRegistry       = (IContentTypeRegistry)null;
     this.squiggleProviderFactory   = (ISquiggleProviderFactory)null;
     this.completionBrokerMap       = (ICompletionBrokerMap)null;
     this.undoHistoryRegistry       = (IUndoHistoryRegistry)null;
 }
예제 #2
0
 private void Initialize()
 {
     if (this.ready)
     {
         return;
     }
     if (this.loader == null)
     {
         this.loader = Loader.CreateLoader(((EditingService.CompiledCompositionEntryPoint)Delegate.CreateDelegate(typeof(EditingService.CompiledCompositionEntryPoint), Assembly.LoadFile(Path.Combine(Path.GetDirectoryName(Assembly.GetAssembly(typeof(EditingService)).Location), "Microsoft.Nautilus.Composition.dll")).EntryPoint))());
         this.loader.Initialize();
     }
     this.textBufferFactoryProvider = this.loader.GetService <ITextBufferFactory>();
     this.textEditorFactoryProvider = this.loader.GetService <ITextEditorFactory>();
     this.editorCommandsProvider    = this.loader.GetService <IEditorOperationsProvider>();
     this.undoManagerProvider       = this.loader.GetService <ITextBufferUndoManagerProvider>();
     this.contentTypeRegistry       = this.loader.GetService <IContentTypeRegistry>();
     this.squiggleProviderFactory   = this.loader.GetService <ISquiggleProviderFactory>();
     this.completionBrokerMap       = this.loader.GetService <ICompletionBrokerMap>();
     this.undoHistoryRegistry       = this.loader.GetService <IUndoHistoryRegistry>();
     this.contentTypeRegistry.AddContentType("text.xml", "XML", (IEnumerable <string>) new string[1]
     {
         "text"
     });
     this.contentTypeRegistry.AddContentType("text.xaml", "XAML", (IEnumerable <string>) new string[1]
     {
         "text"
     });
     this.contentTypeRegistry.AddContentType("text.C#", "C#", (IEnumerable <string>) new string[1]
     {
         "text"
     });
     this.contentTypeRegistry.AddContentType("text.VB", "VB", (IEnumerable <string>) new string[1]
     {
         "text"
     });
     this.contentTypeRegistry.AddContentType("text.JS", "JS", (IEnumerable <string>) new string[1]
     {
         "text"
     });
     this.ready = true;
 }