當前位置: 首頁>>代碼示例>>C#>>正文


C# Addins.ExtensionNodeEventArgs類代碼示例

本文整理匯總了C#中Mono.Addins.ExtensionNodeEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# ExtensionNodeEventArgs類的具體用法?C# ExtensionNodeEventArgs怎麽用?C# ExtensionNodeEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ExtensionNodeEventArgs類屬於Mono.Addins命名空間,在下文中一共展示了ExtensionNodeEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: OnExtensionChange

		void OnExtensionChange (object s, ExtensionNodeEventArgs args)
		{
			if (args.Change == ExtensionChange.Add) {
				ProjectService ps = MonoDevelop.Projects.Services.ProjectService;
				ITestProvider provider = args.ExtensionObject as ITestProvider;
				providers.Add (provider);
				
				Type[] types = provider.GetOptionTypes ();
				if (types != null) {
					foreach (Type t in types) {
						if (!typeof(ICloneable).IsAssignableFrom (t)) {
							LoggingService.LogError ("Option types must implement ICloneable: " + t);
							continue;
						}
						ps.DataContext.IncludeType (t);
					}
				}
			}
			else {
				ITestProvider provider = args.ExtensionObject as ITestProvider;
				providers.Remove (provider);
				
				// The types returned by provider.GetOptionTypes should probably be unregistered
				// from the DataContext, but DataContext does not allow unregisterig.
				// This is not a big issue anyway.
			}
		}
開發者ID:riverans,項目名稱:monodevelop,代碼行數:27,代碼來源:NUnitService.cs

示例2: OnTagExtensionChanged

		static void OnTagExtensionChanged (object sender, ExtensionNodeEventArgs args)
		{
			if (args.Change == ExtensionChange.Add)
				tags.Add (args.ExtensionNode.Id);
			else
				tags.Remove (args.ExtensionNode.Id);
		}
開發者ID:raufbutt,項目名稱:monodevelop-old,代碼行數:7,代碼來源:UpdateService.cs

示例3: OnExtensionChanged

		static void OnExtensionChanged (object s, ExtensionNodeEventArgs args)
		{
			if (args.Change == ExtensionChange.Add)
				providers.Add ((IGettingStartedProvider)args.ExtensionObject);
			else if (args.Change == ExtensionChange.Remove)
				providers.Remove ((IGettingStartedProvider)args.ExtensionObject);
		}
開發者ID:kdubau,項目名稱:monodevelop,代碼行數:7,代碼來源:GettingStarted.cs

示例4: OnSyntaxModeExtensionChanged

		static void OnSyntaxModeExtensionChanged (object s, ExtensionNodeEventArgs args)
		{
			TemplateCodon codon = (TemplateCodon)args.ExtensionNode;
			if (args.Change == ExtensionChange.Add) {
				Mono.TextEditor.Highlighting.SyntaxModeService.AddSyntaxMode (new StreamProviderWrapper(codon));
			}
		}
開發者ID:FreeBSD-DotNet,項目名稱:monodevelop,代碼行數:7,代碼來源:SyntaxModeLoader.cs

示例5: extensionHandler

		static void extensionHandler (object s, ExtensionNodeEventArgs args)
		{
			if (args.Change == ExtensionChange.Add)
				loaders.Add ((IWebBrowserLoader) args.ExtensionObject);
			else if (args.Change == ExtensionChange.Remove)
				loaders.Remove ((IWebBrowserLoader) args.ExtensionObject);
		}
開發者ID:Kalnor,項目名稱:monodevelop,代碼行數:7,代碼來源:WebBrowserService.cs

示例6: OnExtensionChanged

		static void OnExtensionChanged (object s, ExtensionNodeEventArgs args)
		{
			if (args.Change == ExtensionChange.Add)
				templates.Add ((FileTemplateTypeCodon) args.ExtensionNode);
			else
				templates.Remove ((FileTemplateTypeCodon) args.ExtensionNode);
		}
開發者ID:yayanyang,項目名稱:monodevelop,代碼行數:7,代碼來源:FileDescriptionTemplate.cs

示例7: OnStylesExtensionChanged

		static void OnStylesExtensionChanged (object s, ExtensionNodeEventArgs args)
		{
			TemplateCodon codon = (TemplateCodon)args.ExtensionNode;
			if (args.Change == ExtensionChange.Add) {
				SyntaxModeService.AddStyle (codon);
			} else {
				SyntaxModeService.RemoveStyle (codon);
			}
		}
開發者ID:FreeBSD-DotNet,項目名稱:monodevelop,代碼行數:9,代碼來源:TemplateExtensionNodeLoader.cs

示例8: OnExtensionChanged

		static void OnExtensionChanged (object sender, ExtensionNodeEventArgs args)
		{
			var node = (TypeExtensionNode)args.ExtensionNode;
			var value = (LocaleSetProvider)node.GetInstance (typeof (LocaleSetProvider));
			if (args.Change == ExtensionChange.Add)
				locales.Add (value.LocaleSet);
			else
				locales.Remove (value.LocaleSet);
		}
開發者ID:sushihangover,項目名稱:monodevelop,代碼行數:9,代碼來源:LocalizationService.cs

示例9: OnTemplateImagesChanged

		void OnTemplateImagesChanged (object sender, ExtensionNodeEventArgs args)
		{
			var codon = args.ExtensionNode as ImageCodon;
			if (args.Change == ExtensionChange.Add) {
				projectTemplateImages.Add (codon);
			} else {
				projectTemplateImages.Remove (codon);
			}
		}
開發者ID:pabloescribanoloza,項目名稱:monodevelop,代碼行數:9,代碼來源:TemplatingService.cs

示例10: OnProjectTemplateWizardsChanged

		void OnProjectTemplateWizardsChanged (object sender, ExtensionNodeEventArgs args)
		{
			var wizard = args.ExtensionObject as TemplateWizard;
			if (args.Change == ExtensionChange.Add) {
				projectTemplateWizards.Add (wizard);
			} else {
				projectTemplateWizards.Remove (wizard);
			}
		}
開發者ID:pabloescribanoloza,項目名稱:monodevelop,代碼行數:9,代碼來源:TemplatingService.cs

示例11: OnTemplatingProvidersChanged

		void OnTemplatingProvidersChanged (object sender, ExtensionNodeEventArgs args)
		{
			var provider = args.ExtensionObject as IProjectTemplatingProvider;
			if (args.Change == ExtensionChange.Add) {
				templateProviders.Add (provider);
			} else {
				templateProviders.Remove (provider);
			}
		}
開發者ID:pabloescribanoloza,項目名稱:monodevelop,代碼行數:9,代碼來源:TemplatingService.cs

示例12: OnTemplateCategoriesChanged

		void OnTemplateCategoriesChanged (object sender, ExtensionNodeEventArgs args)
		{
			var codon = (TemplateCategoryCodon)args.ExtensionNode;
			if (args.Change == ExtensionChange.Add) {
				projectTemplateCategories.Add (codon.ToTopLevelTemplateCategory ());
			} else {
				projectTemplateCategories.RemoveAll (category => category.Id == codon.Id);
			}
		}
開發者ID:pabloescribanoloza,項目名稱:monodevelop,代碼行數:9,代碼來源:TemplatingService.cs

示例13: OnSyntaxModeExtensionChanged

		static void OnSyntaxModeExtensionChanged (object s, ExtensionNodeEventArgs args)
		{
			TemplateCodon codon = (TemplateCodon)args.ExtensionNode;
			if (args.Change == ExtensionChange.Add) {
				Mono.TextEditor.Highlighting.SyntaxModeService.AddSyntaxMode (codon);
			} else {
				Mono.TextEditor.Highlighting.SyntaxModeService.RemoveSyntaxMode (codon);
			}
		}
開發者ID:Kalnor,項目名稱:monodevelop,代碼行數:9,代碼來源:TemplateExtensionNodeLoader.cs

示例14: OnCodeBehindGenerationChanged

 /// <summary>
 ///   Handler for codon addition/removal.
 /// </summary>
 private static void OnCodeBehindGenerationChanged(object sender, ExtensionNodeEventArgs args)
 {
     CodeBehindGeneratorCodon codon = (CodeBehindGeneratorCodon)args.ExtensionNode;
     if (args.Change == ExtensionChange.Add) {
         generators.Add (codon.Id, codon.Generator);
     } else {
         generators.Remove (codon.Id);
     }
 }
開發者ID:Monobjc,項目名稱:monobjc-monodevelop,代碼行數:12,代碼來源:CodeBehindGeneratorLoader.cs

示例15: HandleInstrumentationHandlerExtension

		static void HandleInstrumentationHandlerExtension (object sender, ExtensionNodeEventArgs args)
		{
			var handler = (InstrumentationConsumer)args.ExtensionObject;
			if (args.Change == ExtensionChange.Add) {
				RegisterInstrumentationConsumer (handler);
			}
			else {
				UnregisterInstrumentationConsumer (handler);
			}
		}
開發者ID:brantwedel,項目名稱:monodevelop,代碼行數:10,代碼來源:InstrumentationService.cs


注:本文中的Mono.Addins.ExtensionNodeEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。