Skip to content

Commit ee04c9a

Browse files
Added some additional nullable annotations (#380)
* Added some additional nullable annotations * fixed compiler error * fixed bug in identifier
1 parent 9cebed1 commit ee04c9a

File tree

40 files changed

+118
-110
lines changed

40 files changed

+118
-110
lines changed

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,27 +43,27 @@ For more information about using the `DebugAdapterClient` / `DebugAdapterServer`
4343
<!-- badges -->
4444

4545
<!-- history badges -->
46-
| Azure Pipelines | GitHub Actions |
47-
| --------------------------------------------------------- | --------------------------------- |
48-
| [![azurepipelines-badge]][azurepipelines] | [![github-badge]][github] |
46+
| Azure Pipelines | GitHub Actions |
47+
| --------------- | -------------- |
48+
| [![azurepipelines-badge]][azurepipelines] | [![github-badge]][github] |
4949
| [![azurepipelines-history-badge]][azurepipelines-history] | [![github-history-badge]][github] |
5050
<!-- history badges -->
5151

5252
<!-- nuget packages -->
53-
| Package | NuGet |
54-
| --------------------------------------------- | ---------------------------------------------------------------------------------------------- |
55-
| OmniSharp.Extensions.DebugAdapter | [![nuget-version-hefb6om79mfg-badge]![nuget-downloads-hefb6om79mfg-badge]][nuget-hefb6om79mfg] |
56-
| OmniSharp.Extensions.DebugAdapter.Client | [![nuget-version-94qjnkon/cda-badge]![nuget-downloads-94qjnkon/cda-badge]][nuget-94qjnkon/cda] |
57-
| OmniSharp.Extensions.DebugAdapter.Server | [![nuget-version-f/4jrt4grmdg-badge]![nuget-downloads-f/4jrt4grmdg-badge]][nuget-f/4jrt4grmdg] |
58-
| OmniSharp.Extensions.DebugAdapter.Shared | [![nuget-version-2fkn0yzdbhmg-badge]![nuget-downloads-2fkn0yzdbhmg-badge]][nuget-2fkn0yzdbhmg] |
59-
| OmniSharp.Extensions.DebugAdapter.Testing | [![nuget-version-jppuysmkpfcw-badge]![nuget-downloads-jppuysmkpfcw-badge]][nuget-jppuysmkpfcw] |
60-
| OmniSharp.Extensions.JsonRpc | [![nuget-version-a1bmkwyotvkg-badge]![nuget-downloads-a1bmkwyotvkg-badge]][nuget-a1bmkwyotvkg] |
61-
| OmniSharp.Extensions.JsonRpc.Testing | [![nuget-version-punkj7/efvjq-badge]![nuget-downloads-punkj7/efvjq-badge]][nuget-punkj7/efvjq] |
62-
| OmniSharp.Extensions.LanguageClient | [![nuget-version-fclou9t/p2ba-badge]![nuget-downloads-fclou9t/p2ba-badge]][nuget-fclou9t/p2ba] |
63-
| OmniSharp.Extensions.LanguageProtocol | [![nuget-version-vddj9t6jnirq-badge]![nuget-downloads-vddj9t6jnirq-badge]][nuget-vddj9t6jnirq] |
53+
| Package | NuGet |
54+
| ------- | ----- |
55+
| OmniSharp.Extensions.DebugAdapter | [![nuget-version-hefb6om79mfg-badge]![nuget-downloads-hefb6om79mfg-badge]][nuget-hefb6om79mfg] |
56+
| OmniSharp.Extensions.DebugAdapter.Client | [![nuget-version-94qjnkon/cda-badge]![nuget-downloads-94qjnkon/cda-badge]][nuget-94qjnkon/cda] |
57+
| OmniSharp.Extensions.DebugAdapter.Server | [![nuget-version-f/4jrt4grmdg-badge]![nuget-downloads-f/4jrt4grmdg-badge]][nuget-f/4jrt4grmdg] |
58+
| OmniSharp.Extensions.DebugAdapter.Shared | [![nuget-version-2fkn0yzdbhmg-badge]![nuget-downloads-2fkn0yzdbhmg-badge]][nuget-2fkn0yzdbhmg] |
59+
| OmniSharp.Extensions.DebugAdapter.Testing | [![nuget-version-jppuysmkpfcw-badge]![nuget-downloads-jppuysmkpfcw-badge]][nuget-jppuysmkpfcw] |
60+
| OmniSharp.Extensions.JsonRpc | [![nuget-version-a1bmkwyotvkg-badge]![nuget-downloads-a1bmkwyotvkg-badge]][nuget-a1bmkwyotvkg] |
61+
| OmniSharp.Extensions.JsonRpc.Testing | [![nuget-version-punkj7/efvjq-badge]![nuget-downloads-punkj7/efvjq-badge]][nuget-punkj7/efvjq] |
62+
| OmniSharp.Extensions.LanguageClient | [![nuget-version-fclou9t/p2ba-badge]![nuget-downloads-fclou9t/p2ba-badge]][nuget-fclou9t/p2ba] |
63+
| OmniSharp.Extensions.LanguageProtocol | [![nuget-version-vddj9t6jnirq-badge]![nuget-downloads-vddj9t6jnirq-badge]][nuget-vddj9t6jnirq] |
6464
| OmniSharp.Extensions.LanguageProtocol.Testing | [![nuget-version-md8c3c/bo/8g-badge]![nuget-downloads-md8c3c/bo/8g-badge]][nuget-md8c3c/bo/8g] |
65-
| OmniSharp.Extensions.LanguageServer | [![nuget-version-fkxlzvrmzpbw-badge]![nuget-downloads-fkxlzvrmzpbw-badge]][nuget-fkxlzvrmzpbw] |
66-
| OmniSharp.Extensions.LanguageServer.Shared | [![nuget-version-4htmykprzq1a-badge]![nuget-downloads-4htmykprzq1a-badge]][nuget-4htmykprzq1a] |
65+
| OmniSharp.Extensions.LanguageServer | [![nuget-version-fkxlzvrmzpbw-badge]![nuget-downloads-fkxlzvrmzpbw-badge]][nuget-fkxlzvrmzpbw] |
66+
| OmniSharp.Extensions.LanguageServer.Shared | [![nuget-version-4htmykprzq1a-badge]![nuget-downloads-4htmykprzq1a-badge]][nuget-4htmykprzq1a] |
6767
<!-- nuget packages -->
6868

6969
## License
@@ -93,10 +93,10 @@ This project is supported by the [.NET Foundation](http://www.dotnetfoundation.o
9393
[github-license-badge]: https://img.shields.io/github/license/OmniSharp/csharp-language-server-protocol.svg?style=flat "License"
9494
[codecov]: https://codecov.io/gh/OmniSharp/csharp-language-server-protocol
9595
[codecov-badge]: https://img.shields.io/codecov/c/github/OmniSharp/csharp-language-server-protocol.svg?color=E03997&label=codecov&logo=codecov&logoColor=E03997&style=flat "Code Coverage"
96-
[azurepipelines]: https://dev.azure.com/omnisharp/Build/_build/latest?definitionId=1&branchName=master
97-
[azurepipelines-badge]: https://img.shields.io/azure-devops/build/omnisharp/Build/1.svg?color=98C6FF&label=azure%20pipelines&logo=azuredevops&logoColor=98C6FF&style=flat "Azure Pipelines Status"
98-
[azurepipelines-history]: https://dev.azure.com/omnisharp/Build/_build?definitionId=1&branchName=master
99-
[azurepipelines-history-badge]: https://buildstats.info/azurepipelines/chart/omnisharp/Build/1?includeBuildsFromPullRequest=false "Azure Pipelines History"
96+
[azurepipelines]: https://dev.azure.com/omnisharp/Builds/_build/latest?definitionId=1&branchName=master
97+
[azurepipelines-badge]: https://img.shields.io/azure-devops/build/omnisharp/Builds/1.svg?color=98C6FF&label=azure%20pipelines&logo=azuredevops&logoColor=98C6FF&style=flat "Azure Pipelines Status"
98+
[azurepipelines-history]: https://dev.azure.com/omnisharp/Builds/_build?definitionId=1&branchName=master
99+
[azurepipelines-history-badge]: https://buildstats.info/azurepipelines/chart/omnisharp/Builds/1?includeBuildsFromPullRequest=false "Azure Pipelines History"
100100
[github]: https://github.com/OmniSharp/csharp-language-server-protocol/actions?query=workflow%3Aci
101101
[github-badge]: https://img.shields.io/github/workflow/status/OmniSharp/csharp-language-server-protocol/ci.svg?label=github&logo=github&color=b845fc&logoColor=b845fc&style=flat "GitHub Actions Status"
102102
[github-history-badge]: https://buildstats.info/github/chart/OmniSharp/csharp-language-server-protocol?includeBuildsFromPullRequest=false "GitHub Actions History"

src/Client/Configuration/ChainedConfigurationProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public void Load() { }
7272
/// <returns>The child keys.</returns>
7373
public IEnumerable<string> GetChildKeys(
7474
IEnumerable<string> earlierKeys,
75-
string parentPath)
75+
string? parentPath)
7676
{
7777
IConfiguration section = parentPath == null ? _config : _config.GetSection(parentPath);
7878
var children = section.GetChildren();

src/Client/Configuration/ChainedConfigurationSource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ internal class ChainedConfigurationSource : IConfigurationSource
1313
/// <summary>
1414
/// The chained configuration.
1515
/// </summary>
16-
public IConfiguration Configuration { get; set; }
16+
public IConfiguration Configuration { get; set; } = null!;
1717

1818
/// <summary>
1919
/// Whether the chained configuration should be disposed when the

src/Client/DefaultLanguageClientFacade.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ internal class DefaultLanguageClientFacade : LanguageProtocolProxy, ILanguageCli
1919
private readonly Lazy<IWorkspaceLanguageClient> _workspace;
2020
private readonly Lazy<IHandlersManager> _handlersManager;
2121
private readonly TextDocumentIdentifiers _textDocumentIdentifiers;
22-
private readonly IInsanceHasStarted _insanceHasStarted;
23-
private ILanguageClient _languageClient;
22+
private readonly IInsanceHasStarted _instanceHasStarted;
23+
private ILanguageClient? _languageClient;
2424

2525
public DefaultLanguageClientFacade(
2626
IResponseRouter requestRouter,
@@ -34,7 +34,7 @@ public DefaultLanguageClientFacade(
3434
Lazy<IWorkspaceLanguageClient> workspace,
3535
Lazy<IHandlersManager> handlersManager,
3636
TextDocumentIdentifiers textDocumentIdentifiers,
37-
IInsanceHasStarted insanceHasStarted
37+
IInsanceHasStarted instanceHasStarted
3838
) : base(requestRouter, resolverContext, progressManager, languageProtocolSettings)
3939
{
4040
_textDocument = textDocument;
@@ -44,7 +44,7 @@ IInsanceHasStarted insanceHasStarted
4444
_workspace = workspace;
4545
_handlersManager = handlersManager;
4646
_textDocumentIdentifiers = textDocumentIdentifiers;
47-
_insanceHasStarted = insanceHasStarted;
47+
_instanceHasStarted = instanceHasStarted;
4848
}
4949

5050
public ITextDocumentLanguageClient TextDocument => _textDocument.Value;
@@ -58,7 +58,7 @@ public IDisposable Register(Action<ILanguageClientRegistry> registryAction)
5858
var manager = new CompositeHandlersManager(_handlersManager.Value);
5959
registryAction(new LangaugeClientRegistry(ResolverContext, manager, _textDocumentIdentifiers));
6060
var result = manager.GetDisposable();
61-
if (_insanceHasStarted.Started)
61+
if (_instanceHasStarted.Started)
6262
{
6363
if (_languageClient == null) throw new NotSupportedException("Language client has not yet started... you shouldn't be here.");
6464
LanguageClientHelpers.InitHandlers(_languageClient, result);

src/Client/LanguageClientServiceCollectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ internal static IContainer AddLanguageClientInternals(this IContainer container,
8080

8181
if (providedConfiguration != null)
8282
{
83-
builder.CustomAddConfiguration(providedConfiguration.ImplementationInstance as IConfiguration);
83+
builder.CustomAddConfiguration((providedConfiguration.ImplementationInstance as IConfiguration)!);
8484
}
8585

8686
//var didChangeConfigurationProvider = _.GetRequiredService<DidChangeConfigurationProvider>();

src/Dap.Client/Configuration/ChainedConfigurationProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public void Load() { }
7272
/// <returns>The child keys.</returns>
7373
public IEnumerable<string> GetChildKeys(
7474
IEnumerable<string> earlierKeys,
75-
string parentPath)
75+
string? parentPath)
7676
{
7777
IConfiguration section = parentPath == null ? _config : _config.GetSection(parentPath);
7878
var children = section.GetChildren();

src/Dap.Client/Configuration/ChainedConfigurationSource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ internal class ChainedConfigurationSource : IConfigurationSource
1313
/// <summary>
1414
/// The chained configuration.
1515
/// </summary>
16-
public IConfiguration Configuration { get; set; }
16+
public IConfiguration Configuration { get; set; } = null!;
1717

1818
/// <summary>
1919
/// Whether the chained configuration should be disposed when the

src/Dap.Client/DebugAdapterClientServiceCollectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ internal static IContainer AddDebugAdapterClientInternals(this IContainer contai
7575

7676
if (providedConfiguration != null)
7777
{
78-
builder.CustomAddConfiguration(providedConfiguration.ImplementationInstance as IConfiguration);
78+
builder.CustomAddConfiguration((providedConfiguration.ImplementationInstance as IConfiguration)!);
7979
}
8080

8181
return builder.Build();

src/Dap.Server/Configuration/ChainedConfigurationProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public void Load() { }
7272
/// <returns>The child keys.</returns>
7373
public IEnumerable<string> GetChildKeys(
7474
IEnumerable<string> earlierKeys,
75-
string parentPath)
75+
string? parentPath)
7676
{
7777
IConfiguration section = parentPath == null ? _config : _config.GetSection(parentPath);
7878
var children = section.GetChildren();

src/Dap.Server/Configuration/ChainedConfigurationSource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ internal class ChainedConfigurationSource : IConfigurationSource
1313
/// <summary>
1414
/// The chained configuration.
1515
/// </summary>
16-
public IConfiguration Configuration { get; set; }
16+
public IConfiguration Configuration { get; set; } = null!;
1717

1818
/// <summary>
1919
/// Whether the chained configuration should be disposed when the

0 commit comments

Comments
 (0)