本文整理汇总了C#中Mono.Addins.ExtensionNodeEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ExtensionNodeEventArgs类的具体用法?C# ExtensionNodeEventArgs怎么用?C# ExtensionNodeEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ExtensionNodeEventArgs类属于Mono.Addins命名空间,在下文中一共展示了ExtensionNodeEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: OnExtensionChanged
private void OnExtensionChanged (object o, ExtensionNodeEventArgs args)
{
InstanceExtensionNode node = (InstanceExtensionNode)args.ExtensionNode;
if (args.Change == ExtensionChange.Add) {
RegisterPhotoSource (node.CreateInstance () as IPhotoSourceInfo);
} else {
throw new NotImplementedException (); // TODO: Handle this
}
}
开发者ID:rubenv,项目名称:tripod,代码行数:10,代码来源:PhotoSourceInfoManager.cs
示例17: OnCompletionCharsAdded
static void OnCompletionCharsAdded (object sender, ExtensionNodeEventArgs args)
{
var codon = (CompletionCharacterCodon)args.ExtensionNode;
var c = codon.CreateCompletionChar ();
c.CompleteOnSpace = PropertyService.Get ("CompletionCharacters." + c.Language + ".CompleteOnSpace", c.CompleteOnSpace);
c.CompleteOnChars = PropertyService.Get ("CompletionCharacters." + c.Language + ".CompleteOnChars", c.CompleteOnChars);
completionChars.Add (c);
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:10,代码来源:CompletionCharacters.cs
示例18: OnExtensionChanged
private void OnExtensionChanged (object s, ExtensionNodeEventArgs args) {
// FIXME: We do not do run-time removal of editors yet!
if (args.Change == ExtensionChange.Add) {
Editor editor = (args.ExtensionNode as EditorNode).GetEditor ();
editor.ProcessingStarted += OnProcessingStarted;
editor.ProcessingStep += OnProcessingStep;
editor.ProcessingFinished += OnProcessingFinished;
editors.Add (editor);
PackButton (editor);
}
}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:11,代码来源:EditorPage.cs
示例19: FormatterExtHandler
static void FormatterExtHandler(object sender, ExtensionNodeEventArgs args)
{
switch (args.Change) {
case ExtensionChange.Add:
nodes.Add ((CodeFormatterExtensionNode) args.ExtensionNode);
break;
case ExtensionChange.Remove:
nodes.Remove ((CodeFormatterExtensionNode) args.ExtensionNode);
break;
}
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:11,代码来源:CodeFormatterService.cs
示例20: OnExtensionChange
static 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);
}
else {
ITestProvider provider = args.ExtensionObject as ITestProvider;
providers.Remove (provider);
provider.Dispose ();
}
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:13,代码来源:UnitTestService.cs
注:本文中的Mono.Addins.ExtensionNodeEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论