https://github.com/exyi/samplecompletionproviders
Sample of Microsoft.CodeAnalysis.Completion.CompletionProvider interface usage
https://github.com/exyi/samplecompletionproviders
Last synced: about 1 year ago
JSON representation
Sample of Microsoft.CodeAnalysis.Completion.CompletionProvider interface usage
- Host: GitHub
- URL: https://github.com/exyi/samplecompletionproviders
- Owner: exyi
- Created: 2016-07-16T12:30:46.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-10-28T21:42:42.000Z (over 8 years ago)
- Last Synced: 2025-04-03T08:03:43.610Z (about 1 year ago)
- Language: C#
- Size: 32.2 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SampleCompletionProviders
Sample of Microsoft.CodeAnalysis.Completion.CompletionProvider interface usage
There are 3 classes implementing it:
* ConfigureAwaitCompletionProvider - suggests `ConfigureAwait(false)` on `Task`, so you don't have type that _open paren, false, close paren_. Described on [DotVVM blog article](https://dotvvm.com/blog)
* PostfixTemplateCompletionProvider - suggests
- `not` "field" on `bool` witch is expanded to `!(...)` expression after commit
- `return` field on `void` witch is expanded to return statement following the current statement
* ReflectionGetMemberCompletionProvider - suggests members of type in `typeof(TheType).GetMethod/GetField/GetProperty/GetMember("...")` expression
See article on [DotVVM blog](https://dotvvm.com/blog) for more information how this works. And source code of the individual classes,
they contain a lot of comments although it's agains my practise :).
The full documentation is at http://source.roslyn.io, specificaly have a look at
[Microsoft.CodeAnalysis.Completion.CompletionProvider](http://source.roslyn.io/#Microsoft.CodeAnalysis.Features/Completion/CompletionProvider.cs,3632bba4d25ec249)
and its implementations