mirror of
https://github.com/godotengine/godot-csharp-visualstudio.git
synced 2026-01-05 22:10:19 +03:00
Initial commit
This commit is contained in:
23
GodotCompletionProviders/SignalNameCompletionProvider.cs
Normal file
23
GodotCompletionProviders/SignalNameCompletionProvider.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.Completion;
|
||||
|
||||
namespace GodotCompletionProviders
|
||||
{
|
||||
[ExportCompletionProvider(nameof(SignalNameCompletionProvider), LanguageNames.CSharp)]
|
||||
public class SignalNameCompletionProvider : SpecificInvocationCompletionProvider
|
||||
{
|
||||
private static readonly IEnumerable<ExpectedInvocation> ExpectedInvocations = new[]
|
||||
{
|
||||
new ExpectedInvocation {MethodContainingType = GodotObjectType, MethodName = "Connect", ArgumentIndex = 0, ArgumentTypes = StringTypes},
|
||||
new ExpectedInvocation {MethodContainingType = GodotObjectType, MethodName = "Disconnect", ArgumentIndex = 0, ArgumentTypes = StringTypes},
|
||||
new ExpectedInvocation {MethodContainingType = GodotObjectType, MethodName = "IsConnected", ArgumentIndex = 0, ArgumentTypes = StringTypes},
|
||||
new ExpectedInvocation {MethodContainingType = GodotObjectType, MethodName = "EmitSignal", ArgumentIndex = 0, ArgumentTypes = StringTypes},
|
||||
new ExpectedInvocation {MethodContainingType = GodotObjectType, MethodName = "ToSignal", ArgumentIndex = 1, ArgumentTypes = StringTypes},
|
||||
};
|
||||
|
||||
public SignalNameCompletionProvider() : base(ExpectedInvocations, CompletionKind.Signals, "Signal")
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user