9
9
using MediatR ;
10
10
using Microsoft . Extensions . Logging ;
11
11
using Newtonsoft . Json . Linq ;
12
+ using OmniSharp . Extensions . JsonRpc ;
12
13
using OmniSharp . Extensions . LanguageServer . Protocol ;
13
14
using OmniSharp . Extensions . LanguageServer . Protocol . Client ;
14
15
using OmniSharp . Extensions . LanguageServer . Protocol . Models ;
15
- using OmniSharp . Extensions . LanguageServer . Protocol . Serialization ;
16
16
using OmniSharp . Extensions . LanguageServer . Protocol . Server . Capabilities ;
17
17
using OmniSharp . Extensions . LanguageServer . Protocol . Shared ;
18
18
using OmniSharp . Extensions . LanguageServer . Shared ;
@@ -93,7 +93,7 @@ public void RegisterCapabilities(ServerCapabilities serverCapabilities)
93
93
Method = method ,
94
94
RegisterOptions = registrationOptions
95
95
} ;
96
- _registrations . AddOrUpdate ( registrationOptions . Id , x => reg , ( a , b ) => reg ) ;
96
+ _registrations . AddOrUpdate ( registrationOptions . Id , _ => reg , ( _ , _ ) => reg ) ;
97
97
}
98
98
}
99
99
@@ -115,7 +115,7 @@ public void RegisterCapabilities(ServerCapabilities serverCapabilities)
115
115
Method = method ,
116
116
RegisterOptions = registrationOptions
117
117
} ;
118
- _registrations . AddOrUpdate ( registrationOptions . Id , x => reg , ( a , b ) => reg ) ;
118
+ _registrations . AddOrUpdate ( registrationOptions . Id , _ => reg , ( _ , _ ) => reg ) ;
119
119
}
120
120
}
121
121
}
@@ -133,7 +133,7 @@ private void Register(params Registration[] registrations)
133
133
134
134
foreach ( var reg in newRegistrations )
135
135
{
136
- _registrations . AddOrUpdate ( reg . Id , reg , ( a , b ) => reg ) ;
136
+ _registrations . AddOrUpdate ( reg . Id , reg , ( _ , _ ) => reg ) ;
137
137
}
138
138
}
139
139
@@ -177,8 +177,7 @@ public IEnumerable<Registration> GetRegistrationsMatchingSelector(DocumentSelect
177
177
_registrations
178
178
. Select ( z => z . Value )
179
179
. Where (
180
- x => x . RegisterOptions is ITextDocumentRegistrationOptions ro &&
181
- ro . DocumentSelector != null &&
180
+ x => x . RegisterOptions is ITextDocumentRegistrationOptions { DocumentSelector : { } } ro &&
182
181
ro . DocumentSelector
183
182
. Join (
184
183
documentSelector ,
@@ -187,7 +186,7 @@ public IEnumerable<Registration> GetRegistrationsMatchingSelector(DocumentSelect
187
186
z . HasPattern ? z . Pattern : string . Empty ,
188
187
z => z . HasLanguage ? z . Language :
189
188
z . HasScheme ? z . Scheme :
190
- z . HasPattern ? z . Pattern : string . Empty , ( a , b ) => a
189
+ z . HasPattern ? z . Pattern : string . Empty , ( a , _ ) => a
191
190
)
192
191
. Any ( y => y . HasLanguage || y . HasPattern || y . HasScheme )
193
192
) ;
0 commit comments