当前位置: 首页>>代码示例>>C#>>正文


C# DocumentEventArgs类代码示例

本文整理汇总了C#中DocumentEventArgs的典型用法代码示例。如果您正苦于以下问题:C# DocumentEventArgs类的具体用法?C# DocumentEventArgs怎么用?C# DocumentEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DocumentEventArgs类属于命名空间,在下文中一共展示了DocumentEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Workspace_DocumentOpened

 private void Workspace_DocumentOpened(object sender, DocumentEventArgs e)
 {
     lock (_gate)
     {
         _openDocumentContexts.Add(e.Document.Id, Task.Run(() => GetConventionContextAsync(e.Document.FilePath, CancellationToken.None)));
     }
 }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:7,代码来源:EditorConfigDocumentOptionsProvider.cs

示例2: HandleDocumentClosed

		void HandleDocumentClosed (object sender, DocumentEventArgs e)
		{
			if (e.Document == null || e.Document.Editor == null || e.Document.Editor.Parent == null) return;

			e.Document.Editor.Parent.ButtonReleaseEvent -= HandleButtonReleaseEvent;
			e.Document.Editor.Parent.MotionNotifyEvent -= HandleMotionNotifyEvent;
		}
开发者ID:nixxa,项目名称:MonoDevelop.AddIns,代码行数:7,代码来源:JumpToDefinitionHandler.cs

示例3: OnDocumentActiveContextChanged

            private void OnDocumentActiveContextChanged(object sender, DocumentEventArgs e)
            {
                var document = SubjectBuffer.AsTextContainer().GetOpenDocumentInCurrentContext();

                if (document != null && document.Id == e.Document.Id)
                {
                    this.RaiseChanged();
                }
            }
开发者ID:Rickinio,项目名称:roslyn,代码行数:9,代码来源:TaggerEventSources.DocumentActiveContextChangedEventSource.cs

示例4: OnDocumentOpened

 private void OnDocumentOpened(object sender, DocumentEventArgs e)
 {
     InvokeBelowInputPriority(() =>
     {
         if (!_isDisposed)
         {
             SetReadOnly(e.Document);
         }
     });
 }
开发者ID:GeertVL,项目名称:roslyn,代码行数:10,代码来源:VsReadOnlyDocumentTracker.cs

示例5: OnDocumentClosed

 private void OnDocumentClosed(object sender, DocumentEventArgs e)
 {
     // The buffer is gone by now, so we don't need to remove the read-only region from it, just clean up our dictionary.
     InvokeBelowInputPriority(() =>
     {
         if (_readOnlyRegions != null)
         {
             _readOnlyRegions.Remove(e.Document.Id);
         }
     });
 }
开发者ID:GloryChou,项目名称:roslyn,代码行数:11,代码来源:ReadOnlyDocumentTracker.cs

示例6: Workspace_DocumentClosed

        private void Workspace_DocumentClosed(object sender, DocumentEventArgs e)
        {
            lock (_gate)
            {
                if (_openDocumentContexts.TryGetValue(e.Document.Id, out var contextTask))
                {
                    _openDocumentContexts.Remove(e.Document.Id);

                    // Ensure we dispose the context, which we'll do asynchronously
                    contextTask.ContinueWith(
                        t => t.Result.Dispose(),
                        CancellationToken.None,
                        TaskContinuationOptions.OnlyOnRanToCompletion,
                        TaskScheduler.Default);
                }
            }
        }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:17,代码来源:EditorConfigDocumentOptionsProvider.cs

示例7: HandleDocumentOpened

		void HandleDocumentOpened (object sender, DocumentEventArgs e)
		{
			if (!(e.Document.Project is DotNetProject) || !e.Document.IsFile)
				return;
			string ext = e.Document.FileName;
			if (!ext.EndsWith (".addin.xml") && !ext.EndsWith (".addin"))
				return;
			
			var data = AddinData.GetAddinData ((DotNetProject)e.Document.Project);
			if (data != null) {
				IWorkbenchWindow window = e.Document.Window;
				var adesc = data.AddinRegistry.ReadAddinManifestFile (e.Document.FileName);
				
				window.AttachViewContent (new ExtensionEditorView (adesc, data));
				window.AttachViewContent (new ExtensionPointsEditorView (adesc, data));
			}
			
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:18,代码来源:StartupHandler.cs

示例8: OnDocumentOpened

 private void OnDocumentOpened(object sender, DocumentEventArgs args)
 {
     this.Parse(args.Document);
 }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:4,代码来源:BackgroundParser.cs

示例9: OnDocumentOpened

 private void OnDocumentOpened(object sender, DocumentEventArgs e)
 {
     InvokeBelowInputPriority(() => TrackDocument(e.Document.Id));
 }
开发者ID:GloryChou,项目名称:roslyn,代码行数:4,代码来源:ReadOnlyDocumentTracker.cs

示例10: events_DocumentClosing

 private void events_DocumentClosing(DocumentEventArgs ea)
 {
     UpdateMarkerList();
 }
开发者ID:leahey,项目名称:CR_MarkersToolWindow,代码行数:4,代码来源:MarkersToolWindow.cs

示例11: OnDocumentClosed

 private void OnDocumentClosed(object sender, DocumentEventArgs args)
 {
     this.CancelParse(args.Document.Id);
 }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:4,代码来源:BackgroundParser.cs

示例12: OnDocumentOpened

 private void OnDocumentOpened(object sender, DocumentEventArgs args)
 {
     if (_workspace != null)
     {
         ParseIfThisDocument(null, args.Document.Project.Solution, args.Document.Id);
     }
 }
开发者ID:rgani,项目名称:roslyn,代码行数:7,代码来源:SyntacticClassificationTaggerProvider.TagComputer.cs

示例13: NewDocumentCreatedEventHandler

 /// <summary>
 /// The event handler is creating a new document.
 /// </summary>
 /// <param name="args"></param>
 protected override void NewDocumentCreatedEventHandler(DocumentEventArgs args)
 {
     args.Document.AttachPlugin(this);
 }
开发者ID:intity,项目名称:TFlexEx,代码行数:8,代码来源:PluginInstance.cs

示例14: OnDocumentClosed

 private void OnDocumentClosed(object sender, DocumentEventArgs e)
 {
     var asyncToken = _listener.BeginAsyncOperation("OnDocumentClosed");
     _eventProcessingQueue.ScheduleTask(
         () => EnqueueWorkItemAsync(e.Document, InvocationReasons.DocumentClosed), _shutdownToken).CompletesAsyncOperation(asyncToken);
 }
开发者ID:GloryChou,项目名称:roslyn,代码行数:6,代码来源:WorkCoordinator.cs

示例15: OnDocumentActiveContextChanged

 private void OnDocumentActiveContextChanged(object sender, DocumentEventArgs e)
 {
     Reanalyze(e.Document.Project.Solution.Workspace, documentIds: SpecializedCollections.SingletonEnumerable(e.Document.Id));
 }
开发者ID:ehsansajjad465,项目名称:roslyn,代码行数:4,代码来源:DiagnosticAnalyzerService_IncrementalAnalyzer.cs


注:本文中的DocumentEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。