コード例 #1
0
        public RoslynSemanticHighlighter(IDocument document, DocumentId documentId, RoslynHost roslynHost)
        {
            if (document == null)
            {
                throw new ArgumentNullException(nameof(document));
            }
            _document   = document;
            _documentId = documentId;
            _roslynHost = roslynHost;
            _semaphore  = new SemaphoreSlim(0);
            _queue      = new ConcurrentQueue <HighlightedLine>();

            if (document is TextDocument)
            {
                // Use the cache only for the live AvalonEdit document
                // Highlighting in read-only documents (e.g. search results) does
                // not need the cache as it does not need to highlight the same line multiple times
                _cachedLines = new List <CachedLine>();
            }

            _syncContext = SynchronizationContext.Current;
            _cts         = new CancellationTokenSource();
            var cancellationToken = _cts.Token;

            Task.Run(() => Worker(cancellationToken), cancellationToken);
        }
コード例 #2
0
ファイル: DocumentViewModel.cs プロジェクト: asralung/net4log
 public DocumentViewModel(RoslynHost host)
 {
     this.host       = host;
     this.SxFy       = new List <SxFyLogEntry>();
     this.Result     = HintProvider.GetUsageHint();
     this.StatusLine = HintProvider.NoLogFilesLoadedYetText();
 }
コード例 #3
0
        public async Task CloseDocument(OpenDocumentViewModel document)
        {
            if (document == null)
            {
                return;
            }

            var result = await document.Save(promptSave : true).ConfigureAwait(true);

            if (result == SaveResult.Cancel)
            {
                return;
            }

            // ReSharper disable once PossibleNullReferenceException
            var autoSavePath = document.Document?.GetAutoSavePath();

            if (autoSavePath != null && File.Exists(autoSavePath))
            {
                File.Delete(autoSavePath);
            }

            RoslynHost.CloseDocument(document.DocumentId);
            OpenDocuments.Remove(document);
            document.Close();
        }
コード例 #4
0
        private async void OnDataContextChanged(object sender, DependencyPropertyChangedEventArgs args)
        {
            _viewModel = (OpenDocumentViewModel)args.NewValue;
            _viewModel.NuGet.PackageInstalled += NuGetOnPackageInstalled;
            _roslynHost = _viewModel.MainViewModel.RoslynHost;

            _viewModel.MainViewModel.EditorFontSizeChanged += OnEditorFontSizeChanged;
            Editor.FontSize = _viewModel.MainViewModel.EditorFontSize;

            var avalonEditTextContainer = new AvalonEditTextContainer(Editor);

            await _viewModel.Initialize(
                avalonEditTextContainer,
                a => _syncContext.Post(o => ProcessDiagnostics(a), null),
                text => avalonEditTextContainer.UpdateText(text),
                this).ConfigureAwait(true);

            var documentText = await _viewModel.LoadText().ConfigureAwait(true);

            Editor.AppendText(documentText);
            Editor.Document.UndoStack.ClearAll();
            Editor.Document.TextChanged += (o, e) => _viewModel.SetDirty(Editor.Document.TextLength);

            Editor.TextArea.TextView.LineTransformers.Insert(0, new RoslynHighlightingColorizer(_viewModel.DocumentId, _roslynHost));

            _contextActionsRenderer = new ContextActionsRenderer(Editor, _textMarkerService);
            _contextActionsRenderer.Providers.Add(new RoslynContextActionProvider(_viewModel.DocumentId, _roslynHost));

            Editor.CompletionProvider = new RoslynCodeEditorCompletionProvider(_viewModel.DocumentId, _roslynHost);
        }
コード例 #5
0
ファイル: ScriptEditor.cs プロジェクト: GerFern/ImageProject
        protected override void OnLoad(EventArgs e)
        {
            roslynCodeEditor.CreatingDocument += RoslynCodeEditor_CreatingDocument;
            roslynCodeEditor.DocumentChanged  += RoslynCodeEditor_DocumentChanged;
            RoslynHostReferences roslynHostReferences = RoslynHostReferences.Empty.With(
                assemblyReferences: new[] { Assembly.GetExecutingAssembly() });

            var context = GlobalContext;

            if (context is null)
            {
                context = new Empty();
            }

            roslynHost = new CustomHost(
                context.GetType(),
                additionalAssemblies: new[]
            {
                Assembly.Load("RoslynPad.Roslyn.Windows"),
                Assembly.Load("RoslynPad.Editor.Windows")
            },
                references: roslynHostReferences);

            elementHost1.Child = roslynCodeEditor;
            //roslynCodeEditor.Document = new ICSharpCode.AvalonEdit.Document.TextDocument();
            docId = roslynCodeEditor.Initialize(roslynHost,
                                                new ClassificationHighlightColors(),
                                                System.IO.Directory.GetCurrentDirectory(),
                                                string.Empty);
            base.OnLoad(e);
        }
コード例 #6
0
 public RoslynContextActionProvider(ICommandProvider commandProvider, DocumentId documentId, RoslynHost roslynHost)
 {
     _commandProvider = commandProvider;
     _documentId      = documentId;
     _roslynHost      = roslynHost;
     _codeFixService  = _roslynHost.GetService <ICodeFixService>();
 }
コード例 #7
0
 public CodeEditorCompletionProvider(RoslynHost roslynHost, Workspace workspace, DocumentId documentId)
 {
     _documentId     = documentId;
     _workspace      = workspace;
     _roslynHost     = roslynHost;
     _snippetService = (AltaxoSnippetInfoService)_roslynHost.GetService <ICSharpEditSnippetInfoService>();
 }
コード例 #8
0
        public MainViewModel(IServiceLocator serviceLocator, ITelemetryProvider telemetryProvider, ICommandProvider commands, NuGetViewModel nugetViewModel)
        {
            _serviceLocator    = serviceLocator;
            _telemetryProvider = telemetryProvider;
            _telemetryProvider.Initialize(_currentVersion.ToString());
            _telemetryProvider.LastErrorChanged += () => OnPropertyChanged(nameof(LastError));

            NuGet = nugetViewModel;
            NuGetConfiguration = new NuGetConfiguration(NuGet.GlobalPackageFolder, NuGetPathVariableName);
            RoslynHost         = new RoslynHost(NuGetConfiguration, new[]
            {
                // TODO: xplat
                Assembly.Load("RoslynPad.Roslyn.Windows"),
                Assembly.Load("RoslynPad.Editor.Windows")
            });

            NewDocumentCommand          = commands.Create(CreateNewDocument);
            CloseCurrentDocumentCommand = commands.CreateAsync(CloseCurrentDocument);
            ClearErrorCommand           = commands.Create(() => _telemetryProvider.ClearLastError());
            ReportProblemCommand        = commands.Create(ReportProblem);
            EditUserDocumentPathCommand = commands.Create(EditUserDocumentPath);

            _editorFontSize = Properties.Settings.Default.EditorFontSize;

            DocumentRoot = CreateDocumentRoot();

            OpenDocuments = new ObservableCollection <OpenDocumentViewModel>();
            OpenDocuments.CollectionChanged += (sender, args) => OnPropertyChanged(nameof(HasNoOpenDocuments));
        }
コード例 #9
0
ファイル: MainViewModel.cs プロジェクト: yuan39/RoslynPad
        public MainViewModel()
        {
            var hockeyClient = (HockeyClient)HockeyClient.Current;

            if (SendTelemetry)
            {
                hockeyClient.Configure(HockeyAppId)
                .RegisterCustomDispatcherUnhandledExceptionLogic(OnUnhandledDispatcherException)
                .UnregisterDefaultUnobservedTaskExceptionHandler();

                var platformHelper = (HockeyPlatformHelperWPF)hockeyClient.PlatformHelper;
                platformHelper.AppVersion = _currentVersion.ToString();

                hockeyClient.TrackEvent(TelemetryEventNames.Start);
            }
            else
            {
                Application.Current.DispatcherUnhandledException += (sender, args) => OnUnhandledDispatcherException(args);

                var platformHelper = new HockeyPlatformHelperWPF {
                    AppVersion = _currentVersion.ToString()
                };
                hockeyClient.PlatformHelper = platformHelper;
                hockeyClient.AppIdentifier  = HockeyAppId;
            }

            NuGet = new NuGetViewModel();
            NuGetConfiguration = new NuGetConfiguration(NuGet.GlobalPackageFolder, NuGetPathVariableName);
            RoslynHost         = new RoslynHost(NuGetConfiguration, new[] { Assembly.Load("RoslynPad.RoslynEditor") });

            NewDocumentCommand          = new DelegateCommand((Action)CreateNewDocument);
            CloseCurrentDocumentCommand = new DelegateCommand(CloseCurrentDocument);
            ClearErrorCommand           = new DelegateCommand(() => LastError = null);
            ReportProblemCommand        = new DelegateCommand((Action)ReportProblem);

            _editorFontSize = Properties.Settings.Default.EditorFontSize;

            DocumentRoot  = CreateDocumentRoot();
            Documents     = DocumentRoot.Children;
            OpenDocuments = new ObservableCollection <OpenDocumentViewModel>(LoadAutoSaves(DocumentRoot.Path));
            OpenDocuments.CollectionChanged += (sender, args) => OnPropertyChanged(nameof(HasNoOpenDocuments));
            if (HasNoOpenDocuments)
            {
                CreateNewDocument();
            }
            else
            {
                CurrentOpenDocument = OpenDocuments[0];
            }

            if (HasCachedUpdate())
            {
                HasUpdate = true;
            }
            else
            {
                Task.Run(CheckForUpdates);
            }
        }
コード例 #10
0
        internal RoslynWorkspace(HostServices host, INuGetProvider nuGetProvider, RoslynHost roslynHost)
            : base(host, WorkspaceKind.Host)
        {
            _nuGetProvider = nuGetProvider;
            _referencesDirectives = new ConcurrentDictionary<string, DirectiveInfo>();

            RoslynHost = roslynHost;
        }
コード例 #11
0
        private void OnLoaded(object sender, RoutedEventArgs e)
        {
            Loaded -= OnLoaded;

            _host = new RoslynHost(additionalAssemblies: new[]
            {
                Assembly.Load("RoslynPad.Roslyn.Windows"),
                Assembly.Load("RoslynPad.Editor.Windows")
            });

            AddNewDocument();
        }
コード例 #12
0
        public MainViewModel()
        {
            _telemetryClient = new TelemetryClient {
                InstrumentationKey = ApplicationInsightsInstrumentationKey
            };
            _telemetryClient.Context.Component.Version = _currentVersion.ToString();
#if DEBUG
            _telemetryClient.Context.Properties["DEBUG"] = "1";
#endif
            if (SendTelemetry)
            {
                _telemetryClient.TrackEvent(TelemetryEventNames.Start);
            }

            Application.Current.DispatcherUnhandledException += (o, e) => OnUnhandledDispatcherException(e);
            AppDomain.CurrentDomain.UnhandledException       += (o, e) => OnUnhandledException((Exception)e.ExceptionObject, flushSync: true);
            TaskScheduler.UnobservedTaskException            += (o, e) => OnUnhandledException(e.Exception);

            NuGet = new NuGetViewModel();
            NuGetConfiguration  = new NuGetConfiguration(NuGet.GlobalPackageFolder, NuGetPathVariableName);
            RoslynHost          = new RoslynHost(NuGetConfiguration, new[] { Assembly.Load("RoslynPad.RoslynEditor") });
            ChildProcessManager = new ChildProcessManager();

            NewDocumentCommand          = new DelegateCommand((Action)CreateNewDocument);
            CloseCurrentDocumentCommand = new DelegateCommand(CloseCurrentDocument);
            ClearErrorCommand           = new DelegateCommand(() => LastError = null);
            ReportProblemCommand        = new DelegateCommand((Action)ReportProblem);

            _editorFontSize = Properties.Settings.Default.EditorFontSize;

            DocumentRoot  = CreateDocumentRoot();
            Documents     = DocumentRoot.Children;
            OpenDocuments = new ObservableCollection <OpenDocumentViewModel>(LoadAutoSaves(DocumentRoot.Path));
            OpenDocuments.CollectionChanged += (sender, args) => OnPropertyChanged(nameof(HasNoOpenDocuments));
            if (HasNoOpenDocuments)
            {
                CreateNewDocument();
            }
            else
            {
                CurrentOpenDocument = OpenDocuments[0];
            }

            if (HasCachedUpdate())
            {
                HasUpdate = true;
            }
            else
            {
                Task.Run(CheckForUpdates);
            }
        }
コード例 #13
0
        private void InitializeInternal()
        {
            RoslynHost = new RoslynHost(NuGetConfiguration, CompositionAssemblies,
                                        RoslynHostReferences.Default.With(typeNamespaceImports: new[] { typeof(Runtime.ObjectExtensions) }));

            OpenAutoSavedDocuments();

            if (HasCachedUpdate())
            {
                HasUpdate = true;
            }
            else
            {
                Task.Run(CheckForUpdates);
            }
        }
コード例 #14
0
        public async Task CloseDocument(OpenDocumentViewModel document)
        {
            var result = await document.Save(promptSave : true).ConfigureAwait(true);

            if (result == SaveResult.Cancel)
            {
                return;
            }
            if (document.Document?.IsAutoSave == true)
            {
                File.Delete(document.Document.Path);
            }
            RoslynHost.CloseDocument(document.DocumentId);
            OpenDocuments.Remove(document);
            document.Close();
        }
コード例 #15
0
        public RoslynSemanticHighlighter(IDocument document, RoslynHost roslynHost)
        {
            if (document == null)
            {
                throw new ArgumentNullException(nameof(document));
            }
            _document   = document;
            _roslynHost = roslynHost;

            if (document is TextDocument)
            {
                // Use the cache only for the live AvalonEdit document
                // Highlighting in read-only documents (e.g. search results) does
                // not need the cache as it does not need to highlight the same line multiple times
                _cachedLines = new List <CachedLine>();
            }
        }
コード例 #16
0
        private void OnLoaded(object sender, RoutedEventArgs e)
        {
            Loaded -= OnLoaded;

            _host = new RoslynHost(additionalAssemblies: new[]
            {
                Assembly.Load("RoslynPad.Roslyn.Windows"),
                Assembly.Load("RoslynPad.Editor.Windows")
            }, RoslynHostReferences.NamespaceDefault.With(new[]
            {
                MetadataReference.CreateFromFile(typeof(object).Assembly.Location),
                MetadataReference.CreateFromFile(typeof(System.Text.RegularExpressions.Regex).Assembly.Location),
                MetadataReference.CreateFromFile(typeof(System.Linq.Enumerable).Assembly.Location),
            }));

            AddNewDocument();
        }
コード例 #17
0
        public MainWindow()
        {
            InitializeComponent();

            Loaded += OnLoaded;

            _paragraphStyle = Resources["ParagraphWithNoMarginStyle"] as Style;

            _documents = new ObservableCollection <DocumentViewModel> {
                new DocumentViewModel(_host, null)
            };

            _host = new RoslynHost(additionalAssemblies: new[]
            {
                Assembly.Load("RoslynPad.Roslyn.Windows"),
                Assembly.Load("RoslynPad.Editor.Windows")
            });
        }
コード例 #18
0
        private void InitializeInternal()
        {
            RoslynHost = new RoslynHost(NuGetConfiguration, new[]
            {
                // TODO: xplat
                Assembly.Load("RoslynPad.Roslyn.Windows"),
                Assembly.Load("RoslynPad.Editor.Windows")
            });

            OpenAutoSavedDocuments();

            if (HasCachedUpdate())
            {
                HasUpdate = true;
            }
            else
            {
                Task.Run(CheckForUpdates);
            }
        }
コード例 #19
0
        public MainWindow()
        {
            InitializeComponent();

            host = new RoslynHost(additionalAssemblies: new[] {
                Assembly.Load("RoslynPad.Roslyn.Windows"),
                Assembly.Load("RoslynPad.Editor.Windows")
            },
                                  references: RoslynHostReferences.Default.With(typeNamespaceImports: new[] { typeof(InputDevice) })
                                  );

            // 引数にスクリプトがある場合はそれを実行、なければアプリを起動する
            if (App.CommandLineArgs != null)
            {
                Title           = App.CommandLineArgs[0];
                workingFileName = App.CommandLineArgs[0];
                using (StreamReader sr = new System.IO.StreamReader(App.CommandLineArgs[0], System.Text.Encoding.GetEncoding("shift_jis")))
                {
                    roslynCodeEditor.Text = sr.ReadToEnd();
                }
                ExecFile(App.CommandLineArgs[0]);
                Close();
            }
            else
            {
                // CommandBindings.Add(new CommandBinding(ApplicationCommands.Save, delegate { SaveCommand(); }));

                ExecCommand   = new DelegateCommand(OnExec, CanExec);
                SaveAsCommand = new DelegateCommand(OnSaveAs, CanSaveAs);
                SaveCommand   = new DelegateCommand(OnSave, CanSave);
                NewCommand    = new DelegateCommand(OnNew, CanNew);
                OpenCommand   = new DelegateCommand(OnOpen, CanOpen);
                DataContext   = this;

                //// 初期作業フォルダ
                //Directory.CreateDirectory(Path.GetDirectoryName(defaultFileName));
                //Directory.SetCurrentDirectory(Path.GetDirectoryName(defaultFileName));
            }
        }
コード例 #20
0
        public RoslynSemanticHighlighter(IDocument document, DocumentId documentId, RoslynHost roslynHost)
        {
            if (document == null)
                throw new ArgumentNullException(nameof(document));
            _document = document;
            _documentId = documentId;
            _roslynHost = roslynHost;
            _semaphore = new SemaphoreSlim(0);
            _queue = new ConcurrentQueue<HighlightedLine>();

            if (document is TextDocument)
            {
                // Use the cache only for the live AvalonEdit document
                // Highlighting in read-only documents (e.g. search results) does
                // not need the cache as it does not need to highlight the same line multiple times
                _cachedLines = new List<CachedLine>();
            }

            _syncContext = SynchronizationContext.Current;
            _cts = new CancellationTokenSource();
            var cancellationToken = _cts.Token;
            Task.Run(() => Worker(cancellationToken), cancellationToken);
        }
コード例 #21
0
        private async void OnDataContextChanged(object sender, DependencyPropertyChangedEventArgs args)
        {
            _viewModel = (OpenDocumentViewModel)args.NewValue;
            _viewModel.NuGet.PackageInstalled += NuGetOnPackageInstalled;
            _roslynHost = _viewModel.MainViewModel.RoslynHost;

            var avalonEditTextContainer = new AvalonEditTextContainer(Editor);

            await _viewModel.Initialize(
                avalonEditTextContainer,
                a => _syncContext.Post(o => ProcessDiagnostics(a), null),
                text => avalonEditTextContainer.UpdateText(text)
                ).ConfigureAwait(true);

            Editor.Document.UndoStack.ClearAll();

            Editor.TextArea.TextView.LineTransformers.Insert(0, new RoslynHighlightingColorizer(_viewModel.DocumentId, _roslynHost));

            _contextActionsRenderer = new ContextActionsRenderer(Editor, _textMarkerService);
            _contextActionsRenderer.Providers.Add(new RoslynContextActionProvider(_viewModel.DocumentId, _roslynHost));

            Editor.CompletionProvider = new RoslynCodeEditorCompletionProvider(_viewModel.DocumentId, _roslynHost);
        }
コード例 #22
0
        public MainViewModel()
        {
            Application.Current.DispatcherUnhandledException += (o, e) => OnUnhandledDispatcherException(e);
            AppDomain.CurrentDomain.UnhandledException += (o, e) => OnUnhandledException((Exception)e.ExceptionObject, flushSync: true);
            TaskScheduler.UnobservedTaskException += (o, e) => OnUnhandledException(e.Exception);

            NuGet = new NuGetViewModel();
            NuGetProvider = new NuGetProviderImpl(NuGet.GlobalPackageFolder, NuGetPathVariableName);
            RoslynHost = new RoslynHost(NuGetProvider);
            ChildProcessManager = new ChildProcessManager();

            NewDocumentCommand = new DelegateCommand((Action)CreateNewDocument);
            ClearErrorCommand = new DelegateCommand(() => LastError = null);

            DocumentRoot = CreateDocumentRoot();
            Documents = DocumentRoot.Children;
            OpenDocuments = new ObservableCollection<OpenDocumentViewModel>(LoadAutoSaves(DocumentRoot.Path));
            OpenDocuments.CollectionChanged += (sender, args) => OnPropertyChanged(nameof(HasNoOpenDocuments));
            if (HasNoOpenDocuments)
            {
                CreateNewDocument();
            }
            else
            {
                CurrentOpenDocument = OpenDocuments[0];
            }

            if (HasCachedUpdate())
            {
                HasUpdate = true;
            }
            else
            {
                Task.Run(CheckForUpdates);
            }
        }
コード例 #23
0
 public RoslynCodeEditorCompletionProvider(RoslynHost roslynHost)
 {
     _roslynHost = roslynHost;
 }
コード例 #24
0
 public DocumentViewModel(RoslynHost host, DocumentViewModel previous)
 {
     _host    = host;
     Previous = previous;
 }
コード例 #25
0
        public static void InitEditor()
        {
            lock (initLocked)
            {
                if (isInited)
                {
                    return;
                }
                isInited = true;
                InitScriptOptions();
                RoslynHostReferences roslynHostReferences;
                if (scriptOptions == null)
                {
                    roslynHostReferences = RoslynHostReferences.NamespaceDefault.With(
                        assemblyReferences: new[]
                    {
                        Assembly.GetExecutingAssembly(),
                        Assembly.GetCallingAssembly(),
                        typeof(MainController).Assembly,
                        typeof(object).Assembly
                    });
                }
                else
                {
                    roslynHostReferences = RoslynHostReferences.NamespaceDefault.With(
                        references: scriptOptions.MetadataReferences.Where(a => !(a is UnresolvedMetadataReference)),
                        imports: scriptOptions.Imports,
                        assemblyReferences: new[]
                    {
                        Assembly.GetExecutingAssembly(),
                        Assembly.GetCallingAssembly(),
                        typeof(MainController).Assembly,
                        typeof(object).Assembly
                    });
                }
                roslynHost = new CustomHost(
                    globalType,
                    additionalAssemblies: new[]
                {
                    Assembly.Load("RoslynPad.Roslyn.Windows"),
                    Assembly.Load("RoslynPad.Editor.Windows")
                },
                    references: roslynHostReferences);
                if (instance == null)
                {
                    CreateEditorInstance();
                }
                instance.Invoke((Action)(() =>
                {
                    roslynCodeEditor = new RoslynCodeEditor
                    {
                        FontFamily = new System.Windows.Media.FontFamily("Consolas")
                    };

                    docId = roslynCodeEditor.Initialize(roslynHost,
                                                        new ClassificationHighlightColors(),
                                                        Directory.GetCurrentDirectory(),
                                                        string.Empty);

                    if (!Directory.Exists("Code"))
                    {
                        Directory.CreateDirectory("Code");
                    }

                    if (File.Exists("Code\\_last"))
                    {
                        roslynCodeEditor.Text = File.ReadAllText("Code\\_last");
                    }

                    instance.elementHost1.Child = roslynCodeEditor;

                    foreach (var item in Directory.EnumerateFiles("Code"))
                    {
                        instance.comboBox1.Items.Add(item.Substring(5));
                    }

                    instance.comboBox1.SelectedIndexChanged += (_, __) =>
                    {
                        if (File.Exists($"Code\\{instance.comboBox1.Text}"))
                        {
                            Code = File.ReadAllText($"Code\\{instance.comboBox1.Text}");
                        }
                    };
                    //AppDomain.CurrentDomain.AssemblyResolve += (a, b) =>
                    //{
                    //    var asms = AppDomain.CurrentDomain.GetAssemblies();
                    //    var fasms = asms.Where(a => a.FullName == b.Name).ToArray();
                    //    if (fasms.Length > 0) return fasms[0];
                    //    else
                    //    {
                    //        string asmName;
                    //        if (b.Name.IndexOf(',') > 0)
                    //            asmName = b.Name.Substring(0, b.Name.IndexOf(','));
                    //        else asmName = b.Name;
                    //        var dinfo = Directory.CreateDirectory("Plugins");
                    //        foreach (var item in dinfo.EnumerateFiles("*.dll", SearchOption.AllDirectories))
                    //        {
                    //            if (item.Name == asmName)
                    //            {
                    //                return assemblyLoadContext.LoadFromAssemblyPath(item.FullName);
                    //            }
                    //        }
                    //    }
                    //    return null;
                    //};
                }));
            }
        }
コード例 #26
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CodeTextEditorFactory"/> class.
 /// </summary>
 /// <param name="host">The roslyn host. If this argument is null, a new instance of <see cref="RoslynHost"/> is created and stored in this instance.</param>
 public CodeTextEditorFactory(RoslynHost host)
 {
     RoslynHost = host ?? new RoslynHost(null);
 }
コード例 #27
0
 public RoslynHighlightingColorizer(DocumentId documentId, RoslynHost roslynHost)
 {
     _documentId = documentId;
     _roslynHost = roslynHost;
 }
コード例 #28
0
 public RoslynHighlightingColorizer(RoslynHost roslynHost)
 {
     _roslynHost = roslynHost;
 }
コード例 #29
0
 public RoslynContextActionProvider(DocumentId documentId, RoslynHost roslynHost)
 {
     _documentId = documentId;
     _roslynHost = roslynHost;
     _codeFixService = _roslynHost.GetService<ICodeFixService>();
 }
コード例 #30
0
 public RoslynCodeEditorCompletionProvider(DocumentId documentId, RoslynHost roslynHost)
 {
     _documentId     = documentId;
     _roslynHost     = roslynHost;
     _snippetService = (SnippetInfoService)_roslynHost.GetService <ISnippetInfoService>();
 }
コード例 #31
0
 public RoslynCodeEditorCompletionProvider(DocumentId documentId, RoslynHost roslynHost)
 {
     _documentId = documentId;
     _roslynHost = roslynHost;
 }
コード例 #32
0
 public RoslynHighlightingColorizer(DocumentId documentId, RoslynHost roslynHost)
 {
     _documentId = documentId;
     _roslynHost = roslynHost;
 }
コード例 #33
0
 public MainViewModel()
 {
     NuGet      = new NuGetViewModel();
     RoslynHost = new RoslynHost(new NuGetProvider(NuGet.GlobalPackageFolder, NuGetPathVariableName));
 }
コード例 #34
0
 public RoslynContextActionProvider(RoslynHost roslynHost)
 {
     _roslynHost = roslynHost;
 }